Commit Graph

1565 Commits

Author SHA1 Message Date
Debanjum
82dc7b115b Fix to allow khoj to delete content in obsidian write mode
Previous regex and replacement logic did not allow replace block to be
empty
2025-08-20 20:18:27 -07:00
Debanjum
7645cbea3b Do not throw error when no edit blocks in write mode on obsidian
Editing is an option, not a requirement in file write/edit mode.
2025-08-20 20:18:27 -07:00
Debanjum
2e6928c582 Limit retries to fix invalid edit blocks in obsidian write mode 2025-08-20 20:18:27 -07:00
Debanjum
c5e2373d73 Make khoj obsidian keyboard shortcuts toggle voice chat, chat history
Previously hitting voice chat keybinding would just start voice chat,
not end it and just open chat history and not close it.

This is unintuitive and different from the equivalent button click
behaviors.

Fix toggles voice chat on/off and shows/hides chat history when hit
Ctrl+Alt+V, Ctrl+Alt+O keybindings in khoj obsidian chat view
2025-08-20 20:18:27 -07:00
Debanjum
d8b2df4107 Only show 3 recent files as context in obsidian file read, write mode
Related #1209
2025-08-20 20:18:27 -07:00
Debanjum
eb2f0ec6bc Persist open file access mode setting across restarts in obsidian
Allows a lightweight mechanism to persist this user preference.
Improve hover text a bit for readability.

Resolves #1209
2025-08-20 20:18:27 -07:00
Debanjum
2884853c98 Make plugin object accessible to chat, find similar panes in obsidian
Allows ability to access, save settings in a cleaner way
2025-08-20 20:18:27 -07:00
Debanjum
13d26ae8b8 Wrap long words in train of thought shown on web app 2025-08-20 19:07:28 -07:00
Debanjum
e0007a31bb Update web UX when server side error or hit stop + no task running
- Ack websocket interrupt even when no task running
  Otherwise chat UX isn't updated to indicate query has stopped
  processing for this edge case

- Mark chat request as not being procesed on server side error
2025-08-20 19:07:28 -07:00
Debanjum
4728098cad Fix to set agent for new chat created from obsidian
- Set the agent of the current conversation in the agent dropdown when a new conversation with a non-default agent is initialized. This was unset previously.
- Pass the current selected agent in the dropdown when creating new chat
- Correctly select the `khoj-header-agent-select' element
2025-08-21 07:33:25 +05:30
Fh26697
a2a3eb8be6 Update chat_view.ts
fixed Typo
2025-08-20 17:01:47 +02:00
Fh26697
b3015f6837 Update chat_view.ts
fixed Typo
2025-08-20 16:58:08 +02:00
Fh26697
916534226a Chats are not using specified Agent
The function createNewConversation is never called with the agentSlug specified so its always opening a new Conversation with the Base Agent
2025-08-19 15:49:41 +02:00
Debanjum
25e549d683 Show connection lost toast if disconnect while processing chat request 2025-08-15 16:04:26 -07:00
Debanjum
59bfaf9698 Fix to indicate ws disconnect on web app & save interrupted research
- A regression had stopped indicating to user that the websocket
connection had broken. Now the interrupt has some visual indication.

- Websocket disconnects from client didn't trigger the partial
research to be saved. Now we use an interrupt signal to save partial
research before closing task.
2025-08-15 16:04:26 -07:00
Debanjum
7251b25c66 Handle null reference exceptions when rendering files context 2025-08-15 16:00:51 -07:00
Debanjum
bd82626084 Release Khoj version 2.0.0-beta.13 2025-08-11 22:29:06 -07:00
Debanjum
8ad38dfe11 Switch to Bun instead of Deno (or Yarn) for faster web app builds 2025-08-01 03:00:43 -07:00
Debanjum
b86430227c Dedupe and move dev dependencies out from web app production builds 2025-08-01 00:28:39 -07:00
Debanjum
791ebe3a97 Format web app code with prettier recommendations
Too many of these had accumulated earlier from being ignored.
Changed to make build logs less noisy
2025-08-01 00:28:39 -07:00
Debanjum
d2940de367 Use Deno for speed, package locks in dev setup, github workflows
It's faster than yarn and comes with standard convenience utilities
2025-08-01 00:01:34 -07:00
Debanjum
9096f628d0 Release Khoj version 2.0.0-beta.12 2025-07-31 18:13:17 -07:00
Debanjum
7ab24d875d Release Khoj version 2.0.0-beta.11 2025-07-31 10:25:42 -07:00
Debanjum
f5d12b7546 Bump desktop app and documentation dependencies 2025-07-25 13:37:45 -05:00
Debanjum
48e21d9f0f Release Khoj version 2.0.0-beta.10 2025-07-19 21:32:14 -05:00
Debanjum
76a1b0b686 Release Khoj version 2.0.0-beta.9 2025-07-19 20:20:50 -05:00
Debanjum
b90e2367d5 Fix interrupt UX and research when using websocket via web app 2025-07-17 17:09:21 -07:00
Debanjum
eaed0c839e Use websocket chat api endpoint to communicate from web app
- Use websocket library to handle setup, reconnection from web app
Use react-use-websocket library to handle websocket connection and
reconnection logic. Previously connection wasn't re-established on
disconnects.

- Send interrupt messages with ws to update research, operator trajectory

Previously we were using the abort and send new POST /api/chat
mechanism.

But now we can use the websocket's bi-directional messaging capability
to send users messages in the middle of a research, operator run.

This change should
1. Allow for a faster, more interactive interruption to shift the
research direction without breaking the conversation flow. As
previously we were using the DB to communicate interrupts across
workers, this would take time and feel sluggish on the UX.

2. Be a more robust interrupt mechanism that'll work in multi worker
setups. As same worker is interacted with to send interrupt messages
instead of potentially new worker receiving the POST /api/chat with
the interrupt user message.

On the server we're using an asyncio Queue to pass messages down from
websocket api to researcher via event generator. This can be extended
to pass to other iterative agents like operator.
2025-07-17 17:06:55 -07:00
Debanjum
99ed796c00 Release Khoj version 2.0.0-beta.8 2025-07-15 16:42:44 -07:00
Debanjum
76ed97d066 Set friendly name for auto loaded chat models during first run
The chat model friendly name field was introduced in a8c47a70f. But
we weren't setting the friendly name for ollama models, which get
automatically loaded on first run.

This broke setting chat model options, server admin settings and
creating new chat pages (at least) as they display the chat model's
friendly name.

This change ensures the friendly name for auto loaded chat models is
set to resolve these issues. We also add a null ref check to web app
model selector as an additional safeguard to prevent new chat page
crash due to missing friendly name going forward.

Resolves #1208
2025-07-15 14:27:04 -07:00
Debanjum
0a06f5b41a Release Khoj version 2.0.0-beta.7 2025-07-11 00:04:56 -07:00
Debanjum
f1a3ddf2ca Release Khoj version 2.0.0-beta.6 2025-07-10 13:41:06 -07:00
Debanjum
7b637d3432 Use document style ux when print conversations to pdf
Inspired by my previous turnstyle ux explorations.

But basically user message becomes section title and khoj message
becomes section body with the timestamp being used a section title,
body divider.
2025-07-10 13:27:04 -07:00
Debanjum
f2b86aa7c8 Release Khoj version 2.0.0-beta.5 2025-07-08 23:45:29 -07:00
Debanjum
fad6a638bd Release Khoj version 2.0.0-beta.4 2025-07-08 19:34:52 -07:00
Debanjum
254207b010 Make chats print friendly to share via print to PDF etc. from browser
Add print specific styling to hide side panels and chat input footers.
Add heading with khoj logo, conversation title, agent and date.
2025-07-08 12:20:19 -07:00
Debanjum
9a215141f0 Release Khoj version 2.0.0-beta.3 2025-07-06 12:50:27 -07:00
Debanjum
bc6bbb4c96 Release Khoj version 2.0.0-beta.2 2025-07-06 12:10:32 -07:00
Debanjum
8cd2a1a961 Release Khoj version 2.0.0-beta.1 2025-07-06 10:39:56 -07:00
Debanjum
9607f2e87c Release Khoj version 1.42.8 2025-07-02 19:07:51 -07:00
Debanjum
f4fc76645c Upgrade electron package used by desktop app 2025-07-02 18:50:18 -07:00
Debanjum
487826bc32 Release Khoj version 1.42.7 2025-06-27 18:21:18 -07:00
Debanjum
1566e3c74d Ease bulk (de-)selecting of files to add/remove to agent knowledge base
Add select all, deselect all buttons to select all (filtered) files to
add, remove from an agent's knowledge base.
2025-06-27 15:19:50 -07:00
Debanjum
dd89dd3fc8 Bump web, documentation and desktop app package dependencies 2025-06-27 15:19:50 -07:00
Debanjum
73c384b052 Reduce chat history spacing to reduce wasted space b/w chat input box
The tailwing theme spacing of the scroll area surrounding chat history
on large screens was what was causing the large gap between chat input
box and chat history on some screen layouts.

This change reduces the spacing to a more acceptable level.
2025-06-24 02:46:46 -07:00
Debanjum
dc202e4441 Release Khoj version 1.42.6 2025-06-20 15:00:22 -07:00
Debanjum
aa7b23c125 Handle rendering document references with no compiled text on web app 2025-06-17 15:47:58 -07:00
Debanjum
9673f8beba Release Khoj version 1.42.5 2025-06-11 13:36:46 -07:00
Debanjum
71221533c8 Release Khoj version 1.42.4 2025-06-10 23:49:30 -07:00
Debanjum
0cd709caf4 Release Khoj version 1.42.3 2025-06-10 10:20:44 -07:00