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

Fix Khoj Obsidian plugin on Obsidian Mobile #635

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

debanjum
Copy link
Member

@debanjum debanjum commented Feb 5, 2024

Removed node-fetch dependency to work on mobile. Fix CORS issue for Khoj (streaming) chat on Obsidian mobile. Verified Khoj plugin, search, chat work on Obsidian mobile.

Major

  • 04a8bbf Allow calls to Khoj server from Obsidian mobile app to fix CORS issue
  • 447904f Chat stream using default fetch' not node-fetch' in obsidian plugin

Minor

  • 00355ea Load chat history after other elements in chat modal on Obsidian are rendered
  • b86f686 Scroll to bottom of chat modal on Obsidian across mobile & desktop

Plugins using NodeJS libraries like `node-fetch' don't work on
Obsidian mobile
- Obsidian mobile uses capacitor js. Requests from it have origin as
  http://localhost on Android and capacitor://localhost on iOS
- Allow those Obsidian mobile origins in CORS middleware of server
…ered

This reduces laggy feeling due to latency of loading chat history from
server
@debanjum debanjum force-pushed the fix-khoj-on-obsidian-mobile branch from 00355ea to fd238ff Compare February 6, 2024 15:56
@debanjum debanjum merged commit fc1b8f6 into master Feb 6, 2024
9 checks passed
@debanjum debanjum deleted the fix-khoj-on-obsidian-mobile branch February 6, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants