Akarshan
c129757097
chore: Refactor chat flow – remove loop, centralize tool handling, add step limit
...
* Move the assistant‑loop logic out of `useChat` and into `postMessageProcessing`.
* Eliminate the while‑loop that drove repeated completions; now a single completion is sent and subsequent tool calls are processed recursively.
* Introduce early‑abort checks and guard against missing provider before proceeding.
* Add `ReasoningProcessor` import and use it consistently for streaming reasoning chunks.
* Add `ToolCallEntry` type and a global `toolStepCounter` to track and cap total tool steps (default 20) to prevent infinite loops.
* Extend `postMessageProcessing` signature to accept thread, provider, tools, UI update callback, and max tool steps.
* Update UI‑update logic to use a single `updateStreamingUI` callback and ensure RAF scheduling is cleaned up reliably.
* Refactor token‑speed / progress handling, improve error handling for out‑of‑context situations, and tidy up code formatting.
* Minor clean‑ups: const‑ify `availableTools`, remove unused variables, improve readability.
2025-10-29 20:51:54 +05:30
Vanalite
22be93807d
Merge remote-tracking branch 'origin/dev' into feat/proactive_mode
2025-10-28 17:56:47 +07:00
Vanalite
2fa153ac34
fix: Remove unused Proactive icon on chatInput
...
This icon doesn't do anything on chatInput but just an indicator when the proactive capability is activated. Safely remove since this can be indicated from the model dropdown
2025-10-28 17:04:31 +07:00
Dinh Long Nguyen
62bd91a1e1
fix: model should not include file attachment tools if not supported ( #6833 )
2025-10-28 16:58:18 +07:00
Vanalite
e9f469b623
feat: Proactively take screenshot and snapshot for every browser tool call
2025-10-28 11:48:55 +07:00
Akarshan Biswas
2561fcd78a
feat: support multimodal tool results and improve tool message handling ( #6816 )
...
* feat: support multimodal tool results and improve tool message handling
- Added a temporary `ToolResult` type that mirrors the structure returned by tools (text, image data, URLs, errors).
- Implemented `convertToolPartToApiContentPart` to translate each tool output part into the format expected by the OpenAI chat completion API.
- Updated `CompletionMessagesBuilder.addToolMessage` to accept a full `ToolResult` instead of a plain string and to:
- Detect multimodal content (base64 images, image URLs) and build a structured `content` array.
- Properly handle plain‑text results, tool execution errors, and unexpected formats with sensible fallbacks.
- Cast the final content to `any` for the `tool` role as required by the API.
- Modified `postMessageProcessing` to pass the raw tool result (`result as any`) to `addToolMessage`, avoiding premature extraction of only the first text part.
- Refactored several formatting and type‑annotation sections:
- Added multiline guard for empty user messages to insert a placeholder.
- Split the image URL construction into a clearer multiline object.
- Adjusted method signatures and added minor line‑breaks for readability.
- Included extensive comments explaining the new logic and edge‑case handling.
These changes enable the chat system to handle richer tool outputs (e.g., images, mixed content) and provide more robust error handling.
* Satisfy ts linter
* Make ts linter happy x2
* chore: update test message creation
---------
Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-10-24 20:15:15 +05:30
Dinh Long Nguyen
fc784620e0
fix tests
2025-10-09 04:28:08 +07:00
Dinh Long Nguyen
340042682a
ui ux enhancement
2025-10-09 03:48:51 +07:00
Dinh Long Nguyen
510c4a5188
working attachments
2025-10-08 16:08:40 +07:00
Dinh Long Nguyen
df61546942
feat: web remote conversation ( #6554 )
...
* feat: implement conversation endpoint
* use conversation aware endpoint
* fetch message correctly
* preserve first message
* fix logout
* fix broadcast issue locally + auth not refreshing profile on other tabs+ clean up and sync messages
* add is dev tag
2025-09-23 15:09:45 +07:00
Louis
568ee857d5
fix: custom fetch for all providers ( #6538 )
...
* fix: custom fetch for all providers
* fix: run in development should use built-in fetch
2025-09-23 09:55:36 +07:00
Dinh Long Nguyen
0771b998a5
Fix: Web Services Improvement
...
Fix: Web Services Improvement
2025-09-15 09:08:30 +07:00
Dinh Long Nguyen
db52057030
fix ollama error ( #6418 )
2025-09-11 18:38:06 +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
Faisal Amir
5481ee9e35
Merge pull request #6134 from menloresearch/feat/attachment-ui
...
feat: attachment UI
2025-08-20 10:04:32 +07:00
Louis
91f05b8f32
feat: add tool call cancellation
2025-08-19 23:27:12 +07:00
Faisal Amir
f70449fd98
chore: remove pdf attachement
2025-08-19 19:51:02 +07:00
Faisal Amir
cef3e122ff
chore: send attachment file when send message
2025-08-19 19:51:01 +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
Louis
c550f6cf0d
Merge pull request #5809 from menloresearch/refactor/simplify-proxy-settings
...
refactor: simplify proxy settings by removing unused SSL verification options
2025-07-19 16:34:37 +07:00
Louis
6e0218c084
Merge branch 'release/v0.7.0' into feat/inference-llamacpp-extension
...
# Conflicts:
# .devcontainer/buildAppImage.sh
# .github/workflows/template-tauri-build-linux-x64.yml
# Makefile
# core/src/node/extension/index.test.ts
# package.json
# src-tauri/tauri.conf.json
# web-app/package.json
2025-07-10 15:36:41 +07:00
Zhiqiang ZHOU
9ff3cbe63f
Merge remote-tracking branch 'upstream/dev' into feat/identify-jan-on-openrouter
2025-07-06 11:54:46 -07:00
Louis
ae58c427a5
fix: tool call params
2025-07-02 12:28:25 +07:00
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
Akarshan Biswas
a7a2dcc8d8
refactor load/unload again; move types to core and refactor AIEngine abstract class
2025-07-02 12:27:09 +07:00
Sam Hoang Van
0890de1869
feat: improve local provider connectivity with CORS bypass ( #5458 )
...
* feat: improve local provider connectivity with CORS bypass
- Add @tauri-apps/plugin-http dependency
- Implement dual fetch strategy for local vs remote providers
- Auto-detect local providers (localhost, Ollama:11434, LM Studio:1234)
- Make API key optional for local providers
- Add comprehensive test coverage for provider fetching
refactor: simplify fetchModelsFromProvider by removing preflight check logic
* feat: extend config options to include custom fetch function for CORS handling
* feat: conditionally use Tauri's fetch for openai-compatible providers to handle CORS
2025-06-25 15:42:14 +07:00
Zhiqiang ZHOU
aa7775225a
chore: change how headers affect
...
Signed-off-by: Zhiqiang ZHOU <im@strrl.dev>
2025-06-20 12:39:18 -07:00
Louis
035cc0f79c
Sync Release/v0.6.0 into dev ( #5293 )
...
* chore: enable shortcut zoom (#5261 )
* chore: enable shortcut zoom
* chore: update shortcut setting
* fix: thinking block (#5263 )
* Merge pull request #5262 from menloresearch/chore/sync-new-hub-data
chore: sync new hub data
* ✨ 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>
* fix: glitch download from onboarding (#5269 )
* ✨ enhancement: Model sources should not be hard coded from frontend (#5270 )
* 🐛 fix: default onboarding model should use recommended quantizations (#5273 )
* 🐛 fix: default onboarding model should use recommended quantizations
* ✨ enhancement: show context shift option in provider settings
* 🔧 chore: wording
* 🔧 config: add to gitignore
* 🐛 fix: Jan-nano repo name changed (#5274 )
* 🚧 wip: disable showSpeedToken in ChatInput
* 🐛 fix: commented out the wrong import
* fix: masking value MCP env field (#5276 )
* ✨ feat: add token speed to each message that persist
* ♻️ refactor: to follow prettier convention
* 🐛 fix: exclude deleted field
* 🧹 clean: all the missed console.log
* ✨ enhancement: out of context troubleshooting (#5275 )
* ✨ enhancement: out of context troubleshooting
* 🔧 refactor: clean up
* ✨ enhancement: add setting chat width container (#5289 )
* ✨ enhancement: add setting conversation width
* ✨ enahncement: cleanup log and change improve accesibility
* ✨ enahcement: move const beta version
* 🐛 fix: optional additional_information gpu (#5291 )
* 🐛 fix: showing release notes for beta and prod (#5292 )
* 🐛 fix: showing release notes for beta and prod
* ♻️ refactor: make an utils env
* ♻️ refactor: hide MCP for production
* ♻️ refactor: simplify the boolean expression fetch release note
---------
Co-authored-by: Faisal Amir <urmauur@gmail.com>
Co-authored-by: LazyYuuki <huy2840@gmail.com>
Co-authored-by: Bui Quang Huy <34532913+LazyYuuki@users.noreply.github.com>
2025-06-16 17:27:42 +07: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
Louis
50b83d7342
fix: could not add custom models ( #5241 )
...
* fix: could not add custom models
* Update web-app/src/lib/completion.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* chore: remove hard coded ID string
* fix: revert suggestion change
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-11 17:04:00 +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
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
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
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
Louis
6676e0ced8
chore: add relocate jan data folder function to new FE ( #5043 )
...
* chore: typo
* fix: linter issues
* chore: fix linter
* chore: fix linter
* chore: add relocate data folder
2025-05-21 10:48:10 +07:00
Louis
f6433544af
feat: handle stop streaming message, scroll to bottom and model loads ( #5023 )
2025-05-19 23:32:55 +07:00
Louis
2ae7417e10
feat: add MCP server connection status ( #5018 )
2025-05-19 15:17:19 +07:00
vansangpfiev
90da49f873
chore: add some ts-ignore to make tauri build works ( #5010 )
...
* chore: add some ts-ignore to make build works
* chore: remove tauri build nightly script
* chore: update core package.json
* chore: fix build
* chore: add devtools for tauri beta, nightly
* chore: change transport-sse to transport-sse-server
* chore: comment out dll files
* chore: add ts-ignore
* chore: update nightly CI
2025-05-19 14:49:03 +07:00
Louis
c1091ce812
feat: new frontend with model download function ( #5008 )
2025-05-18 20:00:17 +07:00
Louis
95f90f601d
feat: tool use
2025-05-16 22:10:27 +07:00
Faisal Amir
852ea84cd8
epic: Jan with new UI/UX ( #4964 )
...
* chore: initial new FE setup
* chore: update namespace text-left-panel foreground variable
* chore: enable dynamic mainview color
* chore: remove greetings new chat
* chore: fix chat input style
* chore: simplify hook useAppearance
* chore: enable internationalization
* chore: prepare vn locale
* chore: keyboardshortcut layout
* chore: update keyboard shortcut exclude pathname
* chore: update state active setting route
* chore: fix update theme by system
* chore: handle dynamic primary color
* chore: fix left panel navigation active state and styled item privacy analytic
* chore: reorder general setting being a first
* chore: add function reset appearance
* chore: update scrollbar
* chore: update delete thread with dialog confirmation
* chore: update state dialog inside dropdown menu
* chore: wip thread detail or chat page
* chore: wip model dropdown
* chore: prepare model dropdown select
* chore: update model providers setting
* chore: show provider on model dropdown based isActive toogle
* chore: update layout model provider
* chore: update state active on storage
* chore: update gap of item dropdown model
* chore: update select model base on id
* chore: update edit model capabilities
* chore: add dialog to add model
* chore: update sheet for model setting
* chore: add sheet setting each model
* chore: make dynamic syntax highlight
* chore: fix menu setting appearance theme
* chore: markdown render support emoji
* chore: markdown support latex
* chore: change codeblock default theme
* chore: update ui codeblock
* chore: custom render link taget new window
* chore: fix copy button codeblock
* chore: update accent and desctructive color
* chore: setup user chat message
* chore: prepare some page settings
* chore: simple list extension and prepare mcp, local api, and hardware
* chore: mcp-serve
* chore: MCP server UI
* chore: update local api server config
* chore: adjust chat input
* chore: update local api server log
* chore: prepare hub page
* chore: remove help page
* chore: update mock
* chore: prepare http proxy setting UI
* chore: adjust local api server and title every action
* fix: chore FE package (#4962 )
* fix: update command which referred to non-existent web app
* fix: added commented out macos platform for now
* fix: remove the platform name as macos
* fix: remove unnecessary line for platform name in HeaderPage component
* fix: update dev script to specify port 3000 for Vite
* feat: model providers and chat completion
* enhancement: threads performance
* fix: thread content update
* chore: clean up threads
* fix: performance issue with streaming and state loop
* fix: streaming
* fix: react markdow
* feat: extension manager
* chore: add nodePolyfills include path
* chore: improve performance avoid unhandle rejection
* chore: update pre margin bottom
* chore: swith thread should be deafult scroll to bottom
* chore: wip scroll to bottom
* chore: add model loader
* chore: add platform utils
* feat: threads functionality
* chore: setup toaster
* chore: persist threads deletion
* fix: create thread with new message
* chore: create new thread should change route path
* chore: navigate after delet dialog thread
* chore: thread favorites and orders
* chore: dismiss deleting modal on delete
* chore: remove undefined properties
* chore: remove deprecated run step
* chore: fix delete thread
* chore: create empty thread content on started streaming
* chore: correct messages store key
* chore: stuck at generating state
* chore: preapre chat toolbar
* chore: introduce in-memory app state
* chore: update extensions migration logic
* chore: remove redundant extensions migration gate
* chore: message toolbar user and assistant
* chore: add logo gemini
* feat: remote providers with model capabilities
* chore: maintain provider settings
* chore: move speed token into chat input
* chore: temp harcoded model loader
* chore: make chat text selectable and truncate model list
* chore: update shortcut UI
* Feat/implement threads (#4977 )
* chore: add fuse.js library for enhanced search functionality
* feat: implement thread filtering with Fuse.js for improved search capabilities
* fix: update the fuseOptions
* feat: add search functionality to LeftPanel and refactor thread retrieval logic
* refactor: optimize thread filtering and improve search functionality in LeftPanel
* fix: more edits
* refactor: remove duplicate import of useAppState in StreamingContent component
* chore: update navigate after delete all thread
* chore: pass prop speedToken from new chat input
* chore: persist provider general settings
* chore: styling search left panel
* chore: cleanup margin
* chore: update size icon
* chore: improve chat input
* chore: imprve list markdown
* chore: animate border
* feat: local model provider work
* chore: persist manually added model
* chore: prepare download management ui and show version on general setting
* chore: improve pre tag
* chore: remove buton install extension and improve light theme download
* chore: add missing hardware information handler
* chore: cleanup small ui
* chore: update default provider settings
* fix: missing fs commands
* chore: correct provider models
* chore: prepare delete model
* chore: handle thinking block
* chore: fix conditional message toolbar
* chore: pophover download select none
* enhancement: add prune mode
* chore: model settings
* chore: bump engine version tauri
* chore: update style thinking
* chore: add indicator and toogle mcp server
* chore: wip hub
* chore: update model settings
* chore: mvp hub
* chore: add function rename title
* chore: update function delete message
* chore: update rename title
* chore: update model settings
* chore: persist MCP configs
* refactor: clean up utils
* chore: add tools to completion request
* chore: clean up
* chore: ignore assets
---------
Co-authored-by: Ivan Leo <ivanleomk@gmail.com>
Co-authored-by: Louis <louis@jan.ai>
2025-05-15 19:38:59 +07:00