Skip to content

Conversation

@louis-jan
Copy link
Contributor

Describe Your Changes

Fixed the issue where the downloaded model still displayed the download button, leading to potential model removal and causing users to get stuck in a loop. Deprecated some cohere provider since legacy models are deprecated.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copilot AI review requested due to automatic review settings November 4, 2025 10:43
Copy link
Contributor

Copilot AI left a 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 refactors the model download action UI into a reusable component and performs maintenance tasks including removing deprecated Cohere provider support and filtering out providers with empty model lists.

  • Extracted model download action logic into a reusable ModelDownloadAction component
  • Added migration logic to remove deprecated Cohere provider from persisted state
  • Implemented filtering to exclude providers without models
  • Updated token.js-fork package version

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
web-app/src/containers/ModelDownloadAction.tsx New reusable component for model download actions extracted from hub page
web-app/src/routes/hub/index.tsx Refactored to use the new ModelDownloadAction component, removing inline download logic
web-app/src/services/providers/tauri.ts Added filtering to exclude providers with empty model arrays
web-app/src/hooks/useModelProvider.ts Added migration to remove deprecated Cohere provider (version 7)
web-app/src/containers/DownloadButton.tsx Added event listener for download completion to update UI state reactively
web-app/package.json Updated token.js-fork from 0.7.29 to 0.7.30

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 4, 2025 10:47
Copy link
Contributor

Copilot AI left a 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 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Barecheck - Code coverage report

Total: 29.93%

Your code coverage diff: -0.02% ▾

Uncovered files and lines
FileLines
web-app/src/containers/DownloadButton.tsx1-9, 11-13, 19, 21-35, 37-39, 41-46, 48, 50-60, 62-71, 73-80, 82-85, 87-95, 97-98, 100, 102-105, 107-108, 110, 112, 114-123, 125-130, 132-138, 140-144, 146-147, 149-153, 155-156, 158, 160
web-app/src/containers/ModelDownloadAction.tsx1-8, 10-12, 14-17, 20-21, 23-37, 39, 41-55, 57-65, 67-76, 78, 80-84, 86-89, 91-93, 95, 97-107, 109-115, 117-118, 120
web-app/src/hooks/useModelProvider.ts33-38, 69, 86, 93, 115-126, 143-154, 164-166, 168, 170-172, 175-178, 180-181, 183, 185-187, 189-202, 209-214, 236, 238-246, 249-251, 254-257, 260-267, 269-277, 279-290, 293, 295-303, 306-308, 310-321, 324, 326-329, 332-350, 352-364, 366-371, 374-395, 398, 400-402, 404-411, 413-424
web-app/src/routes/hub/index.tsx2-9, 17-21, 28-29, 35-36, 42, 44-51, 56, 58-63, 65-69, 71, 73-76, 78-85, 87-89, 91-97, 99-109, 111-114, 116-121, 124-131, 133-135, 138, 140-145, 147-148, 150-151, 153-158, 160-172, 174-184, 187-191, 193-195, 197-203, 205-208, 210-236, 238-241, 243-246, 248, 250-253, 255-269, 271-273, 276-278, 281-284, 286, 288-291, 293-306, 309-315, 317-318, 320-330, 332-336, 338-345, 347-355, 357, 359-367, 369-372, 374-399, 401-410, 412-428, 430-444, 447-453, 456-465, 467-470, 473-482, 484-493, 496-506, 508-512, 514-563, 565-582, 584-593, 595-599, 601-605, 607-643, 645-663, 665-666, 668-675, 677-678, 681, 684-685, 687-691, 693-694, 696, 698-699, 701-705, 707-711, 713
web-app/src/services/providers/tauri.ts5-13, 15-16, 18-19, 21-29, 31-33, 35-41, 43-47, 49-71, 74-76, 78-87, 89-90, 92-121, 123-128, 130-133, 135-138, 142-147, 150-153, 155-159, 162-165, 167, 169-186, 188, 191, 193-196, 198-203, 205-215, 218-223, 225-232, 235-239, 242-246, 248-273

@louis-jan louis-jan merged commit b266f5e into dev Nov 4, 2025
17 checks passed
@louis-jan louis-jan deleted the fix/model-download-state-update branch November 4, 2025 13:54
@github-project-automation github-project-automation bot moved this to QA in Jan Nov 4, 2025
@github-actions github-actions bot added this to the v0.7.4 milestone Nov 4, 2025
@louis-jan louis-jan moved this from QA to Done in Jan Nov 10, 2025
@louis-jan louis-jan modified the milestones: v0.7.4, v0.7.3 Nov 10, 2025
locnguyen1986 added a commit that referenced this pull request Nov 13, 2025
* 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]>
locnguyen1986 added a commit that referenced this pull request Nov 13, 2025
* 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]>
locnguyen1986 added a commit that referenced this pull request Nov 14, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug: downloaded model shows Download button again bug: deprecated models no longer usable

3 participants