Commit Graph

9396 Commits

Author SHA1 Message Date
Innei
110f27f2ac ♻️ refactor: merge beta settings into advanced tab (#12962)
* ♻️ refactor: merge beta settings into advanced tab

- Remove dedicated beta settings tab (desktop only)
- Integrate update channel selection into advanced settings
- Rename i18n keys from tab.beta.* to tab.advanced.updateChannel.*
- Mark SettingsTabs.Beta as deprecated
- Clean up unused FlaskConical icon import
- Update all 18 locale files with migrated keys

* 🔥 chore: remove deprecated SettingsTabs.Beta enum value

* 🔀 refactor: redirect deprecated /settings/beta to /settings/advanced

* 🔥 chore: remove unnecessary beta redirect from REDIRECT_MAP

* 🐛 fix: resolve lint errors and update outdated User panel tests

---------

Co-authored-by: Arvin Xu <arvinx@foxmail.com>
2026-03-13 20:29:07 +08:00
LobeHub Bot
e4d960376c test: add unit tests for search impls (brave, exa, tavily) (#12960)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 19:43:31 +08:00
lobehubbot
7d2f88f384 Merge remote-tracking branch 'origin/main' into canary 2026-03-13 10:45:42 +00:00
Rdmclin2
3712d75bf8 🚀 release: 20260313 (#12956)
This release includes **~400 commits**. Key updates are below.

### New Features and Enhancements

- **Bot Platform Integration**: Added abstract bot platform layer with
**QQ Bot**, **Telegram Bot**, **Lark/Feishu Bot**, and **Discord Bot**
integrations, including remote device support for IM integration.
- **LobeHub CLI**: Full CLI implementation across 5 phases — agent
run/status, generate (text/image/video/TTS/ASR), doc, search, device,
bot integration, cron, topic share, agent KB/file/pin, thread, and eval
commands.
- **Agent Skills**: Added built-in skills management, skill store, agent
browser automation skill, and tool detection.
- **Video Generation**: End-to-end video generation feature with free
quota, webhook handling, and skeleton loading.
- **Agent Benchmark**: Added benchmark support with external scoring
mode and dedicated DB schema.
- **Memory Settings**: Support for memory effort/tool permission
configuration, user persona injection, and improved memory analysis.
- **Batch Topic Deletion** from file support.
- **Runtime Config** support for flexible deployment configuration.
- **V1 API** and **Response API** support (including OpenAI Responses
API).
- **Device Code Auth Flow** for CLI authentication.
- **Emoji Reactions** for messages.
- **Starter Suggested Questions** and recommend agents.
- **Page Tabs** for Electron desktop.
- **Sort Topics by Updated Time** option.
- **Change Email Address** in profile settings.
- **Model Detail Dropdown** in model switch panel.
- Added **unread completion indicator** for agents and topics.

### Models and Provider Expansion

- New providers: **Straico**, **LongCat (美团)**.
- Added/updated model support:
  - **GPT-5.4** series
  - **Claude Sonnet 4.6** and **Claude Opus 4.6** (including Bedrock)
  - **Gemini 3.1 Pro Preview** and **Gemini 3.1 Flash Lite Preview**
  - **Qwen3.5** series (including Flash, OSS, and SiliconCloud models)
  - **Grok 4.20** series and **Grok Imagine** image generation
  - **Kimi K2.5** thinking models
  - **MiniMax 2.5** / **MiniMax M2.5**
  - **Nano Banana 2**
  - **Seedream 5 Lite** / **Seedance 2.0**
  - **NVIDIA** new models
  - **GLM-5**, **GLM-4.6V**, **GLM-Image** for Zhipu
  - Additional Qwen image-to-image and text-to-image models
- Added video input support for SiliconCloud provider.
- Use Response API for Grok as default.

### Desktop Improvements

- Integrated `electron-liquid-glass` for macOS Tahoe.
- Unified canary with stable app name/icon, added channel tag in About.
- Support clearing hotkey bindings in ShortcutManager.
- Subscription pages embedding with webview.
- Enhanced desktop menu and navigation system.
- Proactive token refresh on app startup and activation.
- DMG background image configuration.
- S3 publish for canary/nightly with cleanup.
- Unified update channel switching with S3 distribution.

### Architecture and Infrastructure

- **Vite SPA Migration**: Migrated frontend from Next.js App Router to
Vite SPA, restructured SPA routes to `src/routes` and `src/router`.
- **Response API Support** across agent runtime.
- Refactored client agent runtime and centralized tool availability
checks.
- Added Redis pipeline support and Lua script execution.
- Database migrations: `pg_search` extension, video generation schema,
agent skills schema, benchmark schema, topics description column, API
key hash column, ID migration to nanoid.
- Preload bundled i18n resources with lazy-load for target language.
- Simplified build config, removed webpack customization, and resolved
Vercel OOM.
- Class-based Zustand actions with `flattenActions` migration.
- Extracted `@lobechat/local-file-shell` shared package.
- Resolved all ESLint suppressions and enabled `consistent-type-imports`
rule.

### Stability, Security, and UX Fixes

- Fixed model provider popup problems and ModelSelect crash.
- Fixed tool engine, input-loading, and MCP tool install loading issues.
- Hardened Anthropic message building and sampling parameter handling.
- Fixed Vertex AI 400 error from duplicate tool function declarations.
- Fixed context window exceeded error detection from message text.
- Added rate limit custom rules for password reset and email
verification.
- Fixed `sanitizeFileName` path traversal risks.
- Fixed multiple Docker build issues (`@napi-rs/canvas`, `librt.so.1`,
`ffmpeg-static`).
- Fixed desktop advanced mode, onboarding redirect, and auth modal
during onboarding.
- Added unsaved changes guard to prevent data loss on navigation.
- Fixed SiliconCloud thinking mode toggle issue.
- Improved Moonshot interleaved thinking and circular dependency.
- Fixed multimodal `content_part` images rendered as base64 text.
- Security: upgraded `next-mdx-remote` to v6 for CVE-2026-0969.

### Credits

Huge thanks to these contributors (alphabetical):

@AmAzing- @AntoineRoux @BrandonStudio @CanisMinor @Coooolfan @eronez
@Hardy @huangkairan @Innei @Kingsword @LiJian @LuisSambrano @MarcellGu
@MikeLambert @Neko @rdmclin2 @Rdmclin2 @RenéWang @RuxiaoYin @RylanCai
@Shinji-Li @Sun13138 @sxjeru @VarunChawla @WangYK @YuTengjing @Zephyr
@ZhijieHe
2026-03-13 18:45:02 +08:00
Innei
7729adcfd4 🐛 fix: support topic share modal inside router (#12951)
🐛 fix(share-modal): support topic share modal
2026-03-13 17:27:46 +08:00
René Wang
a09316a474 feat: Simplify UI (#12961)
* style: Simplify the sidebar

* style: Simplify the sidebar

* style: Simplify the sidebar

* style: Simpliofy the model selct

* style: Simpliofy the model selct

* style: Simpliofy the model selct

* style: Simpliofy the agent profile

* style: Simplify the input bar

* style: Re-organize the settings

* style: Simplify the mode linfo pane

* style: Simplify agent profile

* style: Advanced settings

* style: Advanced settings

* feat: Update translation

* fix: type error

* fix: Add missing translation

* fix: Add missing translation

* fix: Remove Lite mode

* fix: Add model paramters

* style: Remove token tag

* fix: model order

* fix: model order

* fix: Add missing translation

* fix: Add missing translation

* fix: Hide the subtopic button

* fix: User plan badge

* feat: Add settings

* feat: Add cover to the lab

* style: Make the switch vertically centered

* style: Add divider

* feat: Add group by provider

* feat: Move Usage stats

* fix: Subscription badge

* fix: Rebase onto canary

* fix: Rebase onto canary

* fix: Drag to adjust width

* feat: Rebase onto canary

* feat: Regroup settings tab

* feat: Regroup settings tab

* feat: Regroup settings tab

* feat: Regroup settings tab
2026-03-13 16:48:14 +08:00
Arvin Xu
a5cc75c1ed 🐛 fix: lh command issue (#12949)
* fix command issue

* add run command UI

* fix API key

* add apikey page

* add apikey

* 🐛 fix: update apiKey model tests to use new sk-lh- prefix format

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 23:16:11 +08:00
Rdmclin2
11ce1b2f9f 🐛 fix: model provider pop up problems (#12950)
fix: model provider pop up problems
2026-03-12 22:29:04 +08:00
Rdmclin2
afb6d8d3ca feat: bot platform abstract & QQ bot intergration (#12941)
* chore: add bot platform abstract

* chore: refactor platform abstract

* feat: support QQ platform

* docs : add qq channel

* fix: crypto algorithm

* fix: discord metion thread

* fix: discord threadId bypass

* fix: edit messsage throw error

* chore: update memory tool icon

* chore: use lobe channel icon

* chore: update platfom icon color

* fix: lint error
2026-03-12 21:25:15 +08:00
Arvin Xu
04a064aaf3 feat: support batch topic deletion from file (#12931)
Add `--file` option to `lh topic delete` command, allowing users to
pass topic IDs via a file (one per line or JSON array) for bulk deletion.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:56:17 +08:00
Innei
46f9135308 ♻️ refactor(tool): centralize availability checks (#12938)
* ♻️ refactor(tool): centralize availability checks

* 🐛 fix(tool): preserve windows skill fallback

* 🐛 fix(tool): restore stdio engine filtering
2026-03-12 20:17:02 +08:00
lobehubbot
425dd81bcf 🔖 chore(release): release version v2.1.40 [skip ci] v2.1.40 2026-03-12 11:42:06 +00:00
lobehubbot
fd90f83f0f Merge remote-tracking branch 'origin/main' into canary 2026-03-12 11:40:28 +00:00
YuTengjing
3091489695 👷 build: add description column to topics table (#12939) 2026-03-12 19:39:47 +08:00
LiJian
4065dc0565 🐛 fix: improve skill exec script way (#12926)
* fix: add the activatedSkills to improve the execScripte tools

* feat: change the activePath into call market endpoint

* fix: clean the code

* feat: fixed the execScript in desktop ts error
2026-03-12 17:29:59 +08:00
Rdmclin2
3529b46f2c 💄 style: restore foot gap (#12936)
chore: add back padding
2026-03-12 17:17:06 +08:00
Innei
8b29bb7fc9 feat: preload bundled i18n resources and lazy-load target language (#12929)
 feat: preload bundled i18n resources synchronously and reload actual language in background

For non-default languages, preload bundled en-US resources synchronously to avoid
Suspense on first render, then reload the user's actual language from backend
in the background. This ensures instant rendering with fallback text while the
correct translations load asynchronously.
2026-03-12 16:42:03 +08:00
Rdmclin2
804eb57dd8 💄 style: fix skill banner gap and apporve mode icon style (#12930)
* fix: skill banner style and footer runtime config

* fix:  approval mode icon style fix
2026-03-12 15:33:08 +08:00
Arvin Xu
2399f672e2 feat: add lobehub skill (#12922)
* add builtin lobehub skills

* refactor cloud sandbox

* refactor cloud sandbox

* improve styles
2026-03-12 14:00:35 +08:00
Arvin Xu
9c9e8e8ece 🐛 fix: tool engine and input-loading (#12908)
* 🐛 fix: ensure always-on builtin tools and user-selected plugins are enabled in tool engine

- Add alwaysOnToolIds (lobe-tools, lobe-skills) that are always enabled regardless of user selection
- Include user-selected plugins in enableChecker rules for both frontend and server-side tool engines
- Change enableCheckerFactory default from enabled to disabled (tools must be explicitly enabled via rules)

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

* 🐛 fix: improve input loading state to cover sendMessage through AI generation

- Add isInputLoading state that includes sendMessage operation type, so input stays
  in loading state from the moment user sends until AI finishes generating
- Add INPUT_LOADING_OPERATION_TYPES constant (superset of AI_RUNTIME_OPERATION_TYPES + sendMessage)
- Update ChatInput to use isInputLoading instead of isAIGenerating for disable/loading state
- Update stopGenerating to cancel all input-loading operations and restore editor on cancel

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

*  test: fix stopGenerating tests to match updated action implementation

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

* fix agent

* 🐛 fix: add missing selector mocks in toolEngineering tests

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:35:48 +08:00
Zhijie He
2e45e24df3 💄 style: use Response API for Grok as default (#12843)
* sytle: use Response API for Grok

* chore: add unit test for response api only, cleanup xai unit test
2026-03-12 11:22:20 +08:00
Zhijie He
fded8dbb4e 🔨 chore: extend video_url support for OpenAI SDK (#12885)
* style: update moonshot models

* 🔨 chore: extend `video_url` support for OpenAI SDK

* fix: fix ci error

* hotfix: fix sensenova baseUrl error

* fix: fix kimi-k2.5 video tag from LobeHub

* fix: wenxin flag

* chore: cleanup utils

* style: add video tag for `glm-4.1/4.5v`

remove video tag for sensenova due to not support in OpenAI mode
2026-03-12 11:20:48 +08:00
LobeHub Bot
709c9749d0 🌐 chore: translate non-English comments to English in packages/openapi/src (#12873)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Arvin Xu <arvinx@foxmail.com>
2026-03-12 11:19:33 +08:00
sxjeru
c07574af12 🔧 chore: refactor build scripts to prevent Vercel OOM (#12912)
* ♻️ refactor: update build scripts for improved performance and consistency

* 🐛 fix: update build:spa script to use pnpm for improved consistency
2026-03-12 10:39:29 +08:00
Arvin Xu
b4624e6515 🔨 chore: add Response API support (#12918)
* add response api framework

* finish response api structure

* finish response api structure

*  feat: implement basic text generation for Response API (LOBE-5858)

- Add instructions extraction from system/developer input messages
- Add instructions param to ExecAgentParams, append to agent systemRole
- Implement extractPrompt, extractAssistantContent, extractUsage in ResponsesService
- Wire up execAgent + executeSync flow for non-streaming and streaming
- Add logprobs field to output_text content parts for schema compliance
- Fix truncation field to output string enum instead of object

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

*  feat: implement real token-level streaming for Response API (LOBE-5859)

- Replace fake streaming (executeSync → emit events) with real streaming
- Subscribe to InMemoryStreamEventManager for live stream_chunk events
- Run executeSync in background, convert text chunks to output_text.delta SSE events
- Add missing schema fields: item_id on content_part/text events, logprobs on delta/done events
- Fix content_part.added/done to include item_id per OpenResponses spec

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

*  feat: implement tool calling output extraction for Response API (LOBE-5860)

- Add extractOutputItems to convert AgentState messages to OpenResponses output items
- Extract assistant tool_calls → function_call output items
- Extract tool result messages → function_call_output output items
- Skip message items for assistant messages that have tool_calls (avoid duplicates)
- Add status field to function_call_output items per OpenResponses spec
- Update FunctionCallOutputItemSchema with optional status field
- Output array reflects execution order: function_call → function_call_output → message

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

*  feat: implement multi-turn conversations via previous_response_id (LOBE-5861)

Encode topicId in response.id to enable stateless multi-turn conversation
chaining. When previous_response_id is provided, extract topicId and pass
to execAgent via appContext, which automatically loads history messages.

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

* 🐛 fix: add missing type fields for OpenResponses compliance (logprobs, item_id, input_tokens_details)

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:39:08 +08:00
Arvin Xu
f94f1ae08a feat(cli): CLI Phase 5 - agent KB/file/pin, thread, eval and miscellaneous command enhancements (#12920)
*  feat(cli): CLI Phase 5 - agent KB/file/pin, thread management, eval expansion

- Add agent subcommands: pin/unpin, kb-files, add-file/remove-file/toggle-file, add-kb/remove-kb/toggle-kb
- Create thread command with list/list-all/delete subcommands
- Expand eval with internal benchmark/dataset/testcase/irun management
- Move existing external eval commands under `eval ext` namespace
- Add comprehensive unit tests for all new functionality

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

* 💄 style(cli): rename eval `irun` to `run` since external moved to `ext` namespace

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

* ♻️ refactor(cli): merge external eval commands into unified tree with --external flag

Remove separate `eval ext` namespace; use `--external` flag on overlapping commands
(dataset get, run get) and integrate external-only commands directly into the tree.

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

*  feat(cli): CLI Phase 6 - miscellaneous command enhancements

- file: add upload (hash check + create), edit (move to folder), kb-items
- user: new command with info, settings, preferences, update-avatar, update-name
- model: add batch-update, sort order
- plugin: add create (without settings, distinct from install)
- generation: add delete

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:47:16 +08:00
Arvin Xu
165697ce47 feat(cli): CLI Phase 4 - cron, message, topic share, agent-group, session-group (#12915)
*  feat(cli): CLI Phase 4 - cron, message enhance, topic share, agent-group, session-group

Add core commands to complete CLI coverage of TRPC routers:

- `lh cron` — Agent cron job management (list/view/create/edit/delete/toggle/reset/stats)
- `lh message` — Enhanced with create/edit/add-files/word-count/rank-models/delete-by-assistant/delete-by-group
- `lh topic` — Enhanced with clone/share/unshare/share-info/import
- `lh agent-group` — Agent group management (list/view/create/edit/delete/duplicate/add-agents/remove-agents)
- `lh session-group` — Session group management (list/create/edit/delete/sort)

Closes LOBE-5920

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

* update version

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:32:00 +08:00
Rdmclin2
14dd5d09dd feat: support runtime config (#12902)
* feat: support runtime config

* fix: cloud sandbox default tool ids
2026-03-11 23:43:33 +08:00
Innei
21d1f0e472 feat(settings): improve tool detector display layout (#12906)
*  feat(settings): improve tool detector display layout

- Move version to left side with Name, display as Tag
- Right side: two lines (Available status + path), right-aligned
- Unavailable: single line centered
- Add runtime environment detectors (Node, Python, npm)
- Add i18n for system tools settings

Made-with: Cursor

* 🔧 fix(toolDetectors): ensure successful version check for Python runtime

- Update pythonDetector to enforce successful invocation of `--version` for confirming usable runtime.
- Removed redundant version handling logic to streamline the detection process.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-03-11 19:55:36 +08:00
Rdmclin2
bc50db6a8b 🐛 fix: desktop advanced mode (#12911)
* fix: advanced mode empty

* fix: desktop channel router lost
2026-03-11 19:02:37 +08:00
LobeHub Bot
8db8dff7b0 test: add unit tests for MarketService (#12905)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 15:51:25 +08:00
LiJian
1a3c561e21 💄 style: add the history count limit back in agents params settings (#12199)
* fix: add the history count limit back in agents params settings

* fix: fixed the test

* fix: change the default settings snap the enableHistoryCount as false

* fix: change the history process to the first into MessageEngine

* fix: fixed some count limited

* fix: fixed the enableHistoryCount check test

* fix: change the getEnableHistoryCountById logic
2026-03-11 15:46:56 +08:00
Arvin Xu
8e60b9f620 feat(cli): CLI Phase 3 - bot integration, search & device (#12904)
* fix cli alias

* 🐛 fix(cli): fix gen text non-streaming mode and streaming SSE parsing

- Add `responseMode: 'json'` for non-streaming requests to get plain JSON instead of SSE
- Fix streaming SSE parser to handle LobeHub's JSON string format (e.g. `"Hello"`)
- Support both OpenAI and Anthropic response formats in non-streaming mode
- Add E2E tests for all generate commands (text, list, tts, asr, alias)
- Update skills knowledge.md docs with new kb commands

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

*  feat(cli): unify skill install command and add e2e tests

Merge import-github/import-url/import-market into a single `skill install <source>` command with auto-detection (GitHub URL/shorthand, ZIP URL, or marketplace identifier). Add alias `skill i`. Add comprehensive e2e and unit tests for skill commands.

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

* 🔨 chore: fix linter formatting in memory e2e test

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

* 🐛 fix: add vitest-environment node declaration to aiProvider test

Fix server-side env variable access error by declaring node environment.

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

* fix cli review

* fix test

*  feat(cli): add web search and crawl support to search command

Add --web flag for web search via tools TRPC client, and search view
subcommand for viewing results (URLs via crawl, local resources by type:id).

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

*  feat(cli): add device management command with TRPC endpoints

Add `lh device` command for managing connected devices via server-side
TRPC API, complementing the existing `lh connect` (device-as-client).

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

*  feat(cli): add bot integration management command

Add `lh bot` top-level command for managing agent bot integrations
(Discord, Slack, Telegram, Lark/Feishu). Includes list, view, add,
update, remove, enable/disable, and connect subcommands.

Also adds `list` procedure to agentBotProvider TRPC router for
querying all bots with optional agent/platform filters.

Closes LOBE-5900

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:29:15 +08:00
Innei
874c2dd706 🐛 fix(i18n): preload default language from JSON to avoid Suspense on first render (#12895)
* 🐛 fix(i18n): preload default language from JSON to avoid Suspense on first render

- Sync load en-US common/error/chat from locales/en-US/*.json
- Use JSON (not locales/default/*.ts) as runtime values - TS source is type-only
- Prevents useTranslation from suspending, avoids CLS from 44px skeleton fallback

Made-with: Cursor

*  feat(i18n): enable partial loading of languages and add tests for dynamic namespace loading

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-03-11 14:00:39 +08:00
LobeHub Bot
4988413d58 🌐 chore: translate non-English comments to English in src/features/Electron (#12901)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 13:43:39 +08:00
YuTengjing
f1dd2fc458 📝 docs: add catch error logging rule to TypeScript skill (#12903) 2026-03-11 12:10:36 +08:00
Arvin Xu
aa8082d6b2 feat: lobehub cli for better agency agent (#12897)
* fix cli alias

* 🐛 fix(cli): fix gen text non-streaming mode and streaming SSE parsing

- Add `responseMode: 'json'` for non-streaming requests to get plain JSON instead of SSE
- Fix streaming SSE parser to handle LobeHub's JSON string format (e.g. `"Hello"`)
- Support both OpenAI and Anthropic response formats in non-streaming mode
- Add E2E tests for all generate commands (text, list, tts, asr, alias)
- Update skills knowledge.md docs with new kb commands

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

*  feat(cli): unify skill install command and add e2e tests

Merge import-github/import-url/import-market into a single `skill install <source>` command with auto-detection (GitHub URL/shorthand, ZIP URL, or marketplace identifier). Add alias `skill i`. Add comprehensive e2e and unit tests for skill commands.

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

* 🔨 chore: fix linter formatting in memory e2e test

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

* 🐛 fix: add vitest-environment node declaration to aiProvider test

Fix server-side env variable access error by declaring node environment.

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

* fix cli review

* fix test

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:06:52 +08:00
YuTengjing
37cb4983de 🐛 fix: filter out delisted lobehub provider models from DB residuals (#12896) 2026-03-11 10:22:51 +08:00
Innei
9098d0074a ♻️ refactor(desktop): move onboarding state to main process (#12890)
* refactor: desktop onboarding

* ♻️ refactor(desktop): reinstate onboarding guard before auto OIDC

- Add getDesktopOnboardingCompleted/setDesktopOnboardingCompleted back to localStorage
- These functions persist across sign-out, preventing unexpected OIDC popups
- Fix for Codex review feedback on PR #12890

* ♻️ refactor(desktop): use sessionStorage for onboarding completed flag

*  test(desktop): fix BrowserManager test for async initializeBrowsers
2026-03-11 00:36:05 +08:00
Arvin Xu
860e11ab3a ♻️ refactor(cli): extract shared @lobechat/local-file-shell package (#12865)
* ♻️ refactor(cli): extract shared @lobechat/local-file-shell package

Extract common file and shell operations from Desktop and CLI into a
shared package to eliminate ~1500 lines of duplicated code. CLI now
uses @lobechat/file-loaders for rich format support (PDF, DOCX, etc.).

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

* update

* update commands

* update version

* update deps

* refactor version issue

*  feat(local-file-shell): add cwd support, move/rename ops, improve logging

- Add missing `cwd` parameter to `runCommand` (align with Desktop)
- Add `moveLocalFiles` with batch support and detailed error handling
- Add `renameLocalFile` with path validation and traversal prevention
- Add error logging in shell runner's error/completion handlers

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

* support update model and provider in cli

* fix desktop build

* fix

* 🐛 fix: pin fast-xml-parser to 5.4.2 in bun overrides

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 00:04:22 +08:00
YuTengjing
c2e9b45d4c feat: add InsufficientBudget error type and Pro badge i18n (#12886) 2026-03-10 23:43:24 +08:00
YuTengjing
8063378a1d 🐛 fix: resolve ModelSelect crash and update default model (#12892) 2026-03-10 21:10:11 +08:00
Innei
93aed84399 🔨 chore(i18n): sync locale files across desktop and web (#12887)
Made-with: Cursor
2026-03-10 19:23:47 +08:00
LiJian
eec8e113fc ♻️ refactor: add the skills in community pages (#12761)
* feat: add the skills in community pages

* feat: add some skills & import the import routes

* feat: add detail used pages & prompt

* feat: add the skill sort way

* fix: ts fixed

* fix: ts fixed

* fix: test fixed

* fix: test fixed
2026-03-10 18:00:15 +08:00
Sun13138
826a099f8d 🐛 fix: harden market auth popup handoff and storage fallback (#12863)
* 🐛 fix: make market auth popup handoff COOP-safe

* 🐛 fix: harden market auth popup handoff flow

* 🐛 fix: guard market auth handoff storage access
2026-03-10 17:19:22 +08:00
Innei
c087134953 feat(desktop): unify canary with stable app name/icon, add channel tag in About (#12881)
- Use same app name (LobeHub) and icon as stable for canary builds
- Add build channel tag in Settings > About for non-stable channels (Canary, Nightly, Beta)
- Add getBuildChannel IPC to expose build-time channel for display

Made-with: Cursor
2026-03-10 16:41:56 +08:00
Innei
5e468cd850 feat(agent-browser): add browser automation skill and tool detection (#12858)
*  feat(tool-detectors): add browser automation support and refactor tool detector categories

- Introduced browser automation detectors to the tool detector manager.
- Updated tool categories to include 'browser-automation'.
- Refactored imports to use type imports where applicable for better clarity.
- Cleaned up unnecessary comments in tool filters.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore: add browser automation tool detection UI

* 🔧 chore: update react-scan version and enhance agent-browser documentation

- Updated `react-scan` dependency from version 0.4.3 to 0.5.3 in package.json.
- Improved documentation in `content.ts` for the agent-browser, clarifying command usage and workflows.
- Added development mode flag `__DEV__` in sharedRendererConfig for better environment handling.
- Integrated `scan` functionality in `initialize.ts` to enable scanning in development mode.
- Updated global type definitions to include `__DEV__` constant for clarity.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore(builtin-skills): add dependency and refactor skill filtering logic

- Added `@lobechat/const` as a dependency in package.json.
- Introduced a new function `shouldEnableBuiltinSkill` to determine if a skill should be enabled based on the environment.
- Refactored the `builtinSkills` export to filter skills using the new logic.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore(builtin-skills): refactor skill management and add filtering logic

- Removed unnecessary dependency from package.json.
- Simplified skill filtering logic by introducing `filterBuiltinSkills` and `shouldEnableBuiltinSkill` functions.
- Updated various components to utilize the new filtering logic for managing builtin skills based on the environment.

Signed-off-by: Innei <tukon479@gmail.com>

*  feat(builtin-skills): introduce new skill APIs and refactor manifest structure

- Added new APIs for skill management: `runSkillApi`, `readReferenceApi`, and `exportFileApi` to enhance functionality.
- Created a base manifest file (`manifest.base.ts`) to centralize API definitions.
- Updated the desktop manifest (`manifest.desktop.ts`) to utilize the new base APIs.
- Refactored existing manifest to streamline API integration and improve maintainability.
- Introduced a detailed system prompt for better user guidance on skill usage.

Signed-off-by: Innei <tukon479@gmail.com>

*  feat: desktop skill runtime, skill store inspectors, and tool UI updates

Made-with: Cursor

*  feat: enhance skill import functionality and testing

- Updated `importFromUrl` method in `SkillImporter` to accept additional options for identifier and source.
- Modified `importFromMarket` in `agentSkillsRouter` to utilize the new options for better tracking of skill imports.
- Added integration tests to ensure stable behavior when re-importing skills from the market, verifying that identifiers remain consistent across imports.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore: update .gitignore and package.json dependencies

- Added 'bin' to .gitignore to exclude binary files from version control.
- Included 'fflate' as a new dependency in package.json to support file compression in the application.
- Updated writeFile method in LocalFileCtr to handle file content as Uint8Array for improved type safety.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore: update package.json dependencies

- Removed 'fflate' from dependencies and added it to devDependencies for better organization.
- Ensured proper formatting by adding a newline at the end of the file.

Signed-off-by: Innei <tukon479@gmail.com>

*  feat: add agent-browser download script and integrate binary handling

- Introduced a new script to download the `agent-browser` binary, ensuring it is available for the application.
- Updated `electron-builder.mjs` to include the binary in the build process.
- Modified `dir.ts` to define the binary directory path based on the packaging state.
- Enhanced the `App` class to set environment variables for the agent-browser integration.

Signed-off-by: Innei <tukon479@gmail.com>

*  feat: add DevTools toggle to Linux and Windows menus

- Introduced a new menu item for toggling DevTools with the F12 accelerator key in both Linux and Windows menu implementations.
- Added a separator for better organization of the view submenu items.

Signed-off-by: Innei <tukon479@gmail.com>

*  feat: integrate agent-browser binary download into build process

- Added functionality to download the `agent-browser` binary during the build process in `electron-builder.mjs`.
- Enhanced the download script with detailed logging for better visibility of the download status and errors.
- Updated the `App` class to log the binary directory path for improved debugging.
- Reintroduced the `AuthRequiredModal` in the layout for desktop users.

Signed-off-by: Innei <tukon479@gmail.com>

* fix: mock binary directory path in tests

- Added a mock for the binary directory path in the App tests to facilitate testing of the agent-browser integration.
- This change enhances the test environment by providing a consistent path for the binary during test execution.

Signed-off-by: Innei <tukon479@gmail.com>

* 🐛 fix: improve authorization notification handling

- Updated the `notifyAuthorizationRequired` method to implement trailing-edge debounce, ensuring that rapid 401 responses are coalesced and the IPC event is sent after the burst settles.
- Refactored the notification logic to enhance clarity and maintainability.

 feat: add desktop onboarding redirect

- Introduced a `useEffect` hook in `StoreInitialization` to redirect users to the `/desktop-onboarding` page if onboarding is not completed, ensuring a smoother user experience on fresh installs.

Signed-off-by: Innei <tukon479@gmail.com>

* 🐛 fix(desktop): hide Agent Browser skill on Windows

Made-with: Cursor

* 🔧 chore: update memory limits for build processes

- Increased the `NODE_OPTIONS` memory limit for both `build:next` and `build:spa` scripts from 6144 to 7168, optimizing build performance and resource management.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-03-10 16:13:33 +08:00
Arvin Xu
eb7cf10ff9 test: fix GatewayManager tests to include platform parameter (#12876)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:39:00 +08:00
lobehubbot
7d88b8cda5 Merge remote-tracking branch 'origin/main' into canary 2026-03-10 06:35:39 +00:00
YuTengjing
258e9cb982 👷 build: add migration to enable pg_search extension (#12874)
*  feat: add migration to enable pg_search extension

* 🐛 fix: skip pg_search migration for PGlite test compatibility
2026-03-10 14:34:42 +08:00