Commit Graph

1520 Commits

Author SHA1 Message Date
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
Debanjum
64886cd0dd Fix storing code results on server and rendering them on web app
- Fix code context data type for validation on server. This would
  prevent the chat message from being written to history
- Handle null code results on web app
2025-06-09 23:46:12 -07:00
Debanjum
bd928b9f3c Handle unset agent slug, name. E.g when chat with user created agents 2025-06-09 18:11:25 -07:00
Debanjum
d638a49cd9 Release Khoj version 1.42.2 2025-06-07 13:32:12 -07:00
Debanjum
77caf183ee Patch update django, next.js dependencies 2025-06-06 15:39:39 -07:00
Debanjum
c2cd92a454 [Breaking] Move automation api into new router with consistent routes
- Rename GET /api/automations to GET /api/automation
- Rename POST /api/trigger/automation to POST /api/automation/trigger
- Update calls to the automations API from the web app.
2025-06-06 13:28:18 -07:00
Debanjum
d16f9f272b Add ability to retry a query from the web app 2025-06-06 13:28:18 -07:00
Debanjum
430459a338 Release Khoj version 1.42.1 2025-06-03 21:46:16 -07:00
Debanjum
f3a5fe1ae8 Release Khoj version 1.42.0 2025-06-01 20:52:25 -07:00
Debanjum
f95d352eb9 Ensure profile is right border aligned on khoj obsidian settings page
On wide screens it wasn't taking up the header wasn't taking up the
full width, so profile picture could hang out in the middle somewhere.
2025-06-01 17:02:08 -07:00
Debanjum
759ffc46b0 Default to read currently open file when chat with Khoj from Obsidian
Vault is already indexed, this should ease engaging with current
context more easily.
2025-06-01 16:56:19 -07:00
Henri Jamet
dbfac89a0c Major updates to Obsidian Khoj plugin chat interface and editing features (#1109)
## Description
This PR introduces significant improvements to the Obsidian Khoj
plugin's chat interface and editing capabilities, enhancing the overall
user experience and content management functionality.

## Features

### 🔍 Enhanced Communication Mode
I've implemented radio buttons below the chat window for easier
communication mode selection. The modes are now displayed as emojis in
the conversation for a cleaner interface, replacing the previous
text-based system (e.g., /default, /research). I've also documented the
search mode functionality in the help command.

#### Screenshots
- Radio buttons for mode selection
- Emoji display in conversations
![Recording 2025-02-11 at 18 56
10](https://github.com/user-attachments/assets/798d15df-ad32-45bd-b03f-581f6093575a)

### 💬 Revamped Message Interaction
I've redesigned the message buttons with improved spacing and color
coding for better visual differentiation. The new edit button allows
quick message modifications - clicking it removes the conversation up to
that point and copies the message to the input field for easy editing or
retrying questions.

#### Screenshots
- New message styling and color scheme
![Recording 2025-02-11 at 18 44
48](https://github.com/user-attachments/assets/159ece3d-2d80-4583-a7a8-2ef1f253adcc)
- Edit button functionality
![Recording 2025-02-11 at 18 47
52](https://github.com/user-attachments/assets/82ee7221-bc49-4088-9a98-744ef74d1e58)

### 🤖 Advanced Agent Selection System
I've added a new chat creation button with agent selection capability.
Users can now choose from their available agents when starting a new
chat. While agents can't be switched mid-conversation to maintain
context, users can easily start fresh conversations with different
agents.

#### Screenshots
- Agent selection dropdown
![Recording 2025-02-11 at 18 51
27](https://github.com/user-attachments/assets/be4208df-224c-45bf-a5b4-cf0a8068b102)

### 👁️ Real-Time Context Awareness
I've added a button that gives Khoj access to read Obsidian opened tabs.
This allows Khoj to read open notes and track changes in real-time,
maintaining a history of previous versions to provide more contextual
assistance.

#### Screenshots
- Window access toggle
![Recording 2025-02-11 at 18 59
01](https://github.com/user-attachments/assets/b596bfca-f622-41b7-b826-25a8e254d4a2)

### ✏️ Smart Document Editing
Inspired by Cursor IDE's intelligent editing and ChatGPT's Canvas
functionality, I've implemented a first version of a content creation
system we've been discussing. Using a JSON-based modification system,
Khoj can now make precise changes to specific parts of files, with
changes previewed in yellow highlighting before application.
Modification code blocks are neatly organized in collapsible sections
with clear action summaries. While this is just a first step, it's
working remarkably well and I have several ideas for expanding this
functionality to make Khoj an even more powerful content creation
assistant.

#### Screenshots
- JSON modification preview
- Change highlighting system
- Collapsible code blocks
- Accept/cancel controls
![Recording 2025-02-11 at 19 02
32](https://github.com/user-attachments/assets/88826c9e-d0c9-40da-ab78-9976c786aa9e)

---------

Co-authored-by: Debanjum <debanjum@gmail.com>
2025-06-01 10:42:36 +05:30
Debanjum
830a1af69e Render operator train of thought as video on web app to ease viewing
- You can seek through the train of thought video of computer operation or
  follow it in live mode.
- Interleaves video with normal text thoughts.
- Video available of old interactions and currently streaming message.
2025-05-31 20:51:08 -07:00
Debanjum
99fdd91a01 Latch to bottom instantly and well when auto scroll chat stream on web 2025-05-31 16:50:26 -07:00
Debanjum
c1c1fc6265 Make send message validation more robust on web app 2025-05-26 00:35:10 -07:00
Debanjum
6cb512d9cf Support natural interrupt and send query behavior from web app
- Just send your new query. If a query was running previously it'd
be interrupted and new query would start processing. This improves on
the previous 2 click interrupt and send ux.

- Utilizes partial research for interrupted query, so you can now
redirect khoj's research direction. This is useful if you need to
share more details, change khoj's research direction in anyway or
complete research. Khoj's train of thought can be helpful for this.
2025-05-26 00:35:10 -07:00
Debanjum
258b5a0372 Show operator screenshots with reasoning in train of thought on web app 2025-05-19 16:28:55 -07:00
Debanjum
e71575ad1a Render screenshot in train of thought on openai agent screenshot action 2025-05-19 16:28:55 -07:00
Debanjum
08e93c64ab Render screenshot in train of thought on browser screenshot action
Update web app to render screenshot image when screenshot action taken
by browser operator
2025-05-19 16:28:54 -07:00
Debanjum
e94bf00e1e Add cancellation support to research mode via asyncio.Event 2025-05-09 00:01:45 -06:00
Debanjum
16f3c85dde Handle thinking by reasoning models. Show in train of thought on web client 2025-05-02 19:11:16 -06:00
Debanjum
559b323475 Support attaching jupyter/ipython notebooks from the web app to chat 2025-05-02 14:11:27 -06:00
Debanjum
964a784acf Release Khoj version 1.41.0 2025-04-23 19:01:27 +05:30
Debanjum
b2390fa977 Allow attaching typescript files to chat on web app 2025-04-19 19:08:11 +05:30
Debanjum
ab29ffd799 Fix web app packaging for pypi since upgrade to python 3.11.12 in CI 2025-04-19 18:03:29 +05:30
Debanjum
79fc911633 Enable free tier users to switch between free tier AI models
- Update API to allow free tier users to switch between free models
- Update web app to allow model switching on agent creation, settings
  chat page (via right side pane), even for free tier users.

Previously the model switching APIs and UX fields on web app were
completely disabled for free tier users
2025-04-19 17:29:53 +05:30
sabaimran
6a30da3e9e Fix default state for tools in the agent settings for the chat sidebar 2025-04-11 11:12:22 -07:00
Debanjum
2470eea421 Release Khoj version 1.40.0 2025-04-11 18:10:56 +05:30
Debanjum
d0a933b072 Add email based rate limiting to email login API endpoint
Server:
 - Rate limit based on unverified email before creating user
 - Check email address for deliverability before creating user
 - Track rate limit for unverified email in new non-user keyed table

Web app:
 - Show error in login popup to user on failure/throttling
 - Simplify login popup logic by moving magic link handling logic
   into EmailSigninContext instead of passing require props via parent
2025-04-11 17:49:18 +05:30
Debanjum
2935ea52cf Set chatSidebar prompt, Setting name fields to empty str if value null
TextArea and Input field values cannot be null.
2025-04-10 19:59:01 +05:30
Debanjum
aea7b90fec Track if agent modified in chatSidebar to simplify code, fix looping
Previously the sidebar could recurse on opening chat page (from home?)
due to child modelSelector component updating parent chatSidebar prop
which was passed back down to it in a loop.

The chatSidebar decides if agent has been modified in a single
useEffect and enables the Save button accordingly.
- Track agent modification wrt agent info received from server in
  chatSidebar instead.
- Reduce modelSelector's mandate to just notify
  when the user changes the model.

- Fix to infer, show & update agent state from chat sidebar on web app
  This logic is fragile and convoluted because:
  - the default agent chat model is dynamically determined.
  - need to disambiguate tools not set vs none set vs all set by user
    The default agent's tool selection is stored as undefined to show
    not set scenario, which allows for all tools to be dynamically
    used by  agent.
    But the user can also set no tools or all tools for their agents.
    All 3 scenarios are handled differently.
  - Track tools to be displayed vs tools to be stored
2025-04-10 19:59:01 +05:30
Debanjum
e9ee9004fb Suppress spurious dark mode hydration warnings on the web app
This is triggered by mismatch between "dark" class present on server
sent layout but not in client sent layout on initial render.

That mismatch exists because the server applies dark-mode styling
early to avoid FOUC flickering of UX.

Related 43e032e
2025-04-10 19:59:01 +05:30
Debanjum
9ab5ead3ca Set key for chatMessage parent to get UX efficiently updated by react
By fixing the no key prop in ChatHistory error on web app
2025-04-10 19:59:01 +05:30
Debanjum
1ad7314fe6 Let only root next.js layout handle html, body tags, not child layouts
Remove html, body elements from child page layouts. Let only the root
layout handle it.

Next.js router structure mounts child layouts inside parent layouts,
as defined by their directory hierarchy. So the html, body component
should only be defined in the parent layout.

This avoids the child layout mounting its html, body component within
the actual root layout's existing html, body component.
2025-04-10 19:59:01 +05:30
sabaimran
2ae8c62547 Repopulate the client API-key generation section 2025-04-07 06:54:47 -07:00
Debanjum
6e61ec64a4 Release Khoj version 1.39.0 2025-04-04 20:35:50 +05:30
sabaimran
abfdf7b1fb Temporarily remove the OTP feature on the settings page while we fix our number 2025-04-03 19:41:18 -05:00
Debanjum
5b8c2989d6 Add hover text on button to unshare a conversation on web app 2025-03-31 15:32:43 +05:30
Debanjum
713ba06a8d Release Khoj version 1.38.0 2025-03-29 18:30:06 +05:30
Debanjum
e9132d4fee Support attaching programming language file types to web app for chat 2025-03-29 01:22:35 +05:30
Debanjum
9dfa7757c5 Unshare public conversations from the title pane on web app
Only show the unshare button on public conversations created by the
currently logged in user. Otherwise hide the button

Set conversation.isOwner = true only if currently logged in user
shared the current conversation.

This isOwner information is passed by the get shared conversation API
endpoint
2025-03-25 14:05:29 +05:30
sabaimran
a8285deed7 Release Khoj version 1.37.2 2025-03-23 11:38:25 -07:00
sabaimran
12e7409da9 Release Khoj version 1.37.1 2025-03-23 11:10:34 -07:00
Debanjum
55ae0eda7a Upgrade package dependencies nextjs for web app and torch on server 2025-03-23 17:10:40 +05:30
Debanjum
80d864ada7 Release Khoj version 1.37.0 2025-03-20 14:06:57 +05:30
Debanjum
f15a95dccf Show Khoj agent in agent dropdown by default on mobile in web app home
Previously on slow connection you'd see the agent dropdown flicker
from undefined to Khoj default agent on phones and other thin screens.

This is unnecessary and jarring. Populate with default agent to remove
this issue
2025-03-20 12:27:52 +05:30