Skip to content

fix: add mcp tool call timeout config#6891

Merged
louis-jan merged 1 commit into
devfrom
fix/mcp-tool-call-timeout-config
Nov 6, 2025
Merged

fix: add mcp tool call timeout config#6891
louis-jan merged 1 commit into
devfrom
fix/mcp-tool-call-timeout-config

Conversation

@louis-jan

Copy link
Copy Markdown
Contributor

Describe Your Changes

This pull request introduces a new runtime MCP (Multi-Component Platform) settings system that allows key operational parameters—such as tool call timeouts and server restart backoff—to be dynamically configured and persisted. The changes replace previously hardcoded constants with settings loaded from and saved to the MCP config file, and ensure these settings are accessible and updatable at runtime. The codebase is refactored to use these settings throughout all relevant MCP server operations, improving flexibility and maintainability.

Screenshot 2025-11-05 at 17 29 39

Key changes:

Runtime MCP Settings Infrastructure

  • Introduced a new McpSettings struct to encapsulate runtime-configurable MCP settings (tool call timeout, restart delays, backoff multiplier), with sensible defaults and serialization support. This struct is stored in AppState and is accessible throughout the MCP subsystem. [1] [2] [3] [4] [5]

Config File Management

  • Updated MCP config file handling to read, validate, and persist the new mcpSettings section. The config file is now automatically upgraded to include missing settings or sections, and in-memory state is synchronized with file contents. [1] [2] [3]

Tool Call Timeout Logic

  • All tool call operations now use the timeout value from McpSettings rather than a hardcoded constant. This affects tool listing and invocation, making timeouts dynamically adjustable. [1] [2] [3] [4] [5]

Server Restart Backoff

  • Refactored exponential backoff logic for MCP server restarts to use values from McpSettings. The restart delay, maximum delay, and multiplier are now runtime-configurable, and the logic is updated to use these settings in all restart and monitoring tasks. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Constants Refactoring

  • Removed hardcoded MCP constants and replaced them with default values used by McpSettings, ensuring all defaults are centralized and easily adjustable.

These changes make it much easier to tune MCP server behavior without code changes, and lay the groundwork for exposing these settings in a user interface.

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 5, 2025 10:31
@louis-jan louis-jan requested review from Vanalite, Copilot, dinhlongviolin1 and urmauur and removed request for Copilot and urmauur November 5, 2025 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds configurable MCP runtime settings to allow users to customize tool call timeouts and server restart behavior. These settings are now persisted in the MCP configuration file and exposed in the UI.

  • Added MCPSettings type with configurable timeout and backoff parameters
  • Implemented UI controls to adjust tool call timeout via a number input field
  • Updated config persistence to include mcpSettings alongside mcpServers

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
web-app/src/hooks/useMCPServers.ts Added MCPSettings type and state management functions (setSettings, updateSettings)
web-app/src/routes/settings/mcp-servers.tsx Added UI input for tool call timeout and logic to save/load settings with servers
web-app/src/services/mcp/tauri.ts Enhanced getMCPConfig to parse and normalize mcpSettings with legacy format support
web-app/src/providers/DataProvider.tsx Updated to load and set mcpSettings on app initialization
src-tauri/src/core/mcp/models.rs Defined McpSettings struct with serde defaults and timeout helper method
src-tauri/src/core/mcp/commands.rs Modified get/save_mcp_configs to ensure mcpSettings is always present; updated tool_call operations to use dynamic timeout
src-tauri/src/core/mcp/helpers.rs Updated exponential backoff calculation to use configurable settings instead of constants
src-tauri/src/core/mcp/constants.rs Converted MCP timeout constants to default values for the settings struct
web-app/src/locales/**/mcp-servers.json Added runtimeSettings translations (currently English only)
web-app/src/services/tests/mcp.test.ts Updated tests to expect mcpSettings in getMCPConfig response
web-app/src/hooks/tests/useMCPServers.test.ts Added test coverage for setSettings and updateSettings functions

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

Comment thread web-app/src/locales/zh-TW/mcp-servers.json Outdated
Comment thread web-app/src/locales/zh-CN/mcp-servers.json Outdated
Comment thread web-app/src/locales/vn/mcp-servers.json Outdated
Comment thread web-app/src/locales/pt-BR/mcp-servers.json Outdated
Comment thread web-app/src/locales/pl/mcp-servers.json Outdated
Comment thread web-app/src/locales/ja/mcp-servers.json Outdated
Comment thread web-app/src/locales/id/mcp-servers.json Outdated
Comment thread web-app/src/locales/de-DE/mcp-servers.json Outdated
Comment thread web-app/src/routes/settings/mcp-servers.tsx
@github-actions

github-actions Bot commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings November 5, 2025 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 26 out of 26 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.

Copilot AI review requested due to automatic review settings November 5, 2025 12:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 26 out of 26 changed files in this pull request and generated 3 comments.


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

Comment thread web-app/src/locales/zh-TW/mcp-servers.json Outdated
Comment thread web-app/src/routes/settings/mcp-servers.tsx
Comment thread src-tauri/src/core/mcp/helpers.rs
Copilot AI review requested due to automatic review settings November 5, 2025 13:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 27 out of 27 changed files in this pull request and generated 6 comments.


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

Comment thread src-tauri/src/core/mcp/helpers.rs
Comment thread src-tauri/src/core/mcp/commands.rs
Comment thread src-tauri/src/core/mcp/helpers.rs
Comment thread src-tauri/src/core/mcp/commands.rs Outdated
Comment thread web-app/src/services/mcp/tauri.ts
Comment thread web-app/src/routes/settings/mcp-servers.tsx
Copilot AI review requested due to automatic review settings November 6, 2025 04:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 27 out of 27 changed files in this pull request and generated 3 comments.


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

Comment thread web-app/src/routes/settings/mcp-servers.tsx
Comment thread src-tauri/src/core/mcp/helpers.rs
Comment thread src-tauri/src/core/mcp/commands.rs
Update web-app/src/locales/vn/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-CN/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pl/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pt-BR/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/de-DE/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: tests

Update web-app/src/locales/ja/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-TW/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/id/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update src-tauri/src/core/mcp/commands.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: utf translation
@louis-jan louis-jan force-pushed the fix/mcp-tool-call-timeout-config branch from da420d8 to 67c2fd0 Compare November 6, 2025 06:10
@louis-jan louis-jan merged commit 0193206 into dev Nov 6, 2025
17 checks passed
@louis-jan louis-jan deleted the fix/mcp-tool-call-timeout-config branch November 6, 2025 07:55
@github-actions github-actions Bot added this to the v0.7.4 milestone Nov 6, 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 <175728472+Copilot@users.noreply.github.com>

* Update core/src/browser/extension.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-CN/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pl/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pt-BR/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/de-DE/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: tests

Update web-app/src/locales/ja/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-TW/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/id/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update src-tauri/src/core/mcp/commands.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

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 <github.rtron18@gmail.com>
Co-authored-by: Roushan Kumar Singh <158602016+github-roushan@users.noreply.github.com>
Co-authored-by: fred <domaine75@gmail.com>
Co-authored-by: Vanalite <dhnghia0604@gmail.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dinh Long Nguyen <dinhlongviolin1@gmail.com>
Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
Co-authored-by: @Kuzmich55 <81525287+Kuzmich55@users.noreply.github.com>
Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
Co-authored-by: Volodya Lombrozo <volodya.lombrozo@gmail.com>
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 <175728472+Copilot@users.noreply.github.com>

* Update core/src/browser/extension.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-CN/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pl/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pt-BR/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/de-DE/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: tests

Update web-app/src/locales/ja/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-TW/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/id/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update src-tauri/src/core/mcp/commands.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

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 <github.rtron18@gmail.com>
Co-authored-by: Roushan Kumar Singh <158602016+github-roushan@users.noreply.github.com>
Co-authored-by: fred <domaine75@gmail.com>
Co-authored-by: Vanalite <dhnghia0604@gmail.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dinh Long Nguyen <dinhlongviolin1@gmail.com>
Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
Co-authored-by: @Kuzmich55 <81525287+Kuzmich55@users.noreply.github.com>
Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
Co-authored-by: Volodya Lombrozo <volodya.lombrozo@gmail.com>
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 <175728472+Copilot@users.noreply.github.com>

* Update core/src/browser/extension.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-CN/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pl/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pt-BR/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/de-DE/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: tests

Update web-app/src/locales/ja/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-TW/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/id/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update src-tauri/src/core/mcp/commands.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

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 <github.rtron18@gmail.com>
Co-authored-by: Roushan Kumar Singh <158602016+github-roushan@users.noreply.github.com>
Co-authored-by: fred <domaine75@gmail.com>
Co-authored-by: Vanalite <dhnghia0604@gmail.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dinh Long Nguyen <dinhlongviolin1@gmail.com>
Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
Co-authored-by: @Kuzmich55 <81525287+Kuzmich55@users.noreply.github.com>
Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
Co-authored-by: Volodya Lombrozo <volodya.lombrozo@gmail.com>
locnguyen1986 added a commit that referenced this pull request Dec 5, 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 <175728472+Copilot@users.noreply.github.com>

* Update core/src/browser/extension.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 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 <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-CN/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pl/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/pt-BR/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/de-DE/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

fix: tests

Update web-app/src/locales/ja/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/zh-TW/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update web-app/src/locales/id/mcp-servers.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update src-tauri/src/core/mcp/commands.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

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.

* feat: add backend migration mapping and update backend handling (#6917) (#6920)

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.

Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>

* ci: clean up duplicate issue workflow

* Enhance localization by completing missing translations across all locales + czech support (#6758)

* Add Missing translations for id

* Add Missing translations for pl

* Add Missing translations for vn

* Add Missing translations for zh-CN

* Add Missing translations for zh-TW

* Add Missing translations for de-DE

* Add Missing translations for cs

* Extend Czech language support in Jan

* feat: Add official jan browser mcp

* feat: keep the installation link alive

* fix: missing toaster style

* Merge pull request #6929 from janhq/feat/official_jan_browser_mcp

feat: Add official jan browser mcp

* fix: do not filter out providers by models length (#6936)

* fix: tauri permission

* chore: fix wrong permission

* chore: use latest tag for search-mcp-server

* fix: permission error for main window

* remove lincese from bundle

* fix: set backend path environment variables for llama.cpp (#6937)

* fix: set backend path environment variables for llama.cpp

Ensure that the backend executable’s directory is added to the appropriate
environment variable (`PATH`, `LD_LIBRARY_PATH`, or `DYLD_LIBRARY_PATH`)
before invoking `llama_load` and `get_devices`.
This change fixes load failures on Windows, Linux, and macOS where the
dynamic loader cannot locate the required libraries without the proper
search paths, and cleans up unused imports.

* refactor: centralize library path setup in Rust utilities

Move the library‑path configuration logic out of the TypeScript code into the
Rust `setup_library_path` helper. The TypeScript files no longer set the
`PATH`, `LD_LIBRARY_PATH`, or `DYLD_LIBRARY_PATH` environment variables
directly; instead they defer to the Rust side, which now accepts a
`Path` and performs platform‑specific normalization (including UNC‑prefix
trimming on Windows). This removes duplicated code, keeps environment
configuration consistent across the plugin, and simplifies maintenance.
The import order in `device.rs` was corrected and small formatting fixes
were applied. No functional changes to the public API occur.

* feat: add CUDA path detection and warnings for llama.cpp

Add utilities to detect CUDA installations on Windows and Linux, automatically
inject CUDA paths into the process environment, and warn when the llama.cpp
binary requires CUDA but the runtime is not found.  The library‑path setup has
been refactored to prepend new paths and normalise UNC prefixes for Windows.
This ensures the backend can load CUDA libraries correctly and provides
diagnostic information when CUDA is missing.

* refactor: correctly map and store effective backend type

This update unifies backend type handling across the llamacpp extension.
Previously, the stored backend preference, the version string, and the
auto‑update logic used inconsistent identifiers (raw backend names versus
their effective mapped forms). The patch:

* Maps legacy backend names to their new “effective” type before any
comparison or storage.
* Stores the full `version/effectiveType` string instead of just the
type, ensuring the configuration and localStorage stay in sync.
* Updates all logging and warning messages to reference the effective
backend type.
* Simplifies the update check logic by comparing the effective type and
version together, preventing unnecessary migrations.

These changes eliminate bugs that occurred when the backend type
changed after an update and make the internal state more coherent.

* refactor: improve CUDA detection and migrate legacy libs

Enhance `_isCudaInstalled` to accept the backend directory and CUDA version, checking both the new and legacy installation paths. If a library is found in the old location, move it to the new `build/bin` directory and create any missing folders. Update `mapOldBackendToNew` formatting and remove duplicated comments. Minor consistency and readability fixes were also applied throughout the backend module.

* refactor: broaden llama backend archive regex

This update expands the regular expression used to parse llama‑cpp extension archives.
The new pattern now supports:
- Optional prefixes and the `-main` segment
- Version strings that include a hash suffix
- An optional `-cudart-llama` part
- A wide range of backend detail strings

These changes ensure `installBackend` can correctly handle the latest naming conventions (e.g., `k_llama-main-b4314-09c61e1-bin-win-cuda-12.8-x64-avx2.zip`) while preserving backward compatibility with older formats.

* feat: distinct mcp server

* fix: All tool toggle state should match tool states correctly

* chore: update tests

* fix: responsive mobile screen

* chore: add migration

* fix: test with browser tool vs rag tool

* fix: CI

* remove interface local storage (#6947)

* fix: filter downloaded model

* fix: hide zoom shortcut

* fix: updater permission

* docs: add changelog v0.7.3

* chore: prettify changelog and add new contributors

* chore: add ogImage for changelog header

* fix: csp restrictions from inline styles

* chore: unused comment

* fix: glib issue on linux

* fix: app blocks image input (#6982)

* fix: app blocks image input

* chore: duplicate

* fix: disable autocorrect in model search input (#6952)

Disable autocorrect, autocomplete, and spell check in the model search
input field within the "Add new model" modal. Model IDs are technical
identifiers and should not be auto-corrected to unrelated words.

Added attributes:
- autoComplete="off"
- autoCorrect="off"
- autoCapitalize="off"
- spellCheck={false}

* French translation menu item missing (#6974)

* add French translation menu item

* fix typo

* chore: separate the loader style

* migrate assistant screen into setting

* fix: changing tools while conversing results in incorrect tool use (#6985)

* Update index.mdx

Fix the broken link

* Enable desktop file attachments feature (#6989)

* fix: trafficlight icon mac responsive

* chore: unused import

* fix: reenable zoom hotkey

* chore: enable back shortcut setting zoom in/out

* feat: combine attachments icon

* test: fix test case chat input

* feat: add CUDA 13 support to backend (#6996)

Add a new feature flag `cuda13` and update feature detection for
CUDA 11/12/13 drivers.
Include support for the new `cuda-13` backend string, update the
supported‑backends list to include Vulkan backends when CUDA 13 is
available, and add a download item for the CUDA 13 runtime/library.
The minimum driver versions for Linux and Windows have been set to
580, matching the latest CUDA 13 requirements.
This extends the llama.cpp extension to work with the newest NVIDIA
CUDA toolkit and ensures correct runtime files are fetched during
installation.

* remove web version tracker

* chore: bump token.js

* Fix duplication dependency

* feat: add CUDA 13 backend as a priority backend (#7005)

Add CUDA 13 as a priority backend, map its identifier to the existing
category, and update the regex used for parsing archive names. This
enables the extension to work with newer NVIDIA drivers that ship
CUDA 13, ensuring better GPU utilization and a unified CPU backend
path. The changes also improve readability of the regex and keep the
backend selection logic consistent across memory‑aware and
memory‑unaware scenarios.

* cleanup files

* docs: update handbook

* docs: update handbook

* feat: move proactive mode to MCP settings

* fix: fix tests after moving proactive mode away from capability

* feat: lockfile to kill conflict MCP's port

* feat: remove hardcoded port

* fix: keep the official badge after modifying mcp settings

* docs: update homepage SEO meta title and description

* chore: update flatpak manifest

* fix: remove /bin from global cleanup

* docs: optimize 'run AI locally' blog post for SEO

- Add platform-specific section (Windows, Mac, Linux) for better keyword coverage
- Update featured image and content images with new assets
- Optimize FAQ headings for search intent (without GPU, for free, RAM requirements)
- Add laptop/desktop specific keywords throughout
- Restructure intro for better UX and direct value
- Improve hardware requirements section with specific examples
- Add +269 words of valuable content for better ranking

SEO improvements target high-volume queries:
- 'run AI locally on Windows/Mac/Linux'
- 'AI without GPU'
- 'run AI on laptop'
- 'free local AI models'

* fix: cstdint patch flatpak

* chore: update gif metainfo

* fix: add caption to screenshot to resolve appstream warning

* feat: update Russian localization (#7039)

The Russian localization files have been updated

* SEO: Improve offline-chatgpt-alternative content

* feat: flatpak disable auto updater

* fix: libapp indicator

* feat: upload flatpak build to s3

* feat: add flatpak build

* refactor: separate flatpak build

* Update flatpak metainfo

* chore: update flatpak screenshot metainfo

* fix: flatpak appstream metadata validation errors

* docs: add Microsoft Store and Flathub badges (#7068)

* docs: add Microsoft Store and Flathub badges

Add badges for Microsoft Store and Flathub to the Installation section of the README.
This gives users quick, visually distinct links to install the application from these popular platforms, improving discoverability and the overall presentation of our installation options.

* docs: improve download badge layout in README

Use a table layout for the Microsoft Store and Flathub badges, adjust image
dimensions, switch to the official Flathub badge asset, and update alt text to
enhance accessibility and visual consistency.

* feat: add Polish metainfo translation

* fix: improve Hub download button UX for installed models

When a model is downloaded in Hub, the button now displays 'New chat' with gray secondary styling (matching Settings buttons) instead of 'Use' with primary styling. This makes installed models visually distinct and clarifies the action.

Updated all 12 locale files with proper translations.

* Fix Clippy Errors by grouping state in RestartLoopState (#7010)

* Update metadata for ai.jan.Jan

Automatically generated:
- Keywords: chatbot, ai assistant, offline ai

* feat: Update Russian localization (#7082)

* feat: update Russian localization

The Russian localization files have been updated

* feat: update Russian localization

The Russian localization files have been updated

* feat: complete Czech translations (#7081)

* temporary remove jan model validation

* add jan-image

---------

Co-authored-by: Roushan Singh <github.rtron18@gmail.com>
Co-authored-by: Roushan Kumar Singh <158602016+github-roushan@users.noreply.github.com>
Co-authored-by: fred <domaine75@gmail.com>
Co-authored-by: Vanalite <dhnghia0604@gmail.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
Co-authored-by: @Kuzmich55 <81525287+Kuzmich55@users.noreply.github.com>
Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
Co-authored-by: Volodya Lombrozo <volodya.lombrozo@gmail.com>
Co-authored-by: Nghia Doan <vanalite0604@gmail.com>
Co-authored-by: Arthur Sepiol <87866997+Lokimorty@users.noreply.github.com>
Co-authored-by: Kien Nguyen <kien12p@gmail.com>
Co-authored-by: mmngn <ngphuoc.hauyen@gmail.com>
Co-authored-by: mimi ✨ <34374000+mmngn@users.noreply.github.com>
Co-authored-by: eckartal <emre@jan.ai>
Co-authored-by: Minh141120 <minh.itpit@gmail.com>
Co-authored-by: Piotr Orzechowski <piotr@orzechowski.tech>
Co-authored-by: Arthur Sepiol <lokimorty@gmail.com>
Co-authored-by: Kolja Lampe <razzeee@gmail.com>
Co-authored-by: Michal Zemek <michal@zemek.cz>
Co-authored-by: locnguyen1986 <locnguyen1986@gmail.com>
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.

feat: Make MCP tool timeout configurable

3 participants