fix: fix embedding 403 CORS on Windows and blurry icon#371
Open
MorningStar0709 wants to merge 2 commits into
Open
fix: fix embedding 403 CORS on Windows and blurry icon#371MorningStar0709 wants to merge 2 commits into
MorningStar0709 wants to merge 2 commits into
Conversation
…behavior - Add system tray icon with Show/Quit menu and left-click window restore (tray.rs) - Integrate tauri-plugin-autostart with Settings → General checkbox - Add tauri-plugin-single-instance to prevent multiple app instances - Implement 3-state close behavior (ask/exit/minimize) with auto-remember - Add Settings → General close behavior dropdown selector - Persist close behavior to app-state.json from Rust close handler - Add store.save() force-flush in saveGeneralConfig for reliable persistence - Wrap set_close_behavior IPC in try-catch during app startup - Return Result from set_close_behavior command for validation feedback - Update i18n keys for zh/en, remove unused minimizeToTray keys - Fix Windows path separator and timing issues in integration tests 🤖 Generated with [Qoder][https://qoder.com]
- Add Origin: http://localhost header for embedding requests Tauri HTTP plugin on Windows injects Origin: http://tauri.localhost which Ollama rejects with 403. This matches the existing localLlmOriginHeader() pattern in llm-providers.ts. - Add icons/icon.png (512x512) to tauri.conf.json bundle.icon list to fix blurry taskbar/tray icons on Win11 high-DPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small fixes for Windows users:
1. Fix embedding 403 Forbidden on Windows
When using Ollama as the embedding provider on Windows, Tauri's http plugin automatically injects
Origin: http://tauri.localhostinto requests. Ollama doesn't recognize this origin and returns 403 Forbidden.This fix adds an explicit
Origin: http://localhostheader to embedding requests, matching the existinglocalLlmOriginHeader()pattern already used inllm-providers.tsfor Ollama and Custom providers.2. Fix blurry taskbar and tray icons on Win11 high-DPI
The
icons/icon.png(512x512, highest quality source) was not included intauri.conf.jsonbundle.icon list, resulting in a low-resolution .ico file that appears blurry on Windows 11 high-DPI displays.Changes
src/lib/embedding.ts: AddOrigin: http://localhostto request headerssrc-tauri/tauri.conf.json: Addicons/icon.pngto bundle icon listCloses #367