51 Commits

Author SHA1 Message Date
Dinh Long Nguyen
491012fa87
remove assistant from web (#6468) 2025-09-15 23:53:59 +07:00
Dinh Long Nguyen
a30eb7f968
feat: Jan Web (reusing Jan Desktop UI) (#6298)
* add platform guards

* add service management

* fix types

* move to zustand for servicehub

* update App Updater

* update tauri missing move

* update app updater

* refactor: move PlatformFeatures to separate const file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* change tauri fetch name

* update implementation

* update extension fetch

* make web version run properly

* disabled unused web settings

* fix all tests

* fix lint

* fix tests

* add mock for extension

* fix build

* update make and mise

* fix tsconfig for web-extensions

* fix loader type

* cleanup

* fix test

* update error handling + mcp should be working

* Update mcp init

* use separate is_web_app build property

* Remove fixed model catalog url

* fix additional tests

* fix download issue (event emitter not implemented correctly)

* Update Title html

* fix app logs

* update root tsx render timing

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-05 01:47:46 +07:00
Louis
cfbc6b9150
fix: remove experimental toggle 2025-08-21 11:54:34 +07:00
Louis
e6587844d0
Merge branch 'dev' into current-date-instruction 2025-08-21 11:41:30 +07:00
Louis
c018713676
feat: allow user to set max_attempt for MCP to avoid looping 2025-08-20 12:42:54 +07:00
Kamal Fariz Mahyuddin
df27def9cb
Merge branch 'dev' into current-date-instruction 2025-08-19 14:40:08 -07:00
Faisal Amir
cef3e122ff chore: send attachment file when send message 2025-08-19 19:51:01 +07:00
Dinh Long Nguyen
9ea9b7d87d
handle abort properly + finally clause to resolve (#6227) 2025-08-19 14:45:57 +07:00
Dinh Long Nguyen
2d486d7b3a
feat: add support for reasoning fields (OpenRouter) (#6206)
* add support for reasoning fields (OpenRouter)

* reformat

* fix linter

* Update web-app/src/utils/reasoning.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-18 21:59:14 +07:00
Louis
362324cb87
Merge pull request #6188 from menloresearch/feat/mcp-enhancement
feat: mcp enhancement
2025-08-18 09:55:44 +07:00
Kamal Fariz Mahyuddin
b77c8932a6 feat: support inserting current date into assistant prompt 2025-08-17 00:24:00 -07:00
Jasper Morgal
4ba56f1377 Fix Issue #6199
Fix Issue: Jan UI Bottlenecks Token Rendering Speed to ~300 TPS Despite Faster Cerebras API Output
2025-08-15 15:00:29 -07:00
Louis
c8d9592ab8
chore: mcp group server, action and import json 2025-08-15 11:37:21 +07:00
Akarshan Biswas
0cfc745954
feat: Introduce structured error handling for llamacpp extension (#6087)
* feat: Introduce structured error handling for llamacpp extension

This commit introduces a structured error handling system for the `llamacpp` extension. Instead of returning simple string errors, we now use a custom `LlamacppError` struct with a specific `ErrorCode` enum. This allows the frontend to display more user-friendly and actionable error messages based on the code, rather than raw debug logs.

The changes include:
- A new `ErrorCode` enum to categorize errors (e.g., `OutOfMemory`, `ModelArchNotSupported`, `BinaryNotFound`).
- A `LlamacppError` struct to encapsulate the code, a user-facing message, and optional detailed logs.
- A static method `from_stderr` that intelligently parses llama.cpp's standard error output to identify and map common issues like Out of Memory errors to a specific error code.
- Refactored `ServerError` enum to wrap the new `LlamacppError` and provide a consistent serialization format for the Tauri frontend.
- Updated all relevant functions (`load_llama_model`, `get_devices`) to return the new structured error type, ensuring a more robust and predictable error flow.
- A reduced timeout for model loading from 300 to 180 seconds.

This work lays the groundwork for a more intuitive and helpful user experience, as the application can now provide clear guidance to users when a model fails to load.

* Update src-tauri/src/core/utils/extensions/inference_llamacpp_extension/server.rs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src-tauri/src/core/utils/extensions/inference_llamacpp_extension/server.rs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chore: update FE handle error object from extension

* chore: fix property type

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-08-07 23:28:25 +05:30
Faisal Amir
641df474fd
fix: Generate A Response button does not show context size error dialog (#6029)
* fix: Generate A Response button does not show context size error dialog

* chore: remove as a child button params
2025-08-05 08:34:06 +07:00
Louis
76bcf33f80
fix: generate response button disappear on tool call (#5988)
* fix: generate a response button should appear when an incomplete tool call message is present

* fix: wording

* fix: do not send duplicate messages on regenerating

* fix: tests
2025-07-30 21:04:12 +07:00
Faisal Amir
63cb4fbf3b
fix: assistant with last used and fix metadata (#5955)
* fix: assistant with last used and fix metadata

* chore: revert instruction and desc

* chore: fix current assistant state

* chore: updae metadata message assistant

* chore: update test case
2025-07-29 09:50:07 +07:00
Faisal Amir
1c74bfd5ef
fix: update edge case experimental feature MCP (#5951)
* fix: update edge case experimental feature MCP

* Update web-app/src/routes/settings/mcp-servers.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-28 21:31:51 +07:00
Akarshan Biswas
a1af70f7a9
feat: Enhance Llama.cpp backend management with persistence (#5886)
* feat: Enhance Llama.cpp backend management with persistence

This commit introduces significant improvements to how the Llama.cpp extension manages and updates its backend installations, focusing on user preference persistence and smarter auto-updates.

Key changes include:

* **Persistent Backend Type Preference:** The extension now stores the user's preferred backend type (e.g., `cuda`, `cpu`, `metal`) in `localStorage`. This ensures that even after updates or restarts, the system attempts to use the user's previously selected backend type, if available.
* **Intelligent Auto-Update:** The auto-update mechanism has been refined to prioritize updating to the **latest version of the *currently selected backend type*** rather than always defaulting to the "best available" backend (which might change). This respects user choice while keeping the chosen backend type up-to-date.
* **Improved Initial Installation/Configuration:** For fresh installations or cases where the `version_backend` setting is invalid, the system now intelligently determines and installs the best available backend, then persists its type.
* **Refined Old Backend Cleanup:** The `removeOldBackends` function has been renamed to `removeOldBackend` and modified to specifically clean up *older versions of the currently selected backend type*, preventing the accumulation of unnecessary files while preserving other backend types the user might switch to.
* **Robust Local Storage Handling:** New private methods (`getStoredBackendType`, `setStoredBackendType`, `clearStoredBackendType`) are introduced to safely interact with `localStorage`, including error handling for potential `localStorage` access issues.
* **Version Filtering Utility:** A new utility `findLatestVersionForBackend` helps in identifying the latest available version for a specific backend type from a list of supported backends.

These changes provide a more stable, user-friendly, and maintainable backend management experience for the Llama.cpp extension.

Fixes: #5883

* fix: cortex models migration should be done once

* feat: Optimize Llama.cpp backend preference storage and UI updates

This commit refines the Llama.cpp extension's backend management by:

* **Optimizing `localStorage` Writes:** The system now only writes the backend type preference to `localStorage` if the new value is different from the currently stored one. This reduces unnecessary `localStorage` operations.
* **Ensuring UI Consistency on Initial Setup:** When a fresh installation or an invalid backend configuration is detected, the UI settings are now explicitly updated to reflect the newly determined `effectiveBackendString`, ensuring the displayed setting matches the active configuration.

These changes improve performance by reducing redundant storage operations and enhance user experience by maintaining UI synchronization with the backend state.

* Revert "fix: provider settings should be refreshed on page load (#5887)"

This reverts commit ce6af62c7df4a7e7ea8c0896f307309d6bf38771.

* fix: add loader version backend llamacpp

* fix: wrong key name

* fix: model setting issues

* fix: virtual dom hub

* chore: cleanup

* chore: hide device ofload setting

---------

Co-authored-by: Louis <louis@jan.ai>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-07-24 18:33:35 +07:00
Faisal Amir
1d443e1f7d
fix: support load model configurations (#5843)
* fix: support load model configurations

* chore: remove log

* chore: sampling params add from send completion

* chore: remove comment

* chore: remove comment on predefined file

* chore: update test model service
2025-07-22 19:52:12 +07:00
Louis
bc4fe52f8d
fix: llama.cpp integration model load and chat experience (#5823)
* fix: stop generating should not stop running models

* fix: ensure backend ready before loading model

* fix: backend setting should not block onLoad
2025-07-21 09:29:26 +07:00
Louis
8d84c3b884
feat: add model load error handling to improve UX (#5802)
* feat: model load error handling

* chore: clean up

* test: add tests

* fix: provider name
2025-07-18 08:25:54 +05:30
Louis
8bd4a3389f
refactor: frontend uses new engine extension
# Conflicts:
#	extensions/model-extension/resources/default.json
#	web-app/src/containers/dialogs/DeleteProvider.tsx
#	web-app/src/routes/hub.tsx
2025-07-02 12:28:24 +07:00
Louis
16aab0d661
fix: increase context size window does not popup first time 2025-06-26 16:40:55 +07:00
Louis
86079074d2
🐛fix: update default extension settings (#5315)
* fix: update default extension settings

* chore: hide language setting on Prod
2025-06-17 17:37:31 +07:00
Bui Quang Huy
bea806c26c
Merge pull request #5278 from menloresearch/feat/token-speed-modification
 Feat: Token Speed Display Feature
2025-06-15 20:33:52 +08:00
Louis
e20c801ff0
enhancement: out of context troubleshooting (#5275)
* enhancement: out of context troubleshooting

* 🔧refactor: clean up
2025-06-15 18:20:17 +07:00
LazyYuuki
4b3a0918fe ♻️ refactor: to follow prettier convention 2025-06-15 18:54:22 +08:00
LazyYuuki
665de7df55 feat: add token speed to each message that persist 2025-06-15 18:30:39 +08:00
Louis
1e17cc6ec7
enhancement: model run improvement (#5268)
* fix: mcp tool error handling

* fix: error message

* fix: trigger download from recommend model

* fix: can't scroll hub

* fix: show progress

* enhancement: prompt users to increase context size

* enhancement: rearrange action buttons for a better UX

* 🔧chore: clean up logics

---------

Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-06-14 16:32:15 +07:00
Faisal Amir
808fdb02a7
chore: streaming tool output (#5237)
* enhancement: tool streaming output

* chore: update memo

* fix: streaming

* chore: update stream tools arguments

* chore: update condition

* fix: style

* fix: style

* chore: fix stop button

* chore: update color accent and hide arrow button

---------

Co-authored-by: Louis <louis@jan.ai>
2025-06-11 14:35:41 +07:00
Louis
51a321219d
chore: fix model settings are not applied accordingly on change (#5231)
* chore: fix model settings are not applied accordingly on change

* chore: handle failed tool call

* chore: stop inference and model on reject
2025-06-10 16:26:42 +07:00
Louis
171b1e8c60
fix: handle tool availability states (#5183)
* fix: handle tool availability states

* Update web-app/src/hooks/useToolAvailable.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update web-app/src/hooks/useToolAvailable.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update web-app/src/hooks/useToolAvailable.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* fix: hub refresh

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-04 00:17:39 +07:00
Sam Hoang Van
a3ebabfd4e
feat: add updateThreadTimestamp function to manage thread order and timestamp updates (#5180) 2025-06-03 18:53:58 +07:00
Faisal Amir
057accfb96
enhancement: ux tool call permission dialog and state active (#5157)
* enhancement: mcp toold dialog approval

* enhancement: update mcp tool enable or disable

* chore: add toggle mcl global permission
2025-06-01 23:58:20 +07:00
Louis
a1111033d9
chore: allow users to setting model offload (#5134)
* chore: allow users to setting model offload

* chore: apply model.yaml configurations to default model settings

* chore: fallback default value
2025-05-29 13:29:32 +07:00
Faisal Amir
1b3f16b3e1
feat: start and stop model (#5133)
* feat: start and stop model

* refactor: clean up start models

---------

Co-authored-by: Louis <louis@jan.ai>
2025-05-29 13:23:12 +07:00
Louis
eb0e21e5d6
chore: bump llama.cpp to b5509 (#5120) 2025-05-27 23:29:41 +07:00
Louis
c6ce193256
fix: remove chat message on GUI (#5114)
* fix: remove chat message on GUI

* Update web-app/src/containers/ThreadContent.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chore: fix message removal sequence

* chore: add comment

* Update web-app/src/containers/ThreadContent.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-27 15:13:47 +07:00
Louis
0fbc4a4664
chore: add function to model settings (#5108) 2025-05-26 18:53:08 +07:00
Louis
b8de48c9e9
fix: enhance tool use and model provider not persisted issues (#5094)
* chore: enhance tool use loop

* fix: create new custom provider is not saved

* chore: bump llama.cpp b5488

* chore: normalize reasoning assistant response

* chore: fix tool call parse in stream mode

* fix: give tool call default generated id

* fix: system instruction should be on top of the history

* chore: allow users to add parameters
2025-05-26 15:12:55 +07:00
Louis
125104320e
chore: handle many issues with app settings and message actions (#5086)
* chore: handle many issues with app settings and message actions

* Update web-app/src/services/mcp.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-23 21:23:52 +07:00
Louis
942f2f51b7
chore: send chat completion with messages history (#5070)
* chore: send chat completion with messages history

* chore: handle abort controllers

* chore: change max attempts setting

* chore: handle stop running models in system monitor screen

* Update web-app/src/services/models.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chore: format time

* chore: handle stop model load action

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-22 20:13:50 +07:00
Louis
4d66eaf0a7
chore: handle local models chat with MCP (#5065)
* chore: handle local models chat with MCP

* chore: update MCP server connection status in the settings page

* chore: error handling

* chore: normalize message

* chore: update finally block
2025-05-22 16:06:55 +07:00
Louis
0627f29059
chore: enable / disable proxy configrations (#5050)
* chore: enable / disable proxy configrations

* Update web-app/src/routes/settings/https-proxy.tsx

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

* Update web-app/src/lib/completion.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-21 14:18:25 +07:00
Faisal Amir
2812a8978a chore: intial new window system monitor 2025-05-21 12:27:54 +07:00
Louis
d5393e4563
feat: add custom OpenAI provider (#5033)
* feat: add custom OpenAI provider

* chore: add HF token setting

* chore: move HF token setting to llama.cpp provider - later deprecate model extension
2025-05-20 14:30:51 +07:00
Louis
46943a1cf7
chore: token speed and edit message (#5031)
* chore: add token speed measurement

* chore: add edit message handler

* chore: add DialogClose wrapper around save button
2025-05-20 14:09:25 +07:00
Louis
2dac53e9ca
feat: Jan supports multiple assistants (#5024)
* feat: Jan supports multiple assistants

* chore: persists current assistant to threads.json

* chore: update assistant persistence

* chore: simplify persistence objects
2025-05-20 00:57:26 +07:00
Louis
f6433544af
feat: handle stop streaming message, scroll to bottom and model loads (#5023) 2025-05-19 23:32:55 +07:00