Commit Graph

77 Commits

Author SHA1 Message Date
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
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
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
sabaimran
abfdf7b1fb Temporarily remove the OTP feature on the settings page while we fix our number 2025-04-03 19:41:18 -05:00
sabaimran
a3c4347c11 Add a one-click action to export all conversations. Add a self-service delete account action to the settings page 2025-03-12 23:54:02 -07:00
Debanjum
b692e690b4 Rename and fix the delete content source API endpoint
- Delete file objects on deleting content by source via API
  Previously only entries were deleted, not the associated file objects
- Add new db adapter to delete multiple file objects (by name)
2025-03-07 13:28:53 +05:30
sabaimran
43e032e25a Improve handling of dark mode theme in order to avoid jitter when loading new page 2025-02-06 16:17:58 -08:00
sabaimran
5a36360408 Merge branch 'master' of github.com:khoj-ai/khoj into features/add-chat-controls 2025-01-21 10:32:47 -08:00
sabaimran
d36f235da5 Rename API to get all files, minor UI updates 2025-01-20 13:30:10 -08:00
sabaimran
d681a2080a Centralize use of useUserConfig and use that to retrieve default model and chat model options 2025-01-20 10:59:02 -08:00
sabaimran
0b775c77d3 Merge branch 'master' of github.com:khoj-ai/khoj into features/add-a-knowledge-base-page 2025-01-13 15:07:59 -08:00
Debanjum
51a774c993 Add contrast to setting card inputs in dark mode on web app 2025-01-11 14:50:47 +07:00
Debanjum
9e8b8dc5a2 Toggle showing api key on web settings page via a visibility toggle
- Background
  Access to the clipboard API is disabled by certain browsers in non
  localhost http scenarios for security reasons.

  So the copy API key button doesn't work when khoj is self-hosted
  with authentication enabled at a non localhost domain

- Change
  This change enables copying API keys by manual text highlight + copy
  if copy button is disabled

Resolves #1070
2025-01-11 14:50:47 +07:00
Debanjum
25c39bd7da Extract api keys setting card into separate component on web app 2025-01-11 14:50:46 +07:00
sabaimran
57545c1485 Fix the migration script to delete orphaned fileobjects
- Remove knowledge page from the sidebar
- Improve speed and rendering of the documents in the search page
2025-01-10 21:06:48 -08:00
Debanjum
dd63bd8bcf Fix dark mode dropdown colors of phone no. country code on web settings page
Resolves #1046
2025-01-10 00:10:51 +07:00
sabaimran
4aed6f7e08 Add a link around the header khojlogotype to go home 2025-01-06 08:55:00 -08:00
sabaimran
bf405f50d7 Fix spacing of main content in the settings page 2024-12-21 20:46:21 -08:00
sabaimran
e9dae4240e Clean up all references to authenticatedData
- De facto, was being assumed everywhere if authenticatedData is null, that it's not logged in. This isn't true because the data can still be loading. Update the hook to send additional states.
- Bonus: Delete model picker code and a slew of unused imports.
2024-12-21 08:45:43 -08:00
sabaimran
b8a9dcd600 Improve mobile layout with sidebar inset and fix dark mode logo 2024-12-19 23:23:52 -08:00
sabaimran
43331f7730 Remove unused css classes 2024-12-19 21:36:35 -08:00
sabaimran
68af10c805 Use the new shadcn sidebar for khoj nav and actions
- Use the sidebar across all pages to quickly navigate through the app, access settings, and go to past chats
- Pending: mobile friendliness
2024-12-19 20:10:03 -08:00
sabaimran
a4aeb9fdf3 Simplify the home page color scheme and overall design 2024-12-19 14:02:53 -08:00
sabaimran
064f7e48ca Update various copy texts for OG metadata and such 2024-12-16 16:40:46 -08:00
sabaimran
4697daeb1a Improve opengraph metadata across front-end pages 2024-12-12 15:56:43 -08:00
sabaimran
df66fb23ab Centralize definition of the content security policy and add in-app chat
- in-app chat is meant for support requests and currently is only in the settings page, where users are most likely to go if confused IMO
2024-12-08 17:57:27 -08:00
Debanjum
6a39651ad3 Standardize loading fonts locally across pages on web app 2024-11-24 20:41:15 -08:00
Debanjum
bbd24f1e98 Improve dropdown menus on web app setting page with scroll & min-width
- Previously when settings list became long the dropdown height would
  overflow screen height. Now it's max height is clamped and  y-scroll
- Previously the dropdown content would take width of content. This
  would mean the menu could sometimes be less wide than the button. It
  felt strange. Now dropdown content is at least width of parent button
2024-11-20 12:27:13 -08:00
sabaimran
47d3c8c235 Remove email query parameter from subscription patch api 2024-11-11 21:39:49 -08:00
sabaimran
e521853895 Remove unnecessary console.log statements 2024-11-07 16:03:31 -08:00
sabaimran
5120597d4e Remove user customized search model (#946)
- Use a single standard search model across the server. There's diminishing benefits for having multiple user-customizable search models. 
- We may want to add server-level customization for specific tasks
- Store the search model used to generate a given entry on the `Entry` object
- Remove user-facing APIs and view
- Add a management command for migrating the default search model on the server

In a future PR (after running the migration), we'll also remove the `UserSearchModelConfig`
2024-10-23 17:38:37 -07:00
sabaimran
f3ce47b445 Create explicit flow to enable the free trial (#944)
* Create explicit flow to enable the free trial

The current design is confusing. It obfuscates the fact that the user is on a free trial. This design will make the opt-in explicit and more intuitive.

* Use the Subscription Type enum instead of hardcoded strings everywhere

* Use length of free trial in the frontend code as well
2024-10-23 15:29:23 -07:00
sabaimran
405c047c0c Include agent personality through subtasks and support custom agents (#916)
Currently, the personality of the agent is only included in the final response that it returns to the user. Historically, this was because models were quite bad at navigating the additional context of personality, and there was a bias towards having more control over certain operations (e.g., tool selection, question extraction).

Going forward, it should be more approachable to have prompts included in the sub tasks that Khoj runs in order to response to a given query. Make this possible in this PR. This also sets us up for agent creation becoming available soon.

Create custom agents in #928

Agents are useful insofar as you can personalize them to fulfill specific subtasks you need to accomplish. In this PR, we add support for using custom agents that can be configured with a custom system prompt (aka persona) and knowledge base (from your own indexed documents). Once created, private agents can be accessible only to the creator, and protected agents can be accessible via a direct link.

Custom tool selection for agents in #930

Expose the functionality to select which tools a given agent has access to. By default, they have all. Can limit both information sources and output modes.
Add new tools to the agent modification form
2024-10-07 00:21:55 -07: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 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
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
37afa3411f Improve the file upload experience in the settings page 2024-08-07 18:51:20 +05:30
sabaimran
52fed6023f Overlay the side panel on top of other content 2024-08-07 18:46:06 +05:30
sabaimran
34d54c75f7 Lint new changes again 2024-08-05 15:54:50 +05:30
sabaimran
37e261ff93 Show connected icon when files or notion is indexed 2024-08-05 10:33:18 +05:30
Debanjum Singh Solanky
842036688d Format next.js web app with prettier 2024-08-05 04:59:06 +05:30
Debanjum Singh Solanky
46f928165c Fix deep linking to settings page cards from docs 2024-08-05 02:27:05 +05:30
sabaimran
3e1e4a1857 Move the clients section back to the bottom 2024-08-04 11:32:22 +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
sabaimran
185dcb61f7 Update the settings page to better match the design 2024-08-03 20:49:19 +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
sabaimran
9c5ff1699a Use new nav menu alignment in the settings page 2024-08-03 01:42:32 +05:30