Skip to content
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

Spring UI: Modernize UX for normie development #878

Merged
merged 213 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
541ce04
Checkpoint: Updated sidebar panel with new components
sabaimran Jul 2, 2024
0ee7cc8
Change overall architecure of how information is flowing for better s…
sabaimran Jul 2, 2024
8a6722b
Add basic implementation for chat side panel components
sabaimran Jul 2, 2024
78d1a29
Finish up filte filter side panel menu
sabaimran Jul 2, 2024
d5ba916
Working example of streaming, intersection observer, other UI updates
sabaimran Jul 3, 2024
3411807
kill the emojis
sabaimran Jul 3, 2024
465ef0b
Add a loading experience when waiting for khoj response
sabaimran Jul 4, 2024
aec44a0
Add dark mode toggle! And improve experience for train of thought
sabaimran Jul 4, 2024
6f8a65c
References, mobile friendly chat sessions and file filter
sabaimran Jul 7, 2024
bf4c2f2
Merge branch 'master' of github.com:khoj-ai/khoj into features/chat-u…
sabaimran Jul 8, 2024
609e7ee
Fix width of side panel
sabaimran Jul 9, 2024
a0e9530
Merge branch 'master' of github.com:khoj-ai/khoj into features/chat-u…
sabaimran Jul 9, 2024
5b69252
Add hover effects for chat messages
sabaimran Jul 9, 2024
cc22e1b
Add pop-up module for the slash commands
sabaimran Jul 9, 2024
0c6b6de
Revert web client route chat page rendering logic
sabaimran Jul 9, 2024
998e2ae
Update dark mode, fix chat message time stamp, fix rendering for new …
sabaimran Jul 9, 2024
23b71b0
Remove shadow from the slash command bar
sabaimran Jul 9, 2024
c25bf97
Update hover styling for see all button
sabaimran Jul 9, 2024
c8c5d50
Improve command bar slash experience
sabaimran Jul 9, 2024
e358723
Fix image rendering and unique key for pending message?
sabaimran Jul 9, 2024
e1a5c17
Add DOMPurify for rendering md text. Add a easter egg in the console
sabaimran Jul 10, 2024
c5cfd0f
Remove unused slash command-related useeffect hook
sabaimran Jul 10, 2024
3756855
Add content security policy to the chat page
sabaimran Jul 10, 2024
0369eb6
Fix timestamp bug for pending message and expand CSP for thumbnails
sabaimran Jul 10, 2024
1b4a51f
Remove print statement for debugging timestamps
sabaimran Jul 10, 2024
6f1d799
Modularize code and implemenet share experience
sabaimran Jul 10, 2024
bea0aa5
Improve the logged out share experience
sabaimran Jul 11, 2024
3e7e73d
Switch from using dynamic routes to static routes and extracting slug…
sabaimran Jul 11, 2024
b98a0cf
Render inline png, webp images generated by Khoj in chat view
debanjum Jul 12, 2024
5fccccf
Do not render references with broken links in chat view
debanjum Jul 12, 2024
e00c6b4
Add hover text descriptions of action buttons on chat message in web …
debanjum Jul 12, 2024
aeaebfb
Show chat message timestamp on hover in chat view
debanjum Jul 12, 2024
2668e42
Center cursor in chat input. See upto 2 lines for multi-line context
debanjum Jul 12, 2024
d510113
Improve styling of chat input, references UI across screen sizes
debanjum Jul 13, 2024
f69f9e3
Close chat sessions side panel on click open a chat session
debanjum Jul 13, 2024
b26a6e2
Show chat message action buttons without hover on mobile interfaces
debanjum Jul 13, 2024
e956774
Improve mobile friendly styling of chat session side panel
debanjum Jul 13, 2024
a0f38e0
Improve Train of Thought icons spacing and loading circle
debanjum Jul 14, 2024
dbbd4b9
Show action bar on last chat message without hover
debanjum Jul 14, 2024
6371974
Show agent profile card with description when hover on agent in chat …
debanjum Jul 14, 2024
c2bf405
Make loading message, styling configurable. Do not show agent when no…
debanjum Jul 14, 2024
e6b2114
Conversations list should resize to take max space on side panel
debanjum Jul 14, 2024
b47f30a
Make Khoj icon appropriately sized and side panel arrow bold
debanjum Jul 14, 2024
47b754c
Only open side panel as drawer in mobile view
debanjum Jul 14, 2024
6dd9093
Fix closing side panel on mobile when click open a chat session
debanjum Jul 14, 2024
06dce47
Make most major changes for an updated chat UI (#843)
sabaimran Jul 14, 2024
6f8f846
Standardize code format for web interface with prettier
debanjum Jul 14, 2024
ba0ba6b
Merge branch 'features/big-upgrade-chat-ux' of github.com:khoj-ai/kho…
debanjum Jul 15, 2024
2e9275c
Remove side panel padding in desktop view. Fix width in mobile view
sabaimran Jul 15, 2024
9a5bf4c
Fix rendering of teaser reference panel in mobile width
sabaimran Jul 15, 2024
6c630bc
Constrain chat messages to stay in view port across screen sizes
debanjum Jul 15, 2024
c7764c7
Fix, Improve Behavior, Styling of Chat View on Web (#851)
debanjum Jul 15, 2024
1c6ed9b
Migrate the existing automations page to use React (#849)
sabaimran Jul 15, 2024
c837f37
Update the agents page with new UX (#850)
sabaimran Jul 16, 2024
1a5405e
Fix interpretation of day of week in automation form
sabaimran Jul 16, 2024
e8176b4
Reuse get config data logic across config pages on web client
debanjum Jul 16, 2024
dd31936
Make config api endpoint urls consistent
debanjum Jul 16, 2024
de15a7a
Rename API path /api/config to /api/configure
debanjum Jul 16, 2024
a5c16ad
Move Web client config page to /configure from /config url path
debanjum Jul 16, 2024
59000a4
Move Desktop config page to /configure from /config url path
debanjum Jul 16, 2024
466ef3f
Do no explicitly add line-clamp plugin as it's in Tailwind by default
debanjum Jul 15, 2024
4759c4a
Turn prettier off instead of throwing error for now
debanjum Jul 15, 2024
7316e6b
Pass isMobileWidth prop to SidePanel via chat share interface
debanjum Jul 15, 2024
71ebf31
Make config API detailed response fields more intuitive, consistent
debanjum Jul 17, 2024
b015b0e
Arrange config API detailed response fields to improve readability
debanjum Jul 17, 2024
a1c362a
Expose web, desktop settings page under /settings, not /configure
debanjum Jul 17, 2024
bf815e4
Refactor Config API and Settings pages for Reuse and Consistency (#852)
debanjum Jul 17, 2024
65dade4
Create API endpoints to get user content configurations
debanjum Jul 16, 2024
5923b6d
Split /api/v1/index/update into /api/content PUT, PATCH API endpoints
debanjum Jul 18, 2024
bba4e0b
Accept file deletion requests by clients during sync
debanjum Jul 18, 2024
469a1cb
Move API endpoints under /api/configure/content/ to /api/content/
debanjum Jul 18, 2024
1197266
Move API endpoints under /configure/<type>/model to /api/model/<type>
debanjum Jul 18, 2024
3832ef0
Move API endpoints under /api/configure/phone/ to /api/phone/
debanjum Jul 18, 2024
f03525f
Add back /api/configure as /api/settings API endpoint
debanjum Jul 18, 2024
07f36fa
Update new web interface with update calls to /content, /model APIs
debanjum Jul 19, 2024
9cf52bb
Update automations UX for more consistency (#856)
sabaimran Jul 21, 2024
3e4325e
Upgrade: New Home Screen for Khoj (#860)
MythicalCow Jul 24, 2024
694bedc
Add support for text to speech and speech to text (#863)
sabaimran Jul 24, 2024
4d30e5b
Fix indexing error for notion, expecting image and docx in dict
sabaimran Jul 24, 2024
cfe7a10
Update the navmenu title if prop is updated and undefined
sabaimran Jul 24, 2024
52db157
Remove unused styling
sabaimran Jul 24, 2024
5adbfe1
Add a search page that just renders truncated results when you click …
sabaimran Jul 24, 2024
75a370c
Implement focus mode to click into full text of the note
sabaimran Jul 24, 2024
19cd607
Style the see content button correctly
sabaimran Jul 24, 2024
662dffe
Press enter to search
sabaimran Jul 24, 2024
7482797
Add some better default states for no files found, prompt to search. …
sabaimran Jul 25, 2024
3daef91
Remove stale comment from api content
debanjum Jul 26, 2024
5dcac18
New Agents Page User Interface (#866)
MythicalCow Jul 26, 2024
e86143d
Merge pull request #867 from khoj-ai/features/search-page-v2
sabaimran Jul 26, 2024
8503d7a
Split Configure API into Content, Model API paths (#857)
debanjum Jul 27, 2024
1685c60
Nav Menu Upgrades and Minor UX Improvements (#869)
MythicalCow Jul 27, 2024
1a1d9c7
Merge branch 'master' of github.com:khoj-ai/khoj into features/big-up…
sabaimran Jul 27, 2024
551630f
Code clean-up and some fit and finish
sabaimran Jul 28, 2024
a6339bb
Add mroe card suggestions and simplify color selection for suggestion…
sabaimran Jul 29, 2024
88007d7
Get user config in the new web client from the new user config APIs
debanjum Jul 16, 2024
7e8e80f
Create config page using tailwind, shadcn components, styling
debanjum Jul 16, 2024
b325356
Dynamically set Content cards buttons based on already setup or not
debanjum Jul 17, 2024
ade2f6f
Rename selected voice model in get config API response for consistency
debanjum Jul 17, 2024
a5a06da
Use Dropdown component for model options. Make cards more responsive
debanjum Jul 17, 2024
13292fc
Add icons to card headings
debanjum Jul 17, 2024
00fa4fa
Save model on selecting model in dropdown. No extra save action reqd
debanjum Jul 18, 2024
2e165a0
Create client API keys section on settings page
debanjum Jul 24, 2024
60cdf61
Create billing section for managing subscription on settings page
debanjum Jul 25, 2024
8ec90f1
Add title icons for each content section card on settings page
debanjum Jul 25, 2024
4854868
Add card to connect Whatsapp to Khoj on settings page
debanjum Jul 25, 2024
efcad49
Add phone number verification for Whatsapp to new settings page
debanjum Jul 25, 2024
51e83bc
Improve responsive behavior of settings cards
debanjum Jul 25, 2024
44e0b20
Align Content, Client & Billing settings sections with new designs
debanjum Jul 26, 2024
8a44710
Set user name on clicking Save button on settings page
debanjum Jul 28, 2024
b8c9b3f
Reduce padding height of input area on new home page
debanjum Jul 28, 2024
058c902
Delete unused npm package-lock.json as Web app uses yarn.lock instead
debanjum Jul 28, 2024
00a908a
Move subscription card to Profile settings section. Remove Billing se…
debanjum Jul 28, 2024
7ee179e
Return user's Notion token in API call for detailed user settings
debanjum Jul 28, 2024
9d86cb5
Build UX to Connect and Manage Notion Integration via Settings Page
debanjum Jul 28, 2024
ccc46a0
Add new API to batch delete a list of files by filename
debanjum Jul 28, 2024
ffbf572
Create synced files management modal on the settings page
debanjum Jul 28, 2024
4a7efdc
Use patch in place of put in the indexer API call, ensure that files …
sabaimran Jul 29, 2024
b1eb564
remove the optional pydantic typing from the files param
sabaimran Jul 30, 2024
f0bb688
Improve Delete experience on Files Card in Settings Page
debanjum Jul 30, 2024
f58cff5
Increase rate limit in the api/content vs deprecated indexer API
debanjum Jul 30, 2024
ecb873c
Only allow search model to be updated without being subscribed
debanjum Jul 30, 2024
32ce564
Remove unused Files Connect button and setup Github content card
debanjum Jul 30, 2024
60870a7
Create Settings Page in new Web App (#872)
debanjum Jul 30, 2024
cd85a51
Ingest new format for server sent events within the HTTP streamed res…
sabaimran Aug 1, 2024
dbbcf25
Remove the usage of emojis in the incremental status updates
sabaimran Aug 1, 2024
833553c
Move conversation commands selection earlier to include in telemetry …
sabaimran Aug 1, 2024
bfeb64b
Migrate the shared chat page to also use the new SSE streaming format
sabaimran Aug 1, 2024
9a43622
Remove usages of the websocketconnected variable
sabaimran Aug 1, 2024
fd0e040
Fix logic for setting and sending the initial chat message from the h…
sabaimran Aug 1, 2024
db93ac5
Merge branch 'features/big-upgrade-chat-ux' of github.com:khoj-ai/kho…
sabaimran Aug 1, 2024
7941f4d
Remove references to deprecated setupwebsocket function
sabaimran Aug 1, 2024
ed16914
Remove deprecated fields and fix erroneous export in settings page
sabaimran Aug 1, 2024
84dd1b5
Use an intl phone input number field and fix the whole verification flow
sabaimran Aug 1, 2024
723b379
Disable input for phone number only if its pending verification
sabaimran Aug 1, 2024
1b2cad2
Use af in the default state and configure the phone number input styling
sabaimran Aug 1, 2024
6babd5c
Merge pull request #876 from khoj-ai/features/use-intl-phone-input-se…
sabaimran Aug 1, 2024
13dee7d
Remove status update for understanding query
sabaimran Aug 1, 2024
4492017
Move processmessagechunk file into a common chat function
sabaimran Aug 2, 2024
4f783b9
Update DOMPurify imports correctly to resolve compilation warnings
debanjum Aug 1, 2024
3f607b3
Add icons, improve description of home, chat & search page metadata
debanjum Aug 1, 2024
cab0957
Just show Khoj logo on title bar on small screens
debanjum Aug 2, 2024
7858aff
Trigger welcomeConsole only once on chat, shared chat page load
debanjum Aug 1, 2024
a733e5c
Remove unused handleCompiledReferences chat functions
debanjum Aug 1, 2024
02b46a1
Render references after chat response is streamed for smoother render
debanjum Aug 1, 2024
5a8ea88
Use new HTTP stream format within the new UX
sabaimran Aug 2, 2024
d3c07a0
Update nav menu styling to include everything in one header
sabaimran Aug 2, 2024
0d8cdee
Adjust spacing when side panel is opened
sabaimran Aug 2, 2024
1509c53
Fix layout/styling of the factchecker app
sabaimran Aug 2, 2024
e6014e8
Fix navmenu in settings page
sabaimran Aug 2, 2024
d48a789
Use new nav menu alignment in the settings page
sabaimran Aug 2, 2024
bbe7491
Prompt to login when authenticated, click on suggestion card
sabaimran Aug 2, 2024
0adee07
Update home page greetings to use user name, when available
debanjum Aug 2, 2024
e628886
Only show greeting once userConfig is fetched from server
debanjum Aug 2, 2024
07b3bdf
Update nav menu styling to include everything in one header
sabaimran Aug 2, 2024
1bb746a
Adjust spacing when side panel is opened
sabaimran Aug 2, 2024
5f8b76c
Fix layout/styling of the factchecker app
sabaimran Aug 2, 2024
b1d3979
Fix navmenu in settings, share/chat pages
sabaimran Aug 2, 2024
9c5ff16
Use new nav menu alignment in the settings page
sabaimran Aug 2, 2024
f188396
Prompt to login when authenticated, click on suggestion card
sabaimran Aug 2, 2024
eed9e40
Improve alignment of title bar elements
debanjum Aug 2, 2024
a6e1b2c
Style nav menu button and expand nav menu item click area to full-width
debanjum Aug 2, 2024
f3765a2
Improve content alignment on automation page for small screens
debanjum Aug 3, 2024
d8fe677
Prevent overflow on Search page by search results
debanjum Aug 3, 2024
f9606ce
Merge branch 'features/fit-and-finish-new-ux' of github.com:khoj-ai/k…
sabaimran Aug 3, 2024
f136214
Improve the nav menu in the not logged in experience
sabaimran Aug 3, 2024
8d1c522
Remove unnecessary debug logs
debanjum Aug 3, 2024
529ffdb
Make Title, Chat Footer Icons larger to ease click, tap on Mobile
debanjum Aug 3, 2024
cf8745e
Improve structure of chat footer on mobile to put agents above input
debanjum Aug 3, 2024
e66adf6
Have the home and chat page take full height, reduce greeting top space
debanjum Aug 3, 2024
6c35ee4
Revert height of the side panel on the home page
sabaimran Aug 3, 2024
4ce17ac
Set greeting message to longer text in default view. Only show two ag…
sabaimran Aug 3, 2024
261f62e
Fix automations mobile view by using a wrapper component that chooses…
sabaimran Aug 3, 2024
0db630a
image cards should be /image, not /paint
sabaimran Aug 3, 2024
687a881
Remove the agents header in the loading view
sabaimran Aug 3, 2024
5b17fa5
Set home, chat page height so footer, header visible w/o scroll on phone
debanjum Aug 3, 2024
30304cc
Fix session drawer to fit title, action triple-dot in width on mobile
debanjum Aug 3, 2024
7a8a9fc
Auto focus cursor on search input when open search page
debanjum Aug 3, 2024
e6260a7
Improve oadding for h9me page chat iput area and inc margin on api keys
sabaimran Aug 3, 2024
5a75f2c
Use filled icons when side panel is open
sabaimran Aug 3, 2024
87e97e4
Resolve various warnings during export
sabaimran Aug 3, 2024
3e74d38
Strip quotes from the response mode llm response
sabaimran Aug 3, 2024
185dcb6
Update the settings page to better match the design
sabaimran Aug 3, 2024
75559a5
only show search if logged in. update agents icon
sabaimran Aug 3, 2024
f28208d
Only show chat sessions uptil last month in side pane
debanjum Aug 3, 2024
6a9865a
Only show API keys card in non anon mode
debanjum Aug 3, 2024
5541bc0
Prefix Khoj page breadcrumbs to chat page title for orientation
debanjum Aug 3, 2024
2f7a869
Fix width and equalize spacing between buttons in chat footer
debanjum Aug 3, 2024
f38c072
Update chat session title in side pane to new title after rename
debanjum Aug 3, 2024
bf71e47
Load static assets from Khoj server in dev environment
debanjum Aug 3, 2024
015c155
Simplify structure of chat page to match other pages
debanjum Aug 3, 2024
692058b
Fix time of day calculation logic
debanjum Aug 3, 2024
caf5c3d
Link to Khoj manifest in home page metadata to support PWA install
debanjum Aug 3, 2024
3e1e4a1
Move the clients section back to the bottom
sabaimran Aug 4, 2024
322fb34
Add top padding to the automations header to align it with the agents…
sabaimran Aug 4, 2024
4f2fcc8
Make the input area only rounded on the top corners when in mobile view
sabaimran Aug 4, 2024
60af173
Improve responsive spacing of chat page footer buttons
debanjum Aug 4, 2024
c7b67a9
Align agents and automation page structure, widths and spacings
debanjum Aug 4, 2024
c627527
Reorder automation card actions buttons. Put Delete action last
debanjum Aug 4, 2024
70f670d
Show send button when text in chat input else voice message button
debanjum Aug 4, 2024
b744dff
Align voice message button with send chat message button style
debanjum Aug 4, 2024
51e56e1
Align padding of agent pills to home screen chat input on small screens
debanjum Aug 4, 2024
69c3635
Merge pull request #877 from khoj-ai/features/fit-and-finish-new-ux
sabaimran Aug 4, 2024
b803ed1
Add simplified, cleaner khoj logo images to web app static dir
debanjum Aug 4, 2024
f784078
Fix broken rendering of math equations via katex
sabaimran Aug 4, 2024
46f9281
Fix deep linking to settings page cards from docs
debanjum Aug 4, 2024
1cdfa80
Update Khoj tagline to "Your Second Brain"
debanjum Aug 4, 2024
41bdd6d
Throw warning on prettier formatting issues in web app
debanjum Aug 4, 2024
8420366
Format next.js web app with prettier
debanjum Aug 4, 2024
18a973b
Fix name of Khoj logo component file in web app
debanjum Aug 4, 2024
95c2a52
Show file icons in references for first party supported document types
debanjum Aug 4, 2024
e296d38
Clean duplicate title shown in reference snippets of hierarchical docs
debanjum Aug 4, 2024
8220dc6
Include the updated_at datetime when returning a conversation session
sabaimran Aug 5, 2024
22cfedc
In the chat history side panel, order conversations by updated time
sabaimran Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/docs/advanced/litellm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Using LiteLLM with Khoj makes it possible to turn any LLM behind an API into you
5. Create a new [Server Chat Setting](http://localhost:42110/server/admin/database/serverchatsettings/add/) on your Khoj admin panel
- Default model: `<name of chat model option you created in step 4>`
- Summarizer model: `<name of chat model option you created in step 4>`
6. Go to [your config](http://localhost:42110/config) and select the model you just created in the chat model dropdown.
6. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
2 changes: 1 addition & 1 deletion documentation/docs/advanced/lmstudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ LM Studio can expose an [OpenAI API compatible server](https://lmstudio.ai/docs/
5. Create a new [Server Chat Setting](http://localhost:42110/server/admin/database/serverchatsettings/add/) on your Khoj admin panel
- Default model: `<name of chat model option you created in step 4>`
- Summarizer model: `<name of chat model option you created in step 4>`
6. Go to [your config](http://localhost:42110/config) and select the model you just created in the chat model dropdown.
6. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
2 changes: 1 addition & 1 deletion documentation/docs/advanced/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Ollama exposes a local [OpenAI API compatible server](https://github.com/ollama/
5. Create a new [Server Chat Setting](http://localhost:42110/server/admin/database/serverchatsettings/add/) on your Khoj admin panel
- Default model: `<name of chat model option you created in step 4>`
- Summarizer model: `<name of chat model option you created in step 4>`
6. Go to [your config](http://localhost:42110/config) and select the model you just created in the chat model dropdown.
6. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.

That's it! You should now be able to chat with your Ollama model from Khoj. If you want to add additional models running on Ollama, repeat step 6 for each model.
2 changes: 1 addition & 1 deletion documentation/docs/advanced/use-openai-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ For specific integrations, see our [Ollama](/advanced/ollama), [LMStudio](/advan
5. Create a new [Server Chat Setting](http://localhost:42110/server/admin/database/serverchatsettings/add/) on your Khoj admin panel
- Default model: `<name of chat model option you created in step 4>`
- Summarizer model: `<name of chat model option you created in step 4>`
6. Go to [your config](http://localhost:42110/config) and select the model you just created in the chat model dropdown.
6. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
2 changes: 1 addition & 1 deletion documentation/docs/clients/desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Khoj will keep these files in sync to provide contextual responses when you sear
## Setup

1. Install the [Khoj Desktop app](https://khoj.dev/downloads) for your OS
2. Generate an API key on the [Khoj Web App](https://app.khoj.dev/config#clients)
2. Generate an API key on the [Khoj Web App](https://app.khoj.dev/settings#clients)
3. Set your Khoj API Key on the *Settings* page of the Khoj Desktop app
4. [Optional] Add any files, folders you'd like Khoj to be aware of on the *Settings* page and Click *Save*
These files and folders will be automatically kept in sync for you
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/clients/emacs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sidebar_position: 2
| ![khoj search on emacs](/img/khoj_search_on_emacs.png) | ![khoj chat on emacs](/img/khoj_chat_on_emacs.png) |

## Setup
1. Generate an API key on the [Khoj Web App](https://app.khoj.dev/config#clients)
1. Generate an API key on the [Khoj Web App](https://app.khoj.dev/settings#clients)
2. Add below snippet to your Emacs config file, usually at `~/.emacs.d/init.el`


Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/clients/obsidian.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sidebar_position: 3

1. Open [Khoj](https://obsidian.md/plugins?id=khoj) from the *Community plugins* tab in Obsidian settings panel
2. Click *Install*, then *Enable* on the Khoj plugin page in Obsidian
3. Generate an API key on the [Khoj Web App](https://app.khoj.dev/config#clients)
3. Generate an API key on the [Khoj Web App](https://app.khoj.dev/settings#clients)
4. Set your Khoj API Key in the Khoj plugin settings in Obsidian

See the official [Obsidian Plugin Docs](https://help.obsidian.md/Extending+Obsidian/Community+plugins) for more details on installing Obsidian plugins.
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/clients/whatsapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Text [+1 (848) 800 4242](https://wa.me/18488004242) or scan [this QR code](https

Without any desktop clients, you can start chatting with Khoj on WhatsApp. Bear in mind you do need one of the desktop clients in order to share and sync your data with Khoj. The WhatsApp AI bot will work right away for answering generic queries and using Khoj in default mode.

In order to use Khoj on WhatsApp with your own data, you need to setup a Khoj Cloud account and connect your WhatsApp account to it. This is a one time setup and you can do it from the [Khoj Cloud config page](https://app.khoj.dev/config).
In order to use Khoj on WhatsApp with your own data, you need to setup a Khoj Cloud account and connect your WhatsApp account to it. This is a one time setup and you can do it from the [Khoj Cloud config page](https://app.khoj.dev/settings).

If you hit usage limits for the WhatsApp bot, upgrade to [a paid plan](https://khoj.dev/pricing) on Khoj Cloud.

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/data-sources/github_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ The Github integration allows you to index as many repositories as you want. It'

# Configure your settings

1. Go to [https://app.khoj.dev/config](https://app.khoj.dev/config) and enter in settings for the data sources you want to index. You'll have to specify the file paths.
1. Go to [https://app.khoj.dev/settings](https://app.khoj.dev/settings) and enter in settings for the data sources you want to index. You'll have to specify the file paths.

## Use the Github plugin

1. Generate a [classic PAT (personal access token)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) from [Github](https://github.com/settings/tokens) with `repo` and `admin:org` scopes at least.
2. Navigate to [https://app.khoj.dev/config/content-source/github](https://app.khoj.dev/config/content-source/github) to configure your Github settings. Enter in your PAT, along with details for each repository you want to index.
2. Navigate to [https://app.khoj.dev/settings#github](https://app.khoj.dev/settings#github) to configure your Github settings. Enter in your PAT, along with details for each repository you want to index.
3. Click `Save`. Go back to the settings page and click `Configure`.
4. Go to [https://app.khoj.dev/](https://app.khoj.dev/) and start searching!
6 changes: 3 additions & 3 deletions documentation/docs/data-sources/notion_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Notion integration allows you to search/chat with your Notion workspaces. [Notion](https://notion.so/) is a platform people use for taking notes, especially for collaboration.

Go to https://app.khoj.dev/config to connect your Notion workspace(s) to Khoj.
Go to https://app.khoj.dev/settings to connect your Notion workspace(s) to Khoj.

![notion_integration](https://assets.khoj.dev/notion_integration.gif)

Expand All @@ -13,7 +13,7 @@ Go to https://app.khoj.dev/config to connect your Notion workspace(s) to Khoj.
![setup_new_integration](https://github.com/khoj-ai/khoj/assets/65192171/b056e057-d4dc-47dc-aad3-57b59a22c68b)
3. Share all the workspaces that you want to integrate with the Khoj integration you just made in the previous step
![enable_workspace](https://github.com/khoj-ai/khoj/assets/65192171/98290303-b5b8-4cb0-b32c-f68c6923a3d0)
4. In the first step, you generated an API key. Use the newly generated API Key in your Khoj settings, by default at http://localhost:42110/config/content-source/notion. Click `Save`.
5. Click `Configure` in http://localhost:42110/config to index your Notion workspace(s).
4. In the first step, you generated an API key. Use the newly generated API Key in your Khoj settings, by default at [http://localhost:42110/settings#notion](http://localhost:42110/settings#notion). Click `Save`.
5. Click `Configure` in http://localhost:42110/settings to index your Notion workspace(s).

That's it! You should be ready to start searching and chatting. Make sure you've configured your [chat settings](/get-started/setup#2-configure).
4 changes: 2 additions & 2 deletions documentation/docs/get-started/overview.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
sidebar_position: 0
slug: /
keywords: ["khoj", "khoj ai", "khoj docs", "khoj documentation", "khoj features", "khoj overview", "khoj quickstart", "khoj chat", "khoj search", "khoj cloud", "khoj self-host", "khoj setup", "open source ai", "local llm", "ai copilot", "second brain ai", "ai search engine"]
keywords: ["khoj", "khoj ai", "khoj docs", "khoj documentation", "khoj features", "khoj overview", "khoj quickstart", "khoj chat", "khoj search", "khoj cloud", "khoj self-host", "khoj setup", "open source ai", "local llm", "ai copilot", "second brain", "personal ai", "ai search engine"]
---

# Overview

<p align="center"><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"></img></p>

<div align="center">
<b>An AI copilot for your Second Brain</b>
<b>Your Second Brain</b>
</div>

<br />
Expand Down
2 changes: 1 addition & 1 deletion documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Khoj AI',
tagline: 'An AI copilot for your Second Brain',
tagline: 'Your Second Brain',

staticDirectories: ['assets'],

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Khoj",
"version": "1.17.0",
"minAppVersion": "0.15.0",
"description": "An AI copilot for your Second Brain",
"description": "Your Second Brain",
"author": "Khoj Inc.",
"authorUrl": "https://github.com/khoj-ai",
"isDesktopOnly": false
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "khoj"
description = "An AI copilot for your Second Brain"
description = "Your Second Brain"
readme = "README.md"
license = "AGPL-3.0-or-later"
requires-python = ">=3.10"
Expand Down
10 changes: 7 additions & 3 deletions src/interface/desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ function pushDataToKhoj (regenerate = false) {

// Request indexing files on server. With upto 1000 files in each request
for (let i = 0; i < filesDataToPush.length; i += 1000) {
const syncUrl = `${hostURL}/api/content?client=desktop`;
const filesDataGroup = filesDataToPush.slice(i, i + 1000);
const formData = new FormData();
filesDataGroup.forEach(fileData => { formData.append('files', fileData.blob, fileData.path) });
let request = axios.post(`${hostURL}/api/v1/index/update?force=${regenerate}&client=desktop`, formData, { headers });
requests.push(request);
requests.push(
regenerate
? axios.put(syncUrl, formData, { headers })
: axios.patch(syncUrl, formData, { headers })
);
}

// Wait for requests batch to finish
Expand All @@ -253,7 +257,7 @@ function pushDataToKhoj (regenerate = false) {
console.error(error);
state["completed"] = false;
if (error?.response?.status === 429 && (BrowserWindow.getAllWindows().find(win => win.webContents.getURL().includes('config')))) {
state["error"] = `Looks like you're out of space to sync your files. <a href="https://app.khoj.dev/config">Upgrade your plan</a> to unlock more space.`;
state["error"] = `Looks like you're out of space to sync your files. <a href="https://app.khoj.dev/settings#subscription">Upgrade your plan</a> to unlock more space.`;
const win = BrowserWindow.getAllWindows().find(win => win.webContents.getURL().includes('config'));
if (win) win.webContents.send('needsSubscription', true);
} else if (error?.code === 'ECONNREFUSED') {
Expand Down
4 changes: 2 additions & 2 deletions src/interface/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Khoj",
"version": "1.17.0",
"description": "An AI copilot for your Second Brain",
"author": "Saba Imran, Debanjum Singh Solanky <team@khoj.dev>",
"description": "Your Second Brain",
"author": "Khoj Inc. <team@khoj.dev>",
"license": "GPL-3.0-or-later",
"homepage": "https://khoj.dev",
"repository": "\"https://github.com/khoj-ai/khoj\"",
Expand Down
2 changes: 1 addition & 1 deletion src/interface/desktop/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ window.updateStateAPI.onUpdateState((event, state) => {
window.needsSubscriptionAPI.onNeedsSubscription((event, needsSubscription) => {
console.log("needs subscription", needsSubscription);
if (needsSubscription) {
window.alert("Looks like you're out of space to sync your files. Upgrade your plan to unlock more space here: https://app.khoj.dev/config");
window.alert("Looks like you're out of space to sync your files. Upgrade your plan to unlock more space here: https://app.khoj.dev/settings#subscription");
needsSubscriptionElement.style.display = 'block';
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/interface/desktop/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@
const headers = { 'Authorization': `Bearer ${khojToken}` };

// Populate type dropdown field with enabled content types only
fetch(`${hostURL}/api/config/types`, { headers })
fetch(`${hostURL}/api/content/types`, { headers })
.then(response => response.json())
.then(enabled_types => {
// Show warning if no content types are enabled
if (enabled_types.detail) {
document.getElementById("results").innerHTML = "<div id='results-error'>To use Khoj search, setup your content plugins on the Khoj <a class='inline-chat-link' href='/config'>settings page</a>.</div>";
document.getElementById("results").innerHTML = "<div id='results-error'>To use Khoj search, setup your content plugins on the Khoj <a class='inline-chat-link' href='/settings'>settings page</a>.</div>";
document.getElementById("query").setAttribute("disabled", "disabled");
document.getElementById("query").setAttribute("placeholder", "Configure Khoj to enable search");
return [];
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/interface/desktop/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function populateHeaderPane() {
<div id="khoj-nav-menu" class="khoj-nav-dropdown-content">
<div class="khoj-nav-username"> ${username} </div>
<a id="github-nav" class="khoj-nav" href="https://github.com/khoj-ai/khoj">GitHub</a>
<a id="settings-nav" class="khoj-nav" href="./config.html">⚙️ Settings</a>
<a id="settings-nav" class="khoj-nav" href="./settings.html">⚙️ Settings</a>
</div>
</div>
` : ''}
Expand Down
12 changes: 6 additions & 6 deletions src/interface/emacs/khoj.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

;; Author: Debanjum Singh Solanky <debanjum@khoj.dev>
;; Saba Imran <saba@khoj.dev>
;; Description: An AI copilot for your Second Brain
;; Keywords: search, chat, org-mode, outlines, markdown, pdf, image
;; Description: Your Second Brain
;; Keywords: search, chat, ai, org-mode, outlines, markdown, pdf, image
;; Version: 1.17.0
;; Package-Requires: ((emacs "27.1") (transient "0.3.0") (dash "2.19.1"))
;; URL: https://github.com/khoj-ai/khoj/tree/master/src/interface/emacs
Expand Down Expand Up @@ -99,7 +99,7 @@
:type 'boolean)

(defcustom khoj-api-key nil
"API Key to your Khoj. Default at https://app.khoj.dev/config#clients."
"API Key to your Khoj. Default at https://app.khoj.dev/settings#clients."
:group 'khoj
:type 'string)

Expand Down Expand Up @@ -424,12 +424,12 @@ Auto invokes setup steps on calling main entrypoint."
"Send multi-part form `BODY' of `CONTENT-TYPE' in request to khoj server.
Append 'TYPE-QUERY' as query parameter in request url.
Specify `BOUNDARY' used to separate files in request header."
(let ((url-request-method "POST")
(let ((url-request-method ((if force) "PUT" "PATCH"))
(url-request-data body)
(url-request-extra-headers `(("content-type" . ,(format "multipart/form-data; boundary=%s" boundary))
("Authorization" . ,(format "Bearer %s" khoj-api-key)))))
(with-current-buffer
(url-retrieve (format "%s/api/v1/index/update?%s&force=%s&client=emacs" khoj-server-url type-query (or force "false"))
(url-retrieve (format "%s/api/content?%s&client=emacs" khoj-server-url type-query)
;; render response from indexing API endpoint on server
(lambda (status)
(if (not (plist-get status :error))
Expand Down Expand Up @@ -697,7 +697,7 @@ Optionally apply CALLBACK with JSON parsed response and CBARGS."

(defun khoj--get-enabled-content-types ()
"Get content types enabled for search from API."
(khoj--call-api "/api/config/types" "GET" nil `(lambda (item) (mapcar #'intern item))))
(khoj--call-api "/api/content/types" "GET" nil `(lambda (item) (mapcar #'intern item))))

(defun khoj--query-search-api-and-render-results (query content-type buffer-name &optional rerank is-find-similar)
"Query Khoj Search API with QUERY, CONTENT-TYPE and RERANK as query params.
Expand Down
2 changes: 1 addition & 1 deletion src/interface/obsidian/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Khoj",
"version": "1.17.0",
"minAppVersion": "0.15.0",
"description": "An AI copilot for your Second Brain",
"description": "Your Second Brain",
"author": "Khoj Inc.",
"authorUrl": "https://github.com/khoj-ai",
"isDesktopOnly": false
Expand Down
5 changes: 3 additions & 2 deletions src/interface/obsidian/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Khoj",
"version": "1.17.0",
"description": "An AI copilot for your Second Brain",
"description": "Your Second Brain",
"author": "Debanjum Singh Solanky, Saba Imran <team@khoj.dev>",
"license": "GPL-3.0-or-later",
"main": "src/main.js",
Expand All @@ -14,7 +14,8 @@
"search",
"chat",
"AI",
"assistant"
"assistant",
"second brain"
],
"devDependencies": {
"@types/dompurify": "^3.0.5",
Expand Down
9 changes: 5 additions & 4 deletions src/interface/obsidian/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ export async function updateContentIndex(vault: Vault, setting: KhojSetting, las
for (let i = 0; i < fileData.length; i += 1000) {
const filesGroup = fileData.slice(i, i + 1000);
const formData = new FormData();
const method = regenerate ? "PUT" : "PATCH";
filesGroup.forEach(fileItem => { formData.append('files', fileItem.blob, fileItem.path) });
// Call Khoj backend to update index with all markdown, pdf files
const response = await fetch(`${setting.khojUrl}/api/v1/index/update?force=${regenerate}&client=obsidian`, {
method: 'POST',
const response = await fetch(`${setting.khojUrl}/api/content?client=obsidian`, {
method: method,
headers: {
'Authorization': `Bearer ${setting.khojApiKey}`,
},
Expand Down Expand Up @@ -204,12 +205,12 @@ export function getBackendStatusMessage(
): string {
// Welcome message with default settings. Khoj cloud always expects an API key.
if (!khojApiKey && khojUrl === 'https://app.khoj.dev')
return `🌈 Welcome to Khoj! Get your API key from ${khojUrl}/config#clients and set it in the Khoj plugin settings on Obsidian`;
return `🌈 Welcome to Khoj! Get your API key from ${khojUrl}/settings#clients and set it in the Khoj plugin settings on Obsidian`;

if (!connectedToServer)
return `❗️Could not connect to Khoj at ${khojUrl}. Ensure your can access it`;
else if (!userEmail)
return `✅ Connected to Khoj. ❗️Get a valid API key from ${khojUrl}/config#clients to log in`;
return `✅ Connected to Khoj. ❗️Get a valid API key from ${khojUrl}/settings#clients to log in`;
else if (userEmail === 'default@example.com')
// Logged in as default user in anonymous mode
return `✅ Signed in to Khoj`;
Expand Down
10 changes: 9 additions & 1 deletion src/interface/web/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"extends": "next/core-web-vitals"
"extends": [
"next",
"next/core-web-vitals",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "warn"
}
}
5 changes: 5 additions & 0 deletions src/interface/web/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

yarn run lint-staged
yarn test
Loading
Loading