45 Commits

Author SHA1 Message Date
Roushan Singh
291482cc16 Add SearchProjects to missing locales 2025-10-06 10:46:18 +07:00
Roushan Singh
154bc17778 (chore): remove duplicate keys from de-DE/common.json 2025-10-06 10:46:18 +07:00
Roushan Singh
cc5130c1af Fix Translation changes across locales 2025-10-06 10:46:18 +07:00
Roushan Singh
2d9f20ffb6 (chore): rename translation keys to collapseProject/expandProject 2025-10-06 10:46:18 +07:00
Louis
de9c04474e
fix: should not allow duplicating model (#6658) 2025-09-30 13:59:17 +07:00
Faisal Amir
e7a1a06395 feat: thread organization folder 2025-09-25 10:12:08 +07:00
Akarshan Biswas
885da29f28
feat: add getTokensCount method to compute token usage (#6467)
* feat: add getTokensCount method to compute token usage

Implemented a new async `getTokensCount` function in the LLaMA.cpp extension.
The method validates the model session, checks process health, applies the request template, and tokenizes the resulting prompt to return the token count. Includes detailed error handling for crashed models and API failures, enabling callers to assess token usage before sending completions.

* Fix: typos

* chore: update ui token usage

* chore: remove unused code

* feat: add image token handling for multimodal LlamaCPP models

Implemented support for counting image tokens when using vision-enabled models:
- Extended `SessionInfo` with optional `mmprojPath` to store the multimodal project file.
- Propagated `mmproj_path` from the Tauri plugin into the session info.
- Added import of `chatCompletionRequestMessage` and enhanced token calculation logic in the LlamaCPP extension:
- Detects image content in messages.
- Reads GGUF metadata from `mmprojPath` to compute accurate image token counts.
- Provides a fallback estimation if metadata reading fails.
- Returns the sum of text and image tokens.
- Introduced helper methods `calculateImageTokens` and `estimateImageTokensFallback`.
- Minor clean‑ups such as comment capitalization and debug logging.

* chore: update FE send params message include content type image_url

* fix mmproj path from session info and num tokens calculation

* fix: Correct image token estimation calculation in llamacpp extension

This commit addresses an inaccurate token count for images in the llama.cpp extension.

The previous logic incorrectly calculated the token count based on image patch size and dimensions. This has been replaced with a more precise method that uses the clip.vision.projection_dim value from the model metadata.

Additionally, unnecessary debug logging was removed, and a new log was added to show the mmproj metadata for improved visibility.

* fix per image calc

* fix: crash due to force unwrap

---------

Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
2025-09-23 07:52:19 +05:30
Faisal Amir
ec425163d3 enhancement: toaster delete mcp server 2025-09-19 23:25:01 +07:00
Akarshan Biswas
d1a8bdc4e3
feat: Add Jan API server Swagger UI (#6502)
* feat: Add Jan API server Swagger UI

- Serve OpenAPI spec (`static/openapi.json`) directly from the proxy server.
- Implement Swagger UI assets (`swagger-ui.css`, `swagger-ui-bundle.js`, `favicon.ico`) and a simple HTML wrapper under `/docs`.
- Extend the proxy whitelist to include Swagger UI routes.
- Add routing logic for `/openapi.json`, `/docs`, and Swagger UI static files.
- Update whitelisted paths and integrate CORS handling for the new endpoints.

* feat: serve Swagger UI at root path

The Swagger UI endpoint previously lived under `/docs`. The route handling and
exclusion list have been updated so the UI is now served directly at `/`.
This simplifies access, aligns with the expected root URL in the Tauri
frontend, and removes the now‑unused `/docs` path handling.

* feat: add model loading state and translations for local API server

Implemented a loading indicator for model startup, updated the start/stop button to reflect model loading and server starting states, and disabled interactions while pending. Added new translation keys (`loadingModel`, `startingServer`) across all supported locales (en, de, id, pl, vn, zh-CN, zh-TW) and integrated them into the UI. Included a small delay after model start to ensure backend state consistency. This improves user feedback and prevents race conditions during server initialization.
2025-09-19 09:11:55 +05:30
Dinh Long Nguyen
645548e931
Merge pull request #6516 from menloresearch/release/v0.6.10 2025-09-18 19:15:54 +07:00
Dinh Long Nguyen
0f85fce6ef
feat: add auth + google auth provider for web (#6505)
* handle google auth

* fix lint

* fix auto login button type

* update i18 language + userprofilemenu position

* minor api rename for consistency
2025-09-18 11:11:14 +07:00
Faisal Amir
a3c2c1aa3b fix: validat type mcp json 2025-09-16 22:35:51 +07:00
Faisal Amir
703b44558c chore: update locale mcp json 2025-09-16 17:24:32 +07:00
Maksym Krasovakyi
71e2e24112 Add model response timeout for local api server as configurable value via UI 2025-09-15 14:25:09 +03:00
Faisal Amir
44893bc3c3 enhancement: copy MCP permission 2025-09-15 10:33:05 +07:00
Faisal Amir
cbd2651a63
chore: update copy and refresh list when import from local machine 2025-09-11 09:52:09 +05:30
Faisal Amir
ba4dc6d1eb
enhancement: update ui dialog update llamacpp backend 2025-09-11 09:52:09 +05:30
Faisal Amir
86dcfc10cf enhancement: rollback edit capabilities for local model 2025-09-10 19:43:44 +07:00
Dinh Long Nguyen
32a2ca95b6
feat: gguf file size + hash validation (#5266) (#6259)
* feat: gguf file size + hash validation

* fix tests fe

* update cargo tests

* handle asyn download for both models and mmproj

* move progress tracker to models

* handle file download cancelled

* add cancellation mid hash run
2025-08-21 16:17:58 +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
b77c8932a6 feat: support inserting current date into assistant prompt 2025-08-17 00:24:00 -07:00
Louis
9c0d09c487
refactor: clean up cortex (#6003)
* refactor: clean up cortex

* chore: clean up

* refactor: clean up
2025-07-31 21:58:12 +07:00
Faisal Amir
6c15129ce8
fix: validate name assistant and improve area clickable (#5920) 2025-07-25 20:27:38 +07:00
Faisal Amir
25952f293c
enhancement: auto focus always allow action from tool approval dialog and add req parameters (#5836)
* enhancement: auto focus always allow action from tool approval dialog

* chore: error handling tools parameters

* chore: update test button focus cases
2025-07-22 12:17:53 +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
Bob Ros
3b7ed88180
Update web-app/src/locales/de-DE/common.json
change to informal

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:11:21 +02:00
Bob Ros
2fdfba208a
Update web-app/src/locales/de-DE/mcp-servers.json
use modern style for ß

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:09:51 +02:00
Bob Ros
224aa1b4e6
Update web-app/src/locales/de-DE/mcp-servers.json
fix typo

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:09:21 +02:00
Bob Ros
8a77c41519
Update web-app/src/locales/de-DE/mcp-servers.json
use modern style of ß

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:08:28 +02:00
Bob Ros
9c3b93a8c7
Update web-app/src/locales/de-DE/common.json
fix forgotten translation

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:07:21 +02:00
Bob Ros
0114d89993
Update web-app/src/locales/de-DE/common.json
fix forgotten translation

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:06:53 +02:00
Bob Ros
3329be5c73
Update web-app/src/locales/de-DE/common.json
fix forgotten translation deleteAll

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:06:24 +02:00
Bob Ros
e6f77faf06
Update web-app/src/locales/de-DE/providers.json
remove useless white space

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:05:46 +02:00
Bob Ros
f962c45d8e
Update web-app/src/locales/de-DE/model-errors.json
change 'ß' to modern German orthography

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:04:41 +02:00
Bob Ros
c187af27e7
Update web-app/src/locales/de-DE/setup.json
change 'ß' to modern German orthography

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:04:06 +02:00
Bob Ros
e5b392af09
Update web-app/src/locales/de-DE/tool-approval.json
fix typo securityNotice

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:02:42 +02:00
Bob Ros
4f940055be
Update web-app/src/locales/de-DE/settings.json
fix typo in serverHostDesc

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:02:00 +02:00
Bob Ros
50f7de0f2d
Update web-app/src/locales/de-DE/providers.json
fix incosistence insertApiKeyTitle

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:01:39 +02:00
Bob Ros
5fbde39c75
Update web-app/src/locales/de-DE/common.json
fix forgotten translation pickColorWindowBackground

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 03:00:00 +02:00
Bob Ros
342509d136
Update web-app/src/locales/de-DE/model-errors.json
fix typo increaseContextSizeDescription

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 02:59:00 +02:00
Bob Ros
c6ce78912c
Update web-app/src/locales/de-DE/hub.json
fix typo editTheme

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 02:58:04 +02:00
Bob Ros
90041552b9
Update web-app/src/locales/de-DE/common.json
fix typo in enterNameForProvider

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 02:57:36 +02:00
Bob Ros
6ec0849a1b
Update web-app/src/locales/de-DE/assistants.json
fix empty field value

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-28 02:56:25 +02:00
Bob Ros
bd11ce2579 add locale de-DE Germany 2025-06-28 02:10:37 +02:00