Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OS Level Shortcut Window for Quick Access to Khoj Desktop #815

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

MythicalCow
Copy link
Contributor

Introduction 📖

To make Khoj more integrated into our users' environments, we are building an OS-level shortcut that can quickly be accessed from any app or webpage. We aim to provide a more seamless experience between digital activities and the personalized assistant we seek to deliver with Khoj.

Usage/Features 🛠️

  • Creates a new shortcut window that can be activated using the shortcut Control/Command + Shift + K
  • Uses clipboard text as a prompt text for quick messages.
  • Editable message for adjusting output.
  • Saves messages as conversation for future access.

Demo Image ✨

image

PR Review / Contributing ⚙️

  • There is a bug where the scrollbar doesn't automatically scroll.
  • Code is heavily based on chat.html so there may be redundant code in index.html that can be removed.
  • UI/UX Suggestions

@MythicalCow MythicalCow self-assigned this Jun 12, 2024
@MythicalCow MythicalCow added upgrade New feature or request help wanted Extra attention is needed plugin Improvements or additions to content or UI integrations try Experiment with feature or capability labels Jun 12, 2024
@MythicalCow
Copy link
Contributor Author

make naming scheme better for files and methods

Copy link
Member

@debanjum debanjum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to play with this update! It'll make Khoj way easier to access in-flow across your OS

src/interface/desktop/assets/Inter-Black.ttf Outdated Show resolved Hide resolved
src/interface/desktop/index.html Outdated Show resolved Hide resolved
src/interface/desktop/main.js Show resolved Hide resolved
@MythicalCow
Copy link
Contributor Author

  • change title to "Khoj (Esc to Quit)"
  • address x button showing up on mac

@sabaimran
Copy link
Collaborator

sabaimran commented Jun 14, 2024

Screenshot 2024-06-14 at 10 52 48

Awesome! I just tested this out locally and it's really dope. Just a bit of feedback:

  1. In MacOS, an X comes up here. Let's either remove the title bar + coach the user into understanding that Escape will close the window, or keep the title bar and let that also close the window. Current behavior: If I click X to close the window, I'm not able to start another shortcut menu.
  2. At the bottom of the Khoj response, add a button (next to references) that says 'Continue this conversation' and takes you back to the home chat screen, refreshed.

src/interface/desktop/main.js Outdated Show resolved Hide resolved
src/interface/desktop/main.js Outdated Show resolved Hide resolved
src/interface/desktop/main.js Outdated Show resolved Hide resolved
@KrishDevCrafting
Copy link

I recently used that web application as feedback adding a toggle button for dark mode and light.

@debanjum debanjum changed the title New Feature: OS Level Quick Shortcut for Khoj Add OS Level Shortcut Window for Quick Access to Khoj Desktop Jun 18, 2024
@sabaimran
Copy link
Collaborator

Saba to debug shortcut window closing issue on macos.

@MythicalCow
Copy link
Contributor Author

Screenshot 2024-06-14 at 10 52 48

Awesome! I just tested this out locally and it's really dope. Just a bit of feedback:

1. In MacOS, an X comes up here. Let's either remove the title bar + coach the user into understanding that Escape will close the window, or keep the title bar and let that also close the window. Current behavior: If I click X to close the window, I'm not able to start another shortcut menu.

2. At the bottom of the Khoj response, add a button (next to references) that says 'Continue this conversation' and takes you back to the home chat screen, refreshed.

#2 has been addressed now 😄

1. Use a helper function to determine if the window is open by seeing if there's a browser window with shortcut.html loaded
2. Use the  event listener on the window to handle teardown
@sabaimran sabaimran requested a review from debanjum June 20, 2024 13:12
Copy link
Member

@debanjum debanjum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes look great! Thanks for making the shared chat js functions reusable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed plugin Improvements or additions to content or UI integrations try Experiment with feature or capability upgrade New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants