Compare commits

..

34 Commits

Author SHA1 Message Date
ONLY-yours b2f936d3d2 🐛 fix(agent-builder): use activeAgentId as tool ctx when scope is agent_builder
The AgentBuilder panel runs with `context.agentId = agentBuilderId` (the
built-in agent builder), but the write tools (updateConfig / updatePrompt /
installPlugin) must operate on the agent **being edited**, not on the builder
agent itself.

`ctx.agentId` in `ClientToolExecutionActionImpl` was always taken from
`operation.context.agentId`, which equals `agentBuilderId` in the
`agent_builder` scope. This was harmless before #14774 because the agent
builder ran in chat mode (tools disabled). After #14774 defaulted
`enableAgentMode` to `true`, the tools started executing and mutated the
builder's own config instead of the target agent's, causing the builder to
respond as a "different / strange agent" on subsequent turns.

Fix: when `scope === 'agent_builder'`, override `toolAgentId` with
`chatStore.activeAgentId` (set by `AgentIdSync` to the URL's `:aid` param —
i.e. the agent the user opened the profile page for).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 20:38:51 +08:00
Arvin Xu ba6980ffe9 🐛 fix(minimax): derive max_tokens from context window to avoid ExceededContextWindow (#14814)
* 🐛 fix(minimax): derive max_tokens from context window to avoid ExceededContextWindow

MiniMax API enforces `input_tokens + max_tokens <= context_window`. The
provider was passing the model's full `maxOutput` as `max_tokens`, which
overflowed the context window as soon as a few large tool definitions or
system prompts were attached and made the very first user message fail
with "context window exceeds limit".

Add `resolveSafeMaxTokens` utility that estimates input tokens from the
payload (messages + tools), caps `max_tokens` at
`min(maxOutput, contextWindow - estimatedInput - buffer)`, and throws a
typed `MaxTokensExceededError` when no headroom remains. The MiniMax
provider now wires this into `handlePayload` and surfaces the error as
`ExceededContextWindow` via a `handleError` callback so it short-circuits
before the doomed upstream call.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(minimax): estimate max_tokens against sanitized messages

handlePayload strips signed reasoning (and reasoning-without-content)
from assistant messages before sending to MiniMax, but the previous
resolveSafeMaxTokens call was still measuring the original payload.
For chats with long historical reasoning traces this overcounted the
input — capping max_tokens unnecessarily, or even raising
MaxTokensExceededError when the request would actually fit.

Pass the same processedMessages we send so the estimate matches the
wire payload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 14:47:30 +08:00
Innei 55b4842f00 🐛 fix(chat-input): allow submenu to close on sibling-open and focus-out in ActionDropdown (#14802) 2026-05-15 13:47:26 +08:00
Arvin Xu 6e6970f1b2 🐛 fix(context-engine): account for tool_calls + reasoning + tool defs in compression budget (#14813)
🐛 fix(context-engine): account for tool_calls + reasoning + tool defs in compression budget

The pre-compression token check (`shouldCompress`) only counted `msg.content`,
which under-counted typical agent conversations by ~58% — tool_calls (~33%
of payload), reasoning traces (~17%), and top-level tool definitions (~2%)
were all silently ignored. As a result, conversations that the provider
tokenizer measured at ~656K passed the harness's 524K threshold without
firing compression, and were rejected upstream as ExceededContextWindow.

Verified empirically against 2 op snapshots in the same topic that hit
the failure mode (LOBE-8964): harness counted 267K, deepseek measured
649K — a 380K (58.8%) gap. ~92% of that gap is fixable by accounting
for the missing fields; the remaining ~8% is `tokenx` vs provider
tokenizer drift, compensated by a 1.25× multiplier on the trigger path.

Changes:

- New `@lobechat/context-engine/tokenAccounting` module exporting
  `countContextTokens({messages, tools, options})`. Returns structured
  per-source + per-message + per-tool breakdown — usable both by the
  compression trigger and by UI panels showing "context by type".
- `shouldCompress` in agent-runtime delegates to `countContextTokens`,
  applies the 1.25× drift multiplier on `adjustedTotal` for the trigger
  decision, exposes raw count via `currentTokenCount`. Signature now
  takes `UIChatMessage[]` directly.
- Removed deprecated `calculateMessageTokens` / `estimateTokens` /
  `TokenCountMessage` from agent-runtime — the new module supersedes
  them. `createAgentExecutors.ts` updated to call `countContextTokens`
  directly for post-compression telemetry.
- Added `raw-md` plugin to agent-runtime vitest config (needed once
  context-engine is imported transitively, since the import graph pulls
  in `@lobechat/agent-templates` `.md` files).

What's intentionally NOT counted (DB-only fields not sent to provider):
`plugin`, `pluginState`, `chunksList`, `extra`, `fileList`, etc.
Counting these would over-estimate and trigger compression too early.

Tests:

- 19 new unit tests for `countContextTokens` covering content / tool_calls
  / reasoning / tool_call_id / tool definitions / fast-path / aggregation
  / DB-only field exclusion.
- `tokenCounter.test.ts` updated for new drift semantics + UIChatMessage
  signature; one boundary case now triggers compression (intentional —
  the drift multiplier kicks in at the threshold).

Refs: LOBE-8964 (ECW edge boundary), LOBE-8972 (ECW umbrella),
LOBE-8973 (openrouter `:free` ctx), LOBE-8976 (compression diagnostics).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 13:22:19 +08:00
Arvin Xu da7e18281d feat(builtin-tool): add onBeforeCall / onAfterCall lifecycle hooks (#14719)
*  feat(builtin-tool): add onBeforeCall / onAfterCall lifecycle hooks

Tools that mutate state surfaced in the renderer (e.g. lobe-task) need a
way to invalidate UI caches after their own writes — but when the tool
runs server-side via a registered server runtime, the renderer never sees
the mutation and SWR caches go stale (e.g. delete-all-tasks succeeds on
the server but the kanban keeps showing the deleted rows).

Adds optional `onBeforeCall` / `onAfterCall` to `IBuiltinToolExecutor`,
both taking a single `ToolHookContext` object so the surface stays
non-breaking as we add fields. The gateway event handler dispatches them
on `tool_start` / `tool_end` regardless of whether the tool actually ran
client- or server-side.

`TaskExecutor` implements `onAfterCall` to refresh the task list / detail
SWR caches for write APIs. Also fills the missing `setTaskSchedule`
implementation in the server runtime so cloud-mode users can actually
configure schedules through the agent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 💄 style(tasks): widen empty-tasks hero to 960px

Aligns with the default `CONVERSATION_MIN_WIDTH` used elsewhere; the
720px cap was leaving the recommended-template grid feeling cramped on
wider monitors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(builtin-tool-task): refresh parent task detail after subtask mutation

Deleting a subtask through the agent left the parent's detail view
showing the stale child until a manual page reload — `onAfterCall` was
only invalidating the mutated task's own detail key, never the parent
whose `subtasks[]` array embeds it.

Adopt the same multi-target pattern that `updateTask` already uses in
the detail slice: walk `taskDetailMap` via `findSubtaskParentId` to
locate the embedding parent, and also refresh `activeTaskId`
defensively (covers e.g. `createTask` whose new identifier isn't yet in
the local map but whose parent the user is viewing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(builtin-tool): unwrap nested tool_end payload before dispatching hook

Real gateway `tool_end` events ship `data.payload` as the
`{ parentMessageId, toolCalling }` wrapper (see both publish sites in
`src/server/modules/AgentRuntime/RuntimeExecutors.ts`), but
`dispatchOnAfterCall` was passing that wrapper straight into
`readToolPayload`, which expects `identifier` / `apiName` at the top
level. Result: identity always undefined for server-runtime tool
completions, `onAfterCall` never fires, and the task cache invalidation
from the previous commit was effectively dead code.

Add `unwrapToolPayload` that prefers `payload.toolCalling` when present
and falls back to the flat shape, plus three regression tests covering
the wrapper, flat, and malformed cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ♻️ refactor(builtin-tool-task): colocate executor under client subpath

Aligns with the knowledge-base / lobe-agent precedent: drop the standalone
`./executor` subpath and re-export `taskExecutor` from `./client`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(builtin-tool): lazy-load executor registry to break import cycle

`gatewayEventHandler.ts` statically imported `getExecutor`, which transitively
pulled in tool client barrels (e.g. `@lobechat/builtin-tool-lobe-agent/client`
→ `PlanCard.tsx` → `@/store/chat`). Loading `gateway.ts` in isolation (as
the gateway.test.ts suite does) thus reached the chat-store module while
`gateway.ts` was still mid-evaluation, and the eager `useChatStore()` call
hit `new GatewayActionImpl(...)` before the class binding was initialized.

Dynamic-importing `getExecutor` inside the two async dispatch functions
breaks the cycle at module load; runtime behavior is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:50:00 +08:00
Arvin Xu 7083ab4ef5 🐛 fix(conversation): restore HTML preview for AssistantGroup messages (#14811)
PR #14703 wired @lobehub/ui's `enableHtmlPreview` into the Assistant
useMarkdown but missed the AssistantGroup path, so any full HTML
document the LLM emits in a grouped step rendered as a plain code
block instead of an iframe preview.

Extract the shared markdown wiring (components, plugins, animated,
HtmlPreviewDrawer) into useChatMarkdown so both paths use the same
configuration and the next markdown feature won't drift between them.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:29:21 +08:00
Arvin Xu 3dae46911b ️ perf(agent-tracing): zstd-compress S3 snapshots (#14807)
* ️ perf(agent-tracing): zstd-compress S3 snapshots

Compress operation snapshots with zstd (level 3) before uploading to S3
and write them under a `.json.zst` key. Measured on 76839 production
snapshots: 217 GB → 25.8 GB (8.4× average ratio, p99 47×). New uploads
only; old `.json` objects are left as-is.

The `.zst` suffix is the format indicator; Content-Encoding is
intentionally omitted so the object is served as opaque bytes and
readers decompress explicitly (avoids surprise behavior from HTTP
clients that negotiate zstd).

Uses Node's built-in zstd (node:zlib, available since Node 22.15) so
no new runtime dependency is added.

Reader updates:
- RemoteSnapshotStore.fetch decompresses the downloaded payload;
  local cache stays as plain `.json` for easy inspection.
- buildRemoteUrl now points at `.json.zst`.
- S3SnapshotStore.loadPartial falls back to the legacy `.json` key so
  in-flight QStash operations spanning the deploy keep working; the
  fallback dies off naturally once partials finalize.
- removePartial deletes both keys for clean transition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔒 chore(agent-tracing): gate zstd compression on NODE_ENV=production

Local dev (including ENABLE_AGENT_S3_TRACING=1 for S3 testing) keeps
writing plain `.json` so devs can inspect bucket payloads directly.
Only production deployments (NODE_ENV=production) compress + use the
`.json.zst` suffix.

Readers no longer assume the URL suffix matches the body format —
they sniff the zstd frame magic (0x28b52ffd) and decode accordingly.
This way prod-written `.json.zst` and dev-written `.json` round-trip
through the same code path regardless of which environment reads.

S3SnapshotStore.loadPartial tries the active suffix first then the
sibling format; removePartial cleans up both. RemoteSnapshotStore.fetch
falls back from `.json.zst` to plain `.json` on 404 so dev-uploaded
snapshots stay inspectable from another machine via the CLI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Revert "🔒 chore(agent-tracing): gate zstd compression on NODE_ENV=production"

This reverts commit 70d0b3d857.

*  test(agent-tracing): cover S3SnapshotStore zstd round-trip + legacy fallback

9 vitest cases mocking FileS3:
- save() → key ends in .json.zst, body starts with zstd magic, decompresses to original snapshot
- save() → falls back to "unknown" for missing agentId / topicId
- savePartial() → writes to _partial/ with zstd body
- loadPartial() → decodes .json.zst happy path
- loadPartial() → falls back to legacy .json on miss
- loadPartial() → returns null when neither key exists
- removePartial() → deletes both .json.zst and .json
- removePartial() → swallows individual delete failures (allSettled)
- get/getLatest/list/listPartials → return null/[] (OTEL owns querying)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 11:40:30 +08:00
Arvin Xu 36d0994ec2 🐛 fix(context-engine): attach diagnostic context to PlaceholderVariablesProcessor errors (#14741)
* fix: attach diagnostic context to ProcessorError/PipelineError

* fix: include cause summary in PipelineError message

* fix: pass structured cause to ProcessorError

* fix: enhance PlaceholderVariablesProcessor with diagnostic context

* 🐛 fix: preserve placeholderVariablesProcessed count for no-op messages

processMessagePlaceholdersWithDiagnostics always returns a spread {...message},
so the identity check `processed !== message` was always true and the count
incremented even when content was unchanged (e.g. messages with no placeholders
or only unresolved `{{missing}}` tokens). Restore the JSON-equality comparison
used by the pre-PR `processMessagePlaceholders` path.

Add regression coverage for the no-op cases and for new error paths:
- only-unresolved string content, only-unresolved array text parts, mixed batch
- per-message isolation when a generator throws
- defensive validation when variableGenerators is undefined / null

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 11:26:19 +08:00
Arvin Xu 516c04797d 🐛 fix(hetero-agent): defer fetch-triggering events to avoid parallel tool count rollback (#14806)
🐛 fix(hetero-agent): defer fetch-triggering events through persistQueue to avoid parallel tools[] rollback

When CC fires a large parallel tool batch, the gateway handler's
fetchAndReplaceMessages (triggered synchronously by tool_end) reads a
partial assistant.tools[] while persistToolBatch Phase 1/3 writes are
still queued, and replaceMessages clobbers the in-memory cumulative
tools[] — causing the "7 → 6 次技能调用" rollback users see in the
AssistantGroup count.

Defers tool_end / step_complete:execution_complete / stream_chunk with
toolMessageIds through persistQueue so the handler observes
DB state only after pending writes commit. Text / reasoning / regular
tools_calling forwards stay synchronous to preserve streaming UX.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 09:53:41 +08:00
LobeHub Bot f3cf7f4aed 🤖 style: update i18n (#14449) 2026-05-15 09:34:48 +08:00
Arvin Xu df8111aca0 🐛 fix(build): pin vite to 8.0.12 to avoid rolldown 1.0.1 preload regression (#14804)
Vite 8.0.13 bumps rolldown to 1.0.1, which ships a new
chunk-optimization dedupe pass (rolldown #9305) with an unsound
sibling-dynamic-entry handling — see rolldown #9350 (open). This
causes preload-deps entries (m.f in __vite__mapDeps) to be dropped,
leaving null slots; at runtime any dynamic import that hits the
shrunken table fires import(null) and throws "Failed to resolve
module specifier 'null'", taking down every tRPC call that flows
through src/libs/trpc/client/lambda.ts headers (await import('@/services/_auth')).

Because the repo runs with lockfile=false + resolution-mode=highest,
^8.0.9 silently floats to 8.0.13 on every fresh Vercel build. Pin
exactly to 8.0.12 (which uses rolldown 1.0.0) until rolldown 1.0.2 /
Vite 8.0.14 lands a fix.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 02:20:50 +08:00
Rdmclin2 566b261a12 feat: support bot watch (#14796)
* feat: add whatsAPP and iMessage comming soon

* chore: update i18n

* feat: support watch keyword instruction

* feat: add cli and messager api for bot channels

* fix: test cases

* feat: add system prompt for messenger tool

* feat: add messenger mdx
2026-05-15 00:36:40 +07:00
Innei e00c299d1c 🐛 fix(onboarding): resolve agent route loading stall and branch redirect (#14795)
* 🐛 fix(onboarding): refresh branch config before redirect

* 🐛 fix(onboarding): refresh agent route flag before branch guard

* 🐛 fix(onboarding): simplify agent branch guard

* 🐛 fix(onboarding): eliminate agent route loading stall

- Make AgentModel.getBuiltinAgent idempotent under concurrent callers.
  The web-onboarding builtin agent was inserted by both the bootstrap
  query and the standalone useInitBuiltinAgent SWR in parallel; the
  insert loser hit agents_slug_user_id_unique and SWR sat in its ~5s
  error-retry window before the row could be read.
- Prefetch /onboarding/agent and /onboarding/classic chunks while the
  shared-prefix steps are visible, so the branch redirect no longer
  pays a cold chunk load.

* 🐛 fix(onboarding): skip prefetch under test and complete fixture

- Add `__TEST__` Vite define so renderer code can branch on Vitest runs
  (set true in vitest.config.mts, false in sharedRendererDefine).
- Guard the shared-prefix chunk prefetch with `if (__TEST__) return`.
  Otherwise the fire-and-forget `import('@/routes/onboarding/agent')`
  resolves after the test asserts and tries to load builtin-agents,
  which the test's partial `vi.mock('@lobechat/const')` doesn't supply
  (`DEFAULT_MODEL` missing), surfacing as 25 unhandled rejections.
- Fix `extract.runtime.test.ts` fixture to include the new required
  `agentBenchmarkLoCoMo` field on `MemoryExtractionPrivateConfig`,
  added in 20267fc77c.
2026-05-15 01:19:37 +08:00
Arvin Xu e0d20e86fc feat: support chat mode and redesign chat input action bar (#14774)
* Refine chat parameter controls and working sidebar

* 💄 style: refine chat parameter controls

* 💄 style: refine chat input action affordances

* 💄 style: refine chat input control menus

* 💄 style: refine chat input skills menu

* 🐛 fix: replace skills policy dropdown with popover

* fix: base-ui dropdown

* fix: base-ui dropdown

* 💄 style: fix popover conflict and refine skills menu layout

- Extract PopoverLabel component with controlled open state to prevent
  conflict when skill policy menu opens
- Dispatch custom close event so detail popovers close before policy popover opens
- Add divider between pinned and auto skill groups
- Refine sticky search/footer padding via CSS attribute selectors
- Remove stray console.log from ActionDropdown

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

* 💄 style: refine skills policy menu and chat input UI

- Skills policy menu: change active icon color to blue, add divider +
  uninstall action for Klavis/MCP/agent-skill items, suppress detail
  popover when the "..." policy menu is open
- Minor refinements across ChatInput, Conversation Error/ContentLoading,
  and HeterogeneousAgent StatusGuide components

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat: add custom MCP tag and configure action to skills menu

- Show orange "Custom" tag next to custom MCP plugin entries
- Add Configure action above Uninstall in the policy popover that
  opens the PluginDevModal drawer for editing the custom plugin

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat: default agent mode to true and gate chat mode at the tools engine

- Move `enableAgentMode` from `LobeAgentConfig` to `LobeAgentChatConfig` so it
  persists via the existing `chat_config` jsonb column and is readable on the
  server (the top-level field was silently dropped by drizzle).
- Default to agent mode for all agents — selectors treat `undefined` as `true`;
  only an explicit `false` collapses to chat mode.
- Introduce `chatModeAllowedToolIds = [knowledge-base, memory, web-browsing]`.
  Both `createServerAgentToolsEngine` and the frontend `createAgentToolsEngine`
  now switch on this whitelist in chat mode: skip user plugins, skip
  `alwaysOnToolIds`, narrow `defaultToolIds`, and turn off
  `allowExplicitActivation` so the activator can't smuggle other tools in.
- `useToggleAgentMode` is the single mode-switch entry; `plugins[]` is left
  alone — chat mode is enforced at runtime, not by mutating saved config.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat: extend topic status with running/paused/failed

Widen `ChatTopicStatus` enum (DB schema, types, TRPC validation) to cover the
in-flight lifecycle that gateway and heterogeneous executor runs report. Add a
`updateTopicStatus` store action and have both runtime paths write `running`
on start and `active` on completion (or `failed` on terminal error). Sidebar
topic items render a spinner while `status === 'running'`.

Note: drizzle migration for the widened enum needs to be generated separately.

* 💄 style: polish skills menu — official tag, tooltip on settings button

Add a LobeHub "official" badge to builtin tools and agent skills surfaced in
the Skills menu. Wrap the menu's settings button in a Tooltip. Scope the
group-header padding reset to the skill-activation group only so the
Knowledge submenu keeps its native section padding.

*  feat: mark topic as paused while awaiting human tool approval

Extend the heterogeneous-agent topic status machine (c0170d032f) with a
paused state. The gateway event handler writes topic.status = 'paused' on
step_start { phase: 'human_approval' } — one hook covers both Gateway and
desktop heterogeneous paths since they share the same handler.

Resume back to 'running' is free: approve / reject_continue both spawn a
fresh op via the executor entries, which already persist 'running'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat: gate skills and agent-document injectors at the context engine in chat mode

Thread `enableAgentMode` into `MessagesEngine`. When it is explicitly `false`,
the engine forces `enabled: false` on:
- SkillContextProvider — drops the <available_skills> block
- All AgentDocument injectors (BeforeSystem / SystemAppend / SystemReplace /
  Context / Message) — drops every agent-document position

The frontend (`src/services/chat/mecha/contextEngineering.ts`) and server
(`src/server/modules/AgentRuntime/RuntimeExecutors.ts` →
`serverMessagesEngine`) read `chatConfig.enableAgentMode` from agent config
and pass it through; no caller needs to know which injectors to skip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat: also gate agent-management context in chat mode

`agentManagementContext` (the `<current_agent>` + `<available_agents>` block)
was leaking into chat-mode prompts whenever the agent was in auto-skill mode,
because its caller-side guard (`isInAutoSkillMode || isAgentManagementEnabled`)
is orthogonal to `enableAgentMode`. Fold the gate into the same `isAgentMode`
switch already covering skills + agent documents in `MessagesEngine` so the
injector goes off in chat mode regardless of how the caller populates the
context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix: drop orphan rebase marker in OperationTraceRecorder

Leftover `<<<<<<< HEAD` from an earlier rebase that was only half cleaned —
the HEAD-side content is the one we want; just delete the marker line so the
file type-checks again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 💄 style: cursor-style action bar on home input

Rework the home ChatInput footer to read like Cursor's composer while keeping
the model picker on the right:

- Replace the `agentMode` icon-only button with a pill trigger (icon + label
  + chevron) carrying a persistent fill, dropping a `bottomLeft` mode
  popover. Reuses the `RuntimeConfig/ModeSelector` design in place so any
  other action bar consumer picks it up automatically.
- Introduce a `modelLabel` action that shows the resolved model display name
  + chevron, opening `ModelSwitchPanel`. The original `model` icon stays
  untouched for callers that prefer the compact form.
- Wire the home input to use ['agentMode','plus'] on the left and
  ['modelLabel'] on the right; bump `SendArea` gap to 12 and add
  `paddingLeft={6}` to the action bar so the pill aligns with the input
  placeholder.
- Localize `chatMode.chat` to "对话" in zh-CN (default English stays "Chat").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 💄 style: surface params panel toggle and hide it for heterogeneous agents

- Drop the developer-mode gate on the conversation header params toggle so it
  ships by default; popup routes remain excluded.
- Hide both the header toggle and the right sidebar `Params` tab for
  heterogeneous agents (Claude Code / Codex etc.), since their model params
  panel doesn't apply. The active-tab resolver also falls back away from
  `params` when it isn't available.
- Strengthen the Tools popover divider to `colorFill` so the header /
  footer separators stay visible against the elevated dark-mode surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🚑 fix: address type errors surfaced on the new-input branch

- Move the `border` from the removed `overlayInnerStyle` onto `styles.content`
  so the AgentMode / ModeSelector popovers compile against the base-ui
  `PopoverProps` shape.
- Pass `paddingLeft: 6` through `style` on `ChatInputActions` since the
  underlying Flexbox only accepts `padding` / `paddingBlock` / `paddingInline`.
- Tighten skill / market menu items: drop the unsupported `closeOnClick`
  from the group item, fallback the uninstall display name to
  `identifier`, swap the antd-style `type: 'warning'` confirm option for
  `okButtonProps.danger`, and assert the conditionally-spread market
  items as `ItemType` so the inferred union no longer contains
  `undefined`.
- Annotate `resolveMark` in `LevelSlider` so the fallback branch returns
  a `ReactNode` label, fixing the `MarkObj` mismatch on `LevelOption`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Innei <tukon479@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:07:47 +08:00
YuTengjing b5871d327a 🐛 fix: preserve resume request trigger (#14798) 2026-05-14 23:43:09 +08:00
YuTengjing 875c9b49eb 🐛 fix: reduce task template skeleton CLS (#14788)
* 🐛 fix: reduce task template skeleton CLS

* 🐛 fix: align recommendation skeleton count

* 🐛 fix: derive recommendation skeleton count

*  test: cover recommendation count without rendering

*  test: move recommendation count coverage to const

* ♻️ refactor: simplify task template recommendation count

* ♻️ refactor: remove task template recommendation aliases

* 🐛 fix: use task template count constant in router

* ♻️ refactor: remove task template count max
2026-05-14 23:23:21 +08:00
Innei 1914ae6d43 🐛 fix(desktop): restrict local file previews (#14789)
* 🐛 fix(desktop): restrict local file previews

* 🐛 fix(desktop): close TOCTOU in localfile protocol handler

* 🐛 fix(desktop): guard approveWorkspaceRoots against undefined input

App.test.ts StoreManager mock returned undefined for unknown keys,
causing TypeError when approveWorkspaceRoots tried to call .map().
Added default parameter and updated mock to return defaultValue.

*  test: stabilize ci dependency resolution
2026-05-14 22:08:57 +08:00
YuTengjing ffd66d5465 📝 docs: simplify and refresh skill docs (#14785) 2026-05-14 15:53:05 +08:00
Arvin Xu d00770a956 💄 style: AnalyzeVisualMedia inspector, Portal HTML preview refactor & CE trace dedup (#14777)
*  feat: add AnalyzeVisualMedia inspector, Portal HTML preview refactor, and CE trace dedup

- Add AnalyzeVisualMedia inspector and state types to builtin-tool-lobe-agent
- Refactor Portal HTML renderer to use @lobehub/ui built-in HtmlPreview
- Add portal artifact type selector and portal selectors to distinguish HTML/other artifacts
- Dedup context_engine_result events in OperationTraceRecorder; add resolveCeEvent in viewer
- Update .agents/skills/builtin-tool/references/ui.md with Tool Render design principles
- Bump @lobehub/ui to 5.12.0 for HtmlPreview support

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

* 🧪 test(trace-recorder): add deduplicateCeEvent tests for context_engine_result dedup

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

* 🐛 fix(agent-tracing): wire resolveCeEvent into all CE reader paths

All render functions and CLI inspect paths now call resolveCeEvent(step, allSteps)
instead of reading step.events?.find(...) directly, so deduplicated steps
correctly reconstruct their context_engine_result input/output by walking back
through previous steps.

Affected: renderSystemRole, renderEnvContext, renderPayloadTools, renderPayload,
renderMemory, renderMessageDetail, renderStepDetail, and all --system-role /
--env / --payload-tools / --payload / --memory CLI branches (both text and --json).

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

* ♻️ refactor(conversation): pass onRegenerate through ErrorMessageExtra and fix error guard order

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

* ♻️ refactor(agent-tracing): lift context_engine_result out of events into typed contextEngine field

Replace ad-hoc CE event dedup (mutating input/output inside events[]) with a
dedicated `contextEngine` field on StepSnapshot that uses the same delta pattern
as messagesBaseline/messagesDelta. CE data is structural state, not a streaming
event — keeping it in events[] was a semantic mismatch.

- Add `StepSnapshot.contextEngine?: { input?, output? }` with full delta semantics
- OperationTraceRecorder: extract CE from events before building snapshotEvents,
  store in contextEngine, deduplicate via deduplicateCeSnapshot (no more mutations)
- viewer: add resolveCeSnapshot (reads contextEngine first, falls back to legacy
  events format for old snapshots); deprecate resolveCeEvent alias
- inspect CLI: update all call sites to resolveCeSnapshot
- tests: rewrite deduplicateCeEvent suite → contextEngine dedup suite

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

* 💄 style(loading): use colorTextTertiary for elapsed time display

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:25:54 +08:00
Neko 20267fc77c 🔨 chore(memory-user-memory): add benchmark agent config (#14779) 2026-05-14 14:45:30 +08:00
Neko 4630785870 🔨 chore(memory-user-memory): support source ids in extraction schemas (#14778) 2026-05-14 14:45:09 +08:00
Rdmclin2 5b7611615e 🐛 fix: system bot error (#14784)
* chore: add start link short cut

* chore: update qq zh files

* fix: add messenger block message alert

* chore: update i18n files

* fix: messenger router bridge

* fix: dm thread create problem

* chore: remove lab prefer for messenger

* chore: update i18n files

* fix: e2e test
2026-05-14 13:26:10 +07:00
Arvin Xu ec547a3b57 🐛 fix(topic): restore indent for heterogeneous agent topic rows (#14783)
Remove the dead `return null` branch that skipped icon rendering entirely
for heterogeneous agents (Claude Code, Codex, …).  The early return caused
`NavItem` to omit the 28 px icon `<Center>` container, shifting the title
text leftward and breaking visual alignment with regular topic rows.

The existing `visibility: hidden` style on the HashIcon already preserves
the layout box while hiding the glyph — the null return just prevented it
from ever running.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 12:58:09 +08:00
Innei 36c4be46f0 🐛 fix(desktop): split runtime externals from native deps (#14776) 2026-05-14 01:57:46 +08:00
Neko 7b136a210f 🐛 fix(agent-signal): avoid blocking agent execution (#14775) 2026-05-14 01:53:11 +08:00
Innei 9075d5dfd3 refactor: merge agent marketplace into web onboarding
*  feat(desktop): open-in-app + agent files tab + localfile protocol

Bundle three related desktop features:
- Open-in-app: IPC contract, main-process detector/launcher/icon-extractor,
  renderer service, OpenInAppButton + hook, agent header / portal /
  files-tab integration, user preference (defaultOpenInApp).
- Agent files tab: working sidebar files tab with file tracking, store
  wiring, i18n, reveal-in-tree action in Review/FileItem.
- LocalFile protocol: serve binary images via localfile:// for inline
  preview in the review panel.

* 🐛 fix: add explicit type annotation for ref parameter in Files test

Fix TS7031: Binding element 'ref' implicitly has an 'any' type.
This error was caught by tsgo type-check in CI.

* 🐛 fix: address codex review feedback (P1 reveal retry + P2 WebStorm Windows detection)

* 🐛 fix(open-in-app): avoid process.platform reference in renderer

The Electron renderer sandbox does not expose `process`, so reading
`process.platform` in the useOpenInApp hook crashes with a ReferenceError
on app launch. Use the `window.lobeEnv.platform` value already exposed
via preload contextBridge instead.

* 🐛 fix(conversation): keep assistant runtime errors outside workflow collapse

When an assistant block carries a runtime error, render the error in the
answer segment instead of letting it fold into the workflow collapse with
the surrounding tool calls.

*  feat(portal): add file viewer tab strip and local file protocol improvements

- Add tabbed interface for local file portal viewer
- Extend LocalFileProtocolManager with audio MIME type support
- Add portal actions for file navigation and tab management
- Improve OpenInAppButton and conversation header integration
- Update working sidebar resources section
- Add comprehensive portal action tests

*  feat(agent-sidebar): redesign Review panel and refine Files explorer

- Review: drop antd Collapse, replace with a linear disclosure list
  (hairline dividers, no rounded cards, chevron-left, role=button rows).
  Add motion height/opacity expand animation. Compact row spacing.
  Move hover-revealed copy/reveal/revert into an absolute Flexbox with
  a gradient mask so they overlay the right edge without taking layout.
- Files: extract useGitWorkingTreeFiles hook + tests; surface git
  status entries in the working tree explorer.
- ExplorerTree: share folder icon style; minor type tweak.
- Locales: new chat strings for the above.

* 🐛 fix(test): add missing chatConfigByIdSelectors mock to WorkingSidebar test
2026-05-14 01:45:43 +08:00
YuTengjing 1c429f8d28 feat(chat): add Onboarding request trigger and pass via metadata (#14770)
*  feat(chat): add Onboarding request trigger and pass via metadata

- Add RequestTrigger.Onboarding for onboarding chat requests
- Replace requestTrigger option with metadata.trigger across chat service / executors
- Tag onboarding agent send-message with metadata.trigger = Onboarding
- Persist trigger on message metadata for billing & logs

* 🔨 chore(chat): share request context header constants

* 🐛 fix(chat): preserve trigger on tool resumes

* 🔧 chore(builtin-agents): expose package entry types

*  test(types): preserve request trigger metadata

* 🐛 fix(chat): scope resumed trigger metadata to message chain
2026-05-14 00:32:26 +08:00
Neko ac250b9897 ♻️ refactor(agent-signal,server,app,database,locales): self iteration exits lab (#14769) 2026-05-14 00:04:57 +08:00
Neko e8b7fe14e1 🐛 fix(server,memory-user-memory): embedding token exceeded, should limit and cut off searched memory query (#14757) 2026-05-13 22:32:28 +08:00
Innei 79cf5febed 🐛 fix(kb): preserve files on NoSuchKey and clean orphan documents/tasks (#14501)
* 🐛 fix(kb): preserve files on NoSuchKey and clean orphan documents/tasks

NoSuchKey from object storage no longer cascades into wholesale deletion
of file rows (and their chunks/embeddings). Instead the async chunking
task is marked Error with a clear message so users can re-upload or
retry. Files whose url uses the `internal://` scheme (mirror rows for
inline custom/document) skip storage fetch entirely.

fileModel.delete and deleteMany now also remove (a) mirror documents
where sourceType='file' and fileId matches, and (b) the chunk/embedding
asyncTasks rows tied to the file. Without this, deletion left orphan
documents (still indexed by BM25, still occupying KB slots) and dangling
task rows.

Closes LOBE-8607

* 🐛 fix(kb): delete document storage objects
2026-05-13 22:22:19 +08:00
Innei 4b6b341951 💄 fix(nav-panel): polish SideBarDrawer & header layout details (#14762)
* 💄 fix(nav-panel): polish SideBarDrawer & header layout details

- Use SMALL icon size for close button and settings icon
- Remove unused imports and dead code in SideBarHeaderLayout
- Fix topic item padding in AllTopicsDrawer Content

* 🐛 fix(nav-panel): update ITEM_HEIGHT to match new row height without vertical padding

Address Codex review feedback on PR #14762.
The padding change from padding='4px 8px' to paddingInline={4} removed
the 4px top/bottom padding, reducing row height from ~44px to ~36px.
Update ITEM_HEIGHT estimate from 44 to 36 to keep virtualization
fill logic accurate.
2026-05-13 20:41:03 +08:00
AmAzing- 44892960e0 feat: add Agent Signal marker to receipt descriptions (#14764)
 feat: add agent signal marker to receipt descriptions
2026-05-13 19:19:52 +08:00
Innei dc86f38dc1 🐛 fix(onboarding): hide ModeSwitch in production environment (#14760)
The ModeSwitch component was rendering in production because the cloud
repo sets AGENT_ONBOARDING_ENABLED=true, bypassing the isDev guard
inside the component. Wrap the entire ModeSwitch with isDev so neither
the segmented control nor dev actions appear in prod.
2026-05-13 19:07:39 +08:00
LiJian 3e43683132 🔨 chore(heteroContext): clarify sandbox TTL and add public-repo fork push guide (#14761)
* 🔨 chore(heteroContext): clarify sandbox TTL and add public-repo fork push guide

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

* 🐛 fix(heteroContext): make fork remote setup idempotent

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 17:52:35 +08:00
482 changed files with 20646 additions and 3290 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: add-provider-doc
description: Guide for adding new AI provider documentation. Use when adding documentation for a new AI provider (like OpenAI, Anthropic, etc.), including usage docs, environment variables, Docker config, and image resources. Triggers on provider documentation tasks.
description: Add documentation for a new AI provider — usage docs, env vars, Docker config, image resources.
disable-model-invocation: true
argument-hint: '[provider-name]'
---
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: add-setting-env
description: Guide for adding environment variables to configure user settings. Use when implementing server-side environment variables that control default values for user settings. Triggers on env var configuration or setting default value tasks.
description: Add server-side environment variables that control default values for user settings.
disable-model-invocation: true
argument-hint: '[setting-name]'
---
@@ -18,6 +18,27 @@ The two reference tools to read end-to-end:
---
## Tool Render 设计原则(中文草案)
这些原则用于判断一个 builtin tool 的 Inspector / Render / Placeholder / Streaming / Intervention / Portal 应该做什么,以及做到什么程度。
1. **先保证折叠态可读。** 每个 API 都必须有 Inspector;用户不展开也应该能看懂 “正在做什么 / 对什么做 / 当前结果是什么”。Inspector 不应该只展示函数名和原始参数。
2. **Inspector 是一句话,不是详情页。** 优先表达动作、关键对象、数量、状态,例如 “分析图片 3 张”“搜索 12 个结果”“读取 config.json”。长文本、列表和结构化结果放到 Render 或 Portal。
3. **Inspector 要覆盖执行生命周期。** `args` 还在 streaming、工具执行中、执行完成、执行失败时都应该有稳定展示;必要时同时读取 `args``partialArgs``pluginState`,避免出现空白、跳变或只显示半截参数。
4. **只有结构化结果才需要 Render。** 如果工具结果只是自然语言总结,通常不需要 Render;如果结果包含列表、媒体、文件、表格、代码、diff、地图、时间线、权限请求等结构,就应该提供 Render。
5. **Render 要帮助用户检查结果,而不是复述参数。** Render 的主体应该围绕工具产物组织:可预览、可比较、可筛选、可定位。参数只作为上下文辅助出现,不要把 Render 做成一块更大的 args dump。
6. **参数和结果要一起参与渲染。** 好的 Tool UI 通常同时用 `args` 解释意图,用 `pluginState` 展示真实执行结果;但 `pluginState` 只放结果域数据,不要反向塞入可以从 `args` 推导出的内容。
7. **慢操作要有 Placeholder。** 如果工具通常需要等待网络、文件系统、模型或外部进程,Placeholder 应该先占住最终 Render 的版式,让用户知道即将看到什么,而不是只显示一个泛化 loading。
8. **Streaming 只用于连续产物。** 搜索列表、日志、长文本、文件分析、分阶段计划适合 Streaming;一次性小结果不需要强行做 Streaming。Streaming UI 要能渐进追加,并且完成后自然过渡到最终 Render。
9. **有风险的动作必须 Intervention。** 写文件、删除、发送、安装、执行命令、外部可见操作、权限敏感操作,都应该在执行前给出可理解的确认界面;确认文案要说明影响范围,而不是只问 “是否继续”。
10. **错误、空态和截断都是正式状态。** Render 不能在失败、无结果、超长结果时退化成空白。错误要说明发生在哪一步;空态要告诉用户没有产物;超长内容要明确 “展示前 N 项 / 还有 N 项”。
11. **信息密度要克制。** 默认展示最有判断价值的部分:标题、来源、状态、摘要、少量关键字段。大对象、长列表、原文、调试数据放进可展开区域或 Portal,避免把聊天流撑成后台管理页。
12. **视觉上融入聊天流。** Tool UI 应该使用 `@lobehub/ui` / base-ui、`Flexbox``createStaticStyles``cssVar.*`,遵循现有间距、圆角、颜色、字号;不要为单个工具发明一套独立视觉语言。
13. **Devtools fixture 是验收入口。** 新增或修改 Tool UI 时,应在 `/devtools` 里准备覆盖典型态、loading/streaming、空态、错误态、长内容态的 fixture;一个 API 如果在真实聊天里会出现,就不应该在 devtools 中缺席。
14. **先做用户会看的 UI,再做调试 UI。** Raw JSON、trace、schema、内部 id 可以存在,但应默认收起或放到调试区;主界面先回答用户最关心的问题:工具做了什么,结果值不值得信任,下一步能做什么。
---
## 0. Shared Style Rules
These apply across every surface.
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: cli
description: LobeHub CLI (@lobehub/cli) development guide. Use when working on CLI commands, adding new subcommands, fixing CLI bugs, or understanding CLI architecture. Triggers on CLI development, command implementation, or `lh` command questions.
description: LobeHub CLI (@lobehub/cli) development guide — commands, subcommands, architecture.
disable-model-invocation: true
---
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: desktop
description: Electron desktop development guide. Use when implementing desktop features, IPC handlers, controllers, preload scripts, window management, menu configuration, or Electron-specific functionality. Triggers on desktop app development, Electron IPC, or desktop local tools implementation.
description: Electron desktop development guide IPC handlers, controllers, preload scripts, window/menu management.
disable-model-invocation: true
---
+79 -130
View File
@@ -6,6 +6,10 @@ user-invocable: false
# LobeHub Project Overview
> The directory listings below are a **curated map of key locations**, not an
> exhaustive tree. `packages/`, `src/store/`, route groups etc. grow over time —
> run `ls` against the real directory for the current set.
## Project Description
Open-source, modern-design AI Agent Workspace: **LobeHub** (previously LobeChat).
@@ -14,7 +18,7 @@ Open-source, modern-design AI Agent Workspace: **LobeHub** (previously LobeChat)
- Web desktop/mobile
- Desktop (Electron)
- Mobile app (React Native) - coming soon
- Mobile app (React Native) **separate repo, already launched** (not in this monorepo)
**Logo emoji:** 🤯
@@ -39,147 +43,92 @@ Open-source, modern-design AI Agent Workspace: **LobeHub** (previously LobeChat)
| Database | Neon PostgreSQL + Drizzle ORM |
| Testing | Vitest |
## Complete Project Structure
> Exact versions live in the root `package.json` — check there, not here.
Monorepo using `@lobechat/` namespace for workspace packages.
## Monorepo Layout
This is a monorepo extending the open-source `lobehub` submodule. Two repos:
- **cloud repo root** — `src/` and `packages/business/` (`config`, `const`, `model-runtime`) hold cloud-only SaaS code that overrides/extends the submodule. See `AGENTS.md` for the override mechanism.
- **`lobehub/` submodule** — the open-source product core.
### `lobehub/` submodule — key directories
```
lobehub/
├── apps/
── desktop/ # Electron desktop app
├── docs/
── changelog/
├── development/
│ ├── self-hosting/
│ └── usage/
├── locales/
│ ├── en-US/
── zh-CN/
├── packages/
│ ├── agent-runtime/ # Agent runtime
│ ├── builtin-agents/
│ ├── builtin-tool-*/ # Builtin tool packages
│ ├── business/ # Cloud-only business logic
│ │ ├── config/
│ │ ├── const/
│ │ └── model-runtime/
│ ├── config/
│ ├── const/
── cli/ # LobeHub CLI
├── desktop/ # Electron desktop app
── device-gateway/ # Device gateway service
├── docs/ # changelog, development, self-hosting, usage
├── locales/ # en-US, zh-CN, ...
├── packages/ # ~80 @lobechat/* workspace packages — `ls` for the full set. Key ones:
│ ├── agent-runtime/ # Agent runtime
│ ├── agent-signal/ # Agent Signal pipeline
── builtin-tool-*/ # Builtin tool packages
│ ├── builtin-tools/ # Builtin tool registries
│ ├── context-engine/
│ ├── conversation-flow/
│ ├── database/
│ └── src/
│ │ ├── models/
│ │ ├── schemas/
│ │ └── repositories/
│ ├── desktop-bridge/
│ ├── edge-config/
│ ├── editor-runtime/
│ ├── electron-client-ipc/
│ ├── electron-server-ipc/
│ ├── fetch-sse/
│ ├── file-loaders/
│ ├── memory-user-memory/
│ ├── model-bank/
│ ├── model-runtime/
│ │ └── src/
│ │ ├── core/
│ │ └── providers/
│ ├── observability-otel/
│ ├── prompts/
│ ├── python-interpreter/
│ ├── ssrf-safe-fetch/
│ ├── types/
│ ├── utils/
│ └── web-crawler/
├── src/
│ ├── app/
│ │ ├── (backend)/
│ │ │ ├── api/
│ │ │ ├── f/
│ │ │ ├── market/
│ │ │ ├── middleware/
│ │ │ ├── oidc/
│ │ │ ├── trpc/
│ │ │ └── webapi/
│ │ ├── spa/ # SPA HTML template service
│ │ └── [variants]/
│ │ └── (auth)/ # Auth pages (SSR required)
│ ├── routes/ # SPA page components (Vite)
│ │ ├── (main)/
│ │ ├── (mobile)/
│ │ ├── (desktop)/
│ │ ├── onboarding/
│ │ └── share/
│ ├── spa/ # SPA entry points and router config
│ │ ├── entry.web.tsx
│ │ ├── entry.mobile.tsx
│ │ ├── entry.desktop.tsx
│ │ └── router/
│ ├── business/ # Cloud-only (client/server)
│ │ ├── client/
│ │ ├── locales/
│ │ └── server/
│ ├── components/
│ ├── config/
│ ├── const/
│ ├── envs/
│ ├── features/
│ ├── helpers/
│ ├── hooks/
│ ├── layout/
│ │ ├── AuthProvider/
│ │ └── GlobalProvider/
│ ├── libs/
│ │ ├── better-auth/
│ │ ├── oidc-provider/
│ │ └── trpc/
│ ├── locales/
│ │ └── default/
│ ├── server/
│ │ ├── featureFlags/
│ │ ├── globalConfig/
│ │ ├── modules/
│ │ ├── routers/
│ │ │ ├── async/
│ │ │ ├── lambda/
│ │ │ ├── mobile/
│ │ │ └── tools/
│ │ └── services/
│ ├── services/
│ ├── store/
│ │ ├── agent/
│ │ ├── chat/
│ │ └── user/
│ ├── styles/
│ ├── tools/
│ ├── database/ # src/{models,schemas,repositories}
│ ├── model-bank/ # Model definitions & provider cards
├── model-runtime/ # src/{core,providers}
│ ├── types/
│ └── utils/
└── e2e/ # E2E tests (Cucumber + Playwright)
└── src/
├── app/
│ ├── (backend)/ # api, f, market, middleware, oidc, trpc, webapi
│ ├── spa/ # SPA HTML template service
│ └── [variants]/(auth)/ # Auth pages (SSR required)
├── routes/ # SPA page segments (thin — delegate to features/)
│ └── (main)/ (mobile)/ (desktop)/ (popup)/ onboarding/ share/
├── spa/ # SPA entries + router config
│ ├── entry.{web,mobile,desktop,popup}.tsx
│ └── router/
├── business/ # Open-source stubs (~50) overridden by cloud src/business/
├── features/ # Domain business components
├── store/ # ~28 zustand stores — `ls` for the full set
├── server/ # featureFlags, globalConfig, modules, routers, services
└── ... # components, hooks, layout, libs, locales, services, types, utils
```
### cloud repo — key directories
```
(cloud root)
├── packages/business/ # Cloud overrides: config, const, model-runtime
├── src/
│ ├── business/ # Cloud impls of submodule stubs (client/server/locales)
│ ├── routes/ # Cloud-only route groups: (cloud)/, embed/
│ ├── store/ # Cloud-only stores (e.g. subscription/)
│ ├── server/ # Cloud routers & services (billing, budget, risk control...)
│ └── app/(backend)/cron/ # Vercel cron routes (schedules declared in root vercel.ts)
└── vercel.ts # Cron schedule declarations
```
> File search rule: a path like `@/store/x` resolves cloud `src/store/x` first, then
> `lobehub/packages/store/src/x`, then `lobehub/src/store/x`. Cloud override wins.
## Architecture Map
| Layer | Location |
| ---------------- | --------------------------------------------------- |
| UI Components | `src/components`, `src/features` |
| SPA Pages | `src/routes/` |
| React Router | `src/spa/router/` |
| Global Providers | `src/layout` |
| Zustand Stores | `src/store` |
| Client Services | `src/services/` |
| REST API | `src/app/(backend)/webapi` |
| tRPC Routers | `src/server/routers/{async\|lambda\|mobile\|tools}` |
| Server Services | `src/server/services` (can access DB) |
| Server Modules | `src/server/modules` (no DB access) |
| Feature Flags | `src/server/featureFlags` |
| Global Config | `src/server/globalConfig` |
| DB Schema | `packages/database/src/schemas` |
| DB Model | `packages/database/src/models` |
| DB Repository | `packages/database/src/repositories` |
| Third-party | `src/libs` (analytics, oidc, etc.) |
| Builtin Tools | `src/tools`, `packages/builtin-tool-*` |
| Cloud-only | `src/business/*`, `packages/business/*` |
| Layer | Location |
| ---------------- | ---------------------------------------------------- |
| UI Components | `src/components`, `src/features` |
| SPA Pages | `src/routes/` |
| React Router | `src/spa/router/` |
| Global Providers | `src/layout` |
| Zustand Stores | `src/store` |
| Client Services | `src/services/` |
| REST API | `src/app/(backend)/webapi` |
| tRPC Routers | `src/server/routers/{async\|lambda\|mobile\|tools}` |
| Server Services | `src/server/services` (can access DB) |
| Server Modules | `src/server/modules` (no DB access) |
| Feature Flags | `src/server/featureFlags` |
| Global Config | `src/server/globalConfig` |
| DB Schema | `packages/database/src/schemas` |
| DB Model | `packages/database/src/models` |
| DB Repository | `packages/database/src/repositories` |
| Third-party | `src/libs` (analytics, oidc, etc.) |
| Builtin Tools | `src/tools`, `packages/builtin-tool-*` |
| Cloud-only | `src/business/*`, `packages/business/*` (cloud repo) |
## Data Flow
+70 -70
View File
@@ -1,95 +1,95 @@
---
name: react
description: "LobeHub React/SPA component conventions: antd-style with `createStaticStyles` + `cssVar.*` (prefer zero-runtime over `createStyles` + `token`), `@lobehub/ui/base-ui` primitives before `@lobehub/ui` before antd, `Flexbox`/`Center` for layouts, react-router-dom navigation, and the `.desktop.tsx` sync rule. Use when writing or editing any `.tsx` under `src/**`, picking a styling helper, choosing a component (Select/Modal/Drawer/Button/Tooltip), wiring routes in `desktopRouter.config.tsx`/`.desktop.tsx`, or adding a `Link`/`useNavigate` call in the SPA. Triggers on `createStyles`/`createStaticStyles`, `cssVar`, `@lobehub/ui`, `antd-style`, `Flexbox`, `useNavigate`, `react-router-dom`, `Link`, 'new component', 'add a page', 'edit a layout', 'desktopRouter', 'componentMap.desktop'."
description: 'Use when writing or editing any `.tsx` under `src/**`. Triggers: createStaticStyles, createStyles, cssVar, antd-style, Flexbox, Center, Select, Modal, Drawer, Button, Tooltip, DropdownMenu, Popover, Switch, ScrollArea, Link, useNavigate, react-router-dom, next/link, desktopRouter, componentMap.desktop, .desktop.tsx, new component, new page, edit layout, add styles, zustand selector, @lobehub/ui, antd import.'
user-invocable: false
---
# React Component Writing Guide
- Use antd-style for complex styles; for simple cases, use inline `style` attribute
- **Prefer `createStaticStyles` with `cssVar.*`** (zero-runtime) — module-level, no hook call required
- Only fall back to `createStyles` + `token` when styles genuinely need runtime computation (dynamic props, JS color fns like `readableColor`/`chroma`)
- See `.cursor/docs/createStaticStyles_migration_guide.md` for full pattern
- Use `Flexbox` and `Center` from `@lobehub/ui` for layouts (see `references/layout-kit.md`)
- Component priority: `src/components` > `@lobehub/ui/base-ui` > `@lobehub/ui` > custom implementation
- Always prefer `@lobehub/ui/base-ui` primitives (Select, Modal, DropdownMenu, Popover, Switch, ScrollArea…) over antd equivalents
- Fall back to `@lobehub/ui` higher-level components when base-ui has no match
- Only implement a custom component as a last resort — never reach for antd directly
- Use selectors to access zustand store data
## Styling
## @lobehub/ui Components
| Scenario | Approach |
| ---------------------------------------------------------- | -------------------------------------------------------------- |
| Most cases | `createStaticStyles` + `cssVar.*` (zero-runtime, module-level) |
| Simple one-off | Inline `style` attribute |
| Truly dynamic (JS color fns like `readableColor`/`chroma`) | `createStyles` + `token`**last resort** |
If unsure about component usage, search existing code in this project. Most components extend antd with additional props.
## Component Priority
Reference: `node_modules/@lobehub/ui/es/index.mjs` for all available components.
1. **`src/components`** — project-specific reusable components
2. **`@lobehub/ui/base-ui`** — headless primitives (Select, Modal, DropdownMenu, Popover, Switch, ScrollArea…)
3. **`@lobehub/ui`** — higher-level components (ActionIcon, Markdown, DragPage…)
4. **Custom implementation** — last resort; never reach for antd directly
**Common Components:**
If unsure about available components, search existing code or check `node_modules/@lobehub/ui/es/index.mjs`.
- General: ActionIcon, ActionIconGroup, Block, Button, Icon
- Data Display: Avatar, Collapse, Empty, Highlighter, Markdown, Tag, Tooltip
- Data Entry: CodeEditor, CopyButton, EditableText, Form, FormModal, Input, SearchBar, Select
- Feedback: Alert, Drawer, Modal
- Layout: Center, DraggablePanel, Flexbox, Grid, Header, MaskShadow
- Navigation: Burger, Dropdown, Menu, SideNav, Tabs
### Common @lobehub/ui Components
| Category | Components |
| ------------ | ------------------------------------------------------------------------------- |
| General | ActionIcon, ActionIconGroup, Block, Button, Icon |
| Data Display | Avatar, Collapse, Empty, Highlighter, Markdown, Tag, Tooltip |
| Data Entry | CodeEditor, CopyButton, EditableText, Form, FormModal, Input, SearchBar, Select |
| Feedback | Alert, Drawer, Modal |
| Layout | Center, DraggablePanel, Flexbox, Grid, Header, MaskShadow |
| Navigation | Burger, Dropdown, Menu, SideNav, Tabs |
## Layout
Use `Flexbox` and `Center` from `@lobehub/ui`. See `references/layout-kit.md` for full props and examples.
- Use `gap` instead of `margin` for spacing between flex children
- Use `flex={1}` to fill available space
- Nest Flexbox for complex layouts; set `overflow: 'auto'` for scrollable regions
## Navigation
**For SPA pages, use `react-router-dom`, NOT `next/link`.**
```tsx
// ❌ Wrong
import Link from 'next/link';
// ✅ Correct
import { Link, useNavigate } from 'react-router-dom';
```
Access navigate from stores: `useGlobalStore.getState().navigate?.('/settings');`
## Desktop File Sync Rule
Files with a `.desktop.ts(x)` variant must be edited **in sync**. Drift causes blank pages in Electron.
| Base file (web) | Desktop file (Electron) |
| -------------------------- | ---------------------------------- |
| `desktopRouter.config.tsx` | `desktopRouter.config.desktop.tsx` |
| `componentMap.ts` | `componentMap.desktop.ts` |
**After editing any `.ts`/`.tsx`:** glob for `<filename>.desktop.{ts,tsx}` in the same directory. If found, apply the equivalent sync-import change.
## Routing Architecture
Hybrid routing: Next.js App Router (static pages) + React Router DOM (main SPA).
| Route Type | Use Case | Implementation |
| ------------------ | ---------- | -------------------------------------------------- |
| Next.js App Router | Auth pages | `src/app/[variants]/(auth)/` |
| React Router DOM | Main SPA | `desktopRouter.config.tsx` + `.desktop.tsx` (pair) |
| Route Type | Use Case | Implementation |
| ------------------ | --------------------------------- | ---------------------------------------------------------------------------- |
| Next.js App Router | Auth pages (login, signup, oauth) | `src/app/[variants]/(auth)/` |
| React Router DOM | Main SPA (chat, settings) | `desktopRouter.config.tsx` + `desktopRouter.config.desktop.tsx` (must match) |
### Key Files
- Entry: `src/spa/entry.web.tsx` (web), `src/spa/entry.mobile.tsx`, `src/spa/entry.desktop.tsx`
- Desktop router (pair — **always edit both** when changing routes): `src/spa/router/desktopRouter.config.tsx` (dynamic imports) and `src/spa/router/desktopRouter.config.desktop.tsx` (sync imports). Drift can cause unregistered routes / blank screen.
- Mobile router: `src/spa/router/mobileRouter.config.tsx`
- Router utilities: `src/utils/router.tsx`
### `.desktop.{ts,tsx}` File Sync Rule
**CRITICAL**: Some files have a `.desktop.ts(x)` variant that Electron uses instead of the base file. When editing a base file, **always check** if a `.desktop` counterpart exists and update it in sync. Drift causes blank pages or missing features in Electron.
Known pairs that must stay in sync:
| Base file (web, dynamic imports) | Desktop file (Electron, sync imports) |
| ----------------------------------------------------- | ------------------------------------------------------------- |
| `src/spa/router/desktopRouter.config.tsx` | `src/spa/router/desktopRouter.config.desktop.tsx` |
| `src/routes/(main)/settings/features/componentMap.ts` | `src/routes/(main)/settings/features/componentMap.desktop.ts` |
**How to check**: After editing any `.ts` / `.tsx` file, run `Glob` for `<filename>.desktop.{ts,tsx}` in the same directory. If a match exists, update it with the equivalent sync-import change.
### Router Utilities
Router utilities:
```tsx
import { dynamicElement, redirectElement, ErrorBoundary } from '@/utils/router';
element: dynamicElement(() => import('./chat'), 'Desktop > Chat');
element: redirectElement('/settings/profile');
errorElement: <ErrorBoundary />;
```
### Navigation
## Common Mistakes
**Important**: For SPA pages, use `Link` from `react-router-dom`, NOT `next/link`.
```tsx
// ❌ Wrong
import Link from 'next/link';
<Link href="/">Home</Link>;
// ✅ Correct
import { Link } from 'react-router-dom';
<Link to="/">Home</Link>;
// In components
import { useNavigate } from 'react-router-dom';
const navigate = useNavigate();
navigate('/chat');
// From stores
const navigate = useGlobalStore.getState().navigate;
navigate?.('/settings');
```
| Mistake | Fix |
| ---------------------------------------- | ------------------------------------------------------ |
| Using `next/link` in SPA | Use `react-router-dom` `Link` |
| Using antd directly | Use `@lobehub/ui/base-ui` first, then `@lobehub/ui` |
| `createStyles` for static styles | Use `createStaticStyles` + `cssVar` |
| Editing only `desktopRouter.config.tsx` | Must edit both `.tsx` and `.desktop.tsx` |
| Using `margin` for flex spacing | Use `gap` prop on Flexbox |
| Accessing zustand store without selector | Use selectors to access store data (see zustand skill) |
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: version-release
description: "Version release workflow. Use when the user mentions 'release', 'hotfix', 'version upgrade', 'weekly release', or '发版'/'发布'/'小班车'. This skill is for release process and GitHub Release notes (not docs/changelog page writing)."
description: 'Version release workflow release process and GitHub Release notes (not docs/changelog pages).'
disable-model-invocation: true
argument-hint: '[minor|patch] [version?]'
---
+202
View File
@@ -269,6 +269,204 @@ function registerAllowlistCommand(bot: Command, opts: AllowlistGroupOptions) {
});
}
// ── Watch keywords subcommand factory ──────────────────
interface WatchKeywordEntry {
instruction?: string;
keyword: string;
}
/**
* Normalise `settings.watchKeywords` into the canonical
* `{keyword, instruction?}[]` shape. Mirrors `extractWatchKeywordEntries`
* in `src/server/services/bot/platforms/const.ts` so the CLI accepts the
* same legacy on-disk shapes (`string`, `string[]`, `{keyword, …}[]`)
* the runtime is forgiving about — including the rare comma/whitespace
* separated string from a hand-pasted upgrade.
*/
function normalizeWatchKeywords(raw: unknown): WatchKeywordEntry[] {
const push = (out: Map<string, WatchKeywordEntry>, keyword: unknown, instruction?: unknown) => {
if (typeof keyword !== 'string') return;
const normalised = keyword.trim().toLowerCase();
if (!normalised) return;
const trimmedInstruction =
typeof instruction === 'string' && instruction.trim() ? instruction.trim() : undefined;
const existing = out.get(normalised);
if (!existing) {
out.set(normalised, { instruction: trimmedInstruction, keyword: normalised });
return;
}
if (!existing.instruction && trimmedInstruction) existing.instruction = trimmedInstruction;
};
const collected = new Map<string, WatchKeywordEntry>();
if (typeof raw === 'string') {
for (const piece of raw.split(/[\s,]+/)) push(collected, piece);
} else if (Array.isArray(raw)) {
for (const entry of raw) {
if (typeof entry === 'string') {
push(collected, entry);
continue;
}
if (entry && typeof entry === 'object' && 'keyword' in entry) {
const obj = entry as { instruction?: unknown; keyword?: unknown };
push(collected, obj.keyword, obj.instruction);
}
}
}
return [...collected.values()];
}
/**
* Build a `list / add / remove / clear` subcommand group around
* `settings.watchKeywords`. Shape differs from the user/channel allowlists
* (`{keyword, instruction?}` vs `{id, name?}`), so we duplicate the
* scaffolding instead of squeezing both shapes through one factory — the
* help text, column headers, and `--instruction` flag are all keyword-
* specific and would just bloat the unified version.
*/
function registerWatchKeywordsCommand(bot: Command) {
const group = bot
.command('watch-keywords')
.description(
'Manage watch keywords (non-mention channel triggers; the optional instruction is prepended to the user message before being sent to the AI)',
);
const readEntries = (bot: any): WatchKeywordEntry[] =>
normalizeWatchKeywords((bot.settings as Record<string, unknown> | null)?.watchKeywords);
const buildPayload = (bot: any, nextEntries: WatchKeywordEntry[]) => ({
id: bot.id,
settings: {
...(bot.settings as Record<string, unknown>),
watchKeywords: nextEntries,
},
});
group
.command('list <botId>')
.description('List watch-keyword entries')
.option('--json', 'Output JSON')
.action(async (botId: string, options: { json?: boolean }) => {
const client = await getTrpcClient();
const b = await findBot(client, botId);
const entries = readEntries(b);
if (options.json) {
outputJson(entries);
return;
}
if (entries.length === 0) {
console.log(`${pc.dim('No watch-keyword entries.')}`);
return;
}
printTable(
entries.map((e) => [e.keyword, e.instruction ?? pc.dim('-')]),
['KEYWORD', 'INSTRUCTION'],
);
});
group
.command('add <botId> <keyword>')
.description('Add a watch keyword (with optional instruction prefix)')
.option(
'--instruction <text>',
'Prompt prepended to the user message when this keyword fires (omit for "just wake the bot")',
)
.action(async (botId: string, keyword: string, options: { instruction?: string }) => {
const trimmedKeyword = keyword.trim().toLowerCase();
if (!trimmedKeyword) {
log.error('Keyword cannot be empty.');
process.exit(1);
return;
}
const trimmedInstruction = options.instruction?.trim();
const client = await getTrpcClient();
const b = await findBot(client, botId);
const entries = readEntries(b);
const existing = entries.find((e) => e.keyword === trimmedKeyword);
if (existing) {
// Upsert instruction on duplicate keyword — operators commonly
// re-run `add` to tweak the prompt without remembering to remove first.
if (trimmedInstruction && existing.instruction !== trimmedInstruction) {
existing.instruction = trimmedInstruction;
await client.agentBotProvider.update.mutate(buildPayload(b, entries) as any);
console.log(
`${pc.green('✓')} Updated instruction for ${pc.bold(trimmedKeyword)} (${entries.length} entr${entries.length === 1 ? 'y' : 'ies'})`,
);
return;
}
log.info(`${trimmedKeyword} is already on watchKeywords — nothing to do.`);
return;
}
const next = [
...entries,
trimmedInstruction
? { instruction: trimmedInstruction, keyword: trimmedKeyword }
: { keyword: trimmedKeyword },
];
await client.agentBotProvider.update.mutate(buildPayload(b, next) as any);
console.log(
`${pc.green('✓')} Added ${pc.bold(trimmedKeyword)}${trimmedInstruction ? ' (with instruction)' : ''} to watchKeywords (now ${next.length} entr${next.length === 1 ? 'y' : 'ies'})`,
);
});
group
.command('remove <botId> <keyword>')
.description('Remove a watch keyword')
.action(async (botId: string, keyword: string) => {
const trimmedKeyword = keyword.trim().toLowerCase();
const client = await getTrpcClient();
const b = await findBot(client, botId);
const entries = readEntries(b);
const next = entries.filter((e) => e.keyword !== trimmedKeyword);
if (next.length === entries.length) {
log.info(`${trimmedKeyword} is not on watchKeywords — nothing to do.`);
return;
}
await client.agentBotProvider.update.mutate(buildPayload(b, next) as any);
console.log(
`${pc.green('✓')} Removed ${pc.bold(trimmedKeyword)} from watchKeywords (${next.length} entr${next.length === 1 ? 'y' : 'ies'} left)`,
);
});
group
.command('clear <botId>')
.description('Clear all watch keywords')
.option('--yes', 'Skip confirmation prompt')
.action(async (botId: string, options: { yes?: boolean }) => {
const client = await getTrpcClient();
const b = await findBot(client, botId);
const entries = readEntries(b);
if (entries.length === 0) {
log.info('watchKeywords is already empty — nothing to do.');
return;
}
if (!options.yes) {
const confirmed = await confirm(
`Clear all ${entries.length} watch-keyword entr${entries.length === 1 ? 'y' : 'ies'} from this bot?`,
);
if (!confirmed) {
console.log('Cancelled.');
return;
}
}
await client.agentBotProvider.update.mutate(buildPayload(b, []) as any);
console.log(`${pc.green('✓')} Cleared watchKeywords on bot ${pc.bold(botId)}`);
});
}
// ── Command Registration ─────────────────────────────────
export function registerBotCommand(program: Command) {
@@ -608,6 +806,10 @@ export function registerBotCommand(program: Command) {
name: 'group-allowlist',
});
// ── watch-keywords (LOBE-8891) ────────────────────────
registerWatchKeywordsCommand(bot);
// ── remove ────────────────────────────────────────────
bot
+7
View File
@@ -6,6 +6,10 @@ import { fileURLToPath } from 'node:url';
import dotenv from 'dotenv';
import {
copyExternalRuntimeModulesToSource,
getExternalRuntimeModulesFilesConfig,
} from './external-runtime-deps.config.mjs';
import {
copyNativeModules,
copyNativeModulesToSource,
@@ -106,6 +110,7 @@ const config = {
*/
beforePack: async () => {
await copyNativeModulesToSource();
await copyExternalRuntimeModulesToSource();
console.info('📦 Downloading agent-browser binary...');
execSync('node scripts/download-agent-browser.mjs', { stdio: 'inherit', cwd: __dirname });
@@ -251,6 +256,8 @@ const config = {
'!node_modules',
// Then explicitly include native modules using object form (handles pnpm symlinks)
...getNativeModulesFilesConfig(),
// Include non-native runtime modules that are intentionally externalized from Vite.
...getExternalRuntimeModulesFilesConfig(),
],
generateUpdatesFilesForAllChannels: true,
linux: {
+8 -3
View File
@@ -13,7 +13,8 @@ import {
sharedRendererPlugins,
sharedRollupOutput,
} from '../../plugins/vite/sharedRendererConfig';
import { getExternalDependencies } from './native-deps.config.mjs';
import { externalRuntimeModules } from './external-runtime-deps.config.mjs';
import { getNativeExternalDependencies } from './native-deps.config.mjs';
/**
* Force `base: '/'` in renderer config. The `electron-vite` preset
@@ -99,7 +100,11 @@ const desktopPackageJson = JSON.parse(
readFileSync(path.resolve(__dirname, 'package.json'), 'utf8'),
) as { version: string };
const electronRuntimeExternals = ['electron'];
const mainProcessRuntimeExternals = [...electronRuntimeExternals, 'node-mac-permissions'];
const mainProcessRuntimeExternals = [
...electronRuntimeExternals,
...externalRuntimeModules,
'node-mac-permissions',
];
console.info(`[electron-vite.config.ts] Detected UPDATE_CHANNEL: ${updateChannel}`);
@@ -113,7 +118,7 @@ export default defineConfig({
// bufferutil and utf-8-validate are optional peer deps of ws that may not be installed.
external: [
...mainProcessRuntimeExternals,
...getExternalDependencies(),
...getNativeExternalDependencies(),
'bufferutil',
'utf-8-validate',
],
@@ -0,0 +1,33 @@
import {
copyModulesToSource,
getDependenciesForModules,
getModuleFilesConfig,
} from './module-deps.config.mjs';
/**
* Non-native modules intentionally externalized from the main-process bundle.
*
* These modules are not native dependencies. They stay external because their
* process-level side effects must be owned by one Node runtime module instance.
*/
export const externalRuntimeModules = ['electron-log'];
/**
* Get all dependencies for runtime external modules.
* @returns {string[]}
*/
export function getAllExternalRuntimeDependencies() {
return getDependenciesForModules(externalRuntimeModules);
}
/**
* Generate files config objects for non-native runtime external modules.
* @returns {Array<{from: string, to: string, filter: string[]}>}
*/
export function getExternalRuntimeModulesFilesConfig() {
return getModuleFilesConfig(externalRuntimeModules);
}
export async function copyExternalRuntimeModulesToSource() {
await copyModulesToSource(externalRuntimeModules, 'runtime external module');
}
+189
View File
@@ -0,0 +1,189 @@
/* eslint-disable no-console */
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const sourceNodeModules = path.join(__dirname, 'node_modules');
/**
* Recursively resolve all dependencies of a module.
* @param {string} moduleName - The module to resolve
* @param {Set<string>} visited - Set of already visited modules
* @param {string} nodeModulesPath - Path to node_modules directory
* @returns {Set<string>} Set of all dependencies
*/
function resolveDependencies(moduleName, visited = new Set(), nodeModulesPath = sourceNodeModules) {
if (visited.has(moduleName)) {
return visited;
}
// Always add the module name first. Workspace and optional platform modules
// may not be materialized locally, but they still need stable package rules.
visited.add(moduleName);
const packageJsonPath = path.join(nodeModulesPath, moduleName, 'package.json');
if (!fs.existsSync(packageJsonPath)) {
return visited;
}
try {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const dependencies = packageJson.dependencies || {};
const optionalDependencies = packageJson.optionalDependencies || {};
for (const dep of Object.keys(dependencies)) {
resolveDependencies(dep, visited, nodeModulesPath);
}
for (const dep of Object.keys(optionalDependencies)) {
resolveDependencies(dep, visited, nodeModulesPath);
}
} catch {
// Ignore unreadable package.json files; electron-builder will surface any
// actual missing runtime dependency during packaging or startup.
}
return visited;
}
/**
* Get all transitive dependencies for a set of top-level modules.
* @param {string[]} modules
* @returns {string[]}
*/
export function getDependenciesForModules(modules) {
const allDeps = new Set();
for (const moduleName of modules) {
const deps = resolveDependencies(moduleName);
for (const dep of deps) {
allDeps.add(dep);
}
}
return [...allDeps];
}
/**
* Generate glob patterns for electron-builder files config.
* @param {string[]} modules
* @returns {string[]}
*/
export function getModuleFilesPatterns(modules) {
return getDependenciesForModules(modules).map((dep) => `node_modules/${dep}/**/*`);
}
/**
* Generate object-form electron-builder files config.
* Object form is required because pnpm symlinks are resolved before packaging.
* @param {string[]} modules
* @returns {Array<{from: string, to: string, filter: string[]}>}
*/
export function getModuleFilesConfig(modules) {
return getDependenciesForModules(modules).map((dep) => ({
filter: ['**/*'],
from: `node_modules/${dep}`,
to: `node_modules/${dep}`,
}));
}
/**
* Copy module symlinks in source node_modules to real directories so
* electron-builder can include them via file rules.
* @param {string[]} modules
* @param {string} label
*/
export async function copyModulesToSource(modules, label) {
const deps = getDependenciesForModules(modules);
console.log(`📦 Resolving ${deps.length} ${label} symlinks for packaging...`);
for (const dep of deps) {
const modulePath = path.join(sourceNodeModules, dep);
try {
const stat = await fs.promises.lstat(modulePath);
if (stat.isSymbolicLink()) {
const realPath = await fs.promises.realpath(modulePath);
console.log(` 📎 ${dep} (resolving symlink)`);
await fs.promises.rm(modulePath, { force: true, recursive: true });
await fs.promises.mkdir(path.dirname(modulePath), { recursive: true });
await copyDir(realPath, modulePath);
}
} catch (err) {
console.log(` ⏭️ ${dep} (skipped: ${err.code || err.message})`);
}
}
console.log(`${label} symlinks resolved`);
}
/**
* Copy modules to a destination node_modules directory, resolving symlinks.
* @param {string[]} modules
* @param {string} destNodeModules
* @param {string} label
*/
export async function copyModulesToDirectory(modules, destNodeModules, label) {
const deps = getDependenciesForModules(modules);
console.log(`📦 Copying ${deps.length} ${label} to unpacked directory...`);
for (const dep of deps) {
const sourcePath = path.join(sourceNodeModules, dep);
const destPath = path.join(destNodeModules, dep);
try {
const stat = await fs.promises.lstat(sourcePath);
if (stat.isSymbolicLink()) {
const realPath = await fs.promises.realpath(sourcePath);
console.log(` 📎 ${dep} (symlink -> ${path.relative(sourceNodeModules, realPath)})`);
await fs.promises.mkdir(path.dirname(destPath), { recursive: true });
await copyDir(realPath, destPath);
} else if (stat.isDirectory()) {
console.log(` 📁 ${dep}`);
await fs.promises.mkdir(path.dirname(destPath), { recursive: true });
await copyDir(sourcePath, destPath);
}
} catch (err) {
console.log(` ⏭️ ${dep} (skipped: ${err.code || err.message})`);
}
}
console.log(`${label} copied successfully`);
}
/**
* Recursively copy a directory.
* @param {string} src
* @param {string} dest
*/
async function copyDir(src, dest) {
await fs.promises.mkdir(dest, { recursive: true });
const entries = await fs.promises.readdir(src, { withFileTypes: true });
for (const entry of entries) {
const srcPath = path.join(src, entry.name);
const destPath = path.join(dest, entry.name);
if (entry.isDirectory()) {
await copyDir(srcPath, destPath);
} else if (entry.isSymbolicLink()) {
const realPath = await fs.promises.realpath(srcPath);
const realStat = await fs.promises.stat(realPath);
if (realStat.isDirectory()) {
await copyDir(realPath, destPath);
} else {
await fs.promises.copyFile(realPath, destPath);
}
} else {
await fs.promises.copyFile(srcPath, destPath);
}
}
}
+17 -176
View File
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
/**
* Native dependencies configuration for Electron build
*
@@ -9,12 +8,15 @@
*
* This module automatically resolves the full dependency tree.
*/
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
import {
copyModulesToDirectory,
copyModulesToSource,
getDependenciesForModules,
getModuleFilesConfig,
getModuleFilesPatterns,
} from './module-deps.config.mjs';
/**
* Get the current target platform
@@ -40,78 +42,20 @@ export const nativeModules = [
'node-screenshots',
];
/**
* Recursively resolve all dependencies of a module
* @param {string} moduleName - The module to resolve
* @param {Set<string>} visited - Set of already visited modules (to avoid cycles)
* @param {string} nodeModulesPath - Path to node_modules directory
* @returns {Set<string>} Set of all dependencies
*/
function resolveDependencies(
moduleName,
visited = new Set(),
nodeModulesPath = path.join(__dirname, 'node_modules'),
) {
if (visited.has(moduleName)) {
return visited;
}
// Always add the module name first (important for workspace dependencies
// that may not be in local node_modules but are declared in nativeModules)
visited.add(moduleName);
const packageJsonPath = path.join(nodeModulesPath, moduleName, 'package.json');
// If module doesn't exist locally, still keep it in visited but skip dependency resolution
if (!fs.existsSync(packageJsonPath)) {
return visited;
}
try {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const dependencies = packageJson.dependencies || {};
const optionalDependencies = packageJson.optionalDependencies || {};
// Resolve regular dependencies
for (const dep of Object.keys(dependencies)) {
resolveDependencies(dep, visited, nodeModulesPath);
}
// Also resolve optional dependencies (important for native modules like @napi-rs/canvas
// which have platform-specific binaries in optional deps)
for (const dep of Object.keys(optionalDependencies)) {
resolveDependencies(dep, visited, nodeModulesPath);
}
} catch {
// Ignore errors reading package.json
}
return visited;
}
/**
* Get all dependencies for all native modules (including transitive dependencies)
* @returns {string[]} Array of all dependency names
*/
export function getAllDependencies() {
const allDeps = new Set();
for (const nativeModule of nativeModules) {
const deps = resolveDependencies(nativeModule);
for (const dep of deps) {
allDeps.add(dep);
}
}
return [...allDeps];
export function getAllNativeDependencies() {
return getDependenciesForModules(nativeModules);
}
/**
* Generate glob patterns for electron-builder files config
* @returns {string[]} Array of glob patterns
*/
export function getFilesPatterns() {
return getAllDependencies().map((dep) => `node_modules/${dep}/**/*`);
export function getNativeModuleFilesPatterns() {
return getModuleFilesPatterns(nativeModules);
}
/**
@@ -120,11 +64,7 @@ export function getFilesPatterns() {
* @returns {Array<{from: string, to: string, filter: string[]}>}
*/
export function getNativeModulesFilesConfig() {
return getAllDependencies().map((dep) => ({
filter: ['**/*'],
from: `node_modules/${dep}`,
to: `node_modules/${dep}`,
}));
return getModuleFilesConfig(nativeModules);
}
/**
@@ -132,15 +72,15 @@ export function getNativeModulesFilesConfig() {
* @returns {string[]} Array of glob patterns
*/
export function getAsarUnpackPatterns() {
return getAllDependencies().map((dep) => `node_modules/${dep}/**/*`);
return getNativeModuleFilesPatterns();
}
/**
* Get the list of native dependencies for Vite external config
* @returns {string[]} Array of dependency names
*/
export function getExternalDependencies() {
return getAllDependencies();
export function getNativeExternalDependencies() {
return getAllNativeDependencies();
}
/**
@@ -149,39 +89,7 @@ export function getExternalDependencies() {
* included in the asar archive (electron-builder glob doesn't follow symlinks).
*/
export async function copyNativeModulesToSource() {
const fsPromises = await import('node:fs/promises');
const deps = getAllDependencies();
const sourceNodeModules = path.join(__dirname, 'node_modules');
console.log(`📦 Resolving ${deps.length} native module symlinks for packaging...`);
for (const dep of deps) {
const modulePath = path.join(sourceNodeModules, dep);
try {
const stat = await fsPromises.lstat(modulePath);
if (stat.isSymbolicLink()) {
// Resolve the symlink to get the real path
const realPath = await fsPromises.realpath(modulePath);
console.log(` 📎 ${dep} (resolving symlink)`);
// Remove the symlink
await fsPromises.rm(modulePath, { force: true, recursive: true });
// Create parent directory if needed (for scoped packages like @napi-rs)
await fsPromises.mkdir(path.dirname(modulePath), { recursive: true });
// Copy the actual directory content in place of the symlink
await copyDir(realPath, modulePath);
}
} catch (err) {
// Module might not exist (optional dependency for different platform)
console.log(` ⏭️ ${dep} (skipped: ${err.code || err.message})`);
}
}
console.log(`✅ Native module symlinks resolved`);
await copyModulesToSource(nativeModules, 'native module');
}
/**
@@ -190,72 +98,5 @@ export async function copyNativeModulesToSource() {
* @param {string} destNodeModules - Destination node_modules path
*/
export async function copyNativeModules(destNodeModules) {
const fsPromises = await import('node:fs/promises');
const deps = getAllDependencies();
const sourceNodeModules = path.join(__dirname, 'node_modules');
console.log(`📦 Copying ${deps.length} native modules to unpacked directory...`);
for (const dep of deps) {
const sourcePath = path.join(sourceNodeModules, dep);
const destPath = path.join(destNodeModules, dep);
try {
// Check if source exists (might be a symlink)
const stat = await fsPromises.lstat(sourcePath);
if (stat.isSymbolicLink()) {
// Resolve the symlink to get the real path
const realPath = await fsPromises.realpath(sourcePath);
console.log(` 📎 ${dep} (symlink -> ${path.relative(sourceNodeModules, realPath)})`);
// Create destination directory
await fsPromises.mkdir(path.dirname(destPath), { recursive: true });
// Copy the actual directory content (not the symlink)
await copyDir(realPath, destPath);
} else if (stat.isDirectory()) {
console.log(` 📁 ${dep}`);
await fsPromises.mkdir(path.dirname(destPath), { recursive: true });
await copyDir(sourcePath, destPath);
}
} catch (err) {
// Module might not exist (optional dependency for different platform)
console.log(` ⏭️ ${dep} (skipped: ${err.code || err.message})`);
}
}
console.log(`✅ Native modules copied successfully`);
}
/**
* Recursively copy a directory
* @param {string} src - Source directory
* @param {string} dest - Destination directory
*/
async function copyDir(src, dest) {
const fsPromises = await import('node:fs/promises');
await fsPromises.mkdir(dest, { recursive: true });
const entries = await fsPromises.readdir(src, { withFileTypes: true });
for (const entry of entries) {
const srcPath = path.join(src, entry.name);
const destPath = path.join(dest, entry.name);
if (entry.isDirectory()) {
await copyDir(srcPath, destPath);
} else if (entry.isSymbolicLink()) {
// For symlinks within the module, resolve and copy the actual file
const realPath = await fsPromises.realpath(srcPath);
const realStat = await fsPromises.stat(realPath);
if (realStat.isDirectory()) {
await copyDir(realPath, destPath);
} else {
await fsPromises.copyFile(realPath, destPath);
}
} else {
await fsPromises.copyFile(srcPath, destPath);
}
}
await copyModulesToDirectory(nativeModules, destNodeModules, 'native modules');
}
+2 -2
View File
@@ -44,6 +44,7 @@
"dependencies": {
"@lobehub/fluent-emoji": "^4.1.0",
"@napi-rs/canvas": "^0.1.70",
"electron-log": "^5.4.3",
"get-windows": "^9.3.0",
"node-screenshots": "^0.2.8"
},
@@ -79,7 +80,6 @@
"electron-builder": "^26.8.1",
"electron-devtools-installer": "4.0.0",
"electron-is": "^3.0.0",
"electron-log": "^5.4.3",
"electron-store": "^8.2.0",
"electron-updater": "^6.6.2",
"electron-vite": "6.0.0-beta.1",
@@ -109,7 +109,7 @@
"typescript": "^5.9.3",
"undici": "^7.16.0",
"uuid": "^14.0.0",
"vite": "^8.0.9",
"vite": "8.0.12",
"vitest": "^3.2.4",
"zod": "^3.25.76"
},
+3
View File
@@ -1 +1,4 @@
export const ELECTRON_BE_PROTOCOL_SCHEME = 'lobe-backend';
export const LOCAL_FILE_PROTOCOL_SCHEME = 'localfile';
export const LOCAL_FILE_PROTOCOL_HOST = 'file';
+1
View File
@@ -35,6 +35,7 @@ export const STORE_DEFAULTS: ElectronMainStore = {
gatewayEnabled: true,
gatewayUrl: 'https://device-gateway.lobehub.com',
locale: 'auto',
localFileWorkspaceRoots: [],
networkProxy: defaultProxySettings,
shortcuts: DEFAULT_ELECTRON_DESKTOP_SHORTCUTS,
storagePath: appStorageDir,
@@ -12,6 +12,8 @@ import {
type GrepContentParams,
type GrepContentResult,
type ListLocalFileParams,
type LocalFilePreviewUrlParams,
type LocalFilePreviewUrlResult,
type LocalMoveFilesResultItem,
type LocalReadFileParams,
type LocalReadFileResult,
@@ -370,6 +372,28 @@ export default class LocalFileCtr extends ControllerModule {
};
}
@IpcMethod()
async getLocalFilePreviewUrl({
path: filePath,
workingDirectory,
}: LocalFilePreviewUrlParams): Promise<LocalFilePreviewUrlResult> {
try {
const url = await this.app.localFileProtocolManager.createPreviewUrl({
filePath,
workspaceRoot: workingDirectory,
});
if (!url) {
return { error: 'File is outside the approved workspace', success: false };
}
return { success: true, url };
} catch (error) {
logger.error('Failed to create local file preview URL:', error);
return { error: (error as Error).message, success: false };
}
}
@IpcMethod()
async handlePrepareSkillDirectory({
forceRefresh,
@@ -532,6 +556,7 @@ export default class LocalFileCtr extends ControllerModule {
requestedScope,
root,
});
await this.approveProjectRootForPreview(root);
return {
entries,
@@ -560,6 +585,7 @@ export default class LocalFileCtr extends ControllerModule {
engine: fallback.engine,
requestedScope,
});
await this.approveProjectRootForPreview(requestedScope);
return {
entries,
@@ -641,4 +667,12 @@ export default class LocalFileCtr extends ControllerModule {
logger.debug(`Editing file ${params.file_path}`, { replace_all: params.replace_all });
return editLocalFile(params);
}
private async approveProjectRootForPreview(root: string) {
try {
await this.app.localFileProtocolManager.approveIndexedProjectRoot(root);
} catch (error) {
logger.error(`Failed to approve project preview root ${root}:`, error);
}
}
}
@@ -0,0 +1,43 @@
import type {
DetectAppsResult,
OpenInAppParams,
OpenInAppResult,
} from '@lobechat/electron-client-ipc';
import { getCachedDetection } from '@/modules/openInApp/cache';
import { detectApp } from '@/modules/openInApp/detectors';
import { launchApp } from '@/modules/openInApp/launchers';
import { createLogger } from '@/utils/logger';
import { ControllerModule, IpcMethod } from './index';
const logger = createLogger('controllers:OpenInAppCtr');
export default class OpenInAppCtr extends ControllerModule {
static override readonly groupName = 'openInApp';
@IpcMethod()
async detectApps(): Promise<DetectAppsResult> {
const apps = await getCachedDetection();
return { apps };
}
@IpcMethod()
async openInApp({ appId, path }: OpenInAppParams): Promise<OpenInAppResult> {
// Re-validate installation status before launching: per spec, the main
// process must reject if the app disappeared between probe and launch.
const installed = await detectApp(appId, process.platform);
if (!installed) {
logger.warn(`openInApp: ${appId} reported not installed`);
return { error: `${appId} is not installed`, success: false };
}
const result = await launchApp(appId, path, process.platform);
if (result.success) {
logger.info(`openInApp: launched ${appId} with path ${path}`);
} else {
logger.error(`openInApp: launch failed for ${appId}: ${result.error}`);
}
return result;
}
}
@@ -186,6 +186,19 @@ export default class SystemController extends ControllerModule {
const folderPath = result.filePaths[0];
const repoType = await detectRepoType(folderPath);
try {
const approvedRoot = await this.app.localFileProtocolManager.approveWorkspaceRoot(folderPath);
if (approvedRoot) {
const storedRoots = this.app.storeManager.get('localFileWorkspaceRoots', []);
if (!storedRoots.includes(approvedRoot)) {
this.app.storeManager.set('localFileWorkspaceRoots', [approvedRoot, ...storedRoots]);
}
}
} catch (error) {
logger.error(`Failed to approve local file workspace root ${folderPath}:`, error);
}
return { path: folderPath, repoType };
}
@@ -84,6 +84,12 @@ const mockContentSearchService = {
checkToolAvailable: vi.fn(),
};
const mockLocalFileProtocolManager = {
approveIndexedProjectRoot: vi.fn(),
approveProjectRootFromScope: vi.fn(),
createPreviewUrl: vi.fn(),
};
// Mock makeSureDirExist
vi.mock('@/utils/file-system', () => ({
makeSureDirExist: vi.fn(),
@@ -98,6 +104,7 @@ const mockApp = {
}
return mockSearchService;
}),
localFileProtocolManager: mockLocalFileProtocolManager,
toolDetectorManager: {
getBestTool: vi.fn(() => null), // No external tools available, use Node.js fallback
},
@@ -180,6 +187,42 @@ describe('LocalFileCtr', () => {
// they exercise real fs + file-loaders without fighting the heavy mocks
// this suite needs for execa-driven tools, electron, and the like.
describe('getLocalFilePreviewUrl', () => {
it('should return a main-issued preview URL for an approved workspace file', async () => {
mockLocalFileProtocolManager.createPreviewUrl.mockResolvedValue(
'localfile://file/workspace/app.ts?token=abc',
);
const result = await localFileCtr.getLocalFilePreviewUrl({
path: '/workspace/app.ts',
workingDirectory: '/workspace',
});
expect(mockLocalFileProtocolManager.createPreviewUrl).toHaveBeenCalledWith({
filePath: '/workspace/app.ts',
workspaceRoot: '/workspace',
});
expect(result).toEqual({
success: true,
url: 'localfile://file/workspace/app.ts?token=abc',
});
});
it('should reject preview URL creation outside an approved workspace', async () => {
mockLocalFileProtocolManager.createPreviewUrl.mockResolvedValue(null);
const result = await localFileCtr.getLocalFilePreviewUrl({
path: '/Users/alice/.ssh/id_rsa',
workingDirectory: '/workspace',
});
expect(result).toEqual({
error: 'File is outside the approved workspace',
success: false,
});
});
});
describe('handleWriteFile', () => {
it('should write file successfully', async () => {
vi.mocked(mockFsPromises.mkdir).mockResolvedValue(undefined);
@@ -0,0 +1,147 @@
import type { DetectedApp, OpenInAppResult } from '@lobechat/electron-client-ipc';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { App } from '@/core/App';
import type { IpcContext } from '@/utils/ipc';
import { IpcHandler } from '@/utils/ipc/base';
import OpenInAppCtr from '../OpenInAppCtr';
const { getCachedDetectionMock, detectAppMock, launchAppMock, ipcHandlers, ipcMainHandleMock } =
vi.hoisted(() => {
const handlers = new Map<string, (event: any, ...args: any[]) => any>();
const handle = vi.fn((channel: string, handler: any) => {
handlers.set(channel, handler);
});
return {
detectAppMock: vi.fn(),
getCachedDetectionMock: vi.fn(),
ipcHandlers: handlers,
ipcMainHandleMock: handle,
launchAppMock: vi.fn(),
};
});
const invokeIpc = async <T = any>(
channel: string,
payload?: any,
context?: Partial<IpcContext>,
): Promise<T> => {
const handler = ipcHandlers.get(channel);
if (!handler) throw new Error(`IPC handler for ${channel} not found`);
const fakeEvent = {
sender: context?.sender ?? ({ id: 'test' } as any),
};
if (payload === undefined) {
return handler(fakeEvent);
}
return handler(fakeEvent, payload);
};
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
vi.mock('electron', () => ({
ipcMain: {
handle: ipcMainHandleMock,
},
}));
vi.mock('@/modules/openInApp/cache', () => ({
getCachedDetection: getCachedDetectionMock,
}));
vi.mock('@/modules/openInApp/detectors', () => ({
detectApp: detectAppMock,
}));
vi.mock('@/modules/openInApp/launchers', () => ({
launchApp: launchAppMock,
}));
const mockApp = {} as unknown as App;
describe('OpenInAppCtr', () => {
beforeEach(() => {
vi.clearAllMocks();
ipcHandlers.clear();
ipcMainHandleMock.mockClear();
(IpcHandler.getInstance() as any).registeredChannels?.clear();
new OpenInAppCtr(mockApp);
});
describe('detectApps', () => {
it('should call getCachedDetection and return the apps list', async () => {
const apps: DetectedApp[] = [
{ displayName: 'Visual Studio Code', id: 'vscode', installed: true },
{ displayName: 'Cursor', id: 'cursor', installed: false },
];
getCachedDetectionMock.mockResolvedValue(apps);
const result = await invokeIpc('openInApp.detectApps');
expect(getCachedDetectionMock).toHaveBeenCalledTimes(1);
expect(result).toEqual({ apps });
});
});
describe('openInApp', () => {
it('should launch the app when installed', async () => {
detectAppMock.mockResolvedValue(true);
const launchResult: OpenInAppResult = { success: true };
launchAppMock.mockResolvedValue(launchResult);
const result = await invokeIpc('openInApp.openInApp', {
appId: 'vscode',
path: '/tmp/project',
});
expect(detectAppMock).toHaveBeenCalledWith('vscode', process.platform);
expect(launchAppMock).toHaveBeenCalledWith('vscode', '/tmp/project', process.platform);
expect(result).toEqual({ success: true });
});
it('should not launch and return error when app is not installed', async () => {
detectAppMock.mockResolvedValue(false);
const result = await invokeIpc('openInApp.openInApp', {
appId: 'cursor',
path: '/tmp/project',
});
expect(detectAppMock).toHaveBeenCalledWith('cursor', process.platform);
expect(launchAppMock).not.toHaveBeenCalled();
expect(result).toEqual({
error: 'cursor is not installed',
success: false,
});
});
it('should pass through launch errors when launchApp fails', async () => {
detectAppMock.mockResolvedValue(true);
const launchResult: OpenInAppResult = {
error: 'Path not found: /tmp/missing',
success: false,
};
launchAppMock.mockResolvedValue(launchResult);
const result = await invokeIpc('openInApp.openInApp', {
appId: 'vscode',
path: '/tmp/missing',
});
expect(detectAppMock).toHaveBeenCalledWith('vscode', process.platform);
expect(launchAppMock).toHaveBeenCalledWith('vscode', '/tmp/missing', process.platform);
expect(result).toEqual(launchResult);
});
});
});
@@ -13,6 +13,7 @@ import McpInstallCtr from './McpInstallCtr';
import MenuController from './MenuCtr';
import NetworkProxyCtr from './NetworkProxyCtr';
import NotificationCtr from './NotificationCtr';
import OpenInAppCtr from './OpenInAppCtr';
import RemoteServerConfigCtr from './RemoteServerConfigCtr';
import RemoteServerSyncCtr from './RemoteServerSyncCtr';
import ScreenCaptureCtr from './ScreenCaptureCtr';
@@ -37,6 +38,7 @@ export const controllerIpcConstructors = [
MenuController,
NetworkProxyCtr,
NotificationCtr,
OpenInAppCtr,
RemoteServerConfigCtr,
RemoteServerSyncCtr,
ScreenCaptureCtr,
+11
View File
@@ -31,6 +31,7 @@ import { createLogger } from '@/utils/logger';
import { BrowserManager } from './browser/BrowserManager';
import { I18nManager } from './infrastructure/I18nManager';
import { IoCContainer } from './infrastructure/IoCContainer';
import { LocalFileProtocolManager } from './infrastructure/LocalFileProtocolManager';
import { ProtocolManager } from './infrastructure/ProtocolManager';
import { RendererUrlManager } from './infrastructure/RendererUrlManager';
import { StaticFileServerManager } from './infrastructure/StaticFileServerManager';
@@ -62,6 +63,7 @@ export class App {
staticFileServerManager: StaticFileServerManager;
protocolManager: ProtocolManager;
rendererUrlManager: RendererUrlManager;
localFileProtocolManager: LocalFileProtocolManager;
toolDetectorManager: ToolDetectorManager;
screenCaptureManager: ScreenCaptureManager;
chromeFlags: string[] = ['OverlayScrollbar', 'FluentOverlayScrollbar', 'FluentScrollbar'];
@@ -102,6 +104,10 @@ export class App {
this.storeManager = new StoreManager(this);
this.rendererUrlManager = new RendererUrlManager();
this.localFileProtocolManager = new LocalFileProtocolManager();
void this.localFileProtocolManager.approveWorkspaceRoots(
this.storeManager.get('localFileWorkspaceRoots', []),
);
protocol.registerSchemesAsPrivileged([
{
privileges: {
@@ -114,6 +120,7 @@ export class App {
scheme: ELECTRON_BE_PROTOCOL_SCHEME,
},
this.rendererUrlManager.protocolScheme,
this.localFileProtocolManager.protocolScheme,
]);
// load controllers
@@ -152,6 +159,10 @@ export class App {
// should register before app ready
this.rendererUrlManager.configureRendererLoader();
// Serves arbitrary local files (e.g. project file previews) via
// `localfile://` to the renderer. Active in both dev and prod.
this.localFileProtocolManager.registerHandler();
// initialize protocol handlers
this.protocolManager.initialize();
@@ -115,9 +115,9 @@ vi.mock('../infrastructure/I18nManager', () => ({
vi.mock('../infrastructure/StoreManager', () => ({
StoreManager: vi.fn().mockImplementation(() => ({
get: vi.fn((key) => {
if (key === 'storagePath') return '/mock/storage/path';
return undefined;
get: vi.fn((_key, defaultValue) => {
if (_key === 'storagePath') return '/mock/storage/path';
return defaultValue;
}),
set: vi.fn(),
})),
@@ -0,0 +1,327 @@
import { randomUUID } from 'node:crypto';
import { readFile, realpath, stat } from 'node:fs/promises';
import path from 'node:path';
import { app, protocol } from 'electron';
import { LOCAL_FILE_PROTOCOL_HOST, LOCAL_FILE_PROTOCOL_SCHEME } from '@/const/protocol';
import { createLogger } from '@/utils/logger';
import { getExportMimeType } from '../../utils/mime';
const LOCAL_FILE_PROTOCOL_PRIVILEGES = {
allowServiceWorkers: false,
bypassCSP: false,
corsEnabled: true,
secure: true,
standard: true,
stream: true,
supportFetchAPI: true,
} as const;
const logger = createLogger('core:LocalFileProtocolManager');
const PREVIEW_TOKEN_TTL_MS = 5 * 60 * 1000;
const EXTRA_MIME_TYPES: Record<string, string> = {
'.avif': 'image/avif',
'.bmp': 'image/bmp',
'.heic': 'image/heic',
'.heif': 'image/heif',
'.tif': 'image/tiff',
'.tiff': 'image/tiff',
};
const getMimeType = (filePath: string): string => {
const ext = path.extname(filePath).toLowerCase();
return getExportMimeType(filePath) ?? EXTRA_MIME_TYPES[ext] ?? 'application/octet-stream';
};
const normalizeAbsolutePath = (filePath: string): string | null => {
const normalized = path.normalize(filePath);
return path.isAbsolute(normalized) ? normalized : null;
};
const isPathWithinRoot = (targetPath: string, rootPath: string): boolean => {
const relative = path.relative(rootPath, targetPath);
return (
relative === '' || (!!relative && !relative.startsWith('..') && !path.isAbsolute(relative))
);
};
const buildLocalFileUrl = (absolutePath: string, token: string): string => {
const forwardSlashed = absolutePath.replaceAll('\\', '/');
const stripped = forwardSlashed.startsWith('/') ? forwardSlashed.slice(1) : forwardSlashed;
const encoded = stripped.split('/').map(encodeURIComponent).join('/');
const url = new URL(`${LOCAL_FILE_PROTOCOL_SCHEME}://${LOCAL_FILE_PROTOCOL_HOST}/${encoded}`);
url.searchParams.set('token', token);
return url.toString();
};
interface PreviewTokenRecord {
expiresAt: number;
realPath: string;
}
/**
* Custom `localfile://` protocol for project file previews.
*
* URL shape: `localfile://file/<percent-encoded-absolute-path>?token=<main-issued-token>`
* - host is fixed to `file` so the scheme behaves as `standard`
* - the absolute path is encoded in the URL pathname
* - every request must carry a short-lived token minted by the main process
*
* Examples:
* localfile://file//Users/alice/project/cat.png?token=...
* localfile://file/C:/Users/alice/project/cat.png?token=...
*/
export class LocalFileProtocolManager {
private readonly approvedWorkspaceRoots = new Set<string>();
private readonly indexedProjectRoots = new Set<string>();
private handlerRegistered = false;
private readonly previewTokens = new Map<string, PreviewTokenRecord>();
get protocolScheme() {
return {
privileges: LOCAL_FILE_PROTOCOL_PRIVILEGES,
scheme: LOCAL_FILE_PROTOCOL_SCHEME,
};
}
registerHandler() {
if (this.handlerRegistered) return;
const register = () => {
if (this.handlerRegistered) return;
protocol.handle(LOCAL_FILE_PROTOCOL_SCHEME, async (request) => {
try {
const url = new URL(request.url);
if (url.hostname !== LOCAL_FILE_PROTOCOL_HOST) {
return new Response('Not Found', { status: 404 });
}
const resolvedPath = this.resolveFilePath(url.pathname);
if (!resolvedPath) {
return new Response('Invalid path', { status: 400 });
}
const token = url.searchParams.get('token');
if (!token) {
return new Response('Forbidden', { status: 403 });
}
if (!this.hasPreviewToken(token)) {
return new Response('Forbidden', { status: 403 });
}
const realResolvedPath = normalizeAbsolutePath(await realpath(resolvedPath));
if (!realResolvedPath || !this.verifyPreviewToken(token, realResolvedPath)) {
return new Response('Forbidden', { status: 403 });
}
const fileStat = await stat(realResolvedPath);
if (!fileStat.isFile()) {
return new Response('Not a file', { status: 404 });
}
const buffer = await readFile(realResolvedPath);
const headers = new Headers();
headers.set('Content-Type', getMimeType(realResolvedPath));
headers.set('Content-Length', String(buffer.byteLength));
// Local files are immutable from the renderer's perspective for a
// single preview session; allow short-lived caching to avoid
// re-reading large images during scrolling/refresh.
headers.set('Cache-Control', 'private, max-age=60');
return new Response(buffer, { headers, status: 200 });
} catch (error) {
const code = (error as NodeJS.ErrnoException).code;
if (code === 'ENOENT' || code === 'ENOTDIR') {
return new Response('Not Found', { status: 404 });
}
if (code === 'EACCES' || code === 'EPERM') {
return new Response('Forbidden', { status: 403 });
}
logger.error(`Failed to serve localfile request ${request.url}:`, error);
return new Response('Internal Server Error', { status: 500 });
}
});
this.handlerRegistered = true;
logger.debug(`Registered ${LOCAL_FILE_PROTOCOL_SCHEME}:// handler`);
};
if (app.isReady()) {
register();
} else {
app.whenReady().then(register);
}
}
async approveWorkspaceRoot(rootPath: string): Promise<string | null> {
const normalizedRoot = normalizeAbsolutePath(rootPath);
if (!normalizedRoot) return null;
const realRoot = normalizeAbsolutePath(await realpath(normalizedRoot));
if (!realRoot) return null;
this.approvedWorkspaceRoots.add(realRoot);
return realRoot;
}
async approveWorkspaceRoots(rootPaths: string[] = []): Promise<string[]> {
const approvedRoots = await Promise.allSettled(
rootPaths.map((rootPath) => this.approveWorkspaceRoot(rootPath)),
);
return approvedRoots
.map((result) => (result.status === 'fulfilled' ? result.value : null))
.filter((rootPath): rootPath is string => !!rootPath);
}
async approveProjectRootFromScope({
projectRoot,
requestedScope,
}: {
projectRoot: string;
requestedScope: string;
}): Promise<string | null> {
const [realProjectRoot, realRequestedScope] = await Promise.all([
realpath(projectRoot),
realpath(requestedScope),
]);
const normalizedProjectRoot = normalizeAbsolutePath(realProjectRoot);
const normalizedRequestedScope = normalizeAbsolutePath(realRequestedScope);
if (!normalizedProjectRoot || !normalizedRequestedScope) return null;
const scopeIsApproved = [...this.approvedWorkspaceRoots].some(
(approvedRoot) =>
normalizedRequestedScope === approvedRoot ||
isPathWithinRoot(normalizedRequestedScope, approvedRoot),
);
if (!scopeIsApproved) return null;
this.approvedWorkspaceRoots.add(normalizedProjectRoot);
return normalizedProjectRoot;
}
async approveIndexedProjectRoot(projectRoot: string): Promise<string | null> {
const normalizedProjectRoot = normalizeAbsolutePath(projectRoot);
if (!normalizedProjectRoot) return null;
const realProjectRoot = normalizeAbsolutePath(await realpath(normalizedProjectRoot));
if (!realProjectRoot) return null;
this.indexedProjectRoots.add(realProjectRoot);
return realProjectRoot;
}
async createPreviewUrl({
filePath,
workspaceRoot,
}: {
filePath: string;
workspaceRoot: string;
}): Promise<string | null> {
const normalizedFilePath = normalizeAbsolutePath(filePath);
const normalizedWorkspaceRoot = normalizeAbsolutePath(workspaceRoot);
if (!normalizedFilePath || !normalizedWorkspaceRoot) return null;
const [realFilePath, realWorkspaceRoot] = await Promise.all([
realpath(normalizedFilePath),
realpath(normalizedWorkspaceRoot),
]);
const normalizedRealFilePath = normalizeAbsolutePath(realFilePath);
const normalizedRealWorkspaceRoot = normalizeAbsolutePath(realWorkspaceRoot);
if (!normalizedRealFilePath || !normalizedRealWorkspaceRoot) return null;
if (
!this.approvedWorkspaceRoots.has(normalizedRealWorkspaceRoot) &&
!this.indexedProjectRoots.has(normalizedRealWorkspaceRoot)
) {
return null;
}
if (!isPathWithinRoot(normalizedRealFilePath, normalizedRealWorkspaceRoot)) return null;
this.cleanupExpiredTokens();
const token = randomUUID();
this.previewTokens.set(token, {
expiresAt: Date.now() + PREVIEW_TOKEN_TTL_MS,
realPath: normalizedRealFilePath,
});
return buildLocalFileUrl(normalizedFilePath, token);
}
/**
* Decode the URL pathname back into an absolute filesystem path.
*
* Pathname examples produced by `new URL('localfile://file//abs/path')`:
* posix: `//abs/path` -> `/abs/path`
* windows: `/C:/abs/path` -> `C:/abs/path`
*
* Returns null when the path is non-absolute or escapes via segments we
* cannot safely normalize (defense-in-depth, not a sandbox).
*/
private resolveFilePath(pathname: string): string | null {
let decoded: string;
try {
decoded = decodeURIComponent(pathname);
} catch {
return null;
}
// Strip the single leading slash inserted by URL parsing on standard
// schemes; what remains should already be an absolute filesystem path.
let candidate = decoded.startsWith('/') ? decoded.slice(1) : decoded;
if (!candidate) return null;
if (process.platform === 'win32') {
// posix-style absolute path won't have a drive letter; treat as invalid
// on Windows.
candidate = candidate.replaceAll('/', '\\');
} else if (!candidate.startsWith('/')) {
// We expect an absolute POSIX path: `localfile://file//abs/path` yields
// pathname `//abs/path` -> after stripping one slash -> `/abs/path`.
candidate = `/${candidate}`;
}
const normalized = path.normalize(candidate);
if (!path.isAbsolute(normalized)) return null;
return normalized;
}
private cleanupExpiredTokens() {
const now = Date.now();
for (const [token, record] of this.previewTokens) {
if (record.expiresAt <= now) {
this.previewTokens.delete(token);
}
}
}
private hasPreviewToken(token: string): boolean {
const record = this.previewTokens.get(token);
if (!record) return false;
if (record.expiresAt <= Date.now()) {
this.previewTokens.delete(token);
return false;
}
return true;
}
private verifyPreviewToken(token: string, realResolvedPath: string): boolean {
const record = this.previewTokens.get(token);
if (!record) return false;
return record.realPath === realResolvedPath;
}
}
@@ -0,0 +1,298 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { LocalFileProtocolManager } from '../LocalFileProtocolManager';
const { mockApp, mockProtocol, mockReadFile, mockRealpath, mockStat, protocolHandlerRef } =
vi.hoisted(() => {
const protocolHandlerRef = { current: null as any };
return {
mockApp: {
isReady: vi.fn().mockReturnValue(true),
whenReady: vi.fn().mockResolvedValue(undefined),
},
mockProtocol: {
handle: vi.fn((_scheme: string, handler: any) => {
protocolHandlerRef.current = handler;
}),
},
mockReadFile: vi.fn(),
mockRealpath: vi.fn(),
mockStat: vi.fn(),
protocolHandlerRef,
};
});
vi.mock('electron', () => ({
app: mockApp,
protocol: mockProtocol,
}));
vi.mock('node:fs/promises', () => ({
realpath: mockRealpath,
readFile: mockReadFile,
stat: mockStat,
}));
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
describe('LocalFileProtocolManager', () => {
beforeEach(() => {
vi.clearAllMocks();
protocolHandlerRef.current = null;
mockApp.isReady.mockReturnValue(true);
mockRealpath.mockImplementation(async (filePath: string) => filePath);
mockStat.mockImplementation(async () => ({ isFile: () => true, size: 1024 }));
mockReadFile.mockImplementation(async () => Buffer.from('image-bytes'));
});
afterEach(() => {
protocolHandlerRef.current = null;
});
it('exposes scheme metadata for registerSchemesAsPrivileged', () => {
const manager = new LocalFileProtocolManager();
expect(manager.protocolScheme).toEqual({
privileges: expect.objectContaining({
bypassCSP: false,
secure: true,
standard: true,
supportFetchAPI: true,
}),
scheme: 'localfile',
});
});
it('serves a POSIX absolute path with the correct mime type', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
await manager.approveWorkspaceRoot('/Users/alice');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/Pictures/cat.png',
workspaceRoot: '/Users/alice',
});
if (!url) throw new Error('Expected local file preview URL');
expect(mockProtocol.handle).toHaveBeenCalledWith('localfile', expect.any(Function));
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url,
});
expect(mockStat).toHaveBeenCalledWith('/Users/alice/Pictures/cat.png');
expect(mockReadFile).toHaveBeenCalledWith('/Users/alice/Pictures/cat.png');
expect(response.status).toBe(200);
expect(response.headers.get('Content-Type')).toBe('image/png');
expect(response.headers.get('Content-Length')).toBe('11'); // 'image-bytes'.length
});
it('serves source files as text through the localfile protocol', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
await manager.approveWorkspaceRoot('/Users/alice/project');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/project/App.tsx',
workspaceRoot: '/Users/alice/project',
});
if (!url) throw new Error('Expected local file preview URL');
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url,
});
expect(mockStat).toHaveBeenCalledWith('/Users/alice/project/App.tsx');
expect(mockReadFile).toHaveBeenCalledWith('/Users/alice/project/App.tsx');
expect(response.status).toBe(200);
expect(response.headers.get('Content-Type')).toBe('text/plain; charset=utf-8');
});
it('decodes percent-encoded characters in the path', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
await manager.approveWorkspaceRoot('/Users/alice');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/My Pictures/图 #.png',
workspaceRoot: '/Users/alice',
});
if (!url) throw new Error('Expected local file preview URL');
const handler = protocolHandlerRef.current;
await handler({
headers: new Headers(),
method: 'GET',
url,
});
expect(mockStat).toHaveBeenCalledWith('/Users/alice/My Pictures/图 #.png');
});
it('rejects requests to a different host', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url: 'localfile://other/Users/alice/cat.png',
});
expect(response.status).toBe(404);
expect(mockStat).not.toHaveBeenCalled();
});
it('returns 404 when the path is a directory', async () => {
mockStat.mockImplementation(async () => ({ isFile: () => false, size: 0 }));
const manager = new LocalFileProtocolManager();
manager.registerHandler();
await manager.approveWorkspaceRoot('/Users/alice');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/folder',
workspaceRoot: '/Users/alice',
});
if (!url) throw new Error('Expected local file preview URL');
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url,
});
expect(response.status).toBe(404);
expect(mockReadFile).not.toHaveBeenCalled();
});
it('maps ENOENT errors to a 404 response', async () => {
mockStat.mockImplementation(async () => {
const err: NodeJS.ErrnoException = new Error('no such file');
err.code = 'ENOENT';
throw err;
});
const manager = new LocalFileProtocolManager();
manager.registerHandler();
await manager.approveWorkspaceRoot('/');
const handler = protocolHandlerRef.current;
const url = await manager.createPreviewUrl({
filePath: '/nonexistent.png',
workspaceRoot: '/',
});
if (!url) throw new Error('Expected local file preview URL');
const response = await handler({
headers: new Headers(),
method: 'GET',
url,
});
expect(response.status).toBe(404);
});
it('rejects direct localfile requests without a main-issued preview token', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url: 'localfile://file/Users/alice/.ssh/id_rsa',
});
expect(response.status).toBe(403);
expect(mockStat).not.toHaveBeenCalled();
expect(mockReadFile).not.toHaveBeenCalled();
});
it('rejects forged preview tokens before resolving the requested path', async () => {
const manager = new LocalFileProtocolManager();
manager.registerHandler();
const handler = protocolHandlerRef.current;
const response = await handler({
headers: new Headers(),
method: 'GET',
url: 'localfile://file/Users/alice/.ssh/id_rsa?token=forged',
});
expect(response.status).toBe(403);
expect(mockRealpath).not.toHaveBeenCalled();
expect(mockStat).not.toHaveBeenCalled();
expect(mockReadFile).not.toHaveBeenCalled();
});
it('does not mint preview URLs outside an approved workspace root', async () => {
const manager = new LocalFileProtocolManager();
await manager.approveWorkspaceRoot('/Users/alice/project');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/.ssh/id_rsa',
workspaceRoot: '/Users/alice/project',
});
expect(url).toBeNull();
});
it('can approve a project root derived from an already approved nested scope', async () => {
const manager = new LocalFileProtocolManager();
await manager.approveWorkspaceRoot('/Users/alice/project/packages/app');
await manager.approveProjectRootFromScope({
projectRoot: '/Users/alice/project',
requestedScope: '/Users/alice/project/packages/app',
});
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/project/root.ts',
workspaceRoot: '/Users/alice/project',
});
if (!url) throw new Error('Expected local file preview URL');
expect(url).toContain('token=');
});
it('can mint preview URLs for roots produced by the main-process project index', async () => {
const manager = new LocalFileProtocolManager();
await manager.approveIndexedProjectRoot('/Users/alice/project');
const url = await manager.createPreviewUrl({
filePath: '/Users/alice/project/App.tsx',
workspaceRoot: '/Users/alice/project',
});
if (!url) throw new Error('Expected local file preview URL');
expect(url).toContain('token=');
});
it('defers registration until app ready when not yet ready', async () => {
mockApp.isReady.mockReturnValue(false);
let resolveReady: () => void = () => undefined;
mockApp.whenReady.mockReturnValue(
new Promise<void>((resolve) => {
resolveReady = resolve;
}),
);
const manager = new LocalFileProtocolManager();
manager.registerHandler();
expect(mockProtocol.handle).not.toHaveBeenCalled();
resolveReady();
await new Promise((r) => setImmediate(r));
expect(mockProtocol.handle).toHaveBeenCalled();
});
});
@@ -0,0 +1,87 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { clearDetectionCache, getCachedDetection } from '../cache';
import { detectAllApps } from '../detectors';
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
vi.mock('../detectors', () => ({
detectAllApps: vi.fn(),
}));
const mockedDetectAll = vi.mocked(detectAllApps);
beforeEach(() => {
vi.clearAllMocks();
clearDetectionCache();
});
describe('getCachedDetection', () => {
it('invokes detection on first call', async () => {
mockedDetectAll.mockResolvedValueOnce([
{ displayName: 'VS Code', id: 'vscode', installed: true },
]);
const result = await getCachedDetection('darwin');
expect(result).toEqual([{ displayName: 'VS Code', id: 'vscode', installed: true }]);
expect(mockedDetectAll).toHaveBeenCalledTimes(1);
});
it('concurrent callers share a single inflight promise', async () => {
let resolveFn: (value: any) => void = () => {};
const inflight = new Promise<any>((resolve) => {
resolveFn = resolve;
});
mockedDetectAll.mockReturnValueOnce(inflight);
const p1 = getCachedDetection('darwin');
const p2 = getCachedDetection('darwin');
const p3 = getCachedDetection('darwin');
expect(mockedDetectAll).toHaveBeenCalledTimes(1);
resolveFn([{ displayName: 'VS Code', id: 'vscode', installed: true }]);
const results = await Promise.all([p1, p2, p3]);
// all three share the same resolved value
expect(results[0]).toBe(results[1]);
expect(results[1]).toBe(results[2]);
expect(mockedDetectAll).toHaveBeenCalledTimes(1);
});
it('subsequent serial calls reuse the cached promise', async () => {
mockedDetectAll.mockResolvedValueOnce([
{ displayName: 'VS Code', id: 'vscode', installed: true },
]);
await getCachedDetection('darwin');
await getCachedDetection('darwin');
await getCachedDetection('darwin');
expect(mockedDetectAll).toHaveBeenCalledTimes(1);
});
it('re-invokes detection after clearDetectionCache', async () => {
mockedDetectAll.mockResolvedValueOnce([
{ displayName: 'VS Code', id: 'vscode', installed: true },
]);
await getCachedDetection('darwin');
expect(mockedDetectAll).toHaveBeenCalledTimes(1);
clearDetectionCache();
mockedDetectAll.mockResolvedValueOnce([
{ displayName: 'VS Code', id: 'vscode', installed: false },
]);
await getCachedDetection('darwin');
expect(mockedDetectAll).toHaveBeenCalledTimes(2);
});
});
@@ -0,0 +1,274 @@
import { execFile } from 'node:child_process';
import { access } from 'node:fs/promises';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { detectAllApps, detectApp } from '../detectors';
import { extractAllIcons } from '../iconExtractor';
// Mock logger
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
// Mock node:fs/promises
vi.mock('node:fs/promises', () => ({
access: vi.fn(),
}));
// Mock node:child_process - execFile is wrapped via promisify, so the mock must
// expose execFile as the underlying callback-style function we can drive.
vi.mock('node:child_process', () => ({
execFile: vi.fn(),
}));
// Mock the icon extractor — detection tests should not depend on real icon
// extraction. The default returns an empty Map (no icons) which leaves the
// `icon` field absent from all detection results.
vi.mock('../iconExtractor', () => ({
extractAllIcons: vi.fn(async () => new Map<string, string>()),
}));
const mockedAccess = vi.mocked(access);
const mockedExecFile = vi.mocked(execFile) as unknown as ReturnType<typeof vi.fn>;
interface ExecOutcome {
code: number;
error?: NodeJS.ErrnoException;
stderr?: string;
stdout?: string;
}
const respondExec = (outcome: ExecOutcome) => {
mockedExecFile.mockImplementationOnce(
(_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
if (outcome.code === 0) {
callback(null, outcome.stdout ?? '', outcome.stderr ?? '');
} else {
const err: NodeJS.ErrnoException & { stderr?: string } =
outcome.error ?? new Error('exec failed');
err.stderr = outcome.stderr ?? '';
(err as any).code = outcome.code;
callback(err, '', outcome.stderr ?? '');
}
return undefined as any;
},
);
};
beforeEach(() => {
vi.clearAllMocks();
});
describe('detectApp', () => {
describe('appBundle strategy', () => {
it('returns true when fs.access resolves for any path', async () => {
mockedAccess.mockRejectedValueOnce(new Error('missing'));
mockedAccess.mockResolvedValueOnce(undefined);
const result = await detectApp('terminal', 'darwin');
expect(result).toBe(true);
expect(mockedAccess).toHaveBeenCalledTimes(2);
});
it('returns false when all paths reject', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
const result = await detectApp('vscode', 'darwin');
expect(result).toBe(false);
});
});
describe('commandV strategy', () => {
it('returns true on exit 0', async () => {
respondExec({ code: 0, stdout: '/usr/bin/zed' });
const result = await detectApp('zed', 'linux');
expect(result).toBe(true);
expect(mockedExecFile).toHaveBeenCalledWith(
'/bin/sh',
['-c', 'command -v "zed"'],
expect.any(Function),
);
});
it('returns false on non-zero exit', async () => {
respondExec({ code: 1, stderr: 'not found' });
const result = await detectApp('zed', 'linux');
expect(result).toBe(false);
});
it('rejects unsafe binary names without spawning a shell', async () => {
// We monkey-patch a registry entry transiently to inject a malicious binary.
const registry = await import('../registry');
const originalGhostty = registry.APP_REGISTRY.ghostty.detect.linux;
registry.APP_REGISTRY.ghostty.detect.linux = {
binary: 'foo; rm -rf /',
type: 'commandV',
};
const result = await detectApp('ghostty', 'linux');
expect(result).toBe(false);
expect(mockedExecFile).not.toHaveBeenCalled();
registry.APP_REGISTRY.ghostty.detect.linux = originalGhostty;
});
});
describe('registryAppPaths strategy', () => {
it('returns true on exit 0', async () => {
respondExec({ code: 0, stdout: 'C:\\Program Files\\code.exe' });
const result = await detectApp('vscode', 'win32');
expect(result).toBe(true);
expect(mockedExecFile).toHaveBeenCalledWith(
'where',
['Code.exe'],
{ windowsHide: true },
expect.any(Function),
);
});
it('returns false on non-zero exit', async () => {
respondExec({ code: 1, stderr: 'not found' });
const result = await detectApp('vscode', 'win32');
expect(result).toBe(false);
});
});
it('returns false when platform has no detect entry for the app', async () => {
const result = await detectApp('xcode', 'linux');
expect(result).toBe(false);
expect(mockedAccess).not.toHaveBeenCalled();
expect(mockedExecFile).not.toHaveBeenCalled();
});
it('returns true for ALWAYS_INSTALLED entries without probing', async () => {
const darwinFinder = await detectApp('finder', 'darwin');
const win32Explorer = await detectApp('explorer', 'win32');
const linuxFiles = await detectApp('files', 'linux');
expect(darwinFinder).toBe(true);
expect(win32Explorer).toBe(true);
expect(linuxFiles).toBe(true);
expect(mockedAccess).not.toHaveBeenCalled();
expect(mockedExecFile).not.toHaveBeenCalled();
});
});
describe('detectAllApps', () => {
it('returns one entry per AppId regardless of platform', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
mockedExecFile.mockImplementation((_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
const err: NodeJS.ErrnoException = new Error('fail');
callback(err, '', '');
return undefined as any;
});
const apps = await detectAllApps('linux');
const registry = await import('../registry');
expect(apps.length).toBe(Object.keys(registry.APP_REGISTRY).length);
// every entry has the three required fields
for (const app of apps) {
expect(app).toEqual(
expect.objectContaining({
displayName: expect.any(String),
id: expect.any(String),
installed: expect.any(Boolean),
}),
);
}
});
it('marks unsupported-on-platform apps as not installed', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
mockedExecFile.mockImplementation((_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
const err: NodeJS.ErrnoException = new Error('fail');
callback(err, '', '');
return undefined as any;
});
const apps = await detectAllApps('linux');
const xcode = apps.find((a) => a.id === 'xcode');
expect(xcode?.installed).toBe(false);
});
it('marks ALWAYS_INSTALLED platform file manager as installed without probes', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
mockedExecFile.mockImplementation((_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
const err: NodeJS.ErrnoException = new Error('fail');
callback(err, '', '');
return undefined as any;
});
const apps = await detectAllApps('darwin');
const finder = apps.find((a) => a.id === 'finder');
expect(finder?.installed).toBe(true);
});
it('merges extracted icons onto installed apps only', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
mockedExecFile.mockImplementation((_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
const err: NodeJS.ErrnoException = new Error('fail');
callback(err, '', '');
return undefined as any;
});
vi.mocked(extractAllIcons).mockResolvedValueOnce(
new Map([['finder', 'data:image/png;base64,FAKE']]),
);
const apps = await detectAllApps('darwin');
const finder = apps.find((a) => a.id === 'finder');
expect(finder?.icon).toBe('data:image/png;base64,FAKE');
// not-installed apps must not have an icon field
const xcode = apps.find((a) => a.id === 'xcode');
expect(xcode?.installed).toBe(false);
expect(xcode?.icon).toBeUndefined();
});
it('passes only installed AppIds to extractAllIcons', async () => {
mockedAccess.mockRejectedValue(new Error('missing'));
mockedExecFile.mockImplementation((_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
const err: NodeJS.ErrnoException = new Error('fail');
callback(err, '', '');
return undefined as any;
});
vi.mocked(extractAllIcons).mockResolvedValueOnce(new Map());
await detectAllApps('darwin');
expect(extractAllIcons).toHaveBeenCalledTimes(1);
const [ids, platform] = vi.mocked(extractAllIcons).mock.calls[0];
expect(platform).toBe('darwin');
// only finder is ALWAYS_INSTALLED on darwin; all others fail probes
expect(ids).toEqual(['finder']);
});
});
@@ -0,0 +1,261 @@
import { execFile } from 'node:child_process';
import { access, mkdtemp, readFile, unlink } from 'node:fs/promises';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { __resetForTest, extractAllIcons, extractAppIcon } from '../iconExtractor';
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
vi.mock('node:fs/promises', () => ({
access: vi.fn(),
mkdtemp: vi.fn(),
readFile: vi.fn(),
unlink: vi.fn(),
}));
vi.mock('node:child_process', () => ({
execFile: vi.fn(),
}));
const mockedAccess = vi.mocked(access);
const mockedMkdtemp = vi.mocked(mkdtemp);
const mockedReadFile = vi.mocked(readFile);
const mockedUnlink = vi.mocked(unlink);
const mockedExecFile = vi.mocked(execFile) as unknown as ReturnType<typeof vi.fn>;
/**
* Drives the next execFile call. The promisified callback signature is
* `(error, stdout, stderr)`; non-error responses resolve with stdout.
*/
const respondExec = (
match: { args?: string[]; binary: string },
outcome: { error?: Error; stderr?: string; stdout?: string },
) => {
mockedExecFile.mockImplementationOnce(
(_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
if (_file !== match.binary) {
callback(new Error(`unexpected binary: ${_file}`), '', '');
return undefined as any;
}
if (match.args && JSON.stringify(_args) !== JSON.stringify(match.args)) {
callback(new Error(`unexpected args: ${JSON.stringify(_args)}`), '', '');
return undefined as any;
}
if (outcome.error) {
callback(outcome.error, '', outcome.stderr ?? '');
} else {
callback(null, outcome.stdout ?? '', outcome.stderr ?? '');
}
return undefined as any;
},
);
};
// Shorthand: tools-available probe passes (which plutil + which sips both 0).
const respondToolsAvailable = () => {
// /usr/bin/which plutil
respondExec({ binary: '/usr/bin/which' }, { stdout: '/usr/bin/plutil\n' });
// /usr/bin/which sips
respondExec({ binary: '/usr/bin/which' }, { stdout: '/usr/bin/sips\n' });
};
beforeEach(() => {
vi.clearAllMocks();
mockedAccess.mockReset();
mockedMkdtemp.mockReset();
mockedReadFile.mockReset();
mockedUnlink.mockReset();
mockedExecFile.mockReset();
mockedUnlink.mockResolvedValue(undefined);
__resetForTest();
});
describe('extractAppIcon', () => {
it('returns a data URL when plutil + sips succeed on darwin', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined); // bundle exists
// plutil CFBundleIconFile lookup
respondExec({ binary: 'plutil' }, { stdout: 'Code.icns\n' });
mockedAccess.mockResolvedValueOnce(undefined); // .icns exists
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
// sips conversion
respondExec({ binary: 'sips' }, { stdout: '' });
mockedReadFile.mockResolvedValueOnce(Buffer.from([0x89, 0x50, 0x4e, 0x47])); // PNG header
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBe(
`data:image/png;base64,${Buffer.from([0x89, 0x50, 0x4e, 0x47]).toString('base64')}`,
);
});
it('appends .icns suffix when CFBundleIconFile has no extension', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined); // bundle exists
respondExec({ binary: 'plutil' }, { stdout: 'Terminal\n' });
mockedAccess.mockImplementationOnce(async (p: any) => {
// .icns existence check — verify suffix appended
if (typeof p === 'string' && p.endsWith('Terminal.icns')) return undefined;
throw new Error('wrong path: ' + String(p));
});
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
respondExec({ binary: 'sips' }, { stdout: '' });
mockedReadFile.mockResolvedValueOnce(Buffer.from([0x89, 0x50]));
const result = await extractAppIcon('terminal', 'darwin');
expect(result).toBeDefined();
expect(result!.startsWith('data:image/png;base64,')).toBe(true);
});
it('falls back to the next path when the first bundle does not exist', async () => {
respondToolsAvailable();
// terminal has two candidate paths; first fails, second succeeds.
mockedAccess.mockRejectedValueOnce(new Error('missing'));
mockedAccess.mockResolvedValueOnce(undefined);
respondExec({ binary: 'plutil' }, { stdout: 'Terminal\n' });
mockedAccess.mockResolvedValueOnce(undefined);
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
respondExec({ binary: 'sips' }, { stdout: '' });
mockedReadFile.mockResolvedValueOnce(Buffer.from([0xff]));
const result = await extractAppIcon('terminal', 'darwin');
expect(result).toBeDefined();
});
it('returns undefined when no bundle path exists', async () => {
respondToolsAvailable();
mockedAccess.mockRejectedValue(new Error('missing'));
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBeUndefined();
});
it('returns undefined when plutil cannot read CFBundleIconFile', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined);
respondExec({ binary: 'plutil' }, { error: new Error('plutil: not found') });
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBeUndefined();
});
it('returns undefined when the resolved .icns is missing', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined); // bundle exists
respondExec({ binary: 'plutil' }, { stdout: 'Code.icns\n' });
mockedAccess.mockRejectedValueOnce(new Error('missing icns')); // .icns missing
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBeUndefined();
});
it('returns undefined when sips fails', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined);
respondExec({ binary: 'plutil' }, { stdout: 'Code.icns\n' });
mockedAccess.mockResolvedValueOnce(undefined);
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
respondExec({ binary: 'sips' }, { error: new Error('sips error') });
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBeUndefined();
});
it('returns undefined when the produced PNG is empty', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined);
respondExec({ binary: 'plutil' }, { stdout: 'Code.icns\n' });
mockedAccess.mockResolvedValueOnce(undefined);
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
respondExec({ binary: 'sips' }, { stdout: '' });
mockedReadFile.mockResolvedValueOnce(Buffer.alloc(0));
const result = await extractAppIcon('vscode', 'darwin');
expect(result).toBeUndefined();
});
it('returns undefined when registry has no darwin entry for the app', async () => {
respondToolsAvailable();
const result = await extractAppIcon('explorer', 'darwin');
expect(result).toBeUndefined();
expect(mockedAccess).not.toHaveBeenCalled();
});
it('returns undefined on win32 (extractor is macOS-only)', async () => {
const result = await extractAppIcon('vscode', 'win32');
expect(result).toBeUndefined();
expect(mockedExecFile).not.toHaveBeenCalled();
});
it('returns undefined on linux (extractor is macOS-only)', async () => {
const result = await extractAppIcon('vscode', 'linux');
expect(result).toBeUndefined();
expect(mockedExecFile).not.toHaveBeenCalled();
});
});
describe('extractAllIcons', () => {
it('returns a map of only AppIds with successfully extracted icons', async () => {
respondToolsAvailable();
// vscode succeeds
mockedAccess.mockResolvedValueOnce(undefined); // bundle
respondExec({ binary: 'plutil' }, { stdout: 'Code.icns\n' });
mockedAccess.mockResolvedValueOnce(undefined); // .icns
mockedMkdtemp.mockResolvedValueOnce('/tmp/lobehub-openinapp-test');
respondExec({ binary: 'sips' }, { stdout: '' });
mockedReadFile.mockResolvedValueOnce(Buffer.from('vscode'));
// cursor fails at bundle access (try all paths fail)
mockedAccess.mockRejectedValue(new Error('missing'));
// xcode succeeds — reset access for it
// (subsequent calls to mockedAccess will keep returning rejection)
// So this test exercises: success, fail-no-bundle.
const map = await extractAllIcons(['vscode', 'cursor'], 'darwin');
expect(map.has('vscode')).toBe(true);
expect(map.has('cursor')).toBe(false);
});
it('returns empty map when input list is empty', async () => {
const map = await extractAllIcons([], 'darwin');
expect(map.size).toBe(0);
});
it('does not throw when extraction errors', async () => {
respondToolsAvailable();
mockedAccess.mockResolvedValueOnce(undefined);
respondExec({ binary: 'plutil' }, { error: new Error('boom') });
const map = await extractAllIcons(['vscode'], 'darwin');
expect(map.size).toBe(0);
});
it('skips all when tools are unavailable', async () => {
// /usr/bin/which plutil fails
respondExec({ binary: '/usr/bin/which' }, { error: new Error('not found') });
const map = await extractAllIcons(['vscode', 'terminal'], 'darwin');
expect(map.size).toBe(0);
});
});
@@ -0,0 +1,247 @@
import { execFile } from 'node:child_process';
import { access } from 'node:fs/promises';
import { shell } from 'electron';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { launchApp } from '../launchers';
vi.mock('@/utils/logger', () => ({
createLogger: () => ({
debug: vi.fn(),
error: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
}),
}));
vi.mock('node:fs/promises', () => ({
access: vi.fn(),
}));
vi.mock('node:child_process', () => ({
execFile: vi.fn(),
}));
vi.mock('electron', () => ({
shell: {
openPath: vi.fn(),
},
}));
const mockedAccess = vi.mocked(access);
const mockedExecFile = vi.mocked(execFile) as unknown as ReturnType<typeof vi.fn>;
const mockedShell = vi.mocked(shell);
type LastCall = { file: string; args: string[] };
const captureExec = (): LastCall => {
expect(mockedExecFile).toHaveBeenCalled();
const [file, args] = mockedExecFile.mock.calls[0];
return { args: args as string[], file: file as string };
};
interface ExecOutcome {
code: number;
stderr?: string;
stdout?: string;
}
const respondExec = (outcome: ExecOutcome) => {
mockedExecFile.mockImplementationOnce(
(_file: string, _args: string[], _opts: unknown, cb: any) => {
const callback = typeof _opts === 'function' ? _opts : cb;
if (outcome.code === 0) {
callback(null, outcome.stdout ?? '', outcome.stderr ?? '');
} else {
const err: NodeJS.ErrnoException & { stderr?: string } = new Error('exec failed');
err.stderr = outcome.stderr ?? '';
(err as any).code = outcome.code;
callback(err, '', outcome.stderr ?? '');
}
return undefined as any;
},
);
};
beforeEach(() => {
vi.clearAllMocks();
mockedAccess.mockResolvedValue(undefined);
});
describe('launchApp - path validation', () => {
it('rejects relative paths', async () => {
const result = await launchApp('vscode', 'relative/path', 'darwin');
expect(result.success).toBe(false);
expect(result.error).toBe('Path must be absolute');
expect(mockedExecFile).not.toHaveBeenCalled();
});
it('rejects paths that do not exist', async () => {
mockedAccess.mockRejectedValueOnce(new Error('ENOENT'));
const result = await launchApp('vscode', '/missing', 'darwin');
expect(result.success).toBe(false);
expect(result.error).toBe('Path not found: /missing');
expect(mockedExecFile).not.toHaveBeenCalled();
});
it('returns error when app is not available on platform', async () => {
const result = await launchApp('xcode', '/some/path', 'linux');
expect(result.success).toBe(false);
expect(result.error).toContain('Xcode');
expect(result.error).toContain('not available on this platform');
});
});
describe('launchApp - macOpenA strategy', () => {
it('spawns open -a <appName> <path>', async () => {
respondExec({ code: 0 });
const result = await launchApp('vscode', '/work/dir', 'darwin');
expect(result.success).toBe(true);
const call = captureExec();
expect(call.file).toBe('open');
expect(call.args).toEqual(['-a', 'Visual Studio Code', '/work/dir']);
});
it('returns stderr substring on failure', async () => {
respondExec({ code: 1, stderr: ' cannot open Cursor.app ' });
const result = await launchApp('cursor', '/work/dir', 'darwin');
expect(result.success).toBe(false);
expect(result.error).toBe('cannot open Cursor.app');
});
});
describe('launchApp - macOpen strategy', () => {
it('spawns open <path>', async () => {
respondExec({ code: 0 });
const result = await launchApp('finder', '/work/dir', 'darwin');
expect(result.success).toBe(true);
const call = captureExec();
expect(call.file).toBe('open');
expect(call.args).toEqual(['/work/dir']);
});
});
describe('launchApp - exec strategy', () => {
it('spawns <binary> <path>', async () => {
respondExec({ code: 0 });
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(true);
const call = captureExec();
expect(call.file).toBe('code');
expect(call.args).toEqual(['/work/dir']);
});
it('appends registry-provided args before path', async () => {
const registry = await import('../registry');
const original = registry.APP_REGISTRY.vscode.launch.linux;
registry.APP_REGISTRY.vscode.launch.linux = {
args: ['--new-window'],
binary: 'code',
type: 'exec',
};
respondExec({ code: 0 });
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(true);
const call = captureExec();
expect(call.args).toEqual(['--new-window', '/work/dir']);
registry.APP_REGISTRY.vscode.launch.linux = original;
});
it('rejects suspicious binary names', async () => {
const registry = await import('../registry');
const original = registry.APP_REGISTRY.vscode.launch.linux;
registry.APP_REGISTRY.vscode.launch.linux = {
binary: 'rm; ls',
type: 'exec',
};
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(false);
expect(result.error).toBe('Invalid binary name');
expect(mockedExecFile).not.toHaveBeenCalled();
registry.APP_REGISTRY.vscode.launch.linux = original;
});
it('rejects binary names with spaces', async () => {
const registry = await import('../registry');
const original = registry.APP_REGISTRY.vscode.launch.linux;
registry.APP_REGISTRY.vscode.launch.linux = {
binary: 'foo bar',
type: 'exec',
};
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(false);
expect(result.error).toBe('Invalid binary name');
registry.APP_REGISTRY.vscode.launch.linux = original;
});
it('accepts absolute-path binary names', async () => {
const registry = await import('../registry');
const original = registry.APP_REGISTRY.vscode.launch.linux;
registry.APP_REGISTRY.vscode.launch.linux = {
binary: '/usr/local/bin/code',
type: 'exec',
};
respondExec({ code: 0 });
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(true);
const call = captureExec();
expect(call.file).toBe('/usr/local/bin/code');
registry.APP_REGISTRY.vscode.launch.linux = original;
});
it('returns stderr substring on non-zero exit', async () => {
respondExec({ code: 1, stderr: 'command not found' });
const result = await launchApp('vscode', '/work/dir', 'linux');
expect(result.success).toBe(false);
expect(result.error).toBe('command not found');
});
});
describe('launchApp - shellOpenPath strategy', () => {
it('delegates to shell.openPath', async () => {
mockedShell.openPath.mockResolvedValueOnce('');
const result = await launchApp('explorer', '/abs/work-dir', 'win32');
expect(result.success).toBe(true);
expect(mockedShell.openPath).toHaveBeenCalledWith('/abs/work-dir');
});
it('returns error string from shell.openPath as error', async () => {
mockedShell.openPath.mockResolvedValueOnce('cannot open');
const result = await launchApp('files', '/some/dir', 'linux');
expect(result.success).toBe(false);
expect(result.error).toBe('cannot open');
});
});
@@ -0,0 +1,18 @@
import type { DetectedApp } from '@lobechat/electron-client-ipc';
import { detectAllApps } from './detectors';
let cachedPromise: Promise<DetectedApp[]> | null = null;
export const getCachedDetection = (
platform: NodeJS.Platform = process.platform,
): Promise<DetectedApp[]> => {
if (!cachedPromise) {
cachedPromise = detectAllApps(platform);
}
return cachedPromise;
};
export const clearDetectionCache = (): void => {
cachedPromise = null;
};
@@ -0,0 +1,109 @@
import { execFile } from 'node:child_process';
import { access } from 'node:fs/promises';
import { promisify } from 'node:util';
import type { DetectedApp, OpenInAppId } from '@lobechat/electron-client-ipc';
import { createLogger } from '@/utils/logger';
import { extractAllIcons } from './iconExtractor';
import type { DetectStrategy } from './registry';
import { ALWAYS_INSTALLED, APP_REGISTRY } from './registry';
// Icon extraction shells out to plutil + sips on macOS (see iconExtractor.ts)
// so Electron itself cannot crash on `app.getFileIcon` regressions. Renderer
// falls back to lucide if extraction returns undefined.
const logger = createLogger('modules:openInApp:detectors');
const execFileAsync = promisify(execFile);
const SAFE_BINARY_REGEX = /^[\w.-]+$/;
const probeAppBundle = async (paths: string[]): Promise<boolean> => {
for (const path of paths) {
try {
await access(path);
return true;
} catch {
// try next
}
}
return false;
};
const probeCommandV = async (binary: string): Promise<boolean> => {
if (!SAFE_BINARY_REGEX.test(binary)) {
logger.debug(`rejecting unsafe binary name for commandV: ${binary}`);
return false;
}
try {
await execFileAsync('/bin/sh', ['-c', `command -v "${binary}"`]);
return true;
} catch (error) {
logger.debug(`commandV probe failed for ${binary}: ${(error as Error).message}`);
return false;
}
};
const probeRegistryAppPaths = async (exeName: string): Promise<boolean> => {
try {
await execFileAsync('where', [exeName], { windowsHide: true });
return true;
} catch (error) {
logger.debug(`where probe failed for ${exeName}: ${(error as Error).message}`);
return false;
}
};
const runDetectStrategy = (strategy: DetectStrategy): Promise<boolean> => {
switch (strategy.type) {
case 'appBundle': {
return probeAppBundle(strategy.paths);
}
case 'commandV': {
return probeCommandV(strategy.binary);
}
case 'registryAppPaths': {
return probeRegistryAppPaths(strategy.exeName);
}
}
};
export const detectApp = async (id: OpenInAppId, platform: NodeJS.Platform): Promise<boolean> => {
if (ALWAYS_INSTALLED[platform] === id) {
return true;
}
const descriptor = APP_REGISTRY[id];
const strategy = descriptor?.detect[platform];
if (!strategy) {
return false;
}
return runDetectStrategy(strategy);
};
export const detectAllApps = async (
platform: NodeJS.Platform = process.platform,
): Promise<DetectedApp[]> => {
const entries = Object.entries(APP_REGISTRY) as Array<
[OpenInAppId, (typeof APP_REGISTRY)[OpenInAppId]]
>;
const installedFlags = await Promise.all(entries.map(([id]) => detectApp(id, platform)));
// Extract icons for installed apps only. Extraction shells out to plutil +
// sips (see iconExtractor.ts) so it cannot crash the renderer; failures
// resolve to undefined and the renderer falls back to lucide icons.
const installedIds = entries.filter((_entry, i) => installedFlags[i]).map(([id]) => id);
const icons = await extractAllIcons(installedIds, platform);
return entries.map(([id, descriptor], i) => {
const installed = installedFlags[i];
const icon = installed ? icons.get(id) : undefined;
return {
displayName: descriptor.displayName,
id,
installed,
...(icon ? { icon } : {}),
} satisfies DetectedApp;
});
};
@@ -0,0 +1,210 @@
import { execFile } from 'node:child_process';
import { access, mkdtemp, readFile, unlink } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
import type { OpenInAppId } from '@lobechat/electron-client-ipc';
import { createLogger } from '@/utils/logger';
import { APP_REGISTRY } from './registry';
const logger = createLogger('modules:openInApp:iconExtractor');
// Manual promise wrapper rather than util.promisify(execFile): the latter
// relies on execFile's custom `util.promisify.custom` symbol to return
// `{ stdout, stderr }`, which vi.fn() mocks don't carry — so destructuring
// silently yields `undefined` under test. This wrapper resolves directly to
// the stdout string and is mock-friendly.
const execFileToString = (
file: string,
args: string[],
opts?: { timeout?: number },
): Promise<string> =>
new Promise((resolve, reject) => {
const cb = (err: Error | null, stdout: string, stderr: string) => {
if (err) {
(err as Error & { stderr?: string }).stderr = stderr;
reject(err);
} else {
resolve(stdout);
}
};
if (opts) execFile(file, args, opts, cb);
else execFile(file, args, cb);
});
/** Render dimensions for the extracted PNG. 64 keeps the payload tiny while
* staying crisp at the renderer's 16-20 px display size on retina. */
const ICON_SIZE = 64;
/** Per-extraction bound. plutil and sips are local file ops; tens of ms is
* typical, so a generous timeout still catches real hangs. */
const EXEC_TIMEOUT_MS = 5000;
let tmpDirPromise: Promise<string | undefined> | undefined;
const ensureTmpDir = async (): Promise<string | undefined> => {
if (tmpDirPromise) return tmpDirPromise;
tmpDirPromise = (async () => {
try {
return await mkdtemp(path.join(tmpdir(), 'lobehub-openinapp-'));
} catch (error) {
logger.debug(`failed to create tmp dir: ${(error as Error).message}`);
return undefined;
}
})();
return tmpDirPromise;
};
let toolsAvailablePromise: Promise<boolean> | undefined;
/**
* Confirm `plutil` and `sips` are both on PATH. Both ship with every macOS
* install so this is effectively a sanity check; cached for the process lifetime.
*/
const areToolsAvailable = (): Promise<boolean> => {
if (toolsAvailablePromise) return toolsAvailablePromise;
toolsAvailablePromise = (async () => {
try {
await execFileToString('/usr/bin/which', ['plutil']);
await execFileToString('/usr/bin/which', ['sips']);
return true;
} catch {
logger.debug('plutil or sips missing from PATH; falling back to renderer icons');
return false;
}
})();
return toolsAvailablePromise;
};
const resolveDarwinBundlePath = async (id: OpenInAppId): Promise<string | undefined> => {
const strategy = APP_REGISTRY[id]?.detect.darwin;
if (!strategy || strategy.type !== 'appBundle') return undefined;
for (const candidate of strategy.paths) {
try {
await access(candidate);
return candidate;
} catch {
// try next
}
}
return undefined;
};
/**
* Look up the bundle's icon file name via Info.plist (`CFBundleIconFile`).
* Returns the resolved absolute .icns path, or undefined if not derivable.
*/
const resolveIcnsPath = async (bundlePath: string): Promise<string | undefined> => {
const plistPath = path.join(bundlePath, 'Contents', 'Info.plist');
try {
const stdout = await execFileToString(
'plutil',
['-extract', 'CFBundleIconFile', 'raw', plistPath],
{ timeout: EXEC_TIMEOUT_MS },
);
const iconName = stdout.trim();
if (!iconName) return undefined;
const fileName = iconName.endsWith('.icns') ? iconName : `${iconName}.icns`;
const icnsPath = path.join(bundlePath, 'Contents', 'Resources', fileName);
await access(icnsPath);
return icnsPath;
} catch (error) {
logger.debug(`resolveIcnsPath failed for ${bundlePath}: ${(error as Error).message}`);
return undefined;
}
};
/**
* Resize/convert the given .icns to a 64×64 PNG using sips, then return the
* base64 data URL. The PNG file is unlinked after read.
*/
const renderIcnsToDataUrl = async (
icnsPath: string,
tmpDir: string,
filename: string,
): Promise<string | undefined> => {
const outPath = path.join(tmpDir, filename);
try {
await execFileToString(
'sips',
[
'-z',
String(ICON_SIZE),
String(ICON_SIZE),
'-s',
'format',
'png',
icnsPath,
'--out',
outPath,
],
{ timeout: EXEC_TIMEOUT_MS },
);
const buf = await readFile(outPath);
if (buf.length === 0) return undefined;
return `data:image/png;base64,${buf.toString('base64')}`;
} catch (error) {
logger.debug(`sips failed for ${icnsPath}: ${(error as Error).message}`);
return undefined;
} finally {
unlink(outPath).catch(() => undefined);
}
};
/**
* Extract the real macOS app icon for the given AppId by reading the bundle's
* Info.plist (`CFBundleIconFile`) and rendering the resolved .icns via `sips`.
* Both `plutil` and `sips` ship with every macOS install — no Xcode, swift, or
* electron-builder bundling required, and no JXA / NSImage drawing path
* (which is broken in JXA: lockFocus and NSGraphicsContext class methods are
* not exposed). macOS only; other platforms return undefined.
*/
export const extractAppIcon = async (
id: OpenInAppId,
platform: NodeJS.Platform = process.platform,
): Promise<string | undefined> => {
if (platform !== 'darwin') return undefined;
try {
if (!(await areToolsAvailable())) return undefined;
const bundlePath = await resolveDarwinBundlePath(id);
if (!bundlePath) return undefined;
const icnsPath = await resolveIcnsPath(bundlePath);
if (!icnsPath) return undefined;
const tmpDir = await ensureTmpDir();
if (!tmpDir) return undefined;
return await renderIcnsToDataUrl(icnsPath, tmpDir, `${id}.png`);
} catch (error) {
logger.debug(`extractAppIcon error for ${id}: ${(error as Error).message}`);
return undefined;
}
};
/**
* Resolve icons for a list of installed AppIds. Sequential — keeps spawn
* pressure low and matches the underlying single-thread tools.
*/
export const extractAllIcons = async (
installedIds: OpenInAppId[],
platform: NodeJS.Platform = process.platform,
): Promise<Map<OpenInAppId, string>> => {
const map = new Map<OpenInAppId, string>();
for (const id of installedIds) {
try {
const icon = await extractAppIcon(id, platform);
if (icon) map.set(id, icon);
} catch (error) {
logger.debug(`extractAllIcons: skipping ${id} after error: ${(error as Error).message}`);
}
}
return map;
};
/**
* Test-only: reset the module-level caches so each test starts fresh.
*/
export const __resetForTest = () => {
tmpDirPromise = undefined;
toolsAvailablePromise = undefined;
};
@@ -0,0 +1,106 @@
import { execFile } from 'node:child_process';
import { access } from 'node:fs/promises';
import path from 'node:path';
import { promisify } from 'node:util';
import type { OpenInAppId, OpenInAppResult } from '@lobechat/electron-client-ipc';
import { shell } from 'electron';
import { createLogger } from '@/utils/logger';
import type { LaunchStrategy } from './registry';
import { APP_REGISTRY } from './registry';
const logger = createLogger('modules:openInApp:launchers');
const execFileAsync = promisify(execFile);
const SAFE_BINARY_REGEX = /^[\w.-]+$/;
const isAllowedBinary = (binary: string): boolean =>
SAFE_BINARY_REGEX.test(binary) || path.isAbsolute(binary);
interface ExecError extends Error {
stderr?: string;
}
const formatExecError = (error: unknown): string => {
const err = error as ExecError;
const stderr = typeof err?.stderr === 'string' ? err.stderr.trim() : '';
const fallback = err?.message ?? 'Launch failed';
return (stderr || fallback).slice(0, 200);
};
const runLaunchStrategy = async (
strategy: LaunchStrategy,
absolutePath: string,
): Promise<OpenInAppResult> => {
switch (strategy.type) {
case 'macOpenA': {
try {
await execFileAsync('open', ['-a', strategy.appName, absolutePath]);
return { success: true };
} catch (error) {
return { error: formatExecError(error), success: false };
}
}
case 'macOpen': {
try {
await execFileAsync('open', [absolutePath]);
return { success: true };
} catch (error) {
return { error: formatExecError(error), success: false };
}
}
case 'exec': {
if (!isAllowedBinary(strategy.binary)) {
return { error: 'Invalid binary name', success: false };
}
const extraArgs = strategy.args ?? [];
try {
await execFileAsync(strategy.binary, [...extraArgs, absolutePath]);
return { success: true };
} catch (error) {
return { error: formatExecError(error), success: false };
}
}
case 'shellOpenPath': {
const result = await shell.openPath(absolutePath);
return result ? { error: result, success: false } : { success: true };
}
}
};
export const launchApp = async (
id: OpenInAppId,
absolutePath: string,
platform: NodeJS.Platform = process.platform,
): Promise<OpenInAppResult> => {
const descriptor = APP_REGISTRY[id];
const strategy = descriptor?.launch[platform];
if (!descriptor || !strategy) {
const displayName = descriptor?.displayName ?? id;
return {
error: `${displayName} is not available on this platform`,
success: false,
};
}
if (!path.isAbsolute(absolutePath)) {
return { error: 'Path must be absolute', success: false };
}
try {
await access(absolutePath);
} catch {
return { error: `Path not found: ${absolutePath}`, success: false };
}
const result = await runLaunchStrategy(strategy, absolutePath);
if (result.success) {
logger.info(`launched ${id} at ${absolutePath}`);
} else {
logger.error(`failed to launch ${id} at ${absolutePath}: ${result.error}`);
}
return result;
};
@@ -0,0 +1,129 @@
import type { OpenInAppId } from '@lobechat/electron-client-ipc';
export type DetectStrategy =
| { paths: string[]; type: 'appBundle' }
| { exeName: string; type: 'registryAppPaths' }
| { binary: string; type: 'commandV' };
export type LaunchStrategy =
| { appName: string; type: 'macOpenA' }
| { type: 'macOpen' }
| { args?: string[]; binary: string; type: 'exec' }
| { type: 'shellOpenPath' };
export interface AppDescriptor {
detect: Partial<Record<NodeJS.Platform, DetectStrategy>>;
displayName: string;
launch: Partial<Record<NodeJS.Platform, LaunchStrategy>>;
}
export const APP_REGISTRY: Record<OpenInAppId, AppDescriptor> = {
vscode: {
detect: {
darwin: { paths: ['/Applications/Visual Studio Code.app'], type: 'appBundle' },
linux: { binary: 'code', type: 'commandV' },
win32: { exeName: 'Code.exe', type: 'registryAppPaths' },
},
displayName: 'VS Code',
launch: {
darwin: { appName: 'Visual Studio Code', type: 'macOpenA' },
linux: { binary: 'code', type: 'exec' },
win32: { binary: 'code', type: 'exec' },
},
},
cursor: {
detect: {
darwin: { paths: ['/Applications/Cursor.app'], type: 'appBundle' },
linux: { binary: 'cursor', type: 'commandV' },
win32: { exeName: 'Cursor.exe', type: 'registryAppPaths' },
},
displayName: 'Cursor',
launch: {
darwin: { appName: 'Cursor', type: 'macOpenA' },
linux: { binary: 'cursor', type: 'exec' },
win32: { binary: 'cursor', type: 'exec' },
},
},
zed: {
detect: {
darwin: { paths: ['/Applications/Zed.app'], type: 'appBundle' },
linux: { binary: 'zed', type: 'commandV' },
},
displayName: 'Zed',
launch: {
darwin: { appName: 'Zed', type: 'macOpenA' },
linux: { binary: 'zed', type: 'exec' },
},
},
webstorm: {
detect: {
darwin: { paths: ['/Applications/WebStorm.app'], type: 'appBundle' },
linux: { binary: 'webstorm', type: 'commandV' },
win32: { exeName: 'webstorm64.exe', type: 'registryAppPaths' },
},
displayName: 'WebStorm',
launch: {
darwin: { appName: 'WebStorm', type: 'macOpenA' },
linux: { binary: 'webstorm', type: 'exec' },
win32: { binary: 'webstorm', type: 'exec' },
},
},
xcode: {
detect: { darwin: { paths: ['/Applications/Xcode.app'], type: 'appBundle' } },
displayName: 'Xcode',
launch: { darwin: { appName: 'Xcode', type: 'macOpenA' } },
},
finder: {
detect: {
darwin: { paths: ['/System/Library/CoreServices/Finder.app'], type: 'appBundle' },
},
displayName: 'Finder',
launch: { darwin: { type: 'macOpen' } },
},
explorer: {
detect: { win32: { exeName: 'explorer.exe', type: 'registryAppPaths' } },
displayName: 'Explorer',
launch: { win32: { type: 'shellOpenPath' } },
},
files: {
detect: { linux: { binary: 'xdg-open', type: 'commandV' } },
displayName: 'Files',
launch: { linux: { type: 'shellOpenPath' } },
},
terminal: {
detect: {
darwin: {
paths: [
'/System/Applications/Utilities/Terminal.app',
'/Applications/Utilities/Terminal.app',
],
type: 'appBundle',
},
},
displayName: 'Terminal',
launch: { darwin: { appName: 'Terminal', type: 'macOpenA' } },
},
iterm2: {
detect: { darwin: { paths: ['/Applications/iTerm.app'], type: 'appBundle' } },
displayName: 'iTerm2',
launch: { darwin: { appName: 'iTerm', type: 'macOpenA' } },
},
ghostty: {
detect: {
darwin: { paths: ['/Applications/Ghostty.app'], type: 'appBundle' },
linux: { binary: 'ghostty', type: 'commandV' },
},
displayName: 'Ghostty',
launch: {
darwin: { appName: 'Ghostty', type: 'macOpenA' },
linux: { binary: 'ghostty', type: 'exec' },
},
},
};
/** AppIds that are always considered "installed" — file managers, which we treat as platform-provided. */
export const ALWAYS_INSTALLED: Partial<Record<NodeJS.Platform, OpenInAppId>> = {
darwin: 'finder',
linux: 'files',
win32: 'explorer',
};
+1
View File
@@ -19,6 +19,7 @@ export interface ElectronMainStore {
gatewayEnabled: boolean;
gatewayUrl: string;
locale: string;
localFileWorkspaceRoots: string[];
networkProxy: NetworkProxySettings;
shortcuts: Record<string, string>;
storagePath: string;
+24
View File
@@ -4,22 +4,46 @@ export const getExportMimeType = (filePath: string) => {
const ext = path.extname(filePath).toLowerCase();
const map: Record<string, string> = {
'.bash': 'text/plain; charset=utf-8',
'.c': 'text/plain; charset=utf-8',
'.cpp': 'text/plain; charset=utf-8',
'.css': 'text/css; charset=utf-8',
'.csv': 'text/csv; charset=utf-8',
'.dockerfile': 'text/plain; charset=utf-8',
'.fish': 'text/plain; charset=utf-8',
'.gif': 'image/gif',
'.go': 'text/plain; charset=utf-8',
'.graphql': 'application/graphql; charset=utf-8',
'.h': 'text/plain; charset=utf-8',
'.hpp': 'text/plain; charset=utf-8',
'.html': 'text/html; charset=utf-8',
'.ico': 'image/x-icon',
'.jpeg': 'image/jpeg',
'.jpg': 'image/jpeg',
'.js': 'application/javascript; charset=utf-8',
'.jsx': 'application/javascript; charset=utf-8',
'.json': 'application/json; charset=utf-8',
'.log': 'text/plain; charset=utf-8',
'.map': 'application/json; charset=utf-8',
'.md': 'text/markdown; charset=utf-8',
'.mdx': 'text/markdown; charset=utf-8',
'.mp4': 'video/mp4',
'.png': 'image/png',
'.py': 'text/plain; charset=utf-8',
'.rs': 'text/plain; charset=utf-8',
'.sh': 'text/plain; charset=utf-8',
'.svg': 'image/svg+xml; charset=utf-8',
'.toml': 'application/toml; charset=utf-8',
'.ts': 'text/plain; charset=utf-8',
'.tsx': 'text/plain; charset=utf-8',
'.txt': 'text/plain; charset=utf-8',
'.xml': 'application/xml; charset=utf-8',
'.yaml': 'application/yaml; charset=utf-8',
'.yml': 'application/yaml; charset=utf-8',
'.webp': 'image/webp',
'.woff': 'font/woff',
'.woff2': 'font/woff2',
'.zsh': 'text/plain; charset=utf-8',
};
return map[ext];
+4 -4
View File
@@ -19,10 +19,10 @@ tags:
## 连接模式
LobeHub 持两种 QQ 机器人连接模式:
LobeHub 持两种 QQ 机器人连接模式:
- **WebSocket(推荐)** — 持久连接。事件通过 WebSocket 实时推送,无需配置回调地址。这是新机器人的默认模式。
- **Webhook** — 无状态 HTTP 调。如果您的机器人已在 QQ 开放平台配置了回调地址且无法切换,请使用此模式。
- **Webhook** — 无状态 HTTP 调。如果您的机器人已在 QQ 开放平台配置了回调地址且无法切换,请使用此模式。
> **注意:** 在 QQ 开放平台上,一旦机器人配置了 Webhook 回调地址,就无法切换到 WebSocket 模式。尚未配置回调地址的新机器人应使用 WebSocket 模式。
@@ -60,7 +60,7 @@ LobeHub 持两种 QQ 机器人连接模式:
<Steps>
### 打开渠道设置
在 LobeHub 中,导航到您的代理设置,然后选择 **渠道** 标签页。平台列表中点击 **QQ**。
在 LobeHub 中,导航到您的代理设置,然后选择 **渠道** 标签页。平台列表中点击 **QQ**。
### 输入应用凭证
@@ -199,7 +199,7 @@ LobeHub 持两种 QQ 机器人连接模式:
## 故障排除
- **机器人无法连接(WebSocket 模式):** 验证 App ID 和 App Secret 是否正确。确保机人在 QQ 开放平台上未配置回调地址 — 一旦设置了回调地址,WebSocket 模式将不可用。
- **机器人无法连接(WebSocket 模式):** 验证 App ID 和 App Secret 是否正确。确保机人在 QQ 开放平台上未配置回调地址 — 一旦设置了回调地址,WebSocket 模式将不可用。
- **回调地址验证失败(Webhook 模式):** 确保您已在 LobeHub 中保存配置,并正确复制了 URL。LobeHub 会自动处理 Ed25519 验证。
- **机器人未响应:** 验证 App ID 和 App Secret 是否正确,机器人是否已发布(或您是沙盒测试用户),以及是否订阅了所需的消息事件。
- **群聊问题:** 确保机器人已被添加到群聊中。@提及机器人以触发响应。
+105
View File
@@ -0,0 +1,105 @@
---
title: Use LobeHub on Discord
description: >-
Add the official LobeHub bot to a Discord server, then link your Discord
account to LobeHub. Pick a default agent and chat with your AI assistants in
Discord DMs — no bot setup required.
tags:
- Messenger
- Discord
- LobeHub Bot
- Account Linking
- Server Install
---
# Use LobeHub on Discord
Discord works in two phases: a **server admin adds** the official LobeHub bot to a Discord server once, and then **each member links** their personal Discord account to LobeHub. Both phases happen from **Settings → Messenger → Discord**.
> The Discord install audit is per-server, but your **personal link is global** to your Discord account — you only link once, and the same link works in every server that has the bot.
## Prerequisites
- A LobeHub account
- A Discord account
- For the install step: **Manage Server** permission on the target Discord server
## Phase A — Add the LobeHub bot to a server (server admin)
<Steps>
### Open Settings → Messenger → Discord
In LobeHub, open **Settings → Messenger** and click the **Discord** card. Click **Connect** in the top-right.
{/* TODO: screenshot — Discord detail page with empty Connections list and the Connect button */}
### Authorise in Discord
You'll be redirected to Discord's bot-add screen. Pick the server you want to add the bot to and click **Authorise**.
{/* TODO: screenshot — Discord OAuth consent screen with the server picker */}
### Server appears under Connections
After approval you're redirected back to LobeHub. The server appears as a **server** row in **Connections**.
{/* TODO: screenshot — Discord detail page showing one connected server row */}
> **Server already connected by someone else?** LobeHub shows a "Server already connected" notice. You don't need to add the bot again — just DM the LobeHub bot in Discord to link your personal account.
</Steps>
## Phase B — Link your personal account (each member)
<Steps>
### Open the LobeHub bot in Discord
Open the LobeHub bot in Discord — the **Open in Discord** button on the Discord detail page (or the pending-link row) takes you straight there.
{/* TODO: screenshot — Discord detail page with the pending user row + Open in Discord button */}
### Send any message
In the bot DM, send any message to trigger the linking flow. The bot replies with a one-time confirmation link.
{/* TODO: screenshot — Discord DM with the bot's reply containing the link button */}
### Confirm the link in your browser
Tap the link, sign in to LobeHub if asked, and choose a **default agent**. Every message you DM the LobeHub bot in Discord (across all servers) will route to this agent.
{/* TODO: screenshot — confirm-link page in LobeHub with the agent picker */}
Your link appears as a **user** row in **Connections**.
{/* TODO: screenshot — Discord detail page showing server row + connected user row */}
</Steps>
## Switching the Active Agent
Two equivalent ways:
- **In Discord** — DM the bot `/agents` and pick a different agent.
- **In LobeHub** — open **Settings → Messenger → Discord** and use the agent picker on your link row.
The change takes effect on the next message you send.
## Disconnecting
Discord has two distinct disconnect actions, with one important difference from Slack:
| Action | Effect |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Disconnect** on a *user* row | Unlinks **your** LobeHub account from your Discord account. The bot stops accepting your DMs until you message it and link again. |
| **Disconnect** on a *server* row | Removes the install **audit entry only**. **The bot stays in the Discord server** until a server admin manually kicks it. Other people's personal links are unaffected. |
You can re-add the bot to a server (or re-link personally) at any time by repeating the relevant phase.
## Troubleshooting
- **"Server already connected"** — Another LobeHub user already added the bot to this server. DM the LobeHub bot in Discord to link your personal account; you do not need to add the bot again.
- **Discord install failed (`<reason>`)** — Common reasons: authorisation cancelled, install session expired (re-open the modal and try again), Discord returned incomplete data (retry; if persistent, contact support).
- **Bot is in the server but doesn't reply** — Check that you have a personal link under **Settings → Messenger → Discord**. The bot only answers users with a confirmed personal link.
- **Removed the audit row but the bot is still in my server** — That's expected. Disconnecting in LobeHub only removes the audit entry; a Discord server admin must kick the bot from Discord itself.
- **"This link is already used"** — One-time confirmation links expire after one use. DM the bot again to get a new link.
- **"This account is already linked"** — Your Discord account is bound to a different LobeHub account. Sign in to that LobeHub account to manage the link, or unlink there before retrying.
- **"Another Discord account is already linked"** — Your LobeHub account already has a Discord link. Disconnect it in **Settings → Messenger → Discord** before linking a new Discord account.
+104
View File
@@ -0,0 +1,104 @@
---
title: 在 Discord 使用 LobeHub
description: >-
把官方 LobeHub 机器人加入 Discord 服务器,再把自己的 Discord 账号关联到
LobeHub;选择默认 Agent,就能在 Discord DM 里直接和 AI 助手对话,无需自建机器人。
tags:
- Messenger
- Discord
- LobeHub 机器人
- 账号关联
- 服务器安装
---
# 在 Discord 使用 LobeHub
Discord 接入分两步:**服务器管理员把 LobeHub 机器人加入 Discord 服务器**(每个服务器一次),然后 **每位成员把自己的 Discord 账号关联到 LobeHub**。两步都在 **设置 → Messenger → Discord** 里完成。
> Discord 安装审计是按服务器记录的,但你的 **个人关联是全局的**,挂在你的 Discord 账号下 —— 只需关联一次,所有装了机器人的服务器里它都生效。
## 前置条件
- 一个 LobeHub 账号
- 一个 Discord 账号
- 安装环节:目标 Discord 服务器的 **Manage Server(管理服务器)** 权限
## 阶段 A —— 把 LobeHub 机器人加入服务器(服务器管理员)
<Steps>
### 打开「设置 → Messenger → Discord」
在 LobeHub 中打开 **设置 → Messenger**,点击 **Discord** 卡片,再点右上角的 **连接**。
{/* TODO: 截图 —— Discord 详情页(Connections 列表为空 + Connect 按钮) */}
### 在 Discord 中授权
页面跳转到 Discord 添加机器人页面。选择目标服务器,点击 **Authorise(授权)**。
{/* TODO: 截图 —— Discord OAuth 授权页(含服务器选择器) */}
### 服务器出现在 Connections 列表
授权成功后跳回 LobeHub。该服务器会以 **server** 行的形式出现在 **Connections** 中。
{/* TODO: 截图 —— Discord 详情页:已连接的 server 行 */}
> **服务器已被他人连接?** LobeHub 会提示「Server already connected」。你**不需要**再次添加机器人,只要在 Discord 里私聊 LobeHub 机器人完成个人账号关联即可。
</Steps>
## 阶段 B —— 关联个人账号(每位成员)
<Steps>
### 在 Discord 中打开 LobeHub 机器人
在 Discord 中打开 LobeHub 机器人 —— Discord 详情页(或 pending 状态的 user 行)上的 **在 Discord 中打开** 按钮可以直接跳过去。
{/* TODO: 截图 —— Discord 详情页:pending 的 user 行 + Open in Discord 按钮 */}
### 发送任意一条消息
在机器人 DM 里发送任意一条消息触发关联流程。机器人会回复一个一次性确认链接。
{/* TODO: 截图 —— Discord DM 中机器人发送的关联按钮消息 */}
### 在浏览器里确认关联
点击链接,必要时登录 LobeHub,然后选择一个 **默认 Agent**。之后你在 Discord 任意服务器里私聊 LobeHub 机器人的每条消息都会路由到这个 Agent。
{/* TODO: 截图 —— LobeHub 确认关联页面,含 Agent 选择器 */}
关联完成后会在 **Connections** 里以 **user** 行的形式出现。
{/* TODO: 截图 —— Discord 详情页:server 行 + 已连接的 user 行 */}
</Steps>
## 切换接收消息的 Agent
两种等价方式:
- **在 Discord 里** —— 私聊机器人发送 `/agents`,挑一个新的 Agent。
- **在 LobeHub 里** —— 打开 **设置 → Messenger → Discord**,在你的关联行里使用 Agent 选择器。
切换会对你发送的下一条消息立即生效。
## 断开连接
Discord 也有两种含义不同的断开操作,有一处和 Slack 不同需要特别注意:
| 操作 | 效果 |
| -------------------- | ----------------------------------------------------------------------------- |
| 在 *user* 行点 **断开** | 解除 **你自己** 的 LobeHub 账号与 Discord 账号的关联。机器人不再接收你的 DM,直到你再次发消息并完成关联。 |
| 在 *server* 行点 **断开** | **只移除安装审计记录**。**机器人会继续留在 Discord 服务器里**,直到 Discord 服务器管理员手动把它踢出。其他人的个人关联不受影响。 |
任何时候都可以重新走对应阶段把机器人加回服务器、或重新建立个人关联。
## 故障排查
- **"Server already connected"(服务器已连接)** —— 服务器已被另一位 LobeHub 用户加过机器人。直接在 Discord 私聊 LobeHub 机器人完成个人关联即可,无需重新添加。
- **Discord 安装失败(`<原因>`)** —— 常见原因:用户取消授权、安装会话过期(重新打开弹窗再试)、Discord 返回的数据不完整(重试;持续失败请联系支持)。
- **机器人在服务器但不回我消息** —— 检查 **设置 → Messenger → Discord** 下你是否有个人关联。机器人只回复完成了个人关联的用户。
- **断开了审计行,但机器人还在服务器里** —— 这是预期行为。在 LobeHub 里断开只移除审计记录,需要 Discord 服务器管理员手动从 Discord 那边把机器人踢出。
- **"This link is already used"** —— 一次性确认链接只能用一次,给机器人再发一条消息获取新链接。
- **"This account is already linked"** —— 这个 Discord 账号已绑定到另一个 LobeHub 账号。请用那个 LobeHub 账号登录管理,或先在那边解绑。
- **"Another Discord account is already linked"** —— 你的 LobeHub 账号在 Discord 上已有关联。先在 **设置 → Messenger → Discord** 断开旧关联,再绑定新的 Discord 账号。
+84
View File
@@ -0,0 +1,84 @@
---
title: Messenger Overview
description: >-
Connect your LobeHub account to the official LobeHub bot on Telegram, Slack,
and Discord. Link once, pick an active agent, and chat with your assistants
from the chat apps you already use — no bot setup required.
tags:
- Messenger
- Telegram
- Slack
- Discord
- Integration
---
# Messenger
Messenger lets you talk to your LobeHub agents through the **official LobeHub bot** on Telegram, Slack, and Discord. Link your LobeHub account once, choose which agent should answer, and you're done — every message you send to the bot is routed to your agent and replied to in the same conversation.
You manage everything from **Settings → Messenger** in LobeHub.
> \[!NOTE]
>
> Messenger is for **personal use** of LobeHub agents from your favourite chat app. If you want to expose an agent to a public community with your own bot identity, set up a [Channel](/docs/usage/channels/overview) on the agent instead.
## Messenger vs. Channels
| | **Messenger** | **Channels** |
| ------------- | --------------------------------------------- | --------------------------------------------------------------------- |
| Bot identity | Official **@LobeHub** bot, hosted by LobeHub | Your own bot, you bring the token |
| Setup effort | Tap **Connect**, send `/start`, pick an agent | Create the bot on the platform, paste credentials, configure policies |
| Scope | Personal — only you talk to the bot | Public — anyone in the channel/server can talk to it |
| Active agent | One per platform link, switchable any time | One agent per channel binding |
| Configured at | Settings → Messenger | Agent → Channels |
## Supported Platforms
| Platform | Setup model | Guide |
| ------------ | ---------------------------------------- | --------------------------------------------------------- |
| **Telegram** | Global bot — any account can DM directly | [Use LobeHub on Telegram](/docs/usage/messenger/telegram) |
| **Slack** | Per-workspace install + per-member link | [Use LobeHub on Slack](/docs/usage/messenger/slack) |
| **Discord** | Per-server install + per-member link | [Use LobeHub on Discord](/docs/usage/messenger/discord) |
If a platform card does not appear at **Settings → Messenger**, it has not been enabled on your deployment yet — check back later or ask your administrator.
{/* TODO: screenshot — Settings → Messenger landing screen showing the three platform cards */}
## How It Works
1. You **link** your LobeHub account to a platform account through a short OAuth-style flow.
2. You pick a **default agent** during linking. Every message you send to the bot from that platform routes to this agent.
3. To switch agents, send `/agents` inside the bot or open **Settings → Messenger** in LobeHub.
4. **Disconnect** any time from the same screen — inbound messages stop until you `/start` again.
Each LobeHub account can hold one link per platform (Slack also tracks one link per workspace).
## Switching the Active Agent
You can switch the agent that answers your messages at any time:
- **From the bot** — send `/agents` and pick a different agent.
- **From LobeHub** — open **Settings → Messenger**, select the platform, and use the agent picker on your link row.
Changes take effect immediately for the next message you send.
## Disconnecting
There are two distinct disconnect actions per platform:
| Action | Effect |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Disconnect** on a *user* row | Unlinks **your** LobeHub account from the platform account. Inbound messages stop until you `/start` again. |
| **Disconnect** on a *workspace / server* row | Removes the install audit entry. On Slack, this also freezes the workspace bot for everyone. On Discord, the bot stays in the server until a server admin kicks it. |
You can re-link at any time by repeating the **Connect** flow.
## Common Errors
These messages can appear during linking regardless of platform:
- **"This link is already used"** — The one-time confirm link can only be used once. Return to the bot and send `/start` again to issue a new link.
- **"This account is already linked"** — The platform account is bound to a different LobeHub account. Sign in to that account to manage it, or unlink it there before retrying.
- **"Another \<platform> account is already linked"** — Your LobeHub account already has a link on this platform. Disconnect the existing link in **Settings → Messenger** before linking a new one.
For platform-specific issues, see the troubleshooting section on each platform's guide.
+83
View File
@@ -0,0 +1,83 @@
---
title: Messenger 概览
description: >-
将 LobeHub 账号一键关联到 Telegram、Slack、Discord 上的官方 LobeHub
机器人。只需绑定一次,选择默认 Agent,就能在常用聊天工具里直接和你的 AI 助手对话,无需自建机器人。
tags:
- Messenger
- Telegram
- Slack
- Discord
- 集成
---
# Messenger
Messenger 让你通过 **官方 LobeHub 机器人** 在 Telegram、Slack、Discord 上直接和 LobeHub Agent 对话。只需将 LobeHub 账号绑定一次、选好接收消息的 Agent,之后你在机器人里发的每一条消息都会被路由到该 Agent 并在同一会话里回复给你。
所有配置都集中在 LobeHub 的 **设置 → Messenger** 页面。
> \[!NOTE]
>
> Messenger 面向 **个人使用** —— 让你在常用聊天工具里方便地用自己的 LobeHub Agent。如果你想以自家机器人身份把某个 Agent 公开给社区使用,请改用 Agent 上的 [渠道(Channels](/docs/usage/channels/overview)。
## Messenger 与渠道(Channels)的区别
| | **Messenger** | **渠道(Channels** |
| -------- | -------------------------------- | ---------------------- |
| 机器人身份 | 官方 **@LobeHub** 机器人,由 LobeHub 托管 | 你自己的机器人,需要自带 Token |
| 配置成本 | 点 **连接**、发送 `/start`、选一个 Agent | 在平台上创建机器人、粘贴凭据、配置策略 |
| 适用场景 | 个人 —— 只有你自己和机器人对话 | 公开 —— 频道 / 服务器里所有人都能对话 |
| 接收 Agent | 每个平台绑定一个,可随时切换 | 每个频道绑定一个 Agent |
| 配置入口 | 设置 → Messenger | Agent → 渠道 |
## 支持的平台
| 平台 | 接入模式 | 文档 |
| ------------ | ------------------- | ------------------------------------------------------- |
| **Telegram** | 全局机器人 —— 任意账号都可直接私聊 | [在 Telegram 使用 LobeHub](/docs/usage/messenger/telegram) |
| **Slack** | 按工作区安装 + 成员各自关联 | [在 Slack 使用 LobeHub](/docs/usage/messenger/slack) |
| **Discord** | 按服务器安装 + 成员各自关联 | [在 Discord 使用 LobeHub](/docs/usage/messenger/discord) |
如果 **设置 → Messenger** 页面没有出现某个平台的卡片,说明当前部署尚未启用该平台 —— 请稍后再来,或联系管理员开启。
{/* TODO: 截图 —— 设置 → Messenger 入口页,三个平台卡片 */}
## 工作原理
1. 通过一段类 OAuth 的流程,将你的 LobeHub 账号 **关联** 到平台账号。
2. 关联时选择一个 **默认 Agent**,之后该平台收到的消息都会路由到这个 Agent。
3. 切换 Agent:在机器人里发送 `/agents`,或回到 LobeHub 的 **设置 → Messenger**。
4. 随时可以在同一页面 **断开连接** —— 断开后机器人将不再接收消息,直到你重新 `/start`。
每个 LobeHub 账号在每个平台上可保留一条关联(Slack 还会按工作区各保留一条)。
## 切换接收消息的 Agent
你可以随时切换接收你消息的 Agent:
- **在机器人里** —— 发送 `/agents`,挑一个新的 Agent。
- **在 LobeHub 里** —— 打开 **设置 → Messenger**,选择平台,在你的关联行里使用 Agent 选择器。
切换会立即对你发送的下一条消息生效。
## 断开连接
每个平台有两种含义不同的断开操作:
| 操作 | 效果 |
| -------------------------------- | ------------------------------------------------------------------------ |
| 在 *user* 行点 **断开** | 解除 **你自己** 的 LobeHub 账号与该平台账号的关联。机器人不再接收你的消息,直到你重新 `/start`。 |
| 在 *workspace / server* 行点 **断开** | 移除安装审计记录。Slack 会因此让该工作区的整个机器人失效;Discord 上机器人会继续留在服务器,直到 Discord 管理员把它踢出。 |
任何时候都可以重新走一次 **连接** 流程恢复关联。
## 通用报错
下面这几条提示在任何平台关联时都可能出现:
- **"This link is already used"(链接已被使用)** —— 一次性确认链接只能使用一次。请回到机器人重新发送 `/start` 获取新链接。
- **"This account is already linked"(该账号已被关联)** —— 该平台账号已绑定到另一个 LobeHub 账号。请用那个 LobeHub 账号登录管理;或先在那边解绑后再尝试。
- **"Another \<platform> account is already linked"(另一个平台账号已关联)** —— 你的 LobeHub 账号在该平台上已有关联。先在 **设置 → Messenger** 里断开旧关联,再绑定新账号。
平台特有的报错和细节请见各平台文档的「故障排查」一节。
+102
View File
@@ -0,0 +1,102 @@
---
title: Use LobeHub on Slack
description: >-
Install the official LobeHub Slack app to your workspace, then link each
member's Slack account to LobeHub. Pick a default agent and chat with your AI
assistants from Slack DMs — no bot setup required.
tags:
- Messenger
- Slack
- LobeHub Bot
- Account Linking
- Workspace Install
---
# Use LobeHub on Slack
Slack works in two phases: a **workspace admin installs** the official LobeHub Slack app once, and then **each member links** their personal LobeHub account. Both phases happen from **Settings → Messenger → Slack**.
## Prerequisites
- A LobeHub account
- A Slack workspace
- For the install step: permission to install Slack apps in that workspace (typically Workspace Admin or a permission granted by one)
## Phase A — Install the LobeHub Slack app (admin, once per workspace)
<Steps>
### Open Settings → Messenger → Slack
In LobeHub, open **Settings → Messenger** and click the **Slack** card. Click **Connect** in the top-right.
{/* TODO: screenshot — Slack detail page with empty Connections list and the Connect button */}
### Authorise in Slack
You'll be redirected to Slack's authorisation screen. Pick the workspace you want to install into and click **Allow**.
{/* TODO: screenshot — Slack OAuth consent screen */}
### Workspace appears under Connections
After approval you're redirected back to LobeHub. The workspace shows up as a **workspace** row in **Connections**, with a status of **Connected**.
{/* TODO: screenshot — Slack detail page showing one connected workspace row */}
> **Workspace already connected by someone else?** LobeHub blocks the install and shows a "Workspace already connected" notice. You don't need to install again — just DM **@LobeHub** in Slack to link your personal account. If you want to take over ownership, ask the original installer to disconnect the workspace first.
</Steps>
## Phase B — Link your personal account (each member)
<Steps>
### Open the LobeHub bot in Slack
In Slack, open the **Apps** sidebar and find **LobeHub**, or search for `@LobeHub`. Open a DM with the bot.
{/* TODO: screenshot — Slack apps sidebar with LobeHub highlighted */}
### Send any message
Send any message to the bot to trigger the linking flow. The bot replies with a one-time confirmation link.
{/* TODO: screenshot — Slack DM showing the bot's "Link Account" reply */}
### Confirm the link in your browser
Tap the link, sign in to LobeHub if asked, and choose a **default agent**. Every message you DM the bot in this workspace will route to this agent.
{/* TODO: screenshot — confirm-link page in LobeHub with the agent picker */}
Your link appears as a **user** row under the workspace install in **Connections**.
{/* TODO: screenshot — Slack detail page showing the workspace row + a connected user row */}
</Steps>
## Switching the Active Agent
Two equivalent ways:
- **In Slack** — DM the bot `/agents` and pick a different agent.
- **In LobeHub** — open **Settings → Messenger → Slack** and use the agent picker on your link row.
The change takes effect on the next message you send.
## Disconnecting
Slack has two distinct disconnect actions:
| Action | Effect |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Disconnect** on a *user* row | Unlinks **your** LobeHub account from your Slack account in this workspace. Your inbound DMs stop until you message the bot and link again. |
| **Disconnect** on a *workspace* row | Removes the workspace install. The bot is **frozen for everyone** in that workspace because dispatch is token-gated — existing user links remain on file but pause until the workspace is re-installed. |
You can re-install (workspace) or re-link (personal) at any time by repeating the relevant phase.
## Troubleshooting
- **"Workspace already connected"** — Another LobeHub user already installed the app to this workspace. DM **@LobeHub** to link your personal account; you do not need to install again. To take over ownership, ask the original installer to disconnect first.
- **Slack install failed (`<reason>`)** — Common reasons: authorisation cancelled, install session expired (re-open the modal and try again), Slack returned incomplete data (retry; if persistent, contact support).
- **Bot does not reply to your DM** — The workspace install may have been disconnected. Check **Settings → Messenger → Slack** for a workspace row; if missing, ask an admin to re-install.
- **"This link is already used"** — One-time confirmation links expire after one use. DM the bot again to get a new link.
- **"This account is already linked"** — Your Slack account is bound to a different LobeHub account. Sign in to that LobeHub account to manage the link, or unlink there before retrying.
- **"Another Slack account is already linked"** — Your LobeHub account already has a Slack link in this workspace. Disconnect it in **Settings → Messenger → Slack** before linking a new Slack account.
+101
View File
@@ -0,0 +1,101 @@
---
title: 在 Slack 使用 LobeHub
description: >-
在 Slack 工作区安装官方 LobeHub Slack 应用,再让每位成员各自关联自己的 LobeHub
账号;选择默认 Agent,就能在 Slack DM 里直接和 AI 助手对话,无需自建机器人。
tags:
- Messenger
- Slack
- LobeHub 机器人
- 账号关联
- 工作区安装
---
# 在 Slack 使用 LobeHub
Slack 接入分两步:**工作区管理员安装一次** 官方 LobeHub Slack 应用,然后 **每位成员各自关联** 自己的 LobeHub 账号。两步都在 **设置 → Messenger → Slack** 里完成。
## 前置条件
- 一个 LobeHub 账号
- 一个 Slack 工作区
- 安装环节:在该工作区里安装 Slack 应用的权限(通常是 Workspace Admin,或由管理员授予的权限)
## 阶段 A —— 安装 LobeHub Slack 应用(管理员,每个工作区一次)
<Steps>
### 打开「设置 → Messenger → Slack」
在 LobeHub 中打开 **设置 → Messenger**,点击 **Slack** 卡片,再点右上角的 **连接**。
{/* TODO: 截图 —— Slack 详情页(Connections 列表为空 + Connect 按钮) */}
### 在 Slack 中授权
页面跳转到 Slack 授权界面。选择要安装的目标工作区,点击 **Allow(允许)**。
{/* TODO: 截图 —— Slack OAuth 授权页 */}
### 工作区出现在 Connections 列表
授权成功后跳回 LobeHub。该工作区会以 **workspace** 行的形式出现在 **Connections** 中,状态为 **已连接 (Connected)**。
{/* TODO: 截图 —— Slack 详情页:已连接的 workspace 行 */}
> **工作区已被他人连接?** LobeHub 会阻止安装并提示「Workspace already connected」。你**不需要**重新安装,只要在 Slack 里私聊 **@LobeHub** 完成个人账号关联即可。如果想接管所有权,请请求最初的安装者先断开连接。
</Steps>
## 阶段 B —— 关联个人账号(每位成员)
<Steps>
### 在 Slack 里打开 LobeHub 机器人
在 Slack 左侧 **Apps** 栏里找到 **LobeHub**,或直接搜索 `@LobeHub`,打开它的 DM 会话。
{/* TODO: 截图 —— Slack Apps 栏里高亮 LobeHub */}
### 发送任意一条消息
给机器人发送任意一条消息触发关联流程。机器人会回复一个一次性确认链接。
{/* TODO: 截图 —— Slack DM 中机器人发送 "Link Account" 按钮 */}
### 在浏览器里确认关联
点击链接,必要时登录 LobeHub,然后选择一个 **默认 Agent**。之后在该工作区私聊机器人的每条消息都会路由到这个 Agent。
{/* TODO: 截图 —— LobeHub 确认关联页面,含 Agent 选择器 */}
关联完成后,会在 **Connections** 里以 **user** 行的形式出现在该工作区下方。
{/* TODO: 截图 —— Slack 详情页:workspace 行 + 一条已连接的 user 行 */}
</Steps>
## 切换接收消息的 Agent
两种等价方式:
- **在 Slack 里** —— 私聊机器人发送 `/agents`,挑一个新的 Agent。
- **在 LobeHub 里** —— 打开 **设置 → Messenger → Slack**,在你的关联行里使用 Agent 选择器。
切换会对你发送的下一条消息立即生效。
## 断开连接
Slack 有两种含义不同的断开操作:
| 操作 | 效果 |
| ----------------------- | ------------------------------------------------------------------------------- |
| 在 *user* 行点 **断开** | 解除 **你自己** 的 LobeHub 账号与该工作区 Slack 账号的关联。你的 DM 不再被接收,直到你再次给机器人发消息并完成关联。 |
| 在 *workspace* 行点 **断开** | 移除工作区安装。由于消息分发受 token 控制,这会让该工作区里**所有人的机器人都失效**;现有 user 关联记录还在,但暂停工作直到工作区被重新安装。 |
任何时候都可以重走对应阶段重新安装(工作区)或重新关联(个人)。
## 故障排查
- **"Workspace already connected"(工作区已连接)** —— 工作区已被另一位 LobeHub 用户安装过。私聊 **@LobeHub** 完成个人关联即可,无需重装。如需接管,请请求最初的安装者先断开。
- **Slack 安装失败(`<原因>`)** —— 常见原因:用户取消授权、安装会话过期(重新打开弹窗再试)、Slack 返回的数据不完整(重试;持续失败请联系支持)。
- **机器人不回 DM** —— 工作区安装可能已被断开。检查 **设置 → Messenger → Slack** 是否还有 workspace 行;没有就请管理员重新安装。
- **"This link is already used"** —— 一次性确认链接只能用一次,给机器人再发一条消息获取新链接。
- **"This account is already linked"** —— 这个 Slack 账号已绑定到另一个 LobeHub 账号。请用那个 LobeHub 账号登录管理,或先在那边解绑。
- **"Another Slack account is already linked"** —— 你的 LobeHub 账号在该工作区里已有 Slack 关联。先在 **设置 → Messenger → Slack** 断开旧关联,再绑定新的 Slack 账号。
+77
View File
@@ -0,0 +1,77 @@
---
title: Use LobeHub on Telegram
description: >-
Link your LobeHub account to the official LobeHub bot on Telegram. Send /start
to the bot, pick a default agent, and chat with your AI assistants directly
from any Telegram conversation — no bot setup required.
tags:
- Messenger
- Telegram
- LobeHub Bot
- Account Linking
---
# Use LobeHub on Telegram
Telegram is the simplest Messenger platform: there is one global LobeHub bot, and any Telegram account can DM it. You only need to link your LobeHub account once.
## Prerequisites
- A LobeHub account
- A Telegram account on any device
## Step 1: Open Settings → Messenger
In LobeHub, open **Settings → Messenger** and click the **Telegram** card.
{/* TODO: screenshot — Settings → Messenger with Telegram card highlighted */}
## Step 2: Click Connect
On the Telegram detail page, click **Connect** in the top-right corner. A modal opens with two ways to reach the bot.
{/* TODO: screenshot — Telegram detail page with empty Connections list and the Connect button */}
## Step 3: Open the bot in Telegram
Either tap **Open in Telegram** in the modal, or scan the QR code with your phone. Telegram opens the official LobeHub bot.
{/* TODO: screenshot — LinkModal showing the Open in Telegram button + QR code */}
## Step 4: Send `/start`
Inside the bot, send the `/start` command. The bot replies with a one-time confirmation link.
{/* TODO: screenshot — Telegram bot conversation showing /start sent and the bot's reply with the Link Account button */}
## Step 5: Confirm the link in your browser
Tap the link in the bot's reply. You'll be taken back to LobeHub. Sign in if asked, then choose a **default agent** — every message you DM the bot from now on will route to this agent.
{/* TODO: screenshot — confirm-link page in LobeHub with the agent picker visible */}
After confirming, the Telegram detail page shows your link as a "user" row with the active agent.
{/* TODO: screenshot — Telegram detail page with one connected user row */}
## Switching the Active Agent
Two equivalent ways:
- **In Telegram** — send `/agents` to the bot and pick a different agent.
- **In LobeHub** — open **Settings → Messenger → Telegram** and use the agent picker on your link row.
The change takes effect on the next message you send.
## Disconnecting
In **Settings → Messenger → Telegram**, click **Disconnect** on the link row. The bot will stop accepting your messages until you re-link by sending `/start` again.
> Disconnecting from LobeHub does not remove the bot from your Telegram chat list — you can manually delete the chat in Telegram if you no longer want to see it.
## Troubleshooting
- **The bot does not reply to `/start`** — Check that the platform card actually exists in **Settings → Messenger**. If your deployment hasn't enabled Telegram yet, the bot won't respond.
- **"This link is already used"** — One-time links can only be used once. Send `/start` again to get a new link.
- **"This account is already linked"** — Your Telegram account is bound to a different LobeHub account. Sign in to that LobeHub account to manage the link, or unlink there first.
- **"Another Telegram account is already linked"** — Your LobeHub account already has a Telegram link. Disconnect it in **Settings → Messenger → Telegram** before linking a new Telegram account.
+76
View File
@@ -0,0 +1,76 @@
---
title: 在 Telegram 使用 LobeHub
description: >-
将 LobeHub 账号关联到 Telegram 上的官方 LobeHub 机器人。给机器人发送
/start,选择默认 Agent,就能在任意 Telegram 会话里直接和你的 AI 助手对话,无需自建机器人。
tags:
- Messenger
- Telegram
- LobeHub 机器人
- 账号关联
---
# 在 Telegram 使用 LobeHub
Telegram 是 Messenger 里最简单的平台:只有一个全局 LobeHub 机器人,任何 Telegram 账号都能直接私聊它。你只需要把自己的 LobeHub 账号绑一次。
## 前置条件
- 一个 LobeHub 账号
- 任意设备上的 Telegram 账号
## 第 1 步:打开「设置 → Messenger」
在 LobeHub 中打开 **设置 → Messenger**,点击 **Telegram** 卡片。
{/* TODO: 截图 —— 设置 → Messenger 入口页,高亮 Telegram 卡片 */}
## 第 2 步:点击「连接」
在 Telegram 详情页右上角点击 **连接**。弹窗里会给出两种方式打开机器人。
{/* TODO: 截图 —— Telegram 详情页(Connections 列表为空 + Connect 按钮) */}
## 第 3 步:在 Telegram 中打开机器人
在弹窗里点 **在 Telegram 中打开**,或用手机扫描二维码,Telegram 会自动打开官方 LobeHub 机器人。
{/* TODO: 截图 —— LinkModal 弹窗(含 Open in Telegram 按钮和二维码) */}
## 第 4 步:发送 `/start`
在机器人会话里发送 `/start`。机器人会回复一个一次性确认链接。
{/* TODO: 截图 —— Telegram 机器人会话:用户发送 /start,机器人回复带 Link Account 按钮的消息 */}
## 第 5 步:在浏览器里确认关联
点击机器人回复里的链接,会跳回 LobeHub 网页。如未登录请先登录,然后选择一个 **默认 Agent** —— 之后你在该机器人里发的每条消息都会路由到这个 Agent。
{/* TODO: 截图 —— LobeHub 确认关联页面,含 Agent 选择器 */}
确认后,Telegram 详情页会以 “user” 行的形式显示你的关联,旁边可以看到当前 Agent。
{/* TODO: 截图 —— Telegram 详情页:已连接的 user 行 */}
## 切换接收消息的 Agent
两种等价方式:
- **在 Telegram 里** —— 给机器人发送 `/agents`,挑一个新的 Agent。
- **在 LobeHub 里** —— 打开 **设置 → Messenger → Telegram**,在你的关联行里使用 Agent 选择器。
切换会对你发送的下一条消息立即生效。
## 断开连接
在 **设置 → Messenger → Telegram** 里点关联行上的 **断开**。断开后机器人不再接收你的消息,直到你重新发送 `/start` 关联。
> 在 LobeHub 里断开不会从 Telegram 聊天列表里删掉机器人 —— 如果不想再看到它,可以在 Telegram 里手动删除该会话。
## 故障排查
- **机器人不回复 `/start`** —— 先确认 **设置 → Messenger** 里有 Telegram 卡片。如果当前部署没启用 Telegram,机器人不会响应。
- **"This link is already used"** —— 一次性链接只能用一次,重新发送 `/start` 获取新链接。
- **"This account is already linked"** —— 这个 Telegram 账号已绑定到另一个 LobeHub 账号。请用那个 LobeHub 账号登录管理,或先在那边解绑。
- **"Another Telegram account is already linked"** —— 你的 LobeHub 账号在 Telegram 上已有关联。先在 **设置 → Messenger → Telegram** 断开旧关联,再绑定新的 Telegram 账号。
+61 -16
View File
@@ -10,7 +10,8 @@ import { Given, Then, When } from '@cucumber/cucumber';
import { expect } from '@playwright/test';
import { TEST_USER } from '../../support/seedTestUser';
import { CustomWorld, WAIT_TIMEOUT } from '../../support/world';
import type { CustomWorld } from '../../support/world';
import { WAIT_TIMEOUT } from '../../support/world';
/**
* Create a test chat group directly in database
@@ -68,55 +69,97 @@ Given('用户在 Home 页面有一个 Agent Group', async function (this: Custom
console.log(` ✅ 找到 Agent Group: ${groupLabel}, id: ${groupId}`);
});
Given('该 Agent Group 未被置顶', async function (this: CustomWorld) {
Given('该 Agent Group 未被置顶', { timeout: 30_000 }, async function (this: CustomWorld) {
console.log(' 📍 Step: 检查 Agent Group 未被置顶...');
const targetItem = this.page.locator(this.testContext.targetItemSelector).first();
const pinIcon = targetItem.locator('svg.lucide-pin');
// Pin icon uses lucide-react which adds class "lucide lucide-pin"
const pinIcon = targetItem.locator('svg[class*="lucide-pin"]');
if ((await pinIcon.count()) > 0) {
await targetItem.click({ button: 'right' });
await this.page.waitForTimeout(300);
console.log(' 📍 Agent Group 已置顶,开始取消置顶操作...');
await targetItem.hover();
await this.page.waitForTimeout(200);
await targetItem.click({ button: 'right', force: true });
await this.page.waitForTimeout(500);
const unpinOption = this.page.getByRole('menuitem', { name: /取消置顶|unpin/i });
await unpinOption.waitFor({ state: 'visible', timeout: 5000 }).catch(() => {
console.log(' ⚠️ 取消置顶选项未找到');
});
if ((await unpinOption.count()) > 0) {
await unpinOption.click();
await this.page.waitForTimeout(500);
}
await this.page.click('body', { position: { x: 10, y: 10 } });
// Close menu if still open
await this.page.keyboard.press('Escape');
await this.page.waitForTimeout(300);
}
console.log(' ✅ Agent Group 未被置顶');
});
Given('该 Agent Group 已被置顶', async function (this: CustomWorld) {
Given('该 Agent Group 已被置顶', { timeout: 30_000 }, async function (this: CustomWorld) {
console.log(' 📍 Step: 确保 Agent Group 已被置顶...');
const targetItem = this.page.locator(this.testContext.targetItemSelector).first();
const pinIcon = targetItem.locator('svg.lucide-pin');
// Pin icon uses lucide-react which adds class "lucide lucide-pin"
const pinIcon = targetItem.locator('svg[class*="lucide-pin"]');
if ((await pinIcon.count()) === 0) {
await targetItem.click({ button: 'right' });
await this.page.waitForTimeout(300);
console.log(' 📍 Agent Group 未置顶,开始置顶操作...');
await targetItem.hover();
await this.page.waitForTimeout(200);
await targetItem.click({ button: 'right', force: true });
await this.page.waitForTimeout(500);
const menuItems = await this.page.locator('[role="menuitem"]').count();
console.log(` 📍 Debug: 发现 ${menuItems} 个菜单项`);
const pinOption = this.page.getByRole('menuitem', { name: /置顶|pin/i });
await pinOption.waitFor({ state: 'visible', timeout: 5000 }).catch(() => {
console.log(' ⚠️ 置顶选项未找到');
});
if ((await pinOption.count()) > 0) {
await pinOption.click();
await this.page.waitForTimeout(500);
console.log(' ✅ 已点击置顶选项');
}
await this.page.click('body', { position: { x: 10, y: 10 } });
// Close menu if still open
await this.page.keyboard.press('Escape');
await this.page.waitForTimeout(300);
}
console.log(' ✅ Agent Group 已被置顶');
// Verify pin is now visible
await this.page.waitForTimeout(500);
const pinIconAfter = targetItem.locator('svg[class*="lucide-pin"]');
const isPinned = (await pinIconAfter.count()) > 0;
console.log(` ✅ Agent Group 已被置顶: ${isPinned}`);
});
// ============================================
// When Steps
// ============================================
When('用户右键点击该 Agent Group', async function (this: CustomWorld) {
When('用户右键点击该 Agent Group', { timeout: 30_000 }, async function (this: CustomWorld) {
console.log(' 📍 Step: 右键点击 Agent Group...');
const targetItem = this.page.locator(this.testContext.targetItemSelector).first();
await targetItem.click({ button: 'right' });
// Hover first to ensure element is interactive
await targetItem.hover();
await this.page.waitForTimeout(200);
// Right-click with force option to ensure it triggers
await targetItem.click({ button: 'right', force: true });
await this.page.waitForTimeout(500);
// Wait for context menu to appear
const menuItem = this.page.locator('[role="menuitem"]').first();
await menuItem.waitFor({ state: 'visible', timeout: 5000 }).catch(() => {
console.log(' ⚠️ 菜单未出现');
});
const menuItems = await this.page.locator('[role="menuitem"]').count();
console.log(` 📍 Debug: Found ${menuItems} menu items after right-click`);
console.log(' ✅ 已右键点击 Agent Group');
});
@@ -139,7 +182,8 @@ Then('Agent Group 应该显示置顶图标', async function (this: CustomWorld)
await this.page.waitForTimeout(500);
const targetItem = this.page.locator(this.testContext.targetItemSelector).first();
const pinIcon = targetItem.locator('svg.lucide-pin');
// Pin icon uses lucide-react which adds class "lucide lucide-pin"
const pinIcon = targetItem.locator('svg[class*="lucide-pin"]');
await expect(pinIcon).toBeVisible({ timeout: 5000 });
console.log(' ✅ 置顶图标已显示');
@@ -150,7 +194,8 @@ Then('Agent Group 不应该显示置顶图标', async function (this: CustomWorl
await this.page.waitForTimeout(500);
const targetItem = this.page.locator(this.testContext.targetItemSelector).first();
const pinIcon = targetItem.locator('svg.lucide-pin');
// Pin icon uses lucide-react which adds class "lucide lucide-pin"
const pinIcon = targetItem.locator('svg[class*="lucide-pin"]');
await expect(pinIcon).not.toBeVisible({ timeout: 5000 });
console.log(' ✅ 置顶图标未显示');
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "الصق رمز البوت هنا",
"channel.charLimit": "حد الأحرف",
"channel.charLimitHint": "الحد الأقصى لعدد الأحرف لكل رسالة",
"channel.comingSoon": "قريبًا",
"channel.comingSoonDesc": "نعمل على جلب هذا التكامل إلى LobeHub. تابعنا للحصول على التحديثات.",
"channel.comingSoonTitle": "تكامل {{name}} قادم قريبًا",
"channel.concurrency": "وضع التزامن",
"channel.concurrencyDebounce": "إزالة الارتداد",
"channel.concurrencyDebounceHint": "معالجة آخر رسالة فقط في الدفعة (يتم تجاهل الرسائل السابقة)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "رمز التحقق",
"channel.verificationTokenHint": "اختياري. يُستخدم للتحقق من مصدر أحداث الويب هوك.",
"channel.verificationTokenPlaceholder": "الصق رمز التحقق هنا",
"channel.watchKeywordInstructionLabel": "تعليمات",
"channel.watchKeywordInstructionPlaceholder": "على سبيل المثال: قم بمسح المحادثة الأخيرة ورد إذا كان هناك تقرير خطأ قابل للتنفيذ",
"channel.watchKeywordLabel": "الكلمة المفتاحية",
"channel.watchKeywordPlaceholder": "على سبيل المثال: خطأ",
"channel.watchKeywords": "الكلمات المفتاحية المراقبة",
"channel.watchKeywordsAdd": "إضافة كلمة مفتاحية",
"channel.watchKeywordsEmpty": "لم تتم إضافة أي كلمات مفتاحية بعد — يستيقظ الروبوت فقط عند الإشارة إليه @mention أو في الرسائل المباشرة في القنوات المشتركة.",
"channel.watchKeywordsHint": "عندما تتطابق رسالة في قناة مشتركة مع كلمة مفتاحية، يستيقظ الروبوت دون الحاجة إلى الإشارة إليه @mention ويتم إضافة التعليمات إلى رسالة المستخدم قبل إرسالها إلى الذكاء الاصطناعي. تطابق غير حساس لحالة الأحرف وكلمة كاملة.",
"channel.wechat.description": "قم بتوصيل هذا المساعد بـ WeChat عبر iLink Bot للمحادثات الخاصة والجماعية.",
"channel.wechatBotId": "معرّف الروبوت",
"channel.wechatBotIdHint": "معرّف الروبوت المخصص بعد تفويض رمز الاستجابة السريعة.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} قواعد معرفة",
"agentProfile.skills_one": "{{count}} مهارة",
"agentProfile.skills_other": "{{count}} مهارات",
"agentSignal.receipts.agentSignalLabel": "إشارة الوكيل",
"agentSignal.receipts.memory.detail": "تم حفظ هذا للردود المستقبلية",
"agentSignal.receipts.memory.title": "تم حفظ الذاكرة",
"agentSignal.receipts.recentActivity": "النشاط الأخير",
@@ -41,6 +42,16 @@
"builtinCopilot": "المساعد المدمج",
"chatList.expandMessage": "توسيع الرسالة",
"chatList.longMessageDetail": "عرض التفاصيل",
"chatMode.agent": "وكيل",
"chatMode.agentCap.env": "بيئة التشغيل",
"chatMode.agentCap.files": "الوصول إلى الملفات",
"chatMode.agentCap.memory": "الذاكرة",
"chatMode.agentCap.tools": "استدعاء الأدوات",
"chatMode.agentCap.web": "البحث على الويب",
"chatMode.agentDesc": "يمكن للوكيل استخدام الأدوات والبيئة لإكمال المهام تلقائيًا",
"chatMode.chat": "دردشة",
"chatMode.chatDesc": "لا توجد بيئة تشغيل أو استقلالية؛ يستخدم عددًا أقل من الرموز",
"chatMode.select": "تبديل الوضع",
"claudeCodeInstallGuide.actions.openDocs": "افتح دليل التثبيت",
"claudeCodeInstallGuide.actions.openSystemTools": "افتح أدوات النظام",
"claudeCodeInstallGuide.afterInstall": "بعد التثبيت، شغّل Claude Code مرة واحدة لتسجيل الدخول، ثم أعد محاولة إرسال رسالتك أو انقر على إعادة الكشف في أدوات النظام.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "شغّل هذا في الطرفية",
"cliAuthGuide.title": "سجّل الدخول إلى {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "افتح أدوات النظام",
"cliRateLimitGuide.actions.retry": "إعادة المحاولة",
"cliRateLimitGuide.afterReset": "انتظر حتى وقت إعادة التعيين، ثم أعد محاولة إرسال رسالتك. إذا كنت تستخدم ترخيص API، يمكنك أيضًا التحقق من الحصة والحالة المالية لدى مزود الخدمة.",
"cliRateLimitGuide.desc": "لقد وصل {{name}} إلى حد الاستخدام الحالي ولا يمكنه متابعة التشغيل الآن.",
"cliRateLimitGuide.limitType": "نافذة الحد",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "كل الملفات",
"knowledgeBase.allLibraries": "كل المكتبات",
"knowledgeBase.disabled": "دردشة المكتبة غير متاحة في هذا النشر. يرجى التبديل إلى قاعدة بيانات على الخادم أو استخدام {{cloud}}.",
"knowledgeBase.files": "الملفات",
"knowledgeBase.libraries": "المكتبات",
"knowledgeBase.library.action.add": "إضافة",
"knowledgeBase.library.action.detail": "تفاصيل",
"knowledgeBase.library.action.remove": "إزالة",
@@ -326,6 +340,15 @@
"pageSelection.reference": "النص المحدد",
"pin": "تثبيت",
"pinOff": "إلغاء التثبيت",
"plus.addSkills": "إضافة مهارات...",
"plus.search.appSearch": "بحث ذكي",
"plus.search.appSearchDesc": "خدمة بحث محسّنة من LobeHub، تقدم أفضل نتائج الاسترجاع.",
"plus.search.modelSearch": "بحث المزود",
"plus.search.modelSearchDesc": "قد يسبب سلوكًا غير متوقع عند التمكين، غير موصى به.",
"plus.search.off": "إيقاف",
"plus.search.offDesc": "",
"plus.title": "إضافة",
"plus.tooltip": "إضافة ملفات، مهارات، والمزيد من السياق...",
"rag.referenceChunks": "مصدر المرجع",
"rag.userQuery.actions.delete": "حذف إعادة صياغة الاستعلام",
"rag.userQuery.actions.regenerate": "إعادة توليد الاستعلام",
@@ -357,6 +380,8 @@
"searchAgents": "البحث عن وكلاء...",
"selectedAgents": "الوكلاء المحددون",
"sendPlaceholder": "اطرح سؤالًا، أنشئ، أو ابدأ مهمة، <hotkey><hotkey/>",
"sendPlaceholderChat": "اسأل، ابحث، أو فكر، <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "اسأل، ابحث، أو فكر. @ لإحضار وكلاء آخرين.",
"sendPlaceholderHeterogeneous": "اطلب من {{name}} تنفيذ مهمة...",
"sendPlaceholderWithAgentAssignment": "اطلب أو أنشئ أو ابدأ مهمة. @ لإسناد مهام لوكلاء آخرين.",
"sessionGroup.config": "إدارة المجموعة",
@@ -734,6 +759,7 @@
"untitledAgent": "وكيل بدون اسم",
"untitledGroup": "مجموعة بدون اسم",
"updateAgent": "تحديث معلومات الوكيل",
"upload.action.fileOrImageUpload": "تحميل ملف أو صورة",
"upload.action.fileUpload": "رفع ملف",
"upload.action.folderUpload": "رفع مجلد",
"upload.action.imageDisabled": "النموذج الحالي لا يدعم التعرف البصري. يرجى التبديل إلى نموذج آخر لاستخدام هذه الميزة.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "نسخ المسار المطلق",
"workingPanel.files.copyRelativePath": "نسخ المسار النسبي",
"workingPanel.files.count_one": "{{count}} ملف",
"workingPanel.files.count_other": "{{count}} ملفات",
"workingPanel.files.empty": "لا توجد ملفات في مساحة العمل هذه",
"workingPanel.files.open": "فتح الملف",
"workingPanel.files.refresh": "تحديث",
"workingPanel.files.showInReview": "عرض في المراجعة",
"workingPanel.files.showInSystem": "إظهار في المجلد",
"workingPanel.files.title": "الملفات",
"workingPanel.localFile.binary": "ملف ثنائي — المعاينة غير متوفرة",
"workingPanel.localFile.close": "إغلاق",
"workingPanel.localFile.closeLeft": "إغلاق إلى اليسار",
"workingPanel.localFile.closeOther": "إغلاق الآخرين",
"workingPanel.localFile.closeRight": "إغلاق إلى اليمين",
"workingPanel.localFile.error": "تعذر تحميل هذا الملف",
"workingPanel.localFile.truncated": "تم تقليص معاينة الملف إلى {{limit}} حرفًا",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "غير مُرتب",
"workingPanel.review.more": "خيارات إضافية",
"workingPanel.review.refresh": "تحديث",
"workingPanel.review.revealInTree": "إظهار في الشجرة",
"workingPanel.review.revealNotFound": "الملف غير موجود في فهرس المشروع",
"workingPanel.review.revert": "تجاهل التغييرات",
"workingPanel.review.revert.confirm.cancel": "إلغاء",
"workingPanel.review.revert.confirm.description": "سيتم تجاهل تغييرات شجرة العمل على {{filePath}} نهائيًا. ستُحذف الملفات غير المتعقبة من القرص.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "تأكيد",
"brief.action.confirmDone": "تأكيد",
"brief.action.feedback": "ملاحظات",
"brief.action.ignore": "تجاهل",
"brief.action.retry": "إعادة المحاولة",
"brief.addFeedback": "مشاركة الملاحظات",
"brief.collapse": "عرض أقل",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "فشل في إزالة الخادم.",
"messenger.discord.connections.disconnectSuccess": "تمت إزالة الخادم.",
"messenger.discord.connections.disconnectTitle": "إزالة الخادم",
"messenger.discord.installBlocked.dismiss": "فهمت",
"messenger.discord.installBlocked.suggestion": "أرسل رسالة مباشرة إلى بوت LobeHub في Discord لربط حسابك الشخصي — لا تحتاج إلى إضافة البوت مرة أخرى. أو اطلب من المثبت الأصلي إزالة هذا الخادم في إعدادات LobeHub → Messenger قبل إعادة إضافته.",
"messenger.discord.installBlocked.title": "الخادم متصل بالفعل",
"messenger.discord.installBlocked.withName": "الخادم \"{{workspace}}\" متصل بالفعل بـ LobeHub بواسطة مستخدم آخر.",
"messenger.discord.installBlocked.withoutName": "هذا الخادم في Discord متصل بالفعل بـ LobeHub بواسطة مستخدم آخر.",
"messenger.discord.installResult.failed": "فشل تثبيت Discord ({{reason}}). يرجى المحاولة مرة أخرى أو الاتصال بالدعم.",
"messenger.discord.installResult.reasons.accessDenied": "تم إلغاء التفويض",
"messenger.discord.installResult.reasons.exchangeFailed": "فشل تفويض Discord",
"messenger.discord.installResult.reasons.generic": "حدث خطأ غير معروف",
"messenger.discord.installResult.reasons.invalidState": "انتهت صلاحية جلسة التثبيت",
"messenger.discord.installResult.reasons.missingAppId": "أعاد Discord معلومات تطبيق غير مكتملة",
"messenger.discord.installResult.reasons.missingCodeOrState": "أعاد Discord معلمات تثبيت غير مكتملة",
"messenger.discord.installResult.reasons.missingTenant": "لم يُرجع Discord معرف الخادم",
"messenger.discord.installResult.reasons.missingToken": "لم يُرجع Discord رمز الوصول",
"messenger.discord.installResult.reasons.persistFailed": "تعذر حفظ اتصال الخادم",
"messenger.discord.installResult.success": "تم توصيل خادم Discord.",
"messenger.discord.userPending.cta": "افتح في Discord",
"messenger.discord.userPending.hint": "افتح البوت في Discord وأرسل أي رسالة لإكمال ربط حسابك.",
"messenger.discord.userPending.name": "لم يتم الربط بعد",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "رابط غير صالح. افتح هذه الصفحة من البوت.",
"verify.error.title": "تعذر تأكيد الرابط",
"verify.error.unlinkBeforeRelink": "تم ربط حساب LobeHub هذا بالفعل بحساب Telegram آخر. قم بفصله في الإعدادات → المراسلة قبل ربط حساب جديد.",
"verify.labRequired.description": "المراسلة حاليًا ميزة تجريبية. قم بتمكينها في الإعدادات → متقدم → الميزات التجريبية وأعد تحميل هذه الصفحة.",
"verify.labRequired.openSettings": "افتح إعدادات الميزات التجريبية",
"verify.labRequired.title": "قم بتمكين المراسلة للمتابعة",
"verify.signInCta": "تسجيل الدخول للمتابعة",
"verify.signInRequired": "يرجى تسجيل الدخول إلى LobeHub لتأكيد الرابط.",
"verify.success.description": "تم الآن ربط حسابك بـ {{platform}}. افتح {{platform}} وأرسل رسالتك الأولى.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "افتح دليل العمل في",
"errors.appNotInstalled": "{{appName}} غير مثبت",
"errors.launchFailed": "فشل الفتح في {{appName}}: {{error}}",
"errors.pathNotFound": "المسار غير موجود: {{path}}",
"errors.unknown": "خطأ غير معروف",
"tooltip": "افتح في {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "الملحق",
"builtins.lobe-agent-management.render.installPlugin.success": "تم التثبيت بنجاح",
"builtins.lobe-agent-management.title": "مدير الوكلاء",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "تحليل الوسائط المرئية",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} وسائط",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "تحليل الوسائط المرئية: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "استدعاء الوكيل الفرعي",
"builtins.lobe-agent.apiName.callSubAgent.completed": "تم إرسال الوكيل الفرعي: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "جارٍ إرسال الوكيل الفرعي: ",
+21 -6
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "إعدادات البداية",
"agentTab.plugin": "إعدادات المهارات",
"agentTab.prompt": "ملف تعريف الوكيل",
"agentTab.selfIteration": "التكرار الذاتي",
"agentTab.tts": "خدمة الصوت",
"analytics.telemetry.desc": "ساعدنا في تحسين {{appName}} من خلال بيانات استخدام مجهولة",
"analytics.telemetry.title": "إرسال بيانات استخدام مجهولة",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "سيتم ملء أحدث رسالة للمستخدم في هذا القالب",
"settingChat.inputTemplate.placeholder": "سيتم استبدال قالب المعالجة المسبقة {{text}} بمعلومات الإدخال الفعلية",
"settingChat.inputTemplate.title": "معالجة مسبقة لإدخال المستخدم",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "تحديث تفضيلات الدردشة",
"settingChat.title": "إعدادات الدردشة",
"settingChatAppearance.autoScrollOnStreaming.desc": "التمرير تلقائيًا إلى الأسفل عند توليد الذكاء الاصطناعي للاستجابة",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "حد الرموز القصوى",
"settingModel.model.desc": "نموذج {{provider}}",
"settingModel.model.title": "النموذج",
"settingModel.params.panel.advanced": "إعدادات متقدمة",
"settingModel.params.panel.agentTitle": "إعدادات الوكيل المتقدمة",
"settingModel.params.panel.contextCompression": "ضغط السياق تلقائيًا",
"settingModel.params.panel.creativity": "الإبداع",
"settingModel.params.panel.historyLimit": "تحديد رسائل السجل",
"settingModel.params.panel.openness": "الانفتاح",
"settingModel.params.panel.responseLength": "تحديد طول الاستجابة",
"settingModel.params.panel.tab": "المعلمات",
"settingModel.params.panel.title": "إعدادات معلمات الدردشة",
"settingModel.params.panel.topicDivergence": "تباين الموضوع",
"settingModel.params.panel.vocabularyRichness": "ثراء المفردات",
"settingModel.params.title": "إعدادات متقدمة",
"settingModel.presencePenalty.desc": "كلما زادت القيمة، زاد الميل لاستخدام تعبيرات متنوعة وتجنب تكرار المفاهيم؛ وكلما انخفضت، زاد الميل لتكرار المفاهيم أو السرد، مما يؤدي إلى تعبير أكثر اتساقًا.",
"settingModel.presencePenalty.title": "تنوع التعبير",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "الأسئلة الافتتاحية",
"settingOpening.title": "إعدادات البداية",
"settingPlugin.title": "قائمة المهارات",
"settingSelfIteration.enabled.desc": "السماح لهذا المساعد بمراجعة الإشارات الأخيرة وتحسين مهاراته الخاصة عند تشغيل سير عمل التكرار الذاتي.",
"settingSelfIteration.enabled.managedDesc": "مفعّل دائمًا لـ Lobe AI أثناء توفر التكرار الذاتي.",
"settingSelfIteration.enabled.title": "تفعيل التكرار الذاتي",
"settingSelfIteration.title": "التكرار الذاتي",
"settingSystem.oauth.info.desc": "تم تسجيل الدخول",
"settingSystem.oauth.info.title": "معلومات الحساب",
"settingSystem.oauth.signin.action": "تسجيل الدخول",
@@ -897,7 +910,12 @@
"tab.uploadZip": "رفع ملف مضغوط",
"tab.uploadZip.desc": "رفع ملف .zip أو .skill محلي",
"tab.usage": "إحصائيات الاستخدام",
"tools.activation.auto": "تلقائي",
"tools.activation.auto.desc": "ذكي",
"tools.activation.pinned": "مثبت",
"tools.activation.pinned.desc": "دائمًا قيد التشغيل",
"tools.add": "إضافة مهارة",
"tools.builtins.configure": "تهيئة",
"tools.builtins.find-skills.description": "يساعد المستخدمين في اكتشاف وتثبيت مهارات الوكلاء عند سؤالهم \"كيف أفعل كذا\" أو \"اعثر على مهارة لكذا\" أو عند رغبتهم في توسيع القدرات",
"tools.builtins.find-skills.title": "العثور على المهارات",
"tools.builtins.groupName": "المهارات المدمجة",
@@ -932,9 +950,6 @@
"tools.builtins.lobe-group-agent-builder.title": "منشئ وكيل المجموعة",
"tools.builtins.lobe-group-management.description": "تنظيم وإدارة المحادثات الجماعية لوكلاء متعددين",
"tools.builtins.lobe-group-management.title": "إدارة المجموعات",
"tools.builtins.lobe-gtd.description": "خطط للأهداف وتابع التقدم باستخدام منهجية GTD. أنشئ خططًا استراتيجية، وأدر قوائم المهام مع تتبع الحالة، ونفّذ مهام غير متزامنة طويلة الأمد.",
"tools.builtins.lobe-gtd.readme": "خطط لأهدافك وتابع تقدمك باستخدام منهجية GTD. أنشئ خططًا استراتيجية، وأدر قوائم المهام مع تتبع الحالة، ونفّذ المهام غير المتزامنة طويلة الأمد.",
"tools.builtins.lobe-gtd.title": "أدوات GTD",
"tools.builtins.lobe-knowledge-base.description": "البحث في المستندات المرفوعة والمعرفة المتخصصة عبر البحث الدلالي — للرجوع الدائم والقابل لإعادة الاستخدام",
"tools.builtins.lobe-knowledge-base.title": "قاعدة المعرفة",
"tools.builtins.lobe-local-system.description": "الوصول إلى نظام الملفات المحلي على سطح المكتب. قراءة، وكتابة، والبحث، وتنظيم الملفات. تنفيذ أوامر الصدفة مع دعم المهام الخلفية والبحث في المحتوى باستخدام تعبيرات regex.",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "استدعاء API",
"table.columns.trigger.enums.bot": "رسالة بوت",
"table.columns.trigger.enums.chat": "رسالة دردشة",
"table.columns.trigger.enums.cli": "واجهة سطر الأوامر",
"table.columns.trigger.enums.cron": "مهمة مجدولة",
"table.columns.trigger.enums.eval": "تقييم الأداء",
"table.columns.trigger.enums.file_embedding": "تضمين ملف",
"table.columns.trigger.enums.image": "توليد الصور",
"table.columns.trigger.enums.memory": "استخراج الذاكرة",
"table.columns.trigger.enums.notify": "إشعار",
"table.columns.trigger.enums.onboarding": "التسجيل",
"table.columns.trigger.enums.openapi": "واجهة برمجة التطبيقات المفتوحة",
"table.columns.trigger.enums.semantic_search": "بحث المعرفة",
"table.columns.trigger.enums.topic": "ملخص الموضوع",
"table.columns.trigger.enums.video": "توليد الفيديو",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "Поставете вашия токен на бота тук",
"channel.charLimit": "Ограничение на символите",
"channel.charLimitHint": "Максимален брой символи на съобщение",
"channel.comingSoon": "Очаквайте скоро",
"channel.comingSoonDesc": "Работим върху интеграцията на това в LobeHub. Следете за актуализации.",
"channel.comingSoonTitle": "Интеграцията на {{name}} идва скоро",
"channel.concurrency": "Режим на едновременност",
"channel.concurrencyDebounce": "Забавяне",
"channel.concurrencyDebounceHint": "Обработва само последното съобщение от серия (по-ранните се игнорират)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "Токен за проверка",
"channel.verificationTokenHint": "По избор. Използва се за проверка на източника на събития за уебхук.",
"channel.verificationTokenPlaceholder": "Поставете вашия токен за проверка тук",
"channel.watchKeywordInstructionLabel": "Инструкция",
"channel.watchKeywordInstructionPlaceholder": "напр. Сканирай последната тема и отговори, ако има доклад за грешка, който изисква действие",
"channel.watchKeywordLabel": "Ключова дума",
"channel.watchKeywordPlaceholder": "напр. грешка",
"channel.watchKeywords": "Наблюдавани ключови думи",
"channel.watchKeywordsAdd": "Добави ключова дума",
"channel.watchKeywordsEmpty": "Все още няма добавени ключови думи — ботът се активира само при @споменаване или директно съобщение в абонираните канали.",
"channel.watchKeywordsHint": "Когато съобщение в абониран канал съвпадне с ключова дума, ботът се активира без @споменаване и инструкцията се добавя към съобщението на потребителя преди да бъде изпратено към AI. Без значение от главни/малки букви, съвпадение на цяла дума.",
"channel.wechat.description": "Свържете този асистент с WeChat чрез iLink Bot за лични и групови чатове.",
"channel.wechatBotId": "ID на бота",
"channel.wechatBotIdHint": "Идентификатор на бота, присвоен след оторизация чрез QR код.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} бази знания",
"agentProfile.skills_one": "{{count}} умение",
"agentProfile.skills_other": "{{count}} умения",
"agentSignal.receipts.agentSignalLabel": "Сигнал на агент",
"agentSignal.receipts.memory.detail": "Запазено за бъдещи отговори",
"agentSignal.receipts.memory.title": "Паметта е запазена",
"agentSignal.receipts.recentActivity": "Скорошна активност",
@@ -41,6 +42,16 @@
"builtinCopilot": "Вграден Копилот",
"chatList.expandMessage": "Разгъни съобщението",
"chatList.longMessageDetail": "Прегледай подробности",
"chatMode.agent": "Агент",
"chatMode.agentCap.env": "Работна среда",
"chatMode.agentCap.files": "Достъп до файлове",
"chatMode.agentCap.memory": "Памет",
"chatMode.agentCap.tools": "Използване на инструменти",
"chatMode.agentCap.web": "Уеб търсене",
"chatMode.agentDesc": "Агентът може да използва инструменти и среда за автоматично изпълнение на задачи",
"chatMode.chat": "Чат",
"chatMode.chatDesc": "Без работна среда или автономност; използва по-малко токени",
"chatMode.select": "Смяна на режим",
"claudeCodeInstallGuide.actions.openDocs": "Отвори ръководството за инсталиране",
"claudeCodeInstallGuide.actions.openSystemTools": "Отвори системните инструменти",
"claudeCodeInstallGuide.afterInstall": "След инсталиране стартирайте Claude Code веднъж, за да влезете, след което опитайте отново или натиснете „Повторно откриване“ в Системни инструменти.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "Изпълнете това в терминала",
"cliAuthGuide.title": "Влезте в {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "Отвори системните инструменти",
"cliRateLimitGuide.actions.retry": "Опитай отново",
"cliRateLimitGuide.afterReset": "Изчакайте до времето за нулиране, след което опитайте отново. Ако използвате API удостоверяване, проверете квотата и фактурирането при вашия доставчик.",
"cliRateLimitGuide.desc": "{{name}} достигна текущия си лимит на употреба и не може да продължи в момента.",
"cliRateLimitGuide.limitType": "Период на лимит",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "Всички файлове",
"knowledgeBase.allLibraries": "Всички библиотеки",
"knowledgeBase.disabled": "Чатът с библиотеката не е наличен в тази инсталация. Превключете към сървърна база данни или използвайте {{cloud}}.",
"knowledgeBase.files": "Файлове",
"knowledgeBase.libraries": "Библиотеки",
"knowledgeBase.library.action.add": "Добави",
"knowledgeBase.library.action.detail": "Детайли",
"knowledgeBase.library.action.remove": "Премахни",
@@ -326,6 +340,15 @@
"pageSelection.reference": "Избран текст",
"pin": "Закачи",
"pinOff": "Откачи",
"plus.addSkills": "Добавяне на умения...",
"plus.search.appSearch": "Интелигентно търсене",
"plus.search.appSearchDesc": "Оптимизирана търсачка на LobeHub, предоставяща най-добри резултати от търсенето.",
"plus.search.modelSearch": "Търсене по доставчик",
"plus.search.modelSearchDesc": "Може да предизвика неочаквано поведение при активиране, не се препоръчва.",
"plus.search.off": "Изключено",
"plus.search.offDesc": "",
"plus.title": "Добавяне",
"plus.tooltip": "Добавяне на файлове, умения и повече контекст...",
"rag.referenceChunks": "Източник на препратки",
"rag.userQuery.actions.delete": "Изтрий пренаписаното запитване",
"rag.userQuery.actions.regenerate": "Генерирай запитване отново",
@@ -357,6 +380,8 @@
"searchAgents": "Търсене на агенти...",
"selectedAgents": "Избрани агенти",
"sendPlaceholder": "Попитай, създай или започни задача, <hotkey><hotkey/>",
"sendPlaceholderChat": "Попитай, търси или генерирай идеи, <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "Попитай, търси или генерирай идеи. @ за включване на други агенти.",
"sendPlaceholderHeterogeneous": "Помолете {{name}} да изпълни задача...",
"sendPlaceholderWithAgentAssignment": "Питайте, създайте или започнете задача. Използвайте @, за да възлагате задачи на други агенти.",
"sessionGroup.config": "Управление на групата",
@@ -734,6 +759,7 @@
"untitledAgent": "Агент без име",
"untitledGroup": "Група без име",
"updateAgent": "Актуализирай информацията за агента",
"upload.action.fileOrImageUpload": "Качване на файл или изображение",
"upload.action.fileUpload": "Качи файл",
"upload.action.folderUpload": "Качи папка",
"upload.action.imageDisabled": "Текущият модел не поддържа визуално разпознаване. Моля, сменете модела, за да използвате тази функция.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "Копирай пътя",
"workingPanel.files.copyRelativePath": "Копирай относителния път",
"workingPanel.files.count_one": "{{count}} файл",
"workingPanel.files.count_other": "{{count}} файла",
"workingPanel.files.empty": "Няма файлове в това работно пространство",
"workingPanel.files.open": "Отвори файл",
"workingPanel.files.refresh": "Обнови",
"workingPanel.files.showInReview": "Покажи в преглед",
"workingPanel.files.showInSystem": "Покажи в папка",
"workingPanel.files.title": "Файлове",
"workingPanel.localFile.binary": "Бинарен файл — прегледът не е наличен",
"workingPanel.localFile.close": "Затвори",
"workingPanel.localFile.closeLeft": "Затвори наляво",
"workingPanel.localFile.closeOther": "Затвори другите",
"workingPanel.localFile.closeRight": "Затвори надясно",
"workingPanel.localFile.error": "Не може да се зареди този файл",
"workingPanel.localFile.truncated": "Прегледът на файла е съкратен до {{limit}} символа",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "Неинсценирано",
"workingPanel.review.more": "Още опции",
"workingPanel.review.refresh": "Обнови",
"workingPanel.review.revealInTree": "Покажи в дървото",
"workingPanel.review.revealNotFound": "Файлът не е намерен в индекса на проекта",
"workingPanel.review.revert": "Отхвърли промените",
"workingPanel.review.revert.confirm.cancel": "Отказ",
"workingPanel.review.revert.confirm.description": "Промените в работното дърво за {{filePath}} ще бъдат изтрити окончателно. Неследените файлове ще бъдат изтрити от диска.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "Потвърди",
"brief.action.confirmDone": "Потвърди",
"brief.action.feedback": "Обратна връзка",
"brief.action.ignore": "Игнорирай",
"brief.action.retry": "Опит отново",
"brief.addFeedback": "Споделяне на обратна връзка",
"brief.collapse": "Покажи по-малко",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "Неуспешно премахване на сървъра.",
"messenger.discord.connections.disconnectSuccess": "Сървърът е премахнат.",
"messenger.discord.connections.disconnectTitle": "Премахване на сървър",
"messenger.discord.installBlocked.dismiss": "Разбрах",
"messenger.discord.installBlocked.suggestion": "Изпратете лично съобщение на бота LobeHub в Discord, за да свържете личния си акаунт — не е необходимо да добавяте бота отново. Или помолете първоначалния инсталатор да премахне този сървър в LobeHub Настройки → Messenger, преди да го добавите отново.",
"messenger.discord.installBlocked.title": "Сървърът вече е свързан",
"messenger.discord.installBlocked.withName": "\"{{workspace}}\" вече е свързан с LobeHub от друг потребител.",
"messenger.discord.installBlocked.withoutName": "Този Discord сървър вече е свързан с LobeHub от друг потребител.",
"messenger.discord.installResult.failed": "Инсталирането на Discord не бе успешно ({{reason}}). Моля, опитайте отново или се свържете с поддръжката.",
"messenger.discord.installResult.reasons.accessDenied": "авторизацията беше отменена",
"messenger.discord.installResult.reasons.exchangeFailed": "авторизацията в Discord не бе успешна",
"messenger.discord.installResult.reasons.generic": "възникна неизвестна грешка",
"messenger.discord.installResult.reasons.invalidState": "сесията за инсталиране изтече",
"messenger.discord.installResult.reasons.missingAppId": "Discord върна непълна информация за приложението",
"messenger.discord.installResult.reasons.missingCodeOrState": "Discord върна непълни параметри за инсталиране",
"messenger.discord.installResult.reasons.missingTenant": "Discord не върна идентификатор на сървъра",
"messenger.discord.installResult.reasons.missingToken": "Discord не върна токен за достъп",
"messenger.discord.installResult.reasons.persistFailed": "връзката със сървъра не можа да бъде запазена",
"messenger.discord.installResult.success": "Discord сървърът е свързан.",
"messenger.discord.userPending.cta": "Отворете в Discord",
"messenger.discord.userPending.hint": "Отворете бота в Discord и изпратете съобщение, за да завършите свързването на акаунта си.",
"messenger.discord.userPending.name": "Все още не е свързан",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "Невалидна връзка. Отворете тази страница от бота.",
"verify.error.title": "Неуспешно потвърждаване на връзката",
"verify.error.unlinkBeforeRelink": "Този LobeHub акаунт вече е свързан с друг Telegram акаунт. Прекъснете връзката в Настройки → Messenger, преди да свържете нов.",
"verify.labRequired.description": "Messenger в момента е функция в Labs. Активирайте я в Настройки → Разширени → Labs и презаредете тази страница.",
"verify.labRequired.openSettings": "Отворете настройките на Labs",
"verify.labRequired.title": "Активирайте Messenger, за да продължите",
"verify.signInCta": "Влезте, за да продължите",
"verify.signInRequired": "Моля, влезте в LobeHub, за да потвърдите връзката.",
"verify.success.description": "Вашият акаунт вече е свързан с {{platform}}. Отворете {{platform}} и изпратете първото си съобщение.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "Отвори работната директория в",
"errors.appNotInstalled": "{{appName}} не е инсталиран",
"errors.launchFailed": "Неуспешно отваряне в {{appName}}: {{error}}",
"errors.pathNotFound": "Пътят не е намерен: {{path}}",
"errors.unknown": "неизвестна грешка",
"tooltip": "Отвори в {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "Плъгин",
"builtins.lobe-agent-management.render.installPlugin.success": "Успешно инсталиран",
"builtins.lobe-agent-management.title": "Мениджър на агенти",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "Анализиране на визуални медии",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} медии",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "Анализиране на визуални медии: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "Извикай под-агент",
"builtins.lobe-agent.apiName.callSubAgent.completed": "Под-агент изпратен: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "Изпращане на под-агент: ",
+21 -6
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "Начални настройки",
"agentTab.plugin": "Настройки на уменията",
"agentTab.prompt": "Профил на агента",
"agentTab.selfIteration": "Само-итерация",
"agentTab.tts": "Гласова услуга",
"analytics.telemetry.desc": "Помогнете ни да подобрим {{appName}} с анонимни данни за използване",
"analytics.telemetry.title": "Изпращане на анонимни данни за използване",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "Последното съобщение на потребителя ще бъде вмъкнато в този шаблон",
"settingChat.inputTemplate.placeholder": "Шаблон за предварителна обработка {{text}} ще бъде заменен с реално въведена информация",
"settingChat.inputTemplate.title": "Предварителна обработка на входа",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "Актуализирай предпочитанията за чат",
"settingChat.title": "Настройки на чата",
"settingChatAppearance.autoScrollOnStreaming.desc": "Автоматично превъртане до дъното, когато ИИ генерира отговор",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "Лимит на токени",
"settingModel.model.desc": "Модел на {{provider}}",
"settingModel.model.title": "Модел",
"settingModel.params.panel.advanced": "Разширени настройки",
"settingModel.params.panel.agentTitle": "Разширени настройки на агент",
"settingModel.params.panel.contextCompression": "Автоматично компресиране на контекста",
"settingModel.params.panel.creativity": "Креативност",
"settingModel.params.panel.historyLimit": "Ограничаване на съобщенията в историята",
"settingModel.params.panel.openness": "Отвореност",
"settingModel.params.panel.responseLength": "Ограничаване на дължината на отговора",
"settingModel.params.panel.tab": "Параметри",
"settingModel.params.panel.title": "Настройки на параметрите на чата",
"settingModel.params.panel.topicDivergence": "Отклонение на темата",
"settingModel.params.panel.vocabularyRichness": "Богатство на речника",
"settingModel.params.title": "Разширени параметри",
"settingModel.presencePenalty.desc": "Колкото по-висока е стойността, толкова по-склонен е моделът да използва различни изрази и да избягва повторения; по-ниска стойност води до по-последователно, но повтарящо се изразяване.",
"settingModel.presencePenalty.title": "Разнообразие на изразяване",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "Начални въпроси",
"settingOpening.title": "Настройки за начало",
"settingPlugin.title": "Списък с умения",
"settingSelfIteration.enabled.desc": "Позволете на този асистент да преглежда последните сигнали и да подобрява собствените си умения, когато работният процес за само-итерация се изпълнява.",
"settingSelfIteration.enabled.managedDesc": "Винаги включено за Lobe AI, докато само-итерацията е налична.",
"settingSelfIteration.enabled.title": "Разрешаване на само-итерация",
"settingSelfIteration.title": "Само-итерация",
"settingSystem.oauth.info.desc": "Вход изпълнен",
"settingSystem.oauth.info.title": "Информация за акаунта",
"settingSystem.oauth.signin.action": "Вход",
@@ -897,7 +910,12 @@
"tab.uploadZip": "Качване на Zip",
"tab.uploadZip.desc": "Качване на локален .zip или .skill файл",
"tab.usage": "Статистика на използване",
"tools.activation.auto": "Автоматично",
"tools.activation.auto.desc": "Интелигентно",
"tools.activation.pinned": "Закрепено",
"tools.activation.pinned.desc": "Винаги включено",
"tools.add": "Добави умение",
"tools.builtins.configure": "Конфигуриране",
"tools.builtins.find-skills.description": "Помага на потребителите да откриват и инсталират умения за агенти, когато питат „как да направя X“, „намери умение за X“ или когато искат да разширят възможностите",
"tools.builtins.find-skills.title": "Намиране на умения",
"tools.builtins.groupName": "Вградени",
@@ -932,9 +950,6 @@
"tools.builtins.lobe-group-agent-builder.title": "Създател на групови агенти",
"tools.builtins.lobe-group-management.description": "Оркестрирайте и управлявайте разговори в групи от агенти",
"tools.builtins.lobe-group-management.title": "Групово управление",
"tools.builtins.lobe-gtd.description": "Планирайте цели и следете напредъка с помощта на методологията GTD. Създавайте стратегически планове, управлявайте списъци със задачи със следене на статус и изпълнявайте дълготрайни асинхронни задачи.",
"tools.builtins.lobe-gtd.readme": "Планирайте цели и следете напредъка си с помощта на методологията GTD. Създавайте стратегически планове, управлявайте списъци със задачи със следене на статус и изпълнявайте дълготрайни асинхронни задачи.",
"tools.builtins.lobe-gtd.title": "GTD Инструменти",
"tools.builtins.lobe-knowledge-base.description": "Търсене в качени документи и специализирани знания чрез семантично векторно търсене — за постоянно и многократно използване",
"tools.builtins.lobe-knowledge-base.title": "База знания",
"tools.builtins.lobe-local-system.description": "Достъп до локалната файлова система на настолния компютър. Четете, записвайте, търсете и организирайте файлове. Изпълнявайте shell команди с поддръжка на фонови задачи и търсете съдържание с regex шаблони.",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "API Обаждане",
"table.columns.trigger.enums.bot": "Съобщение от бот",
"table.columns.trigger.enums.chat": "Съобщение в чат",
"table.columns.trigger.enums.cli": "CLI",
"table.columns.trigger.enums.cron": "Планирана задача",
"table.columns.trigger.enums.eval": "Оценка на производителност",
"table.columns.trigger.enums.file_embedding": "Вграждане на файл",
"table.columns.trigger.enums.image": "Генериране на изображения",
"table.columns.trigger.enums.memory": "Извличане на памет",
"table.columns.trigger.enums.notify": "Известие",
"table.columns.trigger.enums.onboarding": "Въвеждане",
"table.columns.trigger.enums.openapi": "OpenAPI",
"table.columns.trigger.enums.semantic_search": "Търсене на знания",
"table.columns.trigger.enums.topic": "Резюме на тема",
"table.columns.trigger.enums.video": "Генериране на видеа",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "Fügen Sie hier Ihr Bot-Token ein",
"channel.charLimit": "Zeichenlimit",
"channel.charLimitHint": "Maximale Anzahl von Zeichen pro Nachricht",
"channel.comingSoon": "Demnächst verfügbar",
"channel.comingSoonDesc": "Wir arbeiten daran, diese Integration in LobeHub zu bringen. Bleiben Sie dran für Updates.",
"channel.comingSoonTitle": "{{name}}-Integration kommt bald",
"channel.concurrency": "Konkurrenzmodus",
"channel.concurrencyDebounce": "Entprellen",
"channel.concurrencyDebounceHint": "Nur die letzte Nachricht in einer Serie verarbeiten (frühere werden verworfen)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "Verifizierungstoken",
"channel.verificationTokenHint": "Optional. Wird verwendet, um die Quelle von Webhook-Ereignissen zu überprüfen.",
"channel.verificationTokenPlaceholder": "Fügen Sie hier Ihr Verifizierungstoken ein",
"channel.watchKeywordInstructionLabel": "Anweisung",
"channel.watchKeywordInstructionPlaceholder": "z. B. Scannen Sie den aktuellen Thread und antworten Sie, wenn ein umsetzbarer Fehlerbericht vorliegt",
"channel.watchKeywordLabel": "Schlüsselwort",
"channel.watchKeywordPlaceholder": "z. B. Fehler",
"channel.watchKeywords": "Schlüsselwörter überwachen",
"channel.watchKeywordsAdd": "Schlüsselwort hinzufügen",
"channel.watchKeywordsEmpty": "Noch keine Schlüsselwörter hinzugefügt — der Bot reagiert nur auf @Erwähnungen oder Direktnachrichten in abonnierten Kanälen.",
"channel.watchKeywordsHint": "Wenn eine Nachricht in einem abonnierten Kanal mit einem Schlüsselwort übereinstimmt, reagiert der Bot ohne @Erwähnung und die Anweisung wird der Benutzernachricht vorangestellt, bevor sie an die KI gesendet wird. Groß-/Kleinschreibung wird ignoriert, Übereinstimmung ganzer Wörter.",
"channel.wechat.description": "Verbinden Sie diesen Assistenten mit WeChat über iLink Bot für private und Gruppenchats.",
"channel.wechatBotId": "Bot-ID",
"channel.wechatBotIdHint": "Bot-Kennung, die nach der QR-Code-Autorisierung zugewiesen wurde.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} Wissensbasen",
"agentProfile.skills_one": "{{count}} Fähigkeit",
"agentProfile.skills_other": "{{count}} Fähigkeiten",
"agentSignal.receipts.agentSignalLabel": "Agentensignal",
"agentSignal.receipts.memory.detail": "Für zukünftige Antworten gespeichert",
"agentSignal.receipts.memory.title": "Erinnerung gespeichert",
"agentSignal.receipts.recentActivity": "Letzte Aktivität",
@@ -41,6 +42,16 @@
"builtinCopilot": "Integrierter Copilot",
"chatList.expandMessage": "Nachricht erweitern",
"chatList.longMessageDetail": "Details anzeigen",
"chatMode.agent": "Agent",
"chatMode.agentCap.env": "Laufzeitumgebung",
"chatMode.agentCap.files": "Dateizugriff",
"chatMode.agentCap.memory": "Speicher",
"chatMode.agentCap.tools": "Werkzeugaufrufe",
"chatMode.agentCap.web": "Websuche",
"chatMode.agentDesc": "Agent kann Werkzeuge und Umgebung nutzen, um Aufgaben automatisch zu erledigen",
"chatMode.chat": "Chat",
"chatMode.chatDesc": "Keine Laufzeitumgebung oder Autonomie; verwendet weniger Tokens",
"chatMode.select": "Modus wechseln",
"claudeCodeInstallGuide.actions.openDocs": "Installationsanleitung öffnen",
"claudeCodeInstallGuide.actions.openSystemTools": "Systemwerkzeuge öffnen",
"claudeCodeInstallGuide.afterInstall": "Führen Sie nach der Installation Claude Code einmal aus, um sich anzumelden. Versuchen Sie danach erneut Ihre Nachricht zu senden oder klicken Sie in den Systemwerkzeugen auf „Erneut erkennen“.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "Führen Sie dies im Terminal aus",
"cliAuthGuide.title": "Bei {{name}} anmelden",
"cliRateLimitGuide.actions.openSystemTools": "Systemwerkzeuge öffnen",
"cliRateLimitGuide.actions.retry": "Erneut versuchen",
"cliRateLimitGuide.afterReset": "Warten Sie bis zum Reset-Zeitpunkt und versuchen Sie dann erneut, Ihre Nachricht zu senden. Wenn Sie eine API-Autorisierung verwenden, können Sie außerdem Ihr Kontingent und Ihren Abrechnungsstatus prüfen.",
"cliRateLimitGuide.desc": "{{name}} hat das aktuelle Nutzungslimit erreicht und kann diesen Vorgang momentan nicht fortsetzen.",
"cliRateLimitGuide.limitType": "Limit-Zeitraum",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "Alle Dateien",
"knowledgeBase.allLibraries": "Alle Bibliotheken",
"knowledgeBase.disabled": "Bibliotheks-Chat ist in dieser Bereitstellung nicht verfügbar. Wechseln Sie zu einer serverseitigen Datenbank oder verwenden Sie {{cloud}}.",
"knowledgeBase.files": "Dateien",
"knowledgeBase.libraries": "Bibliotheken",
"knowledgeBase.library.action.add": "Hinzufügen",
"knowledgeBase.library.action.detail": "Details",
"knowledgeBase.library.action.remove": "Entfernen",
@@ -326,6 +340,15 @@
"pageSelection.reference": "Ausgewählter Text",
"pin": "Anheften",
"pinOff": "Lösen",
"plus.addSkills": "Fähigkeiten hinzufügen...",
"plus.search.appSearch": "Intelligente Suche",
"plus.search.appSearchDesc": "LobeHub-optimierter Suchdienst, der die besten Suchergebnisse liefert.",
"plus.search.modelSearch": "Anbietersuche",
"plus.search.modelSearchDesc": "Kann unerwartetes Verhalten verursachen, nicht empfohlen.",
"plus.search.off": "Aus",
"plus.search.offDesc": "",
"plus.title": "Hinzufügen",
"plus.tooltip": "Dateien, Fähigkeiten und mehr Kontext hinzufügen...",
"rag.referenceChunks": "Referenzquelle",
"rag.userQuery.actions.delete": "Abfrage-Neuschreibung löschen",
"rag.userQuery.actions.regenerate": "Abfrage neu generieren",
@@ -357,6 +380,8 @@
"searchAgents": "Agenten suchen...",
"selectedAgents": "Ausgewählte Agenten",
"sendPlaceholder": "Fragen, erstellen oder Aufgabe starten, <hotkey><hotkey/>",
"sendPlaceholderChat": "Fragen, suchen oder brainstormen, <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "Fragen, suchen oder brainstormen. @, um andere Agenten hinzuzuziehen.",
"sendPlaceholderHeterogeneous": "Bitte {{name}} eine Aufgabe erledigen...",
"sendPlaceholderWithAgentAssignment": "Fragen, erstellen oder eine Aufgabe starten. @, um Aufgaben anderen Agenten zuzuweisen.",
"sessionGroup.config": "Gruppenverwaltung",
@@ -734,6 +759,7 @@
"untitledAgent": "Unbenannter Agent",
"untitledGroup": "Unbenannte Gruppe",
"updateAgent": "Agenteninformationen aktualisieren",
"upload.action.fileOrImageUpload": "Datei oder Bild hochladen",
"upload.action.fileUpload": "Datei hochladen",
"upload.action.folderUpload": "Ordner hochladen",
"upload.action.imageDisabled": "Das aktuelle Modell unterstützt keine visuelle Erkennung. Bitte wechsle das Modell, um diese Funktion zu nutzen.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "Pfad kopieren",
"workingPanel.files.copyRelativePath": "Relativen Pfad kopieren",
"workingPanel.files.count_one": "{{count}} Datei",
"workingPanel.files.count_other": "{{count}} Dateien",
"workingPanel.files.empty": "Keine Dateien in diesem Arbeitsbereich",
"workingPanel.files.open": "Datei öffnen",
"workingPanel.files.refresh": "Aktualisieren",
"workingPanel.files.showInReview": "Im Review anzeigen",
"workingPanel.files.showInSystem": "Im Ordner anzeigen",
"workingPanel.files.title": "Dateien",
"workingPanel.localFile.binary": "Binärdatei — Vorschau nicht verfügbar",
"workingPanel.localFile.close": "Schließen",
"workingPanel.localFile.closeLeft": "Links schließen",
"workingPanel.localFile.closeOther": "Andere schließen",
"workingPanel.localFile.closeRight": "Rechts schließen",
"workingPanel.localFile.error": "Diese Datei konnte nicht geladen werden",
"workingPanel.localFile.truncated": "Dateivorschau auf {{limit}} Zeichen gekürzt",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "Nicht gestaged",
"workingPanel.review.more": "Weitere Optionen",
"workingPanel.review.refresh": "Aktualisieren",
"workingPanel.review.revealInTree": "Im Baum anzeigen",
"workingPanel.review.revealNotFound": "Datei im Projektindex nicht gefunden",
"workingPanel.review.revert": "Änderungen verwerfen",
"workingPanel.review.revert.confirm.cancel": "Abbrechen",
"workingPanel.review.revert.confirm.description": "Die Änderungen in der Arbeitskopie an {{filePath}} werden dauerhaft verworfen. Nicht verfolgte Dateien werden von der Festplatte gelöscht.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "Bestätigen",
"brief.action.confirmDone": "Bestätigen",
"brief.action.feedback": "Feedback",
"brief.action.ignore": "Ignorieren",
"brief.action.retry": "Erneut versuchen",
"brief.addFeedback": "Feedback teilen",
"brief.collapse": "Weniger anzeigen",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "Server konnte nicht entfernt werden.",
"messenger.discord.connections.disconnectSuccess": "Server entfernt.",
"messenger.discord.connections.disconnectTitle": "Server entfernen",
"messenger.discord.installBlocked.dismiss": "Verstanden",
"messenger.discord.installBlocked.suggestion": "Senden Sie dem LobeHub-Bot in Discord eine Direktnachricht, um Ihr persönliches Konto zu verknüpfen Sie müssen den Bot nicht erneut hinzufügen. Oder bitten Sie den ursprünglichen Installateur, diesen Server in den LobeHub-Einstellungen → Messenger zu entfernen, bevor Sie ihn erneut hinzufügen.",
"messenger.discord.installBlocked.title": "Server bereits verbunden",
"messenger.discord.installBlocked.withName": "\"{{workspace}}\" ist bereits von einem anderen Benutzer mit LobeHub verbunden.",
"messenger.discord.installBlocked.withoutName": "Dieser Discord-Server ist bereits von einem anderen Benutzer mit LobeHub verbunden.",
"messenger.discord.installResult.failed": "Discord-Installation fehlgeschlagen ({{reason}}). Bitte versuchen Sie es erneut oder kontaktieren Sie den Support.",
"messenger.discord.installResult.reasons.accessDenied": "Die Autorisierung wurde abgebrochen",
"messenger.discord.installResult.reasons.exchangeFailed": "Discord-Autorisierung fehlgeschlagen",
"messenger.discord.installResult.reasons.generic": "Ein unbekannter Fehler ist aufgetreten",
"messenger.discord.installResult.reasons.invalidState": "Die Installationssitzung ist abgelaufen",
"messenger.discord.installResult.reasons.missingAppId": "Discord hat unvollständige App-Informationen zurückgegeben",
"messenger.discord.installResult.reasons.missingCodeOrState": "Discord hat unvollständige Installationsparameter zurückgegeben",
"messenger.discord.installResult.reasons.missingTenant": "Discord hat keine Serverkennung zurückgegeben",
"messenger.discord.installResult.reasons.missingToken": "Discord hat kein Zugriffstoken zurückgegeben",
"messenger.discord.installResult.reasons.persistFailed": "Die Serververbindung konnte nicht gespeichert werden",
"messenger.discord.installResult.success": "Discord-Server verbunden.",
"messenger.discord.userPending.cta": "In Discord öffnen",
"messenger.discord.userPending.hint": "Öffnen Sie den Bot in Discord und senden Sie eine Nachricht, um die Verknüpfung Ihres Kontos abzuschließen.",
"messenger.discord.userPending.name": "Noch nicht verknüpft",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "Ungültiger Link. Öffnen Sie diese Seite über den Bot.",
"verify.error.title": "Verknüpfung konnte nicht bestätigt werden",
"verify.error.unlinkBeforeRelink": "Dieses LobeHub-Konto ist bereits mit einem anderen Telegram-Konto verknüpft. Trennen Sie es in Einstellungen → Messenger, bevor Sie ein neues verknüpfen.",
"verify.labRequired.description": "Messenger ist derzeit eine Labs-Funktion. Aktivieren Sie sie unter Einstellungen → Erweitert → Labs und laden Sie diese Seite neu.",
"verify.labRequired.openSettings": "Labs-Einstellungen öffnen",
"verify.labRequired.title": "Messenger aktivieren, um fortzufahren",
"verify.signInCta": "Anmelden, um fortzufahren",
"verify.signInRequired": "Bitte melden Sie sich bei LobeHub an, um die Verknüpfung zu bestätigen.",
"verify.success.description": "Ihr Konto ist jetzt mit {{platform}} verbunden. Öffnen Sie {{platform}} und senden Sie Ihre erste Nachricht.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "Arbeitsverzeichnis öffnen in",
"errors.appNotInstalled": "{{appName}} ist nicht installiert",
"errors.launchFailed": "Fehler beim Öffnen in {{appName}}: {{error}}",
"errors.pathNotFound": "Pfad nicht gefunden: {{path}}",
"errors.unknown": "Unbekannter Fehler",
"tooltip": "Öffnen in {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "Plugin",
"builtins.lobe-agent-management.render.installPlugin.success": "Erfolgreich installiert",
"builtins.lobe-agent-management.title": "Agenten-Manager",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "Visuelle Medien analysieren",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} Medien",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "Visuelle Medien analysieren: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "Sub-Agent aufrufen",
"builtins.lobe-agent.apiName.callSubAgent.completed": "Sub-Agent entsendet: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "Sub-Agent wird entsendet: ",
+21 -6
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "Startnachricht",
"agentTab.plugin": "Fähigkeitseinstellungen",
"agentTab.prompt": "Agentenprofil",
"agentTab.selfIteration": "Selbstiteration",
"agentTab.tts": "Sprachdienst",
"analytics.telemetry.desc": "Hilf uns, {{appName}} mit anonymen Nutzungsdaten zu verbessern",
"analytics.telemetry.title": "Anonyme Nutzungsdaten senden",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "Die neueste Nachricht des Benutzers wird in diese Vorlage eingefügt",
"settingChat.inputTemplate.placeholder": "Vorverarbeitungsvorlage {{text}} wird durch Echtzeiteingabe ersetzt",
"settingChat.inputTemplate.title": "Benutzereingabe-Vorverarbeitung",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "Chat-Einstellungen aktualisieren",
"settingChat.title": "Chat-Einstellungen",
"settingChatAppearance.autoScrollOnStreaming.desc": "Automatisch nach unten scrollen, wenn die KI eine Antwort generiert",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "Maximale Tokens",
"settingModel.model.desc": "{{provider}} Modell",
"settingModel.model.title": "Modell",
"settingModel.params.panel.advanced": "Erweiterte Einstellungen",
"settingModel.params.panel.agentTitle": "Erweiterte Agenteneinstellungen",
"settingModel.params.panel.contextCompression": "Kontext automatisch komprimieren",
"settingModel.params.panel.creativity": "Kreativität",
"settingModel.params.panel.historyLimit": "Nachrichtenverlauf begrenzen",
"settingModel.params.panel.openness": "Offenheit",
"settingModel.params.panel.responseLength": "Antwortlänge begrenzen",
"settingModel.params.panel.tab": "Parameter",
"settingModel.params.panel.title": "Chat-Parameter-Einstellungen",
"settingModel.params.panel.topicDivergence": "Themenabweichung",
"settingModel.params.panel.vocabularyRichness": "Wortschatzreichtum",
"settingModel.params.title": "Erweiterte Parameter",
"settingModel.presencePenalty.desc": "Je höher der Wert, desto mehr unterschiedliche Ausdrücke; je niedriger, desto mehr Wiederholungen.",
"settingModel.presencePenalty.title": "Ausdrucksvielfalt",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "Einstiegsfragen",
"settingOpening.title": "Begrüßungseinstellungen",
"settingPlugin.title": "Fähigkeitenliste",
"settingSelfIteration.enabled.desc": "Erlauben Sie diesem Assistenten, kürzlich empfangene Signale zu überprüfen und seine eigenen Fähigkeiten zu verbessern, wenn der Selbstiterations-Workflow ausgeführt wird.",
"settingSelfIteration.enabled.managedDesc": "Immer aktiviert für Lobe AI, solange Selbstiteration verfügbar ist.",
"settingSelfIteration.enabled.title": "Selbstiteration aktivieren",
"settingSelfIteration.title": "Selbstiteration",
"settingSystem.oauth.info.desc": "Angemeldet",
"settingSystem.oauth.info.title": "Kontoinformationen",
"settingSystem.oauth.signin.action": "Anmelden",
@@ -897,7 +910,12 @@
"tab.uploadZip": "Zip hochladen",
"tab.uploadZip.desc": "Laden Sie eine lokale .zip- oder .skill-Datei hoch",
"tab.usage": "Nutzungsstatistik",
"tools.activation.auto": "Automatisch",
"tools.activation.auto.desc": "Intelligent",
"tools.activation.pinned": "Angeheftet",
"tools.activation.pinned.desc": "Immer an",
"tools.add": "Fähigkeit hinzufügen",
"tools.builtins.configure": "Konfigurieren",
"tools.builtins.find-skills.description": "Hilft Nutzern, AgentenFähigkeiten zu entdecken und zu installieren, wenn sie fragen „Wie mache ich X?“, „Finde eine Fähigkeit für X“ oder Funktionen erweitern möchten",
"tools.builtins.find-skills.title": "Fähigkeiten finden",
"tools.builtins.groupName": "Integriert",
@@ -932,9 +950,6 @@
"tools.builtins.lobe-group-agent-builder.title": "GruppenAgentBuilder",
"tools.builtins.lobe-group-management.description": "Unterhaltungen von MultiAgentenGruppen orchestrieren und verwalten",
"tools.builtins.lobe-group-management.title": "Gruppenverwaltung",
"tools.builtins.lobe-gtd.description": "Ziele planen und Fortschritte mit der GTD-Methode verfolgen. Strategische Pläne erstellen, Aufgabenlisten mit Statusverfolgung verwalten und lang laufende asynchrone Aufgaben ausführen.",
"tools.builtins.lobe-gtd.readme": "Planen Sie Ziele und verfolgen Sie Fortschritte mit der GTD-Methodik. Erstellen Sie strategische Pläne, verwalten Sie Aufgabenlisten mit Statusverfolgung und führen Sie lang laufende asynchrone Aufgaben aus.",
"tools.builtins.lobe-gtd.title": "GTD-Werkzeuge",
"tools.builtins.lobe-knowledge-base.description": "Hochgeladene Dokumente und Domainwissen per semantischer Vektorsuche durchsuchen für persistente, wiederverwendbare Referenzen",
"tools.builtins.lobe-knowledge-base.title": "Wissensdatenbank",
"tools.builtins.lobe-local-system.description": "Zugriff auf Ihr lokales Dateisystem auf dem Desktop. Dateien lesen, schreiben, durchsuchen und organisieren. Shell-Befehle mit Unterstützung für Hintergrundaufgaben ausführen und Inhalte mit Regex-Mustern durchsuchen.",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "API-Aufruf",
"table.columns.trigger.enums.bot": "Bot-Nachricht",
"table.columns.trigger.enums.chat": "Chat-Nachricht",
"table.columns.trigger.enums.cli": "CLI",
"table.columns.trigger.enums.cron": "Geplanter Task",
"table.columns.trigger.enums.eval": "Benchmark-Auswertung",
"table.columns.trigger.enums.file_embedding": "Datei-Einbettung",
"table.columns.trigger.enums.image": "Bildgenerierung",
"table.columns.trigger.enums.memory": "Speicherextraktion",
"table.columns.trigger.enums.notify": "Benachrichtigung",
"table.columns.trigger.enums.onboarding": "Einführung",
"table.columns.trigger.enums.openapi": "OpenAPI",
"table.columns.trigger.enums.semantic_search": "Wissenssuche",
"table.columns.trigger.enums.topic": "Themenzusammenfassung",
"table.columns.trigger.enums.video": "Videogenerierung",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "Paste your bot token here",
"channel.charLimit": "Character Limit",
"channel.charLimitHint": "Maximum number of characters per message",
"channel.comingSoon": "Coming Soon",
"channel.comingSoonDesc": "We are working on bringing this integration to LobeHub. Stay tuned for updates.",
"channel.comingSoonTitle": "{{name}} integration is coming soon",
"channel.concurrency": "Concurrency Mode",
"channel.concurrencyDebounce": "Debounce",
"channel.concurrencyDebounceHint": "Only process the last message in a burst (earlier ones are dropped)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "Verification Token",
"channel.verificationTokenHint": "Optional. Used to verify webhook event source.",
"channel.verificationTokenPlaceholder": "Paste your verification token here",
"channel.watchKeywordInstructionLabel": "Instruction",
"channel.watchKeywordInstructionPlaceholder": "e.g. Scan the recent thread and reply if there is an actionable bug report",
"channel.watchKeywordLabel": "Keyword",
"channel.watchKeywordPlaceholder": "e.g. bug",
"channel.watchKeywords": "Watch Keywords",
"channel.watchKeywordsAdd": "Add keyword",
"channel.watchKeywordsEmpty": "No keywords added yet — bot only wakes on @mention or DM in subscribed channels.",
"channel.watchKeywordsHint": "A keyword match wakes the bot without an @mention; its instruction is prepended to the user message. Whole-word, case-insensitive.",
"channel.wechat.description": "Connect this assistant to WeChat via iLink Bot for private and group chats.",
"channel.wechatBotId": "Bot ID",
"channel.wechatBotIdHint": "Bot identifier assigned after QR code authorization.",
+46 -1
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} knowledge bases",
"agentProfile.skills_one": "{{count}} skill",
"agentProfile.skills_other": "{{count}} skills",
"agentSignal.receipts.agentSignalLabel": "Agent Signal",
"agentSignal.receipts.memory.detail": "Saved this for future replies",
"agentSignal.receipts.memory.title": "Memory saved",
"agentSignal.receipts.recentActivity": "Recent activity",
@@ -41,6 +42,16 @@
"builtinCopilot": "Built-in Copilot",
"chatList.expandMessage": "Expand Message",
"chatList.longMessageDetail": "View Details",
"chatMode.agent": "Agent",
"chatMode.agentCap.env": "Runtime env",
"chatMode.agentCap.files": "File access",
"chatMode.agentCap.memory": "Memory",
"chatMode.agentCap.tools": "Tool calls",
"chatMode.agentCap.web": "Web search",
"chatMode.agentDesc": "Agent can use tools and environment to complete tasks automatically",
"chatMode.chat": "Chat",
"chatMode.chatDesc": "No runtime environment or autonomy; uses fewer tokens",
"chatMode.select": "Switch Mode",
"claudeCodeInstallGuide.actions.openDocs": "Open Install Guide",
"claudeCodeInstallGuide.actions.openSystemTools": "Open System Tools",
"claudeCodeInstallGuide.afterInstall": "After installing, run Claude Code once to sign in, then retry your message or click Re-detect in System Tools.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "Run this in Terminal",
"cliAuthGuide.title": "Sign in to {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "Open System Tools",
"cliRateLimitGuide.actions.retry": "Retry",
"cliRateLimitGuide.afterReset": "Wait until the reset time, then retry your message. If you are using API authorization, you can also check your provider quota and billing status.",
"cliRateLimitGuide.desc": "{{name}} has reached its current usage limit and cannot continue this run right now.",
"cliRateLimitGuide.limitType": "Limit window",
@@ -141,7 +153,7 @@
"extendParams.title": "Model Extension Features",
"extendParams.urlContext.desc": "When enabled, web links will be automatically parsed to retrieve the actual webpage context content",
"extendParams.urlContext.title": "Extract Webpage Link Content",
"followUpPlaceholder": "Follow up. @ to assign tasks to other agents.",
"followUpPlaceholder": "Follow up.",
"followUpPlaceholderHeterogeneous": "Follow up.",
"group.desc": "Move a task forward with multiple Agents in one shared space.",
"group.memberTooltip": "There are {{count}} members in the group",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "All Files",
"knowledgeBase.allLibraries": "All Libraries",
"knowledgeBase.disabled": "Library chat isnt available in this deployment. Switch to a server-side database, or use {{cloud}}.",
"knowledgeBase.files": "Files",
"knowledgeBase.libraries": "Libraries",
"knowledgeBase.library.action.add": "Add",
"knowledgeBase.library.action.detail": "Details",
"knowledgeBase.library.action.remove": "Remove",
@@ -326,6 +340,15 @@
"pageSelection.reference": "Selected Text",
"pin": "Pin",
"pinOff": "Unpin",
"plus.addSkills": "Add Skills...",
"plus.search.appSearch": "Smart Search",
"plus.search.appSearchDesc": "LobeHub optimized search service, delivering best retrieval results.",
"plus.search.modelSearch": "Provider Search",
"plus.search.modelSearchDesc": "May cause unexpected behavior when enabled, not recommended.",
"plus.search.off": "Off",
"plus.search.offDesc": "",
"plus.title": "Add",
"plus.tooltip": "Add files, skills, and more context...",
"rag.referenceChunks": "Reference Source",
"rag.userQuery.actions.delete": "Delete Query Rewrite",
"rag.userQuery.actions.regenerate": "Regenerate Query",
@@ -357,6 +380,8 @@
"searchAgents": "Search agents...",
"selectedAgents": "Selected agents",
"sendPlaceholder": "Ask, create, or start a task, <hotkey><hotkey/>",
"sendPlaceholderChat": "Ask, search, or brainstorm, <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "Ask, search, or brainstorm. @ to bring in other agents.",
"sendPlaceholderHeterogeneous": "Describe a task or ask a question to {{name}}",
"sendPlaceholderWithAgentAssignment": "Ask, create, or start a task. @ to assign tasks to other agents.",
"sessionGroup.config": "Category Management",
@@ -734,6 +759,7 @@
"untitledAgent": "Untitled Agent",
"untitledGroup": "Untitled Group",
"updateAgent": "Update Agent Information",
"upload.action.fileOrImageUpload": "Upload File or Image",
"upload.action.fileUpload": "Upload File",
"upload.action.folderUpload": "Upload Folder",
"upload.action.imageDisabled": "The current model does not support visual recognition. Please switch models to use this feature.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "Copy Path",
"workingPanel.files.copyRelativePath": "Copy Relative Path",
"workingPanel.files.count_one": "{{count}} file",
"workingPanel.files.count_other": "{{count}} files",
"workingPanel.files.empty": "No files in this workspace",
"workingPanel.files.open": "Open File",
"workingPanel.files.refresh": "Refresh",
"workingPanel.files.showInReview": "Show in Review",
"workingPanel.files.showInSystem": "Reveal in Folder",
"workingPanel.files.title": "Files",
"workingPanel.localFile.binary": "Binary file — preview unavailable",
"workingPanel.localFile.close": "Close",
"workingPanel.localFile.closeLeft": "Close to the Left",
"workingPanel.localFile.closeOther": "Close Others",
"workingPanel.localFile.closeRight": "Close to the Right",
"workingPanel.localFile.error": "Couldn't load this file",
"workingPanel.localFile.truncated": "File preview truncated to {{limit}} characters",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "Unstaged",
"workingPanel.review.more": "More options",
"workingPanel.review.refresh": "Refresh",
"workingPanel.review.revealInTree": "Reveal in tree",
"workingPanel.review.revealNotFound": "File not found in project index",
"workingPanel.review.revert": "Discard changes",
"workingPanel.review.revert.confirm.cancel": "Cancel",
"workingPanel.review.revert.confirm.description": "Working tree changes to {{filePath}} will be permanently discarded. Untracked files are deleted from disk.",
+16
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "Failed to remove server.",
"messenger.discord.connections.disconnectSuccess": "Server removed.",
"messenger.discord.connections.disconnectTitle": "Remove server",
"messenger.discord.installBlocked.dismiss": "Got it",
"messenger.discord.installBlocked.suggestion": "DM the LobeHub bot in Discord to link your personal account — you don't need to add the bot again. Or ask the original installer to remove this server in LobeHub Settings → Messenger before re-adding it.",
"messenger.discord.installBlocked.title": "Server already connected",
"messenger.discord.installBlocked.withName": "\"{{workspace}}\" is already connected to LobeHub by another user.",
"messenger.discord.installBlocked.withoutName": "This Discord server is already connected to LobeHub by another user.",
"messenger.discord.installResult.failed": "Discord install failed ({{reason}}). Please try again or contact support.",
"messenger.discord.installResult.reasons.accessDenied": "authorization was cancelled",
"messenger.discord.installResult.reasons.exchangeFailed": "Discord authorization failed",
"messenger.discord.installResult.reasons.generic": "an unknown error occurred",
"messenger.discord.installResult.reasons.invalidState": "the install session expired",
"messenger.discord.installResult.reasons.missingAppId": "Discord returned incomplete app information",
"messenger.discord.installResult.reasons.missingCodeOrState": "Discord returned incomplete install parameters",
"messenger.discord.installResult.reasons.missingTenant": "Discord did not return a server identifier",
"messenger.discord.installResult.reasons.missingToken": "Discord did not return an access token",
"messenger.discord.installResult.reasons.persistFailed": "the server connection could not be saved",
"messenger.discord.installResult.success": "Discord server connected.",
"messenger.discord.userPending.cta": "Open in Discord",
"messenger.discord.userPending.hint": "Open the bot in Discord and send any message to finish linking your account.",
"messenger.discord.userPending.name": "Not linked yet",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "Open working directory in",
"errors.appNotInstalled": "{{appName}} is not installed",
"errors.launchFailed": "Failed to open in {{appName}}: {{error}}",
"errors.pathNotFound": "Path not found: {{path}}",
"errors.unknown": "unknown error",
"tooltip": "Open in {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "Plugin",
"builtins.lobe-agent-management.render.installPlugin.success": "Installed successfully",
"builtins.lobe-agent-management.title": "Agent Manager",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "Analyze visual media",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} media",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "Analyze visual media: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "Call sub-agent",
"builtins.lobe-agent.apiName.callSubAgent.completed": "Sub-agent dispatched: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "Dispatching sub-agent: ",
+21 -3
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "Opening Settings",
"agentTab.plugin": "Skill Settings",
"agentTab.prompt": "Agent Profile",
"agentTab.selfIteration": "Self-Iteration",
"agentTab.tts": "Voice Service",
"analytics.telemetry.desc": "Help us improve {{appName}} with anonymous usage data",
"analytics.telemetry.title": "Send Anonymous Usage Data",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "The user's latest message will be filled into this template",
"settingChat.inputTemplate.placeholder": "Preprocessing template {{text}} will be replaced with real-time input information",
"settingChat.inputTemplate.title": "User Input Preprocessing",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "Update Chat Preferences",
"settingChat.title": "Chat Settings",
"settingChatAppearance.autoScrollOnStreaming.desc": "Automatically scroll to bottom when AI is generating response",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "Max Tokens Limit",
"settingModel.model.desc": "{{provider}} model",
"settingModel.model.title": "Model",
"settingModel.params.panel.advanced": "Advanced Settings",
"settingModel.params.panel.agentTitle": "Agent Advanced Settings",
"settingModel.params.panel.contextCompression": "Auto-compress Context",
"settingModel.params.panel.creativity": "Creativity",
"settingModel.params.panel.historyLimit": "Limit History Messages",
"settingModel.params.panel.openness": "Openness",
"settingModel.params.panel.responseLength": "Limit Response Length",
"settingModel.params.panel.tab": "Params",
"settingModel.params.panel.title": "Chat Parameter Settings",
"settingModel.params.panel.topicDivergence": "Topic Divergence",
"settingModel.params.panel.vocabularyRichness": "Vocabulary Richness",
"settingModel.params.title": "Advanced Parameters",
"settingModel.presencePenalty.desc": "The higher the value, the more inclined to use different expressions and avoid concept repetition; the lower the value, the more inclined to use repeated concepts or narratives, resulting in more consistent expression.",
"settingModel.presencePenalty.title": "Expression Divergence",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "Opening Questions",
"settingOpening.title": "Opening Settings",
"settingPlugin.title": "Skill List",
"settingSelfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the self-iteration workflow runs.",
"settingSelfIteration.enabled.managedDesc": "Always on for Lobe AI while Self-Iteration is available.",
"settingSelfIteration.enabled.title": "Enable Self-Iteration",
"settingSelfIteration.title": "Self-Iteration",
"settingSystem.oauth.info.desc": "Logged in",
"settingSystem.oauth.info.title": "Account Information",
"settingSystem.oauth.signin.action": "Sign In",
@@ -897,7 +910,12 @@
"tab.uploadZip": "Upload Zip",
"tab.uploadZip.desc": "Upload a local .zip or .skill file",
"tab.usage": "Usage",
"tools.activation.auto": "Auto",
"tools.activation.auto.desc": "Smart",
"tools.activation.pinned": "Pinned",
"tools.activation.pinned.desc": "Always On",
"tools.add": "Add Skill",
"tools.builtins.configure": "Configure",
"tools.builtins.find-skills.description": "Helps users discover and install agent skills when they ask \"how do I do X\", \"find a skill for X\", or want to extend capabilities",
"tools.builtins.find-skills.title": "Find Skills",
"tools.builtins.groupName": "Built-ins",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "API Call",
"table.columns.trigger.enums.bot": "Bot Message",
"table.columns.trigger.enums.chat": "Chat Message",
"table.columns.trigger.enums.cli": "CLI",
"table.columns.trigger.enums.cron": "Scheduled Task",
"table.columns.trigger.enums.eval": "Benchmark Eval",
"table.columns.trigger.enums.file_embedding": "File Embedding",
"table.columns.trigger.enums.image": "Image Generation",
"table.columns.trigger.enums.memory": "Memory Extraction",
"table.columns.trigger.enums.notify": "Notification",
"table.columns.trigger.enums.onboarding": "Onboarding",
"table.columns.trigger.enums.openapi": "OpenAPI",
"table.columns.trigger.enums.semantic_search": "Knowledge Search",
"table.columns.trigger.enums.topic": "Topic Summary",
"table.columns.trigger.enums.video": "Video Generation",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "Pega tu token del bot aquí",
"channel.charLimit": "Límite de caracteres",
"channel.charLimitHint": "Número máximo de caracteres por mensaje",
"channel.comingSoon": "Próximamente",
"channel.comingSoonDesc": "Estamos trabajando para traer esta integración a LobeHub. Mantente atento para más actualizaciones.",
"channel.comingSoonTitle": "La integración de {{name}} estará disponible próximamente",
"channel.concurrency": "Modo de Concurrencia",
"channel.concurrencyDebounce": "Antirrebote",
"channel.concurrencyDebounceHint": "Procesar solo el último mensaje de una ráfaga (los anteriores se descartan)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "Token de Verificación",
"channel.verificationTokenHint": "Opcional. Usado para verificar la fuente de eventos del webhook.",
"channel.verificationTokenPlaceholder": "Pega tu token de verificación aquí",
"channel.watchKeywordInstructionLabel": "Instrucción",
"channel.watchKeywordInstructionPlaceholder": "p. ej., Escanea el hilo reciente y responde si hay un informe de error accionable",
"channel.watchKeywordLabel": "Palabra clave",
"channel.watchKeywordPlaceholder": "p. ej., error",
"channel.watchKeywords": "Palabras clave de vigilancia",
"channel.watchKeywordsAdd": "Agregar palabra clave",
"channel.watchKeywordsEmpty": "No se han agregado palabras clave aún — el bot solo se activa con una @mención o un mensaje directo en los canales suscritos.",
"channel.watchKeywordsHint": "Cuando un mensaje en un canal suscrito coincide con una palabra clave, el bot se activa sin una @mención y la instrucción se antepone al mensaje del usuario antes de enviarlo a la IA. Coincidencia insensible a mayúsculas, de palabra completa.",
"channel.wechat.description": "Conecta este asistente a WeChat a través de iLink Bot para chats privados y grupales.",
"channel.wechatBotId": "ID del Bot",
"channel.wechatBotIdHint": "Identificador del bot asignado tras la autorización mediante código QR.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} bases de conocimiento",
"agentProfile.skills_one": "{{count}} habilidad",
"agentProfile.skills_other": "{{count}} habilidades",
"agentSignal.receipts.agentSignalLabel": "Señal del Agente",
"agentSignal.receipts.memory.detail": "Guardado para respuestas futuras",
"agentSignal.receipts.memory.title": "Memoria guardada",
"agentSignal.receipts.recentActivity": "Actividad reciente",
@@ -41,6 +42,16 @@
"builtinCopilot": "Copiloto integrado",
"chatList.expandMessage": "Expandir mensaje",
"chatList.longMessageDetail": "Ver detalles",
"chatMode.agent": "Agente",
"chatMode.agentCap.env": "Entorno de ejecución",
"chatMode.agentCap.files": "Acceso a archivos",
"chatMode.agentCap.memory": "Memoria",
"chatMode.agentCap.tools": "Llamadas de herramientas",
"chatMode.agentCap.web": "Búsqueda web",
"chatMode.agentDesc": "El agente puede usar herramientas y el entorno para completar tareas automáticamente",
"chatMode.chat": "Chat",
"chatMode.chatDesc": "Sin entorno de ejecución ni autonomía; usa menos tokens",
"chatMode.select": "Cambiar modo",
"claudeCodeInstallGuide.actions.openDocs": "Abrir guía de instalación",
"claudeCodeInstallGuide.actions.openSystemTools": "Abrir herramientas del sistema",
"claudeCodeInstallGuide.afterInstall": "Después de instalar, ejecuta Claude Code una vez para iniciar sesión; luego vuelve a intentar tu mensaje o haz clic en Detectar de nuevo en Herramientas del sistema.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "Ejecuta esto en la Terminal",
"cliAuthGuide.title": "Iniciar sesión en {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "Abrir herramientas del sistema",
"cliRateLimitGuide.actions.retry": "Reintentar",
"cliRateLimitGuide.afterReset": "Espera hasta la hora de restablecimiento y vuelve a intentar tu mensaje. Si usas autorización por API, también puedes revisar tu cuota y estado de facturación.",
"cliRateLimitGuide.desc": "{{name}} ha alcanzado su límite de uso actual y no puede continuar esta ejecución por ahora.",
"cliRateLimitGuide.limitType": "Ventana de límite",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "Todos los archivos",
"knowledgeBase.allLibraries": "Todas las bibliotecas",
"knowledgeBase.disabled": "El chat de biblioteca no está disponible en esta implementación. Cambia a una base de datos del lado del servidor o usa {{cloud}}.",
"knowledgeBase.files": "Archivos",
"knowledgeBase.libraries": "Bibliotecas",
"knowledgeBase.library.action.add": "Agregar",
"knowledgeBase.library.action.detail": "Detalles",
"knowledgeBase.library.action.remove": "Eliminar",
@@ -326,6 +340,15 @@
"pageSelection.reference": "Texto Seleccionado",
"pin": "Fijar",
"pinOff": "Desfijar",
"plus.addSkills": "Agregar habilidades...",
"plus.search.appSearch": "Búsqueda inteligente",
"plus.search.appSearchDesc": "Servicio de búsqueda optimizado de LobeHub, ofreciendo los mejores resultados de recuperación.",
"plus.search.modelSearch": "Búsqueda de proveedor",
"plus.search.modelSearchDesc": "Puede causar un comportamiento inesperado cuando está habilitado, no recomendado.",
"plus.search.off": "Apagado",
"plus.search.offDesc": "",
"plus.title": "Agregar",
"plus.tooltip": "Agregar archivos, habilidades y más contexto...",
"rag.referenceChunks": "Fuente de referencia",
"rag.userQuery.actions.delete": "Eliminar reescritura de consulta",
"rag.userQuery.actions.regenerate": "Regenerar consulta",
@@ -357,6 +380,8 @@
"searchAgents": "Buscar agentes...",
"selectedAgents": "Agentes seleccionados",
"sendPlaceholder": "Pregunta, crea o inicia una tarea, <hotkey><hotkey/>",
"sendPlaceholderChat": "Pregunta, busca o genera ideas, <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "Pregunta, busca o genera ideas. @ para incluir a otros agentes.",
"sendPlaceholderHeterogeneous": "Pide a {{name}} que realice una tarea...",
"sendPlaceholderWithAgentAssignment": "Pregunta, crea o inicia una tarea. Usa @ para asignar tareas a otros agentes.",
"sessionGroup.config": "Gestión de grupos",
@@ -734,6 +759,7 @@
"untitledAgent": "Agente sin título",
"untitledGroup": "Grupo sin título",
"updateAgent": "Actualizar información del agente",
"upload.action.fileOrImageUpload": "Subir archivo o imagen",
"upload.action.fileUpload": "Subir archivo",
"upload.action.folderUpload": "Subir carpeta",
"upload.action.imageDisabled": "El modelo actual no admite reconocimiento visual. Cambia de modelo para usar esta función.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "Copiar Ruta Absoluta",
"workingPanel.files.copyRelativePath": "Copiar Ruta Relativa",
"workingPanel.files.count_one": "{{count}} archivo",
"workingPanel.files.count_other": "{{count}} archivos",
"workingPanel.files.empty": "No hay archivos en este espacio de trabajo",
"workingPanel.files.open": "Abrir Archivo",
"workingPanel.files.refresh": "Actualizar",
"workingPanel.files.showInReview": "Mostrar en Revisión",
"workingPanel.files.showInSystem": "Revelar en Carpeta",
"workingPanel.files.title": "Archivos",
"workingPanel.localFile.binary": "Archivo binario — vista previa no disponible",
"workingPanel.localFile.close": "Cerrar",
"workingPanel.localFile.closeLeft": "Cerrar a la Izquierda",
"workingPanel.localFile.closeOther": "Cerrar Otros",
"workingPanel.localFile.closeRight": "Cerrar a la Derecha",
"workingPanel.localFile.error": "No se pudo cargar este archivo",
"workingPanel.localFile.truncated": "Vista previa del archivo truncada a {{limit}} caracteres",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "No preparado",
"workingPanel.review.more": "Más opciones",
"workingPanel.review.refresh": "Actualizar",
"workingPanel.review.revealInTree": "Revelar en el árbol",
"workingPanel.review.revealNotFound": "Archivo no encontrado en el índice del proyecto",
"workingPanel.review.revert": "Descartar cambios",
"workingPanel.review.revert.confirm.cancel": "Cancelar",
"workingPanel.review.revert.confirm.description": "Los cambios en el árbol de trabajo de {{filePath}} se descartarán permanentemente. Los archivos sin seguimiento se eliminarán del disco.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "Confirmar",
"brief.action.confirmDone": "Confirmar",
"brief.action.feedback": "Comentarios",
"brief.action.ignore": "Ignorar",
"brief.action.retry": "Reintentar",
"brief.addFeedback": "Compartir comentarios",
"brief.collapse": "Mostrar menos",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "No se pudo eliminar el servidor.",
"messenger.discord.connections.disconnectSuccess": "Servidor eliminado.",
"messenger.discord.connections.disconnectTitle": "Eliminar servidor",
"messenger.discord.installBlocked.dismiss": "Entendido",
"messenger.discord.installBlocked.suggestion": "Envía un mensaje directo al bot de LobeHub en Discord para vincular tu cuenta personal; no necesitas agregar el bot nuevamente. O pide al instalador original que elimine este servidor en Configuración de LobeHub → Messenger antes de volver a agregarlo.",
"messenger.discord.installBlocked.title": "Servidor ya conectado",
"messenger.discord.installBlocked.withName": "\"{{workspace}}\" ya está conectado a LobeHub por otro usuario.",
"messenger.discord.installBlocked.withoutName": "Este servidor de Discord ya está conectado a LobeHub por otro usuario.",
"messenger.discord.installResult.failed": "La instalación de Discord falló ({{reason}}). Por favor, inténtalo de nuevo o contacta con soporte.",
"messenger.discord.installResult.reasons.accessDenied": "la autorización fue cancelada",
"messenger.discord.installResult.reasons.exchangeFailed": "la autorización de Discord falló",
"messenger.discord.installResult.reasons.generic": "ocurrió un error desconocido",
"messenger.discord.installResult.reasons.invalidState": "la sesión de instalación expiró",
"messenger.discord.installResult.reasons.missingAppId": "Discord devolvió información incompleta de la aplicación",
"messenger.discord.installResult.reasons.missingCodeOrState": "Discord devolvió parámetros de instalación incompletos",
"messenger.discord.installResult.reasons.missingTenant": "Discord no devolvió un identificador de servidor",
"messenger.discord.installResult.reasons.missingToken": "Discord no devolvió un token de acceso",
"messenger.discord.installResult.reasons.persistFailed": "no se pudo guardar la conexión del servidor",
"messenger.discord.installResult.success": "Servidor de Discord conectado.",
"messenger.discord.userPending.cta": "Abrir en Discord",
"messenger.discord.userPending.hint": "Abre el bot en Discord y envía cualquier mensaje para finalizar la vinculación de tu cuenta.",
"messenger.discord.userPending.name": "Aún no vinculado",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "Enlace no válido. Abre esta página desde el bot.",
"verify.error.title": "No se pudo confirmar la vinculación",
"verify.error.unlinkBeforeRelink": "Esta cuenta de LobeHub ya está vinculada a otra cuenta de Telegram. Desconéctala en Configuración → Messenger antes de vincular una nueva.",
"verify.labRequired.description": "Messenger es actualmente una función de Labs. Actívala en Configuración → Avanzado → Labs y recarga esta página.",
"verify.labRequired.openSettings": "Abrir configuración de Labs",
"verify.labRequired.title": "Habilita Messenger para continuar",
"verify.signInCta": "Inicia sesión para continuar",
"verify.signInRequired": "Por favor, inicia sesión en LobeHub para confirmar la vinculación.",
"verify.success.description": "Tu cuenta ahora está conectada a {{platform}}. Abre {{platform}} y envía tu primer mensaje.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "Abrir el directorio de trabajo en",
"errors.appNotInstalled": "{{appName}} no está instalado",
"errors.launchFailed": "Error al abrir en {{appName}}: {{error}}",
"errors.pathNotFound": "Ruta no encontrada: {{path}}",
"errors.unknown": "error desconocido",
"tooltip": "Abrir en {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "Complemento",
"builtins.lobe-agent-management.render.installPlugin.success": "Instalado correctamente",
"builtins.lobe-agent-management.title": "Gestor de agentes",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "Analizar medios visuales",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} medios",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "Analizar medios visuales: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "Llamar a subagente",
"builtins.lobe-agent.apiName.callSubAgent.completed": "Subagente enviado: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "Enviando subagente: ",
+21 -6
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "Configuración de Inicio",
"agentTab.plugin": "Configuración de Habilidades",
"agentTab.prompt": "Perfil del Agente",
"agentTab.selfIteration": "Autoiteración",
"agentTab.tts": "Servicio de Voz",
"analytics.telemetry.desc": "Ayúdanos a mejorar {{appName}} con datos de uso anónimos",
"analytics.telemetry.title": "Enviar Datos de Uso Anónimos",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "El último mensaje del usuario se insertará en esta plantilla",
"settingChat.inputTemplate.placeholder": "La plantilla de preprocesamiento {{text}} se reemplazará con la entrada en tiempo real",
"settingChat.inputTemplate.title": "Preprocesamiento de Entrada del Usuario",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "Actualizar Preferencias de Chat",
"settingChat.title": "Configuración de Chat",
"settingChatAppearance.autoScrollOnStreaming.desc": "Desplazar automáticamente hacia abajo cuando la IA esté generando una respuesta",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "Límite de Tokens Máximos",
"settingModel.model.desc": "Modelo de {{provider}}",
"settingModel.model.title": "Modelo",
"settingModel.params.panel.advanced": "Configuración Avanzada",
"settingModel.params.panel.agentTitle": "Configuración Avanzada del Agente",
"settingModel.params.panel.contextCompression": "Compresión Automática del Contexto",
"settingModel.params.panel.creativity": "Creatividad",
"settingModel.params.panel.historyLimit": "Limitar Mensajes del Historial",
"settingModel.params.panel.openness": "Apertura",
"settingModel.params.panel.responseLength": "Limitar Longitud de Respuesta",
"settingModel.params.panel.tab": "Parámetros",
"settingModel.params.panel.title": "Configuración de Parámetros del Chat",
"settingModel.params.panel.topicDivergence": "Divergencia de Temas",
"settingModel.params.panel.vocabularyRichness": "Riqueza de Vocabulario",
"settingModel.params.title": "Parámetros Avanzados",
"settingModel.presencePenalty.desc": "Cuanto mayor sea el valor, más se evitará la repetición de conceptos; cuanto menor, más se tenderá a repetir ideas, logrando una expresión más coherente.",
"settingModel.presencePenalty.title": "Divergencia de Expresión",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "Preguntas de Apertura",
"settingOpening.title": "Configuración de Apertura",
"settingPlugin.title": "Lista de Habilidades",
"settingSelfIteration.enabled.desc": "Permitir que este asistente revise señales recientes y mejore sus propias habilidades cuando se ejecute el flujo de trabajo de autoiteración.",
"settingSelfIteration.enabled.managedDesc": "Siempre activado para Lobe AI mientras la autoiteración esté disponible.",
"settingSelfIteration.enabled.title": "Habilitar Autoiteración",
"settingSelfIteration.title": "Autoiteración",
"settingSystem.oauth.info.desc": "Sesión iniciada",
"settingSystem.oauth.info.title": "Información de la Cuenta",
"settingSystem.oauth.signin.action": "Iniciar Sesión",
@@ -897,7 +910,12 @@
"tab.uploadZip": "Subir Archivo Zip",
"tab.uploadZip.desc": "Sube un archivo local .zip o .skill",
"tab.usage": "Estadísticas de Uso",
"tools.activation.auto": "Automático",
"tools.activation.auto.desc": "Inteligente",
"tools.activation.pinned": "Fijado",
"tools.activation.pinned.desc": "Siempre Activado",
"tools.add": "Agregar Habilidad",
"tools.builtins.configure": "Configurar",
"tools.builtins.find-skills.description": "Ayuda a los usuarios a descubrir e instalar habilidades de agentes cuando preguntan \"¿cómo hago X?\", \"encuentra una habilidad para X\" o quieren ampliar capacidades",
"tools.builtins.find-skills.title": "Buscar Habilidades",
"tools.builtins.groupName": "Integradas",
@@ -932,9 +950,6 @@
"tools.builtins.lobe-group-agent-builder.title": "Constructor de Agentes de Grupo",
"tools.builtins.lobe-group-management.description": "Orquesta y gestiona conversaciones de grupos multiagente",
"tools.builtins.lobe-group-management.title": "Gestión de Grupos",
"tools.builtins.lobe-gtd.description": "Planifica objetivos y haz seguimiento del progreso utilizando la metodología GTD. Crea planes estratégicos, gestiona listas de tareas con seguimiento de estado y ejecuta tareas asincrónicas de larga duración.",
"tools.builtins.lobe-gtd.readme": "Planifica objetivos y haz seguimiento del progreso utilizando la metodología GTD. Crea planes estratégicos, gestiona listas de tareas con seguimiento de estado y ejecuta tareas asíncronas de larga duración.",
"tools.builtins.lobe-gtd.title": "Herramientas GTD",
"tools.builtins.lobe-knowledge-base.description": "Busca documentos cargados y conocimiento de dominio mediante búsqueda semántica vectorial — para referencia persistente y reutilizable",
"tools.builtins.lobe-knowledge-base.title": "Base de Conocimiento",
"tools.builtins.lobe-local-system.description": "Accede a tu sistema de archivos local en el escritorio. Lee, escribe, busca y organiza archivos. Ejecuta comandos de terminal con soporte para tareas en segundo plano y busca contenido con patrones regex.",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "Llamada API",
"table.columns.trigger.enums.bot": "Mensaje del Bot",
"table.columns.trigger.enums.chat": "Mensaje de Chat",
"table.columns.trigger.enums.cli": "CLI",
"table.columns.trigger.enums.cron": "Tarea Programada",
"table.columns.trigger.enums.eval": "Evaluación de Referencia",
"table.columns.trigger.enums.file_embedding": "Incrustación de Archivo",
"table.columns.trigger.enums.image": "Generación de imágenes",
"table.columns.trigger.enums.memory": "Extracción de Memoria",
"table.columns.trigger.enums.notify": "Notificación",
"table.columns.trigger.enums.onboarding": "Incorporación",
"table.columns.trigger.enums.openapi": "OpenAPI",
"table.columns.trigger.enums.semantic_search": "Búsqueda de Conocimiento",
"table.columns.trigger.enums.topic": "Resumen de Tema",
"table.columns.trigger.enums.video": "Generación de vídeo",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "توکن ربات خود را اینجا وارد کنید",
"channel.charLimit": "محدودیت کاراکتر",
"channel.charLimitHint": "حداکثر تعداد کاراکترها در هر پیام",
"channel.comingSoon": "به زودی",
"channel.comingSoonDesc": "ما در حال کار بر روی اضافه کردن این یکپارچه‌سازی به LobeHub هستیم. منتظر به‌روزرسانی‌ها باشید.",
"channel.comingSoonTitle": "یکپارچه‌سازی {{name}} به زودی در دسترس خواهد بود",
"channel.concurrency": "حالت همزمانی",
"channel.concurrencyDebounce": "دیبانس",
"channel.concurrencyDebounceHint": "فقط آخرین پیام در یک سری پردازش می‌شود (پیام‌های قبلی نادیده گرفته می‌شوند)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "توکن تأیید",
"channel.verificationTokenHint": "اختیاری. برای تأیید منبع رویداد وبهوک استفاده می‌شود.",
"channel.verificationTokenPlaceholder": "توکن تأیید خود را اینجا وارد کنید",
"channel.watchKeywordInstructionLabel": "دستورالعمل",
"channel.watchKeywordInstructionPlaceholder": "مثال: بررسی رشته اخیر و پاسخ دادن در صورت وجود گزارش اشکال قابل اقدام",
"channel.watchKeywordLabel": "کلمه کلیدی",
"channel.watchKeywordPlaceholder": "مثال: اشکال",
"channel.watchKeywords": "کلمات کلیدی نظارت",
"channel.watchKeywordsAdd": "افزودن کلمه کلیدی",
"channel.watchKeywordsEmpty": "هنوز هیچ کلمه کلیدی اضافه نشده است — ربات فقط در صورت @mention یا پیام مستقیم در کانال‌های مشترک فعال می‌شود.",
"channel.watchKeywordsHint": "وقتی پیامی در کانال مشترک با کلمه کلیدی مطابقت داشته باشد، ربات بدون نیاز به @mention فعال می‌شود و دستورالعمل به پیام کاربر اضافه می‌شود قبل از ارسال به هوش مصنوعی. حساس به حروف کوچک و بزرگ نیست، مطابقت کلمه کامل.",
"channel.wechat.description": "این دستیار را از طریق iLink Bot به WeChat متصل کنید برای چت‌های خصوصی و گروهی.",
"channel.wechatBotId": "شناسه ربات",
"channel.wechatBotIdHint": "شناسه ربات که پس از تأیید کد QR اختصاص داده شده است.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} پایگاه‌دانش",
"agentProfile.skills_one": "{{count}} مهارت",
"agentProfile.skills_other": "{{count}} مهارت",
"agentSignal.receipts.agentSignalLabel": "سیگنال نماینده",
"agentSignal.receipts.memory.detail": "این را برای پاسخ‌های آینده ذخیره کرد",
"agentSignal.receipts.memory.title": "حافظه ذخیره شد",
"agentSignal.receipts.recentActivity": "فعالیت‌های اخیر",
@@ -41,6 +42,16 @@
"builtinCopilot": "همیار داخلی",
"chatList.expandMessage": "گسترش پیام",
"chatList.longMessageDetail": "مشاهده جزئیات",
"chatMode.agent": "نماینده",
"chatMode.agentCap.env": "محیط اجرایی",
"chatMode.agentCap.files": "دسترسی به فایل",
"chatMode.agentCap.memory": "حافظه",
"chatMode.agentCap.tools": "فراخوانی ابزار",
"chatMode.agentCap.web": "جستجوی وب",
"chatMode.agentDesc": "نماینده می‌تواند از ابزارها و محیط برای انجام خودکار وظایف استفاده کند",
"chatMode.chat": "گفتگو",
"chatMode.chatDesc": "بدون محیط اجرایی یا خودمختاری؛ از توکن‌های کمتری استفاده می‌کند",
"chatMode.select": "تغییر حالت",
"claudeCodeInstallGuide.actions.openDocs": "باز کردن راهنمای نصب",
"claudeCodeInstallGuide.actions.openSystemTools": "باز کردن ابزارهای سیستم",
"claudeCodeInstallGuide.afterInstall": "پس از نصب، یک‌بار Claude Code را اجرا کنید تا وارد شوید، سپس پیام خود را دوباره امتحان کنید یا در ابزارهای سیستم روی «تشخیص مجدد» کلیک کنید.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "این فرمان را در ترمینال اجرا کنید",
"cliAuthGuide.title": "ورود به {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "باز کردن ابزارهای سیستم",
"cliRateLimitGuide.actions.retry": "تلاش مجدد",
"cliRateLimitGuide.afterReset": "تا زمان ریست صبر کنید، سپس پیام خود را دوباره امتحان کنید. اگر از مجوز API استفاده می‌کنید، می‌توانید سهمیه و وضعیت صورتحساب ارائه‌دهنده خود را نیز بررسی کنید.",
"cliRateLimitGuide.desc": "{{name}} به حد استفاده فعلی خود رسیده و در حال حاضر نمی‌تواند ادامه دهد.",
"cliRateLimitGuide.limitType": "دوره محدودیت",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "تمام فایل‌ها",
"knowledgeBase.allLibraries": "تمام کتابخانه‌ها",
"knowledgeBase.disabled": "گفتگوی کتابخانه در این استقرار فعال نیست. به پایگاه داده سمت سرور تغییر دهید یا از {{cloud}} استفاده کنید.",
"knowledgeBase.files": "فایل‌ها",
"knowledgeBase.libraries": "کتابخانه‌ها",
"knowledgeBase.library.action.add": "افزودن",
"knowledgeBase.library.action.detail": "جزئیات",
"knowledgeBase.library.action.remove": "حذف",
@@ -326,6 +340,15 @@
"pageSelection.reference": "متن انتخاب‌شده",
"pin": "سنجاق کردن",
"pinOff": "برداشتن سنجاق",
"plus.addSkills": "افزودن مهارت‌ها...",
"plus.search.appSearch": "جستجوی هوشمند",
"plus.search.appSearchDesc": "خدمات جستجوی بهینه‌سازی شده LobeHub، ارائه بهترین نتایج بازیابی.",
"plus.search.modelSearch": "جستجوی ارائه‌دهنده",
"plus.search.modelSearchDesc": "ممکن است باعث رفتار غیرمنتظره شود، توصیه نمی‌شود.",
"plus.search.off": "خاموش",
"plus.search.offDesc": "",
"plus.title": "افزودن",
"plus.tooltip": "افزودن فایل‌ها، مهارت‌ها و زمینه‌های بیشتر...",
"rag.referenceChunks": "منبع ارجاع",
"rag.userQuery.actions.delete": "حذف بازنویسی پرسش",
"rag.userQuery.actions.regenerate": "بازتولید پرسش",
@@ -357,6 +380,8 @@
"searchAgents": "جستجوی نماینده‌ها...",
"selectedAgents": "نماینده‌های انتخاب‌شده",
"sendPlaceholder": "بپرس، بساز یا کاری را شروع کن، <hotkey><hotkey/>",
"sendPlaceholderChat": "بپرسید، جستجو کنید یا ایده‌پردازی کنید، <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "بپرسید، جستجو کنید یا ایده‌پردازی کنید. @ برای آوردن نمایندگان دیگر.",
"sendPlaceholderHeterogeneous": "از {{name}} بخواهید کاری انجام دهد...",
"sendPlaceholderWithAgentAssignment": "بپرسید، ایجاد کنید، یا وظیفه‌ای شروع کنید. برای واگذاری وظیفه از @ استفاده کنید.",
"sessionGroup.config": "مدیریت گروه",
@@ -734,6 +759,7 @@
"untitledAgent": "نماینده بدون عنوان",
"untitledGroup": "گروه بدون عنوان",
"updateAgent": "به‌روزرسانی اطلاعات نماینده",
"upload.action.fileOrImageUpload": "بارگذاری فایل یا تصویر",
"upload.action.fileUpload": "بارگذاری فایل",
"upload.action.folderUpload": "بارگذاری پوشه",
"upload.action.imageDisabled": "مدل فعلی از شناسایی تصویری پشتیبانی نمی‌کند. لطفاً مدل را تغییر دهید.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "کپی مسیر مطلق",
"workingPanel.files.copyRelativePath": "کپی مسیر نسبی",
"workingPanel.files.count_one": "{{count}} فایل",
"workingPanel.files.count_other": "{{count}} فایل",
"workingPanel.files.empty": "هیچ فایلی در این فضای کاری وجود ندارد",
"workingPanel.files.open": "باز کردن فایل",
"workingPanel.files.refresh": "تازه‌سازی",
"workingPanel.files.showInReview": "نمایش در بازبینی",
"workingPanel.files.showInSystem": "نمایش در پوشه",
"workingPanel.files.title": "فایل‌ها",
"workingPanel.localFile.binary": "فایل باینری — پیش‌نمایش در دسترس نیست",
"workingPanel.localFile.close": "بستن",
"workingPanel.localFile.closeLeft": "بستن به سمت چپ",
"workingPanel.localFile.closeOther": "بستن سایرین",
"workingPanel.localFile.closeRight": "بستن به سمت راست",
"workingPanel.localFile.error": "بارگذاری این فایل ممکن نیست",
"workingPanel.localFile.truncated": "پیش‌نمایش فایل به {{limit}} کاراکتر محدود شده است",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "غیربه‌مرحله",
"workingPanel.review.more": "گزینه‌های بیشتر",
"workingPanel.review.refresh": "تازه‌سازی",
"workingPanel.review.revealInTree": "نمایش در درخت",
"workingPanel.review.revealNotFound": "فایل در شاخص پروژه یافت نشد",
"workingPanel.review.revert": "رد کردن تغییرات",
"workingPanel.review.revert.confirm.cancel": "لغو",
"workingPanel.review.revert.confirm.description": "تغییرات درخت کاری در {{filePath}} به‌طور دائم حذف خواهند شد. فایل‌های ردیابی‌نشده از دیسک حذف می‌شوند.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "تأیید",
"brief.action.confirmDone": "تأیید",
"brief.action.feedback": "بازخورد",
"brief.action.ignore": "نادیده گرفتن",
"brief.action.retry": "تلاش دوباره",
"brief.addFeedback": "اشتراک‌گذاری بازخورد",
"brief.collapse": "نمایش کمتر",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "حذف سرور ناموفق بود.",
"messenger.discord.connections.disconnectSuccess": "سرور حذف شد.",
"messenger.discord.connections.disconnectTitle": "حذف سرور",
"messenger.discord.installBlocked.dismiss": "متوجه شدم",
"messenger.discord.installBlocked.suggestion": "به ربات LobeHub در دیسکورد پیام دهید تا حساب شخصی خود را لینک کنید — نیازی به افزودن دوباره ربات نیست. یا از نصب‌کننده اصلی بخواهید این سرور را در تنظیمات LobeHub → Messenger حذف کند و سپس دوباره اضافه کند.",
"messenger.discord.installBlocked.title": "سرور قبلاً متصل شده است",
"messenger.discord.installBlocked.withName": "«{{workspace}}» قبلاً توسط کاربر دیگری به LobeHub متصل شده است.",
"messenger.discord.installBlocked.withoutName": "این سرور دیسکورد قبلاً توسط کاربر دیگری به LobeHub متصل شده است.",
"messenger.discord.installResult.failed": "نصب دیسکورد ناموفق بود ({{reason}}). لطفاً دوباره تلاش کنید یا با پشتیبانی تماس بگیرید.",
"messenger.discord.installResult.reasons.accessDenied": "مجوز لغو شد",
"messenger.discord.installResult.reasons.exchangeFailed": "مجوز دیسکورد ناموفق بود",
"messenger.discord.installResult.reasons.generic": "یک خطای ناشناخته رخ داد",
"messenger.discord.installResult.reasons.invalidState": "جلسه نصب منقضی شده است",
"messenger.discord.installResult.reasons.missingAppId": "دیسکورد اطلاعات برنامه ناقص را بازگرداند",
"messenger.discord.installResult.reasons.missingCodeOrState": "دیسکورد پارامترهای نصب ناقص را بازگرداند",
"messenger.discord.installResult.reasons.missingTenant": "دیسکورد شناسه سرور را بازنگرداند",
"messenger.discord.installResult.reasons.missingToken": "دیسکورد توکن دسترسی را بازنگرداند",
"messenger.discord.installResult.reasons.persistFailed": "اتصال سرور ذخیره نشد",
"messenger.discord.installResult.success": "سرور دیسکورد متصل شد.",
"messenger.discord.userPending.cta": "باز کردن در Discord",
"messenger.discord.userPending.hint": "ربات را در Discord باز کنید و هر پیامی ارسال کنید تا لینک کردن حساب شما تکمیل شود.",
"messenger.discord.userPending.name": "هنوز لینک نشده",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "لینک نامعتبر. این صفحه را از ربات باز کنید.",
"verify.error.title": "تأیید لینک امکان‌پذیر نیست",
"verify.error.unlinkBeforeRelink": "این حساب LobeHub قبلاً به یک حساب تلگرام دیگر متصل شده است. ابتدا آن را در تنظیمات → پیام‌رسان قطع کنید تا بتوانید حساب جدیدی را متصل کنید.",
"verify.labRequired.description": "پیام‌رسان در حال حاضر یک ویژگی آزمایشی است. آن را در تنظیمات → پیشرفته → آزمایش‌ها فعال کنید و این صفحه را دوباره بارگذاری کنید.",
"verify.labRequired.openSettings": "باز کردن تنظیمات آزمایش‌ها",
"verify.labRequired.title": "برای ادامه پیام‌رسان را فعال کنید",
"verify.signInCta": "برای ادامه وارد شوید",
"verify.signInRequired": "لطفاً وارد LobeHub شوید تا لینک را تأیید کنید.",
"verify.success.description": "حساب شما اکنون به {{platform}} متصل شده است. {{platform}} را باز کنید و اولین پیام خود را ارسال کنید.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "باز کردن دایرکتوری کاری در",
"errors.appNotInstalled": "{{appName}} نصب نشده است",
"errors.launchFailed": "باز کردن در {{appName}} با خطا مواجه شد: {{error}}",
"errors.pathNotFound": "مسیر یافت نشد: {{path}}",
"errors.unknown": "خطای ناشناخته",
"tooltip": "باز کردن در {{appName}}"
}
+3
View File
@@ -69,6 +69,9 @@
"builtins.lobe-agent-management.render.installPlugin.plugin": "افزونه",
"builtins.lobe-agent-management.render.installPlugin.success": "با موفقیت نصب شد",
"builtins.lobe-agent-management.title": "مدیریت نمایندگان",
"builtins.lobe-agent.apiName.analyzeVisualMedia": "تحلیل رسانه بصری",
"builtins.lobe-agent.apiName.analyzeVisualMedia.mediaCount": "{{count}} رسانه",
"builtins.lobe-agent.apiName.analyzeVisualMedia.result": "تحلیل رسانه بصری: <question>{{question}}</question>",
"builtins.lobe-agent.apiName.callSubAgent": "تماس با زیرعامل",
"builtins.lobe-agent.apiName.callSubAgent.completed": "زیرعامل ارسال شد: ",
"builtins.lobe-agent.apiName.callSubAgent.loading": "در حال ارسال زیرعامل: ",
+21 -6
View File
@@ -187,6 +187,7 @@
"agentTab.opening": "تنظیمات آغازین",
"agentTab.plugin": "تنظیمات مهارت",
"agentTab.prompt": "پروفایل عامل",
"agentTab.selfIteration": "خود-تکرار",
"agentTab.tts": "سرویس صوتی",
"analytics.telemetry.desc": "با ارسال داده‌های ناشناس به ما در بهبود {{appName}} کمک کنید",
"analytics.telemetry.title": "ارسال داده‌های استفاده ناشناس",
@@ -554,9 +555,6 @@
"settingChat.inputTemplate.desc": "آخرین پیام کاربر در این قالب قرار می‌گیرد",
"settingChat.inputTemplate.placeholder": "قالب پیش‌پردازش {{text}} با ورودی واقعی جایگزین می‌شود",
"settingChat.inputTemplate.title": "پیش‌پردازش ورودی کاربر",
"settingChat.selfIteration.enabled.desc": "Allow this assistant to review recent signals and improve its own skills when the lab workflow runs",
"settingChat.selfIteration.enabled.title": "Enable Self-Iteration",
"settingChat.selfIteration.title": "Advanced Labs",
"settingChat.submit": "به‌روزرسانی تنظیمات گفتگو",
"settingChat.title": "تنظیمات گفتگو",
"settingChatAppearance.autoScrollOnStreaming.desc": "پیمایش خودکار به پایین هنگام تولید پاسخ توسط هوش مصنوعی",
@@ -659,6 +657,17 @@
"settingModel.maxTokens.title": "محدودیت توکن",
"settingModel.model.desc": "مدل {{provider}}",
"settingModel.model.title": "مدل",
"settingModel.params.panel.advanced": "تنظیمات پیشرفته",
"settingModel.params.panel.agentTitle": "تنظیمات پیشرفته عامل",
"settingModel.params.panel.contextCompression": "فشرده‌سازی خودکار زمینه",
"settingModel.params.panel.creativity": "خلاقیت",
"settingModel.params.panel.historyLimit": "محدودیت پیام‌های تاریخچه",
"settingModel.params.panel.openness": "گشودگی",
"settingModel.params.panel.responseLength": "محدودیت طول پاسخ",
"settingModel.params.panel.tab": "پارامترها",
"settingModel.params.panel.title": "تنظیمات پارامترهای چت",
"settingModel.params.panel.topicDivergence": "واگرایی موضوع",
"settingModel.params.panel.vocabularyRichness": "غنای واژگان",
"settingModel.params.title": "پارامترهای پیشرفته",
"settingModel.presencePenalty.desc": "مقدار بالاتر باعث استفاده از بیانات متنوع‌تر و اجتناب از تکرار مفاهیم می‌شود؛ مقدار پایین‌تر منجر به تکرار مفاهیم و بیانی یکنواخت‌تر خواهد شد.",
"settingModel.presencePenalty.title": "تنوع بیانی",
@@ -684,6 +693,10 @@
"settingOpening.openingQuestions.title": "سؤالات آغازین",
"settingOpening.title": "تنظیمات آغازین",
"settingPlugin.title": "فهرست مهارت‌ها",
"settingSelfIteration.enabled.desc": "اجازه دهید این دستیار سیگنال‌های اخیر را بررسی کرده و مهارت‌های خود را هنگام اجرای جریان کاری خود-تکرار بهبود دهد.",
"settingSelfIteration.enabled.managedDesc": "همیشه فعال برای Lobe AI در حالی که خود-تکرار در دسترس است.",
"settingSelfIteration.enabled.title": "فعال‌سازی خود-تکرار",
"settingSelfIteration.title": "خود-تکرار",
"settingSystem.oauth.info.desc": "وارد شده‌اید",
"settingSystem.oauth.info.title": "اطلاعات حساب",
"settingSystem.oauth.signin.action": "ورود",
@@ -897,7 +910,12 @@
"tab.uploadZip": "آپلود فایل Zip",
"tab.uploadZip.desc": "یک فایل .zip یا .skill محلی را آپلود کنید",
"tab.usage": "آمار استفاده",
"tools.activation.auto": "خودکار",
"tools.activation.auto.desc": "هوشمند",
"tools.activation.pinned": "پین شده",
"tools.activation.pinned.desc": "همیشه روشن",
"tools.add": "افزودن مهارت",
"tools.builtins.configure": "پیکربندی",
"tools.builtins.find-skills.description": "به کاربران کمک می‌کند مهارت‌های عامل را هنگام پرسیدن «چگونه X را انجام دهم»، «یک مهارت برای X پیدا کن»، یا هنگام نیاز به گسترش قابلیت‌ها کشف و نصب کنند",
"tools.builtins.find-skills.title": "یافتن مهارت‌ها",
"tools.builtins.groupName": "داخلی‌ها",
@@ -932,9 +950,6 @@
"tools.builtins.lobe-group-agent-builder.title": "سازنده عامل گروهی",
"tools.builtins.lobe-group-management.description": "هماهنگ‌سازی و مدیریت گفتگوهای گروه‌های چندعاملی",
"tools.builtins.lobe-group-management.title": "مدیریت گروه",
"tools.builtins.lobe-gtd.description": "برنامه‌ریزی اهداف و پیگیری پیشرفت با استفاده از روش GTD. ایجاد برنامه‌های راهبردی، مدیریت فهرست کارها با پیگیری وضعیت و اجرای وظایف طولانی به‌صورت ناهمگام.",
"tools.builtins.lobe-gtd.readme": "اهداف خود را با استفاده از روش GTD برنامه‌ریزی کرده و پیشرفت را پیگیری کنید. برنامه‌های استراتژیک ایجاد کرده، فهرست کارها را با پیگیری وضعیت مدیریت کرده و وظایف طولانی و ناهمزمان را اجرا نمایید.",
"tools.builtins.lobe-gtd.title": "ابزارهای GTD",
"tools.builtins.lobe-knowledge-base.description": "جستجوی اسناد بارگذاری‌شده و دانش حوزه‌ای از طریق جستجوی برداری معنایی — برای مرجع دائمی و قابل استفاده مجدد",
"tools.builtins.lobe-knowledge-base.title": "پایگاه دانش",
"tools.builtins.lobe-local-system.description": "دسترسی به سیستم فایل محلی در دسکتاپ. خواندن، نوشتن، جستجو و سازماندهی فایل‌ها. اجرای دستورات شِل با پشتیبانی از وظایف پس‌زمینه و جستجوی محتوا با الگوهای regex.",
+4
View File
@@ -16,11 +16,15 @@
"table.columns.trigger.enums.api": "تماس API",
"table.columns.trigger.enums.bot": "پیام ربات",
"table.columns.trigger.enums.chat": "پیام چت",
"table.columns.trigger.enums.cli": "خط فرمان",
"table.columns.trigger.enums.cron": "وظیفه زمان‌بندی‌شده",
"table.columns.trigger.enums.eval": "ارزیابی بنچمارک",
"table.columns.trigger.enums.file_embedding": "جاسازی فایل",
"table.columns.trigger.enums.image": "تولید تصویر",
"table.columns.trigger.enums.memory": "استخراج حافظه",
"table.columns.trigger.enums.notify": "اعلان",
"table.columns.trigger.enums.onboarding": "آموزش اولیه",
"table.columns.trigger.enums.openapi": "OpenAPI",
"table.columns.trigger.enums.semantic_search": "جستجوی دانش",
"table.columns.trigger.enums.topic": "خلاصه موضوع",
"table.columns.trigger.enums.video": "تولید ویدئو",
+11
View File
@@ -21,6 +21,9 @@
"channel.botTokenPlaceholderNew": "Collez votre jeton de bot ici",
"channel.charLimit": "Limite de caractères",
"channel.charLimitHint": "Nombre maximum de caractères par message",
"channel.comingSoon": "Bientôt disponible",
"channel.comingSoonDesc": "Nous travaillons à intégrer cette fonctionnalité à LobeHub. Restez à l'écoute pour les mises à jour.",
"channel.comingSoonTitle": "L'intégration de {{name}} arrive bientôt",
"channel.concurrency": "Mode de Concurrence",
"channel.concurrencyDebounce": "Anti-rebond",
"channel.concurrencyDebounceHint": "Ne traiter que le dernier message dune rafale (les précédents sont ignorés)",
@@ -183,6 +186,14 @@
"channel.verificationToken": "Jeton de vérification",
"channel.verificationTokenHint": "Optionnel. Utilisé pour vérifier la source des événements webhook.",
"channel.verificationTokenPlaceholder": "Collez votre jeton de vérification ici",
"channel.watchKeywordInstructionLabel": "Instruction",
"channel.watchKeywordInstructionPlaceholder": "par exemple, analyser le fil récent et répondre s'il y a un rapport de bug exploitable",
"channel.watchKeywordLabel": "Mot-clé",
"channel.watchKeywordPlaceholder": "par exemple, bug",
"channel.watchKeywords": "Mots-clés surveillés",
"channel.watchKeywordsAdd": "Ajouter un mot-clé",
"channel.watchKeywordsEmpty": "Aucun mot-clé ajouté pour le moment — le bot ne s'active que sur mention @ ou message direct dans les canaux abonnés.",
"channel.watchKeywordsHint": "Lorsqu'un message dans un canal abonné correspond à un mot-clé, le bot s'active sans mention @ et l'instruction est ajoutée au message utilisateur avant qu'il ne soit envoyé à l'IA. Correspondance insensible à la casse, mot entier.",
"channel.wechat.description": "Connectez cet assistant à WeChat via iLink Bot pour des chats privés et de groupe.",
"channel.wechatBotId": "ID du Bot",
"channel.wechatBotIdHint": "Identifiant du bot attribué après l'autorisation par code QR.",
+45
View File
@@ -24,6 +24,7 @@
"agentProfile.knowledgeBases_other": "{{count}} bases de connaissances",
"agentProfile.skills_one": "{{count}} compétence",
"agentProfile.skills_other": "{{count}} compétences",
"agentSignal.receipts.agentSignalLabel": "Signal de l'agent",
"agentSignal.receipts.memory.detail": "Enregistré pour des réponses futures",
"agentSignal.receipts.memory.title": "Mémoire enregistrée",
"agentSignal.receipts.recentActivity": "Activité récente",
@@ -41,6 +42,16 @@
"builtinCopilot": "Copilote intégré",
"chatList.expandMessage": "Développer le message",
"chatList.longMessageDetail": "Voir les détails",
"chatMode.agent": "Agent",
"chatMode.agentCap.env": "Environnement d'exécution",
"chatMode.agentCap.files": "Accès aux fichiers",
"chatMode.agentCap.memory": "Mémoire",
"chatMode.agentCap.tools": "Appels d'outils",
"chatMode.agentCap.web": "Recherche sur le web",
"chatMode.agentDesc": "L'agent peut utiliser des outils et l'environnement pour accomplir des tâches automatiquement",
"chatMode.chat": "Discussion",
"chatMode.chatDesc": "Pas d'environnement d'exécution ni d'autonomie ; utilise moins de jetons",
"chatMode.select": "Changer de mode",
"claudeCodeInstallGuide.actions.openDocs": "Ouvrir le guide dinstallation",
"claudeCodeInstallGuide.actions.openSystemTools": "Ouvrir les outils système",
"claudeCodeInstallGuide.afterInstall": "Après linstallation, lancez Claude Code une fois pour vous connecter, puis réessayez votre message ou cliquez sur Ré‑détecter dans les outils système.",
@@ -59,6 +70,7 @@
"cliAuthGuide.runCommand": "Exécutez ceci dans le Terminal",
"cliAuthGuide.title": "Connexion à {{name}}",
"cliRateLimitGuide.actions.openSystemTools": "Ouvrir les outils système",
"cliRateLimitGuide.actions.retry": "Réessayer",
"cliRateLimitGuide.afterReset": "Attendez lheure de réinitialisation, puis réessayez votre message. Si vous utilisez une autorisation API, vous pouvez également vérifier votre quota fournisseur et votre statut de facturation.",
"cliRateLimitGuide.desc": "{{name}} a atteint sa limite dutilisation actuelle et ne peut pas continuer cette exécution pour le moment.",
"cliRateLimitGuide.limitType": "Fenêtre de limite",
@@ -223,6 +235,8 @@
"knowledgeBase.allFiles": "Tous les fichiers",
"knowledgeBase.allLibraries": "Toutes les bibliothèques",
"knowledgeBase.disabled": "La discussion avec la bibliothèque nest pas disponible dans ce déploiement. Passez à une base de données côté serveur ou utilisez {{cloud}}.",
"knowledgeBase.files": "Fichiers",
"knowledgeBase.libraries": "Bibliothèques",
"knowledgeBase.library.action.add": "Ajouter",
"knowledgeBase.library.action.detail": "Détails",
"knowledgeBase.library.action.remove": "Supprimer",
@@ -326,6 +340,15 @@
"pageSelection.reference": "Texte sélectionné",
"pin": "Épingler",
"pinOff": "Désépingler",
"plus.addSkills": "Ajouter des compétences...",
"plus.search.appSearch": "Recherche intelligente",
"plus.search.appSearchDesc": "Service de recherche optimisé par LobeHub, offrant les meilleurs résultats de récupération.",
"plus.search.modelSearch": "Recherche par fournisseur",
"plus.search.modelSearchDesc": "Peut entraîner un comportement inattendu lorsqu'il est activé, non recommandé.",
"plus.search.off": "Désactivé",
"plus.search.offDesc": "",
"plus.title": "Ajouter",
"plus.tooltip": "Ajouter des fichiers, des compétences et plus de contexte...",
"rag.referenceChunks": "Source de référence",
"rag.userQuery.actions.delete": "Supprimer la reformulation",
"rag.userQuery.actions.regenerate": "Régénérer la requête",
@@ -357,6 +380,8 @@
"searchAgents": "Rechercher des agents...",
"selectedAgents": "Agents sélectionnés",
"sendPlaceholder": "Demandez, créez ou lancez une tâche, <hotkey><hotkey/>",
"sendPlaceholderChat": "Demandez, recherchez ou réfléchissez, <hotkey><hotkey/>",
"sendPlaceholderChatWithAgentAssignment": "Demandez, recherchez ou réfléchissez. @ pour faire intervenir d'autres agents.",
"sendPlaceholderHeterogeneous": "Demander à {{name}} deffectuer une tâche...",
"sendPlaceholderWithAgentAssignment": "Demander, créer ou lancer une tâche. @ pour attribuer des tâches à dautres agents.",
"sessionGroup.config": "Gestion de groupe",
@@ -734,6 +759,7 @@
"untitledAgent": "Agent sans nom",
"untitledGroup": "Groupe sans nom",
"updateAgent": "Mettre à jour les informations de l'agent",
"upload.action.fileOrImageUpload": "Télécharger un fichier ou une image",
"upload.action.fileUpload": "Téléverser un fichier",
"upload.action.folderUpload": "Téléverser un dossier",
"upload.action.imageDisabled": "Le modèle actuel ne prend pas en charge la reconnaissance visuelle. Veuillez changer de modèle pour utiliser cette fonctionnalité.",
@@ -846,6 +872,23 @@
"workingPanel.documents.saved": "All changes saved",
"workingPanel.documents.title": "Document",
"workingPanel.documents.unsaved": "Unsaved changes",
"workingPanel.files.copyAbsolutePath": "Copier le chemin absolu",
"workingPanel.files.copyRelativePath": "Copier le chemin relatif",
"workingPanel.files.count_one": "{{count}} fichier",
"workingPanel.files.count_other": "{{count}} fichiers",
"workingPanel.files.empty": "Aucun fichier dans cet espace de travail",
"workingPanel.files.open": "Ouvrir le fichier",
"workingPanel.files.refresh": "Actualiser",
"workingPanel.files.showInReview": "Afficher dans la révision",
"workingPanel.files.showInSystem": "Afficher dans le dossier",
"workingPanel.files.title": "Fichiers",
"workingPanel.localFile.binary": "Fichier binaire — aperçu indisponible",
"workingPanel.localFile.close": "Fermer",
"workingPanel.localFile.closeLeft": "Fermer à gauche",
"workingPanel.localFile.closeOther": "Fermer les autres",
"workingPanel.localFile.closeRight": "Fermer à droite",
"workingPanel.localFile.error": "Impossible de charger ce fichier",
"workingPanel.localFile.truncated": "Aperçu du fichier tronqué à {{limit}} caractères",
"workingPanel.progress": "Progress",
"workingPanel.progress.allCompleted": "All tasks completed",
"workingPanel.resources": "Resources",
@@ -892,6 +935,8 @@
"workingPanel.review.mode.unstaged": "Non indexé",
"workingPanel.review.more": "Plus d'options",
"workingPanel.review.refresh": "Actualiser",
"workingPanel.review.revealInTree": "Afficher dans l'arborescence",
"workingPanel.review.revealNotFound": "Fichier introuvable dans l'index du projet",
"workingPanel.review.revert": "Ignorer les modifications",
"workingPanel.review.revert.confirm.cancel": "Annuler",
"workingPanel.review.revert.confirm.description": "Les modifications de l'arbre de travail de {{filePath}} seront définitivement ignorées. Les fichiers non suivis seront supprimés du disque.",
+1
View File
@@ -8,6 +8,7 @@
"brief.action.confirm": "Confirmer",
"brief.action.confirmDone": "Confirmer",
"brief.action.feedback": "Retour",
"brief.action.ignore": "Ignorer",
"brief.action.retry": "Réessayer",
"brief.addFeedback": "Partager un retour",
"brief.collapse": "Afficher moins",
+16 -3
View File
@@ -20,6 +20,22 @@
"messenger.discord.connections.disconnectFailed": "Échec de la suppression du serveur.",
"messenger.discord.connections.disconnectSuccess": "Serveur supprimé.",
"messenger.discord.connections.disconnectTitle": "Supprimer le serveur",
"messenger.discord.installBlocked.dismiss": "Compris",
"messenger.discord.installBlocked.suggestion": "Envoyez un message privé au bot LobeHub sur Discord pour lier votre compte personnel — vous n'avez pas besoin d'ajouter à nouveau le bot. Ou demandez à l'installateur d'origine de supprimer ce serveur dans Paramètres LobeHub → Messager avant de le réajouter.",
"messenger.discord.installBlocked.title": "Serveur déjà connecté",
"messenger.discord.installBlocked.withName": "\"{{workspace}}\" est déjà connecté à LobeHub par un autre utilisateur.",
"messenger.discord.installBlocked.withoutName": "Ce serveur Discord est déjà connecté à LobeHub par un autre utilisateur.",
"messenger.discord.installResult.failed": "Échec de l'installation de Discord ({{reason}}). Veuillez réessayer ou contacter le support.",
"messenger.discord.installResult.reasons.accessDenied": "l'autorisation a été annulée",
"messenger.discord.installResult.reasons.exchangeFailed": "l'autorisation Discord a échoué",
"messenger.discord.installResult.reasons.generic": "une erreur inconnue s'est produite",
"messenger.discord.installResult.reasons.invalidState": "la session d'installation a expiré",
"messenger.discord.installResult.reasons.missingAppId": "Discord a renvoyé des informations d'application incomplètes",
"messenger.discord.installResult.reasons.missingCodeOrState": "Discord a renvoyé des paramètres d'installation incomplets",
"messenger.discord.installResult.reasons.missingTenant": "Discord n'a pas renvoyé d'identifiant de serveur",
"messenger.discord.installResult.reasons.missingToken": "Discord n'a pas renvoyé de jeton d'accès",
"messenger.discord.installResult.reasons.persistFailed": "la connexion au serveur n'a pas pu être enregistrée",
"messenger.discord.installResult.success": "Serveur Discord connecté.",
"messenger.discord.userPending.cta": "Ouvrir dans Discord",
"messenger.discord.userPending.hint": "Ouvrez le bot dans Discord et envoyez un message pour terminer la liaison de votre compte.",
"messenger.discord.userPending.name": "Pas encore lié",
@@ -96,9 +112,6 @@
"verify.error.missingToken": "Lien invalide. Ouvrez cette page depuis le bot.",
"verify.error.title": "Impossible de confirmer la liaison",
"verify.error.unlinkBeforeRelink": "Ce compte LobeHub est déjà lié à un autre compte Telegram. Déconnectez-le dans Paramètres → Messagerie avant d'en lier un nouveau.",
"verify.labRequired.description": "La messagerie est actuellement une fonctionnalité Labs. Activez-la dans Paramètres → Avancé → Labs et rechargez cette page.",
"verify.labRequired.openSettings": "Ouvrir les paramètres Labs",
"verify.labRequired.title": "Activez la messagerie pour continuer",
"verify.signInCta": "Connectez-vous pour continuer",
"verify.signInRequired": "Veuillez vous connecter à LobeHub pour confirmer la liaison.",
"verify.success.description": "Votre compte est maintenant connecté à {{platform}}. Ouvrez {{platform}} et envoyez votre premier message.",
+8
View File
@@ -0,0 +1,8 @@
{
"dropdownLabel": "Ouvrir le répertoire de travail dans",
"errors.appNotInstalled": "{{appName}} n'est pas installé",
"errors.launchFailed": "Échec de l'ouverture dans {{appName}} : {{error}}",
"errors.pathNotFound": "Chemin introuvable : {{path}}",
"errors.unknown": "erreur inconnue",
"tooltip": "Ouvrir dans {{appName}}"
}

Some files were not shown because too many files have changed in this diff Show More