Commit graph

2679 commits

Author SHA1 Message Date
Debanjum Singh Solanky
5927ca8032 Properly close chat stream iterator even if response generation fails
Previously chat stream iterator wasn't closed when response streaming
for offline chat model threw an exception.

This would require restarting the application. Now application doesn't
hang even if current response generation fails with exception
2024-08-23 02:06:26 -07:00
Debanjum Singh Solanky
238bc11a50 Fix, improve openai chat actor, director tests & online search prompt 2024-08-22 19:09:33 -07:00
Debanjum Singh Solanky
9986c183ea Default to gpt-4o-mini instead of gpt-3.5-turbo in tests, func args
GPT-4o-mini is cheaper, smarter and can hold more context than
GPT-3.5-turbo. In production, we also default to gpt-4o-mini, so makes
sense to upgrade defaults and tests to work with it
2024-08-22 19:04:49 -07:00
Debanjum Singh Solanky
8a4c20d59a Enforce json response by offline models when requested by chat actors
- Background
  Llama.cpp allows enforcing response as json object similar to OpenAI
  API. Pass expected response format to offline chat models as well.

- Overview
  Enforce json output to improve intermediate step performance by
  offline chat models. This is especially helpful when working with
  smaller models like Phi-3.5-mini and Gemma-2 2B, that do not
  consistently respond with structured output, even when requested

- Details
  Enforce json response by extract questions, infer output offline
  chat actors
  - Convert prompts to output json objects when offline chat models
    extract document search questions or infer output mode
  - Make llama.cpp enforce response as json object

- Result
  - Improve all intermediate steps by offline chat actors via json
    response enforcement
  - Avoid the manual, ad-hoc and flaky output schema enforcement and
    simplify the code
2024-08-22 18:07:44 -07:00
Debanjum Singh Solanky
ab7fb5117c Release Khoj version 1.21.2 2024-08-20 12:38:54 -07:00
Debanjum Singh Solanky
de24ffcf0d Upgrade Axios, a desktop app dependency, to version 1.7.4 2024-08-20 12:32:36 -07:00
sabaimran
1ac8de6c3a Release Khoj version 1.21.1 2024-08-20 11:55:34 -07:00
sabaimran
f6ce2fd432 Handle end of chunk logic in openai stream processor 2024-08-20 10:50:09 -07:00
sabaimran
029775420c Release Khoj version 1.21.0 2024-08-20 10:01:56 -07:00
sabaimran
4808ce778a
Merge pull request #892 from khoj-ai/upgrade-offline-chat-models-support
Upgrade offline chat model support. Default to Llama 3.1
2024-08-20 11:51:20 -05:00
Debanjum Singh Solanky
58c8068079 Upgrade default offline chat model to llama 3.1 2024-08-20 09:28:56 -07:00
sabaimran
2d9dd81e76 Re-add authenticated decorator to api_chat.py /chat endpoint 2024-08-19 05:37:18 -05:00
sabaimran
2c5350329a Remove the hashes from titles in found relevant notes 2024-08-18 22:31:15 -05:00
Debanjum Singh Solanky
acdc3f9470 Unwrap any json in md code block, when parsing chat actor responses
This is a more robust way to extract json output requested from
gemma-2 (2B, 9B) models which tend to return json in md codeblocks.

Other models should remain unaffected by this change.

Also removed request to not wrap json in codeblocks from prompts. As
code is doing the unwrapping automatically now, when present
2024-08-16 14:16:29 -05:00
Debanjum Singh Solanky
ca45fce8ac Break long links in train of thought to stay within chat page width 2024-08-16 14:16:29 -05:00
sabaimran
c0316a6b5d
Enable free tier users to have unlimited chats with the default chat model (#886)
- Allow free tier users to have unlimited chats with default chat model. It'll only be rate-limited and at the same rate as subscribed users
- In the server chat settings, replace the concept of default/summarizer models with default/advanced chat models. Use the advanced models as a default for subscribed users.
- For each `ChatModelOption' configuration, allow the admin to specify a separate value of `max_tokens' for subscribed users. This allows server admins to configure different max token limits for unsubscribed and subscribed users
- Show error message in web app when hit rate limit or other server errors
2024-08-16 12:14:44 -07:00
Debanjum
8dad9362e7
Improve search model config display for admin (#887) from aam-at/feature/improve_search_model_config_admin
Currently, the search model config display for admins only shows the id of the search model config, which is not very informative. 

The changes enhances the admin console by displaying the name of the search model config (name), as well as the bi-encoder model (bi_encoder) and cross-encoder model (cross_encoder) along the id.
2024-08-16 07:33:55 -07:00
Debanjum
2b1482d2b4
Fix indexing content from Emacs #883 from aam-at/bugfix/fix_emacs_if
Previously `force' was passed as a query param to the single indexing API. After the recent API updates, it is meant to select the API method to use (PATCH vs PATCH). Converting `force' argument to a bool fixes implementing this new behavior
2024-08-16 07:32:46 -07:00
Debanjum
0b568e204e
Add model_config for cross-encoder model (#885) from aam-at/feature/crossencoder_model_config
Add `model_config' for the cross-encoder model, so the server admin can use models which require the `trust_remote_code' argument to run locally
2024-08-16 07:32:19 -07:00
Debanjum
39e566ba91
Improve Document, Online Search to Answer Vague or Meta Questions (#870)
- Major
  - Improve doc search actor performance on vague, random or meta questions
  - Pass user's name to document and online search actors prompts

- Minor
  - Fix and improve openai chat actor tests
  - Remove unused max tokns arg to extract qs func of doc search actor
2024-08-16 06:46:13 -07:00
Debanjum Singh Solanky
27ad9b1302 Remove unused max tokns arg to extract qs func of doc search actor 2024-08-13 12:53:39 +05:30
Debanjum Singh Solanky
f75606d7f5 Improve doc search actor performance on vague, random or meta questions
- Issue
  Previously the doc search actor wouldn't extract good search queries
  to run on user's documents for broad, vague questions.

- Fix
  The updated extract questions prompt shows and tells the doc search
  actor on how to deal with such questions

  The doc search actor's temperature was also increased to support more
  creative/random questions. The previous temp of 0 was meant to
  encourage structured json output. But now with json mode, a low temp is
  not necessary to get json output
2024-08-13 12:53:39 +05:30
Debanjum Singh Solanky
3675938df6 Support passing temperature to offline chat model chat actors
- Use temperature of 0 by default for extract questions offline chat
  actor
- Use temperature of 0.2 for send_message_to_model_offline (this is
  the default temperature set by llama.cpp)
2024-08-13 12:53:00 +05:30
Shantanu Sakpal
b5bcce7f85
Cycle through chat history in chat input on Obsidian (#861)
* Add ability to cycle through the chat history in the chat input on Obsidian (similar to terminal history navigation)
* Add mod key shortcut to cycle through chat history in chat input
* Add shortcut help text in chat input placeholder

---------

Co-authored-by: Debanjum Singh Solanky <debanjum@gmail.com>
2024-08-12 23:55:25 -07:00
srikary12
05c0aa3882
Support exclusion file filters (#826)
### Overview
Support exclude file filter in user search queries

### Details
- All of the exclude file filter terms need to be satisfied
- Any one of the include file filter terms should be satisfied

### Example
- **Search Query**: *what happened yesterday? -file:"tasks.org" -file:"work.md" file:"diary.org" file:"journal.org*
- **Behavior**: Query will try find relevant notes in any of `journal.org` or `diary.org` and not in `tasks.org` and not in `work.md`

### Details
* Add support for exclusion file filters
* Translate file filter to valid Django DB entry filter regex
* Exclude all files when multiple exclude file filter in query

Previously we were applying an "Or" filter, which would exclude any
file mentioned in a query with multiple exclude file filter.

This is not what we naturally mean when we ask excluding a file in a query

* Rename, rearrange, deduplicate and add file filter tests

Closes #728
---------

Co-authored-by: Debanjum Singh Solanky <debanjum@gmail.com>
2024-08-12 05:41:54 -07:00
Alexander Matyasko
2d9bf14ecb Improve search model config display for admin 2024-08-11 19:13:25 +08:00
Debanjum Singh Solanky
7815e02dd4 Release Khoj version 1.20.4 2024-08-11 16:00:13 +05:30
Debanjum Singh Solanky
d951e36945 Update khoj.el package description, it had gone stale 2024-08-11 15:52:46 +05:30
Debanjum Singh Solanky
16b31c3e35 Refresh automation data shown by edit automation card after update
Previously required the automation page to be refreshed to see updates
to the automation in the edit automation card. This would be seen when
user tries to edit an automation multiple times (without a page refresh)
2024-08-11 15:52:46 +05:30
Debanjum Singh Solanky
f2f37ae444 Fix creating, editing automations that start weekly on Sunday 2024-08-11 15:52:46 +05:30
Debanjum Singh Solanky
ec9add9a51 Fix automation edit cards height. Scroll when card longer than screen 2024-08-11 15:52:46 +05:30
sabaimran
d99f03e4f3 If the list of choices in a chunk is empty, continue in openai response 2024-08-11 15:30:09 +05:30
Alexander Matyasko
f16b0f628b Fix true/false evaluation in Emacs to prevent unintended index re-indexing
Previously, the code incorrectly treated all non-nil values as true, leading to
the index being re-indexed with the force flag whenever the user selected to
update the index.
2024-08-11 17:24:11 +08:00
Alexander Matyasko
0e9e9648e6 Fix emacs if syntax 2024-08-11 17:24:11 +08:00
sabaimran
6f94a076f7 Add conversation_id parameter to the create_automation method 2024-08-11 10:45:13 +05:30
sabaimran
acb825f4f5 Bug fixes for automations
- Pass the new conversation id as kwarg for the scheduled_chat function
- For edit automations, re-use the original conversation id
- Parse images correctly for image automations
2024-08-11 10:41:43 +05:30
Debanjum Singh Solanky
5075d13902 Give visual feedback when interact with chat message feedback buttons
- Use color to provide visual feedback when hover, click on feedback
  buttons
- Use color to provide visual feedback when hover on speech, copy
  buttons click
- Add cooldown period before being able to send feedback on that message again.
  Avoids inadvertent multiple consecutive clicks on feedback buttons
2024-08-10 20:09:52 +05:30
Debanjum Singh Solanky
b3c6c8c84b Add OpenGraph metadata to web app pages for improve social share links 2024-08-10 18:14:05 +05:30
Debanjum Singh Solanky
fc411091c8 Add apple favicon, load favicons for each web app page from assets folder 2024-08-10 18:14:05 +05:30
Debanjum Singh Solanky
a7623e64fa Move Khoj webmanifest, assets to new web app public directory 2024-08-10 18:14:04 +05:30
sabaimran
af1d4b9ba4 Remove the premium requirement for speech for now 2024-08-10 14:10:12 +05:30
sabaimran
1d581464e6 Filter out any undefined agents when rendering the home page 2024-08-10 13:33:55 +05:30
sabaimran
acf1c14122 Release Khoj version 1.20.3 2024-08-09 18:11:11 +05:30
sabaimran
7d3a25f8c0 Handle processing case for the schedule leader process lock when it's empty 2024-08-09 16:37:06 +05:30
sabaimran
faf3584acd Fix automations edit button 2024-08-09 14:21:11 +05:30
sabaimran
5ef198a5b2 Improve default background color styling for inputs 2024-08-08 18:08:05 +05:30
sabaimran
64b2073e63 In the time-based job for managing the schedule leader, and logic to create a new lock when the current one is expired. 2024-08-08 12:42:59 +05:30
sabaimran
7ee0d9067d Fix apostrophe issue in copy text when commandempty in settings page 2024-08-08 11:41:10 +05:30
sabaimran
f28693c8c7 create a useismobilewidth method for standardized mobile view detection. 2024-08-07 21:04:44 +05:30
sabaimran
2943bed5d4 Update category colors 2024-08-07 18:51:31 +05:30
sabaimran
37afa3411f Improve the file upload experience in the settings page 2024-08-07 18:51:20 +05:30
sabaimran
1ee21f5150 Add support for showing files outside of conversation view and linking people to manage files in settings 2024-08-07 18:50:53 +05:30
sabaimran
93f4ceabc1 Add drag/drop file upload support to the chat input area 2024-08-07 18:50:19 +05:30
sabaimran
370ebdee24 Standardized the mobile width calculation 2024-08-07 18:49:06 +05:30
sabaimran
52fed6023f Overlay the side panel on top of other content 2024-08-07 18:46:06 +05:30
Alexander Matyasko
823f8d58bb Add model_config for crossencoder model
Add model_config for crossencoder model, so the user can use models
which require trust_remote_code.
2024-08-07 18:00:12 +08:00
sabaimran
09b71846be Remove favicon.ico as it's interfering with favicon rendering in the home page 2024-08-07 11:53:25 +05:30
Debanjum Singh Solanky
167ef000f4 Fix chat API for non-streaming mode json response 2024-08-06 19:27:54 +05:30
sabaimran
00ee4c2697 Release Khoj version 1.20.2 2024-08-06 16:16:33 +05:30
sabaimran
c4be3b43e5 Add the compiled folder to the list of directories to look through for static templates 2024-08-06 14:50:44 +05:30
sabaimran
265d2a79be Remove duplicate assets from being included in the pypi output 2024-08-06 13:51:37 +05:30
sabaimran
81c75e1024 Fix static file folder path for the pypi build
- Since the .gitignore will ignore any of the assets in the src/ folder when building the package wheel, we need to output the static assets to another folder just for the python pypi package. Use /compiled for this.
2024-08-06 13:24:26 +05:30
sabaimran
7607abc726 Release Khoj version 1.20.1 2024-08-06 10:05:41 +05:30
Debanjum
c23688e2de
Fixes and Improvements Post Spring UX Release (#880)
- Auto focus on email input on login screen for smoother login experience
- Use file icon associated with search page results. Improve search bar
- Show logged in user's email in nav menu for context
- Use previous icons with eyes for search, agents and automations items in nav menu
2024-08-05 14:32:31 -07:00
Debanjum Singh Solanky
a4388c5e65 Use custom Khoj Icons for Search, Agents & Automation in Nav Menu
- Update agents, automations, search svg icons
2024-08-06 02:55:29 +05:30
sabaimran
e9d6899fc2 Change the way the export is created for the pypi package in order to transfer static files out of the tmp shell 2024-08-05 22:46:54 +05:30
sabaimran
b17577c138 Fix configuration for default voice model settings 2024-08-05 19:57:21 +05:30
Debanjum Singh Solanky
ec106d743d Use file icon associated with search page results. Improve search bar 2024-08-05 19:24:39 +05:30
Debanjum Singh Solanky
4258392fc7 Auto focus on email input on login screen for smoother login experience 2024-08-05 19:24:16 +05:30
Debanjum Singh Solanky
020a956c89 Show user email address on settings menu for logged in account context 2024-08-05 19:19:47 +05:30
sabaimran
998d08f155 Fix logic for deletion to automatically re-render the side pane 2024-08-05 18:07:20 +05:30
sabaimran
20d95dc45e Add the favicon.ico file to the public directory of app.khoj.dev 2024-08-05 18:04:03 +05:30
sabaimran
1eab6c8590 Add additional icons for agents, pencil line and chalkboard 2024-08-05 17:23:29 +05:30
sabaimran
bafda233e2 Add standlone khoj_domain for allowed_hosts 2024-08-05 17:11:37 +05:30
Debanjum Singh Solanky
e412ed3bcb Release Khoj version 1.20.0 2024-08-05 16:25:21 +05:30
Debanjum Singh Solanky
9f785dbafe Format web app package.json using prettier 2024-08-05 16:23:31 +05:30
sabaimran
b7ed32f455 Merge branch 'master' of github.com:khoj-ai/khoj into features/migrate-to-spring-ui 2024-08-05 16:12:46 +05:30
sabaimran
34d54c75f7 Lint new changes again 2024-08-05 15:54:50 +05:30
sabaimran
91047d1619 Use a png for the windows desktop icon 2024-08-05 15:29:30 +05:30
sabaimran
1151d14466 Add a separate windows object in the todesktop configuration 2024-08-05 14:27:56 +05:30
sabaimran
c56072aa7b Update todesktop runtime and use the icns file for the todesktop configuration 2024-08-05 14:19:38 +05:30
sabaimran
484b0aa96b Use the newer, simpler favicon across desktop and documentation. Update the macos icon set 2024-08-05 14:06:04 +05:30
sabaimran
1b35a3b16e Fix link to login in the nav menu 2024-08-05 12:32:19 +05:30
sabaimran
5a5bbe3852 Remove deprecate views, assets 2024-08-05 12:31:47 +05:30
sabaimran
c61b289bd1 Migrate all existing pages except login to the new spring ui 2024-08-05 12:17:56 +05:30
sabaimran
f835e330b8 Fix selection of icons, colors, add examples for personal finance 2024-08-05 12:08:18 +05:30
sabaimran
af6a70c9fb Fix fuschia spelling in the colorutils file as well 2024-08-05 11:51:45 +05:30
sabaimran
e0775446c9 fix spelling of fuschia :( 2024-08-05 11:50:11 +05:30
sabaimran
de1cd8c264 Clean up some of the suggestions code, improve randomness of cards' 2024-08-05 11:19:50 +05:30
sabaimran
37e261ff93 Show connected icon when files or notion is indexed 2024-08-05 10:33:18 +05:30
sabaimran
22cfedcaff In the chat history side panel, order conversations by updated time 2024-08-05 09:48:00 +05:30
sabaimran
8220dc6115 Include the updated_at datetime when returning a conversation session 2024-08-05 09:47:13 +05:30
Debanjum Singh Solanky
e296d387e1 Clean duplicate title shown in reference snippets of hierarchical docs
Hierarchical documents like org-mode, markdown have their ancestry
shown in first line. Remove it to show cleaner, deduplicated reference
text from org-mode, markdown files
2024-08-05 04:59:06 +05:30
Debanjum Singh Solanky
95c2a52775 Show file icons in references for first party supported document types
Add org, markdown, pdf, word, icon and default file icons to simplify
identifying file type used as reference for generating chat response
2024-08-05 04:59:06 +05:30
Debanjum Singh Solanky
18a973b666 Fix name of Khoj logo component file in web app 2024-08-05 04:59:06 +05:30
Debanjum Singh Solanky
842036688d Format next.js web app with prettier 2024-08-05 04:59:06 +05:30
Debanjum Singh Solanky
41bdd6d6d9 Throw warning on prettier formatting issues in web app 2024-08-05 03:58:20 +05:30
Debanjum Singh Solanky
1cdfa8087c Update Khoj tagline to "Your Second Brain" 2024-08-05 02:27:05 +05:30
Debanjum Singh Solanky
46f928165c Fix deep linking to settings page cards from docs 2024-08-05 02:27:05 +05:30
sabaimran
f7840782a4 Fix broken rendering of math equations via katex 2024-08-05 00:20:43 +05:30
Debanjum Singh Solanky
b803ed19d3 Add simplified, cleaner khoj logo images to web app static dir 2024-08-04 23:40:21 +05:30
Debanjum Singh Solanky
51e56e17ee Align padding of agent pills to home screen chat input on small screens 2024-08-04 21:57:54 +05:30
Debanjum Singh Solanky
b744dffefd Align voice message button with send chat message button style 2024-08-04 21:04:38 +05:30
Debanjum Singh Solanky
70f670dcf7 Show send button when text in chat input else voice message button
Utilize chat footer space more efficiently. This is especially useful
on small screens

- Send button is anyway only enabled when there is text in chat input
- Otherwise voice message button is better to show by default
2024-08-04 19:25:49 +05:30
Debanjum Singh Solanky
c627527a6f Reorder automation card actions buttons. Put Delete action last 2024-08-04 19:01:11 +05:30
Debanjum Singh Solanky
c7b67a978e Align agents and automation page structure, widths and spacings
- Remove invalid call to styles.main
- Remove unnecessary top padding above side pane to keep side pane at
  consistent position across web app
- Use same pageLayout styles and styling structure on agent like
  automation
- Vertically center automation section and page title on it's row
- Fix applying flex vs grid with tailwind
2024-08-04 19:01:11 +05:30
Debanjum Singh Solanky
60af173c4a Improve responsive spacing of chat page footer buttons
- Remove x axis footer padding on small screens to preserve space,
  keep equal spacing between footer items
- Add 1rem margin to buttons to not have overlap in boundary
- Add 1rem y-axis padding to chat footer to not have focus boundary
  leave the footer boundary on smaller screens
2024-08-04 19:01:10 +05:30
sabaimran
4f2fcc82f0 Make the input area only rounded on the top corners when in mobile view
- Create better styling for the input area buttons, resizing in mobile and creating more even height with a more minimal send button
2024-08-04 18:28:33 +05:30
sabaimran
322fb34d4b Add top padding to the automations header to align it with the agents page 2024-08-04 12:27:37 +05:30
sabaimran
3e1e4a1857 Move the clients section back to the bottom 2024-08-04 11:32:22 +05:30
Debanjum Singh Solanky
caf5c3d74c Link to Khoj manifest in home page metadata to support PWA install
Installing Khoj as PWA was supported in previous web UX as well. This
just adds link to the existing webmanifest to continue support for
installing Khoj as PWA with new web UX
2024-08-04 05:06:38 +05:30
Debanjum Singh Solanky
692058bbdd Fix time of day calculation logic
Previously between 00:00 - 04:00 it'd trigger afternoon insteead of
evening
2024-08-04 04:53:50 +05:30
Debanjum Singh Solanky
015c155582 Simplify structure of chat page to match other pages 2024-08-04 04:43:55 +05:30
Debanjum Singh Solanky
bf71e472c4 Load static assets from Khoj server in dev environment 2024-08-04 04:25:48 +05:30
Debanjum Singh Solanky
f38c072f07 Update chat session title in side pane to new title after rename
Previously the rename wasn't updating the chat session title. We'd
have to refresh the page or side pane to get latest chat session names
after rename action.
2024-08-04 04:25:48 +05:30
Debanjum Singh Solanky
2f7a8698a0 Fix width and equalize spacing between buttons in chat footer
Previously the footer's right border wasn't visible on small screens
due to usage of w-full

Use mr-1 on send button instead of px-1 on chat input parent to
eualize chat footer buttons spacing
2024-08-04 04:25:48 +05:30
Debanjum Singh Solanky
5541bc09c8 Prefix Khoj page breadcrumbs to chat page title for orientation
Allows tab search by looking at standard prefix. Still allows
page title based identification of different Khoj chat sessions
2024-08-04 04:25:48 +05:30
Debanjum Singh Solanky
6a9865ace7 Only show API keys card in non anon mode
- Show informative toast messages on copy, delete of API keys
- Onle show API keys card in non anonymous mode. API keys aren't
  required (and is disabled on server side) in anon mode. Not showing
  card at all in anon mode reduces chance of unnecessary confusion
2024-08-04 04:25:45 +05:30
Debanjum Singh Solanky
f28208d35b Only show chat sessions uptil last month in side pane
- Reduce chat title size
2024-08-04 01:52:08 +05:30
sabaimran
75559a55aa only show search if logged in. update agents icon 2024-08-03 23:23:03 +05:30
sabaimran
185dcb61f7 Update the settings page to better match the design 2024-08-03 20:49:19 +05:30
sabaimran
3e74d383fe Strip quotes from the response mode llm response 2024-08-03 17:33:20 +05:30
sabaimran
87e97e40f4 Resolve various warnings during export 2024-08-03 17:33:04 +05:30
sabaimran
5a75f2c00f Use filled icons when side panel is open 2024-08-03 15:42:49 +05:30
sabaimran
e6260a7bb6 Improve oadding for h9me page chat iput area and inc margin on api keys 2024-08-03 15:33:33 +05:30
Debanjum Singh Solanky
7a8a9fc807 Auto focus cursor on search input when open search page 2024-08-03 13:52:36 +05:30
Debanjum Singh Solanky
30304ccc56 Fix session drawer to fit title, action triple-dot in width on mobile 2024-08-03 13:52:36 +05:30
Debanjum Singh Solanky
5b17fa5dda Set home, chat page height so footer, header visible w/o scroll on phone
Set dynamic view height of page to 100%
2024-08-03 13:52:36 +05:30
sabaimran
687a881ad2 Remove the agents header in the loading view 2024-08-03 13:44:56 +05:30
sabaimran
0db630a123 image cards should be /image, not /paint 2024-08-03 13:44:31 +05:30
sabaimran
261f62e353 Fix automations mobile view by using a wrapper component that chooses a dialog or a drawer 2024-08-03 13:44:17 +05:30
sabaimran
4ce17acd00 Set greeting message to longer text in default view. Only show two agents in mobile 2024-08-03 12:14:58 +05:30
sabaimran
6c35ee4960 Revert height of the side panel on the home page 2024-08-03 11:59:07 +05:30
Debanjum Singh Solanky
e66adf60c5 Have the home and chat page take full height, reduce greeting top space 2024-08-03 11:54:12 +05:30
Debanjum Singh Solanky
cf8745ef78 Improve structure of chat footer on mobile to put agents above input 2024-08-03 11:31:57 +05:30
Debanjum Singh Solanky
529ffdb7e3 Make Title, Chat Footer Icons larger to ease click, tap on Mobile 2024-08-03 11:23:29 +05:30
Debanjum Singh Solanky
8d1c5226ec Remove unnecessary debug logs 2024-08-03 09:55:31 +05:30
sabaimran
f136214290 Improve the nav menu in the not logged in experience 2024-08-03 09:44:04 +05:30
Debanjum Singh Solanky
d8fe677933 Prevent overflow on Search page by search results 2024-08-03 07:07:35 +05:30
Debanjum Singh Solanky
f3765a20b9 Improve content alignment on automation page for small screens
- Left align email, location, timezone pills on small screens
- Indent user enabled automations to improve delineation between
  sections
2024-08-03 07:05:15 +05:30
Debanjum Singh Solanky
a6e1b2c7cb Style nav menu button and expand nav menu item click area to full-width
Style profile pircture button on nav menu
 - Use primary colored ring around subscribed user profile on nav menu
 - Use gray colored ring around non-subscribed user profile on nav menu
 - Use upper case initial as profile pic for user with no profile pic

- Click anywhere on nav menu item to trigger action
  Previously the actual clickable area was smaller than the width of
  the nav menu item
2024-08-03 05:43:24 +05:30
Debanjum Singh Solanky
eed9e401a2 Improve alignment of title bar elements 2024-08-03 04:11:58 +05:30
sabaimran
f188396395 Prompt to login when authenticated, click on suggestion card
- Improve styling for the side panel when not logged in
2024-08-03 01:42:32 +05:30
sabaimran
9c5ff1699a Use new nav menu alignment in the settings page 2024-08-03 01:42:32 +05:30
sabaimran
b1d3979ed9 Fix navmenu in settings, share/chat pages 2024-08-03 01:42:21 +05:30
sabaimran
5f8b76c8f2 Fix layout/styling of the factchecker app 2024-08-03 01:07:59 +05:30
sabaimran
1bb746aaed Adjust spacing when side panel is opened 2024-08-03 01:07:59 +05:30
sabaimran
07b3bdf181 Update nav menu styling to include everything in one header
- Move the nav menu into the chat history side panel component, so that they both show up on one line
- Update all pages to use it with the new formatting
- in mobile, present the sidebar button, home button, and profile button evenly centered in the middle
2024-08-03 01:07:55 +05:30
Debanjum Singh Solanky
e62888659f Only show greeting once userConfig is fetched from server
- Pass userConfig from Home as prop to chatBodyData component with
  loading state
- Pass loading state of userConfig to allow components to handle
  rendering dependent elements once it is loaded
2024-08-02 20:25:09 +05:30
Debanjum Singh Solanky
0adee07d40 Update home page greetings to use user name, when available 2024-08-02 20:25:09 +05:30
sabaimran
5a8ea884a9
Use new HTTP stream format within the new UX
Use updated format for HTTP streamed responses from the Khoj server in the new chat UX
Remove references to the websocket connected field, as websocket use has been deprecated
2024-08-02 02:35:10 -07:00
Debanjum Singh Solanky
02b46a1784 Render references after chat response is streamed for smoother render
Otherwise the Khoj's chat response is filling up in between the
streamed message and already rendered references section at the bottom
of the message

Define OnlineContext type to simplify typing online context param
across other interfaces and functions
2024-08-02 14:11:34 +05:30
Debanjum Singh Solanky
a733e5c1d4 Remove unused handleCompiledReferences chat functions 2024-08-02 13:18:55 +05:30
Debanjum Singh Solanky
7858aff2e2 Trigger welcomeConsole only once on chat, shared chat page load 2024-08-02 13:18:01 +05:30
Debanjum Singh Solanky
cab0957fd3 Just show Khoj logo on title bar on small screens
Continue to show logo + text on larger screens
2024-08-02 13:18:01 +05:30
Debanjum Singh Solanky
3f607b3978 Add icons, improve description of home, chat & search page metadata 2024-08-02 13:18:01 +05:30
Debanjum Singh Solanky
4f783b911c Update DOMPurify imports correctly to resolve compilation warnings 2024-08-02 13:18:01 +05:30
sabaimran
4492017b96 Move processmessagechunk file into a common chat function 2024-08-02 12:31:43 +05:30
sabaimran
13dee7d89e Remove status update for understanding query 2024-08-01 19:22:21 +05:30
sabaimran
1b2cad2a2c Use af in the default state and configure the phone number input styling 2024-08-01 17:04:57 +05:30
sabaimran
723b37955a Disable input for phone number only if its pending verification 2024-08-01 16:45:38 +05:30
sabaimran
84dd1b57fe Use an intl phone input number field and fix the whole verification flow
- There were some state mismatches in configuring a whatsapp number. This commit fixes those issues and uses an external library for phone number validation
2024-08-01 16:44:17 +05:30
sabaimran
ed16914ac3 Remove deprecated fields and fix erroneous export in settings page 2024-08-01 14:45:54 +05:30
sabaimran
7941f4d54d Remove references to deprecated setupwebsocket function 2024-08-01 14:43:17 +05:30
sabaimran
db93ac5d4b Merge branch 'features/big-upgrade-chat-ux' of github.com:khoj-ai/khoj into features/use-new-sse-in-new-chat-ux 2024-08-01 14:41:50 +05:30
sabaimran
fd0e0405af Fix logic for setting and sending the initial chat message from the home page
- Load agents only once when the page loads, rather than triggering constant re-renders
2024-08-01 13:53:16 +05:30
sabaimran
9a43622cef Remove usages of the websocketconnected variable 2024-08-01 13:14:23 +05:30
sabaimran
bfeb64b48f Migrate the shared chat page to also use the new SSE streaming format 2024-08-01 13:14:09 +05:30
sabaimran
833553c3a3 Move conversation commands selection earlier to include in telemetry collected 2024-08-01 12:52:41 +05:30
sabaimran
dbbcf2564f Remove the usage of emojis in the incremental status updates 2024-08-01 12:52:05 +05:30
sabaimran
cd85a51980 Ingest new format for server sent events within the HTTP streamed response
- Note that the SSR for next doesn't support rendering on the client-side, so it'll only update it one big chunk
- Fix unique key error in the chatmessage history for incoming messages
- Remove websocket value usage in the chat history side panel
- Remove other websocket code from the chat page
2024-08-01 12:50:43 +05:30
Debanjum Singh Solanky
32ce564b7c Remove unused Files Connect button and setup Github content card 2024-07-30 18:55:14 +05:30
Debanjum Singh Solanky
ecb873c488 Only allow search model to be updated without being subscribed
Do not make fetch request to server if user is not subscribed
2024-07-30 18:50:57 +05:30
Debanjum Singh Solanky
f58cff5bcc Increase rate limit in the api/content vs deprecated indexer API 2024-07-30 16:09:26 +05:30
Debanjum Singh Solanky
f0bb6883f8 Improve Delete experience on Files Card in Settings Page
Improve placeholder text for notion API key and Whatsapp
number (mention country code required)
2024-07-30 15:25:14 +05:30
sabaimran
b1eb564706 remove the optional pydantic typing from the files param 2024-07-30 15:25:14 +05:30
sabaimran
4a7efdc552 Use patch in place of put in the indexer API call, ensure that files are not being required in the indexer path 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
ffbf57292c Create synced files management modal on the settings page
Use a Command Dialog to allow easier filtering of files to view
without having to leave the settings page
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
ccc46a09b5 Add new API to batch delete a list of files by filename
- Rearrange DELETE content API definitions order to go from more
  specific to more general
- Create batched file deletion DB adapter
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
9d86cb57ac Build UX to Connect and Manage Notion Integration via Settings Page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
7ee179ee1f Return user's Notion token in API call for detailed user settings 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
00a908ae12 Move subscription card to Profile settings section. Remove Billing section
- Why
  Profile section and billing section looked too empty (1 card each).
  Combining them makes the setting page look more complete. Shows
  subscription options early on
- Details
  - Made Futurist text orange
  - Made Unsubscribe a down button instead of cloud slash
  - Updated toast title to subscription
  - Improve Futurist trial title and description
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
058c902dc7 Delete unused npm package-lock.json as Web app uses yarn.lock instead 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
b8c9b3ffa3 Reduce padding height of input area on new home page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
8a447107dd Set user name on clicking Save button on settings page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
44e0b20202 Align Content, Client & Billing settings sections with new designs 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
51e83bcc26 Improve responsive behavior of settings cards 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
efcad4996d Add phone number verification for Whatsapp to new settings page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
48548684c0 Add card to connect Whatsapp to Khoj on settings page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
8ec90f194f Add title icons for each content section card on settings page 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
60cdf61737 Create billing section for managing subscription on settings page
- Replicate behavior on current settings.html page
- Improve text for each subscription state to make it more informative, fun
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
2e165a0e0a Create client API keys section on settings page
- Add table shadcn component to use in API keys settings section
- In dev mode, route requests to auth to khoj server at localhost:42110
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
00fa4fa0fa Save model on selecting model in dropdown. No extra save action reqd
- Remove now unnecessary button to Save in Card with dropdown
- Use toast to show success, failure (not working)
- Rename language to search, Move it to features section. Add icon to
  the card
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
13292fc4ca Add icons to card headings 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
a5a06da3fc Use Dropdown component for model options. Make cards more responsive
- Ensure model name doesn't stretch or shrink dropdown width from
  parent card width
- Ensure buttons flex wrap on smaller displays
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
ade2f6f5d1 Rename selected voice model in get config API response for consistency
- Update references in new and old web client settings
- Arrange new client settings props and add header comments similar to
- config response for code readability
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
b3253562a5 Dynamically set Content cards buttons based on already setup or not 2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
7e8e80f29e Create config page using tailwind, shadcn components, styling
- Include side pane but with only the account info in it
- Replicate styling of the old config page
2024-07-30 15:25:14 +05:30
Debanjum Singh Solanky
88007d7552 Get user config in the new web client from the new user config APIs 2024-07-30 15:25:14 +05:30
sabaimran
a6339bb973 Add mroe card suggestions and simplify color selection for suggestion cards 2024-07-29 19:11:39 +05:30