-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
Upgrade Khoj Obsidian: Chat from Side Pane, Stream Intermediate Steps, Copy Message to Clipboard #736
Conversation
- Allows having it open on the side as you traverse your Obsidian notes - Allow faster time to response, having responses visible for context - Enables ambient interactions
Previously scroll and chat input focus weren't applied as view hadn't been rendered yet
Previously we were just getting user email from the /health API Instead store the retrieved user info in the user settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These improvements are super exciting for the Obsidian interface ✨
I think we can also create a better default page if/when the user hasn't connected to the server properly.
Closes #754
- Jump to chat, show similar actions from nav menu of Khoj side pane - Add chat, search icons from web, desktop app - Use lucide icon for find similar (for now) - Match proportions of find similar icon to khoj other icons via css, js - Use KhojPaneView abstract class to allow reuse of common functionality like - Creating the nav bar header in side pane views - Loading geo-location data for chat context This should make creating new views easier
It'll replace any highlighted text with the chat message or if not text is highlighted, it'll insert the chat message at the last cursor position in the active file
Works better with dark modes. References have more spacing and adhere to background color of the chat message itself
- Setup websocket using Khoj web app as reference. - Moved the geolocating code to chat view out from the general pane view - Use loading spinner from web instead of the thinking emoji
Simplify, reuse, standardize code to render messages with references in the obsidian, web and desktop clients. Specifically: - Reuse function to create reference section, dedupe code - Create reusable function to generate image markdown - Simplify logic to render message with references
- Pass file path of reference along with the compiled reference in list of references returned by chat API converts - Update the structure of references from list of strings to list of dictionary (containing 'compiled' and 'file' keys) - Pull out the compiled reference from the new references data struct wherever it was is being used
Allow opening Khoj chat references in Obsidian vault if the reference is a heading or file in the current Obsidian vault
28ef55c
to
1ea7675
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more suggestions, but the experience including sessions is so much better.
Fix code formating of Khoj chat view in Obsidian
- Dedupe the code to add action buttons to chat messages - Update the renderIncrementalMessage function to also add the action buttons to newly generated chat messages by Khoj
- Conflicts: - src/khoj/interface/web/chat.html Use our changes with feedback button changes from master
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
10005301 | Triggered | Generic Password | 7a93599 | src/khoj/app/settings.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Details
Gives more transparency into Khoj 'thinking' process, e.g internet, notes searches performed, documents read etc.
The feedback allows us to tune our messages to elicit better responses by Khoj
Screenshots
Resolves #789, #754