-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: migrate flash_attn settings #6864
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the flash_attn setting for the llamacpp provider from a toggle control to a dropdown with three options (Auto, On, Off). The changes include updating the default settings configuration, implementing a state migration to convert existing user settings, and adding logic to reset invalid persisted dropdown values.
- Migration logic for upgrading
flash_attnsettings from toggle to dropdown with "auto" as the default value - Updated option labels from uppercase (ON/OFF) to title case (On/Off) for UI consistency
- Added validation to reset dropdown values when persisted values are no longer valid option names
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web-app/src/hooks/useModelProvider.ts | Adds version 6 migration to convert flash_attn from toggle to dropdown control |
| web-app/src/hooks/tests/useModelProvider.test.ts | Adds test for flash_attn migration to verify dropdown conversion |
| extensions/llamacpp-extension/settings.json | Updates option labels from uppercase to title case |
| core/src/browser/extension.ts | Adds validation to reset dropdown value when persisted value no longer matches option names |
| core/src/browser/extension.test.ts | Adds test for dropdown value reset when persisted value is invalid |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Barecheck - Code coverage reportTotal: 30%Your code coverage diff: 0.10% ▴ Uncovered files and lines
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dinhlongviolin1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* fix: standardize log timestamps to UTC timezone - Update formatTimestamp functions in both log viewers to use UTC - Replace toLocaleTimeString() with explicit UTC formatting * French Translation * feat: Allow to save the last message upon interrupting llm response * feat: Continue with AI response button if it got interrupted * feat: Continue with AI response for llamacpp * feat: Modify on-going response instead of creating new message to avoid message ID duplication * feat: Add tests for the Continuing with AI response * fix: Consolidate comments * fix: Exposing PromptProgress to be passed as param * fix: Fix tests on useChat * fix: truncated tool name available on chat input * fix: wording disable all tools * fix: Incorrect proactive icon display * feat: avoid switching model midway Once the user switches model after they interrupt the response midway, force the user to start generating the response from the beginning to avoid cross model lemma * fix: migrate flash_attn settings (#6864) * fix: migrate flash_attn settings * Update web-app/src/hooks/useModelProvider.ts Co-authored-by: Copilot <[email protected]> * Update core/src/browser/extension.ts Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: chatinput debounce tokenize (#6855) * fix: chatinput debounce tokenize * fix error * fix: could not cancel the unintialized download (#6867) * fix: could not cancel the unintialized download * fix: could not open app folder * fix: tests * feat: loader screen before load FE * chore: remove nested RAF * chore: refactor filereader to tauri dialog * chore: update call funtion direct to handle image attachment * chore: update PR comment * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * feat: add configurable timeout for llamacpp connections (#6872) * feat: add configurable timeout for llamacpp connections This change introduces a user-configurable read/write timeout (in seconds) for llamacpp connections, replacing the hard-coded 600s value. The timeout is now settable via the extension settings and used in both HTTP requests and server readiness checks. This provides flexibility for different deployment scenarios, allowing users to adjust connection duration based on their specific use cases while maintaining the default 10-minute timeout behavior. * fix: correct timeout conversion factor and clarify settings description The previous timeout conversion used `timeout * 100` instead of `timeout * 1000`, which incorrectly shortened the timeout to 1/10 of the intended value (e.g., 10 minutes became 1 minute). This change corrects the conversion factor to milliseconds. Additionally, the settings description was updated to explicitly state that this timeout applies to both connection and load operations, improving user understanding of its scope. * style: replace loose equality with strict equality in key comparison This change updates the comparison operator from loose equality (`==`) to strict equality (`===`) when checking for the 'timeout' key. While the key is always a string in this context (making the behavior identical), using strict equality prevents potential type conversion issues and adheres to JavaScript best practices for reliable comparisons. * fix: hide thread dropdown on delete dialog confirmation popup * fix: model download state update (#6882) * Fix Discord Community link in CONTRIBUTING.md (#6883) * feat: Russian localization (#6869) * Add files via upload Updating localization files * Update LanguageSwitcher.tsx Added Russian language option * Add files via upload Removing the trailing newline character * Add files via upload UI Testing, Translation & Contextual QA * chore: address PR comments * feat: replace Tauri dialog plugin with rfd integration (#6850) * feat: replace Tauri dialog plugin with rfd integration Remove the legacy `tauri-plugin-dialog` dependency and its capability entry, adding `rfd` as a cross‑platform native file dialog library. Introduce `open_dialog` and `save_dialog` commands that expose file‑selection and save dialogs to the frontend, along with a `DialogOpenOptions` model for filter, directory, and multiple‑file support. Update the `TauriDialogService` to invoke these new commands instead of the removed plugin, ensuring a cleaner build and consistent dialog behaviour across desktop targets. * chore: remove unused serde_json import Remove the unnecessary serde_json import from `src-tauri/src/core/filesystem/commands.rs` to keep the codebase clean and eliminate unused dependencies. This small refactor improves build clarity and reduces potential lint warnings. * fix: command + N does not work (#6890) * fix: add mcp tool call timeout config (#6891) Update web-app/src/locales/vn/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-CN/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pl/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pt-BR/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/de-DE/mcp-servers.json Co-authored-by: Copilot <[email protected]> fix: tests Update web-app/src/locales/ja/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-TW/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/id/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update src-tauri/src/core/mcp/commands.rs Co-authored-by: Copilot <[email protected]> fix: utf translation * Fix: add conditional RAG tool injection only on document attachment (#6887) * feat: add conditional RAG tool injection for attachments The chat logic now only requests RAG tools when document attachments are enabled and the model supports tools. This improves performance by avoiding unnecessary API calls and reduces payloads for models that do not need external knowledge. The change also cleans up temporary chat messages on reload, sets a navigation flag, and updates `sendCompletion` and `postMessageProcessing` to use the new conditional tool loading logic. The refactor introduces clearer imports and formatting. * chore: restore formatting * completion.ts: restore formatting * feat: track document attachment in thread metadata and update RAG logic Add a `hasDocuments` flag to the active thread’s metadata when a document is ingested. Update the RAG eligibility check to use this flag rather than the raw `documents` array, ensuring that the thread’s state accurately reflects its attachment status. This keeps the thread UI in sync with attachments and prevents unnecessary re‑processing when the same documents are added to a thread. * refactor: consolidate thread update after attachment ingestion Remove duplicate `useThreads.getState().updateThread` calls that were present inside the attachment ingestion logic. The previous implementation updated the thread metadata twice (once inside the `try` block and again later), which could lead to unnecessary state changes and made debugging harder. The new approach updates the thread only once, after all attachments have been processed, ensuring consistent metadata and simplifying the flow. * test: improve useChat test mocks and capability handling Refactor the test environment for `useChat`: - Updated the `useModelProvider` mock to expose a test model with full capabilities (`tools`, `vision`, `proactive`) and a matching provider, enabling the hook to perform model‑specific logic without runtime errors. - Added a `setTokenSpeed` mock to `useAppState` to satisfy the hook’s usage of token‑speed settings. - Refactored `useThreads` to use `Object.assign` for consistent selector behaviour and added a `getThreadById` implementation. - Introduced an attachments mock and platform feature constants so that attachment handling tests can execute correctly. - Normalised content arrays in `newUserThreadContent` and `newAssistantThreadContent` to match the actual content format. - Cleared and reset builder mocks in `beforeEach` to avoid stale state across test cases. - Made minor formatting and type corrections throughout the test file. These changes resolve failing tests caused by missing provider models, incomplete capabilities, and broken mocks, and they enable coverage of proactive mode detection and attachment handling. * fix: glibc linux * feat: hide file attachments properly (#6895) * Guard attachment setters when feature disabled * fix lint issue * fix: get mcp servers spam request issue (#6901) * resolve rust clippy warnings (#6888) * resolve rust clippy warnings * fix: start_server expects a single config * resolve eslint error * fix(#6902): update Bun download link for darwin-86x -> darwin-64x (#6903) * fix: regression on reasoning models (#6914) * fix: regression on reasoning models * fix: reset accumulated text when not continuing message generation * fix: new chat shortcut stopped working (#6915) * fix: glitch UI issues (#6916) * fix: glitch UI issues * fix: tests * chore: bump rmcp to 0.8.5 (#6918) * feat: add backend migration mapping and update backend handling (#6917) Added `mapOldBackendToNew` to translate legacy backend strings (e.g., `win-avx2-x64`, `win-avx512-cuda-cu12.0-x64`) into the new unified names (`win-common_cpus-x64`, `win-cuda-12-common_cpus-x64`). Updated backend selection, installation, and download logic to use the mapper, ensuring consistent naming across the extension and tests. Updated tests to verify the mapping, new download items, and correct extraction paths. Minor formatting updates to the Tauri command file for clearer logging. This change enables smoother migration for stored user preferences and reduces duplicate asset handling. * add temp auth fix * add image upload * presigned upload * fix image upload and refresh tokens * fix images extensions * add project extensions * dev for testing --------- Co-authored-by: Roushan Singh <[email protected]> Co-authored-by: Roushan Kumar Singh <[email protected]> Co-authored-by: fred <[email protected]> Co-authored-by: Vanalite <[email protected]> Co-authored-by: Faisal Amir <[email protected]> Co-authored-by: Louis <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Dinh Long Nguyen <[email protected]> Co-authored-by: Akarshan Biswas <[email protected]> Co-authored-by: @Kuzmich55 <[email protected]> Co-authored-by: Minh141120 <[email protected]> Co-authored-by: Nguyen Ngoc Minh <[email protected]> Co-authored-by: Volodya Lombrozo <[email protected]>
* fix: standardize log timestamps to UTC timezone - Update formatTimestamp functions in both log viewers to use UTC - Replace toLocaleTimeString() with explicit UTC formatting * French Translation * feat: Allow to save the last message upon interrupting llm response * feat: Continue with AI response button if it got interrupted * feat: Continue with AI response for llamacpp * feat: Modify on-going response instead of creating new message to avoid message ID duplication * feat: Add tests for the Continuing with AI response * fix: Consolidate comments * fix: Exposing PromptProgress to be passed as param * fix: Fix tests on useChat * fix: truncated tool name available on chat input * fix: wording disable all tools * fix: Incorrect proactive icon display * feat: avoid switching model midway Once the user switches model after they interrupt the response midway, force the user to start generating the response from the beginning to avoid cross model lemma * fix: migrate flash_attn settings (#6864) * fix: migrate flash_attn settings * Update web-app/src/hooks/useModelProvider.ts Co-authored-by: Copilot <[email protected]> * Update core/src/browser/extension.ts Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: chatinput debounce tokenize (#6855) * fix: chatinput debounce tokenize * fix error * fix: could not cancel the unintialized download (#6867) * fix: could not cancel the unintialized download * fix: could not open app folder * fix: tests * feat: loader screen before load FE * chore: remove nested RAF * chore: refactor filereader to tauri dialog * chore: update call funtion direct to handle image attachment * chore: update PR comment * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * feat: add configurable timeout for llamacpp connections (#6872) * feat: add configurable timeout for llamacpp connections This change introduces a user-configurable read/write timeout (in seconds) for llamacpp connections, replacing the hard-coded 600s value. The timeout is now settable via the extension settings and used in both HTTP requests and server readiness checks. This provides flexibility for different deployment scenarios, allowing users to adjust connection duration based on their specific use cases while maintaining the default 10-minute timeout behavior. * fix: correct timeout conversion factor and clarify settings description The previous timeout conversion used `timeout * 100` instead of `timeout * 1000`, which incorrectly shortened the timeout to 1/10 of the intended value (e.g., 10 minutes became 1 minute). This change corrects the conversion factor to milliseconds. Additionally, the settings description was updated to explicitly state that this timeout applies to both connection and load operations, improving user understanding of its scope. * style: replace loose equality with strict equality in key comparison This change updates the comparison operator from loose equality (`==`) to strict equality (`===`) when checking for the 'timeout' key. While the key is always a string in this context (making the behavior identical), using strict equality prevents potential type conversion issues and adheres to JavaScript best practices for reliable comparisons. * fix: hide thread dropdown on delete dialog confirmation popup * fix: model download state update (#6882) * Fix Discord Community link in CONTRIBUTING.md (#6883) * feat: Russian localization (#6869) * Add files via upload Updating localization files * Update LanguageSwitcher.tsx Added Russian language option * Add files via upload Removing the trailing newline character * Add files via upload UI Testing, Translation & Contextual QA * chore: address PR comments * feat: replace Tauri dialog plugin with rfd integration (#6850) * feat: replace Tauri dialog plugin with rfd integration Remove the legacy `tauri-plugin-dialog` dependency and its capability entry, adding `rfd` as a cross‑platform native file dialog library. Introduce `open_dialog` and `save_dialog` commands that expose file‑selection and save dialogs to the frontend, along with a `DialogOpenOptions` model for filter, directory, and multiple‑file support. Update the `TauriDialogService` to invoke these new commands instead of the removed plugin, ensuring a cleaner build and consistent dialog behaviour across desktop targets. * chore: remove unused serde_json import Remove the unnecessary serde_json import from `src-tauri/src/core/filesystem/commands.rs` to keep the codebase clean and eliminate unused dependencies. This small refactor improves build clarity and reduces potential lint warnings. * fix: command + N does not work (#6890) * fix: add mcp tool call timeout config (#6891) Update web-app/src/locales/vn/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-CN/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pl/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pt-BR/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/de-DE/mcp-servers.json Co-authored-by: Copilot <[email protected]> fix: tests Update web-app/src/locales/ja/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-TW/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/id/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update src-tauri/src/core/mcp/commands.rs Co-authored-by: Copilot <[email protected]> fix: utf translation * Fix: add conditional RAG tool injection only on document attachment (#6887) * feat: add conditional RAG tool injection for attachments The chat logic now only requests RAG tools when document attachments are enabled and the model supports tools. This improves performance by avoiding unnecessary API calls and reduces payloads for models that do not need external knowledge. The change also cleans up temporary chat messages on reload, sets a navigation flag, and updates `sendCompletion` and `postMessageProcessing` to use the new conditional tool loading logic. The refactor introduces clearer imports and formatting. * chore: restore formatting * completion.ts: restore formatting * feat: track document attachment in thread metadata and update RAG logic Add a `hasDocuments` flag to the active thread’s metadata when a document is ingested. Update the RAG eligibility check to use this flag rather than the raw `documents` array, ensuring that the thread’s state accurately reflects its attachment status. This keeps the thread UI in sync with attachments and prevents unnecessary re‑processing when the same documents are added to a thread. * refactor: consolidate thread update after attachment ingestion Remove duplicate `useThreads.getState().updateThread` calls that were present inside the attachment ingestion logic. The previous implementation updated the thread metadata twice (once inside the `try` block and again later), which could lead to unnecessary state changes and made debugging harder. The new approach updates the thread only once, after all attachments have been processed, ensuring consistent metadata and simplifying the flow. * test: improve useChat test mocks and capability handling Refactor the test environment for `useChat`: - Updated the `useModelProvider` mock to expose a test model with full capabilities (`tools`, `vision`, `proactive`) and a matching provider, enabling the hook to perform model‑specific logic without runtime errors. - Added a `setTokenSpeed` mock to `useAppState` to satisfy the hook’s usage of token‑speed settings. - Refactored `useThreads` to use `Object.assign` for consistent selector behaviour and added a `getThreadById` implementation. - Introduced an attachments mock and platform feature constants so that attachment handling tests can execute correctly. - Normalised content arrays in `newUserThreadContent` and `newAssistantThreadContent` to match the actual content format. - Cleared and reset builder mocks in `beforeEach` to avoid stale state across test cases. - Made minor formatting and type corrections throughout the test file. These changes resolve failing tests caused by missing provider models, incomplete capabilities, and broken mocks, and they enable coverage of proactive mode detection and attachment handling. * fix: glibc linux * feat: hide file attachments properly (#6895) * Guard attachment setters when feature disabled * fix lint issue * fix: get mcp servers spam request issue (#6901) * resolve rust clippy warnings (#6888) * resolve rust clippy warnings * fix: start_server expects a single config * resolve eslint error * fix(#6902): update Bun download link for darwin-86x -> darwin-64x (#6903) * fix: regression on reasoning models (#6914) * fix: regression on reasoning models * fix: reset accumulated text when not continuing message generation * fix: new chat shortcut stopped working (#6915) * fix: glitch UI issues (#6916) * fix: glitch UI issues * fix: tests * chore: bump rmcp to 0.8.5 (#6918) * feat: add backend migration mapping and update backend handling (#6917) Added `mapOldBackendToNew` to translate legacy backend strings (e.g., `win-avx2-x64`, `win-avx512-cuda-cu12.0-x64`) into the new unified names (`win-common_cpus-x64`, `win-cuda-12-common_cpus-x64`). Updated backend selection, installation, and download logic to use the mapper, ensuring consistent naming across the extension and tests. Updated tests to verify the mapping, new download items, and correct extraction paths. Minor formatting updates to the Tauri command file for clearer logging. This change enables smoother migration for stored user preferences and reduces duplicate asset handling. * add temp auth fix * add image upload * presigned upload * fix image upload and refresh tokens * fix images extensions * add project extensions * dev for testing * fix project --------- Co-authored-by: Roushan Singh <[email protected]> Co-authored-by: Roushan Kumar Singh <[email protected]> Co-authored-by: fred <[email protected]> Co-authored-by: Vanalite <[email protected]> Co-authored-by: Faisal Amir <[email protected]> Co-authored-by: Louis <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Dinh Long Nguyen <[email protected]> Co-authored-by: Akarshan Biswas <[email protected]> Co-authored-by: @Kuzmich55 <[email protected]> Co-authored-by: Minh141120 <[email protected]> Co-authored-by: Nguyen Ngoc Minh <[email protected]> Co-authored-by: Volodya Lombrozo <[email protected]>
* fix: standardize log timestamps to UTC timezone - Update formatTimestamp functions in both log viewers to use UTC - Replace toLocaleTimeString() with explicit UTC formatting * French Translation * feat: Allow to save the last message upon interrupting llm response * feat: Continue with AI response button if it got interrupted * feat: Continue with AI response for llamacpp * feat: Modify on-going response instead of creating new message to avoid message ID duplication * feat: Add tests for the Continuing with AI response * fix: Consolidate comments * fix: Exposing PromptProgress to be passed as param * fix: Fix tests on useChat * fix: truncated tool name available on chat input * fix: wording disable all tools * fix: Incorrect proactive icon display * feat: avoid switching model midway Once the user switches model after they interrupt the response midway, force the user to start generating the response from the beginning to avoid cross model lemma * fix: migrate flash_attn settings (#6864) * fix: migrate flash_attn settings * Update web-app/src/hooks/useModelProvider.ts Co-authored-by: Copilot <[email protected]> * Update core/src/browser/extension.ts Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: chatinput debounce tokenize (#6855) * fix: chatinput debounce tokenize * fix error * fix: could not cancel the unintialized download (#6867) * fix: could not cancel the unintialized download * fix: could not open app folder * fix: tests * feat: loader screen before load FE * chore: remove nested RAF * chore: refactor filereader to tauri dialog * chore: update call funtion direct to handle image attachment * chore: update PR comment * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * Update web-app/src/locales/fr/common.json Co-authored-by: Copilot <[email protected]> * feat: add configurable timeout for llamacpp connections (#6872) * feat: add configurable timeout for llamacpp connections This change introduces a user-configurable read/write timeout (in seconds) for llamacpp connections, replacing the hard-coded 600s value. The timeout is now settable via the extension settings and used in both HTTP requests and server readiness checks. This provides flexibility for different deployment scenarios, allowing users to adjust connection duration based on their specific use cases while maintaining the default 10-minute timeout behavior. * fix: correct timeout conversion factor and clarify settings description The previous timeout conversion used `timeout * 100` instead of `timeout * 1000`, which incorrectly shortened the timeout to 1/10 of the intended value (e.g., 10 minutes became 1 minute). This change corrects the conversion factor to milliseconds. Additionally, the settings description was updated to explicitly state that this timeout applies to both connection and load operations, improving user understanding of its scope. * style: replace loose equality with strict equality in key comparison This change updates the comparison operator from loose equality (`==`) to strict equality (`===`) when checking for the 'timeout' key. While the key is always a string in this context (making the behavior identical), using strict equality prevents potential type conversion issues and adheres to JavaScript best practices for reliable comparisons. * fix: hide thread dropdown on delete dialog confirmation popup * fix: model download state update (#6882) * Fix Discord Community link in CONTRIBUTING.md (#6883) * feat: Russian localization (#6869) * Add files via upload Updating localization files * Update LanguageSwitcher.tsx Added Russian language option * Add files via upload Removing the trailing newline character * Add files via upload UI Testing, Translation & Contextual QA * chore: address PR comments * feat: replace Tauri dialog plugin with rfd integration (#6850) * feat: replace Tauri dialog plugin with rfd integration Remove the legacy `tauri-plugin-dialog` dependency and its capability entry, adding `rfd` as a cross‑platform native file dialog library. Introduce `open_dialog` and `save_dialog` commands that expose file‑selection and save dialogs to the frontend, along with a `DialogOpenOptions` model for filter, directory, and multiple‑file support. Update the `TauriDialogService` to invoke these new commands instead of the removed plugin, ensuring a cleaner build and consistent dialog behaviour across desktop targets. * chore: remove unused serde_json import Remove the unnecessary serde_json import from `src-tauri/src/core/filesystem/commands.rs` to keep the codebase clean and eliminate unused dependencies. This small refactor improves build clarity and reduces potential lint warnings. * fix: command + N does not work (#6890) * fix: add mcp tool call timeout config (#6891) Update web-app/src/locales/vn/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-CN/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pl/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/pt-BR/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/de-DE/mcp-servers.json Co-authored-by: Copilot <[email protected]> fix: tests Update web-app/src/locales/ja/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/zh-TW/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update web-app/src/locales/id/mcp-servers.json Co-authored-by: Copilot <[email protected]> Update src-tauri/src/core/mcp/commands.rs Co-authored-by: Copilot <[email protected]> fix: utf translation * Fix: add conditional RAG tool injection only on document attachment (#6887) * feat: add conditional RAG tool injection for attachments The chat logic now only requests RAG tools when document attachments are enabled and the model supports tools. This improves performance by avoiding unnecessary API calls and reduces payloads for models that do not need external knowledge. The change also cleans up temporary chat messages on reload, sets a navigation flag, and updates `sendCompletion` and `postMessageProcessing` to use the new conditional tool loading logic. The refactor introduces clearer imports and formatting. * chore: restore formatting * completion.ts: restore formatting * feat: track document attachment in thread metadata and update RAG logic Add a `hasDocuments` flag to the active thread’s metadata when a document is ingested. Update the RAG eligibility check to use this flag rather than the raw `documents` array, ensuring that the thread’s state accurately reflects its attachment status. This keeps the thread UI in sync with attachments and prevents unnecessary re‑processing when the same documents are added to a thread. * refactor: consolidate thread update after attachment ingestion Remove duplicate `useThreads.getState().updateThread` calls that were present inside the attachment ingestion logic. The previous implementation updated the thread metadata twice (once inside the `try` block and again later), which could lead to unnecessary state changes and made debugging harder. The new approach updates the thread only once, after all attachments have been processed, ensuring consistent metadata and simplifying the flow. * test: improve useChat test mocks and capability handling Refactor the test environment for `useChat`: - Updated the `useModelProvider` mock to expose a test model with full capabilities (`tools`, `vision`, `proactive`) and a matching provider, enabling the hook to perform model‑specific logic without runtime errors. - Added a `setTokenSpeed` mock to `useAppState` to satisfy the hook’s usage of token‑speed settings. - Refactored `useThreads` to use `Object.assign` for consistent selector behaviour and added a `getThreadById` implementation. - Introduced an attachments mock and platform feature constants so that attachment handling tests can execute correctly. - Normalised content arrays in `newUserThreadContent` and `newAssistantThreadContent` to match the actual content format. - Cleared and reset builder mocks in `beforeEach` to avoid stale state across test cases. - Made minor formatting and type corrections throughout the test file. These changes resolve failing tests caused by missing provider models, incomplete capabilities, and broken mocks, and they enable coverage of proactive mode detection and attachment handling. * fix: glibc linux * feat: hide file attachments properly (#6895) * Guard attachment setters when feature disabled * fix lint issue * fix: get mcp servers spam request issue (#6901) * resolve rust clippy warnings (#6888) * resolve rust clippy warnings * fix: start_server expects a single config * resolve eslint error * fix(#6902): update Bun download link for darwin-86x -> darwin-64x (#6903) * fix: regression on reasoning models (#6914) * fix: regression on reasoning models * fix: reset accumulated text when not continuing message generation * fix: new chat shortcut stopped working (#6915) * fix: glitch UI issues (#6916) * fix: glitch UI issues * fix: tests * chore: bump rmcp to 0.8.5 (#6918) * feat: add backend migration mapping and update backend handling (#6917) Added `mapOldBackendToNew` to translate legacy backend strings (e.g., `win-avx2-x64`, `win-avx512-cuda-cu12.0-x64`) into the new unified names (`win-common_cpus-x64`, `win-cuda-12-common_cpus-x64`). Updated backend selection, installation, and download logic to use the mapper, ensuring consistent naming across the extension and tests. Updated tests to verify the mapping, new download items, and correct extraction paths. Minor formatting updates to the Tauri command file for clearer logging. This change enables smoother migration for stored user preferences and reduces duplicate asset handling. * add temp auth fix * add image upload * presigned upload * fix image upload and refresh tokens * fix images extensions * add project extensions * dev for testing * fix project * increase images size with presign for testing --------- Co-authored-by: Roushan Singh <[email protected]> Co-authored-by: Roushan Kumar Singh <[email protected]> Co-authored-by: fred <[email protected]> Co-authored-by: Vanalite <[email protected]> Co-authored-by: Faisal Amir <[email protected]> Co-authored-by: Louis <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Dinh Long Nguyen <[email protected]> Co-authored-by: Akarshan Biswas <[email protected]> Co-authored-by: @Kuzmich55 <[email protected]> Co-authored-by: Minh141120 <[email protected]> Co-authored-by: Nguyen Ngoc Minh <[email protected]> Co-authored-by: Volodya Lombrozo <[email protected]>
Describe Your Changes
This PR is to address the issue where it could not load models with the latest dev changes.
Key changes:
Fixes Issues
Self Checklist