Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

✨ feat: support messager (#14442)

Rdmclin275fd477bffef
diff --git a/.agents/skills/bot/SKILL.md b/.agents/skills/bot/SKILL.md
deleted file mode 100644
index 63045f685cf..00000000000
--- a/.agents/skills/bot/SKILL.md
+++ /dev/null
@@ -1,298 +0,0 @@
----
-name: bot
-description: 'Bot platform architecture (Discord, Slack, Telegram, Feishu/Lark, QQ, WeChat). Use when working on inbound webhooks, Chat SDK message routing, agent execution from chat platforms, queue-mode callbacks, gateway lifecycle (websocket/polling), bot provider CRUD/credentials, or platform-specific clients/adapters/schemas. Triggers on bot, channel, webhook, mention, Chat SDK, agent bot provider, gateway, bot-callback, qstash bot.'
----
-
-# Bot System
-
-> **Last updated: 2026-04-08.** Implementation evolves quickly — this doc is a map, not the source of truth. Always read the key files below to verify behavior, especially per-platform quirks. Update this doc when the architecture changes.
-
-LobeChat agents can answer inside external chat platforms. Inbound messages flow through the Chat SDK (`chat` npm package), get routed to the right agent by `(platform, applicationId)`, executed via `AiAgentService`, and replied back through a per-platform `PlatformClient`. There are **two execution modes** (in-memory vs queue/QStash) and **three connection modes** (`webhook`, `websocket`, `polling`).
-
-## Supported Platforms
-
-| Platform | id | Default mode | Markdown | Edit | Notes |
-| -------- | ---------- | ------------------------------- | ----------------- | ------ | -------------------------------------------------------------------------------------- |
-| Discord | `discord` | `websocket` | yes | yes | Persistent gateway via Chat SDK adapter; reaction-thread quirks; native slash commands |
-| Slack | `slack` | `websocket` (Socket Mode) | yes (mrkdwn) | yes | Multi-mode — user can pick `webhook` per provider |
-| Telegram | `telegram` | `webhook` | yes (HTML) | yes | `setMyCommands` menu via `registerBotCommands` |
-| Feishu | `feishu` | `websocket` (Lark SDK WSClient) | **no** (stripped) | yes | Multi-mode; shared client with Lark |
-| Lark | `lark` | `websocket` | **no** | yes | Same client/schema as Feishu, different domain |
-| QQ | `qq` | `websocket` | **no** | **no** | All replies are final-only |
-| WeChat | `wechat` | `polling` (iLink long-poll) | **no** | **no** | 10-minute gateway window |
-
-`supportsMarkdown=false` ⇒ outbound markdown is stripped to plain text via `stripMarkdown` and the AI is told not to use markdown. `supportsMessageEdit=false` ⇒ no progress edits — only the final reply is sent.
-
-**Multi-mode connection** — Slack/Feishu/Lark/QQ ship as websocket but support `webhook` per-provider via `settings.connectionMode`. The runtime always merges schema defaults into stored settings before resolving the mode (`resolveBotProviderConfig` / `resolveConnectionMode` in `platforms/utils.ts`), so the schema's `field.default` is the source of truth — set it correctly when adding a new multi-mode platform.
-
-## Inbound Flow (one webhook → reply)
-
-```
-Platform server
- │ POST /api/agent/webhooks/[platform]/[appId]
- ▼
-route.ts ── catch-all `[[...appId]]` route
- │
- ▼
-BotMessageRouter (singleton)
- │ • lazy-loads bot per `platform:applicationId`
- │ • merges schema defaults + provider.settings (mergeWithDefaults)
- │ • builds Chat SDK Chat<any> with createIoRedisState (if Redis available)
- │ • registerHandlers: onNewMention / onSubscribedMessage / onNewMessage(/.dm)
- │ • registerCommands: /new (reset topic), /stop (interrupt)
- │
- ▼
-chatBot.webhooks[platform](req) ← Chat SDK parses → fires events
- │
- ▼
-AgentBridgeService.handleMention / handleSubscribedMessage
- │ • activeThreads guard (no duplicate runs per thread)
- │ • adds 👀 reaction (eyes), startTyping
- │ • merges debounced/queued skipped messages (mergeSkippedMessages)
- │ • extractFiles (buffer → fetchData → url)
- │ • formatPrompt (sanitize mention + speaker tag + referenced_message)
- │
- ├── In-memory mode ──► AiAgentService.execAgent({ stepCallbacks })
- │ → onAfterStep edits progress message live
- │ → onComplete edits final reply, splits via splitMessage(charLimit)
- │
- └── Queue mode (isQueueAgentRuntimeEnabled) ──► execAgent({ stepWebhook, completionWebhook, webhookDelivery: 'qstash' })
- → returns immediately, callbacks land at /api/agent/webhooks/bot-callback
-```
-
-The router caches loaded bots in memory. Cache is **invalidated** by `BotMessageRouter.invalidateBot(platform, appId)` whenever the TRPC `update`/`delete` mutations run, so new credentials/settings take effect on the next webhook.
-
-## Execution Modes
-
-### In-memory (default)
-
-`AgentBridgeService.executeWithInMemoryCallbacks` wraps `execAgent` with `stepCallbacks`. Lives in one process — Promise-based wait, 30-min timeout, edits the same `progressMessage` after every step. Topic title is summarized inline via `SystemAgentService`.
-
-### Queue (`isQueueAgentRuntimeEnabled`)
-
-`AgentBridgeService.executeWithWebhooks`:
-
-1. Posts the `renderStart` placeholder, captures `progressMessageId`.
-2. Calls `execAgent` with `stepWebhook` and `completionWebhook` pointing at `${INTERNAL_APP_URL ?? APP_URL}/api/agent/webhooks/bot-callback`, plus `webhookDelivery: 'qstash'`.
-3. Returns immediately; the bridge `finally` block keeps the active-thread marker held until the `completion` callback fires.
-
-`POST /api/agent/webhooks/bot-callback` (`src/server/agent-hono/handlers/botCallback.ts`) verifies the QStash signature via the `qstashAuth` middleware and hands off to `BotCallbackService.handleCallback`:
-
-- `type: 'step'` → `handleStep` re-renders `renderStepProgress`, edits `progressMessageId` (skipped if `displayToolCalls=false` or platform `supportsMessageEdit=false`).
-- `type: 'completion'` → `handleCompletion` writes the final reply (or error/interrupted message), removes the 👀 reaction, clears active-thread tracker, fires async `summarizeTopicTitle`.
-
-`BotCallbackService.createMessenger` reloads provider + credentials from DB and rebuilds a `PlatformClient` per call (no in-memory state).
-
-## Commands
-
-Defined in `BotMessageRouter.buildCommands` and registered via two paths:
-
-- **Native slash commands** (Slack/Discord): `bot.onSlashCommand('/<name>', ...)`
-- **Text-based fallback** (Telegram/Feishu/QQ/Lark/WeChat): `bot.onNewMessage(/^\/(new|stop)(\s|$|@)/, ...)` plus a per-mention `tryDispatch` so commands work even before subscribe.
-
-Built-in commands:
-
-- `/new` — clears `topicId` in thread state, next message starts a fresh topic.
-- `/stop` — interrupts the active execution (calls `AiAgentService.interruptTask` if `operationId` is known; otherwise queues a deferred stop via `requestStop`/`pendingStopThreads`, also aborts the startup phase via `startupControllers`).
-
-To add a command, append to `buildCommands` — it auto-registers everywhere; on Telegram it also surfaces in the `/` menu via `client.registerBotCommands` → `setMyCommands`.
-
-## Active-thread State (statics on `AgentBridgeService`)
-
-- `activeThreads: Set<threadId>` — prevents duplicate runs per thread (must guard before stale-topic check, otherwise concurrent messages can drop).
-- `activeOperations: Map<threadId, operationId>` — needed by `/stop` once `execAgent` returns.
-- `startupControllers: Map<threadId, AbortController>` — cancels pre-`operationId` work (topic/tool prep).
-- `pendingStopThreads: Set<threadId>` — `/stop` arrived before `operationId` existed; consumed once available.
-
-In **queue mode**, the bridge `finally` skips cleanup so the marker persists until `BotCallbackService.handleCompletion` calls `clearActiveThread`.
-
-## Topic Lifecycle in Threads
-
-- `handleMention` always treats the message as the start of a new conversation.
-- `handleSubscribedMessage` reads `topicId` from `thread.state`. If the topic is stale (`> 4 hours` since `updatedAt`), state is cleared and it retries as a fresh mention.
-- If `execAgent` fails with a Postgres FK violation on `topic_id` (cached topic was deleted), the bridge clears state and retries as a mention.
-- `subscribe()` is gated by `client.shouldSubscribe(threadId)` — Discord top-level channels return `false` so we don't follow up there.
-
-## Attachments
-
-`AgentBridgeService.extractFiles` resolves attachments in priority order:
-
-1. `att.buffer` — already downloaded by the adapter (WeChat/Feishu inbound).
-2. `att.fetchData()` — adapter-provided lazy download with auth (Telegram, Slack, Feishu history). **Required** when URLs are token-protected — naive `fetch(url)` later in `ingestAttachment.ts` has no credentials.
-3. `att.url` — public CDN fallback (Discord, public QQ).
-
-`inferMimeType` / `inferName` patch Telegram-style `photo` payloads (no `mimeType`/`name` from Bot API → defaults to `image/jpeg`) so vision models actually see them. Quoted-message attachments are also pulled from `raw.referenced_message.attachments` (Discord).
-
-## Concurrency
-
-`settings.concurrency` is `'queue'` or `'debounce'`:
-
-- `debounce` → Chat SDK debounces inbound messages by `debounceMs`; `mergeSkippedMessages` joins skipped texts/attachments into the current message before handing to the agent.
-- `queue` → Chat SDK serializes per-thread; the bridge's own `activeThreads` set is still required because in queue mode the SDK lock releases before the agent finishes.
-
-## Gateway (persistent platforms)
-
-Webhook platforms run fine in serverless functions. Persistent platforms (`websocket`, `polling`) need a long-running listener — that's the **gateway**.
-
-**`GatewayService.startClient(platform, appId, userId)`** (`src/server/services/gateway/index.ts`):
-
-- On Vercel + persistent mode → `BotConnectQueue.push` (Redis hash) and mark runtime status `queued`. The cron picks it up.
-- On Vercel + webhook mode → start the client inline (one HTTP call).
-- Off-Vercel → `GatewayManager` singleton holds long-lived clients in process.
-
-**`GET /api/agent/gateway`** (`src/server/agent-hono/handlers/gatewayCron.ts`, cron, `Bearer ${CRON_SECRET}`):
-
-- Iterates registered platforms and starts every enabled persistent provider with `durationMs = 10min`, then in `after(...)` polls `BotConnectQueue` every 30s for new connect requests, until the window expires.
-- `getEffectiveConnectionMode(platform, settings)` is the only place that resolves per-provider mode — respect it everywhere.
-
-**`POST /api/agent/gateway/start`** (`src/server/agent-hono/handlers/gatewayStart.ts`) is the non-Vercel `ensureRunning` entry point (`Bearer ${KEY_VAULTS_SECRET}`).
-
-**Runtime status** is stored in Redis at `bot:runtime-status:platform:appId` with TTL ≈ `durationMs + 60s`. States: `starting | connected | disconnected | failed | queued`. Updated by each `PlatformClient.start/stop` and by the gateway service.
-
-## Platform Definitions
-
-Each platform exposes a `PlatformDefinition` registered in `platforms/index.ts`:
-
-```ts
-{
- id: 'discord',
- name: 'Discord',
- connectionMode: 'websocket', // recommended default
- schema: FieldSchema[], // applicationId + credentials + settings
- clientFactory: new DiscordClientFactory(),
- supportsMarkdown?: boolean, // default true
- supportsMessageEdit?: boolean, // default true
- documentation?: { portalUrl, setupGuideUrl },
-}
-```
-
-`schema` drives both server validation (`mergeWithDefaults`, `extractDefaults`) **and** the auto-generated UI form. Top-level keys `applicationId` / `credentials` / `settings` map to DB columns. Common settings fields live in `platforms/const.ts` (`displayToolCallsField`, `makeServerIdField(platform?)`, `makeUserIdField(platform?)`). The `serverId` / `userId` factories take a platform identifier so the field's hint can render platform-specific "how to find this ID" guidance (Discord Developer Mode, Telegram @userinfobot, etc.); pass no argument to fall back to generic copy.
-
-Each platform implements `PlatformClient` (see `platforms/types.ts`):
-
-- Lifecycle: `start(opts?)`, `stop()`
-- Inbound: `createAdapter()` → Chat SDK adapter map
-- Outbound: `getMessenger(platformThreadId)` → `{ createMessage, editMessage, removeReaction, triggerTyping, updateThreadName? }`
-- Formatting: `formatMarkdown?`, `formatReply?` (usage-stats footer when `showUsageStats`)
-- Helpers: `extractChatId`, `parseMessageId`, `sanitizeUserInput`, `shouldSubscribe`, `resolveReactionThreadId`
-- Optional patches: `applyChatPatches(chatBot)` (Discord uses this for `forwardedInteractions` + `threadRecovery`)
-- Optional menu: `registerBotCommands(commands)` (Telegram `setMyCommands`)
-
-`ClientFactory.validateCredentials` is called from the TRPC `testConnection` mutation — implement it to hit the platform API and return useful per-field errors.
-
-## Database
-
-**Schema** (`packages/database/src/schemas/agentBotProvider.ts`):
-
-```ts
-agent_bot_providers (
- id uuid pk,
- agent_id text fk → agents.id (cascade),
- user_id text fk → users.id (cascade),
- platform varchar(50), // 'discord' | 'slack' | …
- application_id varchar(255),
- credentials text, // KeyVaults-encrypted JSON
- settings jsonb default '{}',
- enabled boolean default true,
- …timestamps
-)
-unique (platform, application_id)
-```
-
-**Model** (`packages/database/src/models/agentBotProvider.ts`):
-
-- User-scoped: `create / update / delete / query / findById / findByAgentId / findEnabledByApplicationId`. Credentials are encrypted/decrypted via the injected `KeyVaultsGateKeeper`.
-- Static (system-wide): `findByPlatformAndAppId`, `findEnabledByPlatform` — used by webhook routing & gateway sync, since they don't have a user context yet.
-
-**TRPC router** (`src/server/routers/lambda/agentBotProvider.ts`):
-
-| Procedure | Notes | |
-| -------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------ |
-| `listPlatforms` | Returns `SerializedPlatformDefinition[]` (no `clientFactory`) | |
-| `create` / `update` / `delete` | Calls `BotMessageRouter.invalidateBot` + `GatewayService.stopClient` so changes take effect | |
-| `list` / `getByAgentId` / `getRuntimeStatus` | Decorate rows with Redis runtime status | |
-| `connectBot` | Returns \`{ status: 'started' | 'queued' }\` |
-| `testConnection` | Calls `clientFactory.validateCredentials` | |
-| `wechatGetQrCode` / `wechatPollQrStatus` | iLink onboarding flow | |
-
-Client service: `src/services/agentBotProvider.ts`. Store actions: `src/store/agent/slices/bot/action.ts`. UI: `src/routes/(main)/agent/channel/{list,detail}` — settings form is auto-generated from each platform's `schema`.
-
-## Reply Templates
-
-`src/server/services/bot/replyTemplate.ts` exports `renderStart`, `renderStepProgress`, `renderFinalReply`, `renderError`, `renderStopped`, `splitMessage`. Step progress carries elapsed time, last LLM content, last tools, totals; final reply uses `client.formatMarkdown` then `client.formatReply` (which optionally appends `formatUsageStats`). `splitMessage(text, charLimit)` chunks at paragraph → line → hard cut.
-
-`src/server/services/bot/ackPhrases/` provides randomized ack phrases.
-
-## Key Files
-
-```plaintext
-Webhook routes (mounted via `src/app/(backend)/api/agent/[[...route]]/route.ts` → `src/server/agent-hono`):
- src/server/agent-hono/handlers/platformWebhook.ts — inbound catch-all (POST /webhooks/:platform/:appId?)
- src/server/agent-hono/handlers/botCallback.ts — qstash bot callback
- src/server/agent-hono/handlers/gatewayCron.ts — cron gateway (10min window)
- src/server/agent-hono/handlers/gatewayStart.ts — non-Vercel ensureRunning
-
-Bot service:
- src/server/services/bot/index.ts — barrel
- src/server/services/bot/BotMessageRouter.ts — lazy bot loading + handler registration + commands
- src/server/services/bot/AgentBridgeService.ts — Chat SDK ↔ AiAgentService bridge, both exec modes
- src/server/services/bot/BotCallbackService.ts — qstash callback handler
- src/server/services/bot/formatPrompt.ts — speaker tag + referenced_message + sanitize
- src/server/services/bot/replyTemplate.ts — render*/splitMessage
- src/server/services/bot/ackPhrases/ — randomized acks
- src/server/services/bot/__tests__/ — unit tests for the above
-
-Platform abstraction:
- src/server/services/bot/platforms/index.ts — registry singleton + exports
- src/server/services/bot/platforms/types.ts — PlatformClient/Definition/FieldSchema/ClientFactory
- src/server/services/bot/platforms/registry.ts — PlatformRegistry class
- src/server/services/bot/platforms/utils.ts — mergeWithDefaults, getEffectiveConnectionMode, formatUsageStats, runtimeKey
- src/server/services/bot/platforms/const.ts — shared FieldSchema fragments (displayToolCalls, serverId, userId)
- src/server/services/bot/platforms/stripMarkdown.ts — used by no-markdown platforms
-
-Per-platform (each ships definition.ts, schema.ts, client.ts, const.ts, protocol-spec.md):
- src/server/services/bot/platforms/discord/ — websocket gateway + chat patches
- src/server/services/bot/platforms/slack/ — multi-mode (Socket Mode / webhook), markdownToMrkdwn
- src/server/services/bot/platforms/telegram/ — webhook, markdownToHTML, registerBotCommands
- src/server/services/bot/platforms/feishu/ — feishu + lark share client/schema (definitions/{feishu,lark,shared}.ts)
- src/server/services/bot/platforms/qq/ — websocket, no markdown, no edit
- src/server/services/bot/platforms/wechat/ — long-poll, no markdown, no edit
-
-Gateway:
- src/server/services/gateway/index.ts — GatewayService (Vercel-aware startClient/stopClient)
- src/server/services/gateway/GatewayManager.ts — long-running client registry (non-Vercel)
- src/server/services/gateway/botConnectQueue.ts — Redis hash queue with TTL
- src/server/services/gateway/runtimeStatus.ts — Redis bot:runtime-status keys
-
-Database:
- packages/database/src/schemas/agentBotProvider.ts — agent_bot_providers table
- packages/database/src/models/agentBotProvider.ts — encrypted CRUD + system-wide finders
-
-TRPC + client:
- src/server/routers/lambda/agentBotProvider.ts — TRPC router
- src/services/agentBotProvider.ts — client wrapper
- src/store/agent/slices/bot/action.ts — Zustand actions
-
-UI:
- src/routes/(main)/agent/channel/list.tsx — channel list
- src/routes/(main)/agent/channel/detail/ — auto-generated form (Header/Body/Footer)
- src/routes/(main)/agent/channel/const.ts — platform icons
-
-Types & runtime status:
- src/types/botRuntimeStatus.ts — BOT_RUNTIME_STATUSES enum + snapshot type
-```
-
-## Adding a New Platform
-
-1. Create `src/server/services/bot/platforms/<id>/`:
- - `definition.ts` — `PlatformDefinition` registered in `platforms/index.ts`
- - `schema.ts` — `FieldSchema[]` (`applicationId` + `credentials` + `settings`); reuse fragments from `../const.ts`
- - `client.ts` — `class XClientFactory extends ClientFactory` returning a `PlatformClient` (lifecycle + adapter + messenger + helpers)
- - `const.ts` — `DEFAULT_X_CONNECTION_MODE`, history limits, etc.
- - `protocol-spec.md` — protocol notes (every existing platform has one)
-2. Pick the right `connectionMode` — webhook is much simpler if the platform supports it.
-3. If the platform can't render markdown, set `supportsMarkdown: false` and implement `formatMarkdown` via `stripMarkdown`.
-4. If it can't edit messages, set `supportsMessageEdit: false` — `BotCallbackService` will skip step edits and only send the final reply.
-5. Implement `validateCredentials` so the UI's "Test connection" button gives useful errors.
-6. Add the platform icon in `src/routes/(main)/agent/channel/const.ts` and register the platform in `src/server/services/bot/platforms/index.ts`.
-7. Add i18n keys under `channel.*` in `src/locales/default/setting.ts` (or wherever the channel namespace lives) — the schema's `label`/`description`/`placeholder`/`enumLabels` are i18n keys.
diff --git a/.env.example b/.env.example
index 9568e5b0c25..87a37e00573 100644
--- a/.env.example
+++ b/.env.example
@@ -56,7 +56,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
# OPENAI_MODEL_LIST=gpt-3.5-turbo
-
# ## Azure OpenAI ###
# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
@@ -71,7 +70,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# Azure's API version, follows the YYYY-MM-DD format
# AZURE_API_VERSION=2024-10-21
-
# ## Anthropic Service ####
# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -79,19 +77,16 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# use a proxy to connect to the Anthropic API
# ANTHROPIC_PROXY_URL=https://api.anthropic.com
-
# ## Google AI ####
# GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
# ## AWS Bedrock ###
# AWS_REGION=us-east-1
# AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx
# AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
# ## Ollama AI ####
# You can use ollama to get and run LLM locally, learn more about it via https://github.com/ollama/ollama
@@ -101,13 +96,11 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# OLLAMA_MODEL_LIST=your_ollama_model_names
-
# ## OpenRouter Service ###
# OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# OPENROUTER_MODEL_LIST=model1,model2,model3
-
# ## Mistral AI ###
# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -168,7 +161,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# SILICONCLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
# ## TencentCloud AI ####
# TENCENT_CLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -181,7 +173,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# INFINIAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
# ## 302.AI ###
# AI302_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -222,7 +213,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# VERCELAIGATEWAY_API_KEY=your_vercel_ai_gateway_api_key
-
# #######################################
# ########### Market Service ############
# #######################################
@@ -283,7 +273,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# but some service providers may require configuration
# S3_REGION=us-west-1
-
# #######################################
# ########### Auth Service ##############
# #######################################
@@ -424,3 +413,23 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# MESSAGE_GATEWAY_ENABLED=1
# MESSAGE_GATEWAY_URL=https://message-gateway.lobehub.com
# MESSAGE_GATEWAY_SERVICE_TOKEN=your_service_token_here
+
+# #######################################
+# ########### Messenger Bot #############
+# #######################################
+
+# LobeHub-operated bots that users link their account to once and then chat
+# with any of their agents from. Credentials (Telegram / Slack / Discord) are
+# now managed in dc-center → Agent → System Bots and stored in the
+# `system_bot_providers` table. See docs/development/messenger/managed-by-dc-center.md.
+#
+# Webhook URLs are registered against APP_URL:
+# Telegram: <APP_URL>/api/agent/messenger/webhooks/telegram
+# Slack: <APP_URL>/api/agent/messenger/webhooks/slack
+# Discord: <APP_URL>/api/agent/messenger/webhooks/discord
+#
+# For local dev with bot platforms, point APP_URL at your tunnel
+# (ngrok / cloudflared) so platforms can reach your machine.
+
+# Verify-im link token TTL in seconds (default 1800 = 30 min)
+# LOBE_LINK_TOKEN_TTL_SECONDS=1800
diff --git a/docs/development/database-schema.dbml b/docs/development/database-schema.dbml
index 2fe1966f44d..9cca7c5b33d 100644
--- a/docs/development/database-schema.dbml
+++ b/docs/development/database-schema.dbml
@@ -868,6 +868,48 @@ table messages_files {
}
}
+table messenger_account_links {
+ id uuid [pk, not null, default: `gen_random_uuid()`]
+ user_id text [not null]
+ platform varchar(50) [not null]
+ tenant_id varchar(255) [not null, default: '']
+ platform_user_id varchar(255) [not null]
+ platform_username text
+ active_agent_id text
+ accessed_at "timestamp with time zone" [not null, default: `now()`]
+ created_at "timestamp with time zone" [not null, default: `now()`]
+ updated_at "timestamp with time zone" [not null, default: `now()`]
+
+ indexes {
+ (platform, tenant_id, platform_user_id) [name: 'messenger_account_links_platform_tenant_user_unique', unique]
+ (user_id, platform, tenant_id) [name: 'messenger_account_links_user_platform_tenant_unique', unique]
+ active_agent_id [name: 'messenger_account_links_active_agent_idx']
+ }
+}
+
+table messenger_installations {
+ id uuid [pk, not null, default: `gen_random_uuid()`]
+ platform varchar(50) [not null]
+ tenant_id varchar(255) [not null]
+ application_id varchar(255) [not null]
+ account_id varchar(255)
+ credentials text [not null]
+ metadata jsonb [not null, default: `{}`]
+ token_expires_at "timestamp with time zone"
+ installed_by_user_id text
+ installed_by_platform_user_id varchar(255)
+ revoked_at "timestamp with time zone"
+ accessed_at "timestamp with time zone" [not null, default: `now()`]
+ created_at "timestamp with time zone" [not null, default: `now()`]
+ updated_at "timestamp with time zone" [not null, default: `now()`]
+
+ indexes {
+ (platform, application_id, tenant_id) [name: 'messenger_installations_platform_app_tenant_unique', unique]
+ (platform, tenant_id) [name: 'messenger_installations_platform_tenant_idx']
+ token_expires_at [name: 'messenger_installations_token_expires_at_idx']
+ }
+}
+
table nextauth_accounts {
access_token text
expires_at integer
@@ -1395,6 +1437,23 @@ table sessions {
}
}
+table system_bot_providers {
+ id uuid [pk, not null, default: `gen_random_uuid()`]
+ platform varchar(50) [not null]
+ enabled boolean [not null, default: true]
+ credentials text [not null]
+ application_id varchar(255)
+ settings jsonb [not null, default: `{}`]
+ connection_mode varchar(20)
+ accessed_at "timestamp with time zone" [not null, default: `now()`]
+ created_at "timestamp with time zone" [not null, default: `now()`]
+ updated_at "timestamp with time zone" [not null, default: `now()`]
+
+ indexes {
+ platform [name: 'system_bot_providers_platform_unique', unique]
+ }
+}
+
table briefs {
id text [pk, not null]
user_id text [not null]
@@ -1946,7 +2005,6 @@ table user_memory_persona_documents {
}
}
-
ref: agent_skills.user_id - users.id
ref: agent_skills.zip_file_hash - global_files.hash_id
diff --git a/locales/ar/chat.json b/locales/ar/chat.json
index 65dd1f85294..49964e813b7 100644
--- a/locales/ar/chat.json
+++ b/locales/ar/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "الموافقة تلقائيًا على جميع تنفيذات الأدوات",
"tool.intervention.mode.manual": "يدوي",
"tool.intervention.mode.manualDesc": "يتطلب الموافقة اليدوية لكل استدعاء",
- "tool.intervention.onboarding.agentIdentity.applyHint": "ستظهر الهوية الجديدة بعد الموافقة.",
- "tool.intervention.onboarding.agentIdentity.description": "الموافقة على هذا التغيير ستحدّث الوكيل المعروض في البريد الوارد وفي محادثة الإعداد هذه.",
- "tool.intervention.onboarding.agentIdentity.emoji": "صورة الوكيل",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "موافقة الإعداد",
- "tool.intervention.onboarding.agentIdentity.name": "اسم الوكيل",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "وكيل البريد الوارد",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "وكيل الإعداد الحالي",
- "tool.intervention.onboarding.agentIdentity.targets": "ينطبق على",
"tool.intervention.onboarding.agentIdentity.title": "تأكيد تحديث هوية الوكيل",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "سأقوم بتحديث صورتي الرمزية",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "سأقوم بتحديث اسمي",
"tool.intervention.onboarding.userProfile.applyHint": "سيتم حفظ هذه التفاصيل في ملفك الشخصي بعد الموافقة.",
"tool.intervention.onboarding.userProfile.description": "الموافقة على هذا التغيير ستحدث ملف تعريف الانضمام الخاص بك حتى يتمكن الوكيل من تخصيص الردود المستقبلية.",
"tool.intervention.onboarding.userProfile.eyebrow": "الموافقة على الانضمام",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "تم التحديث في {{time}}",
"workingPanel.resources.viewMode.list": "عرض القائمة",
"workingPanel.resources.viewMode.tree": "عرض الشجرة",
+ "workingPanel.review.baseRef.default": "افتراضي",
+ "workingPanel.review.baseRef.loading": "جارٍ تحميل الفروع...",
+ "workingPanel.review.baseRef.reset": "إعادة التعيين إلى الفرع الافتراضي",
+ "workingPanel.review.baseRef.unresolved": "اختر فرعًا أساسيًا",
"workingPanel.review.binary": "ملف ثنائي — لا يمكن عرض الفرق",
"workingPanel.review.collapseAll": "طي الكل",
"workingPanel.review.copied": "تم نسخ المسار",
"workingPanel.review.copyPath": "نسخ مسار الملف",
"workingPanel.review.empty": "لا توجد تغييرات في شجرة العمل",
+ "workingPanel.review.empty.branch": "لا توجد تغييرات مقابل {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "تعذر تحديد الفرع الافتراضي البعيد. قم بتشغيل `git remote set-head origin --auto` في الطرفية.",
"workingPanel.review.error": "تعذر تحميل الفرق لهذا الملف",
"workingPanel.review.expandAll": "توسيع الكل",
+ "workingPanel.review.mode.branch": "فرع",
+ "workingPanel.review.mode.unstaged": "غير مُرتب",
"workingPanel.review.more": "خيارات إضافية",
"workingPanel.review.refresh": "تحديث",
"workingPanel.review.textDiff.disable": "تعطيل مقارنة النصوص المضمنة",
diff --git a/locales/ar/labs.json b/locales/ar/labs.json
index affa8296a89..fbf11522b93 100644
--- a/locales/ar/labs.json
+++ b/locales/ar/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "دردشة جماعية (متعددة الوكلاء)",
"features.inputMarkdown.desc": "عرض Markdown في منطقة الإدخال في الوقت الفعلي (نص عريض، كتل الشيفرة، جداول، إلخ).",
"features.inputMarkdown.title": "عرض Markdown في الإدخال",
+ "features.messenger.desc": "تحدث إلى وكلائك عبر تطبيق تيليجرام (وتطبيقات المراسلة الأخرى) من خلال روبوت LobeHub المشترك. يضيف علامة تبويب المراسلة في الإعدادات لربط حسابك واختيار الوكيل الذي يتلقى الرسائل.",
+ "features.messenger.title": "المراسلة",
"title": "المختبرات"
}
diff --git a/locales/ar/messenger.json b/locales/ar/messenger.json
new file mode 100644
index 00000000000..3576649905f
--- /dev/null
+++ b/locales/ar/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "الوكيل النشط",
+ "messenger.activeAgentPlaceholder": "اختر وكيلًا",
+ "messenger.detail.addServer": "إضافة خادم",
+ "messenger.detail.addWorkspace": "إضافة مساحة عمل",
+ "messenger.detail.connections.connected": "متصل",
+ "messenger.detail.connections.empty": "افتح البوت وأرسل /start لربط حسابك.",
+ "messenger.detail.connections.linkHint": "تم تثبيت مساحة العمل. افتح Slack وأرسل رسالة خاصة إلى البوت لإكمال ربط حسابك الشخصي.",
+ "messenger.detail.connections.pending": "قيد الانتظار",
+ "messenger.detail.connections.serverLabel": "الخادم",
+ "messenger.detail.connections.title": "الاتصالات",
+ "messenger.detail.connections.userLabel": "المستخدم",
+ "messenger.detail.connections.workspaceLabel": "مساحة العمل",
+ "messenger.detail.disconnect": "قطع الاتصال",
+ "messenger.discord.connectModal.description": "أضف بوت LobeHub إلى خادم Discord الذي تديره.",
+ "messenger.discord.connectModal.inviteButton": "أضف إلى خادم Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord غير متاح حاليًا. يرجى المحاولة مرة أخرى لاحقًا.",
+ "messenger.discord.connectModal.title": "أضف البوت إلى خادمك",
+ "messenger.discord.connections.disconnectConfirm": "إزالة هذا الخادم من قائمة التدقيق الخاصة بك؟ سيبقى البوت في الخادم حتى يقوم مسؤول الخادم بطرده.",
+ "messenger.discord.connections.disconnectFailed": "فشل في إزالة الخادم.",
+ "messenger.discord.connections.disconnectSuccess": "تمت إزالة الخادم.",
+ "messenger.discord.connections.disconnectTitle": "إزالة الخادم",
+ "messenger.discord.userPending.cta": "افتح في Discord",
+ "messenger.discord.userPending.hint": "افتح البوت في Discord وأرسل أي رسالة لإكمال ربط حسابك.",
+ "messenger.discord.userPending.name": "لم يتم الربط بعد",
+ "messenger.error.agentNotFound": "لم يتم العثور على الوكيل.",
+ "messenger.error.disconnectNotAllowed": "يمكنك فقط قطع الاتصال بالتثبيتات التي بدأت بها.",
+ "messenger.error.installationNotFound": "لم يتم العثور على التثبيت.",
+ "messenger.error.linkRequired": "افتح البوت وأرسل /start قبل تغيير هذا الاتصال.",
+ "messenger.error.pickDefaultAgent": "اختر وكيلًا افتراضيًا قبل التأكيد.",
+ "messenger.error.platformNotConfigured": "منصة المراسلة هذه غير متاحة حاليًا. يرجى المحاولة مرة أخرى لاحقًا.",
+ "messenger.linkCta": "ربط",
+ "messenger.linkModal.continueIn": "أكمل الإعداد في {{platform}}",
+ "messenger.linkModal.instructions": "افتح البوت، أرسل /start، ثم اضغط على \"ربط الحساب\" لربط حسابك في LobeHub.",
+ "messenger.linkModal.notConfigured": "هذا الاتصال غير متاح حاليًا. يرجى المحاولة مرة أخرى لاحقًا.",
+ "messenger.linkModal.openCta": "افتح في {{platform}}",
+ "messenger.linkModal.scanHint": "أو امسح باستخدام هاتفك لفتح {{platform}}.",
+ "messenger.linkModal.title": "ربط المراسلة",
+ "messenger.list.discord.description": "تحدث مع وكلاء LobeHub الخاصين بك من أي خادم Discord عبر الرسائل الخاصة مع بوت LobeHub.",
+ "messenger.list.slack.description": "تحدث مع وكلاء LobeHub الخاصين بك من أي مساحة عمل Slack عبر الرسائل الخاصة أو @LobeHub.",
+ "messenger.list.telegram.description": "تحدث مع وكلاء LobeHub الخاصين بك في Telegram واختر من يجيب من أي مكان.",
+ "messenger.noPlatformsConfigured": "لا توجد منصات متاحة بعد. تحقق مرة أخرى قريبًا.",
+ "messenger.setActiveFailed": "فشل في التعيين كوكيل نشط.",
+ "messenger.setActiveSuccess": "تم تحديث الوكيل النشط.",
+ "messenger.slack.connectModal.continueButton": "أكمل في Slack",
+ "messenger.slack.connectModal.description": "سيتم توجيهك إلى Slack لتفويض تثبيت مساحة عمل LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack غير متاح حاليًا. يرجى المحاولة مرة أخرى لاحقًا.",
+ "messenger.slack.connectModal.title": "أكمل الإعداد في Slack",
+ "messenger.slack.connections.disconnectConfirm": "افصل بوت LobeHub عن مساحة العمل هذه في Slack؟ سيتم إيقاف روابط المستخدم الحالية حتى تعيد التثبيت.",
+ "messenger.slack.connections.disconnectFailed": "فشل في قطع الاتصال.",
+ "messenger.slack.connections.disconnectSuccess": "تم فصل مساحة العمل.",
+ "messenger.slack.connections.disconnectTitle": "قطع الاتصال بمساحة العمل",
+ "messenger.slack.installBlocked.dismiss": "فهمت",
+ "messenger.slack.installBlocked.suggestion": "أرسل رسالة خاصة إلى @LobeHub في Slack لربط حسابك الشخصي — لا تحتاج إلى التثبيت مرة أخرى. أو اطلب من المثبت الأصلي فصل مساحة العمل هذه أولاً إذا كنت تريد تولي الملكية.",
+ "messenger.slack.installBlocked.title": "مساحة العمل متصلة بالفعل",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" متصلة بالفعل بـ LobeHub بواسطة مستخدم آخر.",
+ "messenger.slack.installBlocked.withoutName": "مساحة العمل هذه في Slack متصلة بالفعل بـ LobeHub بواسطة مستخدم آخر.",
+ "messenger.slack.installResult.failed": "فشل تثبيت Slack ({{reason}}). يرجى المحاولة مرة أخرى أو الاتصال بالدعم.",
+ "messenger.slack.installResult.reasons.accessDenied": "تم إلغاء التفويض",
+ "messenger.slack.installResult.reasons.exchangeFailed": "فشل تفويض Slack",
+ "messenger.slack.installResult.reasons.generic": "حدث خطأ غير معروف",
+ "messenger.slack.installResult.reasons.invalidState": "انتهت صلاحية جلسة التثبيت",
+ "messenger.slack.installResult.reasons.missingAppId": "أعاد Slack معلومات تطبيق غير مكتملة",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "أعاد Slack معلمات تثبيت غير مكتملة",
+ "messenger.slack.installResult.reasons.missingTenant": "لم يُرجع Slack معرف مساحة العمل",
+ "messenger.slack.installResult.reasons.missingToken": "لم يُرجع Slack رمز البوت",
+ "messenger.slack.installResult.reasons.persistFailed": "تعذر حفظ اتصال مساحة العمل",
+ "messenger.slack.installResult.success": "تم توصيل مساحة عمل Slack.",
+ "messenger.subtitle": "قم بربط حسابك مع البوت الرسمي لـ LobeHub مرة واحدة. اختر الوكيل الذي يستقبل الرسائل، وقم بالتبديل في أي وقت من هنا أو من البوت.",
+ "messenger.title": "المراسلة",
+ "messenger.unlinkConfirm": "هل تريد فصل حسابك في {{platform}} عن LobeHub؟ ستتوقف الرسائل الواردة حتى ترسل /start مرة أخرى.",
+ "messenger.unlinkCta": "قطع الاتصال",
+ "messenger.unlinkFailed": "فشل في قطع الاتصال.",
+ "messenger.unlinkSuccess": "تم قطع الاتصال.",
+ "messenger.unlinkTitle": "قطع الاتصال بالحساب",
+ "verify.confirm.conflict.description": "حساب {{platform}} هذا مرتبط بالفعل بحساب LobeHub {{email}}. قم بتسجيل الدخول إلى هذا الحساب لإدارة الرابط، أو قم بفصله هناك قبل المحاولة مرة أخرى.",
+ "verify.confirm.conflict.switchAccount": "تسجيل الدخول بحساب آخر",
+ "verify.confirm.conflict.title": "هذا الحساب مرتبط بالفعل",
+ "verify.confirm.cta": "تأكيد الربط",
+ "verify.confirm.defaultAgent": "الوكيل الافتراضي",
+ "verify.confirm.defaultAgentHint": "سيتم توجيه رسائلك هنا أولاً. يمكنك التبديل في أي وقت عبر /agents في البوت أو من الإعدادات → المراسلة.",
+ "verify.confirm.defaultAgentPlaceholder": "اختر وكيلًا",
+ "verify.confirm.fields.lobeHubAccount": "حساب LobeHub",
+ "verify.confirm.fields.platformAccount": "حساب {{platform}}",
+ "verify.confirm.fields.workspace": "مساحة العمل",
+ "verify.confirm.noAgents": "ليس لديك أي وكلاء بعد. قم بإنشاء واحد في LobeHub، ثم عد لإكمال الربط.",
+ "verify.confirm.title": "تأكيد الربط",
+ "verify.confirm.workspace": "مساحة العمل: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "هذا الحساب مرتبط بالفعل بحساب LobeHub مختلف. قم بتسجيل الدخول إلى هذا الحساب أولاً.",
+ "verify.error.expired": "انتهت صلاحية هذا الرابط. يرجى العودة إلى البوت وإرسال /start مرة أخرى.",
+ "verify.error.generic": "حدث خطأ ما. يرجى المحاولة مرة أخرى.",
+ "verify.error.missingToken": "رابط غير صالح. افتح هذه الصفحة من البوت.",
+ "verify.error.title": "تعذر تأكيد الرابط",
+ "verify.labRequired.description": "المراسلة حاليًا ميزة تجريبية. قم بتمكينها في الإعدادات → متقدم → الميزات التجريبية وأعد تحميل هذه الصفحة.",
+ "verify.labRequired.openSettings": "افتح إعدادات الميزات التجريبية",
+ "verify.labRequired.title": "قم بتمكين المراسلة للمتابعة",
+ "verify.signInCta": "تسجيل الدخول للمتابعة",
+ "verify.signInRequired": "يرجى تسجيل الدخول إلى LobeHub لتأكيد الرابط.",
+ "verify.success.description": "تم الآن ربط حسابك بـ {{platform}}. افتح {{platform}} وأرسل رسالتك الأولى.",
+ "verify.success.openBot": "افتح في {{platform}}",
+ "verify.success.title": "تم الربط بنجاح!"
+}
diff --git a/locales/ar/models.json b/locales/ar/models.json
index c6d4db22e0e..a04ea6c753b 100644
--- a/locales/ar/models.json
+++ b/locales/ar/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "نموذج جديد لإنشاء الفيديو مع تحسينات شاملة في حركة الجسم، والواقعية الفيزيائية، واتباع التعليمات.",
"MiniMax-M1.description": "نموذج استدلال داخلي جديد بسلسلة تفكير تصل إلى 80K ومدخلات حتى 1M، يقدم أداءً مماثلاً لأفضل النماذج العالمية.",
"MiniMax-M2-Stable.description": "مصمم لتدفقات العمل البرمجية والوكلاء بكفاءة عالية، مع قدرة تزامن أعلى للاستخدام التجاري.",
- "MiniMax-M2.1-Lightning.description": "قدرات برمجة متعددة اللغات قوية مع استنتاج أسرع وأكثر كفاءة.",
"MiniMax-M2.1-highspeed.description": "قدرات برمجة متعددة اللغات قوية، تجربة برمجة مطورة بشكل شامل. أسرع وأكثر كفاءة.",
"MiniMax-M2.1.description": "MiniMax-M2.1 هو نموذج مفتوح المصدر رائد من MiniMax، يركز على حل المهام الواقعية المعقدة. يتميز بقدرات برمجة متعددة اللغات والقدرة على أداء المهام المعقدة كوكلاء ذكي.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: نفس أداء M2.5 مع استدلال أسرع.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku هو أسرع وأصغر نموذج من Anthropic، مصمم لتقديم استجابات شبه فورية بأداء سريع ودقيق.",
"claude-3-opus-20240229.description": "Claude 3 Opus هو أقوى نموذج من Anthropic للمهام المعقدة، يتميز بالأداء العالي، الذكاء، الطلاقة، والفهم.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet يوازن بين الذكاء والسرعة لتلبية احتياجات المؤسسات، ويوفر فائدة عالية بتكلفة أقل ونشر موثوق على نطاق واسع.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 هو أسرع وأذكى نموذج Haiku من Anthropic، يتميز بسرعة البرق والتفكير الممتد.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 هو نموذج Haiku الأسرع والأذكى من Anthropic، يتميز بسرعة البرق وقدرات استدلال موسعة.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 من Anthropic — نموذج Haiku من الجيل التالي مع تحسينات في التفكير والرؤية.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 هو نموذج Haiku الأسرع والأذكى من Anthropic، يتميز بسرعة البرق وقدرات استدلال موسعة.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking هو إصدار متقدم يمكنه عرض عملية تفكيره.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 هو أحدث وأقوى نموذج من Anthropic للمهام المعقدة للغاية، يتميز بالأداء، الذكاء، الطلاقة، والفهم.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 هو أحدث وأقوى نموذج من Anthropic للمهام المعقدة للغاية، يتميز بالأداء العالي، الذكاء، الطلاقة، والفهم.",
"claude-opus-4-1.description": "Claude Opus 4.1 من Anthropic — نموذج تفكير متميز مع قدرات تحليل عميقة.",
- "claude-opus-4-20250514.description": "Claude Opus 4 هو أقوى نموذج من Anthropic للمهام المعقدة للغاية، يتميز بالأداء، الذكاء، الطلاقة، والفهم.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 هو النموذج الأكثر قوة من Anthropic للمهام المعقدة للغاية، يتميز بالأداء العالي، الذكاء، الطلاقة، والاستيعاب.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 هو النموذج الرائد من Anthropic، يجمع بين الذكاء الاستثنائي والأداء القابل للتوسع، مثالي للمهام المعقدة التي تتطلب استجابات عالية الجودة وتفكير متقدم.",
"claude-opus-4-5.description": "Claude Opus 4.5 من Anthropic — نموذج رئيسي مع تفكير وبرمجة من الدرجة الأولى.",
"claude-opus-4-6.description": "Claude Opus 4.6 من Anthropic — نافذة سياق 1M نموذج رئيسي مع تفكير متقدم.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 هو النموذج الأكثر ذكاءً من Anthropic لبناء الوكلاء والبرمجة.",
"claude-opus-4.6.description": "Claude Opus 4.6 هو النموذج الأكثر ذكاءً من Anthropic لبناء الوكلاء والبرمجة.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking يمكنه تقديم استجابات شبه فورية أو تفكير متسلسل مرئي.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 هو النموذج الأكثر ذكاءً من Anthropic حتى الآن، يقدم استجابات شبه فورية أو تفكير ممتد خطوة بخطوة مع تحكم دقيق لمستخدمي API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 يمكنه إنتاج استجابات شبه فورية أو تفكير ممتد خطوة بخطوة مع عرض العملية.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 هو النموذج الأكثر ذكاءً من Anthropic حتى الآن.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 من Anthropic — نموذج Sonnet محسّن مع أداء برمجي معزز.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 من Anthropic — أحدث نموذج Sonnet مع برمجة واستخدام أدوات متفوقة.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) هو نموذج مبتكر يوفر فهمًا عميقًا للغة وتفاعلًا ذكيًا.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 هو نموذج تفكير من الجيل التالي يتمتع بقدرات أقوى في التفكير المعقد وسلسلة التفكير لمهام التحليل العميق.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 هو نموذج استدلال من الجيل التالي يتميز بقدرات استدلال معقدة وسلسلة التفكير.",
- "deepseek-chat.description": "اسم مستعار للتوافق مع وضع عدم التفكير في DeepSeek V4 Flash. مقرر إيقافه — استخدم DeepSeek V4 Flash بدلاً منه.",
+ "deepseek-chat.description": "نموذج مفتوح المصدر جديد يجمع بين القدرات العامة والبرمجية. يحافظ على حوار النموذج العام وقوة البرمجة للنموذج البرمجي، مع تحسين توافق التفضيلات. DeepSeek-V2.5 يحسن أيضًا الكتابة واتباع التعليمات.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B هو نموذج لغة برمجية تم تدريبه على 2 تريليون رمز (87٪ كود، 13٪ نص صيني/إنجليزي). يقدم نافذة سياق 16K ومهام الإكمال في المنتصف، ويوفر إكمال كود على مستوى المشاريع وملء مقاطع الكود.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 هو نموذج كود MoE مفتوح المصدر يتميز بأداء قوي في مهام البرمجة، ويضاهي GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 هو نموذج كود MoE مفتوح المصدر يتميز بأداء قوي في مهام البرمجة، ويضاهي GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "الإصدار الكامل السريع من DeepSeek R1 مع بحث ويب في الوقت الحقيقي، يجمع بين قدرات بحجم 671B واستجابة أسرع.",
"deepseek-r1-online.description": "الإصدار الكامل من DeepSeek R1 مع 671 مليار معلمة وبحث ويب في الوقت الحقيقي، يوفر فهمًا وتوليدًا أقوى.",
"deepseek-r1.description": "يستخدم DeepSeek-R1 بيانات البداية الباردة قبل التعلم المعزز ويؤدي أداءً مماثلًا لـ OpenAI-o1 في الرياضيات، والبرمجة، والتفكير.",
- "deepseek-reasoner.description": "اسم مستعار للتوافق مع وضع التفكير في DeepSeek V4 Flash. مقرر إيقافه — استخدم DeepSeek V4 Flash بدلاً منه.",
+ "deepseek-reasoner.description": "اسم متوافق لوضع التفكير السريع DeepSeek V4. من المقرر إيقافه — يُرجى استخدام deepseek-v4-flash بدلاً منه.",
"deepseek-v2.description": "DeepSeek V2 هو نموذج MoE فعال لمعالجة منخفضة التكلفة.",
"deepseek-v2:236b.description": "DeepSeek V2 236B هو نموذج DeepSeek الموجه للبرمجة مع قدرات قوية في توليد الكود.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 هو نموذج MoE يحتوي على 671 مليار معلمة يتميز بقوة في البرمجة، والقدرات التقنية، وفهم السياق، والتعامل مع النصوص الطويلة.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 هو نموذج توليد صور من ByteDance Seed، يدعم إدخال النصوص والصور مع توليد صور عالية الجودة وقابلة للتحكم بدرجة كبيرة. يُولّد الصور من التعليمات النصية.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 هو أحدث نموذج متعدد الوسائط من ByteDance، يدمج قدرات تحويل النص إلى صورة، والصورة إلى صورة، وتوليد الصور بالجملة، مع دمج الفهم العام وقدرات الاستدلال. مقارنة بالإصدار السابق 4.0، يقدم جودة توليد محسّنة بشكل كبير، مع تحسين تناسق التحرير ودمج الصور المتعددة. يوفر تحكمًا أكثر دقة في التفاصيل البصرية، مما يجعل النصوص الصغيرة والوجوه الصغيرة أكثر طبيعية، ويحقق تخطيطًا وألوانًا أكثر انسجامًا، مما يعزز الجماليات العامة.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite هو أحدث نموذج لتوليد الصور من ByteDance. لأول مرة، يدمج قدرات الاسترجاع عبر الإنترنت، مما يسمح له بتضمين معلومات الويب في الوقت الفعلي وتعزيز حداثة الصور المولدة. كما تم ترقية ذكاء النموذج، مما يمكنه من تفسير التعليمات المعقدة والمحتوى البصري بدقة. بالإضافة إلى ذلك، يقدم تغطية محسّنة للمعرفة العالمية، وتناسقًا مرجعيًا، وجودة توليد في السيناريوهات المهنية، مما يلبي بشكل أفضل احتياجات الإبداع البصري على مستوى المؤسسات.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 من ByteDance هو النموذج الأكثر قوة لتوليد الفيديو، يدعم إنشاء فيديو مرجعي متعدد الوسائط، تحرير الفيديو، تمديد الفيديو، تحويل النص إلى فيديو، وتحويل الصورة إلى فيديو مع صوت متزامن.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast من ByteDance يقدم نفس القدرات مثل Seedance 2.0 مع سرعات توليد أسرع وسعر أكثر تنافسية.",
"emohaa.description": "Emohaa هو نموذج للصحة النفسية يتمتع بقدرات استشارية احترافية لمساعدة المستخدمين على فهم المشكلات العاطفية.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B هو نموذج مفتوح المصدر وخفيف الوزن، مصمم للنشر المحلي والمخصص.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview هو نموذج معاينة بسياق 8K لتقييم أداء ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K هو نموذج تفكير سريع بسياق 32K للاستدلال المعقد والدردشة متعددة الأدوار.",
"ernie-x1.1-preview.description": "معاينة ERNIE X1.1 هو نموذج تفكير مخصص للتقييم والاختبار.",
"ernie-x1.1.description": "ERNIE X1.1 هو نموذج تفكير تجريبي للتقييم والاختبار.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5، تم تطويره بواسطة فريق ByteDance Seed، يدعم تحرير الصور المتعددة وتكوينها. يتميز باتساق الموضوع المحسن، اتباع التعليمات بدقة، فهم المنطق المكاني، التعبير الجمالي، تصميم الملصقات والشعارات مع تقديم نصوص وصور عالية الدقة.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0، تم تطويره بواسطة ByteDance Seed، يدعم إدخال النصوص والصور لتوليد صور عالية الجودة وقابلة للتحكم بناءً على التعليمات.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 هو نموذج توليد الصور من ByteDance Seed، يدعم المدخلات النصية والصورية مع توليد صور عالي الجودة وقابل للتحكم بدرجة كبيرة. يقوم بتوليد الصور من التعليمات النصية.",
"fal-ai/flux-kontext/dev.description": "نموذج FLUX.1 يركز على تحرير الصور، ويدعم إدخال النصوص والصور.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] يقبل النصوص وصور مرجعية كمدخلات، مما يتيح تعديلات محلية مستهدفة وتحولات معقدة في المشهد العام.",
"fal-ai/flux/krea.description": "Flux Krea [dev] هو نموذج لتوليد الصور يتميز بميول جمالية نحو صور أكثر واقعية وطبيعية.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "نموذج قوي لتوليد الصور متعدد الوسائط أصلي.",
"fal-ai/imagen4/preview.description": "نموذج عالي الجودة لتوليد الصور من Google.",
"fal-ai/nano-banana.description": "Nano Banana هو أحدث وأسرع وأكثر نماذج Google كفاءةً لتوليد وتحرير الصور من خلال المحادثة.",
- "fal-ai/qwen-image-edit.description": "نموذج تحرير الصور احترافي من فريق Qwen، يدعم التعديلات الدلالية والمظهرية، تحرير النصوص الدقيقة باللغتين الصينية والإنجليزية، نقل الأنماط، التدوير، والمزيد.",
- "fal-ai/qwen-image.description": "نموذج قوي لتوليد الصور من فريق Qwen مع قدرة قوية على تقديم النصوص الصينية وأنماط بصرية متنوعة.",
+ "fal-ai/qwen-image-edit.description": "نموذج تحرير الصور الاحترافي من فريق Qwen الذي يدعم التعديلات الدلالية والمظهرية، ويحرر النصوص الصينية والإنجليزية بدقة، ويمكّن من تعديلات عالية الجودة مثل نقل الأنماط وتدوير الكائنات.",
+ "fal-ai/qwen-image.description": "نموذج قوي لتوليد الصور من فريق Qwen يتميز بعرض نصوص صينية مذهلة وأنماط بصرية متنوعة.",
"flux-1-schnell.description": "نموذج تحويل النص إلى صورة يحتوي على 12 مليار معلمة من Black Forest Labs يستخدم تقنيات تقطير الانتشار العدائي الكامن لتوليد صور عالية الجودة في 1-4 خطوات. ينافس البدائل المغلقة ومتاح بموجب ترخيص Apache-2.0 للاستخدام الشخصي والبحثي والتجاري.",
"flux-dev.description": "نموذج مفتوح المصدر مخصص لتوليد الصور لأغراض البحث والابتكار غير التجاري، مع تحسينات فعالة.",
"flux-kontext-max.description": "توليد وتحرير صور سياقية متقدمة، تجمع بين النصوص والصور لتحقيق نتائج دقيقة ومتسقة.",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) هو نموذج توليد الصور من Google ويدعم أيضًا الدردشة متعددة الوسائط.",
"gemini-3-pro-preview.description": "Gemini 3 Pro هو أقوى نموذج من Google للوكيل الذكي والبرمجة الإبداعية، يقدم تفاعلاً أعمق وصورًا أغنى مع استدلال متقدم.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) يقدم جودة صور احترافية بسرعة فائقة مع دعم الدردشة متعددة الوسائط.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) يقدم جودة صور احترافية بسرعة Flash مع دعم الدردشة متعددة الوسائط.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) هو أسرع نموذج توليد صور أصلي من Google مع دعم التفكير، وتوليد الصور الحواري، وتحرير الصور.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview هو النموذج الأكثر كفاءة من حيث التكلفة من Google، مُحسّن للمهام الوكيلة ذات الحجم الكبير، الترجمة، ومعالجة البيانات.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview يحسن من Gemini 3 Pro مع قدرات استدلال محسّنة ويضيف دعم مستوى التفكير المتوسط.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro من Google — نموذج متعدد الوسائط متميز مع نافذة سياق 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "يسعدنا إطلاق Grok 4 Fast، أحدث تقدم في نماذج الاستدلال منخفضة التكلفة.",
"grok-4.20-0309-non-reasoning.description": "نموذج غير تفكير للاستخدامات البسيطة.",
"grok-4.20-0309-reasoning.description": "نموذج ذكي وسريع للغاية يفكر قبل الرد.",
- "grok-4.20-beta-0309-non-reasoning.description": "إصدار غير مفكر للاستخدامات البسيطة.",
- "grok-4.20-beta-0309-reasoning.description": "نموذج ذكي وسريع للغاية يفكر قبل الرد.",
"grok-4.20-multi-agent-0309.description": "فريق من 4 أو 16 وكيلًا، يتفوق في حالات الاستخدام البحثية، لا يدعم حاليًا الأدوات على جانب العميل. يدعم فقط أدوات xAI على جانب الخادم (مثل X Search، أدوات البحث على الويب) وأدوات MCP البعيدة.",
"grok-4.3.description": "أكثر نموذج لغة كبير يسعى للحقيقة في العالم.",
- "grok-4.description": "نموذجنا الرائد والأقوى، يتميز في معالجة اللغة الطبيعية، الرياضيات، والتفكير—مثالي لجميع الاستخدامات.",
+ "grok-4.description": "أحدث نموذج Grok الرائد بأداء لا مثيل له في اللغة، الرياضيات، والاستدلال — نموذج شامل حقيقي. يشير حاليًا إلى grok-4-0709؛ نظرًا للموارد المحدودة، فإن سعره مؤقتًا أعلى بنسبة 10% من السعر الرسمي ومن المتوقع أن يعود إلى السعر الرسمي لاحقًا.",
"grok-code-fast-1.description": "يسعدنا إطلاق grok-code-fast-1، نموذج استدلال سريع وفعال من حيث التكلفة يتفوق في البرمجة التلقائية.",
"grok-imagine-image-pro.description": "إنشاء صور من مطالبات نصية، تحرير الصور الموجودة باستخدام اللغة الطبيعية، أو تحسين الصور بشكل تكراري من خلال محادثات متعددة الأدوار.",
"grok-imagine-image.description": "إنشاء صور من مطالبات نصية، تحرير الصور الموجودة باستخدام اللغة الطبيعية، أو تحسين الصور بشكل تكراري من خلال محادثات متعددة الأدوار.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ هو نموذج استدلال من عائلة Qwen. مقارنة بالنماذج المضبوطة على التعليمات، يقدم قدرات تفكير واستدلال تعزز الأداء بشكل كبير، خاصة في المشكلات الصعبة. QwQ-32B هو نموذج متوسط الحجم ينافس أفضل نماذج الاستدلال مثل DeepSeek-R1 و o1-mini.",
"qwq_32b.description": "نموذج استدلال متوسط الحجم من عائلة Qwen. مقارنة بالنماذج المضبوطة على التعليمات، تعزز قدرات التفكير والاستدلال في QwQ الأداء بشكل كبير، خاصة في المشكلات الصعبة.",
"r1-1776.description": "R1-1776 هو إصدار ما بعد التدريب من DeepSeek R1 مصمم لتقديم معلومات واقعية غير خاضعة للرقابة أو التحيز.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro من ByteDance يدعم تحويل النص إلى فيديو، تحويل الصورة إلى فيديو (الإطار الأول، الإطار الأول + الأخير)، وتوليد الصوت المتزامن مع المرئيات.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite من BytePlus يتميز بتوليد معزز بالاسترجاع من الويب للحصول على معلومات في الوقت الفعلي، تحسين تفسير التعليمات المعقدة، وتحسين اتساق المرجع لإنشاء مرئيات احترافية.",
"solar-mini-ja.description": "Solar Mini (Ja) يوسع Solar Mini مع تركيز على اللغة اليابانية مع الحفاظ على الأداء القوي والكفاءة في الإنجليزية والكورية.",
"solar-mini.description": "Solar Mini هو نموذج لغة مدمج يتفوق على GPT-3.5، يتميز بقدرات متعددة اللغات قوية تدعم الإنجليزية والكورية، ويقدم حلاً فعالاً بصمة صغيرة.",
"solar-pro.description": "Solar Pro هو نموذج لغة عالي الذكاء من Upstage، يركز على اتباع التعليمات باستخدام وحدة معالجة رسومات واحدة، مع درجات IFEval تتجاوز 80. حالياً يدعم اللغة الإنجليزية؛ وكان من المقرر إصدار النسخة الكاملة في نوفمبر 2024 مع دعم لغات موسع وسياق أطول.",
diff --git a/locales/ar/providers.json b/locales/ar/providers.json
index e7614ea9fdf..313b2aecb3e 100644
--- a/locales/ar/providers.json
+++ b/locales/ar/providers.json
@@ -33,7 +33,6 @@
"jina.description": "تأسست Jina AI في عام 2020، وهي شركة رائدة في مجال البحث الذكي. تشمل تقنياتها نماذج المتجهات، ومعيدو الترتيب، ونماذج لغوية صغيرة لبناء تطبيقات بحث توليدية ومتعددة الوسائط عالية الجودة.",
"kimicodingplan.description": "كود Kimi من Moonshot AI يوفر الوصول إلى نماذج Kimi بما في ذلك K2.5 لأداء مهام الترميز.",
"lmstudio.description": "LM Studio هو تطبيق سطح مكتب لتطوير وتجربة النماذج اللغوية الكبيرة على جهازك.",
- "lobehub.description": "يستخدم LobeHub Cloud واجهات برمجة التطبيقات الرسمية للوصول إلى نماذج الذكاء الاصطناعي ويقيس الاستخدام باستخدام أرصدة مرتبطة برموز النماذج.",
"longcat.description": "LongCat هو سلسلة من نماذج الذكاء الاصطناعي التوليدية الكبيرة التي تم تطويرها بشكل مستقل بواسطة Meituan. تم تصميمه لتعزيز إنتاجية المؤسسة الداخلية وتمكين التطبيقات المبتكرة من خلال بنية حسابية فعالة وقدرات متعددة الوسائط قوية.",
"minimax.description": "تأسست MiniMax في عام 2021، وتبني نماذج ذكاء اصطناعي متعددة الوسائط للأغراض العامة، بما في ذلك نماذج نصية بمليارات المعلمات، ونماذج صوتية وبصرية، بالإضافة إلى تطبيقات مثل Hailuo AI.",
"minimaxcodingplan.description": "خطة الرموز MiniMax توفر الوصول إلى نماذج MiniMax بما في ذلك M2.7 لأداء مهام الترميز عبر اشتراك ثابت الرسوم.",
diff --git a/locales/ar/setting.json b/locales/ar/setting.json
index 1caf6a08c7d..6dca28325e1 100644
--- a/locales/ar/setting.json
+++ b/locales/ar/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "التعبئة اليدوية",
"tab.manualFill.desc": "تكوين مهارة MCP مخصصة يدويًا",
"tab.memory": "الذاكرة",
+ "tab.messenger": "الرسائل",
"tab.notification": "الإشعارات",
"tab.profile": "حسابي",
"tab.provider": "مزود خدمة الذكاء الاصطناعي",
diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.json
index 0808fb9b874..277760b0c7b 100644
--- a/locales/bg-BG/chat.json
+++ b/locales/bg-BG/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Автоматично одобрявай всички изпълнения на инструменти",
"tool.intervention.mode.manual": "Ръчно",
"tool.intervention.mode.manualDesc": "Изисква ръчно одобрение за всяко извикване",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Новата идентичност ще се появи след одобрение.",
- "tool.intervention.onboarding.agentIdentity.description": "Одобрението на тази промяна обновява Агента, показан във входящите и в този разговор за въвеждане.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Аватар на агента",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Одобрение за въвеждане",
- "tool.intervention.onboarding.agentIdentity.name": "Име на агента",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Входящ агент",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Текущ агент за въвеждане",
- "tool.intervention.onboarding.agentIdentity.targets": "Отнася се за",
"tool.intervention.onboarding.agentIdentity.title": "Потвърждение за обновяване на идентичността на агента",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Ще актуализирам аватара си",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Ще актуализирам името си",
"tool.intervention.onboarding.userProfile.applyHint": "Тези данни ще бъдат запазени във вашия профил след одобрение.",
"tool.intervention.onboarding.userProfile.description": "Одобряването на тази промяна актуализира вашия профил за въвеждане, така че агентът да може да персонализира бъдещите отговори.",
"tool.intervention.onboarding.userProfile.eyebrow": "Одобрение на въвеждане",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Актуализирано {{time}}",
"workingPanel.resources.viewMode.list": "Списъчен изглед",
"workingPanel.resources.viewMode.tree": "Дървовиден изглед",
+ "workingPanel.review.baseRef.default": "по подразбиране",
+ "workingPanel.review.baseRef.loading": "Зареждане на клонове...",
+ "workingPanel.review.baseRef.reset": "Връщане към клона по подразбиране",
+ "workingPanel.review.baseRef.unresolved": "Изберете основен клон",
"workingPanel.review.binary": "Двоичен файл — разликата не е показана",
"workingPanel.review.collapseAll": "Свий всички",
"workingPanel.review.copied": "Пътят е копиран",
"workingPanel.review.copyPath": "Копирай пътя на файла",
"workingPanel.review.empty": "Няма промени в работното дърво",
+ "workingPanel.review.empty.branch": "Няма промени спрямо {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Не може да се определи отдалеченият клон по подразбиране. Изпълнете `git remote set-head origin --auto` в терминала си.",
"workingPanel.review.error": "Не може да се зареди разликата на този файл",
"workingPanel.review.expandAll": "Разгъни всички",
+ "workingPanel.review.mode.branch": "Клон",
+ "workingPanel.review.mode.unstaged": "Неинсценирано",
"workingPanel.review.more": "Още опции",
"workingPanel.review.refresh": "Обнови",
"workingPanel.review.textDiff.disable": "Деактивирай вградени текстови разлики",
diff --git a/locales/bg-BG/labs.json b/locales/bg-BG/labs.json
index 47b9b2241f7..24185357acc 100644
--- a/locales/bg-BG/labs.json
+++ b/locales/bg-BG/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Групов чат (многоагентен)",
"features.inputMarkdown.desc": "Реално време визуализация на Markdown в полето за въвеждане (удебелен текст, кодови блокове, таблици и др.).",
"features.inputMarkdown.title": "Визуализация на Markdown при въвеждане",
+ "features.messenger.desc": "Говорете с вашите агенти от Telegram (и други месинджъри) чрез споделения LobeHub бот. Добавя раздел Месинджър в Настройки за свързване на вашия акаунт и избор на агент, който получава съобщения.",
+ "features.messenger.title": "Месинджър",
"title": "Лаборатория"
}
diff --git a/locales/bg-BG/messenger.json b/locales/bg-BG/messenger.json
new file mode 100644
index 00000000000..a48d8cf4c17
--- /dev/null
+++ b/locales/bg-BG/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Активен агент",
+ "messenger.activeAgentPlaceholder": "Изберете агент",
+ "messenger.detail.addServer": "Добавяне на сървър",
+ "messenger.detail.addWorkspace": "Добавяне на работно пространство",
+ "messenger.detail.connections.connected": "Свързано",
+ "messenger.detail.connections.empty": "Отворете бота и изпратете /start, за да свържете акаунта си.",
+ "messenger.detail.connections.linkHint": "Работното пространство е инсталирано. Отворете Slack и изпратете лично съобщение на бота, за да завършите свързването на личния си акаунт.",
+ "messenger.detail.connections.pending": "В очакване",
+ "messenger.detail.connections.serverLabel": "сървър",
+ "messenger.detail.connections.title": "Връзки",
+ "messenger.detail.connections.userLabel": "потребител",
+ "messenger.detail.connections.workspaceLabel": "работно пространство",
+ "messenger.detail.disconnect": "Прекъсване на връзката",
+ "messenger.discord.connectModal.description": "Добавете бота LobeHub към Discord сървър, който управлявате.",
+ "messenger.discord.connectModal.inviteButton": "Добавяне към Discord сървър",
+ "messenger.discord.connectModal.notConfigured": "Discord не е наличен в момента. Моля, опитайте отново по-късно.",
+ "messenger.discord.connectModal.title": "Добавяне на бот към вашия сървър",
+ "messenger.discord.connections.disconnectConfirm": "Премахване на този сървър от вашия списък за одит? Ботът ще остане в сървъра, докато администратор на сървъра не го премахне.",
+ "messenger.discord.connections.disconnectFailed": "Неуспешно премахване на сървъра.",
+ "messenger.discord.connections.disconnectSuccess": "Сървърът е премахнат.",
+ "messenger.discord.connections.disconnectTitle": "Премахване на сървър",
+ "messenger.discord.userPending.cta": "Отворете в Discord",
+ "messenger.discord.userPending.hint": "Отворете бота в Discord и изпратете съобщение, за да завършите свързването на акаунта си.",
+ "messenger.discord.userPending.name": "Все още не е свързан",
+ "messenger.error.agentNotFound": "Агентът не е намерен.",
+ "messenger.error.disconnectNotAllowed": "Можете да прекъснете само инсталации, които сте започнали.",
+ "messenger.error.installationNotFound": "Инсталацията не е намерена.",
+ "messenger.error.linkRequired": "Отворете бота и изпратете /start, преди да промените тази връзка.",
+ "messenger.error.pickDefaultAgent": "Изберете агент по подразбиране, преди да потвърдите.",
+ "messenger.error.platformNotConfigured": "Тази платформа за съобщения не е налична в момента. Моля, опитайте отново по-късно.",
+ "messenger.linkCta": "Свързване",
+ "messenger.linkModal.continueIn": "Продължете настройката в {{platform}}",
+ "messenger.linkModal.instructions": "Отворете бота, изпратете /start, след това натиснете \"Свързване на акаунт\", за да свържете акаунта си в LobeHub.",
+ "messenger.linkModal.notConfigured": "Тази връзка не е налична в момента. Моля, опитайте отново по-късно.",
+ "messenger.linkModal.openCta": "Отворете в {{platform}}",
+ "messenger.linkModal.scanHint": "Или сканирайте с телефона си, за да отворите {{platform}}.",
+ "messenger.linkModal.title": "Свързване на Messenger",
+ "messenger.list.discord.description": "Чатете с вашите агенти на LobeHub от всеки Discord сървър чрез лично съобщение с бота LobeHub.",
+ "messenger.list.slack.description": "Чатете с вашите агенти на LobeHub от всяко работно пространство в Slack чрез лично съобщение или @LobeHub.",
+ "messenger.list.telegram.description": "Чатете с вашите агенти на LobeHub в Telegram и изберете кой да отговаря от всяко място.",
+ "messenger.noPlatformsConfigured": "Все още няма налични платформи. Проверете отново скоро.",
+ "messenger.setActiveFailed": "Неуспешно задаване като активен.",
+ "messenger.setActiveSuccess": "Активният агент е актуализиран.",
+ "messenger.slack.connectModal.continueButton": "Продължете в Slack",
+ "messenger.slack.connectModal.description": "Ще бъдете пренасочени към Slack, за да упълномощите инсталацията на работното пространство на LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack не е наличен в момента. Моля, опитайте отново по-късно.",
+ "messenger.slack.connectModal.title": "Продължете настройката в Slack",
+ "messenger.slack.connections.disconnectConfirm": "Прекъснете връзката на бота LobeHub от това работно пространство в Slack? Съществуващите връзки на потребителите ще бъдат паузирани, докато не го инсталирате отново.",
+ "messenger.slack.connections.disconnectFailed": "Неуспешно прекъсване на връзката.",
+ "messenger.slack.connections.disconnectSuccess": "Работното пространство е прекъснато.",
+ "messenger.slack.connections.disconnectTitle": "Прекъсване на работното пространство",
+ "messenger.slack.installBlocked.dismiss": "Разбрах",
+ "messenger.slack.installBlocked.suggestion": "Изпратете лично съобщение на @LobeHub в Slack, за да свържете личния си акаунт — не е необходимо да инсталирате отново. Или помолете оригиналния инсталатор да прекъсне това работно пространство първо, ако искате да поемете собствеността.",
+ "messenger.slack.installBlocked.title": "Работното пространство вече е свързано",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" вече е свързано с LobeHub от друг потребител.",
+ "messenger.slack.installBlocked.withoutName": "Това работно пространство в Slack вече е свързано с LobeHub от друг потребител.",
+ "messenger.slack.installResult.failed": "Инсталацията в Slack не успя ({{reason}}). Моля, опитайте отново или се свържете с поддръжката.",
+ "messenger.slack.installResult.reasons.accessDenied": "упълномощаването беше отменено",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Упълномощаването в Slack не успя",
+ "messenger.slack.installResult.reasons.generic": "възникна неизвестна грешка",
+ "messenger.slack.installResult.reasons.invalidState": "сесията за инсталация изтече",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack върна непълна информация за приложението",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack върна непълни параметри за инсталация",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack не върна идентификатор на работното пространство",
+ "messenger.slack.installResult.reasons.missingToken": "Slack не върна токен за бот",
+ "messenger.slack.installResult.reasons.persistFailed": "връзката с работното пространство не можа да бъде запазена",
+ "messenger.slack.installResult.success": "Работното пространство в Slack е свързано.",
+ "messenger.subtitle": "Свържете акаунта си с официалния бот на LobeHub веднъж. Изберете кой агент да получава съобщения, сменяйте по всяко време оттук или от бота.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Прекъснете връзката на вашия акаунт в {{platform}} от LobeHub? Входящите съобщения ще спрат, докато не изпратите /start отново.",
+ "messenger.unlinkCta": "Прекъсване на връзката",
+ "messenger.unlinkFailed": "Неуспешно прекъсване на връзката.",
+ "messenger.unlinkSuccess": "Връзката е прекъсната.",
+ "messenger.unlinkTitle": "Прекъсване на акаунта",
+ "verify.confirm.conflict.description": "Този акаунт в {{platform}} вече е свързан с акаунт в LobeHub {{email}}. Влезте в този акаунт, за да управлявате връзката, или прекъснете връзката там, преди да опитате отново.",
+ "verify.confirm.conflict.switchAccount": "Влезте с друг акаунт",
+ "verify.confirm.conflict.title": "Този акаунт вече е свързан",
+ "verify.confirm.cta": "Потвърдете свързването",
+ "verify.confirm.defaultAgent": "Агент по подразбиране",
+ "verify.confirm.defaultAgentHint": "Вашите съобщения ще бъдат насочвани първо тук. Можете да смените по всяко време чрез /agents в бота или от Настройки → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Изберете агент",
+ "verify.confirm.fields.lobeHubAccount": "Акаунт в LobeHub",
+ "verify.confirm.fields.platformAccount": "Акаунт в {{platform}}",
+ "verify.confirm.fields.workspace": "Работно пространство",
+ "verify.confirm.noAgents": "Все още нямате агенти. Създайте такъв в LobeHub, след това се върнете, за да завършите свързването.",
+ "verify.confirm.title": "Потвърдете свързването",
+ "verify.confirm.workspace": "Работно пространство: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Този акаунт вече е свързан с друг акаунт в LobeHub. Първо влезте в този акаунт.",
+ "verify.error.expired": "Тази връзка е изтекла. Моля, върнете се към бота и изпратете /start отново.",
+ "verify.error.generic": "Нещо се обърка. Моля, опитайте отново.",
+ "verify.error.missingToken": "Невалидна връзка. Отворете тази страница от бота.",
+ "verify.error.title": "Неуспешно потвърждаване на връзката",
+ "verify.labRequired.description": "Messenger в момента е функция в Labs. Активирайте я в Настройки → Разширени → Labs и презаредете тази страница.",
+ "verify.labRequired.openSettings": "Отворете настройките на Labs",
+ "verify.labRequired.title": "Активирайте Messenger, за да продължите",
+ "verify.signInCta": "Влезте, за да продължите",
+ "verify.signInRequired": "Моля, влезте в LobeHub, за да потвърдите връзката.",
+ "verify.success.description": "Вашият акаунт вече е свързан с {{platform}}. Отворете {{platform}} и изпратете първото си съобщение.",
+ "verify.success.openBot": "Отворете в {{platform}}",
+ "verify.success.title": "Успешно свързване!"
+}
diff --git a/locales/bg-BG/models.json b/locales/bg-BG/models.json
index bcf7c47c526..ab2904e3881 100644
--- a/locales/bg-BG/models.json
+++ b/locales/bg-BG/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Чисто нов модел за видео генериране с цялостни подобрения в движенията на тялото, физическата реалистичност и следването на инструкции.",
"MiniMax-M1.description": "Нов вътрешен модел за разсъждение с 80K верига на мисълта и 1M вход, предлагащ производителност, сравнима с водещите глобални модели.",
"MiniMax-M2-Stable.description": "Създаден за ефективно програмиране и агентски работни потоци, с по-висока едновременност за търговска употреба.",
- "MiniMax-M2.1-Lightning.description": "Мощни многоезични програмни възможности с по-бързо и ефективно извеждане.",
"MiniMax-M2.1-highspeed.description": "Мощни многоезични програмни възможности, цялостно подобрено програмиране. По-бързо и по-ефективно.",
"MiniMax-M2.1.description": "MiniMax-M2.1 е водеща отворена голяма езикова система от MiniMax, фокусирана върху решаването на сложни реални задачи. Основните ѝ предимства са възможностите за програмиране на множество езици и способността да действа като агент за решаване на сложни задачи.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Същата производителност като M2.5, но с по-бързо извеждане.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku е най-бързият и най-компактен модел на Anthropic, проектиран за почти мигновени отговори с бърза и точна производителност.",
"claude-3-opus-20240229.description": "Claude 3 Opus е най-мощният модел на Anthropic за силно сложни задачи, отличаващ се с производителност, интелигентност, плавност и разбиране.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet балансира интелигентност и скорост за корпоративни натоварвания, осигурявайки висока полезност на по-ниска цена и надеждно мащабно внедряване.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 е най-бързият и интелигентен Haiku модел на Anthropic, с мълниеносна скорост и разширено мислене.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 е най-бързият и интелигентен Haiku модел на Anthropic, с мълниеносна скорост и разширено разсъждение.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 от Anthropic — ново поколение Haiku с подобрено разсъждение и визия.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 е най-бързият и най-умен Haiku модел на Anthropic, с мълниеносна скорост и разширено разсъждение.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking е усъвършенстван вариант, който може да разкрие процеса си на разсъждение.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 е най-новият и най-способен модел на Anthropic за изключително сложни задачи, отличаващ се с производителност, интелигентност, плавност и разбиране.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 е най-новият и най-способен модел на Anthropic за изключително сложни задачи, превъзхождащ в производителност, интелигентност, плавност и разбиране.",
"claude-opus-4-1.description": "Claude Opus 4.1 от Anthropic — премиум модел за дълбок анализ и разсъждение.",
- "claude-opus-4-20250514.description": "Claude Opus 4 е най-мощният модел на Anthropic за изключително сложни задачи, отличаващ се с производителност, интелигентност, плавност и разбиране.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 е най-мощният модел на Anthropic за изключително сложни задачи, превъзхождащ в производителност, интелигентност, плавност и разбиране.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 е флагманският модел на Anthropic, комбиниращ изключителна интелигентност с мащабируема производителност, идеален за сложни задачи, изискващи най-висококачествени отговори и разсъждение.",
"claude-opus-4-5.description": "Claude Opus 4.5 от Anthropic — флагмански модел с върхово разсъждение и кодови умения.",
"claude-opus-4-6.description": "Claude Opus 4.6 от Anthropic — флагман с 1M контекст и усъвършенствано разсъждение.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 е най-интелигентният модел на Anthropic за създаване на агенти и програмиране.",
"claude-opus-4.6.description": "Claude Opus 4.6 е най-интелигентният модел на Anthropic за създаване на агенти и програмиране.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking може да генерира почти мигновени отговори или разширено стъпково мислене с видим процес.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 е най-интелигентният модел на Anthropic досега, предлагащ почти мигновени отговори или разширено стъпка по стъпка мислене с фино управление за API потребители.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 е най-интелигентният модел на Anthropic досега.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 може да генерира почти мигновени отговори или разширено стъпка по стъпка мислене с видим процес.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 е най-интелигентният модел на Anthropic до момента.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 от Anthropic — подобрен Sonnet с по‑силни кодови способности.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 от Anthropic — последният Sonnet с превъзходно кодиране и работа с инструменти.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 е най-интелигентният модел на Anthropic до момента.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) е иновативен модел, предлагащ дълбоко езиково разбиране и интеракция.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 е модел за разсъждение от ново поколение с по-силни способности за сложни разсъждения и верига от мисли за задълбочени аналитични задачи.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 е модел за разсъждение от следващо поколение с по-силни способности за сложни разсъждения и верига на мисълта.",
- "deepseek-chat.description": "Съвместим псевдоним за режим без мислене на DeepSeek V4 Flash. Планирано за премахване — използвайте DeepSeek V4 Flash вместо това.",
+ "deepseek-chat.description": "Нов модел с отворен код, който комбинира общи и кодови способности. Той запазва общия диалогов модел и силното кодиране на кодовия модел, с по-добро съответствие на предпочитанията. DeepSeek-V2.5 също така подобрява писането и следването на инструкции.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B е езиков модел за програмиране, обучен върху 2 трилиона токени (87% код, 13% китайски/английски текст). Въвежда 16K контекстен прозорец и задачи за попълване в средата, осигурявайки допълване на код на ниво проект и попълване на фрагменти.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 е отворен MoE модел за програмиране, който се представя на ниво GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 е отворен MoE модел за програмиране, който се представя на ниво GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Пълна бърза версия на DeepSeek R1 с търсене в реално време в уеб, комбинираща възможности от мащаб 671B и по-бърз отговор.",
"deepseek-r1-online.description": "Пълна версия на DeepSeek R1 с 671 милиарда параметъра и търсене в реално време в уеб, предлагаща по-силно разбиране и генериране.",
"deepseek-r1.description": "DeepSeek-R1 използва данни от студен старт преди подсиленото обучение и се представя наравно с OpenAI-o1 в математика, програмиране и разсъждение.",
- "deepseek-reasoner.description": "Съвместим псевдоним за режим с мислене на DeepSeek V4 Flash. Планирано за премахване — използвайте DeepSeek V4 Flash вместо това.",
+ "deepseek-reasoner.description": "Съвместим псевдоним за DeepSeek V4 Flash режим на мислене. Планирано за премахване — използвайте deepseek-v4-flash вместо това.",
"deepseek-v2.description": "DeepSeek V2 е ефективен MoE модел за икономична обработка.",
"deepseek-v2:236b.description": "DeepSeek V2 236B е модел на DeepSeek, фокусиран върху програмиране, с висока производителност при генериране на код.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 е MoE модел с 671 милиарда параметъра, с изключителни способности в програмиране, технически задачи, разбиране на контекст и обработка на дълги текстове.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 е модел за генериране на изображения от ByteDance Seed, поддържащ вход от текст и изображения с високо контролируемо, висококачествено генериране на изображения. Генерира изображения от текстови подсказки.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 е най-новият мултимодален модел за изображения на ByteDance, интегриращ текст-към-изображение, изображение-към-изображение и групово генериране на изображения, като включва обща логика и способности за разсъждение. В сравнение с предишната версия 4.0, той предлага значително подобрено качество на генериране, с по-добра консистентност при редактиране и мулти-изображение сливане. Осигурява по-прецизен контрол върху визуалните детайли, като произвежда малък текст и малки лица по-естествено, и постига по-хармонично оформление и цветове, подобрявайки цялостната естетика.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite е най-новият модел за генериране на изображения на ByteDance. За първи път интегрира възможности за онлайн извличане, позволявайки му да включва информация в реално време от уеб и да подобрява актуалността на генерираните изображения. Интелигентността на модела също е подобрена, позволявайки прецизно интерпретиране на сложни инструкции и визуално съдържание. Освен това предлага подобрено глобално покритие на знания, консистентност на референциите и качество на генериране в професионални сценарии, по-добре отговаряйки на нуждите за визуално създаване на корпоративно ниво.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 от ByteDance е най-мощният модел за генериране на видео, поддържащ мултимодално генериране на референтно видео, редактиране на видео, разширение на видео, текст-към-видео и изображение-към-видео със синхронизиран звук.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast от ByteDance предлага същите възможности като Seedance 2.0 с по-бързи скорости на генериране на по-конкурентна цена.",
"emohaa.description": "Emohaa е модел за психично здраве с професионални консултантски способности, който помага на потребителите да разберат емоционални проблеми.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B е лек модел с отворен код за локално и персонализирано внедряване.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview е модел за предварителен преглед с 8K контекст за оценка на ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K е бърз мислещ модел с 32K контекст за сложни разсъждения и многозавойни разговори.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview е предварителен модел за мислене, предназначен за оценка и тестване.",
"ernie-x1.1.description": "ERNIE X1.1 е мисловен модел за предварителен преглед за оценка и тестване.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, създаден от екипа на ByteDance Seed, поддържа редактиране и композиция на множество изображения. Характеризира се с подобрена консистентност на обектите, прецизно следване на инструкции, разбиране на пространствена логика, естетическо изразяване, оформление на плакати и дизайн на лого с високопрецизно текстово-изображение рендиране.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, създаден от ByteDance Seed, поддържа текстови и визуални входове за високо контролируемо, висококачествено генериране на изображения от подсказки.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 е модел за генериране на изображения от ByteDance Seed, който поддържа текстови и визуални входове с високо контролируемо и висококачествено генериране на изображения. Той генерира изображения от текстови подсказки.",
"fal-ai/flux-kontext/dev.description": "FLUX.1 модел, фокусиран върху редактиране на изображения, поддържащ вход от текст и изображения.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] приема текст и референтни изображения като вход, позволявайки целенасочени локални редакции и сложни глобални трансформации на сцени.",
"fal-ai/flux/krea.description": "Flux Krea [dev] е модел за генериране на изображения с естетично предпочитание към по-реалистични и естествени изображения.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Мощен роден мултимодален модел за генериране на изображения.",
"fal-ai/imagen4/preview.description": "Модел за висококачествено генериране на изображения от Google.",
"fal-ai/nano-banana.description": "Nano Banana е най-новият, най-бърз и най-ефективен роден мултимодален модел на Google, позволяващ генериране и редактиране на изображения чрез разговор.",
- "fal-ai/qwen-image-edit.description": "Професионален модел за редактиране на изображения от екипа на Qwen, поддържащ семантични и визуални редакции, прецизно редактиране на текст на китайски/английски, трансфер на стил, ротация и други.",
- "fal-ai/qwen-image.description": "Мощен модел за генериране на изображения от екипа на Qwen със силно рендиране на китайски текст и разнообразни визуални стилове.",
+ "fal-ai/qwen-image-edit.description": "Професионален модел за редактиране на изображения от екипа на Qwen, който поддържа семантични и визуални редакции, прецизно редактира китайски и английски текст и позволява висококачествени редакции като трансфер на стил и ротация на обекти.",
+ "fal-ai/qwen-image.description": "Мощен модел за генериране на изображения от екипа на Qwen с впечатляващо рендиране на китайски текст и разнообразни визуални стилове.",
"flux-1-schnell.description": "Модел за преобразуване на текст в изображение с 12 милиарда параметъра от Black Forest Labs, използващ латентна дифузионна дестилация за генериране на висококачествени изображения в 1–4 стъпки. Съперничи на затворени алтернативи и е пуснат под лиценз Apache-2.0 за лична, изследователска и търговска употреба.",
"flux-dev.description": "Модел за генериране на изображения с отворен код, оптимизиран за неконкурентни изследвания и иновации.",
"flux-kontext-max.description": "Съвременно генериране и редактиране на изображения с контекст, комбиниращо текст и изображения за прецизни и последователни резултати.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash е най-интелигентният модел, създаден за скорост, съчетаващ авангардна интелигентност с отлично търсене и обоснованост.",
"gemini-3-flash.description": "Gemini 3 Flash от Google — ултрабърз модел с мултимодална поддръжка.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) е модел за генериране на изображения на Google, който също поддържа мултимодален диалог.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) е моделът на Google за генериране на изображения и също така поддържа мултимодален чат.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) е модел за генериране на изображения на Google и също така поддържа мултимодален чат.",
"gemini-3-pro-preview.description": "Gemini 3 Pro е най-мощният агентен и „vibe-coding“ модел на Google, който предлага по-богати визуализации и по-дълбоко взаимодействие, базирано на съвременно логическо мислене.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) е най-бързият модел на Google за генериране на изображения с поддръжка на мислене, разговорно генериране и редактиране на изображения.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) предоставя Pro-качество на изображения с Flash скорост и поддръжка на мултимодален чат.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) е най-бързият собствен модел на Google за генериране на изображения с поддръжка на мислене, разговорно генериране и редактиране на изображения.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview е най-икономичният мултимодален модел на Google, оптимизиран за задачи с голям обем, превод и обработка на данни.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview подобрява Gemini 3 Pro с усъвършенствани способности за разсъждение и добавя поддръжка за средно ниво на мислене.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro от Google — премиум мултимодален модел с 1M контекст.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "С гордост представяме Grok 4 Fast – нашият най-нов напредък в икономичните логически модели.",
"grok-4.20-0309-non-reasoning.description": "Неразсъждаващ вариант за прости случаи.",
"grok-4.20-0309-reasoning.description": "Интелигентен, изключително бърз модел с разсъждение.",
- "grok-4.20-beta-0309-non-reasoning.description": "Вариант без разсъждения за прости случаи на употреба",
- "grok-4.20-beta-0309-reasoning.description": "Интелигентен, изключително бърз модел, който разсъждава преди да отговори",
"grok-4.20-multi-agent-0309.description": "Екип от 4 или 16 агента — отличен за проучвания; поддържа само xAI сървърни инструменти.",
"grok-4.3.description": "Най-истинно търсещият голям езиков модел в света",
- "grok-4.description": "Нашият най-нов и най-силен флагмански модел, отличаващ се в NLP, математика и разсъждения — идеален универсален инструмент.",
+ "grok-4.description": "Най-новият флагман Grok с ненадмината производителност в езика, математиката и разсъжденията — истински универсален модел. В момента сочи към grok-4-0709; поради ограничени ресурси временно е с 10% по-висока цена от официалната и се очаква да се върне към официалната цена по-късно.",
"grok-code-fast-1.description": "С гордост представяме grok-code-fast-1 – бърз и икономичен логически модел, който се отличава в агентско програмиране.",
"grok-imagine-image-pro.description": "Генерирайте изображения от текстови подсказки, редактирайте съществуващи изображения с естествен език или итеративно усъвършенствайте изображения чрез многократни разговори.",
"grok-imagine-image.description": "Генерирайте изображения от текстови подсказки, редактирайте съществуващи изображения с естествен език или итеративно усъвършенствайте изображения чрез многократни разговори.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ е модел за аргументация от семейството на Qwen. В сравнение със стандартните модели, обучени с инструкции, предлага мисловни и логически способности, които значително подобряват ефективността при трудни задачи. QwQ-32B е среден по размер модел, който се конкурира с водещи модели като DeepSeek-R1 и o1-mini.",
"qwq_32b.description": "Среден по размер модел за аргументация от семейството на Qwen. В сравнение със стандартните модели, обучени с инструкции, мисловните и логическите способности на QwQ значително подобряват ефективността при трудни задачи.",
"r1-1776.description": "R1-1776 е дообучен вариант на DeepSeek R1, създаден да предоставя неконфронтирана, обективна и фактическа информация.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro от ByteDance поддържа текст-към-видео, изображение-към-видео (първи кадър, първи+последен кадър) и генериране на аудио, синхронизирано с визуализации.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite от BytePlus предлага генериране, обогатено с уеб търсене за реална информация, подобрено тълкуване на сложни подсказки и подобрена консистентност на референциите за професионално визуално създаване.",
"solar-mini-ja.description": "Solar Mini (Ja) разширява Solar Mini с фокус върху японски език, като запазва ефективността и силната производителност на английски и корейски.",
"solar-mini.description": "Solar Mini е компактен LLM, който превъзхожда GPT-3.5, с мощни многоезични възможности, поддържащ английски и корейски, и предлага ефективно решение с малък отпечатък.",
"solar-pro.description": "Solar Pro е интелигентен LLM от Upstage, фокусиран върху следване на инструкции на един GPU, с IFEval резултати над 80. Понастоящем поддържа английски; пълното издание е планирано за ноември 2024 с разширена езикова поддръжка и по-дълъг контекст.",
diff --git a/locales/bg-BG/providers.json b/locales/bg-BG/providers.json
index 941a6772ae9..43b17d49929 100644
--- a/locales/bg-BG/providers.json
+++ b/locales/bg-BG/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Основана през 2020 г., Jina AI е водеща компания в областта на търсещия AI. Технологичният ѝ стек включва векторни модели, преоценители и малки езикови модели за създаване на надеждни генеративни и мултимодални търсещи приложения.",
"kimicodingplan.description": "Kimi Code от Moonshot AI предоставя достъп до модели Kimi, включително K2.5, за задачи, свързани с програмиране.",
"lmstudio.description": "LM Studio е десктоп приложение за разработка и експериментиране с LLM на вашия компютър.",
- "lobehub.description": "LobeHub Cloud използва официални API за достъп до AI модели и измерва използването с Кредити, свързани с токени на модела.",
"longcat.description": "LongCat е серия от големи модели за генеративен AI, независимо разработени от Meituan. Той е създаден да подобри вътрешната продуктивност на предприятието и да позволи иновативни приложения чрез ефективна изчислителна архитектура и силни мултимодални възможности.",
"minimax.description": "Основана през 2021 г., MiniMax създава универсален AI с мултимодални базови модели, включително текстови модели с трилиони параметри, речеви и визуални модели, както и приложения като Hailuo AI.",
"minimaxcodingplan.description": "MiniMax Token Plan предоставя достъп до модели MiniMax, включително M2.7, за задачи, свързани с програмиране, чрез абонамент с фиксирана такса.",
diff --git a/locales/bg-BG/setting.json b/locales/bg-BG/setting.json
index 351063c0b07..936133be22b 100644
--- a/locales/bg-BG/setting.json
+++ b/locales/bg-BG/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Ръчно попълване",
"tab.manualFill.desc": "Ръчно конфигуриране на персонализирано MCP умение",
"tab.memory": "Памет",
+ "tab.messenger": "Месинджър",
"tab.notification": "Известия",
"tab.profile": "Моят акаунт",
"tab.provider": "Доставчик на AI услуги",
diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.json
index 401504dc393..94494fdae76 100644
--- a/locales/de-DE/chat.json
+++ b/locales/de-DE/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Alle Tool-Ausführungen automatisch genehmigen",
"tool.intervention.mode.manual": "Manuell",
"tool.intervention.mode.manualDesc": "Manuelle Genehmigung für jeden Aufruf erforderlich",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Die neue Identität erscheint nach der Bestätigung.",
- "tool.intervention.onboarding.agentIdentity.description": "Die Bestätigung dieser Änderung aktualisiert den in der Inbox und in dieser Onboarding-Unterhaltung angezeigten Agenten.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Agenten-Avatar",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Onboarding-Bestätigung",
- "tool.intervention.onboarding.agentIdentity.name": "Agentenname",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Inbox-Agent",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Aktueller Onboarding-Agent",
- "tool.intervention.onboarding.agentIdentity.targets": "Gilt für",
"tool.intervention.onboarding.agentIdentity.title": "Aktualisierung der Agentenidentität bestätigen",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Ich werde meinen Avatar aktualisieren",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Ich werde meinen Namen aktualisieren",
"tool.intervention.onboarding.userProfile.applyHint": "Diese Angaben werden nach Genehmigung in Ihrem Profil gespeichert.",
"tool.intervention.onboarding.userProfile.description": "Die Genehmigung dieser Änderung aktualisiert Ihr Onboarding-Profil, damit der Agent zukünftige Antworten anpassen kann.",
"tool.intervention.onboarding.userProfile.eyebrow": "Onboarding-Genehmigung",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Aktualisiert {{time}}",
"workingPanel.resources.viewMode.list": "Listenansicht",
"workingPanel.resources.viewMode.tree": "Baumansicht",
+ "workingPanel.review.baseRef.default": "Standard",
+ "workingPanel.review.baseRef.loading": "Zweige werden geladen…",
+ "workingPanel.review.baseRef.reset": "Auf den Standardzweig zurücksetzen",
+ "workingPanel.review.baseRef.unresolved": "Wählen Sie einen Basiszweig aus",
"workingPanel.review.binary": "Binärdatei — Diff wird nicht angezeigt",
"workingPanel.review.collapseAll": "Alle einklappen",
"workingPanel.review.copied": "Pfad kopiert",
"workingPanel.review.copyPath": "Dateipfad kopieren",
"workingPanel.review.empty": "Keine Änderungen im Arbeitsbaum",
+ "workingPanel.review.empty.branch": "Keine Änderungen im Vergleich zu {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Der Standardzweig des Remote-Repositorys konnte nicht ermittelt werden. Führen Sie `git remote set-head origin --auto` in Ihrem Terminal aus.",
"workingPanel.review.error": "Konnte den Diff dieser Datei nicht laden",
"workingPanel.review.expandAll": "Alle ausklappen",
+ "workingPanel.review.mode.branch": "Zweig",
+ "workingPanel.review.mode.unstaged": "Nicht gestaged",
"workingPanel.review.more": "Weitere Optionen",
"workingPanel.review.refresh": "Aktualisieren",
"workingPanel.review.textDiff.disable": "Inline-Textvergleich deaktivieren",
diff --git a/locales/de-DE/labs.json b/locales/de-DE/labs.json
index 1fbe088f749..1c1a2d13307 100644
--- a/locales/de-DE/labs.json
+++ b/locales/de-DE/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Gruppenchat (Multi-Agenten)",
"features.inputMarkdown.desc": "Markdown in Echtzeit im Eingabebereich rendern (fetter Text, Codeblöcke, Tabellen usw.).",
"features.inputMarkdown.title": "Markdown-Darstellung im Eingabefeld",
+ "features.messenger.desc": "Sprechen Sie mit Ihren Agenten über Telegram (und andere Messenger) über den gemeinsamen LobeHub-Bot. Fügt einen Messenger-Tab in den Einstellungen hinzu, um Ihr Konto zu verknüpfen und auszuwählen, welcher Agent Nachrichten erhält.",
+ "features.messenger.title": "Messenger",
"title": "Labs"
}
diff --git a/locales/de-DE/messenger.json b/locales/de-DE/messenger.json
new file mode 100644
index 00000000000..f7d639da0d5
--- /dev/null
+++ b/locales/de-DE/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Aktiver Agent",
+ "messenger.activeAgentPlaceholder": "Wählen Sie einen Agenten aus",
+ "messenger.detail.addServer": "Server hinzufügen",
+ "messenger.detail.addWorkspace": "Arbeitsbereich hinzufügen",
+ "messenger.detail.connections.connected": "Verbunden",
+ "messenger.detail.connections.empty": "Öffnen Sie den Bot und senden Sie /start, um Ihr Konto zu verknüpfen.",
+ "messenger.detail.connections.linkHint": "Arbeitsbereich installiert. Öffnen Sie Slack und senden Sie dem Bot eine DM, um die Verknüpfung Ihres persönlichen Kontos abzuschließen.",
+ "messenger.detail.connections.pending": "Ausstehend",
+ "messenger.detail.connections.serverLabel": "Server",
+ "messenger.detail.connections.title": "Verbindungen",
+ "messenger.detail.connections.userLabel": "Benutzer",
+ "messenger.detail.connections.workspaceLabel": "Arbeitsbereich",
+ "messenger.detail.disconnect": "Trennen",
+ "messenger.discord.connectModal.description": "Fügen Sie den LobeHub-Bot zu einem Discord-Server hinzu, den Sie verwalten.",
+ "messenger.discord.connectModal.inviteButton": "Zu Discord-Server hinzufügen",
+ "messenger.discord.connectModal.notConfigured": "Discord ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",
+ "messenger.discord.connectModal.title": "Bot zu Ihrem Server hinzufügen",
+ "messenger.discord.connections.disconnectConfirm": "Diesen Server aus Ihrer Audit-Liste entfernen? Der Bot bleibt auf dem Server, bis ein Server-Admin ihn entfernt.",
+ "messenger.discord.connections.disconnectFailed": "Server konnte nicht entfernt werden.",
+ "messenger.discord.connections.disconnectSuccess": "Server entfernt.",
+ "messenger.discord.connections.disconnectTitle": "Server entfernen",
+ "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",
+ "messenger.error.agentNotFound": "Agent nicht gefunden.",
+ "messenger.error.disconnectNotAllowed": "Sie können nur Installationen trennen, die Sie gestartet haben.",
+ "messenger.error.installationNotFound": "Installation nicht gefunden.",
+ "messenger.error.linkRequired": "Öffnen Sie den Bot und senden Sie /start, bevor Sie diese Verbindung ändern.",
+ "messenger.error.pickDefaultAgent": "Wählen Sie einen Standardagenten aus, bevor Sie bestätigen.",
+ "messenger.error.platformNotConfigured": "Diese Messenger-Plattform ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",
+ "messenger.linkCta": "Verbinden",
+ "messenger.linkModal.continueIn": "Setup in {{platform}} fortsetzen",
+ "messenger.linkModal.instructions": "Öffnen Sie den Bot, senden Sie /start und tippen Sie dann auf \"Konto verknüpfen\", um Ihr LobeHub-Konto zu verbinden.",
+ "messenger.linkModal.notConfigured": "Diese Verbindung ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",
+ "messenger.linkModal.openCta": "In {{platform}} öffnen",
+ "messenger.linkModal.scanHint": "Oder scannen Sie mit Ihrem Telefon, um {{platform}} zu öffnen.",
+ "messenger.linkModal.title": "Messenger verbinden",
+ "messenger.list.discord.description": "Chatten Sie mit Ihren LobeHub-Agenten von jedem Discord-Server aus per DM mit dem LobeHub-Bot.",
+ "messenger.list.slack.description": "Chatten Sie mit Ihren LobeHub-Agenten von jedem Slack-Arbeitsbereich aus per DM oder @LobeHub.",
+ "messenger.list.telegram.description": "Chatten Sie mit Ihren LobeHub-Agenten in Telegram und wählen Sie, wer von überall antwortet.",
+ "messenger.noPlatformsConfigured": "Es sind noch keine Plattformen verfügbar. Schauen Sie bald wieder vorbei.",
+ "messenger.setActiveFailed": "Aktivierung als aktiv fehlgeschlagen.",
+ "messenger.setActiveSuccess": "Aktiver Agent aktualisiert.",
+ "messenger.slack.connectModal.continueButton": "In Slack fortfahren",
+ "messenger.slack.connectModal.description": "Sie werden zu Slack weitergeleitet, um die LobeHub-Arbeitsbereichsinstallation zu autorisieren.",
+ "messenger.slack.connectModal.notConfigured": "Slack ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",
+ "messenger.slack.connectModal.title": "Setup in Slack fortsetzen",
+ "messenger.slack.connections.disconnectConfirm": "Den LobeHub-Bot von diesem Slack-Arbeitsbereich trennen? Bestehende Benutzerverknüpfungen werden pausiert, bis Sie erneut installieren.",
+ "messenger.slack.connections.disconnectFailed": "Trennen fehlgeschlagen.",
+ "messenger.slack.connections.disconnectSuccess": "Arbeitsbereich getrennt.",
+ "messenger.slack.connections.disconnectTitle": "Arbeitsbereich trennen",
+ "messenger.slack.installBlocked.dismiss": "Verstanden",
+ "messenger.slack.installBlocked.suggestion": "Senden Sie @LobeHub in Slack eine DM, um Ihr persönliches Konto zu verknüpfen – Sie müssen nicht erneut installieren. Oder bitten Sie den ursprünglichen Installateur, diesen Arbeitsbereich zuerst zu trennen, wenn Sie die Eigentümerschaft übernehmen möchten.",
+ "messenger.slack.installBlocked.title": "Arbeitsbereich bereits verbunden",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" ist bereits mit LobeHub von einem anderen Benutzer verbunden.",
+ "messenger.slack.installBlocked.withoutName": "Dieser Slack-Arbeitsbereich ist bereits mit LobeHub von einem anderen Benutzer verbunden.",
+ "messenger.slack.installResult.failed": "Slack-Installation fehlgeschlagen ({{reason}}). Bitte versuchen Sie es erneut oder kontaktieren Sie den Support.",
+ "messenger.slack.installResult.reasons.accessDenied": "Autorisierung wurde abgebrochen",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack-Autorisierung fehlgeschlagen",
+ "messenger.slack.installResult.reasons.generic": "Ein unbekannter Fehler ist aufgetreten",
+ "messenger.slack.installResult.reasons.invalidState": "Die Installationssitzung ist abgelaufen",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack hat unvollständige App-Informationen zurückgegeben",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack hat unvollständige Installationsparameter zurückgegeben",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack hat keine Arbeitsbereichskennung zurückgegeben",
+ "messenger.slack.installResult.reasons.missingToken": "Slack hat kein Bot-Token zurückgegeben",
+ "messenger.slack.installResult.reasons.persistFailed": "Die Arbeitsbereichsverbindung konnte nicht gespeichert werden",
+ "messenger.slack.installResult.success": "Slack-Arbeitsbereich verbunden.",
+ "messenger.subtitle": "Verbinden Sie Ihr Konto einmal mit dem offiziellen LobeHub-Bot. Wählen Sie, welcher Agent Nachrichten empfängt, und wechseln Sie jederzeit von hier oder vom Bot aus.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Ihr {{platform}}-Konto von LobeHub trennen? Eingehende Nachrichten werden gestoppt, bis Sie erneut /start senden.",
+ "messenger.unlinkCta": "Trennen",
+ "messenger.unlinkFailed": "Trennen fehlgeschlagen.",
+ "messenger.unlinkSuccess": "Getrennt.",
+ "messenger.unlinkTitle": "Konto trennen",
+ "verify.confirm.conflict.description": "Dieses {{platform}}-Konto ist bereits mit dem LobeHub-Konto {{email}} verknüpft. Melden Sie sich bei diesem Konto an, um die Verknüpfung zu verwalten, oder trennen Sie die Verknüpfung dort, bevor Sie es erneut versuchen.",
+ "verify.confirm.conflict.switchAccount": "Mit einem anderen Konto anmelden",
+ "verify.confirm.conflict.title": "Dieses Konto ist bereits verknüpft",
+ "verify.confirm.cta": "Verknüpfung bestätigen",
+ "verify.confirm.defaultAgent": "Standardagent",
+ "verify.confirm.defaultAgentHint": "Ihre Nachrichten werden zuerst hierhin geleitet. Sie können jederzeit über /agents im Bot oder über Einstellungen → Messenger wechseln.",
+ "verify.confirm.defaultAgentPlaceholder": "Wählen Sie einen Agenten aus",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub-Konto",
+ "verify.confirm.fields.platformAccount": "{{platform}}-Konto",
+ "verify.confirm.fields.workspace": "Arbeitsbereich",
+ "verify.confirm.noAgents": "Sie haben noch keine Agenten. Erstellen Sie einen in LobeHub und kehren Sie dann zurück, um die Verknüpfung abzuschließen.",
+ "verify.confirm.title": "Verknüpfung bestätigen",
+ "verify.confirm.workspace": "Arbeitsbereich: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Dieses Konto ist bereits mit einem anderen LobeHub-Konto verknüpft. Melden Sie sich zuerst bei diesem Konto an.",
+ "verify.error.expired": "Dieser Link ist abgelaufen. Bitte kehren Sie zum Bot zurück und senden Sie erneut /start.",
+ "verify.error.generic": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",
+ "verify.error.missingToken": "Ungültiger Link. Öffnen Sie diese Seite über den Bot.",
+ "verify.error.title": "Verknüpfung konnte nicht bestätigt werden",
+ "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.",
+ "verify.success.openBot": "In {{platform}} öffnen",
+ "verify.success.title": "Erfolgreich verknüpft!"
+}
diff --git a/locales/de-DE/models.json b/locales/de-DE/models.json
index ed63af22edb..7b6cf7666c9 100644
--- a/locales/de-DE/models.json
+++ b/locales/de-DE/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Brandneues Videoerzeugungsmodell mit umfassenden Verbesserungen in Körperbewegung, physikalischem Realismus und Befolgung von Anweisungen.",
"MiniMax-M1.description": "Ein neues Inhouse-Argumentationsmodell mit 80K Chain-of-Thought und 1M Eingabe, vergleichbar mit führenden globalen Modellen.",
"MiniMax-M2-Stable.description": "Entwickelt für effizientes Coden und Agenten-Workflows mit höherer Parallelität für den kommerziellen Einsatz.",
- "MiniMax-M2.1-Lightning.description": "Leistungsstarke mehrsprachige Programmierfähigkeiten mit schnellerer und effizienterer Inferenz.",
"MiniMax-M2.1-highspeed.description": "Leistungsstarke mehrsprachige Programmierfähigkeiten, umfassend verbesserte Programmiererfahrung. Schneller und effizienter.",
"MiniMax-M2.1.description": "MiniMax-M2.1 ist das Flaggschiff unter den Open-Source-Großmodellen von MiniMax und konzentriert sich auf die Lösung komplexer Aufgaben aus der realen Welt. Seine zentralen Stärken liegen in der mehrsprachigen Programmierfähigkeit und der Fähigkeit, als Agent komplexe Aufgaben zu bewältigen.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Gleiche Leistung wie M2.5 mit schnellerer Inferenz.",
@@ -320,11 +319,11 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku ist das schnellste und kompakteste Modell von Anthropic, entwickelt für nahezu sofortige Antworten mit schneller, präziser Leistung.",
"claude-3-opus-20240229.description": "Claude 3 Opus ist das leistungsstärkste Modell von Anthropic für hochkomplexe Aufgaben. Es überzeugt in Leistung, Intelligenz, Sprachfluss und Verständnis.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet bietet eine ausgewogene Kombination aus Intelligenz und Geschwindigkeit für Unternehmensanwendungen. Es liefert hohe Nutzbarkeit bei geringeren Kosten und zuverlässiger Skalierbarkeit.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 ist das schnellste und intelligenteste Haiku-Modell von Anthropic mit blitzschneller Geschwindigkeit und erweitertem Denken.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 ist das schnellste und intelligenteste Haiku-Modell von Anthropic, mit blitzschneller Geschwindigkeit und erweitertem Denkvermögen.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 von Anthropic — Next-Gen-Haiku mit verbessertem Reasoning und Vision.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 ist das schnellste und intelligenteste Haiku-Modell von Anthropic, mit blitzschneller Geschwindigkeit und erweiterten Denkfähigkeiten.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking ist eine erweiterte Variante, die ihren Denkprozess offenlegen kann.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 ist das neueste und leistungsfähigste Modell von Anthropic für hochkomplexe Aufgaben und zeichnet sich durch Leistung, Intelligenz, Sprachgewandtheit und Verständnis aus.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 ist das neueste und leistungsfähigste Modell von Anthropic für hochkomplexe Aufgaben und überzeugt durch Leistung, Intelligenz, Sprachgewandtheit und Verständnis.",
"claude-opus-4-1.description": "Claude Opus 4.1 von Anthropic — Premium-Reasoning-Modell mit tiefgehender Analysefähigkeit.",
"claude-opus-4-20250514.description": "Claude Opus 4 ist das leistungsstärkste Modell von Anthropic für hochkomplexe Aufgaben und überzeugt durch Leistung, Intelligenz, Sprachgewandtheit und Verständnis.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 ist das Flaggschiffmodell von Anthropic. Es kombiniert herausragende Intelligenz mit skalierbarer Leistung und ist ideal für komplexe Aufgaben, die höchste Qualität bei Antworten und logischem Denken erfordern.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 ist das intelligenteste Modell von Anthropic für die Entwicklung von Agenten und Programmierung.",
"claude-opus-4.6.description": "Claude Opus 4.6 ist das intelligenteste Modell von Anthropic für die Entwicklung von Agenten und Programmierung.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking kann nahezu sofortige Antworten oder schrittweises Denken mit sichtbarem Prozess erzeugen.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 ist das bisher intelligenteste Modell von Anthropic und bietet nahezu sofortige Antworten oder erweitertes schrittweises Denken mit fein abgestimmter Kontrolle für API-Nutzer.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 kann nahezu sofortige Antworten oder ausführliches, schrittweises Denken mit sichtbarem Prozess liefern.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 ist das bisher intelligenteste Modell von Anthropic.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 von Anthropic — weiterentwickeltes Sonnet mit verbesserter Coding-Leistung.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 von Anthropic — neuestes Sonnet mit überlegener Coding- und Tool-Nutzung.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) ist ein innovatives Modell mit tiefem Sprachverständnis und Interaktionsfähigkeit.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 ist ein Next-Gen-Denkmodell mit stärkerem komplexem Denken und Chain-of-Thought für tiefgreifende Analyseaufgaben.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 ist ein Next-Gen-Modell für logisches Denken mit stärkeren Fähigkeiten für komplexes Denken und Kettenlogik.",
- "deepseek-chat.description": "Kompatibilitätsalias für den nicht-denkenden Modus von DeepSeek V4 Flash. Zur Abschaffung vorgesehen – verwenden Sie stattdessen DeepSeek V4 Flash.",
+ "deepseek-chat.description": "Ein neues Open-Source-Modell, das allgemeine und Programmierfähigkeiten kombiniert. Es bewahrt den allgemeinen Dialog des Chat-Modells und die starken Programmierfähigkeiten des Coder-Modells, mit besserer Präferenzabstimmung. DeepSeek-V2.5 verbessert auch das Schreiben und das Befolgen von Anweisungen.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B ist ein Code-Sprachmodell, trainiert auf 2 B Tokens (87 % Code, 13 % chinesisch/englischer Text). Es bietet ein 16K-Kontextfenster und Fill-in-the-Middle-Aufgaben für projektweite Codevervollständigung und Snippet-Ergänzung.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 ist ein Open-Source-MoE-Code-Modell mit starker Leistung bei Programmieraufgaben, vergleichbar mit GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 ist ein Open-Source-MoE-Code-Modell mit starker Leistung bei Programmieraufgaben, vergleichbar mit GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 Schnellversion mit Echtzeit-Websuche – kombiniert 671B-Fähigkeiten mit schneller Reaktion.",
"deepseek-r1-online.description": "DeepSeek R1 Vollversion mit 671B Parametern und Echtzeit-Websuche – bietet stärkeres Verständnis und bessere Generierung.",
"deepseek-r1.description": "DeepSeek-R1 nutzt Cold-Start-Daten vor dem RL und erreicht vergleichbare Leistungen wie OpenAI-o1 bei Mathematik, Programmierung und logischem Denken.",
- "deepseek-reasoner.description": "Kompatibilitätsalias für den denkenden Modus von DeepSeek V4 Flash. Zur Abschaffung vorgesehen – verwenden Sie stattdessen DeepSeek V4 Flash.",
+ "deepseek-reasoner.description": "Kompatibilitätsalias für den DeepSeek V4 Flash-Denkmodus. Geplant für die Abschaffung — verwenden Sie stattdessen deepseek-v4-flash.",
"deepseek-v2.description": "DeepSeek V2 ist ein effizientes MoE-Modell für kostengünstige Verarbeitung.",
"deepseek-v2:236b.description": "DeepSeek V2 236B ist das codefokussierte Modell von DeepSeek mit starker Codegenerierung.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 ist ein MoE-Modell mit 671B Parametern und herausragenden Stärken in Programmierung, technischer Kompetenz, Kontextverständnis und Langtextverarbeitung.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 ist ein Bildgenerierungsmodell von ByteDance Seed, das Text- und Bildeingaben unterstützt und eine hochgradig kontrollierbare, hochwertige Bildgenerierung ermöglicht. Es erzeugt Bilder aus Texteingaben.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 ist das neueste multimodale Bildmodell von ByteDance, das Text-zu-Bild, Bild-zu-Bild und Batch-Bilderzeugung integriert und dabei Allgemeinwissen und logisches Denken einbezieht. Im Vergleich zur vorherigen Version 4.0 bietet es eine deutlich verbesserte Generierungsqualität, bessere Konsistenz bei der Bearbeitung und Multi-Bild-Fusion. Es ermöglicht eine präzisere Kontrolle über visuelle Details, erzeugt kleine Texte und kleine Gesichter natürlicher und erreicht harmonischere Layouts und Farben, wodurch die Gesamtästhetik verbessert wird.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite ist das neueste Bildgenerierungsmodell von ByteDance. Erstmals integriert es Online-Retrieval-Funktionen, die es ermöglichen, Echtzeit-Webinformationen einzubeziehen und die Aktualität der generierten Bilder zu verbessern. Die Intelligenz des Modells wurde ebenfalls aufgerüstet, um komplexe Anweisungen und visuelle Inhalte präzise zu interpretieren. Darüber hinaus bietet es eine verbesserte globale Wissensabdeckung, Konsistenz bei Referenzen und Generierungsqualität in professionellen Szenarien, um den visuellen Erstellungsbedarf auf Unternehmensebene besser zu erfüllen.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 von ByteDance ist das leistungsstärkste Videogenerierungsmodell und unterstützt multimodale Referenzvideogenerierung, Videobearbeitung, Videoerweiterung, Text-zu-Video und Bild-zu-Video mit synchronisiertem Audio.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast von ByteDance bietet dieselben Funktionen wie Seedance 2.0 mit schnelleren Generierungsgeschwindigkeiten zu einem wettbewerbsfähigeren Preis.",
"emohaa.description": "Emohaa ist ein Modell für psychische Gesundheit mit professionellen Beratungsfähigkeiten, das Nutzern hilft, emotionale Probleme zu verstehen.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B ist ein quelloffenes, leichtgewichtiges Modell für lokale und individuell angepasste Bereitstellungen.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview ist ein Vorschau-Modell mit 8K Kontextlänge zur Bewertung von ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K ist ein schnelles Denkmodell mit 32K Kontext für komplexe Schlussfolgerungen und mehrstufige Gespräche.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview ist ein Vorschau-Modell mit Denkfähigkeit zur Bewertung und zum Testen.",
"ernie-x1.1.description": "ERNIE X1.1 ist ein Vorschau-Denkmodell für Evaluierung und Tests.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, entwickelt vom ByteDance Seed-Team, unterstützt die Bearbeitung und Komposition mehrerer Bilder. Es bietet verbesserte Konsistenz von Motiven, präzise Befolgung von Anweisungen, räumliches Logikverständnis, ästhetischen Ausdruck, Poster-Layout und Logo-Design mit hochpräziser Text-Bild-Darstellung.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, entwickelt von ByteDance Seed, unterstützt Text- und Bildeingaben für hochkontrollierbare, qualitativ hochwertige Bildgenerierung aus Eingabeaufforderungen.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 ist ein Bildgenerierungsmodell von ByteDance Seed, das Text- und Bildeingaben unterstützt und hochkontrollierbare, qualitativ hochwertige Bildgenerierung ermöglicht. Es erstellt Bilder aus Texteingaben.",
"fal-ai/flux-kontext/dev.description": "FLUX.1-Modell mit Fokus auf Bildbearbeitung, unterstützt Text- und Bildeingaben.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] akzeptiert Texte und Referenzbilder als Eingabe und ermöglicht gezielte lokale Bearbeitungen sowie komplexe globale Szenentransformationen.",
"fal-ai/flux/krea.description": "Flux Krea [dev] ist ein Bildgenerierungsmodell mit ästhetischer Ausrichtung auf realistischere, natürliche Bilder.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Ein leistungsstarkes natives multimodales Bildgenerierungsmodell.",
"fal-ai/imagen4/preview.description": "Hochwertiges Bildgenerierungsmodell von Google.",
"fal-ai/nano-banana.description": "Nano Banana ist das neueste, schnellste und effizienteste native multimodale Modell von Google. Es ermöglicht Bildgenerierung und -bearbeitung im Dialog.",
- "fal-ai/qwen-image-edit.description": "Ein professionelles Bildbearbeitungsmodell des Qwen-Teams, das semantische und optische Bearbeitungen, präzise chinesische/englische Textbearbeitung, Stilübertragungen, Drehungen und mehr unterstützt.",
- "fal-ai/qwen-image.description": "Ein leistungsstarkes Bildgenerierungsmodell des Qwen-Teams mit starker chinesischer Textrendering-Fähigkeit und vielfältigen visuellen Stilen.",
+ "fal-ai/qwen-image-edit.description": "Ein professionelles Bildbearbeitungsmodell des Qwen-Teams, das semantische und optische Bearbeitungen unterstützt, präzise chinesische und englische Texte bearbeitet und hochwertige Bearbeitungen wie Stilübertragungen und Objektrotation ermöglicht.",
+ "fal-ai/qwen-image.description": "Ein leistungsstarkes Bildgenerierungsmodell des Qwen-Teams mit beeindruckender chinesischer Textrendering-Fähigkeit und vielfältigen visuellen Stilen.",
"flux-1-schnell.description": "Ein Text-zu-Bild-Modell mit 12 Milliarden Parametern von Black Forest Labs, das latente adversariale Diffusionsdistillation nutzt, um hochwertige Bilder in 1–4 Schritten zu erzeugen. Es konkurriert mit geschlossenen Alternativen und ist unter Apache-2.0 für persönliche, Forschungs- und kommerzielle Nutzung verfügbar.",
"flux-dev.description": "Open-Source‑Bildgenerierungsmodell für Forschung und Entwicklung, effizient optimiert für nichtkommerzielle Innovationsforschung.",
"flux-kontext-max.description": "Modernste kontextuelle Bildgenerierung und -bearbeitung, kombiniert Text und Bilder für präzise, kohärente Ergebnisse.",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) ist Googles Bildgenerierungsmodell und unterstützt auch multimodale Chats.",
"gemini-3-pro-preview.description": "Gemini 3 Pro ist Googles leistungsstärkstes Agenten- und Vibe-Coding-Modell. Es bietet reichhaltigere visuelle Inhalte und tiefere Interaktionen auf Basis modernster logischer Fähigkeiten.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) ist Googles schnellstes natives Bildgenerierungsmodell mit Denkunterstützung, konversationaler Bildgenerierung und -bearbeitung.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) liefert Pro-Bildqualität mit Flash-Geschwindigkeit und unterstützt multimodale Chats.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) ist Googles schnellstes natives Bildgenerierungsmodell mit Denkunterstützung, konversationaler Bildgenerierung und -bearbeitung.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview ist Googles kosteneffizientestes multimodales Modell, optimiert für hochvolumige agentische Aufgaben, Übersetzung und Datenverarbeitung.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview verbessert Gemini 3 Pro mit erweiterten Fähigkeiten für logisches Denken und unterstützt mittleres Denklevel.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro von Google — Premium-Multimodalmodell mit 1M Kontextfenster.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Wir freuen uns, Grok 4 Fast vorzustellen – unser neuester Fortschritt bei kosteneffizienten Denkmodellen.",
"grok-4.20-0309-non-reasoning.description": "Eine Non-Reasoning-Variante für einfache Anwendungsfälle.",
"grok-4.20-0309-reasoning.description": "Intelligentes, extrem schnelles Modell, das vor der Antwort aktiv denkt.",
- "grok-4.20-beta-0309-non-reasoning.description": "Eine nicht-denkende Variante für einfache Anwendungsfälle",
- "grok-4.20-beta-0309-reasoning.description": "Intelligentes, blitzschnelles Modell, das vor der Antwort überlegt",
"grok-4.20-multi-agent-0309.description": "Ein Team aus 4 oder 16 Agenten, hervorragend für Rechercheaufgaben. Unterstützt derzeit keine clientseitigen Tools. Unterstützt ausschließlich serverseitige xAI-Tools (z. B. X Search, Web Search Tools) und Remote-MCP-Tools.",
"grok-4.3.description": "Das wahrheitssuchendste große Sprachmodell der Welt",
- "grok-4.description": "Unser neuestes und stärkstes Flaggschiffmodell, das in NLP, Mathematik und logischem Denken herausragt – ein idealer Allrounder.",
+ "grok-4.description": "Das neueste Grok-Flaggschiff mit unübertroffener Leistung in Sprache, Mathematik und Logik — ein wahrer Alleskönner. Derzeit verweist es auf grok-4-0709; aufgrund begrenzter Ressourcen ist der Preis vorübergehend 10 % höher als der offizielle Preis und wird voraussichtlich später wieder auf den offiziellen Preis zurückkehren.",
"grok-code-fast-1.description": "Wir freuen uns, grok-code-fast-1 vorzustellen – ein schnelles und kosteneffizientes Denkmodell, das sich besonders für agentenbasiertes Programmieren eignet.",
"grok-imagine-image-pro.description": "Erstellen Sie Bilder aus Textvorgaben, bearbeiten Sie bestehende Bilder mit natürlicher Sprache oder verfeinern Sie Bilder iterativ durch mehrstufige Gespräche.",
"grok-imagine-image.description": "Erstellen Sie Bilder aus Textvorgaben, bearbeiten Sie bestehende Bilder mit natürlicher Sprache oder verfeinern Sie Bilder iterativ durch mehrstufige Gespräche.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ ist ein Schlussfolgerungsmodell aus der Qwen-Familie. Im Vergleich zu standardmäßig instruktionstunierten Modellen bietet es überlegene Denk- und Schlussfolgerungsfähigkeiten, die die Leistung bei nachgelagerten Aufgaben deutlich verbessern – insbesondere bei schwierigen Problemen. QwQ-32B ist ein mittelgroßes Modell, das mit führenden Schlussfolgerungsmodellen wie DeepSeek-R1 und o1-mini mithalten kann.",
"qwq_32b.description": "Mittelgroßes Schlussfolgerungsmodell aus der Qwen-Familie. Im Vergleich zu standardmäßig instruktionstunierten Modellen steigern QwQs Denk- und Schlussfolgerungsfähigkeiten die Leistung bei nachgelagerten Aufgaben deutlich – insbesondere bei schwierigen Problemen.",
"r1-1776.description": "R1-1776 ist eine nachtrainierte Variante von DeepSeek R1, die darauf ausgelegt ist, unzensierte, objektive und faktenbasierte Informationen bereitzustellen.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro von ByteDance unterstützt Text-zu-Video, Bild-zu-Video (erstes Bild, erstes+letztes Bild) und Audioerzeugung synchronisiert mit visuellen Inhalten.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite von BytePlus bietet webabruffähige Generierung für Echtzeitinformationen, verbesserte Interpretation komplexer Eingabeaufforderungen und verbesserte Konsistenz von Referenzen für professionelle visuelle Kreationen.",
"solar-mini-ja.description": "Solar Mini (Ja) erweitert Solar Mini mit einem Fokus auf Japanisch und behält dabei eine effiziente und starke Leistung in Englisch und Koreanisch bei.",
"solar-mini.description": "Solar Mini ist ein kompaktes LLM, das GPT-3.5 übertrifft. Es bietet starke mehrsprachige Fähigkeiten in Englisch und Koreanisch und ist eine effiziente Lösung mit kleinem Ressourcenbedarf.",
"solar-pro.description": "Solar Pro ist ein hochintelligentes LLM von Upstage, das auf Befolgen von Anweisungen auf einer einzelnen GPU ausgelegt ist und IFEval-Werte über 80 erreicht. Derzeit wird Englisch unterstützt; die vollständige Veröffentlichung mit erweitertem Sprachsupport und längeren Kontexten war für November 2024 geplant.",
diff --git a/locales/de-DE/providers.json b/locales/de-DE/providers.json
index 434040880b2..0741192bc7c 100644
--- a/locales/de-DE/providers.json
+++ b/locales/de-DE/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Jina AI wurde 2020 gegründet und ist ein führendes Unternehmen im Bereich Such-KI. Der Such-Stack umfasst Vektormodelle, Reranker und kleine Sprachmodelle für zuverlässige, hochwertige generative und multimodale Suchanwendungen.",
"kimicodingplan.description": "Kimi Code von Moonshot AI bietet Zugriff auf Kimi-Modelle, darunter K2.5, für Coding-Aufgaben.",
"lmstudio.description": "LM Studio ist eine Desktop-App zur Entwicklung und zum Experimentieren mit LLMs auf dem eigenen Computer.",
- "lobehub.description": "LobeHub Cloud verwendet offizielle APIs, um auf KI-Modelle zuzugreifen, und misst die Nutzung mit Credits, die an Modell-Token gebunden sind.",
"longcat.description": "LongCat ist eine Reihe von generativen KI-Großmodellen, die unabhängig von Meituan entwickelt wurden. Sie sind darauf ausgelegt, die Produktivität innerhalb des Unternehmens zu steigern und innovative Anwendungen durch eine effiziente Rechenarchitektur und starke multimodale Fähigkeiten zu ermöglichen.",
"minimax.description": "MiniMax wurde 2021 gegründet und entwickelt allgemeine KI mit multimodalen Foundation-Modellen, darunter Textmodelle mit Billionen Parametern, Sprach- und Bildmodelle sowie Apps wie Hailuo AI.",
"minimaxcodingplan.description": "Der MiniMax Token Plan bietet Zugriff auf MiniMax-Modelle, darunter M2.7, für Coding-Aufgaben im Rahmen eines Festpreis-Abonnements.",
diff --git a/locales/de-DE/setting.json b/locales/de-DE/setting.json
index b678fec4d27..2a18180d062 100644
--- a/locales/de-DE/setting.json
+++ b/locales/de-DE/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Manuell ausfüllen",
"tab.manualFill.desc": "Konfigurieren Sie einen benutzerdefinierten MCP-Skill manuell",
"tab.memory": "Speicher",
+ "tab.messenger": "Nachrichten",
"tab.notification": "Benachrichtigungen",
"tab.profile": "Mein Konto",
"tab.provider": "KI-Dienstanbieter",
diff --git a/locales/en-US/labs.json b/locales/en-US/labs.json
index 38f6acad4bc..0dd20df5d59 100644
--- a/locales/en-US/labs.json
+++ b/locales/en-US/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Group Chat (Multi-Agent)",
"features.inputMarkdown.desc": "Render Markdown in the input area in real time (bold text, code blocks, tables, etc.).",
"features.inputMarkdown.title": "Input Markdown Rendering",
+ "features.messenger.desc": "Talk to your agents from Telegram (and other messengers) via the shared LobeHub bot. Adds a Messenger tab in Settings for binding your account and choosing which agent receives messages.",
+ "features.messenger.title": "Messenger",
"title": "Labs"
}
diff --git a/locales/en-US/messenger.json b/locales/en-US/messenger.json
new file mode 100644
index 00000000000..985d5102105
--- /dev/null
+++ b/locales/en-US/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Active agent",
+ "messenger.activeAgentPlaceholder": "Select an agent",
+ "messenger.detail.addServer": "Add server",
+ "messenger.detail.addWorkspace": "Add workspace",
+ "messenger.detail.connections.connected": "Connected",
+ "messenger.detail.connections.empty": "Open the bot and send /start to link your account.",
+ "messenger.detail.connections.linkHint": "Workspace installed. Open Slack and DM the bot to finish linking your personal account.",
+ "messenger.detail.connections.pending": "Pending",
+ "messenger.detail.connections.serverLabel": "server",
+ "messenger.detail.connections.title": "Connections",
+ "messenger.detail.connections.userLabel": "user",
+ "messenger.detail.connections.workspaceLabel": "workspace",
+ "messenger.detail.disconnect": "Disconnect",
+ "messenger.discord.connectModal.description": "Add the LobeHub bot to a Discord server you manage.",
+ "messenger.discord.connectModal.inviteButton": "Add to Discord server",
+ "messenger.discord.connectModal.notConfigured": "Discord isn't available right now. Please try again later.",
+ "messenger.discord.connectModal.title": "Add bot to your server",
+ "messenger.discord.connections.disconnectConfirm": "Remove this server from your audit list? The bot will stay in the server until a server admin kicks it.",
+ "messenger.discord.connections.disconnectFailed": "Failed to remove server.",
+ "messenger.discord.connections.disconnectSuccess": "Server removed.",
+ "messenger.discord.connections.disconnectTitle": "Remove server",
+ "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",
+ "messenger.error.agentNotFound": "Agent not found.",
+ "messenger.error.disconnectNotAllowed": "You can only disconnect installations you started.",
+ "messenger.error.installationNotFound": "Installation not found.",
+ "messenger.error.linkRequired": "Open the bot and send /start before changing this connection.",
+ "messenger.error.pickDefaultAgent": "Select a default agent before confirming.",
+ "messenger.error.platformNotConfigured": "This messenger platform isn't available right now. Please try again later.",
+ "messenger.linkCta": "Connect",
+ "messenger.linkModal.continueIn": "Continue setup in {{platform}}",
+ "messenger.linkModal.instructions": "Open the bot, send /start, then tap \"Link Account\" to connect your LobeHub account.",
+ "messenger.linkModal.notConfigured": "This connection isn't available right now. Please try again later.",
+ "messenger.linkModal.openCta": "Open in {{platform}}",
+ "messenger.linkModal.scanHint": "Or scan with your phone to open {{platform}}.",
+ "messenger.linkModal.title": "Connect Messenger",
+ "messenger.list.discord.description": "Chat with your LobeHub agents from any Discord server via DM with the LobeHub bot.",
+ "messenger.list.slack.description": "Chat with your LobeHub agents from any Slack workspace via DM or @LobeHub.",
+ "messenger.list.telegram.description": "Chat with your LobeHub agents in Telegram and pick which one answers from anywhere.",
+ "messenger.noPlatformsConfigured": "No platforms are available yet. Check back soon.",
+ "messenger.setActiveFailed": "Failed to set as active.",
+ "messenger.setActiveSuccess": "Active agent updated.",
+ "messenger.slack.connectModal.continueButton": "Continue in Slack",
+ "messenger.slack.connectModal.description": "You will be redirected to Slack to authorize the LobeHub workspace install.",
+ "messenger.slack.connectModal.notConfigured": "Slack isn't available right now. Please try again later.",
+ "messenger.slack.connectModal.title": "Continue setup in Slack",
+ "messenger.slack.connections.disconnectConfirm": "Disconnect the LobeHub bot from this Slack workspace? Existing user links will pause until you re-install.",
+ "messenger.slack.connections.disconnectFailed": "Failed to disconnect.",
+ "messenger.slack.connections.disconnectSuccess": "Workspace disconnected.",
+ "messenger.slack.connections.disconnectTitle": "Disconnect workspace",
+ "messenger.slack.installBlocked.dismiss": "Got it",
+ "messenger.slack.installBlocked.suggestion": "DM @LobeHub in Slack to link your personal account — you don't need to install again. Or ask the original installer to disconnect this workspace first if you want to take over ownership.",
+ "messenger.slack.installBlocked.title": "Workspace already connected",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" is already connected to LobeHub by another user.",
+ "messenger.slack.installBlocked.withoutName": "This Slack workspace is already connected to LobeHub by another user.",
+ "messenger.slack.installResult.failed": "Slack install failed ({{reason}}). Please try again or contact support.",
+ "messenger.slack.installResult.reasons.accessDenied": "authorization was cancelled",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack authorization failed",
+ "messenger.slack.installResult.reasons.generic": "an unknown error occurred",
+ "messenger.slack.installResult.reasons.invalidState": "the install session expired",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack returned incomplete app information",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack returned incomplete install parameters",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack did not return a workspace identifier",
+ "messenger.slack.installResult.reasons.missingToken": "Slack did not return a bot token",
+ "messenger.slack.installResult.reasons.persistFailed": "the workspace connection could not be saved",
+ "messenger.slack.installResult.success": "Slack workspace connected.",
+ "messenger.subtitle": "Connect your account to the official LobeHub bot once. Pick which agent receives messages, switch any time from here or from the bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Disconnect your {{platform}} account from LobeHub? Inbound messages will stop until you /start again.",
+ "messenger.unlinkCta": "Disconnect",
+ "messenger.unlinkFailed": "Failed to disconnect.",
+ "messenger.unlinkSuccess": "Disconnected.",
+ "messenger.unlinkTitle": "Disconnect account",
+ "verify.confirm.conflict.description": "This {{platform}} account is already linked to LobeHub account {{email}}. Sign in to that account to manage the link, or unlink there before retrying.",
+ "verify.confirm.conflict.switchAccount": "Sign in with another account",
+ "verify.confirm.conflict.title": "This account is already linked",
+ "verify.confirm.cta": "Confirm linking",
+ "verify.confirm.defaultAgent": "Default agent",
+ "verify.confirm.defaultAgentHint": "Your messages will be routed here first. You can switch any time via /agents in the bot or from Settings → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Select an agent",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub account",
+ "verify.confirm.fields.platformAccount": "{{platform}} account",
+ "verify.confirm.fields.workspace": "Workspace",
+ "verify.confirm.noAgents": "You don't have any agents yet. Create one in LobeHub, then come back to finish linking.",
+ "verify.confirm.title": "Confirm linking",
+ "verify.confirm.workspace": "Workspace: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "This account is already linked to a different LobeHub account. Sign in to that account first.",
+ "verify.error.expired": "This link has expired. Please return to the bot and send /start again.",
+ "verify.error.generic": "Something went wrong. Please try again.",
+ "verify.error.missingToken": "Invalid link. Open this page from the bot.",
+ "verify.error.title": "Unable to confirm link",
+ "verify.labRequired.description": "Messenger is currently a Labs feature. Enable it in Settings → Advanced → Labs and reload this page.",
+ "verify.labRequired.openSettings": "Open Labs settings",
+ "verify.labRequired.title": "Enable Messenger to continue",
+ "verify.signInCta": "Sign in to continue",
+ "verify.signInRequired": "Please sign in to LobeHub to confirm the link.",
+ "verify.success.description": "Your account is now connected to {{platform}}. Open {{platform}} and send your first message.",
+ "verify.success.openBot": "Open in {{platform}}",
+ "verify.success.title": "Linked successfully!"
+}
diff --git a/locales/en-US/models.json b/locales/en-US/models.json
index bbf27d557f2..43f63ddd007 100644
--- a/locales/en-US/models.json
+++ b/locales/en-US/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Brand-new video generation model with comprehensive upgrades in body motion, physical realism, and instruction following.",
"MiniMax-M1.description": "A new in-house reasoning model with 80K chain-of-thought and 1M input, delivering performance comparable to top global models.",
"MiniMax-M2-Stable.description": "Built for efficient coding and agent workflows, with higher concurrency for commercial use.",
- "MiniMax-M2.1-Lightning.description": "Powerful multilingual programming capabilities with faster and more efficient inference.",
"MiniMax-M2.1-highspeed.description": "Powerful multilingual programming capabilities, comprehensively upgraded programming experience. Faster and more efficient.",
"MiniMax-M2.1.description": "MiniMax-M2.1 is a flagship open-source large model from MiniMax, focusing on solving complex real-world tasks. Its core strengths are multi-language programming capabilities and the ability to solve complex tasks as an Agent.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Same performance as M2.5 with faster inference.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku is Anthropic’s fastest and most compact model, designed for near-instant responses with fast, accurate performance.",
"claude-3-opus-20240229.description": "Claude 3 Opus is Anthropic’s most powerful model for highly complex tasks, excelling in performance, intelligence, fluency, and comprehension.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet balances intelligence and speed for enterprise workloads, delivering high utility at lower cost and reliable large-scale deployment.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 is Anthropic's fastest and most intelligent Haiku model, with lightning speed and extended thinking.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 is Anthropic’s fastest and smartest Haiku model, with lightning speed and extended reasoning.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 by Anthropic — next-gen Haiku with enhanced reasoning and vision.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 is Anthropic’s fastest and smartest Haiku model, with lightning speed and extended reasoning.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking is an advanced variant that can reveal its reasoning process.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 is Anthropic's latest and most capable model for highly complex tasks, excelling in performance, intelligence, fluency, and understanding.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 is Anthropic’s latest and most capable model for highly complex tasks, excelling in performance, intelligence, fluency, and understanding.",
"claude-opus-4-1.description": "Claude Opus 4.1 by Anthropic — premium reasoning model with deep analysis capabilities.",
- "claude-opus-4-20250514.description": "Claude Opus 4 is Anthropic's most powerful model for highly complex tasks, excelling in performance, intelligence, fluency, and understanding.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 is Anthropic’s most powerful model for highly complex tasks, excelling in performance, intelligence, fluency, and comprehension.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 is Anthropic’s flagship model, combining outstanding intelligence with scalable performance, ideal for complex tasks requiring the highest-quality responses and reasoning.",
"claude-opus-4-5.description": "Claude Opus 4.5 by Anthropic — flagship model with top-tier reasoning and coding.",
"claude-opus-4-6.description": "Claude Opus 4.6 by Anthropic — 1M context window flagship with advanced reasoning.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 is Anthropic’s most intelligent model for building agents and coding.",
"claude-opus-4.6.description": "Claude Opus 4.6 is Anthropic’s most intelligent model for building agents and coding.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking can produce near-instant responses or extended step-by-step thinking with visible process.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 is Anthropic's most intelligent model to date, offering near-instant responses or extended step-by-step thinking with fine-grained control for API users.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 is Anthropic's most intelligent model to date.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 can produce near-instant responses or extended step-by-step thinking with visible process.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 is Anthropic’s most intelligent model to date.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 by Anthropic — improved Sonnet with enhanced coding performance.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 by Anthropic — latest Sonnet with superior coding and tool use.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 is Anthropic’s most intelligent model to date.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) is an innovative model offering deep language understanding and interaction.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 is a next-gen reasoning model with stronger complex reasoning and chain-of-thought for deep analysis tasks.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 is a next-gen reasoning model with stronger complex reasoning and chain-of-thought capabilities.",
- "deepseek-chat.description": "Compatibility alias for DeepSeek V4 Flash non-thinking mode. Slated for deprecation — use DeepSeek V4 Flash instead.",
+ "deepseek-chat.description": "A new open-source model combining general and code abilities. It preserves the chat model’s general dialogue and the coder model’s strong coding, with better preference alignment. DeepSeek-V2.5 also improves writing and instruction following.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B is a code language model trained on 2T tokens (87% code, 13% Chinese/English text). It introduces a 16K context window and fill-in-the-middle tasks, providing project-level code completion and snippet infilling.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 is an open-source MoE code model that performs strongly on coding tasks, comparable to GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 is an open-source MoE code model that performs strongly on coding tasks, comparable to GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 fast full version with real-time web search, combining 671B-scale capability and faster response.",
"deepseek-r1-online.description": "DeepSeek R1 full version with 671B parameters and real-time web search, offering stronger understanding and generation.",
"deepseek-r1.description": "DeepSeek-R1 uses cold-start data before RL and performs comparably to OpenAI-o1 on math, coding, and reasoning.",
- "deepseek-reasoner.description": "Compatibility alias for DeepSeek V4 Flash thinking mode. Slated for deprecation — use DeepSeek V4 Flash instead.",
+ "deepseek-reasoner.description": "Compatibility alias for DeepSeek V4 Flash thinking mode. Slated for deprecation — use deepseek-v4-flash instead.",
"deepseek-v2.description": "DeepSeek V2 is an efficient MoE model for cost-effective processing.",
"deepseek-v2:236b.description": "DeepSeek V2 236B is DeepSeek’s code-focused model with strong code generation.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 is a 671B-parameter MoE model with standout strengths in programming and technical capability, context understanding, and long-text handling.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 is an image generation model from ByteDance Seed, supporting text and image inputs with highly controllable, high-quality image generation. It generates images from text prompts.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 is ByteDance’s latest multimodal image model, integrating text-to-image, image-to-image, and batch image generation capabilities, while incorporating commonsense and reasoning abilities. Compared to the previous 4.0 version, it delivers significantly improved generation quality, with better editing consistency and multi-image fusion. It offers more precise control over visual details, producing small text and small faces more naturally, and achieves more harmonious layout and color, enhancing overall aesthetics.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite is ByteDance’s latest image-generation model. For the first time, it integrates online retrieval capabilities, allowing it to incorporate real-time web information and enhance the timeliness of generated images. The model’s intelligence has also been upgraded, enabling precise interpretation of complex instructions and visual content. Additionally, it offers improved global knowledge coverage, reference consistency, and generation quality in professional scenarios, better meeting enterprise-level visual creation needs.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 by ByteDance is the most powerful video generation model, supporting multimodal reference video generation, video editing, video extension, text-to-video, and image-to-video with synchronized audio.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast by ByteDance offers the same capabilities as Seedance 2.0 with faster generation speeds at a more competitive price.",
"emohaa.description": "Emohaa is a mental health model with professional counseling abilities to help users understand emotional issues.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B is an open-source lightweight model for local and customized deployment.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview is an 8K context preview model for evaluating ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K is a fast thinking model with 32K context for complex reasoning and multi-turn chat.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview is a thinking-model preview for evaluation and testing.",
"ernie-x1.1.description": "ERNIE X1.1 is a thinking-model preview for evaluation and testing.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, built by ByteDance Seed team, supports multi-image editing and composition. Features enhanced subject consistency, precise instruction following, spatial logic understanding, aesthetic expression, poster layout and logo design with high-precision text-image rendering.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, built by ByteDance Seed, supports text and image inputs for highly controllable, high-quality image generation from prompts.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 is an image generation model from ByteDance Seed, supporting text and image inputs with highly controllable, high-quality image generation. It generates images from text prompts.",
"fal-ai/flux-kontext/dev.description": "FLUX.1 model focused on image editing, supporting text and image inputs.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] accepts text and reference images as input, enabling targeted local edits and complex global scene transformations.",
"fal-ai/flux/krea.description": "Flux Krea [dev] is an image generation model with an aesthetic bias toward more realistic, natural images.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "A powerful native multimodal image generation model.",
"fal-ai/imagen4/preview.description": "High-quality image generation model from Google.",
"fal-ai/nano-banana.description": "Nano Banana is Google’s newest, fastest, and most efficient native multimodal model, enabling image generation and editing through conversation.",
- "fal-ai/qwen-image-edit.description": "A professional image editing model from the Qwen team, supporting semantic and appearance edits, precise Chinese/English text editing, style transfer, rotation, and more.",
- "fal-ai/qwen-image.description": "A powerful image generation model from the Qwen team with strong Chinese text rendering and diverse visual styles.",
+ "fal-ai/qwen-image-edit.description": "A professional image editing model from the Qwen team that supports semantic and appearance edits, precisely edits Chinese and English text, and enables high-quality edits such as style transfer and object rotation.",
+ "fal-ai/qwen-image.description": "A powerful image generation model from the Qwen team with impressive Chinese text rendering and diverse visual styles.",
"flux-1-schnell.description": "A 12B-parameter text-to-image model from Black Forest Labs using latent adversarial diffusion distillation to generate high-quality images in 1-4 steps. It rivals closed alternatives and is released under Apache-2.0 for personal, research, and commercial use.",
"flux-dev.description": "Open-source R&D image generation model, efficiently optimized for non-commercial innovation research.",
"flux-kontext-max.description": "State-of-the-art contextual image generation and editing, combining text and images for precise, coherent results.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash is the smartest model built for speed, combining cutting-edge intelligence with excellent search grounding.",
"gemini-3-flash.description": "Gemini 3 Flash by Google — ultra-fast model with multimodal input support.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) is Google's image generation model that also supports multimodal dialogue.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) is Google's image generation model and also supports multimodal chat.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) is Google’s image generation model and also supports multimodal chat.",
"gemini-3-pro-preview.description": "Gemini 3 Pro is Google’s most powerful agent and vibe-coding model, delivering richer visuals and deeper interaction on top of state-of-the-art reasoning.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) is Google's fastest native image generation model with thinking support, conversational image generation and editing.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) delivers Pro-level image quality at Flash speed with multimodal chat support.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) is Google's fastest native image generation model with thinking support, conversational image generation and editing.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview is Google's most cost-efficient multimodal model, optimized for high-volume agentic tasks, translation, and data processing.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview improves on Gemini 3 Pro with enhanced reasoning capabilities and adds medium thinking level support.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro by Google — premium multimodal model with 1M context window.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "We’re excited to release Grok 4 Fast, our latest progress in cost-effective reasoning models.",
"grok-4.20-0309-non-reasoning.description": "A non-reasoning variant for simple use cases",
"grok-4.20-0309-reasoning.description": "Intelligent, blazing-fast model that reasons before responding",
- "grok-4.20-beta-0309-non-reasoning.description": "A non-reasoning variant for simple use cases",
- "grok-4.20-beta-0309-reasoning.description": "Intelligent, blazing-fast model that reasons before responding",
"grok-4.20-multi-agent-0309.description": "A team of 4 or 16 agents, Excels at research use cases, Does not currently support client-side tools. Only supports xAI server side tools (eg X Search, Web Search tools) and remote MCP tools.",
"grok-4.3.description": "The most truth-seeking large language model in the world",
- "grok-4.description": "Our newest and strongest flagship model, excelling in NLP, math, and reasoning—an ideal all-rounder.",
+ "grok-4.description": "Latest Grok flagship with unmatched performance in language, math, and reasoning — a true all-rounder. Currently points to grok-4-0709; due to limited resources it is temporarily 10% higher than official pricing and is expected to return to official price later.",
"grok-code-fast-1.description": "We’re excited to launch grok-code-fast-1, a fast and cost-effective reasoning model that excels at agentic coding.",
"grok-imagine-image-pro.description": "Generate images from text prompts, edit existing images with natural language, or iteratively refine images through multi-turn conversations.",
"grok-imagine-image.description": "Generate images from text prompts, edit existing images with natural language, or iteratively refine images through multi-turn conversations.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ is a reasoning model in the Qwen family. Compared with standard instruction-tuned models, it brings thinking and reasoning abilities that significantly improve downstream performance, especially on hard problems. QwQ-32B is a mid-sized reasoning model that competes well with top reasoning models like DeepSeek-R1 and o1-mini.",
"qwq_32b.description": "Mid-sized reasoning model in the Qwen family. Compared with standard instruction-tuned models, QwQ’s thinking and reasoning abilities significantly boost downstream performance, especially on hard problems.",
"r1-1776.description": "R1-1776 is a post-trained variant of DeepSeek R1 designed to provide uncensored, unbiased factual information.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro by ByteDance supports text-to-video, image-to-video (first frame, first+last frame), and audio generation synchronized with visuals.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite by BytePlus features web-retrieval-augmented generation for real-time information, enhanced complex prompt interpretation, and improved reference consistency for professional visual creation.",
"solar-mini-ja.description": "Solar Mini (Ja) extends Solar Mini with a focus on Japanese while maintaining efficient, strong performance in English and Korean.",
"solar-mini.description": "Solar Mini is a compact LLM that outperforms GPT-3.5, with strong multilingual capability supporting English and Korean, offering an efficient small-footprint solution.",
"solar-pro.description": "Solar Pro is a high-intelligence LLM from Upstage, focused on instruction following on a single GPU, with IFEval scores above 80. It currently supports English; the full release was planned for November 2024 with expanded language support and longer context.",
diff --git a/locales/en-US/providers.json b/locales/en-US/providers.json
index ece32d67261..cdbf8540114 100644
--- a/locales/en-US/providers.json
+++ b/locales/en-US/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Founded in 2020, Jina AI is a leading search AI company. Its search stack includes vector models, rerankers, and small language models to build reliable, high-quality generative and multimodal search apps.",
"kimicodingplan.description": "Kimi Code from Moonshot AI provides access to Kimi models including K2.5 for coding tasks.",
"lmstudio.description": "LM Studio is a desktop app for developing and experimenting with LLMs on your computer.",
- "lobehub.description": "LobeHub Cloud uses official APIs to access AI models and measures usage with Credits tied to model tokens.",
"longcat.description": "LongCat is a series of generative AI large models independently developed by Meituan. It is designed to enhance internal enterprise productivity and enable innovative applications through an efficient computational architecture and strong multimodal capabilities.",
"minimax.description": "Founded in 2021, MiniMax builds general-purpose AI with multimodal foundation models, including trillion-parameter MoE text models, speech models, and vision models, along with apps like Hailuo AI.",
"minimaxcodingplan.description": "MiniMax Token Plan provides access to MiniMax models including M2.7 for coding tasks via a fixed-fee subscription.",
diff --git a/locales/en-US/setting.json b/locales/en-US/setting.json
index 2697f3e230f..ee941d4a150 100644
--- a/locales/en-US/setting.json
+++ b/locales/en-US/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Manually Fill In",
"tab.manualFill.desc": "Configure a custom MCP skill manually",
"tab.memory": "Memory",
+ "tab.messenger": "Messenger",
"tab.notification": "Notifications",
"tab.profile": "My Account",
"tab.provider": "Provider",
diff --git a/locales/es-ES/chat.json b/locales/es-ES/chat.json
index 2c6dda25e91..e76dd249e3c 100644
--- a/locales/es-ES/chat.json
+++ b/locales/es-ES/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Aprobar automáticamente todas las ejecuciones de herramientas",
"tool.intervention.mode.manual": "Manual",
"tool.intervention.mode.manualDesc": "Requiere aprobación manual para cada invocación",
- "tool.intervention.onboarding.agentIdentity.applyHint": "La nueva identidad aparecerá después de la aprobación.",
- "tool.intervention.onboarding.agentIdentity.description": "Aprobar este cambio actualiza el Agente mostrado en la Bandeja de entrada y en esta conversación de incorporación.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Avatar del agente",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Aprobación de incorporación",
- "tool.intervention.onboarding.agentIdentity.name": "Nombre del agente",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Agente de la bandeja de entrada",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Agente de incorporación actual",
- "tool.intervention.onboarding.agentIdentity.targets": "Se aplica a",
"tool.intervention.onboarding.agentIdentity.title": "Confirmar actualización de identidad del agente",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Actualizaré mi avatar",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Actualizaré mi nombre",
"tool.intervention.onboarding.userProfile.applyHint": "Estos detalles se guardarán en tu perfil después de la aprobación.",
"tool.intervention.onboarding.userProfile.description": "Aprobar este cambio actualiza tu perfil de incorporación para que el Agente pueda personalizar futuras respuestas.",
"tool.intervention.onboarding.userProfile.eyebrow": "Aprobación de incorporación",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Actualizado {{time}}",
"workingPanel.resources.viewMode.list": "Vista de lista",
"workingPanel.resources.viewMode.tree": "Vista de árbol",
+ "workingPanel.review.baseRef.default": "predeterminado",
+ "workingPanel.review.baseRef.loading": "Cargando ramas…",
+ "workingPanel.review.baseRef.reset": "Restablecer a la rama predeterminada",
+ "workingPanel.review.baseRef.unresolved": "Elige una rama base",
"workingPanel.review.binary": "Archivo binario — diferencia no mostrada",
"workingPanel.review.collapseAll": "Colapsar todo",
"workingPanel.review.copied": "Ruta copiada",
"workingPanel.review.copyPath": "Copiar ruta del archivo",
"workingPanel.review.empty": "No hay cambios en el árbol de trabajo",
+ "workingPanel.review.empty.branch": "Sin cambios frente a {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "No se pudo determinar la rama predeterminada remota. Ejecuta `git remote set-head origin --auto` en tu terminal.",
"workingPanel.review.error": "No se pudo cargar la diferencia de este archivo",
"workingPanel.review.expandAll": "Expandir todo",
+ "workingPanel.review.mode.branch": "Rama",
+ "workingPanel.review.mode.unstaged": "No preparado",
"workingPanel.review.more": "Más opciones",
"workingPanel.review.refresh": "Actualizar",
"workingPanel.review.textDiff.disable": "Desactivar diferencia de texto en línea",
diff --git a/locales/es-ES/labs.json b/locales/es-ES/labs.json
index f6536745241..fadb76f9997 100644
--- a/locales/es-ES/labs.json
+++ b/locales/es-ES/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Chat Grupal (Multiagente)",
"features.inputMarkdown.desc": "Renderiza Markdown en el área de entrada en tiempo real (texto en negrita, bloques de código, tablas, etc.).",
"features.inputMarkdown.title": "Renderizado de Markdown en la Entrada",
+ "features.messenger.desc": "Habla con tus agentes desde Telegram (y otros mensajeros) a través del bot compartido de LobeHub. Agrega una pestaña de Mensajería en Configuración para vincular tu cuenta y elegir qué agente recibe los mensajes.",
+ "features.messenger.title": "Mensajero",
"title": "Laboratorios"
}
diff --git a/locales/es-ES/messenger.json b/locales/es-ES/messenger.json
new file mode 100644
index 00000000000..682b451e754
--- /dev/null
+++ b/locales/es-ES/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Agente activo",
+ "messenger.activeAgentPlaceholder": "Selecciona un agente",
+ "messenger.detail.addServer": "Agregar servidor",
+ "messenger.detail.addWorkspace": "Agregar espacio de trabajo",
+ "messenger.detail.connections.connected": "Conectado",
+ "messenger.detail.connections.empty": "Abre el bot y envía /start para vincular tu cuenta.",
+ "messenger.detail.connections.linkHint": "Espacio de trabajo instalado. Abre Slack y envía un mensaje directo al bot para finalizar la vinculación de tu cuenta personal.",
+ "messenger.detail.connections.pending": "Pendiente",
+ "messenger.detail.connections.serverLabel": "servidor",
+ "messenger.detail.connections.title": "Conexiones",
+ "messenger.detail.connections.userLabel": "usuario",
+ "messenger.detail.connections.workspaceLabel": "espacio de trabajo",
+ "messenger.detail.disconnect": "Desconectar",
+ "messenger.discord.connectModal.description": "Agrega el bot de LobeHub a un servidor de Discord que administres.",
+ "messenger.discord.connectModal.inviteButton": "Agregar al servidor de Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord no está disponible en este momento. Por favor, inténtalo de nuevo más tarde.",
+ "messenger.discord.connectModal.title": "Agregar bot a tu servidor",
+ "messenger.discord.connections.disconnectConfirm": "¿Eliminar este servidor de tu lista de auditoría? El bot permanecerá en el servidor hasta que un administrador lo expulse.",
+ "messenger.discord.connections.disconnectFailed": "No se pudo eliminar el servidor.",
+ "messenger.discord.connections.disconnectSuccess": "Servidor eliminado.",
+ "messenger.discord.connections.disconnectTitle": "Eliminar servidor",
+ "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",
+ "messenger.error.agentNotFound": "Agente no encontrado.",
+ "messenger.error.disconnectNotAllowed": "Solo puedes desconectar instalaciones que hayas iniciado.",
+ "messenger.error.installationNotFound": "Instalación no encontrada.",
+ "messenger.error.linkRequired": "Abre el bot y envía /start antes de cambiar esta conexión.",
+ "messenger.error.pickDefaultAgent": "Selecciona un agente predeterminado antes de confirmar.",
+ "messenger.error.platformNotConfigured": "Esta plataforma de mensajería no está disponible en este momento. Por favor, inténtalo de nuevo más tarde.",
+ "messenger.linkCta": "Conectar",
+ "messenger.linkModal.continueIn": "Continúa la configuración en {{platform}}",
+ "messenger.linkModal.instructions": "Abre el bot, envía /start y luego toca \"Vincular cuenta\" para conectar tu cuenta de LobeHub.",
+ "messenger.linkModal.notConfigured": "Esta conexión no está disponible en este momento. Por favor, inténtalo de nuevo más tarde.",
+ "messenger.linkModal.openCta": "Abrir en {{platform}}",
+ "messenger.linkModal.scanHint": "O escanea con tu teléfono para abrir {{platform}}.",
+ "messenger.linkModal.title": "Conectar Messenger",
+ "messenger.list.discord.description": "Chatea con tus agentes de LobeHub desde cualquier servidor de Discord mediante mensajes directos con el bot de LobeHub.",
+ "messenger.list.slack.description": "Chatea con tus agentes de LobeHub desde cualquier espacio de trabajo de Slack mediante mensajes directos o @LobeHub.",
+ "messenger.list.telegram.description": "Chatea con tus agentes de LobeHub en Telegram y elige quién responde desde cualquier lugar.",
+ "messenger.noPlatformsConfigured": "Aún no hay plataformas disponibles. Vuelve pronto.",
+ "messenger.setActiveFailed": "No se pudo establecer como activo.",
+ "messenger.setActiveSuccess": "Agente activo actualizado.",
+ "messenger.slack.connectModal.continueButton": "Continuar en Slack",
+ "messenger.slack.connectModal.description": "Serás redirigido a Slack para autorizar la instalación del espacio de trabajo de LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack no está disponible en este momento. Por favor, inténtalo de nuevo más tarde.",
+ "messenger.slack.connectModal.title": "Continúa la configuración en Slack",
+ "messenger.slack.connections.disconnectConfirm": "¿Desconectar el bot de LobeHub de este espacio de trabajo de Slack? Los enlaces de usuario existentes se pausarán hasta que lo reinstales.",
+ "messenger.slack.connections.disconnectFailed": "No se pudo desconectar.",
+ "messenger.slack.connections.disconnectSuccess": "Espacio de trabajo desconectado.",
+ "messenger.slack.connections.disconnectTitle": "Desconectar espacio de trabajo",
+ "messenger.slack.installBlocked.dismiss": "Entendido",
+ "messenger.slack.installBlocked.suggestion": "Envía un mensaje directo a @LobeHub en Slack para vincular tu cuenta personal; no necesitas instalarlo de nuevo. O pide al instalador original que desconecte este espacio de trabajo primero si deseas tomar el control.",
+ "messenger.slack.installBlocked.title": "Espacio de trabajo ya conectado",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" ya está conectado a LobeHub por otro usuario.",
+ "messenger.slack.installBlocked.withoutName": "Este espacio de trabajo de Slack ya está conectado a LobeHub por otro usuario.",
+ "messenger.slack.installResult.failed": "La instalación de Slack falló ({{reason}}). Por favor, inténtalo de nuevo o contacta con soporte.",
+ "messenger.slack.installResult.reasons.accessDenied": "la autorización fue cancelada",
+ "messenger.slack.installResult.reasons.exchangeFailed": "la autorización de Slack falló",
+ "messenger.slack.installResult.reasons.generic": "ocurrió un error desconocido",
+ "messenger.slack.installResult.reasons.invalidState": "la sesión de instalación expiró",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack devolvió información incompleta de la aplicación",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack devolvió parámetros de instalación incompletos",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack no devolvió un identificador de espacio de trabajo",
+ "messenger.slack.installResult.reasons.missingToken": "Slack no devolvió un token de bot",
+ "messenger.slack.installResult.reasons.persistFailed": "no se pudo guardar la conexión del espacio de trabajo",
+ "messenger.slack.installResult.success": "Espacio de trabajo de Slack conectado.",
+ "messenger.subtitle": "Conecta tu cuenta al bot oficial de LobeHub una vez. Elige qué agente recibe mensajes, cambia en cualquier momento desde aquí o desde el bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "¿Desconectar tu cuenta de {{platform}} de LobeHub? Los mensajes entrantes se detendrán hasta que envíes /start de nuevo.",
+ "messenger.unlinkCta": "Desconectar",
+ "messenger.unlinkFailed": "No se pudo desconectar.",
+ "messenger.unlinkSuccess": "Desconectado.",
+ "messenger.unlinkTitle": "Desconectar cuenta",
+ "verify.confirm.conflict.description": "Esta cuenta de {{platform}} ya está vinculada a la cuenta de LobeHub {{email}}. Inicia sesión en esa cuenta para gestionar el enlace, o desvincúlala allí antes de intentarlo de nuevo.",
+ "verify.confirm.conflict.switchAccount": "Iniciar sesión con otra cuenta",
+ "verify.confirm.conflict.title": "Esta cuenta ya está vinculada",
+ "verify.confirm.cta": "Confirmar vinculación",
+ "verify.confirm.defaultAgent": "Agente predeterminado",
+ "verify.confirm.defaultAgentHint": "Tus mensajes se enviarán aquí primero. Puedes cambiar en cualquier momento mediante /agents en el bot o desde Configuración → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Selecciona un agente",
+ "verify.confirm.fields.lobeHubAccount": "Cuenta de LobeHub",
+ "verify.confirm.fields.platformAccount": "Cuenta de {{platform}}",
+ "verify.confirm.fields.workspace": "Espacio de trabajo",
+ "verify.confirm.noAgents": "Aún no tienes agentes. Crea uno en LobeHub y luego regresa para finalizar la vinculación.",
+ "verify.confirm.title": "Confirmar vinculación",
+ "verify.confirm.workspace": "Espacio de trabajo: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Esta cuenta ya está vinculada a una cuenta diferente de LobeHub. Inicia sesión en esa cuenta primero.",
+ "verify.error.expired": "Este enlace ha expirado. Por favor, regresa al bot y envía /start de nuevo.",
+ "verify.error.generic": "Algo salió mal. Por favor, inténtalo de nuevo.",
+ "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.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.",
+ "verify.success.openBot": "Abrir en {{platform}}",
+ "verify.success.title": "¡Vinculado con éxito!"
+}
diff --git a/locales/es-ES/models.json b/locales/es-ES/models.json
index f9a85b57536..c954a4bd4a8 100644
--- a/locales/es-ES/models.json
+++ b/locales/es-ES/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Nuevo modelo de generación de video con mejoras integrales en movimiento corporal, realismo físico y seguimiento de instrucciones.",
"MiniMax-M1.description": "Nuevo modelo de razonamiento interno con 80K de cadena de pensamiento y 1M de entrada, con rendimiento comparable a los mejores modelos globales.",
"MiniMax-M2-Stable.description": "Diseñado para codificación eficiente y flujos de trabajo de agentes, con mayor concurrencia para uso comercial.",
- "MiniMax-M2.1-Lightning.description": "Potentes capacidades de programación multilingüe con inferencia más rápida y eficiente.",
"MiniMax-M2.1-highspeed.description": "Potentes capacidades de programación multilingüe, con una experiencia de programación completamente mejorada. Más rápido y eficiente.",
"MiniMax-M2.1.description": "MiniMax-M2.1 es un modelo insignia de código abierto de MiniMax, enfocado en resolver tareas complejas del mundo real. Sus principales fortalezas son sus capacidades de programación multilingüe y su habilidad para resolver tareas complejas como un Agente.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Mismo rendimiento que M2.5 con inferencia más rápida.",
@@ -320,7 +319,7 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku es el modelo más rápido y compacto de Anthropic, diseñado para respuestas casi instantáneas con rendimiento rápido y preciso.",
"claude-3-opus-20240229.description": "Claude 3 Opus es el modelo más potente de Anthropic para tareas altamente complejas, destacando en rendimiento, inteligencia, fluidez y comprensión.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet equilibra inteligencia y velocidad para cargas de trabajo empresariales, ofreciendo alta utilidad a menor costo y despliegue confiable a gran escala.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 es el modelo Haiku más rápido e inteligente de Anthropic, con velocidad relámpago y pensamiento extendido.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 es el modelo Haiku más rápido e inteligente de Anthropic, con velocidad relámpago y razonamiento extendido.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 de Anthropic: Haiku de nueva generación con razonamiento y visión mejorados.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 es el modelo Haiku más rápido e inteligente de Anthropic, con velocidad relámpago y razonamiento extendido.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking es una variante avanzada que puede mostrar su proceso de razonamiento.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 es el modelo más inteligente de Anthropic para construir agentes y programar.",
"claude-opus-4.6.description": "Claude Opus 4.6 es el modelo más inteligente de Anthropic para construir agentes y programar.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking puede generar respuestas casi instantáneas o pensamiento paso a paso extendido con proceso visible.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 es el modelo más inteligente de Anthropic hasta la fecha, ofreciendo respuestas casi instantáneas o pensamiento extendido paso a paso con control detallado para usuarios de API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 puede generar respuestas casi instantáneas o razonamientos extendidos paso a paso con un proceso visible.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 es el modelo más inteligente de Anthropic hasta la fecha.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 de Anthropic: versión mejorada de Sonnet con mayor rendimiento en programación.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 de Anthropic: última versión de Sonnet con programación superior y uso avanzado de herramientas.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) es un modelo innovador que ofrece una comprensión profunda del lenguaje y una interacción avanzada.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 es un modelo de razonamiento de nueva generación con capacidades mejoradas para razonamiento complejo y cadenas de pensamiento, ideal para tareas de análisis profundo.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 es un modelo de razonamiento de próxima generación con capacidades mejoradas de razonamiento complejo y cadenas de pensamiento.",
- "deepseek-chat.description": "Alias de compatibilidad para el modo no reflexivo de DeepSeek V4 Flash. Programado para ser descontinuado: use DeepSeek V4 Flash en su lugar.",
+ "deepseek-chat.description": "Un nuevo modelo de código abierto que combina habilidades generales y de codificación. Preserva el diálogo general del modelo de chat y la sólida capacidad de codificación del modelo de programador, con mejor alineación de preferencias. DeepSeek-V2.5 también mejora la escritura y el seguimiento de instrucciones.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B es un modelo de lenguaje para código entrenado con 2T de tokens (87% código, 13% texto en chino/inglés). Introduce una ventana de contexto de 16K y tareas de completado intermedio, ofreciendo completado de código a nivel de proyecto y relleno de fragmentos.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 es un modelo de código MoE de código abierto que tiene un rendimiento sólido en tareas de programación, comparable a GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 es un modelo de código MoE de código abierto que tiene un rendimiento sólido en tareas de programación, comparable a GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Versión completa rápida de DeepSeek R1 con búsqueda web en tiempo real, combinando capacidad a escala 671B y respuesta ágil.",
"deepseek-r1-online.description": "Versión completa de DeepSeek R1 con 671B de parámetros y búsqueda web en tiempo real, ofreciendo mejor comprensión y generación.",
"deepseek-r1.description": "DeepSeek-R1 utiliza datos de arranque en frío antes del aprendizaje por refuerzo y tiene un rendimiento comparable a OpenAI-o1 en matemáticas, programación y razonamiento.",
- "deepseek-reasoner.description": "Alias de compatibilidad para el modo reflexivo de DeepSeek V4 Flash. Programado para ser descontinuado: use DeepSeek V4 Flash en su lugar.",
+ "deepseek-reasoner.description": "Alias de compatibilidad para el modo de pensamiento rápido de DeepSeek V4. Programado para su eliminación — utiliza deepseek-v4-flash en su lugar.",
"deepseek-v2.description": "DeepSeek V2 es un modelo MoE eficiente para procesamiento rentable.",
"deepseek-v2:236b.description": "DeepSeek V2 236B es el modelo de DeepSeek centrado en código con fuerte generación de código.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 es un modelo MoE con 671 mil millones de parámetros, con fortalezas destacadas en programación, capacidad técnica, comprensión de contexto y manejo de textos largos.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 es un modelo de generación de imágenes de ByteDance Seed que admite entradas de texto e imagen con generación de imágenes de alta calidad y altamente controlable. Genera imágenes a partir de indicaciones de texto.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 es el último modelo multimodal de imágenes de ByteDance, que integra capacidades de texto a imagen, imagen a imagen y generación de imágenes por lotes, mientras incorpora sentido común y habilidades de razonamiento. En comparación con la versión 4.0 anterior, ofrece una calidad de generación significativamente mejorada, con mayor consistencia en la edición y fusión de múltiples imágenes. Proporciona un control más preciso sobre los detalles visuales, produciendo texto y rostros pequeños de manera más natural, y logra una disposición y color más armoniosos, mejorando la estética general.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite es el último modelo de generación de imágenes de ByteDance. Por primera vez, integra capacidades de recuperación en línea, permitiendo incorporar información web en tiempo real y mejorar la actualidad de las imágenes generadas. La inteligencia del modelo también ha sido mejorada, permitiendo una interpretación precisa de instrucciones complejas y contenido visual. Además, ofrece una mejor cobertura de conocimiento global, consistencia de referencia y calidad de generación en escenarios profesionales, satisfaciendo mejor las necesidades de creación visual a nivel empresarial.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 de ByteDance es el modelo de generación de video más poderoso, compatible con generación de video multimodal de referencia, edición de video, extensión de video, texto a video e imagen a video con audio sincronizado.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast de ByteDance ofrece las mismas capacidades que Seedance 2.0 con velocidades de generación más rápidas a un precio más competitivo.",
"emohaa.description": "Emohaa es un modelo de salud mental con capacidades profesionales de asesoramiento para ayudar a los usuarios a comprender problemas emocionales.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B es un modelo ligero de código abierto para implementación local y personalizada.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview es un modelo de vista previa con contexto de 8K para evaluar ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K es un modelo de pensamiento rápido con contexto de 32K para razonamiento complejo y chat de múltiples turnos.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview es una vista previa del modelo de pensamiento para evaluación y pruebas.",
"ernie-x1.1.description": "ERNIE X1.1 es un modelo de pensamiento en vista previa para evaluación y pruebas.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, desarrollado por el equipo Seed de ByteDance, admite edición y composición de múltiples imágenes. Presenta consistencia mejorada de sujetos, seguimiento preciso de instrucciones, comprensión de lógica espacial, expresión estética, diseño de carteles y logotipos con renderizado de texto-imagen de alta precisión.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, desarrollado por ByteDance Seed, admite entradas de texto e imagen para generación de imágenes altamente controlable y de alta calidad a partir de indicaciones.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 es un modelo de generación de imágenes de ByteDance Seed, que admite entradas de texto e imagen con generación de imágenes altamente controlable y de alta calidad. Genera imágenes a partir de indicaciones de texto.",
"fal-ai/flux-kontext/dev.description": "Modelo FLUX.1 centrado en la edición de imágenes, compatible con entradas de texto e imagen.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] acepta texto e imágenes de referencia como entrada, permitiendo ediciones locales dirigidas y transformaciones globales complejas de escenas.",
"fal-ai/flux/krea.description": "Flux Krea [dev] es un modelo de generación de imágenes con una inclinación estética hacia imágenes más realistas y naturales.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Un potente modelo nativo multimodal de generación de imágenes.",
"fal-ai/imagen4/preview.description": "Modelo de generación de imágenes de alta calidad de Google.",
"fal-ai/nano-banana.description": "Nano Banana es el modelo multimodal nativo más nuevo, rápido y eficiente de Google, que permite generación y edición de imágenes mediante conversación.",
- "fal-ai/qwen-image-edit.description": "Un modelo profesional de edición de imágenes del equipo Qwen, que admite ediciones semánticas y de apariencia, edición precisa de texto en chino/inglés, transferencia de estilo, rotación y más.",
- "fal-ai/qwen-image.description": "Un modelo poderoso de generación de imágenes del equipo Qwen con un fuerte renderizado de texto en chino y estilos visuales diversos.",
+ "fal-ai/qwen-image-edit.description": "Un modelo profesional de edición de imágenes del equipo Qwen que admite ediciones semánticas y de apariencia, edita con precisión texto en chino e inglés, y permite ediciones de alta calidad como transferencia de estilo y rotación de objetos.",
+ "fal-ai/qwen-image.description": "Un modelo poderoso de generación de imágenes del equipo Qwen con impresionante renderizado de texto en chino y estilos visuales diversos.",
"flux-1-schnell.description": "Modelo de texto a imagen con 12 mil millones de parámetros de Black Forest Labs que utiliza destilación difusiva adversarial latente para generar imágenes de alta calidad en 1 a 4 pasos. Compite con alternativas cerradas y se lanza bajo licencia Apache-2.0 para uso personal, de investigación y comercial.",
"flux-dev.description": "Modelo de generación de imágenes de I+D de código abierto, optimizado de forma eficiente para investigación innovadora no comercial.",
"flux-kontext-max.description": "Generación y edición de imágenes contextual de última generación, combinando texto e imágenes para resultados precisos y coherentes.",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) es el modelo de generación de imágenes de Google y también admite chat multimodal.",
"gemini-3-pro-preview.description": "Gemini 3 Pro es el agente más potente de Google y modelo de codificación emocional, que ofrece visuales más ricos e interacción más profunda sobre un razonamiento de última generación.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) es el modelo nativo de generación de imágenes más rápido de Google con soporte de pensamiento, generación conversacional de imágenes y edición.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) ofrece calidad de imagen a nivel Pro a velocidad Flash con soporte de chat multimodal.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) es el modelo nativo de generación de imágenes más rápido de Google con soporte de pensamiento, generación conversacional de imágenes y edición.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview es el modelo multimodal más rentable de Google, optimizado para tareas agentivas de alto volumen, traducción y procesamiento de datos.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview mejora las capacidades de razonamiento de Gemini 3 Pro y añade soporte para un nivel de pensamiento medio.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro de Google: modelo multimodal premium con ventana de contexto de 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Nos complace lanzar Grok 4 Fast, nuestro último avance en modelos de razonamiento rentables.",
"grok-4.20-0309-non-reasoning.description": "Variante sin razonamiento para casos de uso simples.",
"grok-4.20-0309-reasoning.description": "Modelo inteligente y rapidísimo que razona antes de responder.",
- "grok-4.20-beta-0309-non-reasoning.description": "Una variante no reflexiva para casos de uso simples.",
- "grok-4.20-beta-0309-reasoning.description": "Modelo inteligente y ultrarrápido que razona antes de responder.",
"grok-4.20-multi-agent-0309.description": "Equipo de 4 o 16 agentes. Destaca en casos de investigación. No admite herramientas del lado del cliente. Solo admite herramientas del lado del servidor de xAI (como X Search, Web Search) y herramientas MCP remotas.",
"grok-4.3.description": "El modelo de lenguaje grande más orientado a la verdad en el mundo.",
- "grok-4.description": "Nuestro modelo insignia más nuevo y fuerte, destacando en PNL, matemáticas y razonamiento: un todoterreno ideal.",
+ "grok-4.description": "Último modelo insignia de Grok con un rendimiento inigualable en lenguaje, matemáticas y razonamiento — un verdadero todoterreno. Actualmente apunta a grok-4-0709; debido a recursos limitados, su precio es temporalmente un 10% más alto que el oficial y se espera que regrese al precio oficial más adelante.",
"grok-code-fast-1.description": "Nos complace lanzar grok-code-fast-1, un modelo de razonamiento rápido y rentable que destaca en codificación agente.",
"grok-imagine-image-pro.description": "Genera imágenes a partir de indicaciones de texto, edita imágenes existentes con lenguaje natural o refina imágenes de manera iterativa a través de conversaciones de múltiples turnos.",
"grok-imagine-image.description": "Genera imágenes a partir de indicaciones de texto, edita imágenes existentes con lenguaje natural o refina imágenes de manera iterativa a través de conversaciones de múltiples turnos.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ es un modelo de razonamiento de la familia Qwen. En comparación con los modelos estándar ajustados por instrucciones, ofrece capacidades de pensamiento y razonamiento que mejoran significativamente el rendimiento en tareas difíciles. QwQ-32B es un modelo de razonamiento de tamaño medio que compite con los mejores modelos como DeepSeek-R1 y o1-mini.",
"qwq_32b.description": "Modelo de razonamiento de tamaño medio de la familia Qwen. En comparación con los modelos estándar ajustados por instrucciones, las capacidades de pensamiento y razonamiento de QwQ mejoran significativamente el rendimiento en tareas difíciles.",
"r1-1776.description": "R1-1776 es una variante postentrenada de DeepSeek R1 diseñada para proporcionar información factual sin censura ni sesgo.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro de ByteDance admite texto a video, imagen a video (primer cuadro, primer+último cuadro) y generación de audio sincronizado con visuales.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite de BytePlus presenta generación aumentada con recuperación web para información en tiempo real, interpretación mejorada de indicaciones complejas y consistencia de referencia mejorada para creación visual profesional.",
"solar-mini-ja.description": "Solar Mini (Ja) amplía Solar Mini con un enfoque en japonés, manteniendo un rendimiento eficiente y sólido en inglés y coreano.",
"solar-mini.description": "Solar Mini es un modelo LLM compacto que supera a GPT-3.5, con una sólida capacidad multilingüe compatible con inglés y coreano, ofreciendo una solución eficiente de bajo consumo.",
"solar-pro.description": "Solar Pro es un LLM de alta inteligencia de Upstage, enfocado en el seguimiento de instrucciones en una sola GPU, con puntuaciones IFEval superiores a 80. Actualmente admite inglés; el lanzamiento completo estaba previsto para noviembre de 2024 con soporte de idiomas ampliado y contexto más largo.",
diff --git a/locales/es-ES/providers.json b/locales/es-ES/providers.json
index 310682cd8ac..c4ef10fb49c 100644
--- a/locales/es-ES/providers.json
+++ b/locales/es-ES/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Fundada en 2020, Jina AI es una empresa líder en búsqueda con IA. Su pila de búsqueda incluye modelos vectoriales, reordenadores y pequeños modelos de lenguaje para construir aplicaciones generativas y multimodales confiables y de alta calidad.",
"kimicodingplan.description": "Kimi Code de Moonshot AI proporciona acceso a los modelos Kimi, incluidos K2.5, para tareas de codificación.",
"lmstudio.description": "LM Studio es una aplicación de escritorio para desarrollar y experimentar con LLMs en tu ordenador.",
- "lobehub.description": "LobeHub Cloud utiliza APIs oficiales para acceder a modelos de IA y mide el uso con Créditos vinculados a los tokens del modelo.",
"longcat.description": "LongCat es una serie de modelos grandes de inteligencia artificial generativa desarrollados de manera independiente por Meituan. Está diseñado para mejorar la productividad interna de la empresa y permitir aplicaciones innovadoras mediante una arquitectura computacional eficiente y sólidas capacidades multimodales.",
"minimax.description": "Fundada en 2021, MiniMax desarrolla IA de propósito general con modelos fundacionales multimodales, incluyendo modelos de texto MoE con billones de parámetros, modelos de voz y visión, junto con aplicaciones como Hailuo AI.",
"minimaxcodingplan.description": "El Plan de Tokens MiniMax proporciona acceso a los modelos MiniMax, incluidos M2.7, para tareas de codificación mediante una suscripción de tarifa fija.",
diff --git a/locales/es-ES/setting.json b/locales/es-ES/setting.json
index 785c73f26da..55580ebd00a 100644
--- a/locales/es-ES/setting.json
+++ b/locales/es-ES/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Rellenar Manualmente",
"tab.manualFill.desc": "Configura manualmente una habilidad MCP personalizada",
"tab.memory": "Memoria",
+ "tab.messenger": "Mensajero",
"tab.notification": "Notificaciones",
"tab.profile": "Mi Cuenta",
"tab.provider": "Proveedor de Servicios de IA",
diff --git a/locales/fa-IR/chat.json b/locales/fa-IR/chat.json
index 908a9254a6d..543dd88a59f 100644
--- a/locales/fa-IR/chat.json
+++ b/locales/fa-IR/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "همه فراخوانی‌های ابزار به‌طور خودکار تأیید شوند",
"tool.intervention.mode.manual": "دستی",
"tool.intervention.mode.manualDesc": "برای هر فراخوانی تأیید دستی لازم است",
- "tool.intervention.onboarding.agentIdentity.applyHint": "هویت جدید پس از تأیید اعمال خواهد شد.",
- "tool.intervention.onboarding.agentIdentity.description": "تأیید این تغییر، عامل نمایش‌داده‌شده در صندوق ورودی و این مکالمه راه‌اندازی را به‌روزرسانی می‌کند.",
- "tool.intervention.onboarding.agentIdentity.emoji": "آواتار عامل",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "تأیید راه‌اندازی",
- "tool.intervention.onboarding.agentIdentity.name": "نام عامل",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "عامل صندوق ورودی",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "عامل راه‌اندازی فعلی",
- "tool.intervention.onboarding.agentIdentity.targets": "اعمال می‌شود بر",
"tool.intervention.onboarding.agentIdentity.title": "تأیید به‌روزرسانی هویت عامل",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "من آواتارم را به‌روزرسانی می‌کنم",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "من نامم را به‌روزرسانی می‌کنم",
"tool.intervention.onboarding.userProfile.applyHint": "این جزئیات پس از تأیید به پروفایل شما ذخیره خواهد شد.",
"tool.intervention.onboarding.userProfile.description": "تأیید این تغییر، پروفایل ورود شما را به‌روزرسانی می‌کند تا نماینده بتواند پاسخ‌های آینده را متناسب کند.",
"tool.intervention.onboarding.userProfile.eyebrow": "تأیید ورود",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "به‌روزرسانی شده در {{time}}",
"workingPanel.resources.viewMode.list": "نمای فهرست",
"workingPanel.resources.viewMode.tree": "نمای درختی",
+ "workingPanel.review.baseRef.default": "پیش‌فرض",
+ "workingPanel.review.baseRef.loading": "در حال بارگذاری شاخه‌ها…",
+ "workingPanel.review.baseRef.reset": "بازنشانی به شاخه پیش‌فرض",
+ "workingPanel.review.baseRef.unresolved": "یک شاخه پایه انتخاب کنید",
"workingPanel.review.binary": "فایل باینری — تفاوت نمایش داده نمی‌شود",
"workingPanel.review.collapseAll": "بستن همه",
"workingPanel.review.copied": "مسیر کپی شد",
"workingPanel.review.copyPath": "کپی مسیر فایل",
"workingPanel.review.empty": "هیچ تغییری در درخت کاری وجود ندارد",
+ "workingPanel.review.empty.branch": "هیچ تغییری در مقابل {{baseRef}} وجود ندارد",
+ "workingPanel.review.empty.noBaseRef": "شاخه پیش‌فرض ریموت قابل تعیین نیست. دستور `git remote set-head origin --auto` را در ترمینال خود اجرا کنید.",
"workingPanel.review.error": "بارگذاری تفاوت این فایل ممکن نیست",
"workingPanel.review.expandAll": "باز کردن همه",
+ "workingPanel.review.mode.branch": "شاخه",
+ "workingPanel.review.mode.unstaged": "غیربه‌مرحله",
"workingPanel.review.more": "گزینه‌های بیشتر",
"workingPanel.review.refresh": "تازه‌سازی",
"workingPanel.review.textDiff.disable": "غیرفعال کردن تفاوت متنی درون‌خطی",
diff --git a/locales/fa-IR/labs.json b/locales/fa-IR/labs.json
index edd54151141..80af1482d82 100644
--- a/locales/fa-IR/labs.json
+++ b/locales/fa-IR/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "گفت‌وگوی گروهی (چندعاملی)",
"features.inputMarkdown.desc": "نمایش زنده Markdown در ناحیه ورودی (متن پررنگ، بلوک‌های کد، جدول‌ها و غیره).",
"features.inputMarkdown.title": "نمایش Markdown در ورودی",
+ "features.messenger.desc": "با عوامل خود از طریق تلگرام (و سایر پیام‌رسان‌ها) از طریق ربات مشترک LobeHub صحبت کنید. یک تب پیام‌رسان در تنظیمات اضافه می‌کند برای اتصال حساب شما و انتخاب اینکه کدام عامل پیام‌ها را دریافت کند.",
+ "features.messenger.title": "پیام‌رسان",
"title": "آزمایشگاه‌ها"
}
diff --git a/locales/fa-IR/messenger.json b/locales/fa-IR/messenger.json
new file mode 100644
index 00000000000..19052d25cac
--- /dev/null
+++ b/locales/fa-IR/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "نماینده فعال",
+ "messenger.activeAgentPlaceholder": "یک نماینده انتخاب کنید",
+ "messenger.detail.addServer": "افزودن سرور",
+ "messenger.detail.addWorkspace": "افزودن فضای کاری",
+ "messenger.detail.connections.connected": "متصل",
+ "messenger.detail.connections.empty": "ربات را باز کنید و دستور /start را ارسال کنید تا حساب شما لینک شود.",
+ "messenger.detail.connections.linkHint": "فضای کاری نصب شد. Slack را باز کنید و به ربات پیام دهید تا لینک کردن حساب شخصی شما تکمیل شود.",
+ "messenger.detail.connections.pending": "در انتظار",
+ "messenger.detail.connections.serverLabel": "سرور",
+ "messenger.detail.connections.title": "اتصالات",
+ "messenger.detail.connections.userLabel": "کاربر",
+ "messenger.detail.connections.workspaceLabel": "فضای کاری",
+ "messenger.detail.disconnect": "قطع اتصال",
+ "messenger.discord.connectModal.description": "ربات LobeHub را به یک سرور Discord که مدیریت می‌کنید اضافه کنید.",
+ "messenger.discord.connectModal.inviteButton": "افزودن به سرور Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord در حال حاضر در دسترس نیست. لطفاً بعداً دوباره امتحان کنید.",
+ "messenger.discord.connectModal.title": "افزودن ربات به سرور شما",
+ "messenger.discord.connections.disconnectConfirm": "این سرور را از لیست بررسی خود حذف کنید؟ ربات در سرور باقی می‌ماند تا زمانی که مدیر سرور آن را حذف کند.",
+ "messenger.discord.connections.disconnectFailed": "حذف سرور ناموفق بود.",
+ "messenger.discord.connections.disconnectSuccess": "سرور حذف شد.",
+ "messenger.discord.connections.disconnectTitle": "حذف سرور",
+ "messenger.discord.userPending.cta": "باز کردن در Discord",
+ "messenger.discord.userPending.hint": "ربات را در Discord باز کنید و هر پیامی ارسال کنید تا لینک کردن حساب شما تکمیل شود.",
+ "messenger.discord.userPending.name": "هنوز لینک نشده",
+ "messenger.error.agentNotFound": "نماینده پیدا نشد.",
+ "messenger.error.disconnectNotAllowed": "شما فقط می‌توانید نصب‌هایی که خودتان شروع کرده‌اید را قطع کنید.",
+ "messenger.error.installationNotFound": "نصب پیدا نشد.",
+ "messenger.error.linkRequired": "ربات را باز کنید و دستور /start را ارسال کنید قبل از تغییر این اتصال.",
+ "messenger.error.pickDefaultAgent": "یک نماینده پیش‌فرض انتخاب کنید قبل از تأیید.",
+ "messenger.error.platformNotConfigured": "این پلتفرم پیام‌رسان در حال حاضر در دسترس نیست. لطفاً بعداً دوباره امتحان کنید.",
+ "messenger.linkCta": "اتصال",
+ "messenger.linkModal.continueIn": "ادامه تنظیمات در {{platform}}",
+ "messenger.linkModal.instructions": "ربات را باز کنید، دستور /start را ارسال کنید، سپس روی \"Link Account\" ضربه بزنید تا حساب LobeHub خود را متصل کنید.",
+ "messenger.linkModal.notConfigured": "این اتصال در حال حاضر در دسترس نیست. لطفاً بعداً دوباره امتحان کنید.",
+ "messenger.linkModal.openCta": "باز کردن در {{platform}}",
+ "messenger.linkModal.scanHint": "یا با تلفن خود اسکن کنید تا {{platform}} باز شود.",
+ "messenger.linkModal.title": "اتصال پیام‌رسان",
+ "messenger.list.discord.description": "با نمایندگان LobeHub خود از هر سرور Discord از طریق پیام مستقیم با ربات LobeHub گفتگو کنید.",
+ "messenger.list.slack.description": "با نمایندگان LobeHub خود از هر فضای کاری Slack از طریق پیام مستقیم یا @LobeHub گفتگو کنید.",
+ "messenger.list.telegram.description": "در Telegram با نمایندگان LobeHub خود گفتگو کنید و انتخاب کنید کدام یک پاسخ دهد.",
+ "messenger.noPlatformsConfigured": "هنوز هیچ پلتفرمی در دسترس نیست. به زودی بررسی کنید.",
+ "messenger.setActiveFailed": "تنظیم به عنوان فعال ناموفق بود.",
+ "messenger.setActiveSuccess": "نماینده فعال به‌روزرسانی شد.",
+ "messenger.slack.connectModal.continueButton": "ادامه در Slack",
+ "messenger.slack.connectModal.description": "شما به Slack هدایت خواهید شد تا نصب فضای کاری LobeHub را تأیید کنید.",
+ "messenger.slack.connectModal.notConfigured": "Slack در حال حاضر در دسترس نیست. لطفاً بعداً دوباره امتحان کنید.",
+ "messenger.slack.connectModal.title": "ادامه تنظیمات در Slack",
+ "messenger.slack.connections.disconnectConfirm": "ربات LobeHub را از این فضای کاری Slack قطع کنید؟ لینک‌های کاربر موجود تا زمانی که دوباره نصب کنید متوقف خواهند شد.",
+ "messenger.slack.connections.disconnectFailed": "قطع اتصال ناموفق بود.",
+ "messenger.slack.connections.disconnectSuccess": "فضای کاری قطع شد.",
+ "messenger.slack.connections.disconnectTitle": "قطع اتصال فضای کاری",
+ "messenger.slack.installBlocked.dismiss": "متوجه شدم",
+ "messenger.slack.installBlocked.suggestion": "در Slack به @LobeHub پیام دهید تا حساب شخصی خود را لینک کنید — نیازی به نصب مجدد ندارید. یا از نصب‌کننده اصلی بخواهید ابتدا این فضای کاری را قطع کند اگر می‌خواهید مالکیت را به عهده بگیرید.",
+ "messenger.slack.installBlocked.title": "فضای کاری قبلاً متصل شده است",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" قبلاً توسط کاربر دیگری به LobeHub متصل شده است.",
+ "messenger.slack.installBlocked.withoutName": "این فضای کاری Slack قبلاً توسط کاربر دیگری به LobeHub متصل شده است.",
+ "messenger.slack.installResult.failed": "نصب Slack ناموفق بود ({{reason}}). لطفاً دوباره امتحان کنید یا با پشتیبانی تماس بگیرید.",
+ "messenger.slack.installResult.reasons.accessDenied": "مجوز لغو شد",
+ "messenger.slack.installResult.reasons.exchangeFailed": "مجوز Slack ناموفق بود",
+ "messenger.slack.installResult.reasons.generic": "یک خطای ناشناخته رخ داد",
+ "messenger.slack.installResult.reasons.invalidState": "جلسه نصب منقضی شد",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack اطلاعات برنامه ناقص را بازگرداند",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack پارامترهای نصب ناقص را بازگرداند",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack شناسه فضای کاری را بازنگرداند",
+ "messenger.slack.installResult.reasons.missingToken": "Slack توکن ربات را بازنگرداند",
+ "messenger.slack.installResult.reasons.persistFailed": "اتصال فضای کاری ذخیره نشد",
+ "messenger.slack.installResult.success": "فضای کاری Slack متصل شد.",
+ "messenger.subtitle": "حساب خود را یک بار به ربات رسمی LobeHub متصل کنید. انتخاب کنید کدام نماینده پیام‌ها را دریافت کند، هر زمان از اینجا یا از ربات تغییر دهید.",
+ "messenger.title": "پیام‌رسان",
+ "messenger.unlinkConfirm": "حساب {{platform}} خود را از LobeHub قطع کنید؟ پیام‌های ورودی تا زمانی که دوباره /start کنید متوقف خواهند شد.",
+ "messenger.unlinkCta": "قطع اتصال",
+ "messenger.unlinkFailed": "قطع اتصال ناموفق بود.",
+ "messenger.unlinkSuccess": "قطع اتصال انجام شد.",
+ "messenger.unlinkTitle": "قطع اتصال حساب",
+ "verify.confirm.conflict.description": "این حساب {{platform}} قبلاً به حساب LobeHub {{email}} لینک شده است. وارد آن حساب شوید تا لینک را مدیریت کنید، یا ابتدا در آنجا قطع کنید و سپس دوباره تلاش کنید.",
+ "verify.confirm.conflict.switchAccount": "ورود با حساب دیگر",
+ "verify.confirm.conflict.title": "این حساب قبلاً لینک شده است",
+ "verify.confirm.cta": "تأیید لینک",
+ "verify.confirm.defaultAgent": "نماینده پیش‌فرض",
+ "verify.confirm.defaultAgentHint": "پیام‌های شما ابتدا به اینجا ارسال می‌شوند. هر زمان می‌توانید از طریق /agents در ربات یا از تنظیمات → پیام‌رسان تغییر دهید.",
+ "verify.confirm.defaultAgentPlaceholder": "یک نماینده انتخاب کنید",
+ "verify.confirm.fields.lobeHubAccount": "حساب LobeHub",
+ "verify.confirm.fields.platformAccount": "حساب {{platform}}",
+ "verify.confirm.fields.workspace": "فضای کاری",
+ "verify.confirm.noAgents": "شما هنوز هیچ نماینده‌ای ندارید. یکی را در LobeHub ایجاد کنید، سپس برای تکمیل لینک کردن بازگردید.",
+ "verify.confirm.title": "تأیید لینک",
+ "verify.confirm.workspace": "فضای کاری: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "این حساب قبلاً به یک حساب دیگر LobeHub لینک شده است. ابتدا وارد آن حساب شوید.",
+ "verify.error.expired": "این لینک منقضی شده است. لطفاً به ربات بازگردید و دوباره دستور /start را ارسال کنید.",
+ "verify.error.generic": "مشکلی پیش آمد. لطفاً دوباره امتحان کنید.",
+ "verify.error.missingToken": "لینک نامعتبر. این صفحه را از ربات باز کنید.",
+ "verify.error.title": "تأیید لینک امکان‌پذیر نیست",
+ "verify.labRequired.description": "پیام‌رسان در حال حاضر یک ویژگی آزمایشی است. آن را در تنظیمات → پیشرفته → آزمایش‌ها فعال کنید و این صفحه را دوباره بارگذاری کنید.",
+ "verify.labRequired.openSettings": "باز کردن تنظیمات آزمایش‌ها",
+ "verify.labRequired.title": "برای ادامه پیام‌رسان را فعال کنید",
+ "verify.signInCta": "برای ادامه وارد شوید",
+ "verify.signInRequired": "لطفاً وارد LobeHub شوید تا لینک را تأیید کنید.",
+ "verify.success.description": "حساب شما اکنون به {{platform}} متصل شده است. {{platform}} را باز کنید و اولین پیام خود را ارسال کنید.",
+ "verify.success.openBot": "باز کردن در {{platform}}",
+ "verify.success.title": "با موفقیت لینک شد!"
+}
diff --git a/locales/fa-IR/models.json b/locales/fa-IR/models.json
index c30d608e396..d27f068b191 100644
--- a/locales/fa-IR/models.json
+++ b/locales/fa-IR/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "مدل جدید تولید ویدئو با ارتقاهای جامع در حرکت بدن، واقع‌گرایی فیزیکی و پیروی از دستورالعمل‌ها.",
"MiniMax-M1.description": "یک مدل استدلالی داخلی جدید با ۸۰ هزار زنجیره تفکر و ورودی ۱ میلیون توکن، با عملکردی در سطح مدل‌های برتر جهانی.",
"MiniMax-M2-Stable.description": "طراحی‌شده برای کدنویسی کارآمد و جریان‌های کاری عامل‌محور، با هم‌زمانی بالاتر برای استفاده تجاری.",
- "MiniMax-M2.1-Lightning.description": "قابلیت‌های قدرتمند برنامه‌نویسی چندزبانه با استنتاج سریع‌تر و کارآمدتر.",
"MiniMax-M2.1-highspeed.description": "قابلیت‌های برنامه‌نویسی چندزبانه قدرتمند، تجربه برنامه‌نویسی کاملاً ارتقاء یافته. سریع‌تر و کارآمدتر.",
"MiniMax-M2.1.description": "MiniMax-M2.1 یک مدل بزرگ متن‌باز پیشرفته از MiniMax است که بر حل وظایف پیچیده دنیای واقعی تمرکز دارد. نقاط قوت اصلی آن شامل توانایی برنامه‌نویسی چندزبانه و قابلیت عمل به‌عنوان یک عامل هوشمند برای حل مسائل پیچیده است.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: همان عملکرد M2.5 با استنتاج سریع‌تر.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku سریع‌ترین و فشرده‌ترین مدل Anthropic است که برای پاسخ‌های تقریباً فوری با عملکرد سریع و دقیق طراحی شده است.",
"claude-3-opus-20240229.description": "Claude 3 Opus قدرتمندترین مدل Anthropic برای وظایف بسیار پیچیده است که در عملکرد، هوش، روانی و درک زبان برتری دارد.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet تعادل بین هوش و سرعت را برای بارهای کاری سازمانی برقرار می‌کند و با هزینه کمتر، بهره‌وری بالا و استقرار قابل اعتماد در مقیاس وسیع را ارائه می‌دهد.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 سریع‌ترین و هوشمندترین مدل Haiku از Anthropic است، با سرعت فوق‌العاده و تفکر گسترده.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 سریع‌ترین و هوشمندترین مدل Haiku از Anthropic است که با سرعت فوق‌العاده و توانایی استدلال پیشرفته ارائه می‌شود.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 از Anthropic — نسل جدید Haiku با استدلال و پردازش تصویری پیشرفته.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 سریع‌ترین و هوشمندترین مدل Haiku از Anthropic است که با سرعت برق‌آسا و توانایی استدلال پیشرفته ارائه می‌شود.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking یک نسخه پیشرفته است که می‌تواند فرآیند استدلال خود را آشکار کند.",
"claude-opus-4-1-20250805.description": "Claude Opus 4.1 جدیدترین و توانمندترین مدل Anthropic برای وظایف بسیار پیچیده است که در عملکرد، هوش، روانی و درک برتری دارد.",
"claude-opus-4-1.description": "Claude Opus 4.1 از Anthropic — مدل استدلال سطح‌بالا با توانایی تحلیل عمیق.",
- "claude-opus-4-20250514.description": "Claude Opus 4 قدرتمندترین مدل Anthropic برای وظایف بسیار پیچیده است که در عملکرد، هوش، روانی و درک برتری دارد.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 قدرتمندترین مدل Anthropic برای وظایف بسیار پیچیده است که در عملکرد، هوش، روانی و فهم برتری دارد.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 مدل پرچم‌دار Anthropic است که هوش برجسته را با عملکرد مقیاس‌پذیر ترکیب می‌کند و برای وظایف پیچیده‌ای که نیاز به پاسخ‌های باکیفیت و استدلال دارند، ایده‌آل است.",
"claude-opus-4-5.description": "Claude Opus 4.5 از Anthropic — مدل پرچم‌دار با استدلال و کدنویسی سطح‌بالا.",
"claude-opus-4-6.description": "Claude Opus 4.6 از Anthropic — مدل پرچم‌دار با پنجره زمینه ۱ میلیون و توانایی استدلال پیشرفته.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 هوشمندترین مدل Anthropic برای ساخت عوامل و کدنویسی است.",
"claude-opus-4.6.description": "Claude Opus 4.6 هوشمندترین مدل Anthropic برای ساخت عوامل و کدنویسی است.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking می‌تواند پاسخ‌های تقریباً فوری یا تفکر گام‌به‌گام طولانی با فرآیند قابل مشاهده تولید کند.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 هوشمندترین مدل Anthropic تا به امروز است که پاسخ‌های تقریباً فوری یا تفکر مرحله‌به‌مرحله گسترده با کنترل دقیق برای کاربران API ارائه می‌دهد.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 می‌تواند پاسخ‌های تقریباً فوری یا تفکر گام‌به‌گام گسترده با فرآیند قابل مشاهده تولید کند.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 هوشمندترین مدل Anthropic تا به امروز است.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 از Anthropic — نسخه بهبود‌یافته Sonnet با عملکرد بهتر در کدنویسی.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 از Anthropic — جدیدترین Sonnet با کدنویسی برتر و استفاده بهتر از ابزار.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) یک مدل نوآورانه با درک عمیق زبان و تعامل است.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 یک مدل استدلال نسل بعدی با توانایی استدلال پیچیده و زنجیره تفکر برای وظایف تحلیلی عمیق است.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 یک مدل استدلال نسل بعدی با قابلیت‌های استدلال پیچیده‌تر و زنجیره‌ای از تفکر است.",
- "deepseek-chat.description": "نام مستعار سازگار برای حالت غیرتفکری DeepSeek V4 Flash. برنامه‌ریزی شده برای حذف — از DeepSeek V4 Flash استفاده کنید.",
+ "deepseek-chat.description": "یک مدل متن‌باز جدید که توانایی‌های عمومی و کدنویسی را ترکیب می‌کند. این مدل گفتگوی عمومی مدل چت و کدنویسی قوی مدل کدنویس را حفظ کرده و با هم‌ترازی بهتر ترجیحات ارائه می‌شود. DeepSeek-V2.5 همچنین نوشتن و پیروی از دستورالعمل‌ها را بهبود می‌بخشد.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B یک مدل زبان برنامه‌نویسی است که با ۲ تریلیون توکن (۸۷٪ کد، ۱۳٪ متن چینی/انگلیسی) آموزش دیده است. این مدل دارای پنجره متنی ۱۶K و وظایف تکمیل در میانه است که تکمیل کد در سطح پروژه و پر کردن قطعات کد را فراهم می‌کند.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 یک مدل کدنویسی MoE متن‌باز است که در وظایف برنامه‌نویسی عملکردی هم‌سطح با GPT-4 Turbo دارد.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 یک مدل کدنویسی MoE متن‌باز است که در وظایف برنامه‌نویسی عملکردی هم‌سطح با GPT-4 Turbo دارد.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "نسخه کامل سریع DeepSeek R1 با جستجوی وب در زمان واقعی که توانایی در مقیاس ۶۷۱B را با پاسخ‌دهی سریع‌تر ترکیب می‌کند.",
"deepseek-r1-online.description": "نسخه کامل DeepSeek R1 با ۶۷۱ میلیارد پارامتر و جستجوی وب در زمان واقعی که درک و تولید قوی‌تری را ارائه می‌دهد.",
"deepseek-r1.description": "DeepSeek-R1 پیش از یادگیری تقویتی از داده‌های شروع سرد استفاده می‌کند و در وظایف ریاضی، کدنویسی و استدلال عملکردی هم‌سطح با OpenAI-o1 دارد.",
- "deepseek-reasoner.description": "نام مستعار سازگار برای حالت تفکری DeepSeek V4 Flash. برنامه‌ریزی شده برای حذف — از DeepSeek V4 Flash استفاده کنید.",
+ "deepseek-reasoner.description": "نام مستعار سازگار برای حالت تفکر سریع DeepSeek V4. برنامه‌ریزی شده برای توقف استفاده — به جای آن از deepseek-v4-flash استفاده کنید.",
"deepseek-v2.description": "DeepSeek V2 یک مدل MoE کارآمد است که پردازش مقرون‌به‌صرفه را امکان‌پذیر می‌سازد.",
"deepseek-v2:236b.description": "DeepSeek V2 236B مدل متمرکز بر کدنویسی DeepSeek است که توانایی بالایی در تولید کد دارد.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 یک مدل MoE با ۶۷۱ میلیارد پارامتر است که در برنامه‌نویسی، توانایی‌های فنی، درک زمینه و پردازش متون بلند عملکرد برجسته‌ای دارد.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 یک مدل تولید تصویر از ByteDance Seed است که از ورودی‌های متن و تصویر پشتیبانی می‌کند و تولید تصویر با کیفیت بالا و قابل کنترل را ارائه می‌دهد. این مدل تصاویر را از دستورات متنی تولید می‌کند.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 جدیدترین مدل چندوجهی تصویر ByteDance است که قابلیت‌های تبدیل متن به تصویر، تصویر به تصویر و تولید دسته‌ای تصاویر را ادغام می‌کند و توانایی‌های استدلال و دانش عمومی را نیز در بر می‌گیرد. در مقایسه با نسخه قبلی 4.0، کیفیت تولید به‌طور قابل‌توجهی بهبود یافته است، با سازگاری بهتر در ویرایش و ترکیب چند تصویر. کنترل دقیق‌تری بر جزئیات بصری ارائه می‌دهد، متن‌های کوچک و چهره‌های کوچک را به‌طور طبیعی‌تر تولید می‌کند و به هماهنگی بهتر در چیدمان و رنگ دست می‌یابد، که زیبایی کلی را افزایش می‌دهد.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite جدیدترین مدل تولید تصویر ByteDance است. برای اولین بار، قابلیت‌های بازیابی آنلاین را ادغام کرده است که به آن امکان می‌دهد اطلاعات وب لحظه‌ای را وارد کند و به‌موقع بودن تصاویر تولید شده را افزایش دهد. هوش مدل نیز ارتقا یافته است، که تفسیر دقیق دستورالعمل‌های پیچیده و محتوای بصری را امکان‌پذیر می‌کند. علاوه بر این، پوشش دانش جهانی، سازگاری مرجع و کیفیت تولید در سناریوهای حرفه‌ای بهبود یافته است، که نیازهای خلق بصری در سطح سازمانی را بهتر برآورده می‌کند.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 توسط ByteDance قدرتمندترین مدل تولید ویدئو است که از تولید ویدئو با مرجع چندوجهی، ویرایش ویدئو، گسترش ویدئو، تبدیل متن به ویدئو و تبدیل تصویر به ویدئو با صدای همگام‌سازی‌شده پشتیبانی می‌کند.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast توسط ByteDance همان قابلیت‌های Seedance 2.0 را با سرعت تولید سریع‌تر و قیمت رقابتی‌تر ارائه می‌دهد.",
"emohaa.description": "Emohaa یک مدل سلامت روان با توانایی مشاوره حرفه‌ای است که به کاربران در درک مسائل احساسی کمک می‌کند.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B یک مدل سبک متن‌باز برای استقرار محلی و سفارشی‌سازی شده است.",
"ernie-4.5-8k-preview.description": "پیش‌نمایش مدل با پنجره متنی ۸هزار توکن برای ارزیابی ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K یک مدل تفکر سریع با زمینه ۳۲K برای استدلال پیچیده و گفت‌وگوی چندمرحله‌ای است.",
"ernie-x1.1-preview.description": "پیش‌نمایش ERNIE X1.1 یک مدل تفکر برای ارزیابی و آزمایش است.",
"ernie-x1.1.description": "ERNIE X1.1 یک مدل تفکر پیش‌نمایش برای ارزیابی و آزمایش است.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5، ساخته شده توسط تیم Seed ByteDance، از ویرایش و ترکیب چندتصویری پشتیبانی می‌کند. ویژگی‌های سازگاری موضوعی پیشرفته، پیروی دقیق از دستورات، درک منطق فضایی، بیان زیبایی‌شناختی، طراحی پوستر و لوگو با رندر متن-تصویر دقیق را ارائه می‌دهد.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0، ساخته شده توسط ByteDance Seed، از ورودی‌های متن و تصویر برای تولید تصویر با کیفیت بالا و قابل کنترل از درخواست‌ها پشتیبانی می‌کند.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 یک مدل تولید تصویر از ByteDance Seed است که از ورودی‌های متنی و تصویری پشتیبانی می‌کند و تولید تصاویر با کیفیت بالا و قابل کنترل را ارائه می‌دهد. این مدل تصاویر را از دستورات متنی تولید می‌کند.",
"fal-ai/flux-kontext/dev.description": "مدل FLUX.1 با تمرکز بر ویرایش تصویر که از ورودی‌های متنی و تصویری پشتیبانی می‌کند.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] ورودی‌های متنی و تصاویر مرجع را می‌پذیرد و امکان ویرایش‌های محلی هدفمند و تغییرات پیچیده در صحنه کلی را فراهم می‌کند.",
"fal-ai/flux/krea.description": "Flux Krea [dev] یک مدل تولید تصویر با تمایل زیبایی‌شناسی به تصاویر طبیعی و واقع‌گرایانه‌تر است.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "یک مدل قدرتمند بومی چندوجهی برای تولید تصویر.",
"fal-ai/imagen4/preview.description": "مدل تولید تصویر با کیفیت بالا از گوگل.",
"fal-ai/nano-banana.description": "Nano Banana جدیدترین، سریع‌ترین و کارآمدترین مدل چندوجهی بومی گوگل است که امکان تولید و ویرایش تصویر از طریق مکالمه را فراهم می‌کند.",
- "fal-ai/qwen-image-edit.description": "یک مدل حرفه‌ای ویرایش تصویر از تیم Qwen که از ویرایش‌های معنایی و ظاهری، ویرایش دقیق متن چینی/انگلیسی، انتقال سبک، چرخش و موارد دیگر پشتیبانی می‌کند.",
- "fal-ai/qwen-image.description": "یک مدل قدرتمند تولید تصویر از تیم Qwen با قابلیت‌های قوی در رندر متن چینی و سبک‌های بصری متنوع.",
+ "fal-ai/qwen-image-edit.description": "یک مدل ویرایش تصویر حرفه‌ای از تیم Qwen که از ویرایش‌های معنایی و ظاهری پشتیبانی می‌کند، متن‌های چینی و انگلیسی را با دقت ویرایش می‌کند و ویرایش‌های با کیفیت بالا مانند انتقال سبک و چرخش اشیاء را ممکن می‌سازد.",
+ "fal-ai/qwen-image.description": "یک مدل قدرتمند تولید تصویر از تیم Qwen با قابلیت‌های برجسته در رندر متن چینی و سبک‌های بصری متنوع.",
"flux-1-schnell.description": "مدل تبدیل متن به تصویر با ۱۲ میلیارد پارامتر از Black Forest Labs که از تقطیر انتشار تقابلی نهفته برای تولید تصاویر با کیفیت بالا در ۱ تا ۴ مرحله استفاده می‌کند. این مدل با جایگزین‌های بسته رقابت می‌کند و تحت مجوز Apache-2.0 برای استفاده شخصی، تحقیقاتی و تجاری منتشر شده است.",
"flux-dev.description": "مدل تولید تصویر متن‌باز برای تحقیق و توسعه، به‌طور کارآمد برای پژوهش‌های نوآورانهٔ غیرتجاری بهینه‌سازی شده است.",
"flux-kontext-max.description": "تولید و ویرایش تصویر متنی-زمینه‌ای پیشرفته که متن و تصویر را برای نتایج دقیق و منسجم ترکیب می‌کند.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash هوشمندترین مدل طراحی‌شده برای سرعت است که هوش پیشرفته را با قابلیت جست‌وجوی دقیق ترکیب می‌کند.",
"gemini-3-flash.description": "Gemini 3 Flash از Google — مدل بسیار سریع با پشتیبانی ورودی چندوجهی.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) مدل تولید تصویر گوگل است که از گفتگوی چندوجهی نیز پشتیبانی می‌کند.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) مدل تولید تصویر گوگل است و همچنین از چت چندوجهی پشتیبانی می‌کند.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) مدل تولید تصویر گوگل است که از چت چندوجهی نیز پشتیبانی می‌کند.",
"gemini-3-pro-preview.description": "Gemini 3 Pro قدرتمندترین مدل عامل و کدنویسی احساسی گوگل است که تعاملات بصری غنی‌تر و تعامل عمیق‌تری را بر پایه استدلال پیشرفته ارائه می‌دهد.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) سریع‌ترین مدل تولید تصویر بومی گوگل با پشتیبانی از تفکر، تولید و ویرایش تصویر مکالمه‌ای است.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) کیفیت تصویر سطح حرفه‌ای را با سرعت Flash ارائه می‌دهد و از چت چندوجهی پشتیبانی می‌کند.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) سریع‌ترین مدل تولید تصویر بومی گوگل با پشتیبانی از تفکر، تولید و ویرایش تصویری مکالمه‌ای است.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview اقتصادی‌ترین مدل چندوجهی گوگل است که برای وظایف عامل‌محور با حجم بالا، ترجمه و پردازش داده‌ها بهینه شده است.",
"gemini-3.1-pro-preview.description": "پیش‌نمایش Gemini 3.1 Pro قابلیت‌های استدلال بهبود یافته را به Gemini 3 Pro اضافه می‌کند و از سطح تفکر متوسط پشتیبانی می‌کند.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro از Google — مدل ممتاز چندوجهی با پنجره زمینه ۱ میلیون.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "با افتخار Grok 4 Fast را معرفی می‌کنیم، جدیدترین پیشرفت ما در مدل‌های استدلال مقرون‌به‌صرفه.",
"grok-4.20-0309-non-reasoning.description": "نسخه بدون استدلال برای کاربردهای ساده.",
"grok-4.20-0309-reasoning.description": "مدلی هوشمند و بسیار سریع که قبل از پاسخ استدلال می‌کند.",
- "grok-4.20-beta-0309-non-reasoning.description": "یک نسخه غیرتفکری برای موارد استفاده ساده",
- "grok-4.20-beta-0309-reasoning.description": "مدلی هوشمند و فوق‌العاده سریع که قبل از پاسخ‌دهی استدلال می‌کند",
"grok-4.20-multi-agent-0309.description": "مجموعه‌ای از ۴ یا ۱۶ ایجنت که در پژوهش عملکرد عالی دارد. در حال حاضر از ابزارهای سمت کاربر پشتیبانی نمی‌کند و تنها ابزارهای سمت سرور xAI (مانند X Search و Web Search) و ابزارهای MCP از راه دور را پشتیبانی می‌کند.",
"grok-4.3.description": "حقیقت‌جویانه‌ترین مدل زبان بزرگ در جهان",
- "grok-4.description": "جدیدترین و قوی‌ترین مدل پرچمدار ما که در NLP، ریاضیات و استدلال برتری دارد—یک مدل همه‌جانبه ایده‌آل.",
+ "grok-4.description": "جدیدترین مدل پرچمدار Grok با عملکرد بی‌نظیر در زبان، ریاضیات و استدلال — یک مدل همه‌کاره واقعی. در حال حاضر به grok-4-0709 اشاره دارد؛ به دلیل منابع محدود، قیمت آن موقتاً ۱۰٪ بالاتر از قیمت رسمی است و انتظار می‌رود به قیمت رسمی بازگردد.",
"grok-code-fast-1.description": "با افتخار grok-code-fast-1 را معرفی می‌کنیم، مدلی سریع و مقرون‌به‌صرفه برای استدلال که در برنامه‌نویسی عامل‌محور عملکرد درخشانی دارد.",
"grok-imagine-image-pro.description": "تصاویر را از دستورات متنی تولید کنید، تصاویر موجود را با زبان طبیعی ویرایش کنید، یا تصاویر را از طریق مکالمات چندمرحله‌ای به‌طور مکرر اصلاح کنید.",
"grok-imagine-image.description": "تصاویر را از دستورات متنی تولید کنید، تصاویر موجود را با زبان طبیعی ویرایش کنید، یا تصاویر را از طریق مکالمات چندمرحله‌ای به‌طور مکرر اصلاح کنید.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ یک مدل استدلال در خانواده Qwen است. در مقایسه با مدل‌های تنظیم‌شده با دستورالعمل استاندارد، توانایی تفکر و استدلال آن عملکرد پایین‌دستی را به‌ویژه در مسائل دشوار به‌طور قابل توجهی بهبود می‌بخشد. QwQ-32B یک مدل استدلال میان‌رده است که با مدل‌های برتر مانند DeepSeek-R1 و o1-mini رقابت می‌کند.",
"qwq_32b.description": "مدل استدلال میان‌رده در خانواده Qwen. در مقایسه با مدل‌های تنظیم‌شده با دستورالعمل استاندارد، توانایی تفکر و استدلال QwQ عملکرد پایین‌دستی را به‌ویژه در مسائل دشوار به‌طور قابل توجهی بهبود می‌بخشد.",
"r1-1776.description": "R1-1776 نسخه پس‌آموزشی مدل DeepSeek R1 است که برای ارائه اطلاعات واقعی، بدون سانسور و بی‌طرف طراحی شده است.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro توسط ByteDance از تبدیل متن به ویدئو، تبدیل تصویر به ویدئو (فریم اول، فریم اول+آخر) و تولید صدا همگام‌سازی‌شده با تصاویر پشتیبانی می‌کند.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite توسط BytePlus دارای تولید تقویت‌شده با بازیابی وب برای اطلاعات بلادرنگ، تفسیر پیچیده درخواست‌ها و سازگاری مرجع بهبود‌یافته برای خلق بصری حرفه‌ای است.",
"solar-mini-ja.description": "Solar Mini (ژاپنی) نسخه‌ای از Solar Mini با تمرکز بر زبان ژاپنی است که در عین حال عملکرد قوی و کارآمدی در زبان‌های انگلیسی و کره‌ای حفظ می‌کند.",
"solar-mini.description": "Solar Mini یک مدل زبانی فشرده است که عملکردی بهتر از GPT-3.5 دارد و با پشتیبانی چندزبانه قوی از زبان‌های انگلیسی و کره‌ای، راه‌حلی کارآمد با حجم کم ارائه می‌دهد.",
"solar-pro.description": "Solar Pro یک مدل زبانی هوشمند از Upstage است که برای پیروی از دستورالعمل‌ها روی یک GPU طراحی شده و امتیاز IFEval بالای ۸۰ دارد. در حال حاضر از زبان انگلیسی پشتیبانی می‌کند؛ انتشار کامل آن برای نوامبر ۲۰۲۴ با پشتیبانی زبانی گسترده‌تر و زمینه طولانی‌تر برنامه‌ریزی شده است.",
diff --git a/locales/fa-IR/providers.json b/locales/fa-IR/providers.json
index 1aa30f4ff7f..d06eb4a87bc 100644
--- a/locales/fa-IR/providers.json
+++ b/locales/fa-IR/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Jina AI که در سال 2020 تأسیس شد، یک شرکت پیشرو در زمینه جستجوی هوش مصنوعی است. پشته جستجوی آن شامل مدل‌های برداری، رتبه‌بندها و مدل‌های زبانی کوچک برای ساخت اپلیکیشن‌های جستجوی مولد و چندوجهی با کیفیت بالا است.",
"kimicodingplan.description": "Kimi Code از Moonshot AI دسترسی به مدل‌های Kimi شامل K2.5 را برای وظایف کدنویسی فراهم می‌کند.",
"lmstudio.description": "LM Studio یک اپلیکیشن دسکتاپ برای توسعه و آزمایش مدل‌های زبانی بزرگ روی رایانه شخصی شماست.",
- "lobehub.description": "ابر لاب‌هاب از API‌های رسمی برای دسترسی به مدل‌های هوش مصنوعی استفاده می‌کند و مصرف را با اعتباراتی که به توکن‌های مدل مرتبط هستند، اندازه‌گیری می‌کند.",
"longcat.description": "لانگ‌کت مجموعه‌ای از مدل‌های بزرگ هوش مصنوعی تولیدی است که به‌طور مستقل توسط میتوآن توسعه داده شده است. این مدل‌ها برای افزایش بهره‌وری داخلی شرکت و امکان‌پذیر کردن کاربردهای نوآورانه از طریق معماری محاسباتی کارآمد و قابلیت‌های چندوجهی قدرتمند طراحی شده‌اند.",
"minimax.description": "MiniMax که در سال 2021 تأسیس شد، هوش مصنوعی چندمنظوره با مدل‌های پایه چندوجهی از جمله مدل‌های متنی با پارامترهای تریلیونی، مدل‌های گفتاری و تصویری توسعه می‌دهد و اپ‌هایی مانند Hailuo AI را ارائه می‌کند.",
"minimaxcodingplan.description": "طرح توکن MiniMax دسترسی به مدل‌های MiniMax شامل M2.7 را برای وظایف کدنویسی از طریق اشتراک با هزینه ثابت فراهم می‌کند.",
diff --git a/locales/fa-IR/setting.json b/locales/fa-IR/setting.json
index 5a6f77669da..80dc27b6274 100644
--- a/locales/fa-IR/setting.json
+++ b/locales/fa-IR/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "پر کردن دستی",
"tab.manualFill.desc": "یک مهارت MCP سفارشی را به‌صورت دستی پیکربندی کنید",
"tab.memory": "حافظه",
+ "tab.messenger": "پیام‌رسان",
"tab.notification": "اعلان‌ها",
"tab.profile": "حساب من",
"tab.provider": "ارائه‌دهنده سرویس هوش مصنوعی",
diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.json
index 97a5d2cf8af..7de7b5e05e5 100644
--- a/locales/fr-FR/chat.json
+++ b/locales/fr-FR/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Approuver automatiquement toutes les exécutions d'outils",
"tool.intervention.mode.manual": "Manuel",
"tool.intervention.mode.manualDesc": "Approbation manuelle requise pour chaque appel",
- "tool.intervention.onboarding.agentIdentity.applyHint": "La nouvelle identité apparaîtra après approbation.",
- "tool.intervention.onboarding.agentIdentity.description": "Approuver ce changement met à jour l’Agent affiché dans la boîte de réception et dans cette conversation d’onboarding.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Avatar de l’agent",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Approbation de l’onboarding",
- "tool.intervention.onboarding.agentIdentity.name": "Nom de l’agent",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Agent de la boîte de réception",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Agent d’onboarding actuel",
- "tool.intervention.onboarding.agentIdentity.targets": "S’applique à",
"tool.intervention.onboarding.agentIdentity.title": "Confirmer la mise à jour de l’identité de l’agent",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Je vais mettre à jour mon avatar",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Je vais mettre à jour mon nom",
"tool.intervention.onboarding.userProfile.applyHint": "Ces détails seront enregistrés dans votre profil après approbation.",
"tool.intervention.onboarding.userProfile.description": "L'approbation de ce changement met à jour votre profil d'intégration afin que l'Agent puisse adapter les réponses futures.",
"tool.intervention.onboarding.userProfile.eyebrow": "Approbation d'intégration",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Mis à jour {{time}}",
"workingPanel.resources.viewMode.list": "Vue en liste",
"workingPanel.resources.viewMode.tree": "Vue arborescente",
+ "workingPanel.review.baseRef.default": "par défaut",
+ "workingPanel.review.baseRef.loading": "Chargement des branches…",
+ "workingPanel.review.baseRef.reset": "Réinitialiser à la branche par défaut",
+ "workingPanel.review.baseRef.unresolved": "Choisissez une branche de base",
"workingPanel.review.binary": "Fichier binaire — diff non affiché",
"workingPanel.review.collapseAll": "Tout réduire",
"workingPanel.review.copied": "Chemin copié",
"workingPanel.review.copyPath": "Copier le chemin du fichier",
"workingPanel.review.empty": "Aucun changement dans l'arborescence de travail",
+ "workingPanel.review.empty.branch": "Aucun changement par rapport à {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Impossible de déterminer la branche par défaut distante. Exécutez `git remote set-head origin --auto` dans votre terminal.",
"workingPanel.review.error": "Impossible de charger le diff de ce fichier",
"workingPanel.review.expandAll": "Tout développer",
+ "workingPanel.review.mode.branch": "Branche",
+ "workingPanel.review.mode.unstaged": "Non indexé",
"workingPanel.review.more": "Plus d'options",
"workingPanel.review.refresh": "Actualiser",
"workingPanel.review.textDiff.disable": "Désactiver la comparaison de texte en ligne",
diff --git a/locales/fr-FR/labs.json b/locales/fr-FR/labs.json
index c2efade3c4f..c98b0c76948 100644
--- a/locales/fr-FR/labs.json
+++ b/locales/fr-FR/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Discussion de groupe (multi-agents)",
"features.inputMarkdown.desc": "Affichez le Markdown dans la zone de saisie en temps réel (texte en gras, blocs de code, tableaux, etc.).",
"features.inputMarkdown.title": "Rendu Markdown dans la saisie",
+ "features.messenger.desc": "Discutez avec vos agents depuis Telegram (et d'autres messageries) via le bot partagé LobeHub. Ajoute un onglet Messagerie dans les Paramètres pour lier votre compte et choisir quel agent reçoit les messages.",
+ "features.messenger.title": "Messagerie",
"title": "Laboratoires"
}
diff --git a/locales/fr-FR/messenger.json b/locales/fr-FR/messenger.json
new file mode 100644
index 00000000000..c30ee430a34
--- /dev/null
+++ b/locales/fr-FR/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Agent actif",
+ "messenger.activeAgentPlaceholder": "Sélectionnez un agent",
+ "messenger.detail.addServer": "Ajouter un serveur",
+ "messenger.detail.addWorkspace": "Ajouter un espace de travail",
+ "messenger.detail.connections.connected": "Connecté",
+ "messenger.detail.connections.empty": "Ouvrez le bot et envoyez /start pour lier votre compte.",
+ "messenger.detail.connections.linkHint": "Espace de travail installé. Ouvrez Slack et envoyez un message direct au bot pour terminer la liaison de votre compte personnel.",
+ "messenger.detail.connections.pending": "En attente",
+ "messenger.detail.connections.serverLabel": "serveur",
+ "messenger.detail.connections.title": "Connexions",
+ "messenger.detail.connections.userLabel": "utilisateur",
+ "messenger.detail.connections.workspaceLabel": "espace de travail",
+ "messenger.detail.disconnect": "Déconnecter",
+ "messenger.discord.connectModal.description": "Ajoutez le bot LobeHub à un serveur Discord que vous gérez.",
+ "messenger.discord.connectModal.inviteButton": "Ajouter au serveur Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
+ "messenger.discord.connectModal.title": "Ajouter le bot à votre serveur",
+ "messenger.discord.connections.disconnectConfirm": "Retirer ce serveur de votre liste d'audit ? Le bot restera dans le serveur jusqu'à ce qu'un administrateur le supprime.",
+ "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.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é",
+ "messenger.error.agentNotFound": "Agent introuvable.",
+ "messenger.error.disconnectNotAllowed": "Vous ne pouvez déconnecter que les installations que vous avez commencées.",
+ "messenger.error.installationNotFound": "Installation introuvable.",
+ "messenger.error.linkRequired": "Ouvrez le bot et envoyez /start avant de modifier cette connexion.",
+ "messenger.error.pickDefaultAgent": "Sélectionnez un agent par défaut avant de confirmer.",
+ "messenger.error.platformNotConfigured": "Cette plateforme de messagerie n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
+ "messenger.linkCta": "Connecter",
+ "messenger.linkModal.continueIn": "Continuer la configuration dans {{platform}}",
+ "messenger.linkModal.instructions": "Ouvrez le bot, envoyez /start, puis appuyez sur \"Lier le compte\" pour connecter votre compte LobeHub.",
+ "messenger.linkModal.notConfigured": "Cette connexion n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
+ "messenger.linkModal.openCta": "Ouvrir dans {{platform}}",
+ "messenger.linkModal.scanHint": "Ou scannez avec votre téléphone pour ouvrir {{platform}}.",
+ "messenger.linkModal.title": "Connecter Messenger",
+ "messenger.list.discord.description": "Discutez avec vos agents LobeHub depuis n'importe quel serveur Discord via un message direct avec le bot LobeHub.",
+ "messenger.list.slack.description": "Discutez avec vos agents LobeHub depuis n'importe quel espace de travail Slack via un message direct ou @LobeHub.",
+ "messenger.list.telegram.description": "Discutez avec vos agents LobeHub sur Telegram et choisissez lequel répond de n'importe où.",
+ "messenger.noPlatformsConfigured": "Aucune plateforme n'est encore disponible. Revenez bientôt.",
+ "messenger.setActiveFailed": "Échec de la définition comme actif.",
+ "messenger.setActiveSuccess": "Agent actif mis à jour.",
+ "messenger.slack.connectModal.continueButton": "Continuer dans Slack",
+ "messenger.slack.connectModal.description": "Vous serez redirigé vers Slack pour autoriser l'installation de l'espace de travail LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
+ "messenger.slack.connectModal.title": "Continuer la configuration dans Slack",
+ "messenger.slack.connections.disconnectConfirm": "Déconnecter le bot LobeHub de cet espace de travail Slack ? Les liens utilisateur existants seront suspendus jusqu'à une nouvelle installation.",
+ "messenger.slack.connections.disconnectFailed": "Échec de la déconnexion.",
+ "messenger.slack.connections.disconnectSuccess": "Espace de travail déconnecté.",
+ "messenger.slack.connections.disconnectTitle": "Déconnecter l'espace de travail",
+ "messenger.slack.installBlocked.dismiss": "Compris",
+ "messenger.slack.installBlocked.suggestion": "Envoyez un message direct à @LobeHub dans Slack pour lier votre compte personnel — vous n'avez pas besoin de réinstaller. Ou demandez à l'installateur d'origine de déconnecter cet espace de travail d'abord si vous souhaitez en prendre la propriété.",
+ "messenger.slack.installBlocked.title": "Espace de travail déjà connecté",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" est déjà connecté à LobeHub par un autre utilisateur.",
+ "messenger.slack.installBlocked.withoutName": "Cet espace de travail Slack est déjà connecté à LobeHub par un autre utilisateur.",
+ "messenger.slack.installResult.failed": "Échec de l'installation Slack ({{reason}}). Veuillez réessayer ou contacter le support.",
+ "messenger.slack.installResult.reasons.accessDenied": "l'autorisation a été annulée",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Échec de l'autorisation Slack",
+ "messenger.slack.installResult.reasons.generic": "une erreur inconnue s'est produite",
+ "messenger.slack.installResult.reasons.invalidState": "la session d'installation a expiré",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack a renvoyé des informations d'application incomplètes",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack a renvoyé des paramètres d'installation incomplets",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack n'a pas renvoyé d'identifiant d'espace de travail",
+ "messenger.slack.installResult.reasons.missingToken": "Slack n'a pas renvoyé de jeton de bot",
+ "messenger.slack.installResult.reasons.persistFailed": "la connexion de l'espace de travail n'a pas pu être enregistrée",
+ "messenger.slack.installResult.success": "Espace de travail Slack connecté.",
+ "messenger.subtitle": "Connectez votre compte au bot officiel LobeHub une fois. Choisissez quel agent reçoit les messages, changez à tout moment depuis ici ou depuis le bot.",
+ "messenger.title": "Messagerie",
+ "messenger.unlinkConfirm": "Déconnecter votre compte {{platform}} de LobeHub ? Les messages entrants s'arrêteront jusqu'à ce que vous envoyiez /start à nouveau.",
+ "messenger.unlinkCta": "Déconnecter",
+ "messenger.unlinkFailed": "Échec de la déconnexion.",
+ "messenger.unlinkSuccess": "Déconnecté.",
+ "messenger.unlinkTitle": "Déconnecter le compte",
+ "verify.confirm.conflict.description": "Ce compte {{platform}} est déjà lié au compte LobeHub {{email}}. Connectez-vous à ce compte pour gérer le lien, ou déconnectez-le là-bas avant de réessayer.",
+ "verify.confirm.conflict.switchAccount": "Se connecter avec un autre compte",
+ "verify.confirm.conflict.title": "Ce compte est déjà lié",
+ "verify.confirm.cta": "Confirmer la liaison",
+ "verify.confirm.defaultAgent": "Agent par défaut",
+ "verify.confirm.defaultAgentHint": "Vos messages seront d'abord dirigés ici. Vous pouvez changer à tout moment via /agents dans le bot ou depuis Paramètres → Messagerie.",
+ "verify.confirm.defaultAgentPlaceholder": "Sélectionnez un agent",
+ "verify.confirm.fields.lobeHubAccount": "Compte LobeHub",
+ "verify.confirm.fields.platformAccount": "Compte {{platform}}",
+ "verify.confirm.fields.workspace": "Espace de travail",
+ "verify.confirm.noAgents": "Vous n'avez pas encore d'agents. Créez-en un dans LobeHub, puis revenez pour terminer la liaison.",
+ "verify.confirm.title": "Confirmer la liaison",
+ "verify.confirm.workspace": "Espace de travail : {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Ce compte est déjà lié à un autre compte LobeHub. Connectez-vous d'abord à ce compte.",
+ "verify.error.expired": "Ce lien a expiré. Veuillez retourner au bot et envoyer /start à nouveau.",
+ "verify.error.generic": "Une erreur s'est produite. Veuillez réessayer.",
+ "verify.error.missingToken": "Lien invalide. Ouvrez cette page depuis le bot.",
+ "verify.error.title": "Impossible de confirmer la liaison",
+ "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.",
+ "verify.success.openBot": "Ouvrir dans {{platform}}",
+ "verify.success.title": "Liaison réussie !"
+}
diff --git a/locales/fr-FR/models.json b/locales/fr-FR/models.json
index dcb957b9941..6d2fc22c957 100644
--- a/locales/fr-FR/models.json
+++ b/locales/fr-FR/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Nouveau modèle de génération vidéo avec des améliorations complètes dans les mouvements corporels, le réalisme physique et le suivi des instructions.",
"MiniMax-M1.description": "Un nouveau modèle de raisonnement interne avec 80 000 chaînes de pensée et 1 million d’entrées, offrant des performances comparables aux meilleurs modèles mondiaux.",
"MiniMax-M2-Stable.description": "Conçu pour un codage efficace et des flux de travail d’agents, avec une plus grande simultanéité pour un usage commercial.",
- "MiniMax-M2.1-Lightning.description": "Capacités de programmation multilingues puissantes avec une inférence plus rapide et plus efficace.",
"MiniMax-M2.1-highspeed.description": "Des capacités de programmation multilingues puissantes, offrant une expérience de programmation entièrement améliorée. Plus rapide et plus efficace.",
"MiniMax-M2.1.description": "MiniMax-M2.1 est un modèle phare open source de MiniMax, conçu pour résoudre des tâches complexes du monde réel. Ses principaux atouts résident dans ses capacités de programmation multilingue et sa faculté à résoudre des problèmes complexes en tant qu'agent.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed : Même performance que M2.5 avec une inférence plus rapide.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku est le modèle le plus rapide et le plus compact d’Anthropic, conçu pour des réponses quasi instantanées avec des performances rapides et précises.",
"claude-3-opus-20240229.description": "Claude 3 Opus est le modèle le plus puissant d’Anthropic pour les tâches complexes, excellent en performance, intelligence, fluidité et compréhension.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet équilibre intelligence et rapidité pour les charges de travail en entreprise, offrant une grande utilité à moindre coût et un déploiement fiable à grande échelle.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 est le modèle Haiku le plus rapide et le plus intelligent d'Anthropic, avec une vitesse fulgurante et une réflexion étendue.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 est le modèle Haiku le plus rapide et le plus intelligent d'Anthropic, avec une vitesse fulgurante et un raisonnement étendu.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 par Anthropic — modèle Haiku de nouvelle génération avec un raisonnement et une vision améliorés.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 est le modèle Haiku le plus rapide et le plus intelligent d’Anthropic, avec une vitesse fulgurante et un raisonnement étendu.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking est une variante avancée capable de révéler son processus de raisonnement.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 est le dernier et le plus performant modèle d'Anthropic pour des tâches hautement complexes, excelle en performance, intelligence, fluidité et compréhension.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 est le modèle le plus récent et le plus performant d'Anthropic pour les tâches hautement complexes, excelling en performance, intelligence, fluidité et compréhension.",
"claude-opus-4-1.description": "Claude Opus 4.1 par Anthropic — modèle de raisonnement premium avec des capacités d'analyse approfondie.",
- "claude-opus-4-20250514.description": "Claude Opus 4 est le modèle le plus puissant d'Anthropic pour des tâches hautement complexes, excelle en performance, intelligence, fluidité et compréhension.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 est le modèle le plus puissant d'Anthropic pour les tâches hautement complexes, excelling en performance, intelligence, fluidité et compréhension.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 est le modèle phare d’Anthropic, combinant intelligence exceptionnelle et performance évolutive, idéal pour les tâches complexes nécessitant des réponses et un raisonnement de très haute qualité.",
"claude-opus-4-5.description": "Claude Opus 4.5 par Anthropic — modèle phare avec un raisonnement et un codage de premier ordre.",
"claude-opus-4-6.description": "Claude Opus 4.6 par Anthropic — modèle phare avec une fenêtre de contexte de 1M et un raisonnement avancé.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 est le modèle le plus intelligent d’Anthropic pour la création d’agents et le codage.",
"claude-opus-4.6.description": "Claude Opus 4.6 est le modèle le plus intelligent d’Anthropic pour la création d’agents et le codage.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking peut produire des réponses quasi instantanées ou une réflexion détaillée étape par étape avec un processus visible.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 est le modèle le plus intelligent d'Anthropic à ce jour, offrant des réponses quasi-instantanées ou une réflexion détaillée étape par étape avec un contrôle précis pour les utilisateurs d'API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 peut produire des réponses quasi instantanées ou un raisonnement détaillé étape par étape avec un processus visible.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 est le modèle le plus intelligent d'Anthropic à ce jour.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 par Anthropic — Sonnet amélioré avec des performances de codage accrues.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 par Anthropic — dernier modèle Sonnet avec un codage supérieur et une utilisation d'outils avancée.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) est un modèle innovant offrant une compréhension linguistique approfondie et une interaction fluide.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 est un modèle de raisonnement nouvelle génération avec un raisonnement complexe renforcé et une chaîne de pensée pour les tâches d’analyse approfondie.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 est un modèle de raisonnement de nouvelle génération avec des capacités renforcées de raisonnement complexe et de chaîne de pensée.",
- "deepseek-chat.description": "Alias de compatibilité pour le mode non-pensant de DeepSeek V4 Flash. Prévu pour être obsolète — utilisez plutôt DeepSeek V4 Flash.",
+ "deepseek-chat.description": "Un nouveau modèle open-source combinant des capacités générales et de codage. Il conserve le dialogue général du modèle de chat et les solides compétences en codage du modèle de programmeur, avec un meilleur alignement des préférences. DeepSeek-V2.5 améliore également l'écriture et le suivi des instructions.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B est un modèle de langage pour le code entraîné sur 2T de tokens (87 % de code, 13 % de texte en chinois/anglais). Il introduit une fenêtre de contexte de 16K et des tâches de remplissage au milieu, offrant une complétion de code à l’échelle du projet et un remplissage de fragments.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 est un modèle de code MoE open source performant sur les tâches de programmation, comparable à GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 est un modèle de code MoE open source performant sur les tâches de programmation, comparable à GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Version complète rapide de DeepSeek R1 avec recherche web en temps réel, combinant des capacités à l’échelle de 671B et des réponses plus rapides.",
"deepseek-r1-online.description": "Version complète de DeepSeek R1 avec 671B de paramètres et recherche web en temps réel, offrant une meilleure compréhension et génération.",
"deepseek-r1.description": "DeepSeek-R1 utilise des données de démarrage à froid avant l’apprentissage par renforcement et affiche des performances comparables à OpenAI-o1 en mathématiques, codage et raisonnement.",
- "deepseek-reasoner.description": "Alias de compatibilité pour le mode pensant de DeepSeek V4 Flash. Prévu pour être obsolète — utilisez plutôt DeepSeek V4 Flash.",
+ "deepseek-reasoner.description": "Alias de compatibilité pour le mode de réflexion Flash de DeepSeek V4. Prévu pour être obsolète — utilisez deepseek-v4-flash à la place.",
"deepseek-v2.description": "DeepSeek V2 est un modèle MoE efficace pour un traitement économique.",
"deepseek-v2:236b.description": "DeepSeek V2 236B est le modèle axé sur le code de DeepSeek avec une forte génération de code.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 est un modèle MoE de 671B paramètres avec des points forts en programmation, compréhension du contexte et traitement de longs textes.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 est un modèle de génération d’image de ByteDance Seed, prenant en charge les entrées texte et image avec une génération d’image de haute qualité et hautement contrôlable. Il génère des images à partir d’invites textuelles.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 est le dernier modèle d'image multimodal de ByteDance, intégrant des capacités de génération de texte en image, d'image en image et de génération d'images par lots, tout en incorporant des compétences en raisonnement et en bon sens. Par rapport à la version précédente 4.0, il offre une qualité de génération nettement améliorée, avec une meilleure cohérence d'édition et une fusion multi-images. Il permet un contrôle plus précis des détails visuels, produisant des textes et des visages plus petits de manière plus naturelle, et atteint une mise en page et des couleurs plus harmonieuses, améliorant l'esthétique globale.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite est le dernier modèle de génération d'images de ByteDance. Pour la première fois, il intègre des capacités de recherche en ligne, lui permettant d'incorporer des informations web en temps réel et d'améliorer la pertinence des images générées. L'intelligence du modèle a également été améliorée, permettant une interprétation précise des instructions complexes et du contenu visuel. De plus, il offre une meilleure couverture des connaissances globales, une cohérence des références et une qualité de génération dans des scénarios professionnels, répondant mieux aux besoins de création visuelle au niveau des entreprises.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 de ByteDance est le modèle de génération vidéo le plus puissant, prenant en charge la génération de vidéos de référence multimodales, le montage vidéo, l'extension vidéo, le texte-à-vidéo et l'image-à-vidéo avec audio synchronisé.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast de ByteDance offre les mêmes capacités que Seedance 2.0 avec des vitesses de génération plus rapides à un prix plus compétitif.",
"emohaa.description": "Emohaa est un modèle de santé mentale doté de compétences professionnelles en conseil pour aider les utilisateurs à comprendre leurs problèmes émotionnels.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B est un modèle léger open source conçu pour un déploiement local et personnalisé.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview est un modèle de prévisualisation avec contexte 8K pour l’évaluation d’ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K est un modèle de réflexion rapide avec un contexte de 32K pour le raisonnement complexe et les dialogues multi-tours.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview est une préversion de modèle de réflexion pour l’évaluation et les tests.",
"ernie-x1.1.description": "ERNIE X1.1 est un modèle de réflexion en aperçu pour évaluation et test.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, développé par l'équipe Seed de ByteDance, prend en charge l'édition et la composition multi-images. Il offre une cohérence accrue des sujets, un suivi précis des instructions, une compréhension de la logique spatiale, une expression esthétique, une mise en page d'affiches et une conception de logos avec un rendu texte-image de haute précision.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, développé par ByteDance Seed, prend en charge les entrées texte et image pour une génération d'images de haute qualité et hautement contrôlable à partir de prompts.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 est un modèle de génération d'images de ByteDance Seed, prenant en charge les entrées texte et image avec une génération d'images hautement contrôlable et de haute qualité. Il génère des images à partir de descriptions textuelles.",
"fal-ai/flux-kontext/dev.description": "Modèle FLUX.1 axé sur l’édition d’images, prenant en charge les entrées texte et image.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] accepte des textes et des images de référence en entrée, permettant des modifications locales ciblées et des transformations globales complexes de scènes.",
"fal-ai/flux/krea.description": "Flux Krea [dev] est un modèle de génération d’images avec une préférence esthétique pour des images plus réalistes et naturelles.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Un puissant modèle natif multimodal de génération d’images.",
"fal-ai/imagen4/preview.description": "Modèle de génération d’images de haute qualité développé par Google.",
"fal-ai/nano-banana.description": "Nano Banana est le modèle multimodal natif le plus récent, le plus rapide et le plus efficace de Google, permettant la génération et l’édition d’images via la conversation.",
- "fal-ai/qwen-image-edit.description": "Un modèle professionnel d'édition d'images de l'équipe Qwen, prenant en charge les modifications sémantiques et d'apparence, l'édition précise de texte en chinois/anglais, le transfert de style, la rotation, et plus encore.",
- "fal-ai/qwen-image.description": "Un puissant modèle de génération d'images de l'équipe Qwen avec un rendu texte chinois robuste et des styles visuels variés.",
+ "fal-ai/qwen-image-edit.description": "Un modèle professionnel d'édition d'images de l'équipe Qwen qui prend en charge les modifications sémantiques et d'apparence, édite précisément le texte en chinois et en anglais, et permet des modifications de haute qualité telles que le transfert de style et la rotation d'objets.",
+ "fal-ai/qwen-image.description": "Un puissant modèle de génération d'images de l'équipe Qwen avec un rendu impressionnant du texte en chinois et des styles visuels variés.",
"flux-1-schnell.description": "Modèle texte-vers-image à 12 milliards de paramètres de Black Forest Labs utilisant la distillation par diffusion latente adversariale pour générer des images de haute qualité en 1 à 4 étapes. Il rivalise avec les alternatives propriétaires et est publié sous licence Apache-2.0 pour un usage personnel, de recherche et commercial.",
"flux-dev.description": "Modèle open source de génération d’images destiné à la R&D, optimisé efficacement pour la recherche d’innovation non commerciale.",
"flux-kontext-max.description": "Génération et édition d’images contextuelles de pointe, combinant texte et images pour des résultats précis et cohérents.",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) est le modèle de génération d'images de Google et prend également en charge le chat multimodal.",
"gemini-3-pro-preview.description": "Gemini 3 Pro est le modèle agent et de codage le plus puissant de Google, offrant des visuels enrichis et une interaction plus poussée grâce à un raisonnement de pointe.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) est le modèle de génération d'images natif le plus rapide de Google avec prise en charge de la réflexion, génération et édition d'images conversationnelles.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) offre une qualité d'image de niveau Pro à une vitesse Flash avec prise en charge du chat multimodal.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) est le modèle de génération d'images natif le plus rapide de Google avec prise en charge de la réflexion, génération et édition d'images conversationnelles.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview est le modèle multimodal le plus économique de Google, optimisé pour les tâches agentiques à haut volume, la traduction et le traitement des données.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview améliore Gemini 3 Pro avec des capacités de raisonnement renforcées et ajoute un support de niveau de réflexion moyen.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro par Google — modèle multimodal premium avec une fenêtre contextuelle de 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Nous sommes ravis de présenter Grok 4 Fast, notre dernière avancée en matière de modèles de raisonnement économiques.",
"grok-4.20-0309-non-reasoning.description": "Une variante sans raisonnement pour des cas d'utilisation simples.",
"grok-4.20-0309-reasoning.description": "Modèle intelligent et ultra-rapide qui raisonne avant de répondre.",
- "grok-4.20-beta-0309-non-reasoning.description": "Une variante non-pensante pour des cas d'utilisation simples",
- "grok-4.20-beta-0309-reasoning.description": "Modèle intelligent et ultra-rapide qui raisonne avant de répondre",
"grok-4.20-multi-agent-0309.description": "Une équipe de 4 ou 16 agents, excelle dans les cas d'utilisation de recherche. Ne prend actuellement pas en charge les outils côté client. Prend uniquement en charge les outils côté serveur xAI (par exemple X Search, outils de recherche Web) et les outils MCP distants.",
"grok-4.3.description": "Le modèle de langage de grande taille le plus axé sur la vérité au monde",
- "grok-4.description": "Notre modèle phare le plus récent et le plus puissant, excelle en NLP, mathématiques et raisonnement — un tout-en-un idéal.",
+ "grok-4.description": "Dernier modèle phare Grok avec des performances inégalées en langage, mathématiques et raisonnement — un véritable polyvalent. Actuellement pointé vers grok-4-0709 ; en raison de ressources limitées, son prix est temporairement 10 % plus élevé que le tarif officiel et devrait revenir au prix officiel ultérieurement.",
"grok-code-fast-1.description": "Nous sommes ravis de lancer grok-code-fast-1, un modèle de raisonnement rapide et économique, excellent pour le codage agentique.",
"grok-imagine-image-pro.description": "Générez des images à partir de prompts textuels, modifiez des images existantes avec un langage naturel ou affinez les images de manière itérative via des conversations multi-tours.",
"grok-imagine-image.description": "Générez des images à partir de prompts textuels, modifiez des images existantes avec un langage naturel ou affinez les images de manière itérative via des conversations multi-tours.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ est un modèle de raisonnement de la famille Qwen. Comparé aux modèles classiques ajustés par instruction, il apporte des capacités de réflexion et de raisonnement qui améliorent considérablement les performances en aval, notamment sur les problèmes complexes. QwQ-32B est un modèle de raisonnement de taille moyenne qui rivalise avec les meilleurs modèles comme DeepSeek-R1 et o1-mini.",
"qwq_32b.description": "Modèle de raisonnement de taille moyenne de la famille Qwen. Comparé aux modèles classiques ajustés par instruction, les capacités de réflexion et de raisonnement de QwQ améliorent considérablement les performances en aval, notamment sur les problèmes complexes.",
"r1-1776.description": "R1-1776 est une variante post-entraînée de DeepSeek R1 conçue pour fournir des informations factuelles non censurées et impartiales.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro de ByteDance prend en charge le texte-à-vidéo, l'image-à-vidéo (première image, première+dernière image) et la génération audio synchronisée avec les visuels.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite par BytePlus propose une génération augmentée par récupération web pour des informations en temps réel, une interprétation améliorée des prompts complexes et une meilleure cohérence des références pour la création visuelle professionnelle.",
"solar-mini-ja.description": "Solar Mini (Ja) étend Solar Mini avec un accent sur le japonais tout en maintenant des performances efficaces et solides en anglais et en coréen.",
"solar-mini.description": "Solar Mini est un modèle LLM compact surpassant GPT-3.5, avec de solides capacités multilingues en anglais et en coréen, offrant une solution efficace à faible empreinte.",
"solar-pro.description": "Solar Pro est un LLM intelligent développé par Upstage, axé sur le suivi d'instructions sur un seul GPU, avec des scores IFEval supérieurs à 80. Il prend actuellement en charge l'anglais ; la version complète est prévue pour novembre 2024 avec un support linguistique élargi et un contexte plus long.",
diff --git a/locales/fr-FR/providers.json b/locales/fr-FR/providers.json
index ba3e58742e0..cc72e426dfc 100644
--- a/locales/fr-FR/providers.json
+++ b/locales/fr-FR/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Fondée en 2020, Jina AI est une entreprise leader en IA de recherche. Sa pile technologique comprend des modèles vectoriels, des rerankers et de petits modèles linguistiques pour créer des applications de recherche générative et multimodale fiables et de haute qualité.",
"kimicodingplan.description": "Kimi Code de Moonshot AI offre un accès aux modèles Kimi, y compris K2.5, pour des tâches de codage.",
"lmstudio.description": "LM Studio est une application de bureau pour développer et expérimenter avec des LLMs sur votre ordinateur.",
- "lobehub.description": "LobeHub Cloud utilise des API officielles pour accéder aux modèles d'IA et mesure l'utilisation avec des Crédits liés aux jetons des modèles.",
"longcat.description": "LongCat est une série de grands modèles d'IA générative développés indépendamment par Meituan. Elle est conçue pour améliorer la productivité interne de l'entreprise et permettre des applications innovantes grâce à une architecture informatique efficace et de puissantes capacités multimodales.",
"minimax.description": "Fondée en 2021, MiniMax développe une IA généraliste avec des modèles fondamentaux multimodaux, incluant des modèles texte MoE à un billion de paramètres, des modèles vocaux et visuels, ainsi que des applications comme Hailuo AI.",
"minimaxcodingplan.description": "Le plan de jetons MiniMax offre un accès aux modèles MiniMax, y compris M2.7, pour des tâches de codage via un abonnement à tarif fixe.",
diff --git a/locales/fr-FR/setting.json b/locales/fr-FR/setting.json
index 1eb9fee12cf..c0973cfaed0 100644
--- a/locales/fr-FR/setting.json
+++ b/locales/fr-FR/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Remplir manuellement",
"tab.manualFill.desc": "Configurer manuellement une compétence MCP personnalisée",
"tab.memory": "Mémoire",
+ "tab.messenger": "Messager",
"tab.notification": "Notifications",
"tab.profile": "Mon compte",
"tab.provider": "Fournisseur d’IA",
diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.json
index 4a98d0c989e..e2211f35d08 100644
--- a/locales/it-IT/chat.json
+++ b/locales/it-IT/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Approva automaticamente tutte le esecuzioni degli strumenti",
"tool.intervention.mode.manual": "Manuale",
"tool.intervention.mode.manualDesc": "Richiede approvazione manuale per ogni invocazione",
- "tool.intervention.onboarding.agentIdentity.applyHint": "La nuova identità apparirà dopo l’approvazione.",
- "tool.intervention.onboarding.agentIdentity.description": "Approvare questa modifica aggiorna l’Agente mostrato nella Inbox e in questa conversazione di onboarding.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Avatar agente",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Approvazione onboarding",
- "tool.intervention.onboarding.agentIdentity.name": "Nome agente",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Agente Inbox",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Agente di onboarding attuale",
- "tool.intervention.onboarding.agentIdentity.targets": "Si applica a",
"tool.intervention.onboarding.agentIdentity.title": "Conferma aggiornamento identità dell’agente",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Aggiornerò il mio avatar",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Aggiornerò il mio nome",
"tool.intervention.onboarding.userProfile.applyHint": "Questi dettagli verranno salvati nel tuo profilo dopo l'approvazione.",
"tool.intervention.onboarding.userProfile.description": "Approvando questa modifica, il tuo profilo di onboarding verrà aggiornato in modo che l'Agente possa personalizzare le risposte future.",
"tool.intervention.onboarding.userProfile.eyebrow": "Approvazione onboarding",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Aggiornato {{time}}",
"workingPanel.resources.viewMode.list": "Vista elenco",
"workingPanel.resources.viewMode.tree": "Vista ad albero",
+ "workingPanel.review.baseRef.default": "predefinito",
+ "workingPanel.review.baseRef.loading": "Caricamento rami…",
+ "workingPanel.review.baseRef.reset": "Reimposta al ramo predefinito",
+ "workingPanel.review.baseRef.unresolved": "Seleziona un ramo di base",
"workingPanel.review.binary": "File binario — diff non mostrato",
"workingPanel.review.collapseAll": "Comprimi tutto",
"workingPanel.review.copied": "Percorso copiato",
"workingPanel.review.copyPath": "Copia percorso file",
"workingPanel.review.empty": "Nessuna modifica nell'albero di lavoro",
+ "workingPanel.review.empty.branch": "Nessuna modifica rispetto a {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Impossibile determinare il ramo predefinito remoto. Esegui `git remote set-head origin --auto` nel tuo terminale.",
"workingPanel.review.error": "Impossibile caricare il diff di questo file",
"workingPanel.review.expandAll": "Espandi tutto",
+ "workingPanel.review.mode.branch": "Ramo",
+ "workingPanel.review.mode.unstaged": "Non aggiunto",
"workingPanel.review.more": "Altre opzioni",
"workingPanel.review.refresh": "Aggiorna",
"workingPanel.review.textDiff.disable": "Disabilita differenza di testo in linea",
diff --git a/locales/it-IT/labs.json b/locales/it-IT/labs.json
index e72065d64ca..6c0eb676fbf 100644
--- a/locales/it-IT/labs.json
+++ b/locales/it-IT/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Chat di Gruppo (Multi-Agente)",
"features.inputMarkdown.desc": "Visualizza in tempo reale il Markdown nell'area di input (testo in grassetto, blocchi di codice, tabelle, ecc.).",
"features.inputMarkdown.title": "Rendering Markdown in Input",
+ "features.messenger.desc": "Parla con i tuoi agenti tramite Telegram (e altri messenger) attraverso il bot condiviso di LobeHub. Aggiunge una scheda Messenger nelle Impostazioni per collegare il tuo account e scegliere quale agente riceve i messaggi.",
+ "features.messenger.title": "Messenger",
"title": "Laboratori"
}
diff --git a/locales/it-IT/messenger.json b/locales/it-IT/messenger.json
new file mode 100644
index 00000000000..66c548e3bea
--- /dev/null
+++ b/locales/it-IT/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Agente attivo",
+ "messenger.activeAgentPlaceholder": "Seleziona un agente",
+ "messenger.detail.addServer": "Aggiungi server",
+ "messenger.detail.addWorkspace": "Aggiungi workspace",
+ "messenger.detail.connections.connected": "Connesso",
+ "messenger.detail.connections.empty": "Apri il bot e invia /start per collegare il tuo account.",
+ "messenger.detail.connections.linkHint": "Workspace installato. Apri Slack e invia un DM al bot per completare il collegamento del tuo account personale.",
+ "messenger.detail.connections.pending": "In sospeso",
+ "messenger.detail.connections.serverLabel": "server",
+ "messenger.detail.connections.title": "Connessioni",
+ "messenger.detail.connections.userLabel": "utente",
+ "messenger.detail.connections.workspaceLabel": "workspace",
+ "messenger.detail.disconnect": "Disconnetti",
+ "messenger.discord.connectModal.description": "Aggiungi il bot LobeHub a un server Discord che gestisci.",
+ "messenger.discord.connectModal.inviteButton": "Aggiungi al server Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord non è disponibile al momento. Riprova più tardi.",
+ "messenger.discord.connectModal.title": "Aggiungi il bot al tuo server",
+ "messenger.discord.connections.disconnectConfirm": "Rimuovere questo server dalla tua lista di audit? Il bot rimarrà nel server finché un amministratore del server non lo rimuove.",
+ "messenger.discord.connections.disconnectFailed": "Impossibile rimuovere il server.",
+ "messenger.discord.connections.disconnectSuccess": "Server rimosso.",
+ "messenger.discord.connections.disconnectTitle": "Rimuovi server",
+ "messenger.discord.userPending.cta": "Apri in Discord",
+ "messenger.discord.userPending.hint": "Apri il bot in Discord e invia un messaggio per completare il collegamento del tuo account.",
+ "messenger.discord.userPending.name": "Non ancora collegato",
+ "messenger.error.agentNotFound": "Agente non trovato.",
+ "messenger.error.disconnectNotAllowed": "Puoi disconnettere solo le installazioni che hai avviato.",
+ "messenger.error.installationNotFound": "Installazione non trovata.",
+ "messenger.error.linkRequired": "Apri il bot e invia /start prima di modificare questa connessione.",
+ "messenger.error.pickDefaultAgent": "Seleziona un agente predefinito prima di confermare.",
+ "messenger.error.platformNotConfigured": "Questa piattaforma di messaggistica non è disponibile al momento. Riprova più tardi.",
+ "messenger.linkCta": "Connetti",
+ "messenger.linkModal.continueIn": "Continua la configurazione in {{platform}}",
+ "messenger.linkModal.instructions": "Apri il bot, invia /start, quindi tocca \"Collega Account\" per connettere il tuo account LobeHub.",
+ "messenger.linkModal.notConfigured": "Questa connessione non è disponibile al momento. Riprova più tardi.",
+ "messenger.linkModal.openCta": "Apri in {{platform}}",
+ "messenger.linkModal.scanHint": "Oppure scansiona con il tuo telefono per aprire {{platform}}.",
+ "messenger.linkModal.title": "Connetti Messenger",
+ "messenger.list.discord.description": "Chatta con i tuoi agenti LobeHub da qualsiasi server Discord tramite DM con il bot LobeHub.",
+ "messenger.list.slack.description": "Chatta con i tuoi agenti LobeHub da qualsiasi workspace Slack tramite DM o @LobeHub.",
+ "messenger.list.telegram.description": "Chatta con i tuoi agenti LobeHub in Telegram e scegli chi risponde da qualsiasi luogo.",
+ "messenger.noPlatformsConfigured": "Nessuna piattaforma è ancora disponibile. Torna presto.",
+ "messenger.setActiveFailed": "Impossibile impostare come attivo.",
+ "messenger.setActiveSuccess": "Agente attivo aggiornato.",
+ "messenger.slack.connectModal.continueButton": "Continua in Slack",
+ "messenger.slack.connectModal.description": "Verrai reindirizzato a Slack per autorizzare l'installazione del workspace LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack non è disponibile al momento. Riprova più tardi.",
+ "messenger.slack.connectModal.title": "Continua la configurazione in Slack",
+ "messenger.slack.connections.disconnectConfirm": "Disconnettere il bot LobeHub da questo workspace Slack? I collegamenti utente esistenti saranno sospesi finché non reinstalli.",
+ "messenger.slack.connections.disconnectFailed": "Impossibile disconnettere.",
+ "messenger.slack.connections.disconnectSuccess": "Workspace disconnesso.",
+ "messenger.slack.connections.disconnectTitle": "Disconnetti workspace",
+ "messenger.slack.installBlocked.dismiss": "Capito",
+ "messenger.slack.installBlocked.suggestion": "Invia un DM a @LobeHub in Slack per collegare il tuo account personale — non è necessario reinstallare. Oppure chiedi all'installatore originale di disconnettere questo workspace prima se vuoi assumere la proprietà.",
+ "messenger.slack.installBlocked.title": "Workspace già connesso",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" è già connesso a LobeHub da un altro utente.",
+ "messenger.slack.installBlocked.withoutName": "Questo workspace Slack è già connesso a LobeHub da un altro utente.",
+ "messenger.slack.installResult.failed": "Installazione Slack fallita ({{reason}}). Riprova o contatta il supporto.",
+ "messenger.slack.installResult.reasons.accessDenied": "l'autorizzazione è stata annullata",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Autorizzazione Slack fallita",
+ "messenger.slack.installResult.reasons.generic": "si è verificato un errore sconosciuto",
+ "messenger.slack.installResult.reasons.invalidState": "la sessione di installazione è scaduta",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack ha restituito informazioni incomplete sull'app",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack ha restituito parametri di installazione incompleti",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack non ha restituito un identificatore del workspace",
+ "messenger.slack.installResult.reasons.missingToken": "Slack non ha restituito un token bot",
+ "messenger.slack.installResult.reasons.persistFailed": "la connessione al workspace non è stata salvata",
+ "messenger.slack.installResult.success": "Workspace Slack connesso.",
+ "messenger.subtitle": "Connetti il tuo account al bot ufficiale LobeHub una sola volta. Scegli quale agente riceve i messaggi, cambia in qualsiasi momento da qui o dal bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Disconnettere il tuo account {{platform}} da LobeHub? I messaggi in entrata si fermeranno finché non invii nuovamente /start.",
+ "messenger.unlinkCta": "Disconnetti",
+ "messenger.unlinkFailed": "Impossibile disconnettere.",
+ "messenger.unlinkSuccess": "Disconnesso.",
+ "messenger.unlinkTitle": "Disconnetti account",
+ "verify.confirm.conflict.description": "Questo account {{platform}} è già collegato all'account LobeHub {{email}}. Accedi a quell'account per gestire il collegamento o scollegalo lì prima di riprovare.",
+ "verify.confirm.conflict.switchAccount": "Accedi con un altro account",
+ "verify.confirm.conflict.title": "Questo account è già collegato",
+ "verify.confirm.cta": "Conferma collegamento",
+ "verify.confirm.defaultAgent": "Agente predefinito",
+ "verify.confirm.defaultAgentHint": "I tuoi messaggi saranno indirizzati qui per primi. Puoi cambiare in qualsiasi momento tramite /agents nel bot o da Impostazioni → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Seleziona un agente",
+ "verify.confirm.fields.lobeHubAccount": "Account LobeHub",
+ "verify.confirm.fields.platformAccount": "Account {{platform}}",
+ "verify.confirm.fields.workspace": "Workspace",
+ "verify.confirm.noAgents": "Non hai ancora agenti. Creane uno in LobeHub, quindi torna per completare il collegamento.",
+ "verify.confirm.title": "Conferma collegamento",
+ "verify.confirm.workspace": "Workspace: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Questo account è già collegato a un altro account LobeHub. Accedi prima a quell'account.",
+ "verify.error.expired": "Questo collegamento è scaduto. Torna al bot e invia nuovamente /start.",
+ "verify.error.generic": "Qualcosa è andato storto. Riprova.",
+ "verify.error.missingToken": "Collegamento non valido. Apri questa pagina dal bot.",
+ "verify.error.title": "Impossibile confermare il collegamento",
+ "verify.labRequired.description": "Messenger è attualmente una funzionalità Labs. Abilitala in Impostazioni → Avanzate → Labs e ricarica questa pagina.",
+ "verify.labRequired.openSettings": "Apri impostazioni Labs",
+ "verify.labRequired.title": "Abilita Messenger per continuare",
+ "verify.signInCta": "Accedi per continuare",
+ "verify.signInRequired": "Accedi a LobeHub per confermare il collegamento.",
+ "verify.success.description": "Il tuo account è ora connesso a {{platform}}. Apri {{platform}} e invia il tuo primo messaggio.",
+ "verify.success.openBot": "Apri in {{platform}}",
+ "verify.success.title": "Collegamento riuscito!"
+}
diff --git a/locales/it-IT/models.json b/locales/it-IT/models.json
index 1da8bd76d87..0d52a4b5d22 100644
--- a/locales/it-IT/models.json
+++ b/locales/it-IT/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Nuovo modello di generazione video con aggiornamenti completi nei movimenti del corpo, realismo fisico e aderenza alle istruzioni.",
"MiniMax-M1.description": "Nuovo modello di ragionamento proprietario con 80K chain-of-thought e 1M di input, con prestazioni comparabili ai migliori modelli globali.",
"MiniMax-M2-Stable.description": "Progettato per flussi di lavoro di codifica e agenti efficienti, con maggiore concorrenza per l'uso commerciale.",
- "MiniMax-M2.1-Lightning.description": "Potenti capacità di programmazione multilingue con inferenza più veloce ed efficiente.",
"MiniMax-M2.1-highspeed.description": "Potenti capacità di programmazione multilingue, esperienza di programmazione completamente aggiornata. Più veloce ed efficiente.",
"MiniMax-M2.1.description": "MiniMax-M2.1 è un modello open-source di punta di MiniMax, progettato per affrontare compiti complessi del mondo reale. I suoi punti di forza principali sono le capacità di programmazione multilingue e la risoluzione di compiti complessi come agente.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Stesse prestazioni di M2.5 con inferenza più veloce.",
@@ -320,11 +319,11 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku è il modello più veloce e compatto di Anthropic, progettato per risposte quasi istantanee con prestazioni rapide e accurate.",
"claude-3-opus-20240229.description": "Claude 3 Opus è il modello più potente di Anthropic per compiti altamente complessi, eccellendo in prestazioni, intelligenza, fluidità e comprensione.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet bilancia intelligenza e velocità per carichi di lavoro aziendali, offrendo alta utilità a costi inferiori e distribuzione affidabile su larga scala.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 è il modello Haiku più veloce e intelligente di Anthropic, con velocità fulminea e pensiero esteso.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 è il modello Haiku più veloce e intelligente di Anthropic, con velocità fulminea e ragionamento esteso.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 di Anthropic — Haiku di nuova generazione con ragionamento e visione migliorati.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 è il modello Haiku più veloce e intelligente di Anthropic, con velocità fulminea e capacità di ragionamento estese.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking è una variante avanzata in grado di mostrare il proprio processo di ragionamento.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 è il modello più recente e capace di Anthropic per compiti altamente complessi, eccellendo in prestazioni, intelligenza, fluidità e comprensione.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 è l'ultimo e più avanzato modello di Anthropic per compiti altamente complessi, eccellendo in prestazioni, intelligenza, fluidità e comprensione.",
"claude-opus-4-1.description": "Claude Opus 4.1 di Anthropic — modello premium di ragionamento con capacità di analisi approfondita.",
"claude-opus-4-20250514.description": "Claude Opus 4 è il modello più potente di Anthropic per compiti altamente complessi, eccellendo in prestazioni, intelligenza, fluidità e comprensione.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 è il modello di punta di Anthropic, che combina intelligenza eccezionale e prestazioni scalabili, ideale per compiti complessi che richiedono risposte e ragionamenti di altissima qualità.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 è il modello più intelligente di Anthropic per la creazione di agenti e la programmazione.",
"claude-opus-4.6.description": "Claude Opus 4.6 è il modello più intelligente di Anthropic per la creazione di agenti e la programmazione.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking può produrre risposte quasi istantanee o riflessioni estese passo dopo passo con processo visibile.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 è il modello più intelligente di Anthropic fino ad oggi, offrendo risposte quasi istantanee o pensiero esteso passo-passo con controllo dettagliato per gli utenti API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 può produrre risposte quasi istantanee o ragionamenti estesi passo dopo passo con un processo visibile.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 è il modello più intelligente di Anthropic fino ad oggi.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 di Anthropic — Sonnet migliorato con prestazioni di codifica avanzate.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 di Anthropic — ultimo Sonnet con codifica superiore e utilizzo di strumenti.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) è un modello innovativo che offre una profonda comprensione linguistica e interazione.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 è un modello di nuova generazione per il ragionamento, con capacità avanzate di ragionamento complesso e chain-of-thought per compiti di analisi approfondita.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 è un modello di ragionamento di nuova generazione con capacità avanzate di ragionamento complesso e catena di pensiero.",
- "deepseek-chat.description": "Alias di compatibilità per la modalità non pensante di DeepSeek V4 Flash. Destinato alla deprecazione — utilizzare DeepSeek V4 Flash invece.",
+ "deepseek-chat.description": "Un nuovo modello open-source che combina capacità generali e di codifica. Preserva il dialogo generale del modello di chat e la forte capacità di codifica del modello coder, con un migliore allineamento delle preferenze. DeepSeek-V2.5 migliora anche la scrittura e il seguire le istruzioni.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B è un modello linguistico per il codice addestrato su 2 trilioni di token (87% codice, 13% testo in cinese/inglese). Introduce una finestra di contesto da 16K e compiti di completamento intermedio, offrendo completamento di codice a livello di progetto e riempimento di snippet.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 è un modello MoE open-source per il codice che ottiene ottimi risultati nei compiti di programmazione, comparabile a GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 è un modello MoE open-source per il codice che ottiene ottimi risultati nei compiti di programmazione, comparabile a GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 versione completa veloce con ricerca web in tempo reale, che combina capacità su scala 671B e risposte rapide.",
"deepseek-r1-online.description": "DeepSeek R1 versione completa con 671 miliardi di parametri e ricerca web in tempo reale, che offre una comprensione e generazione più avanzate.",
"deepseek-r1.description": "DeepSeek-R1 utilizza dati cold-start prima dell'RL e ottiene prestazioni comparabili a OpenAI-o1 in matematica, programmazione e ragionamento.",
- "deepseek-reasoner.description": "Alias di compatibilità per la modalità pensante di DeepSeek V4 Flash. Destinato alla deprecazione — utilizzare DeepSeek V4 Flash invece.",
+ "deepseek-reasoner.description": "Alias di compatibilità per la modalità di pensiero Flash di DeepSeek V4. Programmato per la deprecazione — utilizzare deepseek-v4-flash al suo posto.",
"deepseek-v2.description": "DeepSeek V2 è un modello MoE efficiente per un'elaborazione conveniente.",
"deepseek-v2:236b.description": "DeepSeek V2 236B è il modello DeepSeek focalizzato sul codice con forte capacità di generazione.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 è un modello MoE con 671 miliardi di parametri, con punti di forza nella programmazione, capacità tecnica, comprensione del contesto e gestione di testi lunghi.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 è un modello di generazione di immagini di ByteDance Seed, che supporta input di testo e immagini con generazione di immagini di alta qualità e altamente controllabile. Genera immagini da prompt testuali.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 è l'ultimo modello multimodale di ByteDance, che integra capacità di generazione da testo a immagine, immagine a immagine e generazione di immagini in batch, incorporando anche conoscenze di senso comune e capacità di ragionamento. Rispetto alla versione precedente 4.0, offre una qualità di generazione significativamente migliorata, con una maggiore coerenza nell'editing e nella fusione di più immagini. Offre un controllo più preciso sui dettagli visivi, producendo testi e volti piccoli in modo più naturale, e raggiunge una disposizione e una colorazione più armoniose, migliorando l'estetica complessiva.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite è l'ultimo modello di generazione di immagini di ByteDance. Per la prima volta, integra capacità di recupero online, consentendo di incorporare informazioni web in tempo reale e migliorare la tempestività delle immagini generate. L'intelligenza del modello è stata inoltre aggiornata, consentendo un'interpretazione precisa di istruzioni complesse e contenuti visivi. Inoltre, offre una copertura globale della conoscenza migliorata, una maggiore coerenza di riferimento e una qualità di generazione superiore in scenari professionali, soddisfacendo meglio le esigenze di creazione visiva a livello aziendale.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 di ByteDance è il modello di generazione video più potente, supportando la generazione di video di riferimento multimodale, editing video, estensione video, testo-a-video e immagine-a-video con audio sincronizzato.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast di ByteDance offre le stesse capacità di Seedance 2.0 con velocità di generazione più rapide a un prezzo più competitivo.",
"emohaa.description": "Emohaa è un modello per la salute mentale con capacità di consulenza professionale per aiutare gli utenti a comprendere le problematiche emotive.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B è un modello open-source leggero per implementazioni locali e personalizzate.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview è un modello di anteprima con finestra contestuale da 8K per la valutazione di ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K è un modello di pensiero veloce con contesto da 32K per ragionamento complesso e chat multi-turno.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview è un’anteprima del modello di pensiero per valutazioni e test.",
"ernie-x1.1.description": "ERNIE X1.1 è un'anteprima del modello di pensiero per valutazione e test.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, sviluppato dal team Seed di ByteDance, supporta l'editing e la composizione multi-immagine. Caratteristiche includono coerenza del soggetto migliorata, seguito preciso delle istruzioni, comprensione della logica spaziale, espressione estetica, layout di poster e design di loghi con rendering testo-immagine ad alta precisione.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, sviluppato da ByteDance Seed, supporta input di testo e immagini per la generazione di immagini altamente controllabile e di alta qualità a partire da prompt.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 è un modello di generazione di immagini di ByteDance Seed, che supporta input di testo e immagini con una generazione di immagini altamente controllabile e di alta qualità. Genera immagini da prompt testuali.",
"fal-ai/flux-kontext/dev.description": "FLUX.1 è un modello focalizzato sull’editing di immagini, che supporta input di testo e immagini.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] accetta testo e immagini di riferimento come input, consentendo modifiche locali mirate e trasformazioni complesse della scena globale.",
"fal-ai/flux/krea.description": "Flux Krea [dev] è un modello di generazione di immagini con una preferenza estetica per immagini più realistiche e naturali.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Un potente modello nativo multimodale per la generazione di immagini.",
"fal-ai/imagen4/preview.description": "Modello di generazione di immagini di alta qualità sviluppato da Google.",
"fal-ai/nano-banana.description": "Nano Banana è il modello multimodale nativo più recente, veloce ed efficiente di Google, che consente la generazione e l’editing di immagini tramite conversazione.",
- "fal-ai/qwen-image-edit.description": "Un modello professionale di editing immagini del team Qwen, che supporta modifiche semantiche e di aspetto, editing preciso di testo in cinese/inglese, trasferimento di stile, rotazione e altro.",
- "fal-ai/qwen-image.description": "Un potente modello di generazione immagini del team Qwen con forte rendering di testo in cinese e stili visivi diversificati.",
+ "fal-ai/qwen-image-edit.description": "Un modello professionale di editing di immagini del team Qwen che supporta modifiche semantiche e di aspetto, modifica con precisione testi in cinese e inglese, e consente modifiche di alta qualità come trasferimento di stile e rotazione di oggetti.",
+ "fal-ai/qwen-image.description": "Un potente modello di generazione di immagini del team Qwen con un'impressionante resa del testo in cinese e stili visivi diversificati.",
"flux-1-schnell.description": "Modello testo-immagine da 12 miliardi di parametri di Black Forest Labs che utilizza la distillazione latente avversariale per generare immagini di alta qualità in 1-4 passaggi. Con licenza Apache-2.0 per uso personale, di ricerca e commerciale.",
"flux-dev.description": "Modello open-source per la ricerca e sviluppo nella generazione di immagini, ottimizzato in modo efficiente per la ricerca innovativa non commerciale.",
"flux-kontext-max.description": "Generazione ed editing di immagini contestuali all’avanguardia, combinando testo e immagini per risultati precisi e coerenti.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash è il modello più intelligente progettato per la velocità, che combina intelligenza all'avanguardia con un eccellente ancoraggio alla ricerca.",
"gemini-3-flash.description": "Gemini 3 Flash di Google — modello ultra-veloce con supporto per input multimodali.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) è il modello di generazione di immagini di Google che supporta anche il dialogo multimodale.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) è il modello di generazione immagini di Google e supporta anche la chat multimodale.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) è il modello di generazione di immagini di Google e supporta anche la chat multimodale.",
"gemini-3-pro-preview.description": "Gemini 3 Pro è il modello più potente di Google per agenti e codifica creativa, offrendo visuali più ricche e interazioni più profonde grazie a un ragionamento all'avanguardia.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) è il modello di generazione di immagini nativo più veloce di Google con supporto al pensiero, generazione e modifica di immagini conversazionali.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) offre qualità di immagine di livello Pro a velocità Flash con supporto per la chat multimodale.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) è il modello di generazione di immagini nativo più veloce di Google con supporto al pensiero, generazione conversazionale di immagini ed editing.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview è il modello multimodale più economico di Google, ottimizzato per compiti agentici ad alto volume, traduzione e elaborazione dati.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview migliora Gemini 3 Pro con capacità di ragionamento avanzate e aggiunge supporto per un livello di pensiero medio.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro di Google — modello multimodale premium con finestra di contesto da 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Siamo entusiasti di presentare Grok 4 Fast, il nostro ultimo progresso nei modelli di ragionamento a basso costo.",
"grok-4.20-0309-non-reasoning.description": "Una variante senza ragionamento per casi d'uso semplici.",
"grok-4.20-0309-reasoning.description": "Modello intelligente e velocissimo che ragiona prima di rispondere.",
- "grok-4.20-beta-0309-non-reasoning.description": "Una variante non pensante per casi d'uso semplici",
- "grok-4.20-beta-0309-reasoning.description": "Modello intelligente e ultra-veloce che ragiona prima di rispondere",
"grok-4.20-multi-agent-0309.description": "Un team di 4 o 16 agenti, eccelle nei casi d'uso di ricerca, non supporta attualmente strumenti client-side. Supporta solo strumenti server-side xAI (es. X Search, strumenti di ricerca web) e strumenti MCP remoti.",
"grok-4.3.description": "Il modello linguistico di grandi dimensioni più orientato alla verità al mondo",
- "grok-4.description": "Il nostro modello di punta più nuovo e forte, eccellente in NLP, matematica e ragionamento—un tuttofare ideale.",
+ "grok-4.description": "Ultimo modello di punta Grok con prestazioni ineguagliabili in linguaggio, matematica e ragionamento — un vero tuttofare. Attualmente punta a grok-4-0709; a causa di risorse limitate, il prezzo è temporaneamente superiore del 10% rispetto al prezzo ufficiale e si prevede un ritorno al prezzo ufficiale in seguito.",
"grok-code-fast-1.description": "Siamo entusiasti di lanciare grok-code-fast-1, un modello di ragionamento veloce ed economico che eccelle nella programmazione agentica.",
"grok-imagine-image-pro.description": "Genera immagini da prompt testuali, modifica immagini esistenti con linguaggio naturale o affina iterativamente le immagini attraverso conversazioni multi-turno.",
"grok-imagine-image.description": "Genera immagini da prompt testuali, modifica immagini esistenti con linguaggio naturale o affina iterativamente le immagini attraverso conversazioni multi-turno.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ è un modello di ragionamento della famiglia Qwen. Rispetto ai modelli standard ottimizzati per istruzioni, offre capacità di pensiero e ragionamento che migliorano significativamente le prestazioni nei compiti difficili. QwQ-32B è un modello di medie dimensioni che compete con i migliori modelli di ragionamento come DeepSeek-R1 e o1-mini.",
"qwq_32b.description": "Modello di ragionamento di medie dimensioni della famiglia Qwen. Rispetto ai modelli standard ottimizzati per istruzioni, le capacità di pensiero e ragionamento di QwQ migliorano significativamente le prestazioni nei compiti difficili.",
"r1-1776.description": "R1-1776 è una variante post-addestrata di DeepSeek R1 progettata per fornire informazioni fattuali non censurate e imparziali.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro di ByteDance supporta testo-a-video, immagine-a-video (prima immagine, prima+ultima immagine) e generazione audio sincronizzata con i visual.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite di BytePlus presenta generazione aumentata da recupero web per informazioni in tempo reale, interpretazione migliorata di prompt complessi e coerenza di riferimento migliorata per la creazione visiva professionale.",
"solar-mini-ja.description": "Solar Mini (Ja) estende Solar Mini con un focus sul giapponese, mantenendo prestazioni efficienti e solide in inglese e coreano.",
"solar-mini.description": "Solar Mini è un LLM compatto che supera GPT-3.5, con forte capacità multilingue in inglese e coreano, offrendo una soluzione efficiente e leggera.",
"solar-pro.description": "Solar Pro è un LLM ad alta intelligenza di Upstage, focalizzato sull’esecuzione di istruzioni su una singola GPU, con punteggi IFEval superiori a 80. Attualmente supporta l’inglese; il rilascio completo è previsto per novembre 2024 con supporto linguistico ampliato e contesto più lungo.",
diff --git a/locales/it-IT/providers.json b/locales/it-IT/providers.json
index 66cfde2e34e..aca1986b828 100644
--- a/locales/it-IT/providers.json
+++ b/locales/it-IT/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Fondata nel 2020, Jina AI è un'azienda leader nell'AI per la ricerca. Il suo stack include modelli vettoriali, reranker e piccoli modelli linguistici per costruire app di ricerca generativa e multimodale affidabili e di alta qualità.",
"kimicodingplan.description": "Kimi Code di Moonshot AI offre accesso ai modelli Kimi, inclusi K2.5, per attività di codifica.",
"lmstudio.description": "LM Studio è un'app desktop per sviluppare e sperimentare con LLM direttamente sul tuo computer.",
- "lobehub.description": "LobeHub Cloud utilizza API ufficiali per accedere ai modelli di intelligenza artificiale e misura l'utilizzo con Crediti legati ai token dei modelli.",
"longcat.description": "LongCat è una serie di modelli AI generativi di grandi dimensioni sviluppati indipendentemente da Meituan. È progettato per migliorare la produttività interna dell'azienda e consentire applicazioni innovative attraverso un'architettura computazionale efficiente e potenti capacità multimodali.",
"minimax.description": "Fondata nel 2021, MiniMax sviluppa AI generali con modelli fondamentali multimodali, inclusi modelli testuali MoE da trilioni di parametri, modelli vocali e visivi, oltre ad app come Hailuo AI.",
"minimaxcodingplan.description": "Il piano di token MiniMax offre accesso ai modelli MiniMax, inclusi M2.7, per attività di codifica tramite un abbonamento a tariffa fissa.",
diff --git a/locales/it-IT/setting.json b/locales/it-IT/setting.json
index 83b42c54586..4d1200c89dc 100644
--- a/locales/it-IT/setting.json
+++ b/locales/it-IT/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Compila Manualmente",
"tab.manualFill.desc": "Configura manualmente una skill MCP personalizzata",
"tab.memory": "Memoria",
+ "tab.messenger": "Messaggero",
"tab.notification": "Notifiche",
"tab.profile": "Il Mio Account",
"tab.provider": "Fornitore Servizi AI",
diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.json
index 38b310b6d0a..aba8f1aa33a 100644
--- a/locales/ja-JP/chat.json
+++ b/locales/ja-JP/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "すべてのスキル呼び出しを自動承認",
"tool.intervention.mode.manual": "手動承認",
"tool.intervention.mode.manualDesc": "毎回の手動承認が必要",
- "tool.intervention.onboarding.agentIdentity.applyHint": "新しいアイデンティティは承認後に表示されます。",
- "tool.intervention.onboarding.agentIdentity.description": "この変更を承認すると、受信箱およびこのオンボーディング会話で表示されるエージェントが更新されます。",
- "tool.intervention.onboarding.agentIdentity.emoji": "エージェントのアバター",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "オンボーディング承認",
- "tool.intervention.onboarding.agentIdentity.name": "エージェント名",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "受信箱エージェント",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "現在のオンボーディングエージェント",
- "tool.intervention.onboarding.agentIdentity.targets": "対象",
"tool.intervention.onboarding.agentIdentity.title": "エージェントのアイデンティティ更新を確認",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "アバターを更新します",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "名前を更新します",
"tool.intervention.onboarding.userProfile.applyHint": "これらの詳細は承認後にあなたのプロフィールに保存されます。",
"tool.intervention.onboarding.userProfile.description": "この変更を承認すると、エージェントが今後の返信を調整できるようにオンボーディングプロフィールが更新されます。",
"tool.intervention.onboarding.userProfile.eyebrow": "オンボーディング承認",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "{{time}} に更新",
"workingPanel.resources.viewMode.list": "リスト表示",
"workingPanel.resources.viewMode.tree": "ツリー表示",
+ "workingPanel.review.baseRef.default": "デフォルト",
+ "workingPanel.review.baseRef.loading": "ブランチを読み込んでいます…",
+ "workingPanel.review.baseRef.reset": "デフォルトブランチにリセット",
+ "workingPanel.review.baseRef.unresolved": "ベースブランチを選択してください",
"workingPanel.review.binary": "バイナリファイル — 差分は表示されません",
"workingPanel.review.collapseAll": "すべて折りたたむ",
"workingPanel.review.copied": "パスをコピーしました",
"workingPanel.review.copyPath": "ファイルパスをコピー",
"workingPanel.review.empty": "作業ツリーに変更はありません",
+ "workingPanel.review.empty.branch": "{{baseRef}} に対する変更はありません",
+ "workingPanel.review.empty.noBaseRef": "リモートのデフォルトブランチを特定できませんでした。ターミナルで `git remote set-head origin --auto` を実行してください。",
"workingPanel.review.error": "このファイルの差分を読み込めませんでした",
"workingPanel.review.expandAll": "すべて展開",
+ "workingPanel.review.mode.branch": "ブランチ",
+ "workingPanel.review.mode.unstaged": "未ステージ",
"workingPanel.review.more": "その他のオプション",
"workingPanel.review.refresh": "更新",
"workingPanel.review.textDiff.disable": "インラインテキスト差分を無効化",
diff --git a/locales/ja-JP/labs.json b/locales/ja-JP/labs.json
index 08556881633..eb85f6992ad 100644
--- a/locales/ja-JP/labs.json
+++ b/locales/ja-JP/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "グループチャット(マルチアシスタント)",
"features.inputMarkdown.desc": "入力エリアでMarkdown(太字、コードブロック、表など)をリアルタイムでレンダリングします。",
"features.inputMarkdown.title": "入力欄のMarkdownレンダリング",
+ "features.messenger.desc": "Telegram(およびその他のメッセンジャー)を通じて、共有のLobeHubボットを使用してエージェントと会話できます。設定にMessengerタブを追加し、アカウントを紐付けてメッセージを受信するエージェントを選択できます。",
+ "features.messenger.title": "メッセンジャー",
"title": "ラボ"
}
diff --git a/locales/ja-JP/messenger.json b/locales/ja-JP/messenger.json
new file mode 100644
index 00000000000..fc5b443f865
--- /dev/null
+++ b/locales/ja-JP/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "アクティブエージェント",
+ "messenger.activeAgentPlaceholder": "エージェントを選択",
+ "messenger.detail.addServer": "サーバーを追加",
+ "messenger.detail.addWorkspace": "ワークスペースを追加",
+ "messenger.detail.connections.connected": "接続済み",
+ "messenger.detail.connections.empty": "ボットを開き、/start を送信してアカウントをリンクしてください。",
+ "messenger.detail.connections.linkHint": "ワークスペースがインストールされました。Slack を開き、ボットに DM を送信して個人アカウントのリンクを完了してください。",
+ "messenger.detail.connections.pending": "保留中",
+ "messenger.detail.connections.serverLabel": "サーバー",
+ "messenger.detail.connections.title": "接続",
+ "messenger.detail.connections.userLabel": "ユーザー",
+ "messenger.detail.connections.workspaceLabel": "ワークスペース",
+ "messenger.detail.disconnect": "切断",
+ "messenger.discord.connectModal.description": "管理している Discord サーバーに LobeHub ボットを追加します。",
+ "messenger.discord.connectModal.inviteButton": "Discord サーバーに追加",
+ "messenger.discord.connectModal.notConfigured": "現在、Discord は利用できません。後でもう一度お試しください。",
+ "messenger.discord.connectModal.title": "サーバーにボットを追加",
+ "messenger.discord.connections.disconnectConfirm": "このサーバーを監査リストから削除しますか?ボットはサーバー管理者がキックするまでサーバーに残ります。",
+ "messenger.discord.connections.disconnectFailed": "サーバーの削除に失敗しました。",
+ "messenger.discord.connections.disconnectSuccess": "サーバーが削除されました。",
+ "messenger.discord.connections.disconnectTitle": "サーバーを削除",
+ "messenger.discord.userPending.cta": "Discord で開く",
+ "messenger.discord.userPending.hint": "Discord でボットを開き、アカウントのリンクを完了するために任意のメッセージを送信してください。",
+ "messenger.discord.userPending.name": "まだリンクされていません",
+ "messenger.error.agentNotFound": "エージェントが見つかりません。",
+ "messenger.error.disconnectNotAllowed": "自分で開始したインストールのみ切断できます。",
+ "messenger.error.installationNotFound": "インストールが見つかりません。",
+ "messenger.error.linkRequired": "この接続を変更する前に、ボットを開いて /start を送信してください。",
+ "messenger.error.pickDefaultAgent": "確認する前にデフォルトエージェントを選択してください。",
+ "messenger.error.platformNotConfigured": "このメッセンジャープラットフォームは現在利用できません。後でもう一度お試しください。",
+ "messenger.linkCta": "接続",
+ "messenger.linkModal.continueIn": "{{platform}} でセットアップを続行",
+ "messenger.linkModal.instructions": "ボットを開き、/start を送信してから「アカウントをリンク」をタップして LobeHub アカウントを接続してください。",
+ "messenger.linkModal.notConfigured": "この接続は現在利用できません。後でもう一度お試しください。",
+ "messenger.linkModal.openCta": "{{platform}} で開く",
+ "messenger.linkModal.scanHint": "または、携帯電話でスキャンして {{platform}} を開きます。",
+ "messenger.linkModal.title": "メッセンジャーを接続",
+ "messenger.list.discord.description": "任意の Discord サーバーから DM を使用して LobeHub エージェントとチャットできます。",
+ "messenger.list.slack.description": "任意の Slack ワークスペースから DM または @LobeHub を使用して LobeHub エージェントとチャットできます。",
+ "messenger.list.telegram.description": "Telegram で LobeHub エージェントとチャットし、どこからでも応答するエージェントを選択できます。",
+ "messenger.noPlatformsConfigured": "まだ利用可能なプラットフォームはありません。後でもう一度ご確認ください。",
+ "messenger.setActiveFailed": "アクティブに設定できませんでした。",
+ "messenger.setActiveSuccess": "アクティブエージェントが更新されました。",
+ "messenger.slack.connectModal.continueButton": "Slack で続行",
+ "messenger.slack.connectModal.description": "Slack にリダイレクトされ、LobeHub ワークスペースのインストールを承認します。",
+ "messenger.slack.connectModal.notConfigured": "現在、Slack は利用できません。後でもう一度お試しください。",
+ "messenger.slack.connectModal.title": "Slack でセットアップを続行",
+ "messenger.slack.connections.disconnectConfirm": "この Slack ワークスペースから LobeHub ボットを切断しますか?既存のユーザーリンクは再インストールするまで一時停止されます。",
+ "messenger.slack.connections.disconnectFailed": "切断に失敗しました。",
+ "messenger.slack.connections.disconnectSuccess": "ワークスペースが切断されました。",
+ "messenger.slack.connections.disconnectTitle": "ワークスペースを切断",
+ "messenger.slack.installBlocked.dismiss": "了解しました",
+ "messenger.slack.installBlocked.suggestion": "Slack で @LobeHub に DM を送信して個人アカウントをリンクしてください。再インストールは不要です。または、元のインストーラーにこのワークスペースを最初に切断するよう依頼して、所有権を引き継ぐことができます。",
+ "messenger.slack.installBlocked.title": "ワークスペースはすでに接続されています",
+ "messenger.slack.installBlocked.withName": "「{{workspace}}」は別のユーザーによって LobeHub にすでに接続されています。",
+ "messenger.slack.installBlocked.withoutName": "この Slack ワークスペースは別のユーザーによってすでに LobeHub に接続されています。",
+ "messenger.slack.installResult.failed": "Slack のインストールに失敗しました({{reason}})。もう一度お試しいただくか、サポートにお問い合わせください。",
+ "messenger.slack.installResult.reasons.accessDenied": "承認がキャンセルされました",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack の承認に失敗しました",
+ "messenger.slack.installResult.reasons.generic": "不明なエラーが発生しました",
+ "messenger.slack.installResult.reasons.invalidState": "インストールセッションが期限切れです",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack から不完全なアプリ情報が返されました",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack から不完全なインストールパラメーターが返されました",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack からワークスペース識別子が返されませんでした",
+ "messenger.slack.installResult.reasons.missingToken": "Slack からボットトークンが返されませんでした",
+ "messenger.slack.installResult.reasons.persistFailed": "ワークスペース接続を保存できませんでした",
+ "messenger.slack.installResult.success": "Slack ワークスペースが接続されました。",
+ "messenger.subtitle": "公式 LobeHub ボットにアカウントを一度接続します。メッセージを受信するエージェントを選択し、ここまたはボットからいつでも切り替え可能です。",
+ "messenger.title": "メッセンジャー",
+ "messenger.unlinkConfirm": "LobeHub から {{platform}} アカウントを切断しますか?/start を再度実行するまで受信メッセージは停止します。",
+ "messenger.unlinkCta": "切断",
+ "messenger.unlinkFailed": "切断に失敗しました。",
+ "messenger.unlinkSuccess": "切断されました。",
+ "messenger.unlinkTitle": "アカウントを切断",
+ "verify.confirm.conflict.description": "この {{platform}} アカウントはすでに LobeHub アカウント {{email}} にリンクされています。そのアカウントにサインインしてリンクを管理するか、再試行する前にリンクを解除してください。",
+ "verify.confirm.conflict.switchAccount": "別のアカウントでサインイン",
+ "verify.confirm.conflict.title": "このアカウントはすでにリンクされています",
+ "verify.confirm.cta": "リンクを確認",
+ "verify.confirm.defaultAgent": "デフォルトエージェント",
+ "verify.confirm.defaultAgentHint": "メッセージは最初にここにルーティングされます。ボットの /agents または設定 → メッセンジャーからいつでも切り替え可能です。",
+ "verify.confirm.defaultAgentPlaceholder": "エージェントを選択",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub アカウント",
+ "verify.confirm.fields.platformAccount": "{{platform}} アカウント",
+ "verify.confirm.fields.workspace": "ワークスペース",
+ "verify.confirm.noAgents": "まだエージェントがありません。LobeHub で作成してから戻ってリンクを完了してください。",
+ "verify.confirm.title": "リンクを確認",
+ "verify.confirm.workspace": "ワークスペース: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "このアカウントは別の LobeHub アカウントにすでにリンクされています。最初にそのアカウントにサインインしてください。",
+ "verify.error.expired": "このリンクは期限切れです。ボットに戻り、/start を再度送信してください。",
+ "verify.error.generic": "問題が発生しました。もう一度お試しください。",
+ "verify.error.missingToken": "無効なリンクです。このページをボットから開いてください。",
+ "verify.error.title": "リンクを確認できません",
+ "verify.labRequired.description": "メッセンジャーは現在 Labs 機能です。設定 → 詳細 → Labs で有効にし、このページを再読み込みしてください。",
+ "verify.labRequired.openSettings": "Labs 設定を開く",
+ "verify.labRequired.title": "メッセンジャーを有効にして続行",
+ "verify.signInCta": "サインインして続行",
+ "verify.signInRequired": "リンクを確認するには LobeHub にサインインしてください。",
+ "verify.success.description": "アカウントが {{platform}} に接続されました。{{platform}} を開き、最初のメッセージを送信してください。",
+ "verify.success.openBot": "{{platform}} で開く",
+ "verify.success.title": "リンクが成功しました!"
+}
diff --git a/locales/ja-JP/models.json b/locales/ja-JP/models.json
index 5b510fa2f6d..32cf036b2ec 100644
--- a/locales/ja-JP/models.json
+++ b/locales/ja-JP/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "身体動作、物理的リアリズム、指示追従性において全面的にアップグレードされた新しいビデオ生成モデル。",
"MiniMax-M1.description": "80Kの思考連鎖と1Mの入力を備えた新しい社内推論モデルで、世界トップクラスのモデルに匹敵する性能を発揮します。",
"MiniMax-M2-Stable.description": "効率的なコーディングとエージェントワークフローのために設計され、商用利用における高い同時実行性を実現します。",
- "MiniMax-M2.1-Lightning.description": "強力な多言語プログラミング機能を備え、より高速かつ効率的な推論を実現。",
"MiniMax-M2.1-highspeed.description": "強力な多言語プログラミング機能を備え、プログラミング体験を包括的に向上。より高速かつ効率的です。",
"MiniMax-M2.1.description": "MiniMax-M2.1は、MiniMaxが開発したフラッグシップのオープンソース大規模モデルで、複雑な現実世界のタスク解決に特化しています。多言語プログラミング能力とエージェントとしての高度なタスク処理能力が主な強みです。",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: M2.5と同等の性能で推論速度が向上。",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haikuは、Anthropicの最速かつ最小のモデルで、即時応答と高速かつ正確な性能を実現するよう設計されています。",
"claude-3-opus-20240229.description": "Claude 3 Opusは、Anthropicの最も強力なモデルで、非常に複雑なタスクにおいて卓越した性能、知性、流暢さ、理解力を発揮します。",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnetは、知性と速度のバランスを取り、エンタープライズ向けのワークロードにおいて高い実用性とコスト効率、信頼性のある大規模展開を実現します。",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5はAnthropicの最速かつ最も知的なHaikuモデルで、驚異的な速度と拡張された思考能力を備えています。",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5は、Anthropicの最速かつ最も賢いHaikuモデルで、驚異的なスピードと高度な推論能力を備えています。",
"claude-haiku-4-5.description": "Claude Haiku 4.5 by Anthropic — 次世代Haikuモデルで、推論能力とビジョンが強化されています。",
"claude-haiku-4.5.description": "Claude Haiku 4.5は、Anthropicの最速かつ最も賢いHaikuモデルで、驚異的なスピードと高度な推論能力を備えています。",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinkingは、推論プロセスを可視化できる高度なバリアントです。",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1はAnthropicの最新かつ最も高性能なモデルで、非常に複雑なタスクにおいて卓越した性能、知性、流暢さ、理解力を発揮します。",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1は、Anthropicの最新かつ最も高度なモデルで、非常に複雑なタスクにおいて卓越した性能、知性、流暢さ、理解力を発揮します。",
"claude-opus-4-1.description": "Claude Opus 4.1 by Anthropic — 深い分析能力を備えたプレミアム推論モデル。",
- "claude-opus-4-20250514.description": "Claude Opus 4はAnthropicの最も強力なモデルで、非常に複雑なタスクにおいて卓越した性能、知性、流暢さ、理解力を発揮します。",
+ "claude-opus-4-20250514.description": "Claude Opus 4は、Anthropicの最も強力なモデルで、非常に複雑なタスクにおいて卓越した性能、知性、流暢さ、理解力を発揮します。",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5は、Anthropicのフラッグシップモデルで、卓越した知性とスケーラブルな性能を兼ね備え、最高品質の応答と推論が求められる複雑なタスクに最適です。",
"claude-opus-4-5.description": "Claude Opus 4.5 by Anthropic — 最高レベルの推論とコーディング能力を備えたフラッグシップモデル。",
"claude-opus-4-6.description": "Claude Opus 4.6 by Anthropic — 1Mコンテキストウィンドウを備えたフラッグシップモデルで、高度な推論能力を提供します。",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6は、エージェント構築やコーディングにおいてAnthropicの最も知的なモデルです。",
"claude-opus-4.6.description": "Claude Opus 4.6は、エージェント構築やコーディングにおいてAnthropicの最も知的なモデルです。",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinkingは、即時応答または段階的な思考プロセスを可視化しながら出力できます。",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4はAnthropicのこれまでで最も知的なモデルで、APIユーザー向けに即時応答または詳細なステップバイステップの思考を提供します。",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5はAnthropicのこれまでで最も知的なモデルです。",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4は、瞬時の応答や、プロセスを可視化した段階的な思考を提供することができます。",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5は、これまでで最も知的なAnthropicモデルです。",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 by Anthropic — コーディング性能が向上した改良版Sonnet。",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 by Anthropic — 最新のSonnetモデルで、優れたコーディングとツール使用能力を備えています。",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5は、これまでで最も知的なAnthropicのモデルです。",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat(67B)は、深い言語理解と対話能力を提供する革新的なモデルです。",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 は次世代の推論モデルで、複雑な推論と連想思考に優れ、深い分析タスクに対応します。",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2は次世代推論モデルで、複雑な推論と連鎖的思考能力が強化されています。",
- "deepseek-chat.description": "DeepSeek V4 Flashの非思考モードの互換性エイリアス。廃止予定—DeepSeek V4 Flashを使用してください。",
+ "deepseek-chat.description": "一般的な対話能力とコーディング能力を組み合わせた新しいオープンソースモデルです。チャットモデルの一般的な対話能力と、コーダーモデルの強力なコーディング能力を保持し、より良い嗜好調整を実現しています。DeepSeek-V2.5は、文章作成や指示の追従能力も向上しています。",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B は 2T トークン(コード 87%、中英テキスト 13%)で学習されたコード言語モデルです。16K のコンテキストウィンドウと Fill-in-the-Middle タスクを導入し、プロジェクトレベルのコード補完とスニペット補完を提供します。",
"deepseek-coder-v2.description": "DeepSeek Coder V2 はオープンソースの MoE コードモデルで、コーディングタスクにおいて GPT-4 Turbo に匹敵する性能を発揮します。",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 はオープンソースの MoE コードモデルで、コーディングタスクにおいて GPT-4 Turbo に匹敵する性能を発揮します。",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 高速フルバージョンは、リアルタイムのウェブ検索を搭載し、671Bスケールの能力と高速応答を両立します。",
"deepseek-r1-online.description": "DeepSeek R1 フルバージョンは、671Bパラメータとリアルタイムのウェブ検索を備え、より強力な理解と生成を提供します。",
"deepseek-r1.description": "DeepSeek-R1は、強化学習前にコールドスタートデータを使用し、数学、コーディング、推論においてOpenAI-o1と同等の性能を発揮します。",
- "deepseek-reasoner.description": "DeepSeek V4 Flashの思考モードの互換性エイリアス。廃止予定—DeepSeek V4 Flashを使用してください。",
+ "deepseek-reasoner.description": "DeepSeek V4 Flash思考モードの互換性エイリアスです。廃止予定のため、代わりにdeepseek-v4-flashを使用してください。",
"deepseek-v2.description": "DeepSeek V2は、コスト効率の高い処理を実現する効率的なMoEモデルです。",
"deepseek-v2:236b.description": "DeepSeek V2 236Bは、コード生成に特化したDeepSeekのモデルで、強力なコード生成能力を持ちます。",
"deepseek-v3-0324.description": "DeepSeek-V3-0324は、671BパラメータのMoEモデルで、プログラミングや技術的能力、文脈理解、長文処理において優れた性能を発揮します。",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 は ByteDance Seed による画像生成モデルで、テキストと画像入力に対応し、高品質かつ制御性の高い画像生成を実現します。テキストプロンプトから画像を生成します。",
"doubao-seedream-4-5-251128.description": "Seedream 4.5はByteDanceの最新マルチモーダル画像モデルで、テキストから画像生成、画像間変換、バッチ画像生成機能を統合し、常識と推論能力を組み込んでいます。前バージョン4.0と比較して、生成品質が大幅に向上し、編集の一貫性や複数画像の融合が改善されています。視覚的な詳細の制御がより正確になり、小さなテキストや顔を自然に生成し、レイアウトや色彩の調和が向上し、全体的な美観が強化されています。",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-liteはByteDanceの最新画像生成モデルです。初めてオンライン検索機能を統合し、リアルタイムのウェブ情報を取り入れることで生成画像のタイムリー性を向上させています。モデルの知能もアップグレードされ、複雑な指示や視覚コンテンツを正確に解釈できるようになりました。また、専門的なシナリオでのグローバルな知識カバレッジ、一貫性、生成品質が向上し、企業レベルの視覚制作ニーズにより適合しています。",
- "dreamina-seedance-2-0-260128.description": "ByteDanceのSeedance 2.0は、マルチモーダル参照ビデオ生成、ビデオ編集、ビデオ拡張、テキストからビデオ、画像からビデオへの同期音声付き生成をサポートする最も強力なビデオ生成モデルです。",
- "dreamina-seedance-2-0-fast-260128.description": "ByteDanceのSeedance 2.0 Fastは、Seedance 2.0と同じ機能を持ちながら、より高速な生成速度と競争力のある価格を提供します。",
"emohaa.description": "Emohaa は、専門的なカウンセリング能力を備えたメンタルヘルスモデルで、ユーザーが感情的な問題を理解するのを支援します。",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B は、ローカルおよびカスタマイズ展開に適した軽量なオープンソースモデルです。",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview は、ERNIE 4.5 の評価用に設計された 8K コンテキストプレビューモデルです。",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K は、複雑な推論やマルチターン対話に対応した 32K コンテキストの高速思考モデルです。",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview は、評価およびテスト用の思考モデルプレビューです。",
"ernie-x1.1.description": "ERNIE X1.1は評価とテスト用の思考モデルプレビューです。",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5はByteDance Seedチームによって構築され、マルチイメージ編集と構成をサポートします。強化された主題の一貫性、正確な指示追従、空間論理理解、美的表現、ポスターレイアウト、ロゴデザイン、高精度のテキスト画像レンダリングを特徴とします。",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0はByteDance Seedによって構築され、プロンプトからの高品質で高度に制御可能な画像生成をサポートするテキストおよび画像入力をサポートします。",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0は、ByteDance Seedによる画像生成モデルで、テキストと画像入力をサポートし、高度に制御可能で高品質な画像生成を実現します。テキストプロンプトから画像を生成します。",
"fal-ai/flux-kontext/dev.description": "FLUX.1 モデルは画像編集に特化しており、テキストと画像の入力に対応しています。",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] は、テキストと参照画像を入力として受け取り、局所的な編集や複雑なシーン全体の変換を可能にします。",
"fal-ai/flux/krea.description": "Flux Krea [dev] は、よりリアルで自然な画像を生成する美的バイアスを持つ画像生成モデルです。",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "強力なネイティブマルチモーダル画像生成モデルです。",
"fal-ai/imagen4/preview.description": "Google による高品質な画像生成モデルです。",
"fal-ai/nano-banana.description": "Nano Banana は Google による最新・最速・最も効率的なネイティブマルチモーダルモデルで、会話を通じた画像生成と編集が可能です。",
- "fal-ai/qwen-image-edit.description": "Qwenチームによるプロフェッショナルな画像編集モデルで、セマンティックおよび外観編集、正確な中国語/英語のテキスト編集、スタイル転送、回転などをサポートします。",
- "fal-ai/qwen-image.description": "Qwenチームによる強力な画像生成モデルで、強力な中国語テキストレンダリングと多様なビジュアルスタイルを備えています。",
+ "fal-ai/qwen-image-edit.description": "Qwenチームによるプロフェッショナルな画像編集モデルで、意味的および外観的な編集をサポートし、中国語と英語のテキストを正確に編集できます。スタイル変換やオブジェクトの回転など、高品質な編集が可能です。",
+ "fal-ai/qwen-image.description": "Qwenチームによる強力な画像生成モデルで、中国語のテキストレンダリングや多様なビジュアルスタイルに優れています。",
"flux-1-schnell.description": "Black Forest Labs による 120 億パラメータのテキストから画像への変換モデルで、潜在敵対的拡散蒸留を用いて 1~4 ステップで高品質な画像を生成します。クローズドな代替モデルに匹敵し、Apache-2.0 ライセンスのもと、個人・研究・商用利用が可能です。",
"flux-dev.description": "非商用の研究開発向けに効率化されたオープンソース画像生成モデルです。",
"flux-kontext-max.description": "最先端のコンテキスト画像生成・編集モデルで、テキストと画像を組み合わせて精密かつ一貫性のある結果を生成します。",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash は、最先端の知能と優れた検索基盤を融合し、スピードに特化した最もスマートなモデルです。",
"gemini-3-flash.description": "Gemini 3 Flash by Google — 超高速モデルでマルチモーダル入力をサポートします。",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image(Nano Banana Pro)は、Googleの画像生成モデルで、マルチモーダル対話もサポートします。",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image(Nano Banana Pro)はGoogleの画像生成モデルで、マルチモーダルチャットもサポートします。",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image(Nano Banana Pro)は、Googleの画像生成モデルで、マルチモーダルチャットもサポートしています。",
"gemini-3-pro-preview.description": "Gemini 3 Pro は、Google による最も強力なエージェントおよびバイブコーディングモデルで、最先端の推論に加え、より豊かなビジュアルと深い対話を実現します。",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image(Nano Banana 2)は、Googleの最速のネイティブ画像生成モデルで、思考サポート、対話型画像生成および編集を提供します。",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)は、マルチモーダルチャットをサポートしながら、Flash速度でプロレベルの画像品質を提供します。",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)は、Googleの最速のネイティブ画像生成モデルで、思考サポート、会話型画像生成、編集を提供します。",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite PreviewはGoogleの最もコスト効率の高いマルチモーダルモデルで、大量のエージェントタスク、翻訳、データ処理に最適化されています。",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Previewは、Gemini 3 Proの推論能力を強化し、中程度の思考レベルサポートを追加しています。",
"gemini-3.1-pro.description": "Gemini 3.1 Pro by Google — 1Mコンテキストウィンドウを備えたプレミアムマルチモーダルモデル。",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Grok 4 Fast をリリースしました。コスト効率の高い推論モデルにおける最新の進展です。",
"grok-4.20-0309-non-reasoning.description": "単純なユースケース向けの非推論バリアント。",
"grok-4.20-0309-reasoning.description": "応答前に推論する知的で超高速なモデル。",
- "grok-4.20-beta-0309-non-reasoning.description": "シンプルなユースケース向けの非推論型バリアント",
- "grok-4.20-beta-0309-reasoning.description": "応答前に推論する、知的で非常に高速なモデル",
"grok-4.20-multi-agent-0309.description": "4または16のエージェントチーム。研究ユースケースに優れています。現在、クライアントサイドツールはサポートしていません。xAIサーバーサイドツール(例:X Search、Web Searchツール)およびリモートMCPツールのみをサポートします。",
"grok-4.3.description": "世界で最も真実を追求する大規模言語モデル",
- "grok-4.description": "NLP、数学、推論に優れた最新かつ最強のフラッグシップモデル—万能型として理想的。",
+ "grok-4.description": "最新のGrokフラッグシップモデルで、言語、数学、推論において比類のない性能を発揮する真のオールラウンダーです。現在はgrok-4-0709を指しており、リソースの制限により一時的に公式価格より10%高く設定されていますが、後に公式価格に戻る予定です。",
"grok-code-fast-1.description": "grok-code-fast-1 をリリースできることを嬉しく思います。このモデルは、高速かつコスト効率に優れた推論モデルで、エージェント型コーディングにおいて卓越した性能を発揮します。",
"grok-imagine-image-pro.description": "テキストプロンプトから画像を生成し、自然言語で既存の画像を編集したり、マルチターン会話を通じて画像を反復的に改良します。",
"grok-imagine-image.description": "テキストプロンプトから画像を生成し、自然言語で既存の画像を編集したり、マルチターン会話を通じて画像を反復的に改良します。",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQは、Qwenファミリーの推論モデルです。標準的な指示調整モデルと比較して、思考と推論能力に優れ、特に難解な問題において下流性能を大幅に向上させます。QwQ-32Bは、DeepSeek-R1やo1-miniと競合する中規模の推論モデルです。",
"qwq_32b.description": "Qwenファミリーの中規模推論モデル。標準的な指示調整モデルと比較して、QwQの思考と推論能力は、特に難解な問題において下流性能を大幅に向上させます。",
"r1-1776.description": "R1-1776は、DeepSeek R1のポストトレーニングバリアントで、検閲のない偏りのない事実情報を提供するよう設計されています。",
- "seedance-1-5-pro-251215.description": "ByteDanceのSeedance 1.5 Proは、テキストからビデオ、画像からビデオ(最初のフレーム、最初+最後のフレーム)、および視覚と同期した音声生成をサポートします。",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-liteは、リアルタイム情報のためのウェブ検索拡張生成、複雑なプロンプト解釈の強化、プロフェッショナルなビジュアル作成のための参照一貫性の向上を特徴とします。",
"solar-mini-ja.description": "Solar Mini (Ja)は、Solar Miniを日本語に特化させたモデルで、英語と韓国語でも効率的かつ高性能な動作を維持します。",
"solar-mini.description": "Solar Miniは、GPT-3.5を上回る性能を持つコンパクトなLLMで、英語と韓国語に対応した多言語機能を備え、効率的な小型ソリューションを提供します。",
"solar-pro.description": "Solar Proは、Upstageが提供する高知能LLMで、単一GPU上での指示追従に特化し、IFEvalスコア80以上を記録しています。現在は英語に対応しており、2024年11月の正式リリースでは対応言語とコンテキスト長が拡張される予定です。",
diff --git a/locales/ja-JP/providers.json b/locales/ja-JP/providers.json
index 2cf83935aac..f09f8066006 100644
--- a/locales/ja-JP/providers.json
+++ b/locales/ja-JP/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Jina AIは2020年に設立された検索AIのリーディングカンパニーで、ベクトルモデル、リランカー、小型言語モデルを含む検索スタックにより、高品質な生成・マルチモーダル検索アプリを構築できます。",
"kimicodingplan.description": "Moonshot AIのKimi Codeは、K2.5を含むKimiモデルへのアクセスを提供します。",
"lmstudio.description": "LM Studioは、ローカルPC上でLLMの開発と実験ができるデスクトップアプリです。",
- "lobehub.description": "LobeHub Cloudは公式APIを使用してAIモデルにアクセスし、モデルトークンに紐付けられたクレジットで使用量を測定します。",
"longcat.description": "LongCatは、Meituanが独自に開発した生成AIの大型モデルシリーズです。効率的な計算アーキテクチャと強力なマルチモーダル機能を通じて、企業内部の生産性を向上させ、革新的なアプリケーションを可能にすることを目的としています。",
"minimax.description": "MiniMaxは2021年に設立され、マルチモーダル基盤モデルを用いた汎用AIを開発しています。兆単位パラメータのMoEテキストモデル、音声モデル、ビジョンモデル、Hailuo AIなどのアプリを提供します。",
"minimaxcodingplan.description": "MiniMaxトークンプランは、固定料金のサブスクリプションを通じてM2.7を含むMiniMaxモデルへのアクセスを提供します。",
diff --git a/locales/ja-JP/setting.json b/locales/ja-JP/setting.json
index 1c85241e1a1..f17a57b3890 100644
--- a/locales/ja-JP/setting.json
+++ b/locales/ja-JP/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "手動入力",
"tab.manualFill.desc": "カスタムMCPスキルを手動で設定",
"tab.memory": "記憶設定",
+ "tab.messenger": "メッセンジャー",
"tab.notification": "通知",
"tab.profile": "マイアカウント",
"tab.provider": "AIサービスプロバイダー",
diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.json
index fdbfed0d5c2..e3f125f88af 100644
--- a/locales/ko-KR/chat.json
+++ b/locales/ko-KR/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "모든 기능 호출 자동 승인",
"tool.intervention.mode.manual": "수동 승인",
"tool.intervention.mode.manualDesc": "매번 수동 승인 필요",
- "tool.intervention.onboarding.agentIdentity.applyHint": "승인 후 새 프로필이 표시됩니다.",
- "tool.intervention.onboarding.agentIdentity.description": "이 변경을 승인하면 받은편지함과 온보딩 대화에 표시되는 에이전트가 업데이트됩니다.",
- "tool.intervention.onboarding.agentIdentity.emoji": "에이전트 아바타",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "온보딩 승인",
- "tool.intervention.onboarding.agentIdentity.name": "에이전트 이름",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "받은편지함 에이전트",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "현재 온보딩 에이전트",
- "tool.intervention.onboarding.agentIdentity.targets": "적용 대상",
"tool.intervention.onboarding.agentIdentity.title": "에이전트 프로필 업데이트 확인",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "아바타를 업데이트하겠습니다",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "이름을 업데이트하겠습니다",
"tool.intervention.onboarding.userProfile.applyHint": "이 세부 정보는 승인 후 프로필에 저장됩니다.",
"tool.intervention.onboarding.userProfile.description": "이 변경 사항을 승인하면 온보딩 프로필이 업데이트되어 에이전트가 향후 응답을 맞춤화할 수 있습니다.",
"tool.intervention.onboarding.userProfile.eyebrow": "온보딩 승인",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "{{time}}에 업데이트됨",
"workingPanel.resources.viewMode.list": "목록 보기",
"workingPanel.resources.viewMode.tree": "트리 보기",
+ "workingPanel.review.baseRef.default": "기본값",
+ "workingPanel.review.baseRef.loading": "브랜치를 로드하는 중…",
+ "workingPanel.review.baseRef.reset": "기본 브랜치로 재설정",
+ "workingPanel.review.baseRef.unresolved": "기본 브랜치를 선택하세요",
"workingPanel.review.binary": "바이너리 파일 — 차이 표시 불가",
"workingPanel.review.collapseAll": "모두 접기",
"workingPanel.review.copied": "경로 복사됨",
"workingPanel.review.copyPath": "파일 경로 복사",
"workingPanel.review.empty": "작업 트리 변경 사항 없음",
+ "workingPanel.review.empty.branch": "{{baseRef}}와 비교했을 때 변경 사항 없음",
+ "workingPanel.review.empty.noBaseRef": "원격 기본 브랜치를 확인할 수 없습니다. 터미널에서 `git remote set-head origin --auto`를 실행하세요.",
"workingPanel.review.error": "이 파일의 차이를 로드할 수 없습니다",
"workingPanel.review.expandAll": "모두 펼치기",
+ "workingPanel.review.mode.branch": "브랜치",
+ "workingPanel.review.mode.unstaged": "스테이지되지 않음",
"workingPanel.review.more": "추가 옵션",
"workingPanel.review.refresh": "새로 고침",
"workingPanel.review.textDiff.disable": "인라인 텍스트 차이 비활성화",
diff --git a/locales/ko-KR/labs.json b/locales/ko-KR/labs.json
index 51a73022342..5d7f9fdd219 100644
--- a/locales/ko-KR/labs.json
+++ b/locales/ko-KR/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "그룹 채팅 (다중 도우미)",
"features.inputMarkdown.desc": "입력 영역에서 실시간으로 Markdown을 렌더링합니다 (굵은 글씨, 코드 블록, 표 등).",
"features.inputMarkdown.title": "입력창 Markdown 렌더링",
+ "features.messenger.desc": "Telegram(및 기타 메신저)을 통해 공유된 LobeHub 봇으로 에이전트와 대화하세요. 계정을 연결하고 메시지를 받을 에이전트를 선택할 수 있는 설정의 메신저 탭이 추가됩니다.",
+ "features.messenger.title": "메신저",
"title": "실험실"
}
diff --git a/locales/ko-KR/messenger.json b/locales/ko-KR/messenger.json
new file mode 100644
index 00000000000..f9b34950acd
--- /dev/null
+++ b/locales/ko-KR/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "활성 에이전트",
+ "messenger.activeAgentPlaceholder": "에이전트를 선택하세요",
+ "messenger.detail.addServer": "서버 추가",
+ "messenger.detail.addWorkspace": "워크스페이스 추가",
+ "messenger.detail.connections.connected": "연결됨",
+ "messenger.detail.connections.empty": "봇을 열고 /start를 전송하여 계정을 연결하세요.",
+ "messenger.detail.connections.linkHint": "워크스페이스가 설치되었습니다. Slack을 열고 봇에게 DM을 보내 개인 계정을 연결하세요.",
+ "messenger.detail.connections.pending": "대기 중",
+ "messenger.detail.connections.serverLabel": "서버",
+ "messenger.detail.connections.title": "연결",
+ "messenger.detail.connections.userLabel": "사용자",
+ "messenger.detail.connections.workspaceLabel": "워크스페이스",
+ "messenger.detail.disconnect": "연결 해제",
+ "messenger.discord.connectModal.description": "관리 중인 Discord 서버에 LobeHub 봇을 추가하세요.",
+ "messenger.discord.connectModal.inviteButton": "Discord 서버에 추가",
+ "messenger.discord.connectModal.notConfigured": "현재 Discord를 사용할 수 없습니다. 나중에 다시 시도하세요.",
+ "messenger.discord.connectModal.title": "서버에 봇 추가",
+ "messenger.discord.connections.disconnectConfirm": "이 서버를 감사 목록에서 제거하시겠습니까? 봇은 서버 관리자가 추방할 때까지 서버에 남아 있습니다.",
+ "messenger.discord.connections.disconnectFailed": "서버를 제거하지 못했습니다.",
+ "messenger.discord.connections.disconnectSuccess": "서버가 제거되었습니다.",
+ "messenger.discord.connections.disconnectTitle": "서버 제거",
+ "messenger.discord.userPending.cta": "Discord에서 열기",
+ "messenger.discord.userPending.hint": "Discord에서 봇을 열고 메시지를 보내 계정을 연결하세요.",
+ "messenger.discord.userPending.name": "아직 연결되지 않음",
+ "messenger.error.agentNotFound": "에이전트를 찾을 수 없습니다.",
+ "messenger.error.disconnectNotAllowed": "사용자가 시작한 설치만 연결을 해제할 수 있습니다.",
+ "messenger.error.installationNotFound": "설치를 찾을 수 없습니다.",
+ "messenger.error.linkRequired": "이 연결을 변경하기 전에 봇을 열고 /start를 전송하세요.",
+ "messenger.error.pickDefaultAgent": "기본 에이전트를 선택한 후 확인하세요.",
+ "messenger.error.platformNotConfigured": "현재 이 메신저 플랫폼을 사용할 수 없습니다. 나중에 다시 시도하세요.",
+ "messenger.linkCta": "연결",
+ "messenger.linkModal.continueIn": "{{platform}}에서 설정 계속",
+ "messenger.linkModal.instructions": "봇을 열고 /start를 전송한 다음 \"계정 연결\"을 탭하여 LobeHub 계정을 연결하세요.",
+ "messenger.linkModal.notConfigured": "현재 이 연결을 사용할 수 없습니다. 나중에 다시 시도하세요.",
+ "messenger.linkModal.openCta": "{{platform}}에서 열기",
+ "messenger.linkModal.scanHint": "또는 휴대폰으로 스캔하여 {{platform}}을(를) 여세요.",
+ "messenger.linkModal.title": "메신저 연결",
+ "messenger.list.discord.description": "LobeHub 봇과 DM을 통해 Discord 서버에서 LobeHub 에이전트와 채팅하세요.",
+ "messenger.list.slack.description": "Slack 워크스페이스에서 DM 또는 @LobeHub를 통해 LobeHub 에이전트와 채팅하세요.",
+ "messenger.list.telegram.description": "Telegram에서 LobeHub 에이전트와 채팅하고 어디서든 응답할 에이전트를 선택하세요.",
+ "messenger.noPlatformsConfigured": "아직 사용할 수 있는 플랫폼이 없습니다. 곧 확인하세요.",
+ "messenger.setActiveFailed": "활성 상태로 설정하지 못했습니다.",
+ "messenger.setActiveSuccess": "활성 에이전트가 업데이트되었습니다.",
+ "messenger.slack.connectModal.continueButton": "Slack에서 계속",
+ "messenger.slack.connectModal.description": "Slack으로 리디렉션되어 LobeHub 워크스페이스 설치를 승인합니다.",
+ "messenger.slack.connectModal.notConfigured": "현재 Slack을 사용할 수 없습니다. 나중에 다시 시도하세요.",
+ "messenger.slack.connectModal.title": "Slack에서 설정 계속",
+ "messenger.slack.connections.disconnectConfirm": "이 Slack 워크스페이스에서 LobeHub 봇의 연결을 해제하시겠습니까? 기존 사용자 링크는 다시 설치할 때까지 일시 중지됩니다.",
+ "messenger.slack.connections.disconnectFailed": "연결을 해제하지 못했습니다.",
+ "messenger.slack.connections.disconnectSuccess": "워크스페이스 연결이 해제되었습니다.",
+ "messenger.slack.connections.disconnectTitle": "워크스페이스 연결 해제",
+ "messenger.slack.installBlocked.dismiss": "확인",
+ "messenger.slack.installBlocked.suggestion": "Slack에서 @LobeHub에게 DM을 보내 개인 계정을 연결하세요. 다시 설치할 필요는 없습니다. 또는 원래 설치자에게 먼저 이 워크스페이스의 연결을 해제하도록 요청하세요.",
+ "messenger.slack.installBlocked.title": "워크스페이스가 이미 연결됨",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\"은(는) 이미 다른 사용자가 LobeHub에 연결했습니다.",
+ "messenger.slack.installBlocked.withoutName": "이 Slack 워크스페이스는 이미 다른 사용자가 LobeHub에 연결했습니다.",
+ "messenger.slack.installResult.failed": "Slack 설치 실패 ({{reason}}). 다시 시도하거나 지원팀에 문의하세요.",
+ "messenger.slack.installResult.reasons.accessDenied": "승인이 취소되었습니다",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack 승인 실패",
+ "messenger.slack.installResult.reasons.generic": "알 수 없는 오류가 발생했습니다",
+ "messenger.slack.installResult.reasons.invalidState": "설치 세션이 만료되었습니다",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack에서 불완전한 앱 정보를 반환했습니다",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack에서 불완전한 설치 매개변수를 반환했습니다",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack에서 워크스페이스 식별자를 반환하지 않았습니다",
+ "messenger.slack.installResult.reasons.missingToken": "Slack에서 봇 토큰을 반환하지 않았습니다",
+ "messenger.slack.installResult.reasons.persistFailed": "워크스페이스 연결을 저장할 수 없었습니다",
+ "messenger.slack.installResult.success": "Slack 워크스페이스가 연결되었습니다.",
+ "messenger.subtitle": "공식 LobeHub 봇에 계정을 한 번 연결하세요. 메시지를 받을 에이전트를 선택하고, 여기나 봇에서 언제든지 전환할 수 있습니다.",
+ "messenger.title": "메신저",
+ "messenger.unlinkConfirm": "LobeHub에서 {{platform}} 계정의 연결을 해제하시겠습니까? 수신 메시지는 /start를 다시 전송할 때까지 중지됩니다.",
+ "messenger.unlinkCta": "연결 해제",
+ "messenger.unlinkFailed": "연결을 해제하지 못했습니다.",
+ "messenger.unlinkSuccess": "연결이 해제되었습니다.",
+ "messenger.unlinkTitle": "계정 연결 해제",
+ "verify.confirm.conflict.description": "이 {{platform}} 계정은 이미 LobeHub 계정 {{email}}에 연결되어 있습니다. 해당 계정에 로그인하여 링크를 관리하거나, 다시 시도하기 전에 해당 계정에서 연결을 해제하세요.",
+ "verify.confirm.conflict.switchAccount": "다른 계정으로 로그인",
+ "verify.confirm.conflict.title": "이 계정은 이미 연결되어 있습니다",
+ "verify.confirm.cta": "연결 확인",
+ "verify.confirm.defaultAgent": "기본 에이전트",
+ "verify.confirm.defaultAgentHint": "메시지가 먼저 여기로 라우팅됩니다. 언제든지 봇에서 /agents를 통해 또는 설정 → 메신저에서 전환할 수 있습니다.",
+ "verify.confirm.defaultAgentPlaceholder": "에이전트를 선택하세요",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub 계정",
+ "verify.confirm.fields.platformAccount": "{{platform}} 계정",
+ "verify.confirm.fields.workspace": "워크스페이스",
+ "verify.confirm.noAgents": "아직 에이전트가 없습니다. LobeHub에서 하나를 생성한 후 다시 와서 연결을 완료하세요.",
+ "verify.confirm.title": "연결 확인",
+ "verify.confirm.workspace": "워크스페이스: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "이 계정은 이미 다른 LobeHub 계정에 연결되어 있습니다. 먼저 해당 계정에 로그인하세요.",
+ "verify.error.expired": "이 링크가 만료되었습니다. 봇으로 돌아가 /start를 다시 전송하세요.",
+ "verify.error.generic": "문제가 발생했습니다. 다시 시도하세요.",
+ "verify.error.missingToken": "잘못된 링크입니다. 봇에서 이 페이지를 여세요.",
+ "verify.error.title": "링크를 확인할 수 없음",
+ "verify.labRequired.description": "메신저는 현재 실험실 기능입니다. 설정 → 고급 → 실험실에서 활성화하고 이 페이지를 다시 로드하세요.",
+ "verify.labRequired.openSettings": "실험실 설정 열기",
+ "verify.labRequired.title": "메신저를 활성화하여 계속 진행",
+ "verify.signInCta": "계속하려면 로그인",
+ "verify.signInRequired": "LobeHub에 로그인하여 링크를 확인하세요.",
+ "verify.success.description": "이제 {{platform}}에 계정이 연결되었습니다. {{platform}}을 열고 첫 메시지를 보내세요.",
+ "verify.success.openBot": "{{platform}}에서 열기",
+ "verify.success.title": "성공적으로 연결됨!"
+}
diff --git a/locales/ko-KR/models.json b/locales/ko-KR/models.json
index 191bbc3d820..43666849dee 100644
--- a/locales/ko-KR/models.json
+++ b/locales/ko-KR/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "신규 비디오 생성 모델로 신체 움직임, 물리적 사실성, 지침 준수에서 전반적인 업그레이드 제공.",
"MiniMax-M1.description": "80K 체인 오브 싱킹과 100만 입력을 지원하는 새로운 자체 개발 추론 모델로, 세계 최고 수준의 모델과 유사한 성능을 제공합니다.",
"MiniMax-M2-Stable.description": "상업적 사용을 위한 높은 동시성을 제공하며, 효율적인 코딩 및 에이전트 워크플로우에 최적화되어 있습니다.",
- "MiniMax-M2.1-Lightning.description": "강력한 다국어 프로그래밍 기능과 더 빠르고 효율적인 추론을 제공합니다.",
"MiniMax-M2.1-highspeed.description": "강력한 다국어 프로그래밍 기능과 종합적으로 업그레이드된 프로그래밍 경험. 더 빠르고 효율적입니다.",
"MiniMax-M2.1.description": "MiniMax-M2.1은 MiniMax에서 개발한 대표적인 오픈소스 대형 모델로, 복잡한 실제 과제를 해결하는 데 중점을 둡니다. 다국어 프로그래밍 능력과 에이전트로서 복잡한 작업을 수행하는 능력이 핵심 강점입니다.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: M2.5와 동일한 성능을 제공하며 추론 속도가 더 빠릅니다.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku는 Anthropic의 가장 빠르고 컴팩트한 모델로, 빠르고 정확한 성능으로 즉각적인 응답을 위해 설계되었습니다.",
"claude-3-opus-20240229.description": "Claude 3 Opus는 Anthropic의 가장 강력한 모델로, 고난도 작업에서 뛰어난 성능, 지능, 유창성, 이해력을 자랑합니다.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet은 엔터프라이즈 워크로드를 위한 지능과 속도의 균형을 제공하며, 낮은 비용으로 높은 효용성과 안정적인 대규모 배포를 지원합니다.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5는 Anthropic의 가장 빠르고 지능적인 Haiku 모델로, 번개 같은 속도와 확장된 사고를 제공합니다.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5는 Anthropic의 가장 빠르고 똑똑한 Haiku 모델로, 번개 같은 속도와 확장된 추론 능력을 자랑합니다.",
"claude-haiku-4-5.description": "Anthropic의 Claude Haiku 4.5 — 향상된 추론 및 비전을 갖춘 차세대 Haiku.",
"claude-haiku-4.5.description": "Claude Haiku 4.5는 Anthropic의 가장 빠르고 똑똑한 Haiku 모델로, 번개 같은 속도와 확장된 추론 능력을 자랑합니다.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking은 자신의 추론 과정을 드러낼 수 있는 고급 변형 모델입니다.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1은 Anthropic의 최신이자 가장 강력한 모델로, 매우 복잡한 작업에서 뛰어난 성능, 지능, 유창성 및 이해력을 자랑합니다.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1은 Anthropic의 최신이자 가장 강력한 모델로, 매우 복잡한 작업에서 뛰어난 성능, 지능, 유창성, 이해력을 발휘합니다.",
"claude-opus-4-1.description": "Anthropic의 Claude Opus 4.1 — 심층 분석 기능을 갖춘 프리미엄 추론 모델.",
- "claude-opus-4-20250514.description": "Claude Opus 4는 Anthropic의 가장 강력한 모델로, 매우 복잡한 작업에서 뛰어난 성능, 지능, 유창성 및 이해력을 자랑합니다.",
+ "claude-opus-4-20250514.description": "Claude Opus 4는 Anthropic의 가장 강력한 모델로, 매우 복잡한 작업에서 뛰어난 성능, 지능, 유창성, 이해력을 자랑합니다.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5는 Anthropic의 플래그십 모델로, 탁월한 지능과 확장 가능한 성능을 결합하여 최고 품질의 응답과 추론이 필요한 복잡한 작업에 이상적입니다.",
"claude-opus-4-5.description": "Anthropic의 Claude Opus 4.5 — 최고 수준의 추론 및 코딩을 갖춘 플래그십 모델.",
"claude-opus-4-6.description": "Anthropic의 Claude Opus 4.6 — 고급 추론을 갖춘 1M 컨텍스트 윈도우 플래그십.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6은 에이전트 구축과 코딩을 위한 Anthropic의 가장 지능적인 모델입니다.",
"claude-opus-4.6.description": "Claude Opus 4.6은 에이전트 구축과 코딩을 위한 Anthropic의 가장 지능적인 모델입니다.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking은 즉각적인 응답 또는 단계별 사고 과정을 시각적으로 보여주는 확장된 사고를 생성할 수 있습니다.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4는 Anthropic의 가장 지능적인 모델로, API 사용자에게 세밀한 제어를 제공하며 즉각적인 응답 또는 단계별 사고를 지원합니다.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5는 Anthropic의 가장 지능적인 모델입니다.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4는 거의 즉각적인 응답을 생성하거나 가시적인 과정을 통해 단계별 사고를 확장할 수 있습니다.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5는 현재까지 Anthropic의 가장 지능적인 모델입니다.",
"claude-sonnet-4-5.description": "Anthropic의 Claude Sonnet 4.5 — 향상된 코딩 성능을 갖춘 개선된 Sonnet.",
"claude-sonnet-4-6.description": "Anthropic의 Claude Sonnet 4.6 — 우수한 코딩 및 도구 사용을 갖춘 최신 Sonnet.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5는 지금까지의 Anthropic 모델 중 가장 지능적인 모델입니다.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B)은 심층 언어 이해와 상호작용을 제공하는 혁신적인 모델입니다.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1은 복잡한 추론과 연쇄적 사고(chain-of-thought)에 강한 차세대 추론 모델로, 심층 분석 작업에 적합합니다.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2는 복잡한 추론과 연쇄 사고 능력이 강화된 차세대 추론 모델입니다.",
- "deepseek-chat.description": "DeepSeek V4 Flash 비사고 모드의 호환성 별칭입니다. 사용 중단 예정 — DeepSeek V4 Flash를 대신 사용하세요.",
+ "deepseek-chat.description": "일반 대화 능력과 코딩 능력을 결합한 새로운 오픈소스 모델입니다. 이 모델은 대화 모델의 일반적인 대화 능력과 코더 모델의 강력한 코딩 능력을 유지하며, 더 나은 선호도 정렬을 제공합니다. DeepSeek-V2.5는 또한 글쓰기와 지시 따르기 능력을 향상시켰습니다.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B는 2T 토큰(코드 87%, 중/영문 텍스트 13%)으로 학습된 코드 언어 모델입니다. 16K 문맥 창과 중간 채우기(fit-in-the-middle) 작업을 도입하여 프로젝트 수준의 코드 완성과 코드 조각 보완을 지원합니다.",
"deepseek-coder-v2.description": "DeepSeek Coder V2는 GPT-4 Turbo에 필적하는 성능을 보이는 오픈소스 MoE 코드 모델입니다.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2는 GPT-4 Turbo에 필적하는 성능을 보이는 오픈소스 MoE 코드 모델입니다.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1의 빠른 전체 버전으로, 실시간 웹 검색을 지원하며 671B 규모의 성능과 빠른 응답을 결합합니다.",
"deepseek-r1-online.description": "DeepSeek R1 전체 버전은 671B 파라미터와 실시간 웹 검색을 지원하여 더 강력한 이해 및 생성 능력을 제공합니다.",
"deepseek-r1.description": "DeepSeek-R1은 강화 학습 전 콜드 스타트 데이터를 사용하며, 수학, 코딩, 추론에서 OpenAI-o1과 유사한 성능을 보입니다.",
- "deepseek-reasoner.description": "DeepSeek V4 Flash 사고 모드의 호환성 별칭입니다. 사용 중단 예정 — DeepSeek V4 Flash를 대신 사용하세요.",
+ "deepseek-reasoner.description": "DeepSeek V4 Flash 사고 모드의 호환성 별칭입니다. 사용 중단 예정 — 대신 deepseek-v4-flash를 사용하세요.",
"deepseek-v2.description": "DeepSeek V2는 비용 효율적인 처리를 위한 고효율 MoE 모델입니다.",
"deepseek-v2:236b.description": "DeepSeek V2 236B는 코드 생성에 강점을 가진 DeepSeek의 코드 특화 모델입니다.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324는 671B 파라미터의 MoE 모델로, 프로그래밍 및 기술 역량, 문맥 이해, 장문 처리에서 뛰어난 성능을 보입니다.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0은 ByteDance Seed의 이미지 생성 모델로, 텍스트 및 이미지 입력을 지원하며, 고품질의 이미지 생성과 높은 제어력을 제공합니다. 텍스트 프롬프트로부터 이미지를 생성합니다.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5는 ByteDance의 최신 멀티모달 이미지 모델로, 텍스트-이미지, 이미지-이미지, 배치 이미지 생성 기능을 통합하며 상식과 추론 능력을 포함합니다. 이전 4.0 버전에 비해 생성 품질이 크게 향상되었으며, 편집 일관성과 다중 이미지 융합이 개선되었습니다. 시각적 세부 사항에 대한 더 정밀한 제어를 제공하며, 작은 텍스트와 작은 얼굴을 더 자연스럽게 생성하고 레이아웃과 색상이 더 조화롭게 되어 전체적인 미학을 향상시킵니다.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite는 ByteDance의 최신 이미지 생성 모델로, 처음으로 온라인 검색 기능을 통합하여 실시간 웹 정보를 포함하고 생성된 이미지의 시의성을 향상시킵니다. 모델의 지능도 업그레이드되어 복잡한 지시와 시각적 콘텐츠를 정확히 해석할 수 있습니다. 또한 전문적인 시나리오에서 글로벌 지식 범위, 참조 일관성, 생성 품질이 개선되어 기업 수준의 시각적 창작 요구를 더 잘 충족시킵니다.",
- "dreamina-seedance-2-0-260128.description": "ByteDance의 Seedance 2.0은 가장 강력한 비디오 생성 모델로, 멀티모달 참조 비디오 생성, 비디오 편집, 비디오 확장, 텍스트-비디오 및 이미지-비디오를 동기화된 오디오와 함께 지원합니다.",
- "dreamina-seedance-2-0-fast-260128.description": "ByteDance의 Seedance 2.0 Fast는 Seedance 2.0과 동일한 기능을 제공하며, 더 빠른 생성 속도와 경쟁력 있는 가격을 자랑합니다.",
"emohaa.description": "Emohaa는 전문 상담 능력을 갖춘 정신 건강 모델로, 사용자가 감정 문제를 이해하도록 돕습니다.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B는 로컬 및 맞춤형 배포를 위한 오픈소스 경량 모델입니다.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview는 ERNIE 4.5의 8K 컨텍스트 프리뷰 모델로, 평가용으로 사용됩니다.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K는 복잡한 추론 및 다중 턴 대화를 위한 32K 컨텍스트의 고속 사고 모델입니다.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview는 평가 및 테스트를 위한 사고 모델 프리뷰입니다.",
"ernie-x1.1.description": "ERNIE X1.1은 평가 및 테스트를 위한 사고 모델 프리뷰입니다.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5는 ByteDance Seed 팀에서 개발한 모델로, 다중 이미지 편집 및 합성을 지원합니다. 향상된 주제 일관성, 정밀한 지시 따르기, 공간 논리 이해, 미적 표현, 포스터 레이아웃 및 로고 디자인과 고정밀 텍스트-이미지 렌더링 기능을 제공합니다.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0은 ByteDance Seed에서 개발한 모델로, 텍스트 및 이미지 입력을 지원하며, 프롬프트에서 고도로 제어 가능한 고품질 이미지 생성을 제공합니다.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0은 ByteDance Seed의 이미지 생성 모델로, 텍스트와 이미지 입력을 지원하며 매우 제어 가능하고 고품질의 이미지를 생성합니다. 텍스트 프롬프트로 이미지를 생성합니다.",
"fal-ai/flux-kontext/dev.description": "FLUX.1 모델은 이미지 편집에 중점을 두며, 텍스트와 이미지 입력을 지원합니다.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro]는 텍스트와 참조 이미지를 입력으로 받아, 국소 편집과 복잡한 장면 변환을 정밀하게 수행할 수 있습니다.",
"fal-ai/flux/krea.description": "Flux Krea [dev]는 보다 사실적이고 자연스러운 이미지 스타일에 중점을 둔 이미지 생성 모델입니다.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "강력한 네이티브 멀티모달 이미지 생성 모델입니다.",
"fal-ai/imagen4/preview.description": "Google에서 개발한 고품질 이미지 생성 모델입니다.",
"fal-ai/nano-banana.description": "Nano Banana는 Google의 최신, 가장 빠르고 효율적인 네이티브 멀티모달 모델로, 대화형 이미지 생성 및 편집을 지원합니다.",
- "fal-ai/qwen-image-edit.description": "Qwen 팀에서 개발한 전문 이미지 편집 모델로, 의미 및 외형 편집, 정밀한 중국어/영어 텍스트 편집, 스타일 전환, 회전 등을 지원합니다.",
- "fal-ai/qwen-image.description": "Qwen 팀에서 개발한 강력한 이미지 생성 모델로, 강력한 중국어 텍스트 렌더링과 다양한 시각적 스타일을 제공합니다.",
+ "fal-ai/qwen-image-edit.description": "Qwen 팀의 전문 이미지 편집 모델로, 의미와 외형 편집을 지원하며, 중국어와 영어 텍스트를 정밀하게 편집하고 스타일 전환 및 객체 회전과 같은 고품질 편집을 가능하게 합니다.",
+ "fal-ai/qwen-image.description": "Qwen 팀의 강력한 이미지 생성 모델로, 인상적인 중국어 텍스트 렌더링과 다양한 시각적 스타일을 제공합니다.",
"flux-1-schnell.description": "Black Forest Labs에서 개발한 120억 파라미터 텍스트-이미지 모델로, 잠재 적대 확산 증류를 사용하여 1~4단계 내에 고품질 이미지를 생성합니다. Apache-2.0 라이선스로 개인, 연구, 상업적 사용이 가능합니다.",
"flux-dev.description": "비상업적 혁신 연구를 위해 효율적으로 최적화된 오픈소스 R&D 이미지 생성 모델입니다.",
"flux-kontext-max.description": "최첨단 문맥 기반 이미지 생성 및 편집 모델로, 텍스트와 이미지를 결합하여 정밀하고 일관된 결과를 생성합니다.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash는 속도를 위해 설계된 가장 스마트한 모델로, 최첨단 지능과 뛰어난 검색 기반을 결합합니다.",
"gemini-3-flash.description": "Google의 Gemini 3 Flash — 멀티모달 입력 지원을 갖춘 초고속 모델.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro)는 구글의 이미지 생성 모델로, 멀티모달 대화도 지원합니다.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro)는 Google의 이미지 생성 모델로, 멀티모달 채팅도 지원합니다.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro)는 Google의 이미지 생성 모델로, 멀티모달 대화도 지원합니다.",
"gemini-3-pro-preview.description": "Gemini 3 Pro는 Google의 가장 강력한 에이전트 및 바이브 코딩 모델로, 최첨단 추론 위에 풍부한 시각적 표현과 깊은 상호작용을 제공합니다.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2)는 구글의 가장 빠른 네이티브 이미지 생성 모델로, 사고 지원, 대화형 이미지 생성 및 편집을 제공합니다.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2)는 멀티모달 채팅 지원과 함께 Pro 수준의 이미지 품질을 Flash 속도로 제공합니다.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2)는 Google의 가장 빠른 네이티브 이미지 생성 모델로, 사고 지원, 대화형 이미지 생성 및 편집을 제공합니다.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview는 Google의 가장 비용 효율적인 다중 모드 모델로, 대량 에이전트 작업, 번역 및 데이터 처리에 최적화되어 있습니다.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview는 Gemini 3 Pro의 추론 능력을 강화하고 중간 사고 수준 지원을 추가합니다.",
"gemini-3.1-pro.description": "Google의 Gemini 3.1 Pro — 1M 컨텍스트 윈도우를 갖춘 프리미엄 멀티모달 모델.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Grok 4 Fast는 비용 효율적인 추론 모델 분야에서의 최신 성과로, 출시를 기쁘게 생각합니다.",
"grok-4.20-0309-non-reasoning.description": "간단한 사용 사례를 위한 비추론 변형",
"grok-4.20-0309-reasoning.description": "응답 전에 추론하는 지능적이고 매우 빠른 모델",
- "grok-4.20-beta-0309-non-reasoning.description": "간단한 사용 사례를 위한 비사고 변형 모델",
- "grok-4.20-beta-0309-reasoning.description": "응답 전에 사고하는 지능적이고 매우 빠른 모델",
"grok-4.20-multi-agent-0309.description": "4명 또는 16명의 에이전트 팀, 연구 사용 사례에서 뛰어남, 현재 클라이언트 측 도구를 지원하지 않음. xAI 서버 측 도구(예: X Search, Web Search 도구) 및 원격 MCP 도구만 지원.",
"grok-4.3.description": "세계에서 가장 진실을 추구하는 대규모 언어 모델",
- "grok-4.description": "최신이자 가장 강력한 플래그십 모델로, NLP, 수학 및 추론에서 뛰어난 성능을 발휘하며 이상적인 만능 모델입니다.",
+ "grok-4.description": "언어, 수학, 추론에서 타의 추종을 불허하는 성능을 자랑하는 최신 Grok 플래그십 모델로, 진정한 만능 모델입니다. 현재 grok-4-0709를 가리키며, 제한된 자원으로 인해 공식 가격보다 일시적으로 10% 높게 책정되었으며, 이후 공식 가격으로 복귀할 예정입니다.",
"grok-code-fast-1.description": "에이전트 기반 코딩에 특화된 빠르고 비용 효율적인 추론 모델 grok-code-fast-1을 출시하게 되어 기쁩니다.",
"grok-imagine-image-pro.description": "텍스트 프롬프트에서 이미지를 생성하거나 자연어로 기존 이미지를 편집하거나 다중 턴 대화를 통해 이미지를 반복적으로 개선합니다.",
"grok-imagine-image.description": "텍스트 프롬프트에서 이미지를 생성하거나 자연어로 기존 이미지를 편집하거나 다중 턴 대화를 통해 이미지를 반복적으로 개선합니다.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ는 Qwen 계열의 추론 모델입니다. 일반적인 지시 조정 모델과 비교해 사고 및 추론 능력이 뛰어나며, 특히 어려운 문제에서 다운스트림 성능을 크게 향상시킵니다. QwQ-32B는 DeepSeek-R1 및 o1-mini와 경쟁할 수 있는 중형 추론 모델입니다.",
"qwq_32b.description": "Qwen 계열의 중형 추론 모델입니다. 일반적인 지시 조정 모델과 비교해 QwQ의 사고 및 추론 능력은 특히 어려운 문제에서 다운스트림 성능을 크게 향상시킵니다.",
"r1-1776.description": "R1-1776은 DeepSeek R1의 후속 학습 버전으로, 검열되지 않고 편향 없는 사실 정보를 제공합니다.",
- "seedance-1-5-pro-251215.description": "ByteDance의 Seedance 1.5 Pro는 텍스트-비디오, 이미지-비디오(첫 프레임, 첫+마지막 프레임) 및 시각과 동기화된 오디오 생성을 지원합니다.",
- "seedream-5-0-260128.description": "BytePlus의 ByteDance-Seedream-5.0-lite는 실시간 정보를 위한 웹 검색 보강 생성, 복잡한 프롬프트 해석 향상 및 전문적인 시각적 창작을 위한 참조 일관성 개선을 제공합니다.",
"solar-mini-ja.description": "Solar Mini (Ja)는 Solar Mini의 일본어 특화 버전으로, 영어와 한국어에서도 효율적이고 강력한 성능을 유지합니다.",
"solar-mini.description": "Solar Mini는 GPT-3.5를 능가하는 성능을 가진 소형 LLM으로, 영어와 한국어를 지원하는 강력한 다국어 기능을 갖추고 있으며, 효율적인 경량 솔루션을 제공합니다.",
"solar-pro.description": "Solar Pro는 Upstage의 고지능 LLM으로, 단일 GPU에서 지시 수행에 최적화되어 있으며, IFEval 점수 80 이상을 기록합니다. 현재는 영어를 지원하며, 2024년 11월 전체 릴리스 시 더 많은 언어와 긴 컨텍스트를 지원할 예정입니다.",
diff --git a/locales/ko-KR/providers.json b/locales/ko-KR/providers.json
index 78605550863..08f8678375f 100644
--- a/locales/ko-KR/providers.json
+++ b/locales/ko-KR/providers.json
@@ -33,7 +33,6 @@
"jina.description": "2020년에 설립된 Jina AI는 선도적인 검색 AI 기업으로, 벡터 모델, 재정렬기, 소형 언어 모델을 포함한 검색 스택을 통해 신뢰성 높고 고품질의 생성형 및 멀티모달 검색 앱을 구축합니다.",
"kimicodingplan.description": "문샷 AI의 Kimi Code는 K2.5를 포함한 Kimi 모델에 접근하여 코딩 작업을 수행할 수 있습니다.",
"lmstudio.description": "LM Studio는 데스크탑에서 LLM을 개발하고 실험할 수 있는 애플리케이션입니다.",
- "lobehub.description": "LobeHub Cloud는 공식 API를 사용하여 AI 모델에 접근하며, 모델 토큰에 연계된 크레딧으로 사용량을 측정합니다.",
"longcat.description": "LongCat은 Meituan에서 독자적으로 개발한 생성형 AI 대형 모델 시리즈입니다. 이는 효율적인 계산 아키텍처와 강력한 멀티모달 기능을 통해 내부 기업 생산성을 향상시키고 혁신적인 애플리케이션을 가능하게 하기 위해 설계되었습니다.",
"minimax.description": "2021년에 설립된 MiniMax는 텍스트, 음성, 비전 등 멀티모달 기반의 범용 AI를 개발하며, 조 단위 파라미터의 MoE 텍스트 모델과 Hailuo AI와 같은 앱을 제공합니다.",
"minimaxcodingplan.description": "MiniMax 토큰 플랜은 고정 요금 구독을 통해 M2.7을 포함한 MiniMax 모델에 접근하여 코딩 작업을 수행할 수 있습니다.",
diff --git a/locales/ko-KR/setting.json b/locales/ko-KR/setting.json
index 9bc4d9c380e..e06d70f8256 100644
--- a/locales/ko-KR/setting.json
+++ b/locales/ko-KR/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "수동 입력",
"tab.manualFill.desc": "사용자 정의 MCP 스킬을 수동으로 구성합니다",
"tab.memory": "기억 설정",
+ "tab.messenger": "메신저",
"tab.notification": "알림",
"tab.profile": "내 계정",
"tab.provider": "AI 서비스 제공자",
diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.json
index c651cd954ac..478b539a950 100644
--- a/locales/nl-NL/chat.json
+++ b/locales/nl-NL/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Keur alle tooluitvoeringen automatisch goed",
"tool.intervention.mode.manual": "Handmatig",
"tool.intervention.mode.manualDesc": "Handmatige goedkeuring vereist voor elke oproep",
- "tool.intervention.onboarding.agentIdentity.applyHint": "De nieuwe identiteit verschijnt na goedkeuring.",
- "tool.intervention.onboarding.agentIdentity.description": "Door deze wijziging goed te keuren wordt de Agent bijgewerkt zoals weergegeven in de inbox en in dit onboardinggesprek.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Agent-avatar",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Onboarding-goedkeuring",
- "tool.intervention.onboarding.agentIdentity.name": "Agentnaam",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Inbox-agent",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Huidige onboarding-agent",
- "tool.intervention.onboarding.agentIdentity.targets": "Van toepassing op",
"tool.intervention.onboarding.agentIdentity.title": "Bevestig update van agentidentiteit",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Ik zal mijn avatar bijwerken",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Ik zal mijn naam bijwerken",
"tool.intervention.onboarding.userProfile.applyHint": "Deze gegevens worden na goedkeuring aan je profiel toegevoegd.",
"tool.intervention.onboarding.userProfile.description": "Door deze wijziging goed te keuren, wordt je onboarding-profiel bijgewerkt zodat de Agent toekomstige antwoorden kan afstemmen.",
"tool.intervention.onboarding.userProfile.eyebrow": "Goedkeuring onboarding",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Bijgewerkt {{time}}",
"workingPanel.resources.viewMode.list": "Lijstweergave",
"workingPanel.resources.viewMode.tree": "Boomweergave",
+ "workingPanel.review.baseRef.default": "standaard",
+ "workingPanel.review.baseRef.loading": "Branches laden…",
+ "workingPanel.review.baseRef.reset": "Terugzetten naar standaardbranch",
+ "workingPanel.review.baseRef.unresolved": "Kies een basisbranch",
"workingPanel.review.binary": "Binaire bestand — diff niet weergegeven",
"workingPanel.review.collapseAll": "Alles samenvouwen",
"workingPanel.review.copied": "Pad gekopieerd",
"workingPanel.review.copyPath": "Bestandspad kopiëren",
"workingPanel.review.empty": "Geen wijzigingen in de werkboom",
+ "workingPanel.review.empty.branch": "Geen wijzigingen t.o.v. {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Kon de standaardbranch van de remote niet bepalen. Voer `git remote set-head origin --auto` uit in je terminal.",
"workingPanel.review.error": "Kon de diff van dit bestand niet laden",
"workingPanel.review.expandAll": "Alles uitvouwen",
+ "workingPanel.review.mode.branch": "Branch",
+ "workingPanel.review.mode.unstaged": "Niet-geënsceneerd",
"workingPanel.review.more": "Meer opties",
"workingPanel.review.refresh": "Vernieuwen",
"workingPanel.review.textDiff.disable": "Inline tekstverschillen uitschakelen",
diff --git a/locales/nl-NL/labs.json b/locales/nl-NL/labs.json
index 76a1025e4f9..86a90cafe42 100644
--- a/locales/nl-NL/labs.json
+++ b/locales/nl-NL/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Groepschat (Meerdere Agenten)",
"features.inputMarkdown.desc": "Toon Markdown in het invoerveld in realtime (vette tekst, codeblokken, tabellen, enz.).",
"features.inputMarkdown.title": "Markdown-weergave bij Invoer",
+ "features.messenger.desc": "Praat met je agents via Telegram (en andere messengers) via de gedeelde LobeHub-bot. Voegt een Messenger-tabblad toe in Instellingen om je account te koppelen en te kiezen welke agent berichten ontvangt.",
+ "features.messenger.title": "Messenger",
"title": "Labs"
}
diff --git a/locales/nl-NL/messenger.json b/locales/nl-NL/messenger.json
new file mode 100644
index 00000000000..ff06bfce6f4
--- /dev/null
+++ b/locales/nl-NL/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Actieve agent",
+ "messenger.activeAgentPlaceholder": "Selecteer een agent",
+ "messenger.detail.addServer": "Server toevoegen",
+ "messenger.detail.addWorkspace": "Werkruimte toevoegen",
+ "messenger.detail.connections.connected": "Verbonden",
+ "messenger.detail.connections.empty": "Open de bot en stuur /start om je account te koppelen.",
+ "messenger.detail.connections.linkHint": "Werkruimte geïnstalleerd. Open Slack en stuur een DM naar de bot om je persoonlijke account te koppelen.",
+ "messenger.detail.connections.pending": "In afwachting",
+ "messenger.detail.connections.serverLabel": "server",
+ "messenger.detail.connections.title": "Verbindingen",
+ "messenger.detail.connections.userLabel": "gebruiker",
+ "messenger.detail.connections.workspaceLabel": "werkruimte",
+ "messenger.detail.disconnect": "Verbreek verbinding",
+ "messenger.discord.connectModal.description": "Voeg de LobeHub-bot toe aan een Discord-server die je beheert.",
+ "messenger.discord.connectModal.inviteButton": "Toevoegen aan Discord-server",
+ "messenger.discord.connectModal.notConfigured": "Discord is momenteel niet beschikbaar. Probeer het later opnieuw.",
+ "messenger.discord.connectModal.title": "Voeg bot toe aan je server",
+ "messenger.discord.connections.disconnectConfirm": "Deze server verwijderen uit je auditlijst? De bot blijft in de server totdat een serverbeheerder deze verwijdert.",
+ "messenger.discord.connections.disconnectFailed": "Verwijderen van server mislukt.",
+ "messenger.discord.connections.disconnectSuccess": "Server verwijderd.",
+ "messenger.discord.connections.disconnectTitle": "Verwijder server",
+ "messenger.discord.userPending.cta": "Open in Discord",
+ "messenger.discord.userPending.hint": "Open de bot in Discord en stuur een bericht om je account te koppelen.",
+ "messenger.discord.userPending.name": "Nog niet gekoppeld",
+ "messenger.error.agentNotFound": "Agent niet gevonden.",
+ "messenger.error.disconnectNotAllowed": "Je kunt alleen installaties verbreken die je zelf hebt gestart.",
+ "messenger.error.installationNotFound": "Installatie niet gevonden.",
+ "messenger.error.linkRequired": "Open de bot en stuur /start voordat je deze verbinding wijzigt.",
+ "messenger.error.pickDefaultAgent": "Selecteer een standaardagent voordat je bevestigt.",
+ "messenger.error.platformNotConfigured": "Dit messengerplatform is momenteel niet beschikbaar. Probeer het later opnieuw.",
+ "messenger.linkCta": "Verbinden",
+ "messenger.linkModal.continueIn": "Ga verder in {{platform}}",
+ "messenger.linkModal.instructions": "Open de bot, stuur /start en tik vervolgens op \"Account koppelen\" om je LobeHub-account te verbinden.",
+ "messenger.linkModal.notConfigured": "Deze verbinding is momenteel niet beschikbaar. Probeer het later opnieuw.",
+ "messenger.linkModal.openCta": "Open in {{platform}}",
+ "messenger.linkModal.scanHint": "Of scan met je telefoon om {{platform}} te openen.",
+ "messenger.linkModal.title": "Messenger verbinden",
+ "messenger.list.discord.description": "Chat met je LobeHub-agenten vanaf elke Discord-server via DM met de LobeHub-bot.",
+ "messenger.list.slack.description": "Chat met je LobeHub-agenten vanuit elke Slack-werkruimte via DM of @LobeHub.",
+ "messenger.list.telegram.description": "Chat met je LobeHub-agenten in Telegram en kies wie er antwoordt, waar je ook bent.",
+ "messenger.noPlatformsConfigured": "Er zijn nog geen platforms beschikbaar. Kom later terug.",
+ "messenger.setActiveFailed": "Instellen als actief mislukt.",
+ "messenger.setActiveSuccess": "Actieve agent bijgewerkt.",
+ "messenger.slack.connectModal.continueButton": "Ga verder in Slack",
+ "messenger.slack.connectModal.description": "Je wordt doorgestuurd naar Slack om de installatie van de LobeHub-werkruimte te autoriseren.",
+ "messenger.slack.connectModal.notConfigured": "Slack is momenteel niet beschikbaar. Probeer het later opnieuw.",
+ "messenger.slack.connectModal.title": "Ga verder met instellen in Slack",
+ "messenger.slack.connections.disconnectConfirm": "De LobeHub-bot loskoppelen van deze Slack-werkruimte? Bestaande gebruikerskoppelingen worden gepauzeerd totdat je opnieuw installeert.",
+ "messenger.slack.connections.disconnectFailed": "Loskoppelen mislukt.",
+ "messenger.slack.connections.disconnectSuccess": "Werkruimte losgekoppeld.",
+ "messenger.slack.connections.disconnectTitle": "Werkruimte loskoppelen",
+ "messenger.slack.installBlocked.dismiss": "Begrepen",
+ "messenger.slack.installBlocked.suggestion": "Stuur een DM naar @LobeHub in Slack om je persoonlijke account te koppelen — je hoeft niet opnieuw te installeren. Of vraag de oorspronkelijke installateur om deze werkruimte eerst los te koppelen als je het eigendom wilt overnemen.",
+ "messenger.slack.installBlocked.title": "Werkruimte al verbonden",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" is al verbonden met LobeHub door een andere gebruiker.",
+ "messenger.slack.installBlocked.withoutName": "Deze Slack-werkruimte is al verbonden met LobeHub door een andere gebruiker.",
+ "messenger.slack.installResult.failed": "Slack-installatie mislukt ({{reason}}). Probeer het opnieuw of neem contact op met de ondersteuning.",
+ "messenger.slack.installResult.reasons.accessDenied": "autorisatie werd geannuleerd",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack-autorisatie mislukt",
+ "messenger.slack.installResult.reasons.generic": "er is een onbekende fout opgetreden",
+ "messenger.slack.installResult.reasons.invalidState": "de installatiesessie is verlopen",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack retourneerde onvolledige app-informatie",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack retourneerde onvolledige installatieparameters",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack retourneerde geen werkruimte-identificatie",
+ "messenger.slack.installResult.reasons.missingToken": "Slack retourneerde geen bot-token",
+ "messenger.slack.installResult.reasons.persistFailed": "de werkruimteverbinding kon niet worden opgeslagen",
+ "messenger.slack.installResult.success": "Slack-werkruimte verbonden.",
+ "messenger.subtitle": "Verbind je account eenmalig met de officiële LobeHub-bot. Kies welke agent berichten ontvangt en wissel op elk moment via hier of via de bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Je {{platform}}-account loskoppelen van LobeHub? Inkomende berichten stoppen totdat je opnieuw /start.",
+ "messenger.unlinkCta": "Loskoppelen",
+ "messenger.unlinkFailed": "Loskoppelen mislukt.",
+ "messenger.unlinkSuccess": "Losgekoppeld.",
+ "messenger.unlinkTitle": "Account loskoppelen",
+ "verify.confirm.conflict.description": "Dit {{platform}}-account is al gekoppeld aan LobeHub-account {{email}}. Log in op dat account om de koppeling te beheren, of koppel daar los voordat je het opnieuw probeert.",
+ "verify.confirm.conflict.switchAccount": "Inloggen met een ander account",
+ "verify.confirm.conflict.title": "Dit account is al gekoppeld",
+ "verify.confirm.cta": "Bevestig koppeling",
+ "verify.confirm.defaultAgent": "Standaardagent",
+ "verify.confirm.defaultAgentHint": "Je berichten worden hier eerst naartoe gestuurd. Je kunt op elk moment wisselen via /agents in de bot of via Instellingen → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Selecteer een agent",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub-account",
+ "verify.confirm.fields.platformAccount": "{{platform}}-account",
+ "verify.confirm.fields.workspace": "Werkruimte",
+ "verify.confirm.noAgents": "Je hebt nog geen agenten. Maak er een aan in LobeHub en kom terug om de koppeling te voltooien.",
+ "verify.confirm.title": "Bevestig koppeling",
+ "verify.confirm.workspace": "Werkruimte: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Dit account is al gekoppeld aan een ander LobeHub-account. Log eerst in op dat account.",
+ "verify.error.expired": "Deze koppeling is verlopen. Ga terug naar de bot en stuur opnieuw /start.",
+ "verify.error.generic": "Er is iets misgegaan. Probeer het opnieuw.",
+ "verify.error.missingToken": "Ongeldige koppeling. Open deze pagina vanuit de bot.",
+ "verify.error.title": "Koppeling kan niet worden bevestigd",
+ "verify.labRequired.description": "Messenger is momenteel een Labs-functie. Schakel het in via Instellingen → Geavanceerd → Labs en herlaad deze pagina.",
+ "verify.labRequired.openSettings": "Open Labs-instellingen",
+ "verify.labRequired.title": "Schakel Messenger in om door te gaan",
+ "verify.signInCta": "Log in om door te gaan",
+ "verify.signInRequired": "Log in bij LobeHub om de koppeling te bevestigen.",
+ "verify.success.description": "Je account is nu verbonden met {{platform}}. Open {{platform}} en stuur je eerste bericht.",
+ "verify.success.openBot": "Open in {{platform}}",
+ "verify.success.title": "Succesvol gekoppeld!"
+}
diff --git a/locales/nl-NL/models.json b/locales/nl-NL/models.json
index 28a560fa4ff..de518bf0d17 100644
--- a/locales/nl-NL/models.json
+++ b/locales/nl-NL/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Gloednieuw videogenereermodel met uitgebreide verbeteringen in lichaamsbeweging, fysieke realisme en instructienaleving.",
"MiniMax-M1.description": "Een nieuw intern redeneermodel met 80K chain-of-thought en 1M input, met prestaties vergelijkbaar met toonaangevende wereldwijde modellen.",
"MiniMax-M2-Stable.description": "Ontworpen voor efficiënte codeer- en agentworkflows, met hogere gelijktijdigheid voor commercieel gebruik.",
- "MiniMax-M2.1-Lightning.description": "Krachtige meertalige programmeermogelijkheden met snellere en efficiëntere inferentie.",
"MiniMax-M2.1-highspeed.description": "Krachtige meertalige programmeermogelijkheden, een volledig verbeterde programmeerervaring. Sneller en efficiënter.",
"MiniMax-M2.1.description": "MiniMax-M2.1 is het vlaggenschip open-source grote model van MiniMax, gericht op het oplossen van complexe, realistische taken. De kernkwaliteiten zijn meertalige programmeermogelijkheden en het vermogen om complexe taken als een Agent op te lossen.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Zelfde prestaties als M2.5 met snellere inferentie.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku is het snelste en meest compacte model van Anthropic, ontworpen voor vrijwel directe reacties met snelle en nauwkeurige prestaties.",
"claude-3-opus-20240229.description": "Claude 3 Opus is het krachtigste model van Anthropic voor zeer complexe taken, met uitmuntende prestaties, intelligentie, vloeiendheid en begrip.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet biedt een balans tussen intelligentie en snelheid voor zakelijke toepassingen, met hoge bruikbaarheid tegen lagere kosten en betrouwbare grootschalige inzet.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 is het snelste en meest intelligente Haiku-model van Anthropic, met bliksemsnelle snelheid en uitgebreide denkcapaciteiten.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 is Anthropic's snelste en slimste Haiku-model, met bliksemsnelle snelheid en uitgebreide redeneervermogen.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 door Anthropic — next-gen Haiku met verbeterde redenering en visie.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 is Anthropic's snelste en slimste Haiku-model, met bliksemsnelle snelheid en uitgebreide redeneervermogen.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking is een geavanceerde variant die zijn redeneerproces kan onthullen.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 is het nieuwste en meest capabele model van Anthropic voor zeer complexe taken, uitblinkend in prestaties, intelligentie, vloeiendheid en begrip.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 is Anthropic's nieuwste en meest capabele model voor zeer complexe taken, uitblinkend in prestaties, intelligentie, vloeiendheid en begrip.",
"claude-opus-4-1.description": "Claude Opus 4.1 door Anthropic — premium redeneermodel met diepgaande analysemogelijkheden.",
- "claude-opus-4-20250514.description": "Claude Opus 4 is het krachtigste model van Anthropic voor zeer complexe taken, uitblinkend in prestaties, intelligentie, vloeiendheid en begrip.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 is Anthropic's krachtigste model voor zeer complexe taken, uitblinkend in prestaties, intelligentie, vloeiendheid en begrip.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 is het vlaggenschipmodel van Anthropic, dat uitzonderlijke intelligentie combineert met schaalbare prestaties. Ideaal voor complexe taken die hoogwaardige antwoorden en redenering vereisen.",
"claude-opus-4-5.description": "Claude Opus 4.5 door Anthropic — vlaggenschipmodel met topklasse redenering en codering.",
"claude-opus-4-6.description": "Claude Opus 4.6 door Anthropic — vlaggenschip met 1M contextvenster en geavanceerde redenering.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 is Anthropic's meest intelligente model voor het bouwen van agents en coderen.",
"claude-opus-4.6.description": "Claude Opus 4.6 is Anthropic's meest intelligente model voor het bouwen van agents en coderen.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking kan vrijwel directe antwoorden geven of uitgebreide stapsgewijze redenering tonen met zichtbaar proces.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 is tot nu toe het meest intelligente model van Anthropic, met bijna onmiddellijke reacties of uitgebreide stapsgewijze denkprocessen met fijnmazige controle voor API-gebruikers.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 is tot nu toe het meest intelligente model van Anthropic.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 kan bijna onmiddellijke reacties genereren of uitgebreide stapsgewijze denkprocessen met zichtbaar verloop.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 is Anthropic's meest intelligente model tot nu toe.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 door Anthropic — verbeterde Sonnet met verbeterde codeerprestaties.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 door Anthropic — nieuwste Sonnet met superieure codering en hulpmiddelengebruik.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 is tot nu toe het meest intelligente model van Anthropic.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) is een innovatief model dat diep taalbegrip en interactie biedt.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 is een next-gen redeneermodel met sterkere complexe redenering en chain-of-thought voor diepgaande analysetaken.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 is een next-gen redeneermodel met sterkere complexe redeneer- en keten-van-denken-capaciteiten.",
- "deepseek-chat.description": "Compatibiliteitsalias voor DeepSeek V4 Flash niet-denkende modus. Gepland voor afschaffing — gebruik in plaats daarvan DeepSeek V4 Flash.",
+ "deepseek-chat.description": "Een nieuw open-source model dat algemene en codevaardigheden combineert. Het behoudt de algemene dialoog van het chatmodel en de sterke codeerkwaliteiten van het coderingsmodel, met betere voorkeurafstemming. DeepSeek-V2.5 verbetert ook schrijven en het volgen van instructies.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B is een codeertaalmodel getraind op 2 biljoen tokens (87% code, 13% Chinees/Engels tekst). Het introduceert een contextvenster van 16K en 'fill-in-the-middle'-taken, wat projectniveau codeaanvulling en fragmentinvoeging mogelijk maakt.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 is een open-source MoE-codeermodel dat sterk presteert bij programmeertaken, vergelijkbaar met GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 is een open-source MoE-codeermodel dat sterk presteert bij programmeertaken, vergelijkbaar met GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 snelle volledige versie met realtime webzoekfunctie, combineert 671B-capaciteit met snellere reacties.",
"deepseek-r1-online.description": "DeepSeek R1 volledige versie met 671B parameters en realtime webzoekfunctie, biedt sterkere begrip- en generatiecapaciteiten.",
"deepseek-r1.description": "DeepSeek-R1 gebruikt cold-start data vóór versterkingsleren en presteert vergelijkbaar met OpenAI-o1 op wiskunde, programmeren en redenering.",
- "deepseek-reasoner.description": "Compatibiliteitsalias voor DeepSeek V4 Flash denkende modus. Gepland voor afschaffing — gebruik in plaats daarvan DeepSeek V4 Flash.",
+ "deepseek-reasoner.description": "Compatibiliteitsalias voor DeepSeek V4 Flash-denkmodus. Gepland voor afschaffing — gebruik deepseek-v4-flash in plaats daarvan.",
"deepseek-v2.description": "DeepSeek V2 is een efficiënt MoE-model voor kosteneffectieve verwerking.",
"deepseek-v2:236b.description": "DeepSeek V2 236B is DeepSeek’s codegerichte model met sterke codegeneratie.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 is een MoE-model met 671B parameters en uitmuntende prestaties in programmeren, technische vaardigheden, contextbegrip en verwerking van lange teksten.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 is een beeldgeneratiemodel van ByteDance Seed dat tekst- en afbeeldingsinvoer ondersteunt voor zeer controleerbare, hoogwaardige beeldgeneratie. Het genereert beelden op basis van tekstprompts.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 is het nieuwste multimodale beeldmodel van ByteDance, dat tekst-naar-beeld, beeld-naar-beeld en batchbeeldgeneratiecapaciteiten integreert, terwijl het gezond verstand en redeneervermogen bevat. Vergeleken met de vorige 4.0-versie levert het aanzienlijk verbeterde generatiekwaliteit, met betere bewerkingsconsistentie en multi-beeldfusie. Het biedt meer precieze controle over visuele details, produceert kleine teksten en gezichten natuurlijker, en bereikt een harmonieuzere lay-out en kleur, wat de algehele esthetiek verbetert.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite is het nieuwste beeldgeneratiemodel van ByteDance. Voor het eerst integreert het online zoekmogelijkheden, waardoor het real-time webinformatie kan opnemen en de actualiteit van gegenereerde beelden kan verbeteren. De intelligentie van het model is ook geüpgraded, waardoor het complexe instructies en visuele inhoud nauwkeurig kan interpreteren. Bovendien biedt het verbeterde wereldwijde kennisdekking, referentieconsistentie en generatiekwaliteit in professionele scenario's, waardoor het beter voldoet aan visuele creatiebehoeften op ondernemingsniveau.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 van ByteDance is het krachtigste videogeneratiemodel, dat multimodale referentievideogeneratie, videobewerking, video-uitbreiding, tekst-naar-video en afbeelding-naar-video met gesynchroniseerd geluid ondersteunt.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast van ByteDance biedt dezelfde mogelijkheden als Seedance 2.0 met snellere generatiesnelheden tegen een concurrerendere prijs.",
"emohaa.description": "Emohaa is een mentaal gezondheidsmodel met professionele begeleidingsvaardigheden om gebruikers te helpen emotionele problemen te begrijpen.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B is een lichtgewicht open-source model voor lokale en aangepaste implementatie.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview is een previewmodel met 8K context voor het evalueren van ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K is een snel denkend model met 32K context voor complexe redenatie en meerstapsgesprekken.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview is een preview van een denkmodel voor evaluatie en testen.",
"ernie-x1.1.description": "ERNIE X1.1 is een preview van een denkmodel voor evaluatie en testen.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, ontwikkeld door het ByteDance Seed-team, ondersteunt multi-image bewerking en compositie. Kenmerken zijn verbeterde onderwerpconsistentie, nauwkeurig instructievolgen, ruimtelijk logisch begrip, esthetische expressie, posterlay-out en logodesign met hoogprecisie tekst-afbeelding rendering.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, ontwikkeld door ByteDance Seed, ondersteunt tekst- en afbeeldingsinvoer voor zeer controleerbare, hoogwaardige afbeeldingsgeneratie op basis van prompts.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 is een afbeeldingsgeneratiemodel van ByteDance Seed, dat tekst- en afbeeldingsinvoer ondersteunt met zeer controleerbare, hoogwaardige afbeeldingsgeneratie. Het genereert afbeeldingen op basis van tekstprompts.",
"fal-ai/flux-kontext/dev.description": "FLUX.1-model gericht op beeldbewerking, met ondersteuning voor tekst- en afbeeldingsinvoer.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] accepteert tekst en referentieafbeeldingen als invoer, waardoor gerichte lokale bewerkingen en complexe wereldwijde scèneaanpassingen mogelijk zijn.",
"fal-ai/flux/krea.description": "Flux Krea [dev] is een afbeeldingsgeneratiemodel met een esthetische voorkeur voor realistische, natuurlijke beelden.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Een krachtig, native multimodaal afbeeldingsgeneratiemodel.",
"fal-ai/imagen4/preview.description": "Hoogwaardig afbeeldingsgeneratiemodel van Google.",
"fal-ai/nano-banana.description": "Nano Banana is het nieuwste, snelste en meest efficiënte native multimodale model van Google, waarmee beeldgeneratie en -bewerking via conversatie mogelijk is.",
- "fal-ai/qwen-image-edit.description": "Een professioneel afbeeldingsbewerkingsmodel van het Qwen-team, dat semantische en uiterlijke bewerkingen, nauwkeurige Chinese/Engelse tekstbewerking, stijltransfer, rotatie en meer ondersteunt.",
- "fal-ai/qwen-image.description": "Een krachtig afbeeldingsgeneratiemodel van het Qwen-team met sterke Chinese tekstrendering en diverse visuele stijlen.",
+ "fal-ai/qwen-image-edit.description": "Een professioneel afbeeldingsbewerkingsmodel van het Qwen-team dat semantische en uiterlijke bewerkingen ondersteunt, nauwkeurig Chinese en Engelse tekst bewerkt, en hoogwaardige bewerkingen mogelijk maakt zoals stijltransformatie en objectrotatie.",
+ "fal-ai/qwen-image.description": "Een krachtig afbeeldingsgeneratiemodel van het Qwen-team met indrukwekkende Chinese tekstweergave en diverse visuele stijlen.",
"flux-1-schnell.description": "Een tekst-naar-beeldmodel met 12 miljard parameters van Black Forest Labs, dat gebruikmaakt van latente adversariële diffusiedistillatie om hoogwaardige beelden te genereren in 1–4 stappen. Het evenaart gesloten alternatieven en is uitgebracht onder de Apache-2.0-licentie voor persoonlijk, onderzoeks- en commercieel gebruik.",
"flux-dev.description": "Open-source R&D-beeldgeneratiemodel, efficiënt geoptimaliseerd voor niet-commercieel innovatief onderzoek.",
"flux-kontext-max.description": "State-of-the-art contextuele beeldgeneratie en -bewerking, waarbij tekst en afbeeldingen worden gecombineerd voor nauwkeurige, samenhangende resultaten.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash is het slimste model dat is gebouwd voor snelheid, met geavanceerde intelligentie en uitstekende zoekverankering.",
"gemini-3-flash.description": "Gemini 3 Flash door Google — ultrafast model met ondersteuning voor multimodale invoer.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) is het beeldgeneratiemodel van Google dat ook multimodale dialogen ondersteunt.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) is het afbeeldingsgeneratiemodel van Google en ondersteunt ook multimodale chat.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) is Google's afbeeldingsgeneratiemodel en ondersteunt ook multimodale chat.",
"gemini-3-pro-preview.description": "Gemini 3 Pro is het krachtigste agent- en vibe-codingmodel van Google, met rijkere visuele output en diepere interactie bovenop geavanceerde redeneercapaciteiten.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) is het snelste native beeldgeneratiemodel van Google met denksupport, conversatiebeeldgeneratie en bewerking.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) levert Pro-niveau afbeeldingskwaliteit met Flash-snelheid en multimodale chatondersteuning.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) is Google's snelste native afbeeldingsgeneratiemodel met denkondersteuning, conversatiegerichte afbeeldingsgeneratie en bewerking.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview is het meest kostenefficiënte multimodale model van Google, geoptimaliseerd voor grootschalige agenttaken, vertaling en gegevensverwerking.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview verbetert Gemini 3 Pro met verbeterde redeneercapaciteiten en voegt ondersteuning toe voor een gemiddeld denkniveau.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro door Google — premium multimodaal model met 1M contextvenster.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "We zijn verheugd Grok 4 Fast uit te brengen, onze nieuwste vooruitgang in kosteneffectieve redeneermodellen.",
"grok-4.20-0309-non-reasoning.description": "Een niet-redenerende variant voor eenvoudige gebruiksscenario's.",
"grok-4.20-0309-reasoning.description": "Intelligent, razendsnel model dat redeneert voordat het reageert.",
- "grok-4.20-beta-0309-non-reasoning.description": "Een niet-redenerende variant voor eenvoudige gebruiksscenario's",
- "grok-4.20-beta-0309-reasoning.description": "Intelligent, razendsnel model dat redeneert voordat het reageert",
"grok-4.20-multi-agent-0309.description": "Een team van 4 of 16 agents, uitblinkend in onderzoeksgebruiksscenario's. Ondersteunt momenteel geen client-side tools. Ondersteunt alleen xAI server-side tools (bijv. X Search, Web Search tools) en remote MCP tools.",
"grok-4.3.description": "Het meest waarheidsgetrouwe grote taalmodel ter wereld",
- "grok-4.description": "Ons nieuwste en sterkste vlaggenschipmodel, uitblinkend in NLP, wiskunde en redeneren — een ideale allrounder.",
+ "grok-4.description": "Nieuwste Grok-vlaggenschip met ongeëvenaarde prestaties in taal, wiskunde en redeneervermogen — een echte allrounder. Verwijst momenteel naar grok-4-0709; vanwege beperkte middelen is het tijdelijk 10% hoger dan de officiële prijs en wordt verwacht terug te keren naar de officiële prijs later.",
"grok-code-fast-1.description": "We zijn verheugd om grok-code-fast-1 te lanceren, een snel en kosteneffectief redeneermodel dat uitblinkt in agentmatig programmeren.",
"grok-imagine-image-pro.description": "Genereer beelden vanuit tekstprompts, bewerk bestaande beelden met natuurlijke taal, of verfijn beelden iteratief via meerstapsgesprekken.",
"grok-imagine-image.description": "Genereer beelden vanuit tekstprompts, bewerk bestaande beelden met natuurlijke taal, of verfijn beelden iteratief via meerstapsgesprekken.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ is een redeneermodel binnen de Qwen-familie. In vergelijking met standaard instructie-getrainde modellen biedt het denk- en redeneervermogen dat de prestaties op complexe problemen aanzienlijk verbetert. QwQ-32B is een middelgroot redeneermodel dat zich kan meten met topmodellen zoals DeepSeek-R1 en o1-mini.",
"qwq_32b.description": "Middelgroot redeneermodel binnen de Qwen-familie. In vergelijking met standaard instructie-getrainde modellen verbeteren QwQ’s denk- en redeneervermogen de prestaties op complexe problemen aanzienlijk.",
"r1-1776.description": "R1-1776 is een na-getrainde variant van DeepSeek R1, ontworpen om ongecensureerde, onbevooroordeelde feitelijke informatie te bieden.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro van ByteDance ondersteunt tekst-naar-video, afbeelding-naar-video (eerste frame, eerste+laatste frame) en audiogeneratie gesynchroniseerd met visuals.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite van BytePlus biedt web-ophaal-verrijkte generatie voor realtime informatie, verbeterde interpretatie van complexe prompts en verbeterde referentieconsistentie voor professionele visuele creatie.",
"solar-mini-ja.description": "Solar Mini (Ja) breidt Solar Mini uit met focus op Japans, terwijl het efficiënte, sterke prestaties in Engels en Koreaans behoudt.",
"solar-mini.description": "Solar Mini is een compact LLM dat beter presteert dan GPT-3.5, met sterke meertalige ondersteuning voor Engels en Koreaans, en biedt een efficiënte oplossing met een kleine voetafdruk.",
"solar-pro.description": "Solar Pro is een intelligent LLM van Upstage, gericht op instructieopvolging op een enkele GPU, met IFEval-scores boven de 80. Momenteel ondersteunt het Engels; de volledige release stond gepland voor november 2024 met uitgebreidere taalondersteuning en langere context.",
diff --git a/locales/nl-NL/providers.json b/locales/nl-NL/providers.json
index 5765156359e..05ef593c8b0 100644
--- a/locales/nl-NL/providers.json
+++ b/locales/nl-NL/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Opgericht in 2020, is Jina AI een toonaangevend zoek-AI-bedrijf. De zoekstack omvat vectormodellen, herordenaars en kleine taalmodellen om betrouwbare, hoogwaardige generatieve en multimodale zoekapps te bouwen.",
"kimicodingplan.description": "Kimi Code van Moonshot AI biedt toegang tot Kimi-modellen, waaronder K2.5, voor coderingstaken.",
"lmstudio.description": "LM Studio is een desktopapplicatie voor het ontwikkelen en experimenteren met LLM’s op je eigen computer.",
- "lobehub.description": "LobeHub Cloud gebruikt officiële API's om toegang te krijgen tot AI-modellen en meet het gebruik met Credits gekoppeld aan modeltokens.",
"longcat.description": "LongCat is een reeks generatieve AI-grote modellen die onafhankelijk zijn ontwikkeld door Meituan. Het is ontworpen om de productiviteit binnen ondernemingen te verbeteren en innovatieve toepassingen mogelijk te maken door middel van een efficiënte computationele architectuur en sterke multimodale mogelijkheden.",
"minimax.description": "Opgericht in 2021, bouwt MiniMax algemene AI met multimodale fundamentele modellen, waaronder tekstmodellen met biljoenen parameters, spraakmodellen en visiemodellen, evenals apps zoals Hailuo AI.",
"minimaxcodingplan.description": "MiniMax Token Plan biedt toegang tot MiniMax-modellen, waaronder M2.7, voor coderingstaken via een abonnement met vaste kosten.",
diff --git a/locales/nl-NL/setting.json b/locales/nl-NL/setting.json
index 3bc8dcddb3f..8fcb71ced2f 100644
--- a/locales/nl-NL/setting.json
+++ b/locales/nl-NL/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Handmatig Invullen",
"tab.manualFill.desc": "Handmatig een aangepaste MCP-vaardigheid configureren",
"tab.memory": "Geheugen",
+ "tab.messenger": "Berichten",
"tab.notification": "Meldingen",
"tab.profile": "Mijn Account",
"tab.provider": "AI-dienstverlener",
diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.json
index 59287f4cabf..c0dc72ce545 100644
--- a/locales/pl-PL/chat.json
+++ b/locales/pl-PL/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Automatycznie zatwierdzaj wszystkie wywołania narzędzi",
"tool.intervention.mode.manual": "Ręczne",
"tool.intervention.mode.manualDesc": "Wymagane ręczne zatwierdzenie każdego wywołania",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Nowa tożsamość pojawi się po zatwierdzeniu.",
- "tool.intervention.onboarding.agentIdentity.description": "Zatwierdzenie tej zmiany aktualizuje Agenta wyświetlanego w Skrzynce odbiorczej i w tej rozmowie powitalnej.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Awatar agenta",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Zatwierdzenie onboardingu",
- "tool.intervention.onboarding.agentIdentity.name": "Nazwa agenta",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Agent skrzynki odbiorczej",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Obecny agent w onboardingu",
- "tool.intervention.onboarding.agentIdentity.targets": "Dotyczy",
"tool.intervention.onboarding.agentIdentity.title": "Potwierdź aktualizację tożsamości agenta",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Zaktualizuję swój awatar",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Zaktualizuję swoje imię",
"tool.intervention.onboarding.userProfile.applyHint": "Te dane zostaną zapisane w Twoim profilu po zatwierdzeniu.",
"tool.intervention.onboarding.userProfile.description": "Zatwierdzenie tej zmiany aktualizuje Twój profil onboardingowy, dzięki czemu Agent może dostosować przyszłe odpowiedzi.",
"tool.intervention.onboarding.userProfile.eyebrow": "Zatwierdzenie onboardingu",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Zaktualizowano {{time}}",
"workingPanel.resources.viewMode.list": "Widok listy",
"workingPanel.resources.viewMode.tree": "Widok drzewa",
+ "workingPanel.review.baseRef.default": "domyślny",
+ "workingPanel.review.baseRef.loading": "Ładowanie gałęzi…",
+ "workingPanel.review.baseRef.reset": "Przywróć do domyślnej gałęzi",
+ "workingPanel.review.baseRef.unresolved": "Wybierz gałąź bazową",
"workingPanel.review.binary": "Plik binarny — różnice nie są wyświetlane",
"workingPanel.review.collapseAll": "Zwiń wszystko",
"workingPanel.review.copied": "Ścieżka skopiowana",
"workingPanel.review.copyPath": "Skopiuj ścieżkę pliku",
"workingPanel.review.empty": "Brak zmian w drzewie roboczym",
+ "workingPanel.review.empty.branch": "Brak zmian względem {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Nie udało się określić domyślnej gałęzi zdalnej. Uruchom `git remote set-head origin --auto` w terminalu.",
"workingPanel.review.error": "Nie udało się załadować różnic dla tego pliku",
"workingPanel.review.expandAll": "Rozwiń wszystko",
+ "workingPanel.review.mode.branch": "Gałąź",
+ "workingPanel.review.mode.unstaged": "Niezatwierdzone",
"workingPanel.review.more": "Więcej opcji",
"workingPanel.review.refresh": "Odśwież",
"workingPanel.review.textDiff.disable": "Wyłącz różnice tekstowe w linii",
diff --git a/locales/pl-PL/labs.json b/locales/pl-PL/labs.json
index 142f7e11dea..88078ecd773 100644
--- a/locales/pl-PL/labs.json
+++ b/locales/pl-PL/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Czat Grupowy (Wielu Agentów)",
"features.inputMarkdown.desc": "Renderuj Markdown w polu wprowadzania w czasie rzeczywistym (pogrubiony tekst, bloki kodu, tabele itp.).",
"features.inputMarkdown.title": "Renderowanie Markdown w Polu Wprowadzania",
+ "features.messenger.desc": "Rozmawiaj ze swoimi agentami za pośrednictwem Telegrama (i innych komunikatorów) za pomocą wspólnego bota LobeHub. Dodaje zakładkę Messenger w Ustawieniach, umożliwiając powiązanie konta i wybór agenta, który odbiera wiadomości.",
+ "features.messenger.title": "Komunikator",
"title": "Laboratorium"
}
diff --git a/locales/pl-PL/messenger.json b/locales/pl-PL/messenger.json
new file mode 100644
index 00000000000..af2f17ad142
--- /dev/null
+++ b/locales/pl-PL/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Aktywny agent",
+ "messenger.activeAgentPlaceholder": "Wybierz agenta",
+ "messenger.detail.addServer": "Dodaj serwer",
+ "messenger.detail.addWorkspace": "Dodaj przestrzeń roboczą",
+ "messenger.detail.connections.connected": "Połączono",
+ "messenger.detail.connections.empty": "Otwórz bota i wyślij /start, aby połączyć swoje konto.",
+ "messenger.detail.connections.linkHint": "Przestrzeń robocza zainstalowana. Otwórz Slack i wyślij wiadomość do bota, aby zakończyć łączenie swojego konta osobistego.",
+ "messenger.detail.connections.pending": "Oczekujące",
+ "messenger.detail.connections.serverLabel": "serwer",
+ "messenger.detail.connections.title": "Połączenia",
+ "messenger.detail.connections.userLabel": "użytkownik",
+ "messenger.detail.connections.workspaceLabel": "przestrzeń robocza",
+ "messenger.detail.disconnect": "Odłącz",
+ "messenger.discord.connectModal.description": "Dodaj bota LobeHub do serwera Discord, którym zarządzasz.",
+ "messenger.discord.connectModal.inviteButton": "Dodaj do serwera Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord jest obecnie niedostępny. Spróbuj ponownie później.",
+ "messenger.discord.connectModal.title": "Dodaj bota do swojego serwera",
+ "messenger.discord.connections.disconnectConfirm": "Usunąć ten serwer z listy audytów? Bot pozostanie na serwerze, dopóki administrator serwera go nie usunie.",
+ "messenger.discord.connections.disconnectFailed": "Nie udało się usunąć serwera.",
+ "messenger.discord.connections.disconnectSuccess": "Serwer usunięty.",
+ "messenger.discord.connections.disconnectTitle": "Usuń serwer",
+ "messenger.discord.userPending.cta": "Otwórz w Discord",
+ "messenger.discord.userPending.hint": "Otwórz bota w Discord i wyślij dowolną wiadomość, aby zakończyć łączenie swojego konta.",
+ "messenger.discord.userPending.name": "Jeszcze nie połączono",
+ "messenger.error.agentNotFound": "Nie znaleziono agenta.",
+ "messenger.error.disconnectNotAllowed": "Możesz odłączyć tylko instalacje, które sam rozpocząłeś.",
+ "messenger.error.installationNotFound": "Nie znaleziono instalacji.",
+ "messenger.error.linkRequired": "Otwórz bota i wyślij /start przed zmianą tego połączenia.",
+ "messenger.error.pickDefaultAgent": "Wybierz domyślnego agenta przed potwierdzeniem.",
+ "messenger.error.platformNotConfigured": "Ta platforma komunikatora jest obecnie niedostępna. Spróbuj ponownie później.",
+ "messenger.linkCta": "Połącz",
+ "messenger.linkModal.continueIn": "Kontynuuj konfigurację w {{platform}}",
+ "messenger.linkModal.instructions": "Otwórz bota, wyślij /start, a następnie kliknij „Połącz konto”, aby połączyć swoje konto LobeHub.",
+ "messenger.linkModal.notConfigured": "To połączenie jest obecnie niedostępne. Spróbuj ponownie później.",
+ "messenger.linkModal.openCta": "Otwórz w {{platform}}",
+ "messenger.linkModal.scanHint": "Lub zeskanuj telefonem, aby otworzyć {{platform}}.",
+ "messenger.linkModal.title": "Połącz komunikator",
+ "messenger.list.discord.description": "Rozmawiaj ze swoimi agentami LobeHub na dowolnym serwerze Discord za pomocą DM z botem LobeHub.",
+ "messenger.list.slack.description": "Rozmawiaj ze swoimi agentami LobeHub w dowolnej przestrzeni roboczej Slack za pomocą DM lub @LobeHub.",
+ "messenger.list.telegram.description": "Rozmawiaj ze swoimi agentami LobeHub w Telegramie i wybierz, który z nich odpowiada z dowolnego miejsca.",
+ "messenger.noPlatformsConfigured": "Żadne platformy nie są jeszcze dostępne. Sprawdź ponownie wkrótce.",
+ "messenger.setActiveFailed": "Nie udało się ustawić jako aktywnego.",
+ "messenger.setActiveSuccess": "Zaktualizowano aktywnego agenta.",
+ "messenger.slack.connectModal.continueButton": "Kontynuuj w Slack",
+ "messenger.slack.connectModal.description": "Zostaniesz przekierowany do Slack, aby autoryzować instalację przestrzeni roboczej LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack jest obecnie niedostępny. Spróbuj ponownie później.",
+ "messenger.slack.connectModal.title": "Kontynuuj konfigurację w Slack",
+ "messenger.slack.connections.disconnectConfirm": "Odłączyć bota LobeHub od tej przestrzeni roboczej Slack? Istniejące połączenia użytkowników zostaną wstrzymane, dopóki nie zainstalujesz ponownie.",
+ "messenger.slack.connections.disconnectFailed": "Nie udało się odłączyć.",
+ "messenger.slack.connections.disconnectSuccess": "Przestrzeń robocza odłączona.",
+ "messenger.slack.connections.disconnectTitle": "Odłącz przestrzeń roboczą",
+ "messenger.slack.installBlocked.dismiss": "Zrozumiałem",
+ "messenger.slack.installBlocked.suggestion": "Wyślij DM do @LobeHub w Slack, aby połączyć swoje konto osobiste — nie musisz instalować ponownie. Lub poproś pierwotnego instalatora o odłączenie tej przestrzeni roboczej, jeśli chcesz przejąć własność.",
+ "messenger.slack.installBlocked.title": "Przestrzeń robocza już połączona",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" jest już połączona z LobeHub przez innego użytkownika.",
+ "messenger.slack.installBlocked.withoutName": "Ta przestrzeń robocza Slack jest już połączona z LobeHub przez innego użytkownika.",
+ "messenger.slack.installResult.failed": "Instalacja Slack nie powiodła się ({{reason}}). Spróbuj ponownie lub skontaktuj się z pomocą techniczną.",
+ "messenger.slack.installResult.reasons.accessDenied": "autoryzacja została anulowana",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Autoryzacja Slack nie powiodła się",
+ "messenger.slack.installResult.reasons.generic": "wystąpił nieznany błąd",
+ "messenger.slack.installResult.reasons.invalidState": "sesja instalacyjna wygasła",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack zwrócił niekompletne informacje o aplikacji",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack zwrócił niekompletne parametry instalacji",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack nie zwrócił identyfikatora przestrzeni roboczej",
+ "messenger.slack.installResult.reasons.missingToken": "Slack nie zwrócił tokena bota",
+ "messenger.slack.installResult.reasons.persistFailed": "nie udało się zapisać połączenia przestrzeni roboczej",
+ "messenger.slack.installResult.success": "Przestrzeń robocza Slack połączona.",
+ "messenger.subtitle": "Połącz swoje konto z oficjalnym botem LobeHub raz. Wybierz, który agent odbiera wiadomości, zmieniaj w dowolnym momencie stąd lub z poziomu bota.",
+ "messenger.title": "Komunikator",
+ "messenger.unlinkConfirm": "Odłączyć swoje konto {{platform}} od LobeHub? Wiadomości przychodzące zostaną zatrzymane, dopóki nie wyślesz ponownie /start.",
+ "messenger.unlinkCta": "Odłącz",
+ "messenger.unlinkFailed": "Nie udało się odłączyć.",
+ "messenger.unlinkSuccess": "Odłączono.",
+ "messenger.unlinkTitle": "Odłącz konto",
+ "verify.confirm.conflict.description": "To konto {{platform}} jest już połączone z kontem LobeHub {{email}}. Zaloguj się na to konto, aby zarządzać połączeniem, lub odłącz je tam przed ponowną próbą.",
+ "verify.confirm.conflict.switchAccount": "Zaloguj się na inne konto",
+ "verify.confirm.conflict.title": "To konto jest już połączone",
+ "verify.confirm.cta": "Potwierdź połączenie",
+ "verify.confirm.defaultAgent": "Domyślny agent",
+ "verify.confirm.defaultAgentHint": "Twoje wiadomości będą najpierw kierowane tutaj. Możesz zmienić to w dowolnym momencie za pomocą /agents w bocie lub w Ustawienia → Komunikator.",
+ "verify.confirm.defaultAgentPlaceholder": "Wybierz agenta",
+ "verify.confirm.fields.lobeHubAccount": "Konto LobeHub",
+ "verify.confirm.fields.platformAccount": "Konto {{platform}}",
+ "verify.confirm.fields.workspace": "Przestrzeń robocza",
+ "verify.confirm.noAgents": "Nie masz jeszcze żadnych agentów. Utwórz jednego w LobeHub, a następnie wróć, aby zakończyć łączenie.",
+ "verify.confirm.title": "Potwierdź połączenie",
+ "verify.confirm.workspace": "Przestrzeń robocza: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "To konto jest już połączone z innym kontem LobeHub. Najpierw zaloguj się na to konto.",
+ "verify.error.expired": "To połączenie wygasło. Wróć do bota i wyślij ponownie /start.",
+ "verify.error.generic": "Coś poszło nie tak. Spróbuj ponownie.",
+ "verify.error.missingToken": "Nieprawidłowe połączenie. Otwórz tę stronę z poziomu bota.",
+ "verify.error.title": "Nie można potwierdzić połączenia",
+ "verify.labRequired.description": "Komunikator jest obecnie funkcją eksperymentalną. Włącz ją w Ustawienia → Zaawansowane → Eksperymentalne i odśwież tę stronę.",
+ "verify.labRequired.openSettings": "Otwórz ustawienia eksperymentalne",
+ "verify.labRequired.title": "Włącz komunikator, aby kontynuować",
+ "verify.signInCta": "Zaloguj się, aby kontynuować",
+ "verify.signInRequired": "Zaloguj się do LobeHub, aby potwierdzić połączenie.",
+ "verify.success.description": "Twoje konto zostało połączone z {{platform}}. Otwórz {{platform}} i wyślij swoją pierwszą wiadomość.",
+ "verify.success.openBot": "Otwórz w {{platform}}",
+ "verify.success.title": "Połączono pomyślnie!"
+}
diff --git a/locales/pl-PL/models.json b/locales/pl-PL/models.json
index 4de5c6ddea7..e84272c97b3 100644
--- a/locales/pl-PL/models.json
+++ b/locales/pl-PL/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Nowy model generowania wideo z kompleksowymi ulepszeniami w zakresie ruchu ciała, realizmu fizycznego i przestrzegania instrukcji.",
"MiniMax-M1.description": "Nowy wewnętrzny model rozumowania z 80 tys. łańcuchów myślowych i 1 mln tokenów wejściowych, oferujący wydajność porównywalną z czołowymi modelami światowymi.",
"MiniMax-M2-Stable.description": "Zaprojektowany z myślą o wydajnym kodowaniu i przepływach pracy agentów, z większą równoległością dla zastosowań komercyjnych.",
- "MiniMax-M2.1-Lightning.description": "Potężne, wielojęzyczne możliwości programowania z szybszym i bardziej efektywnym wnioskowaniem.",
"MiniMax-M2.1-highspeed.description": "Potężne wielojęzyczne możliwości programistyczne, kompleksowo ulepszone doświadczenie programowania. Szybszy i bardziej wydajny.",
"MiniMax-M2.1.description": "MiniMax-M2.1 to flagowy, otwartoźródłowy model dużej skali od MiniMax, zaprojektowany do rozwiązywania złożonych zadań rzeczywistych. Jego główne atuty to wielojęzyczne możliwości programistyczne oraz zdolność działania jako Agent do rozwiązywania skomplikowanych problemów.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Ta sama wydajność co M2.5, ale z szybszym wnioskowaniem.",
@@ -320,7 +319,7 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku to najszybszy i najbardziej kompaktowy model firmy Anthropic, zaprojektowany do natychmiastowych odpowiedzi z szybką i dokładną wydajnością.",
"claude-3-opus-20240229.description": "Claude 3 Opus to najpotężniejszy model firmy Anthropic do bardzo złożonych zadań, wyróżniający się wydajnością, inteligencją, płynnością i zrozumieniem.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet łączy inteligencję i szybkość dla obciążeń korporacyjnych, oferując wysoką użyteczność przy niższych kosztach i niezawodnym wdrażaniu na dużą skalę.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 to najszybszy i najbardziej inteligentny model Haiku od Anthropic, oferujący błyskawiczną prędkość i rozszerzone myślenie.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 to najszybszy i najinteligentniejszy model Haiku od Anthropic, oferujący błyskawiczną prędkość i rozszerzone możliwości rozumowania.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 by Anthropic — model nowej generacji Haiku z ulepszonym rozumowaniem i wizją.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 to najszybszy i najinteligentniejszy model Haiku firmy Anthropic, charakteryzujący się błyskawiczną szybkością i rozszerzonym rozumowaniem.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking to zaawansowany wariant, który może ujawniać swój proces rozumowania.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 to najbardziej inteligentny model firmy Anthropic do tworzenia agentów i kodowania.",
"claude-opus-4.6.description": "Claude Opus 4.6 to najbardziej inteligentny model firmy Anthropic do tworzenia agentów i kodowania.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking może generować natychmiastowe odpowiedzi lub rozszerzone rozumowanie krok po kroku z widocznym procesem.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 to najbardziej inteligentny model Anthropic do tej pory, oferujący niemal natychmiastowe odpowiedzi lub rozszerzone, krok po kroku myślenie z precyzyjną kontrolą dla użytkowników API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 potrafi generować niemal natychmiastowe odpowiedzi lub rozbudowane, krok po kroku, przemyślenia z widocznym procesem.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 to najbardziej inteligentny model Anthropic do tej pory.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 by Anthropic — ulepszony Sonnet z lepszą wydajnością kodowania.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 by Anthropic — najnowszy Sonnet z lepszym kodowaniem i obsługą narzędzi.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) to innowacyjny model oferujący głębokie zrozumienie języka i interakcję.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 to model nowej generacji do rozumowania z silniejszym rozumowaniem złożonym i łańcuchem myśli do zadań wymagających głębokiej analizy.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 to model rozumowania nowej generacji z ulepszonymi zdolnościami do rozwiązywania złożonych problemów i myślenia łańcuchowego.",
- "deepseek-chat.description": "Alias zgodności dla trybu bez myślenia DeepSeek V4 Flash. Przeznaczony do wycofania — użyj zamiast tego DeepSeek V4 Flash.",
+ "deepseek-chat.description": "Nowy model open-source łączący ogólne zdolności i umiejętności kodowania. Zachowuje ogólny dialog modelu czatu oraz silne zdolności kodowania modelu programistycznego, z lepszym dopasowaniem do preferencji. DeepSeek-V2.5 również poprawia pisanie i wykonywanie instrukcji.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B to model języka kodu wytrenowany na 2T tokenach (87% kod, 13% tekst chiński/angielski). Wprowadza okno kontekstu 16K i zadania uzupełniania w środku, oferując uzupełnianie kodu na poziomie projektu i wypełnianie fragmentów.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 to open-source’owy model kodu MoE, który osiąga wysokie wyniki w zadaniach programistycznych, porównywalne z GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 to open-source’owy model kodu MoE, który osiąga wysokie wyniki w zadaniach programistycznych, porównywalne z GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Szybka pełna wersja DeepSeek R1 z wyszukiwaniem w czasie rzeczywistym, łącząca możliwości modelu 671B z szybszymi odpowiedziami.",
"deepseek-r1-online.description": "Pełna wersja DeepSeek R1 z 671 miliardami parametrów i wyszukiwaniem w czasie rzeczywistym, oferująca lepsze rozumienie i generowanie.",
"deepseek-r1.description": "DeepSeek-R1 wykorzystuje dane startowe przed RL i osiąga wyniki porównywalne z OpenAI-o1 w zadaniach matematycznych, programistycznych i logicznych.",
- "deepseek-reasoner.description": "Alias zgodności dla trybu myślenia DeepSeek V4 Flash. Przeznaczony do wycofania — użyj zamiast tego DeepSeek V4 Flash.",
+ "deepseek-reasoner.description": "Alias kompatybilności dla trybu szybkiego myślenia DeepSeek V4 Flash. Przeznaczony do wycofania — użyj zamiast tego deepseek-v4-flash.",
"deepseek-v2.description": "DeepSeek V2 to wydajny model MoE zoptymalizowany pod kątem efektywności kosztowej.",
"deepseek-v2:236b.description": "DeepSeek V2 236B to model skoncentrowany na kodzie, oferujący zaawansowane generowanie kodu.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 to model MoE z 671 miliardami parametrów, wyróżniający się w programowaniu, rozumieniu kontekstu i obsłudze długich tekstów.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 to model generowania obrazów od ByteDance Seed, obsługujący wejścia tekstowe i obrazowe z wysoką kontrolą i jakością. Generuje obrazy na podstawie tekstowych promptów.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 to najnowszy multimodalny model obrazu ByteDance, integrujący funkcje tekst-do-obrazu, obraz-do-obrazu i generowanie obrazów w partiach, jednocześnie uwzględniając zdrowy rozsądek i zdolności rozumowania. W porównaniu do poprzedniej wersji 4.0 oferuje znacznie lepszą jakość generowania, lepszą spójność edycji i fuzję wielu obrazów. Zapewnia bardziej precyzyjną kontrolę nad szczegółami wizualnymi, naturalnie generując małe teksty i twarze, a także osiąga bardziej harmonijny układ i kolorystykę, poprawiając estetykę ogólną.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite to najnowszy model generowania obrazów ByteDance. Po raz pierwszy integruje funkcje wyszukiwania online, co pozwala na uwzględnienie informacji w czasie rzeczywistym i poprawę aktualności generowanych obrazów. Inteligencja modelu została również ulepszona, umożliwiając precyzyjną interpretację złożonych instrukcji i treści wizualnych. Dodatkowo oferuje lepsze pokrycie globalnej wiedzy, spójność odniesień i jakość generowania w profesjonalnych scenariuszach, lepiej spełniając potrzeby wizualnej kreacji na poziomie przedsiębiorstw.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 od ByteDance to najpotężniejszy model generowania wideo, obsługujący multimodalne generowanie wideo referencyjnego, edycję wideo, rozszerzanie wideo, tekst na wideo i obraz na wideo z zsynchronizowanym dźwiękiem.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast od ByteDance oferuje te same możliwości co Seedance 2.0, ale z szybszymi prędkościami generowania i bardziej konkurencyjną ceną.",
"emohaa.description": "Emohaa to model zdrowia psychicznego z profesjonalnymi umiejętnościami doradczymi, pomagający użytkownikom zrozumieć problemy emocjonalne.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B to lekki model open-source przeznaczony do lokalnego i dostosowanego wdrażania.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview to model podglądowy z kontekstem 8K, służący do oceny możliwości ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K to szybki model rozumowania z kontekstem 32K do złożonego rozumowania i dialogów wieloetapowych.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview to podgląd modelu rozumowania do oceny i testów.",
"ernie-x1.1.description": "ERNIE X1.1 to model rozumowania w wersji podglądowej do oceny i testowania.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, stworzony przez zespół ByteDance Seed, obsługuje edycję i kompozycję wielu obrazów. Funkcje obejmują ulepszoną spójność tematyczną, precyzyjne śledzenie instrukcji, rozumienie logiki przestrzennej, ekspresję estetyczną, układ plakatów i projektowanie logo z wysoką precyzją renderowania tekstu i obrazu.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, stworzony przez ByteDance Seed, obsługuje wejścia tekstowe i obrazowe do wysoce kontrolowalnego, wysokiej jakości generowania obrazów na podstawie podpowiedzi.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 to model generowania obrazów od ByteDance Seed, obsługujący wejścia tekstowe i obrazowe, z możliwością wysoce kontrolowanego, wysokiej jakości generowania obrazów. Generuje obrazy na podstawie tekstowych wskazówek.",
"fal-ai/flux-kontext/dev.description": "Model FLUX.1 skoncentrowany na edycji obrazów, obsługujący wejścia tekstowe i obrazowe.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] przyjmuje tekst i obrazy referencyjne jako dane wejściowe, umożliwiając lokalne edycje i złożone transformacje sceny.",
"fal-ai/flux/krea.description": "Flux Krea [dev] to model generowania obrazów z estetycznym ukierunkowaniem na bardziej realistyczne, naturalne obrazy.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Potężny natywny model multimodalny do generowania obrazów.",
"fal-ai/imagen4/preview.description": "Model generowania obrazów wysokiej jakości od Google.",
"fal-ai/nano-banana.description": "Nano Banana to najnowszy, najszybszy i najbardziej wydajny natywny model multimodalny Google, umożliwiający generowanie i edycję obrazów w rozmowie.",
- "fal-ai/qwen-image-edit.description": "Profesjonalny model edycji obrazów od zespołu Qwen, obsługujący edycje semantyczne i wyglądu, precyzyjną edycję tekstu w języku chińskim/angielskim, transfer stylu, obrót i inne.",
- "fal-ai/qwen-image.description": "Potężny model generowania obrazów od zespołu Qwen z silnym renderowaniem tekstu w języku chińskim i różnorodnymi stylami wizualnymi.",
+ "fal-ai/qwen-image-edit.description": "Profesjonalny model edycji obrazów od zespołu Qwen, który obsługuje edycje semantyczne i wizualne, precyzyjnie edytuje tekst w języku chińskim i angielskim oraz umożliwia wysokiej jakości edycje, takie jak transfer stylu i obrót obiektów.",
+ "fal-ai/qwen-image.description": "Potężny model generowania obrazów od zespołu Qwen z imponującym renderowaniem tekstu w języku chińskim i różnorodnymi stylami wizualnymi.",
"flux-1-schnell.description": "Model tekst-na-obraz z 12 miliardami parametrów od Black Forest Labs, wykorzystujący latent adversarial diffusion distillation do generowania wysokiej jakości obrazów w 1–4 krokach. Dorównuje zamkniętym alternatywom i jest dostępny na licencji Apache-2.0 do użytku osobistego, badawczego i komercyjnego.",
"flux-dev.description": "Model generowania obrazów do badań i rozwoju o otwartym kodzie źródłowym, zoptymalizowany pod kątem niekomercyjnych badań innowacyjnych.",
"flux-kontext-max.description": "Najnowocześniejsze generowanie i edycja obrazów kontekstowych, łączące tekst i obrazy dla precyzyjnych, spójnych wyników.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash to najszybszy i najinteligentniejszy model, łączący najnowsze osiągnięcia AI z doskonałym osadzeniem w wynikach wyszukiwania.",
"gemini-3-flash.description": "Gemini 3 Flash by Google — ultraszybki model z obsługą wejść multimodalnych.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) to model generowania obrazów od Google, który obsługuje również dialogi multimodalne.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) to model generowania obrazów Google, który obsługuje również czat multimodalny.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) to model generowania obrazów od Google, który obsługuje również multimodalny czat.",
"gemini-3-pro-preview.description": "Gemini 3 Pro to najpotężniejszy model agenta i kodowania nastrojów od Google, oferujący bogatsze wizualizacje i głębszą interakcję przy zaawansowanym rozumowaniu.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) to najszybszy natywny model generowania obrazów od Google z obsługą myślenia, generowaniem obrazów w rozmowach i edycją.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) dostarcza obrazy jakości Pro z prędkością Flash, z obsługą czatu multimodalnego.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) to najszybszy natywny model generowania obrazów od Google, wspierający myślenie, konwersacyjne generowanie obrazów i ich edycję.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview to najbardziej ekonomiczny model multimodalny Google, zoptymalizowany do zadań agentowych o dużej skali, tłumaczeń i przetwarzania danych.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview ulepsza Gemini 3 Pro, oferując lepsze zdolności rozumowania i wsparcie dla średniego poziomu myślenia.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro by Google — premium model multimodalny z oknem kontekstowym 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Z radością prezentujemy Grok 4 Fast — nasz najnowszy postęp w dziedzinie modeli rozumowania o wysokiej opłacalności.",
"grok-4.20-0309-non-reasoning.description": "Wariant bez rozumowania do prostych przypadków użycia.",
"grok-4.20-0309-reasoning.description": "Inteligentny, błyskawiczny model, który rozumuje przed odpowiedzią.",
- "grok-4.20-beta-0309-non-reasoning.description": "Wariant bez rozumowania do prostych przypadków użycia",
- "grok-4.20-beta-0309-reasoning.description": "Inteligentny, błyskawiczny model, który rozumuje przed odpowiedzią",
"grok-4.20-multi-agent-0309.description": "Zespół 4 lub 16 agentów, doskonały w przypadkach badawczych. Obecnie nie obsługuje narzędzi po stronie klienta. Obsługuje tylko narzędzia po stronie serwera xAI (np. X Search, Web Search tools) i zdalne narzędzia MCP.",
"grok-4.3.description": "Najbardziej poszukujący prawdy duży model językowy na świecie",
- "grok-4.description": "Nasz najnowszy i najsilniejszy flagowy model, wyróżniający się w NLP, matematyce i rozumowaniu — idealny wszechstronny wybór.",
+ "grok-4.description": "Najnowszy flagowy model Grok z niezrównaną wydajnością w języku, matematyce i rozumowaniu — prawdziwy wszechstronny model. Obecnie wskazuje na grok-4-0709; z powodu ograniczonych zasobów jego cena jest tymczasowo o 10% wyższa od oficjalnej i oczekuje się, że powróci do oficjalnej ceny w późniejszym czasie.",
"grok-code-fast-1.description": "Z radością ogłaszamy premierę grok-code-fast-1 — szybkiego i opłacalnego modelu rozumowania, który doskonale radzi sobie z programowaniem agentowym.",
"grok-imagine-image-pro.description": "Generuj obrazy na podstawie tekstowych wskazówek, edytuj istniejące obrazy za pomocą naturalnego języka lub iteracyjnie udoskonalaj obrazy w trakcie wieloetapowych rozmów.",
"grok-imagine-image.description": "Generuj obrazy na podstawie tekstowych wskazówek, edytuj istniejące obrazy za pomocą naturalnego języka lub iteracyjnie udoskonalaj obrazy w trakcie wieloetapowych rozmów.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ to model rozumowania z rodziny Qwen. W porównaniu do standardowych modeli dostrojonych instrukcyjnie, oferuje zaawansowane myślenie i rozumowanie, co znacząco poprawia wydajność w zadaniach trudnych. QwQ-32B to model średniej wielkości, konkurujący z czołowymi modelami rozumowania, takimi jak DeepSeek-R1 i o1-mini.",
"qwq_32b.description": "Model rozumowania średniej wielkości z rodziny Qwen. W porównaniu do standardowych modeli dostrojonych instrukcyjnie, zdolności myślenia i rozumowania QwQ znacząco poprawiają wydajność w trudnych zadaniach.",
"r1-1776.description": "R1-1776 to wariant modelu DeepSeek R1 po dodatkowym treningu, zaprojektowany do dostarczania nieocenzurowanych, bezstronnych informacji faktograficznych.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro od ByteDance obsługuje tekst na wideo, obraz na wideo (pierwsza klatka, pierwsza + ostatnia klatka) i generowanie dźwięku zsynchronizowanego z wizualizacjami.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite od BytePlus oferuje generowanie wspomagane wyszukiwaniem w czasie rzeczywistym, ulepszoną interpretację złożonych podpowiedzi i poprawioną spójność odniesień do profesjonalnego tworzenia wizualnego.",
"solar-mini-ja.description": "Solar Mini (Ja) rozszerza Solar Mini o nacisk na język japoński, zachowując jednocześnie wydajność w języku angielskim i koreańskim.",
"solar-mini.description": "Solar Mini to kompaktowy model LLM, który przewyższa GPT-3.5, oferując silne możliwości wielojęzyczne w języku angielskim i koreańskim oraz efektywne działanie przy małych zasobach.",
"solar-pro.description": "Solar Pro to inteligentny model LLM od Upstage, skoncentrowany na wykonywaniu instrukcji na pojedynczym GPU, z wynikami IFEval powyżej 80. Obecnie obsługuje język angielski; pełna wersja z rozszerzonym wsparciem językowym i dłuższym kontekstem planowana jest na listopad 2024.",
diff --git a/locales/pl-PL/providers.json b/locales/pl-PL/providers.json
index 87cb4c8a9c9..c61dde8836d 100644
--- a/locales/pl-PL/providers.json
+++ b/locales/pl-PL/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Założona w 2020 roku, Jina AI to wiodąca firma zajmująca się wyszukiwaniem AI. Jej stos wyszukiwania obejmuje modele wektorowe, rerankery i małe modele językowe do tworzenia niezawodnych, wysokiej jakości aplikacji generatywnych i multimodalnych.",
"kimicodingplan.description": "Kimi Code od Moonshot AI zapewnia dostęp do modeli Kimi, w tym K2.5, do zadań związanych z kodowaniem.",
"lmstudio.description": "LM Studio to aplikacja desktopowa do tworzenia i testowania LLM-ów na własnym komputerze.",
- "lobehub.description": "LobeHub Cloud korzysta z oficjalnych interfejsów API do uzyskiwania dostępu do modeli AI i mierzy zużycie za pomocą Kredytów powiązanych z tokenami modeli.",
"longcat.description": "LongCat to seria dużych modeli generatywnej sztucznej inteligencji, niezależnie opracowanych przez Meituan. Został zaprojektowany, aby zwiększyć produktywność wewnętrzną przedsiębiorstwa i umożliwić innowacyjne zastosowania dzięki wydajnej architekturze obliczeniowej i silnym możliwościom multimodalnym.",
"minimax.description": "Założona w 2021 roku, MiniMax tworzy AI ogólnego przeznaczenia z multimodalnymi modelami bazowymi, w tym tekstowymi modelami MoE z bilionami parametrów, modelami mowy i wizji oraz aplikacjami takimi jak Hailuo AI.",
"minimaxcodingplan.description": "MiniMax Token Plan zapewnia dostęp do modeli MiniMax, w tym M2.7, do zadań związanych z kodowaniem w ramach subskrypcji o stałej opłacie.",
diff --git a/locales/pl-PL/setting.json b/locales/pl-PL/setting.json
index 6d3197ba53d..315c82dcc70 100644
--- a/locales/pl-PL/setting.json
+++ b/locales/pl-PL/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Wypełnij ręcznie",
"tab.manualFill.desc": "Ręcznie skonfiguruj niestandardową umiejętność MCP",
"tab.memory": "Pamięć",
+ "tab.messenger": "Komunikator",
"tab.notification": "Powiadomienia",
"tab.profile": "Moje konto",
"tab.provider": "Dostawca usług AI",
diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.json
index 8a64ee8973a..8596d7cbb76 100644
--- a/locales/pt-BR/chat.json
+++ b/locales/pt-BR/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Aprovar automaticamente todas as execuções de ferramentas",
"tool.intervention.mode.manual": "Manual",
"tool.intervention.mode.manualDesc": "Requer aprovação manual para cada execução",
- "tool.intervention.onboarding.agentIdentity.applyHint": "A nova identidade aparecerá após a aprovação.",
- "tool.intervention.onboarding.agentIdentity.description": "Aprovar essa alteração atualiza o Agente exibido na Caixa de Entrada e nesta conversa de onboarding.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Avatar do agente",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Aprovação de onboarding",
- "tool.intervention.onboarding.agentIdentity.name": "Nome do agente",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Agente da Caixa de Entrada",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Agente atual de onboarding",
- "tool.intervention.onboarding.agentIdentity.targets": "Aplica-se a",
"tool.intervention.onboarding.agentIdentity.title": "Confirmar atualização de identidade do agente",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Vou atualizar meu avatar",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Vou atualizar meu nome",
"tool.intervention.onboarding.userProfile.applyHint": "Esses detalhes serão salvos no seu perfil após aprovação.",
"tool.intervention.onboarding.userProfile.description": "A aprovação desta alteração atualiza seu perfil de integração para que o Agente possa personalizar respostas futuras.",
"tool.intervention.onboarding.userProfile.eyebrow": "Aprovação de integração",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Atualizado {{time}}",
"workingPanel.resources.viewMode.list": "Modo lista",
"workingPanel.resources.viewMode.tree": "Modo árvore",
+ "workingPanel.review.baseRef.default": "padrão",
+ "workingPanel.review.baseRef.loading": "Carregando branches…",
+ "workingPanel.review.baseRef.reset": "Redefinir para a branch padrão",
+ "workingPanel.review.baseRef.unresolved": "Escolha uma branch base",
"workingPanel.review.binary": "Arquivo binário — diferença não exibida",
"workingPanel.review.collapseAll": "Recolher tudo",
"workingPanel.review.copied": "Caminho copiado",
"workingPanel.review.copyPath": "Copiar caminho do arquivo",
"workingPanel.review.empty": "Sem alterações na árvore de trabalho",
+ "workingPanel.review.empty.branch": "Sem alterações em relação a {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Não foi possível determinar a branch padrão remota. Execute `git remote set-head origin --auto` no seu terminal.",
"workingPanel.review.error": "Não foi possível carregar a diferença deste arquivo",
"workingPanel.review.expandAll": "Expandir tudo",
+ "workingPanel.review.mode.branch": "Branch",
+ "workingPanel.review.mode.unstaged": "Não preparado",
"workingPanel.review.more": "Mais opções",
"workingPanel.review.refresh": "Atualizar",
"workingPanel.review.textDiff.disable": "Desativar diferença de texto inline",
diff --git a/locales/pt-BR/labs.json b/locales/pt-BR/labs.json
index d24dbd5e2ff..4b4d80bcff0 100644
--- a/locales/pt-BR/labs.json
+++ b/locales/pt-BR/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Bate-Papo em Grupo (Multiagente)",
"features.inputMarkdown.desc": "Renderize Markdown na área de entrada em tempo real (texto em negrito, blocos de código, tabelas etc.).",
"features.inputMarkdown.title": "Renderização de Markdown na Entrada",
+ "features.messenger.desc": "Converse com seus agentes pelo Telegram (e outros mensageiros) através do bot compartilhado LobeHub. Adiciona uma aba Mensageiro nas Configurações para vincular sua conta e escolher qual agente recebe as mensagens.",
+ "features.messenger.title": "Mensageiro",
"title": "Laboratórios"
}
diff --git a/locales/pt-BR/messenger.json b/locales/pt-BR/messenger.json
new file mode 100644
index 00000000000..75ece9a9817
--- /dev/null
+++ b/locales/pt-BR/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Agente ativo",
+ "messenger.activeAgentPlaceholder": "Selecione um agente",
+ "messenger.detail.addServer": "Adicionar servidor",
+ "messenger.detail.addWorkspace": "Adicionar espaço de trabalho",
+ "messenger.detail.connections.connected": "Conectado",
+ "messenger.detail.connections.empty": "Abra o bot e envie /start para vincular sua conta.",
+ "messenger.detail.connections.linkHint": "Espaço de trabalho instalado. Abra o Slack e envie uma DM para o bot para concluir o vínculo da sua conta pessoal.",
+ "messenger.detail.connections.pending": "Pendente",
+ "messenger.detail.connections.serverLabel": "servidor",
+ "messenger.detail.connections.title": "Conexões",
+ "messenger.detail.connections.userLabel": "usuário",
+ "messenger.detail.connections.workspaceLabel": "espaço de trabalho",
+ "messenger.detail.disconnect": "Desconectar",
+ "messenger.discord.connectModal.description": "Adicione o bot LobeHub a um servidor Discord que você gerencia.",
+ "messenger.discord.connectModal.inviteButton": "Adicionar ao servidor Discord",
+ "messenger.discord.connectModal.notConfigured": "O Discord não está disponível no momento. Por favor, tente novamente mais tarde.",
+ "messenger.discord.connectModal.title": "Adicionar bot ao seu servidor",
+ "messenger.discord.connections.disconnectConfirm": "Remover este servidor da sua lista de auditoria? O bot permanecerá no servidor até que um administrador o remova.",
+ "messenger.discord.connections.disconnectFailed": "Falha ao remover o servidor.",
+ "messenger.discord.connections.disconnectSuccess": "Servidor removido.",
+ "messenger.discord.connections.disconnectTitle": "Remover servidor",
+ "messenger.discord.userPending.cta": "Abrir no Discord",
+ "messenger.discord.userPending.hint": "Abra o bot no Discord e envie qualquer mensagem para concluir o vínculo da sua conta.",
+ "messenger.discord.userPending.name": "Ainda não vinculado",
+ "messenger.error.agentNotFound": "Agente não encontrado.",
+ "messenger.error.disconnectNotAllowed": "Você só pode desconectar instalações que iniciou.",
+ "messenger.error.installationNotFound": "Instalação não encontrada.",
+ "messenger.error.linkRequired": "Abra o bot e envie /start antes de alterar esta conexão.",
+ "messenger.error.pickDefaultAgent": "Selecione um agente padrão antes de confirmar.",
+ "messenger.error.platformNotConfigured": "Esta plataforma de mensagens não está disponível no momento. Por favor, tente novamente mais tarde.",
+ "messenger.linkCta": "Conectar",
+ "messenger.linkModal.continueIn": "Continue a configuração no {{platform}}",
+ "messenger.linkModal.instructions": "Abra o bot, envie /start e toque em \"Vincular Conta\" para conectar sua conta LobeHub.",
+ "messenger.linkModal.notConfigured": "Esta conexão não está disponível no momento. Por favor, tente novamente mais tarde.",
+ "messenger.linkModal.openCta": "Abrir no {{platform}}",
+ "messenger.linkModal.scanHint": "Ou escaneie com seu telefone para abrir o {{platform}}.",
+ "messenger.linkModal.title": "Conectar Messenger",
+ "messenger.list.discord.description": "Converse com seus agentes LobeHub de qualquer servidor Discord via DM com o bot LobeHub.",
+ "messenger.list.slack.description": "Converse com seus agentes LobeHub de qualquer espaço de trabalho Slack via DM ou @LobeHub.",
+ "messenger.list.telegram.description": "Converse com seus agentes LobeHub no Telegram e escolha qual deles responde de qualquer lugar.",
+ "messenger.noPlatformsConfigured": "Nenhuma plataforma está disponível ainda. Volte em breve.",
+ "messenger.setActiveFailed": "Falha ao definir como ativo.",
+ "messenger.setActiveSuccess": "Agente ativo atualizado.",
+ "messenger.slack.connectModal.continueButton": "Continuar no Slack",
+ "messenger.slack.connectModal.description": "Você será redirecionado para o Slack para autorizar a instalação do espaço de trabalho LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "O Slack não está disponível no momento. Por favor, tente novamente mais tarde.",
+ "messenger.slack.connectModal.title": "Continuar configuração no Slack",
+ "messenger.slack.connections.disconnectConfirm": "Desconectar o bot LobeHub deste espaço de trabalho Slack? Os vínculos de usuários existentes serão pausados até que você reinstale.",
+ "messenger.slack.connections.disconnectFailed": "Falha ao desconectar.",
+ "messenger.slack.connections.disconnectSuccess": "Espaço de trabalho desconectado.",
+ "messenger.slack.connections.disconnectTitle": "Desconectar espaço de trabalho",
+ "messenger.slack.installBlocked.dismiss": "Entendido",
+ "messenger.slack.installBlocked.suggestion": "Envie uma DM para @LobeHub no Slack para vincular sua conta pessoal — você não precisa instalar novamente. Ou peça ao instalador original para desconectar este espaço de trabalho primeiro, caso queira assumir a propriedade.",
+ "messenger.slack.installBlocked.title": "Espaço de trabalho já conectado",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" já está conectado ao LobeHub por outro usuário.",
+ "messenger.slack.installBlocked.withoutName": "Este espaço de trabalho Slack já está conectado ao LobeHub por outro usuário.",
+ "messenger.slack.installResult.failed": "Falha na instalação do Slack ({{reason}}). Por favor, tente novamente ou entre em contato com o suporte.",
+ "messenger.slack.installResult.reasons.accessDenied": "a autorização foi cancelada",
+ "messenger.slack.installResult.reasons.exchangeFailed": "falha na autorização do Slack",
+ "messenger.slack.installResult.reasons.generic": "ocorreu um erro desconhecido",
+ "messenger.slack.installResult.reasons.invalidState": "a sessão de instalação expirou",
+ "messenger.slack.installResult.reasons.missingAppId": "o Slack retornou informações incompletas do aplicativo",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "o Slack retornou parâmetros de instalação incompletos",
+ "messenger.slack.installResult.reasons.missingTenant": "o Slack não retornou um identificador de espaço de trabalho",
+ "messenger.slack.installResult.reasons.missingToken": "o Slack não retornou um token de bot",
+ "messenger.slack.installResult.reasons.persistFailed": "a conexão do espaço de trabalho não pôde ser salva",
+ "messenger.slack.installResult.success": "Espaço de trabalho Slack conectado.",
+ "messenger.subtitle": "Conecte sua conta ao bot oficial do LobeHub uma vez. Escolha qual agente recebe mensagens, altere a qualquer momento daqui ou do bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Desconectar sua conta do {{platform}} do LobeHub? As mensagens recebidas serão interrompidas até que você envie /start novamente.",
+ "messenger.unlinkCta": "Desconectar",
+ "messenger.unlinkFailed": "Falha ao desconectar.",
+ "messenger.unlinkSuccess": "Desconectado.",
+ "messenger.unlinkTitle": "Desconectar conta",
+ "verify.confirm.conflict.description": "Esta conta do {{platform}} já está vinculada à conta LobeHub {{email}}. Faça login nessa conta para gerenciar o vínculo ou desvincule lá antes de tentar novamente.",
+ "verify.confirm.conflict.switchAccount": "Entrar com outra conta",
+ "verify.confirm.conflict.title": "Esta conta já está vinculada",
+ "verify.confirm.cta": "Confirmar vínculo",
+ "verify.confirm.defaultAgent": "Agente padrão",
+ "verify.confirm.defaultAgentHint": "Suas mensagens serão direcionadas para cá primeiro. Você pode alterar a qualquer momento via /agents no bot ou em Configurações → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Selecione um agente",
+ "verify.confirm.fields.lobeHubAccount": "Conta LobeHub",
+ "verify.confirm.fields.platformAccount": "Conta {{platform}}",
+ "verify.confirm.fields.workspace": "Espaço de trabalho",
+ "verify.confirm.noAgents": "Você ainda não tem nenhum agente. Crie um no LobeHub e volte para concluir o vínculo.",
+ "verify.confirm.title": "Confirmar vínculo",
+ "verify.confirm.workspace": "Espaço de trabalho: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Esta conta já está vinculada a uma conta LobeHub diferente. Faça login nessa conta primeiro.",
+ "verify.error.expired": "Este vínculo expirou. Por favor, volte ao bot e envie /start novamente.",
+ "verify.error.generic": "Algo deu errado. Por favor, tente novamente.",
+ "verify.error.missingToken": "Vínculo inválido. Abra esta página a partir do bot.",
+ "verify.error.title": "Não foi possível confirmar o vínculo",
+ "verify.labRequired.description": "O Messenger é atualmente um recurso do Labs. Ative-o em Configurações → Avançado → Labs e recarregue esta página.",
+ "verify.labRequired.openSettings": "Abrir configurações do Labs",
+ "verify.labRequired.title": "Ative o Messenger para continuar",
+ "verify.signInCta": "Faça login para continuar",
+ "verify.signInRequired": "Por favor, faça login no LobeHub para confirmar o vínculo.",
+ "verify.success.description": "Sua conta agora está conectada ao {{platform}}. Abra o {{platform}} e envie sua primeira mensagem.",
+ "verify.success.openBot": "Abrir no {{platform}}",
+ "verify.success.title": "Vinculado com sucesso!"
+}
diff --git a/locales/pt-BR/models.json b/locales/pt-BR/models.json
index f79a47a697c..eea211dd8aa 100644
--- a/locales/pt-BR/models.json
+++ b/locales/pt-BR/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Novo modelo de geração de vídeo com melhorias abrangentes em movimento corporal, realismo físico e seguimento de instruções.",
"MiniMax-M1.description": "Um novo modelo de raciocínio interno com 80 mil cadeias de pensamento e 1 milhão de tokens de entrada, oferecendo desempenho comparável aos principais modelos globais.",
"MiniMax-M2-Stable.description": "Projetado para fluxos de trabalho de codificação e agentes eficientes, com maior concorrência para uso comercial.",
- "MiniMax-M2.1-Lightning.description": "Capacidades poderosas de programação multilíngue com inferência mais rápida e eficiente.",
"MiniMax-M2.1-highspeed.description": "Poderosas capacidades de programação multilíngue, experiência de programação amplamente aprimorada. Mais rápido e eficiente.",
"MiniMax-M2.1.description": "MiniMax-M2.1 é o principal modelo open-source da MiniMax, focado em resolver tarefas complexas do mundo real. Seus principais pontos fortes são as capacidades de programação multilíngue e a habilidade de atuar como um Agente para resolver tarefas complexas.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Mesmo desempenho do M2.5 com inferência mais rápida.",
@@ -320,11 +319,11 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku é o modelo mais rápido e compacto da Anthropic, projetado para respostas quase instantâneas com desempenho rápido e preciso.",
"claude-3-opus-20240229.description": "Claude 3 Opus é o modelo mais poderoso da Anthropic para tarefas altamente complexas, com excelência em desempenho, inteligência, fluência e compreensão.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet equilibra inteligência e velocidade para cargas de trabalho empresariais, oferecendo alta utilidade com menor custo e implantação confiável em larga escala.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 é o modelo Haiku mais rápido e inteligente da Anthropic, com velocidade relâmpago e pensamento estendido.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 é o modelo Haiku mais rápido e inteligente da Anthropic, com velocidade relâmpago e raciocínio ampliado.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 da Anthropic — nova geração do Haiku, com raciocínio e visão aprimorados.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 é o modelo Haiku mais rápido e inteligente da Anthropic, com velocidade relâmpago e raciocínio ampliado.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking é uma variante avançada que pode revelar seu processo de raciocínio.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 é o modelo mais recente e mais capaz da Anthropic para tarefas altamente complexas, destacando-se em desempenho, inteligência, fluência e compreensão.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 é o modelo mais recente e avançado da Anthropic para tarefas altamente complexas, destacando-se em desempenho, inteligência, fluência e compreensão.",
"claude-opus-4-1.description": "Claude Opus 4.1 da Anthropic — modelo premium de raciocínio com capacidades avançadas de análise.",
"claude-opus-4-20250514.description": "Claude Opus 4 é o modelo mais poderoso da Anthropic para tarefas altamente complexas, destacando-se em desempenho, inteligência, fluência e compreensão.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 é o modelo principal da Anthropic, combinando inteligência excepcional com desempenho escalável, ideal para tarefas complexas que exigem respostas e raciocínio da mais alta qualidade.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 é o modelo mais inteligente da Anthropic para criação de agentes e codificação.",
"claude-opus-4.6.description": "Claude Opus 4.6 é o modelo mais inteligente da Anthropic para criação de agentes e codificação.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking pode produzir respostas quase instantâneas ou pensamento passo a passo estendido com processo visível.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 é o modelo mais inteligente da Anthropic até o momento, oferecendo respostas quase instantâneas ou pensamento passo a passo estendido com controle refinado para usuários de API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 pode produzir respostas quase instantâneas ou raciocínio passo a passo detalhado com processo visível.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 é o modelo mais inteligente da Anthropic até o momento.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 da Anthropic — versão aprimorada do Sonnet com desempenho superior em programação.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 da Anthropic — última geração do Sonnet, com alta qualidade em programação e uso de ferramentas.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "O DeepSeek LLM Chat (67B) é um modelo inovador que oferece compreensão profunda da linguagem e interação.",
"deepseek-ai/deepseek-v3.1-terminus.description": "O DeepSeek V3.1 é um modelo de raciocínio de nova geração com raciocínio complexo mais forte e cadeia de pensamento para tarefas de análise profunda.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 é um modelo de raciocínio de próxima geração com capacidades mais fortes de raciocínio complexo e cadeia de pensamento.",
- "deepseek-chat.description": "Alias de compatibilidade para o modo não-pensante do DeepSeek V4 Flash. Programado para descontinuação — use DeepSeek V4 Flash em vez disso.",
+ "deepseek-chat.description": "Um novo modelo de código aberto que combina habilidades gerais e de codificação. Ele preserva o diálogo geral do modelo de chat e a forte capacidade de codificação do modelo de programador, com melhor alinhamento de preferências. O DeepSeek-V2.5 também melhora a escrita e o seguimento de instruções.",
"deepseek-coder-33B-instruct.description": "O DeepSeek Coder 33B é um modelo de linguagem para código treinado com 2 trilhões de tokens (87% código, 13% texto em chinês/inglês). Introduz uma janela de contexto de 16K e tarefas de preenchimento intermediário, oferecendo preenchimento de código em nível de projeto e inserção de trechos.",
"deepseek-coder-v2.description": "O DeepSeek Coder V2 é um modelo de código MoE open-source com forte desempenho em tarefas de programação, comparável ao GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "O DeepSeek Coder V2 é um modelo de código MoE open-source com forte desempenho em tarefas de programação, comparável ao GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Versão completa e rápida do DeepSeek R1 com busca em tempo real na web, combinando capacidade de 671B com respostas mais ágeis.",
"deepseek-r1-online.description": "Versão completa do DeepSeek R1 com 671B de parâmetros e busca em tempo real na web, oferecendo compreensão e geração mais robustas.",
"deepseek-r1.description": "O DeepSeek-R1 usa dados de inicialização a frio antes do RL e apresenta desempenho comparável ao OpenAI-o1 em matemática, programação e raciocínio.",
- "deepseek-reasoner.description": "Alias de compatibilidade para o modo pensante do DeepSeek V4 Flash. Programado para descontinuação — use DeepSeek V4 Flash em vez disso.",
+ "deepseek-reasoner.description": "Alias de compatibilidade para o modo de pensamento rápido do DeepSeek V4. Programado para descontinuação — use deepseek-v4-flash em vez disso.",
"deepseek-v2.description": "O DeepSeek V2 é um modelo MoE eficiente para processamento econômico.",
"deepseek-v2:236b.description": "O DeepSeek V2 236B é o modelo da DeepSeek focado em código com forte geração de código.",
"deepseek-v3-0324.description": "O DeepSeek-V3-0324 é um modelo MoE com 671B de parâmetros, com destaque em programação, capacidade técnica, compreensão de contexto e manipulação de textos longos.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "O Seedream 4.0 é um modelo de geração de imagem da ByteDance Seed, que suporta entradas de texto e imagem com geração de imagem altamente controlável e de alta qualidade. Gera imagens a partir de comandos de texto.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 é o mais recente modelo multimodal de imagem da ByteDance, integrando capacidades de texto-para-imagem, imagem-para-imagem e geração de imagens em lote, enquanto incorpora senso comum e habilidades de raciocínio. Comparado à versão anterior 4.0, oferece qualidade de geração significativamente melhorada, com maior consistência de edição e fusão de múltiplas imagens. Oferece controle mais preciso sobre detalhes visuais, produzindo texto pequeno e rostos pequenos de forma mais natural, além de alcançar layouts e cores mais harmoniosos, melhorando a estética geral.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite é o mais recente modelo de geração de imagens da ByteDance. Pela primeira vez, integra capacidades de recuperação online, permitindo incorporar informações da web em tempo real e melhorar a atualidade das imagens geradas. A inteligência do modelo também foi aprimorada, permitindo interpretação precisa de instruções complexas e conteúdo visual. Além disso, oferece melhor cobertura de conhecimento global, consistência de referência e qualidade de geração em cenários profissionais, atendendo melhor às necessidades de criação visual em nível empresarial.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 da ByteDance é o modelo de geração de vídeo mais poderoso, suportando geração de vídeo multimodal de referência, edição de vídeo, extensão de vídeo, texto para vídeo e imagem para vídeo com áudio sincronizado.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast da ByteDance oferece as mesmas capacidades do Seedance 2.0 com velocidades de geração mais rápidas a um preço mais competitivo.",
"emohaa.description": "O Emohaa é um modelo voltado para saúde mental com habilidades profissionais de aconselhamento para ajudar os usuários a compreender questões emocionais.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B é um modelo leve de código aberto para implantação local e personalizada.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview é um modelo de pré-visualização com contexto de 8K para avaliação do ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K é um modelo de raciocínio rápido com contexto de 32K para raciocínio complexo e bate-papo de múltiplas interações.",
"ernie-x1.1-preview.description": "Pré-visualização do modelo de raciocínio ERNIE X1.1 para avaliação e testes.",
"ernie-x1.1.description": "ERNIE X1.1 é um modelo de pensamento em pré-visualização para avaliação e testes.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, desenvolvido pela equipe Seed da ByteDance, suporta edição e composição de múltiplas imagens. Apresenta consistência aprimorada de temas, seguimento preciso de instruções, compreensão de lógica espacial, expressão estética, layout de pôsteres e design de logotipos com renderização de texto-imagem de alta precisão.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, desenvolvido pela ByteDance Seed, suporta entradas de texto e imagem para geração de imagens altamente controláveis e de alta qualidade a partir de prompts.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 é um modelo de geração de imagens da ByteDance Seed, que suporta entradas de texto e imagem com geração de imagens altamente controlável e de alta qualidade. Ele gera imagens a partir de prompts de texto.",
"fal-ai/flux-kontext/dev.description": "Modelo FLUX.1 focado em edição de imagens, com suporte a entradas de texto e imagem.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] aceita texto e imagens de referência como entrada, permitindo edições locais direcionadas e transformações complexas de cena.",
"fal-ai/flux/krea.description": "Flux Krea [dev] é um modelo de geração de imagens com viés estético para imagens mais realistas e naturais.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Um poderoso modelo multimodal nativo de geração de imagens.",
"fal-ai/imagen4/preview.description": "Modelo de geração de imagens de alta qualidade do Google.",
"fal-ai/nano-banana.description": "Nano Banana é o modelo multimodal nativo mais novo, rápido e eficiente do Google, permitindo geração e edição de imagens por meio de conversas.",
- "fal-ai/qwen-image-edit.description": "Um modelo profissional de edição de imagens da equipe Qwen, suportando edições semânticas e de aparência, edição precisa de texto em chinês/inglês, transferência de estilo, rotação e mais.",
- "fal-ai/qwen-image.description": "Um modelo poderoso de geração de imagens da equipe Qwen com forte renderização de texto em chinês e estilos visuais diversos.",
+ "fal-ai/qwen-image-edit.description": "Um modelo profissional de edição de imagens da equipe Qwen que suporta edições semânticas e de aparência, edita texto em chinês e inglês com precisão e permite edições de alta qualidade, como transferência de estilo e rotação de objetos.",
+ "fal-ai/qwen-image.description": "Um modelo poderoso de geração de imagens da equipe Qwen com renderização impressionante de texto em chinês e estilos visuais diversificados.",
"flux-1-schnell.description": "Modelo de texto para imagem com 12 bilhões de parâmetros da Black Forest Labs, usando difusão adversarial latente para gerar imagens de alta qualidade em 1 a 4 etapas. Rivaliza com alternativas fechadas e é lançado sob licença Apache-2.0 para uso pessoal, acadêmico e comercial.",
"flux-dev.description": "Modelo open-source de geração de imagens para P&D, otimizado de forma eficiente para pesquisa inovadora não comercial.",
"flux-kontext-max.description": "Geração e edição de imagens contextuais de última geração, combinando texto e imagens para resultados precisos e coerentes.",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) é o modelo de geração de imagens do Google e também suporta chat multimodal.",
"gemini-3-pro-preview.description": "Gemini 3 Pro é o agente mais poderoso do Google, com capacidades de codificação emocional e visuais aprimoradas, além de raciocínio de última geração.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) é o modelo de geração de imagens nativo mais rápido do Google, com suporte a raciocínio, geração e edição de imagens conversacionais.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) oferece qualidade de imagem em nível Pro com velocidade Flash e suporte a chat multimodal.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) é o modelo nativo de geração de imagens mais rápido do Google, com suporte a pensamento, geração e edição de imagens conversacionais.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview é o modelo multimodal mais econômico do Google, otimizado para tarefas agentivas de alto volume, tradução e processamento de dados.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview melhora o Gemini 3 Pro com capacidades de raciocínio aprimoradas e adiciona suporte a nível médio de pensamento.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro do Google — modelo multimodal premium com janela de contexto de 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Estamos entusiasmados em lançar o Grok 4 Fast, nosso mais recente avanço em modelos de raciocínio com ótimo custo-benefício.",
"grok-4.20-0309-non-reasoning.description": "Variante sem raciocínio para casos de uso simples.",
"grok-4.20-0309-reasoning.description": "Modelo inteligente e extremamente rápido que raciocina antes de responder.",
- "grok-4.20-beta-0309-non-reasoning.description": "Uma variante não-pensante para casos de uso simples.",
- "grok-4.20-beta-0309-reasoning.description": "Modelo inteligente e extremamente rápido que raciocina antes de responder.",
"grok-4.20-multi-agent-0309.description": "Equipe de 4 ou 16 agentes. Excelente para pesquisas, sem suporte atual a ferramentas do lado do cliente. Suporta apenas ferramentas do servidor xAI (como X Search e Web Search) e ferramentas MCP remotas.",
"grok-4.3.description": "O modelo de linguagem de grande porte mais comprometido com a verdade no mundo.",
- "grok-4.description": "Nosso modelo carro-chefe mais novo e mais forte, destacando-se em NLP, matemática e raciocínio — um polivalente ideal.",
+ "grok-4.description": "O mais recente modelo Grok de ponta com desempenho incomparável em linguagem, matemática e raciocínio — um verdadeiro polivalente. Atualmente aponta para grok-4-0709; devido a recursos limitados, está temporariamente 10% acima do preço oficial e espera-se que retorne ao preço oficial posteriormente.",
"grok-code-fast-1.description": "Estamos entusiasmados em lançar o grok-code-fast-1, um modelo de raciocínio rápido e econômico que se destaca em codificação com agentes.",
"grok-imagine-image-pro.description": "Gere imagens a partir de prompts de texto, edite imagens existentes com linguagem natural ou refine imagens iterativamente por meio de conversas de múltiplas interações.",
"grok-imagine-image.description": "Gere imagens a partir de prompts de texto, edite imagens existentes com linguagem natural ou refine imagens iterativamente por meio de conversas de múltiplas interações.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ é um modelo de raciocínio da família Qwen. Em comparação com modelos ajustados por instruções padrão, oferece habilidades de pensamento e raciocínio que melhoram significativamente o desempenho em tarefas difíceis. O QwQ-32B é um modelo de porte médio que compete com os principais modelos como DeepSeek-R1 e o1-mini.",
"qwq_32b.description": "Modelo de raciocínio de porte médio da família Qwen. Em comparação com modelos ajustados por instruções padrão, as habilidades de pensamento e raciocínio do QwQ aumentam significativamente o desempenho em tarefas difíceis.",
"r1-1776.description": "R1-1776 é uma variante pós-treinada do DeepSeek R1 projetada para fornecer informações factuais sem censura e imparciais.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro da ByteDance suporta texto para vídeo, imagem para vídeo (primeiro quadro, primeiro+último quadro) e geração de áudio sincronizado com visuais.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite da BytePlus apresenta geração aumentada por recuperação na web para informações em tempo real, interpretação aprimorada de prompts complexos e consistência de referência melhorada para criação visual profissional.",
"solar-mini-ja.description": "Solar Mini (Ja) estende o Solar Mini com foco no japonês, mantendo desempenho eficiente e forte em inglês e coreano.",
"solar-mini.description": "Solar Mini é um LLM compacto que supera o GPT-3.5, com forte capacidade multilíngue suportando inglês e coreano, oferecendo uma solução eficiente e de baixo custo.",
"solar-pro.description": "Solar Pro é um LLM de alta inteligência da Upstage, focado em seguir instruções em uma única GPU, com pontuações IFEval acima de 80. Atualmente suporta inglês; o lançamento completo está previsto para novembro de 2024 com suporte expandido a idiomas e contexto mais longo.",
diff --git a/locales/pt-BR/providers.json b/locales/pt-BR/providers.json
index 3df739cec10..e45fb62c704 100644
--- a/locales/pt-BR/providers.json
+++ b/locales/pt-BR/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Fundada em 2020, a Jina AI é uma empresa líder em busca com IA. Sua pilha de busca inclui modelos vetoriais, reranqueadores e pequenos modelos de linguagem para construir aplicativos generativos e multimodais confiáveis e de alta qualidade.",
"kimicodingplan.description": "O Kimi Code da Moonshot AI oferece acesso aos modelos Kimi, incluindo o K2.5, para tarefas de codificação.",
"lmstudio.description": "O LM Studio é um aplicativo de desktop para desenvolver e experimentar com LLMs no seu computador.",
- "lobehub.description": "O LobeHub Cloud utiliza APIs oficiais para acessar modelos de IA e mede o uso com Créditos vinculados aos tokens dos modelos.",
"longcat.description": "LongCat é uma série de grandes modelos de IA generativa desenvolvidos de forma independente pela Meituan. Ele foi projetado para aumentar a produtividade interna da empresa e possibilitar aplicações inovadoras por meio de uma arquitetura computacional eficiente e fortes capacidades multimodais.",
"minimax.description": "Fundada em 2021, a MiniMax desenvolve IA de uso geral com modelos fundamentais multimodais, incluindo modelos de texto com trilhões de parâmetros, modelos de fala e visão, além de aplicativos como o Hailuo AI.",
"minimaxcodingplan.description": "O Plano de Tokens MiniMax oferece acesso aos modelos MiniMax, incluindo o M2.7, para tarefas de codificação por meio de uma assinatura de taxa fixa.",
diff --git a/locales/pt-BR/setting.json b/locales/pt-BR/setting.json
index 307f54f00fd..f52b587a548 100644
--- a/locales/pt-BR/setting.json
+++ b/locales/pt-BR/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Preencher Manualmente",
"tab.manualFill.desc": "Configurar manualmente uma habilidade MCP personalizada",
"tab.memory": "Memória",
+ "tab.messenger": "Mensageiro",
"tab.notification": "Notificações",
"tab.profile": "Minha Conta",
"tab.provider": "Provedor de Serviço de IA",
diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.json
index f198ba92d9d..8ce92ca6a09 100644
--- a/locales/ru-RU/chat.json
+++ b/locales/ru-RU/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Автоматически одобрять все вызовы инструментов",
"tool.intervention.mode.manual": "Вручную",
"tool.intervention.mode.manualDesc": "Требуется ручное одобрение каждого вызова",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Новая личность появится после утверждения.",
- "tool.intervention.onboarding.agentIdentity.description": "После утверждения изменения обновят информацию об агенте, отображаемом во Входящих и в этом онбординговом диалоге.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Аватар агента",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Подтверждение онбординга",
- "tool.intervention.onboarding.agentIdentity.name": "Имя агента",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Агент во Входящих",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Текущий онбординговый агент",
- "tool.intervention.onboarding.agentIdentity.targets": "Применяется к",
"tool.intervention.onboarding.agentIdentity.title": "Подтвердите обновление личности агента",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Я обновлю свой аватар",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Я обновлю своё имя",
"tool.intervention.onboarding.userProfile.applyHint": "Эти данные будут сохранены в вашем профиле после одобрения.",
"tool.intervention.onboarding.userProfile.description": "Одобрение этого изменения обновит ваш профиль, чтобы Агент мог адаптировать будущие ответы.",
"tool.intervention.onboarding.userProfile.eyebrow": "Одобрение профиля",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Обновлено {{time}}",
"workingPanel.resources.viewMode.list": "Список",
"workingPanel.resources.viewMode.tree": "Дерево",
+ "workingPanel.review.baseRef.default": "по умолчанию",
+ "workingPanel.review.baseRef.loading": "Загрузка веток…",
+ "workingPanel.review.baseRef.reset": "Сбросить на ветку по умолчанию",
+ "workingPanel.review.baseRef.unresolved": "Выберите базовую ветку",
"workingPanel.review.binary": "Двоичный файл — разница не отображается",
"workingPanel.review.collapseAll": "Свернуть все",
"workingPanel.review.copied": "Путь скопирован",
"workingPanel.review.copyPath": "Скопировать путь к файлу",
"workingPanel.review.empty": "Нет изменений в рабочем дереве",
+ "workingPanel.review.empty.branch": "Нет изменений относительно {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Не удалось определить удалённую ветку по умолчанию. Выполните команду `git remote set-head origin --auto` в вашем терминале.",
"workingPanel.review.error": "Не удалось загрузить разницу этого файла",
"workingPanel.review.expandAll": "Развернуть все",
+ "workingPanel.review.mode.branch": "Ветка",
+ "workingPanel.review.mode.unstaged": "Неиндексированные",
"workingPanel.review.more": "Дополнительные параметры",
"workingPanel.review.refresh": "Обновить",
"workingPanel.review.textDiff.disable": "Отключить встроенное сравнение текста",
diff --git a/locales/ru-RU/labs.json b/locales/ru-RU/labs.json
index 886978b2150..19129f7b90e 100644
--- a/locales/ru-RU/labs.json
+++ b/locales/ru-RU/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Групповой чат (мультиагентный)",
"features.inputMarkdown.desc": "Отображение Markdown в поле ввода в реальном времени (жирный текст, блоки кода, таблицы и т. д.).",
"features.inputMarkdown.title": "Отображение Markdown при вводе",
+ "features.messenger.desc": "Общайтесь с вашими агентами через Telegram (и другие мессенджеры) с помощью общего бота LobeHub. Добавляет вкладку 'Мессенджер' в Настройки для привязки вашего аккаунта и выбора агента, который будет получать сообщения.",
+ "features.messenger.title": "Мессенджер",
"title": "Лаборатория"
}
diff --git a/locales/ru-RU/messenger.json b/locales/ru-RU/messenger.json
new file mode 100644
index 00000000000..b7f3375ab03
--- /dev/null
+++ b/locales/ru-RU/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Активный агент",
+ "messenger.activeAgentPlaceholder": "Выберите агента",
+ "messenger.detail.addServer": "Добавить сервер",
+ "messenger.detail.addWorkspace": "Добавить рабочее пространство",
+ "messenger.detail.connections.connected": "Подключено",
+ "messenger.detail.connections.empty": "Откройте бота и отправьте /start, чтобы связать ваш аккаунт.",
+ "messenger.detail.connections.linkHint": "Рабочее пространство установлено. Откройте Slack и отправьте сообщение боту, чтобы завершить привязку вашего личного аккаунта.",
+ "messenger.detail.connections.pending": "Ожидание",
+ "messenger.detail.connections.serverLabel": "сервер",
+ "messenger.detail.connections.title": "Подключения",
+ "messenger.detail.connections.userLabel": "пользователь",
+ "messenger.detail.connections.workspaceLabel": "рабочее пространство",
+ "messenger.detail.disconnect": "Отключить",
+ "messenger.discord.connectModal.description": "Добавьте бота LobeHub на сервер Discord, которым вы управляете.",
+ "messenger.discord.connectModal.inviteButton": "Добавить на сервер Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord сейчас недоступен. Пожалуйста, попробуйте позже.",
+ "messenger.discord.connectModal.title": "Добавить бота на ваш сервер",
+ "messenger.discord.connections.disconnectConfirm": "Удалить этот сервер из вашего списка аудита? Бот останется на сервере, пока администратор сервера его не удалит.",
+ "messenger.discord.connections.disconnectFailed": "Не удалось удалить сервер.",
+ "messenger.discord.connections.disconnectSuccess": "Сервер удален.",
+ "messenger.discord.connections.disconnectTitle": "Удалить сервер",
+ "messenger.discord.userPending.cta": "Открыть в Discord",
+ "messenger.discord.userPending.hint": "Откройте бота в Discord и отправьте любое сообщение, чтобы завершить привязку вашего аккаунта.",
+ "messenger.discord.userPending.name": "Еще не привязан",
+ "messenger.error.agentNotFound": "Агент не найден.",
+ "messenger.error.disconnectNotAllowed": "Вы можете отключить только те установки, которые начали сами.",
+ "messenger.error.installationNotFound": "Установка не найдена.",
+ "messenger.error.linkRequired": "Откройте бота и отправьте /start перед изменением этого подключения.",
+ "messenger.error.pickDefaultAgent": "Выберите агента по умолчанию перед подтверждением.",
+ "messenger.error.platformNotConfigured": "Эта платформа мессенджера сейчас недоступна. Пожалуйста, попробуйте позже.",
+ "messenger.linkCta": "Подключить",
+ "messenger.linkModal.continueIn": "Продолжить настройку в {{platform}}",
+ "messenger.linkModal.instructions": "Откройте бота, отправьте /start, затем нажмите \"Привязать аккаунт\", чтобы подключить ваш аккаунт LobeHub.",
+ "messenger.linkModal.notConfigured": "Это подключение сейчас недоступно. Пожалуйста, попробуйте позже.",
+ "messenger.linkModal.openCta": "Открыть в {{platform}}",
+ "messenger.linkModal.scanHint": "Или отсканируйте с помощью телефона, чтобы открыть {{platform}}.",
+ "messenger.linkModal.title": "Подключить мессенджер",
+ "messenger.list.discord.description": "Общайтесь с агентами LobeHub из любого сервера Discord через личные сообщения с ботом LobeHub.",
+ "messenger.list.slack.description": "Общайтесь с агентами LobeHub из любого рабочего пространства Slack через личные сообщения или @LobeHub.",
+ "messenger.list.telegram.description": "Общайтесь с агентами LobeHub в Telegram и выбирайте, кто будет отвечать, из любого места.",
+ "messenger.noPlatformsConfigured": "Платформы пока недоступны. Проверьте позже.",
+ "messenger.setActiveFailed": "Не удалось установить как активного.",
+ "messenger.setActiveSuccess": "Активный агент обновлен.",
+ "messenger.slack.connectModal.continueButton": "Продолжить в Slack",
+ "messenger.slack.connectModal.description": "Вы будете перенаправлены в Slack для авторизации установки рабочего пространства LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack сейчас недоступен. Пожалуйста, попробуйте позже.",
+ "messenger.slack.connectModal.title": "Продолжить настройку в Slack",
+ "messenger.slack.connections.disconnectConfirm": "Отключить бота LobeHub от этого рабочего пространства Slack? Существующие привязки пользователей будут приостановлены, пока вы не установите снова.",
+ "messenger.slack.connections.disconnectFailed": "Не удалось отключить.",
+ "messenger.slack.connections.disconnectSuccess": "Рабочее пространство отключено.",
+ "messenger.slack.connections.disconnectTitle": "Отключить рабочее пространство",
+ "messenger.slack.installBlocked.dismiss": "Понятно",
+ "messenger.slack.installBlocked.suggestion": "Отправьте личное сообщение @LobeHub в Slack, чтобы привязать ваш личный аккаунт — вам не нужно устанавливать снова. Или попросите первоначального установщика сначала отключить это рабочее пространство, если вы хотите взять на себя управление.",
+ "messenger.slack.installBlocked.title": "Рабочее пространство уже подключено",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" уже подключено к LobeHub другим пользователем.",
+ "messenger.slack.installBlocked.withoutName": "Это рабочее пространство Slack уже подключено к LobeHub другим пользователем.",
+ "messenger.slack.installResult.failed": "Не удалось установить Slack ({{reason}}). Пожалуйста, попробуйте снова или обратитесь в поддержку.",
+ "messenger.slack.installResult.reasons.accessDenied": "авторизация была отменена",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Не удалось авторизовать Slack",
+ "messenger.slack.installResult.reasons.generic": "произошла неизвестная ошибка",
+ "messenger.slack.installResult.reasons.invalidState": "сессия установки истекла",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack вернул неполную информацию о приложении",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack вернул неполные параметры установки",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack не вернул идентификатор рабочего пространства",
+ "messenger.slack.installResult.reasons.missingToken": "Slack не вернул токен бота",
+ "messenger.slack.installResult.reasons.persistFailed": "не удалось сохранить подключение рабочего пространства",
+ "messenger.slack.installResult.success": "Рабочее пространство Slack подключено.",
+ "messenger.subtitle": "Подключите ваш аккаунт к официальному боту LobeHub один раз. Выберите, какой агент будет получать сообщения, переключайтесь в любое время отсюда или через бота.",
+ "messenger.title": "Мессенджер",
+ "messenger.unlinkConfirm": "Отключить ваш аккаунт {{platform}} от LobeHub? Входящие сообщения прекратятся, пока вы снова не отправите /start.",
+ "messenger.unlinkCta": "Отключить",
+ "messenger.unlinkFailed": "Не удалось отключить.",
+ "messenger.unlinkSuccess": "Отключено.",
+ "messenger.unlinkTitle": "Отключить аккаунт",
+ "verify.confirm.conflict.description": "Этот аккаунт {{platform}} уже привязан к аккаунту LobeHub {{email}}. Войдите в этот аккаунт, чтобы управлять привязкой, или сначала отключите там, прежде чем повторить попытку.",
+ "verify.confirm.conflict.switchAccount": "Войти с другим аккаунтом",
+ "verify.confirm.conflict.title": "Этот аккаунт уже привязан",
+ "verify.confirm.cta": "Подтвердить привязку",
+ "verify.confirm.defaultAgent": "Агент по умолчанию",
+ "verify.confirm.defaultAgentHint": "Ваши сообщения будут сначала направляться сюда. Вы можете переключиться в любое время через /agents в боте или в Настройки → Мессенджер.",
+ "verify.confirm.defaultAgentPlaceholder": "Выберите агента",
+ "verify.confirm.fields.lobeHubAccount": "Аккаунт LobeHub",
+ "verify.confirm.fields.platformAccount": "Аккаунт {{platform}}",
+ "verify.confirm.fields.workspace": "Рабочее пространство",
+ "verify.confirm.noAgents": "У вас пока нет агентов. Создайте одного в LobeHub, затем вернитесь, чтобы завершить привязку.",
+ "verify.confirm.title": "Подтвердить привязку",
+ "verify.confirm.workspace": "Рабочее пространство: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Этот аккаунт уже привязан к другому аккаунту LobeHub. Сначала войдите в этот аккаунт.",
+ "verify.error.expired": "Эта привязка истекла. Пожалуйста, вернитесь к боту и отправьте /start снова.",
+ "verify.error.generic": "Что-то пошло не так. Пожалуйста, попробуйте снова.",
+ "verify.error.missingToken": "Недействительная привязка. Откройте эту страницу через бота.",
+ "verify.error.title": "Не удалось подтвердить привязку",
+ "verify.labRequired.description": "Мессенджер в настоящее время является экспериментальной функцией. Включите его в Настройки → Расширенные → Лаборатория и перезагрузите эту страницу.",
+ "verify.labRequired.openSettings": "Открыть настройки Лаборатории",
+ "verify.labRequired.title": "Включите Мессенджер, чтобы продолжить",
+ "verify.signInCta": "Войдите, чтобы продолжить",
+ "verify.signInRequired": "Пожалуйста, войдите в LobeHub, чтобы подтвердить привязку.",
+ "verify.success.description": "Ваш аккаунт теперь подключен к {{platform}}. Откройте {{platform}} и отправьте ваше первое сообщение.",
+ "verify.success.openBot": "Открыть в {{platform}}",
+ "verify.success.title": "Успешно привязано!"
+}
diff --git a/locales/ru-RU/models.json b/locales/ru-RU/models.json
index 1b1ccf30182..852d4c82599 100644
--- a/locales/ru-RU/models.json
+++ b/locales/ru-RU/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Совершенно новая модель генерации видео с комплексными улучшениями в движении тела, физическом реализме и следовании инструкциям.",
"MiniMax-M1.description": "Новая внутренняя модель рассуждений с поддержкой 80K цепочек размышлений и 1M входных токенов, обеспечивающая производительность на уровне ведущих мировых моделей.",
"MiniMax-M2-Stable.description": "Создана для эффективного программирования и работы агентов, с повышенной параллельностью для коммерческого использования.",
- "MiniMax-M2.1-Lightning.description": "Мощные многоязычные программные возможности с более быстрым и эффективным выводом.",
"MiniMax-M2.1-highspeed.description": "Мощные многоязычные программные возможности, всесторонне улучшенный опыт программирования. Быстрее и эффективнее.",
"MiniMax-M2.1.description": "MiniMax-M2.1 — это флагманская модель с открытым исходным кодом от MiniMax, ориентированная на решение сложных задач из реального мира. Её ключевые преимущества — поддержка многозадачного программирования и способность выступать в роли интеллектуального агента.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Та же производительность, что и у M2.5, но с ускоренным выводом.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku — самая быстрая и компактная модель от Anthropic, предназначенная для мгновенных ответов с высокой точностью и скоростью.",
"claude-3-opus-20240229.description": "Claude 3 Opus — самая мощная модель от Anthropic для высокосложных задач, превосходящая по производительности, интеллекту, беглости и пониманию.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet сочетает интеллект и скорость для корпоративных задач, обеспечивая высокую полезность при низкой стоимости и надежное масштабируемое развертывание.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 — самая быстрая и интеллектуальная модель Haiku от Anthropic с молниеносной скоростью и расширенным мышлением.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 — самая быстрая и умная модель Haiku от Anthropic, с молниеносной скоростью и расширенными возможностями рассуждения.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 от Anthropic — модель нового поколения с улучшенными возможностями рассуждения и работы с изображениями.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 — это самая быстрая и умная модель Haiku от Anthropic, с молниеносной скоростью и расширенными возможностями рассуждения.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking — продвинутая версия, способная демонстрировать процесс рассуждения.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 — это последняя и самая мощная модель от Anthropic для выполнения высоко сложных задач, превосходящая в производительности, интеллекте, беглости и понимании.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 — новейшая и самая мощная модель Anthropic для выполнения сложных задач, превосходящая в производительности, интеллекте, беглости и понимании.",
"claude-opus-4-1.description": "Claude Opus 4.1 от Anthropic — премиальная модель рассуждения с глубокими аналитическими возможностями.",
- "claude-opus-4-20250514.description": "Claude Opus 4 — самая мощная модель от Anthropic для выполнения высоко сложных задач, превосходящая в производительности, интеллекте, беглости и понимании.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 — самая мощная модель Anthropic для выполнения сложных задач, превосходящая в производительности, интеллекте, беглости и понимании.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 — флагманская модель от Anthropic, сочетающая выдающийся интеллект с масштабируемой производительностью, идеально подходящая для сложных задач, требующих высококачественных ответов и рассуждений.",
"claude-opus-4-5.description": "Claude Opus 4.5 от Anthropic — флагманская модель с передовыми возможностями рассуждения и программирования.",
"claude-opus-4-6.description": "Claude Opus 4.6 от Anthropic — флагманская модель с контекстом 1M и усовершенствованными возможностями рассуждения.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 — это самая интеллектуальная модель Anthropic для создания агентов и программирования.",
"claude-opus-4.6.description": "Claude Opus 4.6 — это самая интеллектуальная модель Anthropic для создания агентов и программирования.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking может выдавать как мгновенные ответы, так и пошаговое рассуждение с видимым процессом.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 — самая интеллектуальная модель от Anthropic на сегодняшний день, предлагающая почти мгновенные ответы или пошаговое мышление с тонкой настройкой для пользователей API.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 — самая интеллектуальная модель от Anthropic на сегодняшний день.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 может выдавать почти мгновенные ответы или пошаговые рассуждения с видимым процессом.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 — самая интеллектуальная модель Anthropic на сегодняшний день.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 от Anthropic — улучшенная модель Sonnet с повышенной производительностью в программировании.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 от Anthropic — последняя версия Sonnet с превосходными возможностями в программировании и использовании инструментов.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 — это самая интеллектуальная модель Anthropic на сегодняшний день.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) — инновационная модель с глубоким пониманием языка и возможностью взаимодействия.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 — модель нового поколения для рассуждений, обладающая улучшенными возможностями для сложных рассуждений и цепочек размышлений, подходящая для задач глубокого анализа.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 — это модель рассуждений следующего поколения с улучшенными возможностями сложных рассуждений и цепочки размышлений.",
- "deepseek-chat.description": "Совместимый псевдоним для режима без мышления DeepSeek V4 Flash. Планируется к устареванию — используйте DeepSeek V4 Flash.",
+ "deepseek-chat.description": "Новая модель с открытым исходным кодом, объединяющая общие и кодовые способности. Она сохраняет общий диалоговый стиль чат-модели и сильные возможности кодирования кодер-модели, с улучшенной настройкой предпочтений. DeepSeek-V2.5 также улучшает написание и следование инструкциям.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B — языковая модель для программирования, обученная на 2 триллионах токенов (87% кода, 13% китайского/английского текста). Поддерживает контекстное окно 16K и задачи заполнения в середине, обеспечивая автодополнение на уровне проекта и вставку фрагментов кода.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 — модель кода с открытым исходным кодом, демонстрирующая высокую производительность в задачах программирования, сопоставимую с GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 — модель кода с открытым исходным кодом, демонстрирующая высокую производительность в задачах программирования, сопоставимую с GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Быстрая полная версия DeepSeek R1 с поиском в интернете в реальном времени, объединяющая возможности масштаба 671B и ускоренный отклик.",
"deepseek-r1-online.description": "Полная версия DeepSeek R1 с 671B параметрами и поиском в интернете в реальном времени, обеспечивающая улучшенное понимание и генерацию.",
"deepseek-r1.description": "DeepSeek-R1 использует данные холодного старта до этапа RL и демонстрирует сопоставимую с OpenAI-o1 производительность в математике, программировании и логическом мышлении.",
- "deepseek-reasoner.description": "Совместимый псевдоним для режима мышления DeepSeek V4 Flash. Планируется к устареванию — используйте DeepSeek V4 Flash.",
+ "deepseek-reasoner.description": "Алиас совместимости для режима быстрого мышления DeepSeek V4 Flash. Планируется к устареванию — используйте deepseek-v4-flash вместо этого.",
"deepseek-v2.description": "DeepSeek V2 — эффективная модель MoE для экономичной обработки.",
"deepseek-v2:236b.description": "DeepSeek V2 236B — модель DeepSeek, ориентированная на программирование, с высокой способностью к генерации кода.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 — модель MoE с 671B параметрами, выделяющаяся в программировании, технических задачах, понимании контекста и работе с длинными текстами.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 — модель генерации изображений от ByteDance Seed, поддерживающая ввод текста и изображений с высококачественной и управляемой генерацией. Генерирует изображения по текстовым подсказкам.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 — это последняя мультимодальная модель изображений от ByteDance, объединяющая возможности преобразования текста в изображение, изображения в изображение и пакетной генерации изображений, а также включающая здравый смысл и способности к рассуждению. По сравнению с предыдущей версией 4.0, она обеспечивает значительно улучшенное качество генерации, лучшую согласованность редактирования и слияние нескольких изображений. Модель предлагает более точный контроль над визуальными деталями, естественно воспроизводя мелкий текст и лица, а также достигает более гармоничного макета и цветовой палитры, улучшая общую эстетику.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite — это последняя модель генерации изображений от ByteDance. Впервые она интегрирует возможности онлайн-поиска, что позволяет использовать информацию в реальном времени и улучшать актуальность создаваемых изображений. Интеллект модели также был обновлен, что позволяет точно интерпретировать сложные инструкции и визуальный контент. Кроме того, она предлагает улучшенное покрытие глобальных знаний, согласованность ссылок и качество генерации в профессиональных сценариях, лучше удовлетворяя потребности корпоративного визуального творчества.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 от ByteDance — самая мощная модель для генерации видео, поддерживающая мультимодальную генерацию видео по референсам, редактирование видео, расширение видео, текст-видео и изображение-видео с синхронизированным звуком.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast от ByteDance предлагает те же возможности, что и Seedance 2.0, с более высокой скоростью генерации и конкурентной ценой.",
"emohaa.description": "Emohaa — модель для поддержки психического здоровья с профессиональными навыками консультирования, помогающая пользователям разобраться в эмоциональных проблемах.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B — легковесная модель с открытым исходным кодом для локального и кастомизированного развертывания.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview — модель с контекстом 8K для предварительной оценки возможностей ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K — быстрая модель мышления с контекстом 32K для сложного рассуждения и многотурового общения.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview — предварительная версия модели мышления для оценки и тестирования.",
"ernie-x1.1.description": "ERNIE X1.1 — это предварительная версия модели мышления для оценки и тестирования.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, разработанная командой ByteDance Seed, поддерживает редактирование и компоновку нескольких изображений. Особенности включают улучшенную согласованность объектов, точное выполнение инструкций, понимание пространственной логики, эстетическое выражение, макет постеров и дизайн логотипов с высокоточной визуализацией текста и изображений.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, разработанная ByteDance Seed, поддерживает текстовые и визуальные входные данные для высококонтролируемой, высококачественной генерации изображений по запросам.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 — модель генерации изображений от ByteDance Seed, поддерживающая текстовые и визуальные входные данные с высококонтролируемой и качественной генерацией изображений. Генерирует изображения по текстовым запросам.",
"fal-ai/flux-kontext/dev.description": "Модель FLUX.1, ориентированная на редактирование изображений, поддерживает ввод текста и изображений.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] принимает текст и эталонные изображения, позволяя выполнять локальные правки и сложные глобальные трансформации сцены.",
"fal-ai/flux/krea.description": "Flux Krea [dev] — модель генерации изображений с эстетическим уклоном в сторону более реалистичных и естественных изображений.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Мощная нативная мультимодальная модель генерации изображений.",
"fal-ai/imagen4/preview.description": "Модель генерации изображений высокого качества от Google.",
"fal-ai/nano-banana.description": "Nano Banana — новейшая, самая быстрая и эффективная нативная мультимодальная модель от Google, поддерживающая генерацию и редактирование изображений в диалоговом режиме.",
- "fal-ai/qwen-image-edit.description": "Профессиональная модель редактирования изображений от команды Qwen, поддерживающая семантические и визуальные изменения, точное редактирование текста на китайском/английском языках, перенос стиля, поворот и многое другое.",
- "fal-ai/qwen-image.description": "Мощная модель генерации изображений от команды Qwen с сильной визуализацией китайского текста и разнообразными визуальными стилями.",
+ "fal-ai/qwen-image-edit.description": "Профессиональная модель редактирования изображений от команды Qwen, поддерживающая семантические и визуальные изменения, точное редактирование текста на китайском и английском языках, а также высококачественные изменения, такие как перенос стиля и вращение объектов.",
+ "fal-ai/qwen-image.description": "Мощная модель генерации изображений от команды Qwen с впечатляющим отображением китайского текста и разнообразными визуальными стилями.",
"flux-1-schnell.description": "Модель преобразования текста в изображение с 12 миллиардами параметров от Black Forest Labs, использующая латентную диффузию с дистилляцией для генерации качественных изображений за 1–4 шага. Конкурирует с закрытыми аналогами и распространяется по лицензии Apache-2.0 для личного, исследовательского и коммерческого использования.",
"flux-dev.description": "Открытая исследовательская модель генерации изображений, оптимизированная для некоммерческих инновационных исследований.",
"flux-kontext-max.description": "Передовая генерация и редактирование изображений с учётом контекста, объединяющая текст и изображения для точных и согласованных результатов.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash — самая быстрая и интеллектуальная модель, сочетающая передовые ИИ-возможности с точной привязкой к поисковым данным.",
"gemini-3-flash.description": "Gemini 3 Flash от Google — ультрабыстрая модель с поддержкой мультимодальных входов.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) — это модель генерации изображений от Google, которая также поддерживает мультимодальный диалог.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) — это модель генерации изображений от Google, также поддерживающая мультимодальный чат.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) — модель генерации изображений от Google, также поддерживающая мультимодальный чат.",
"gemini-3-pro-preview.description": "Gemini 3 Pro — самая мощная агентная модель от Google с поддержкой визуализации и глубокой интерактивности, основанная на передовых возможностях рассуждения.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) — это самая быстрая нативная модель генерации изображений от Google с поддержкой мышления, генерации и редактирования изображений в диалоговом режиме.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) обеспечивает качество изображения уровня Pro с высокой скоростью Flash и поддержкой мультимодального чата.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) — самая быстрая модель генерации изображений от Google с поддержкой мышления, генерации и редактирования изображений в диалоговом формате.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview — самая экономичная мультимодальная модель от Google, оптимизированная для задач с высоким объемом, перевода и обработки данных.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview улучшает Gemini 3 Pro с расширенными возможностями рассуждений и добавляет поддержку среднего уровня мышления.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro от Google — премиальная мультимодальная модель с контекстом 1M.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Мы рады представить Grok 4 Fast — наш последний прогресс в области экономичных моделей рассуждения.",
"grok-4.20-0309-non-reasoning.description": "Вариант без рассуждений для простых задач.",
"grok-4.20-0309-reasoning.description": "Интеллектуальная, сверхбыстрая модель, которая размышляет перед тем, как ответить.",
- "grok-4.20-beta-0309-non-reasoning.description": "Вариант без мышления для простых случаев использования.",
- "grok-4.20-beta-0309-reasoning.description": "Интеллектуальная, сверхбыстрая модель, которая рассуждает перед ответом.",
"grok-4.20-multi-agent-0309.description": "Команда из 4 или 16 агентов. Превосходна для исследовательских задач. Пока не поддерживает клиентские инструменты. Поддерживает только серверные инструменты xAI (например, X Search, Web Search) и удалённые MCP-инструменты.",
"grok-4.3.description": "Самая правдолюбивая крупная языковая модель в мире.",
- "grok-4.description": "Наша новейшая и самая мощная флагманская модель, превосходящая в NLP, математике и рассуждениях — идеальный универсал.",
+ "grok-4.description": "Последняя флагманская модель Grok с непревзойденной производительностью в языке, математике и рассуждениях — настоящий универсал. В настоящее время указывает на grok-4-0709; из-за ограниченных ресурсов временно на 10% выше официальной цены и ожидается возвращение к официальной цене позже.",
"grok-code-fast-1.description": "Мы рады представить grok-code-fast-1 — быструю и экономичную модель рассуждения, превосходную в агентном программировании.",
"grok-imagine-image-pro.description": "Создавайте изображения из текстовых подсказок, редактируйте существующие изображения с помощью естественного языка или итеративно улучшайте изображения через многократные диалоги.",
"grok-imagine-image.description": "Создавайте изображения из текстовых подсказок, редактируйте существующие изображения с помощью естественного языка или итеративно улучшайте изображения через многократные диалоги.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ — модель логического вывода из семейства Qwen. По сравнению со стандартными моделями, обученными на инструкциях, она обладает способностями к мышлению и логике, которые значительно улучшают производительность на сложных задачах. QwQ-32B — среднеразмерная модель, успешно конкурирующая с ведущими моделями, такими как DeepSeek-R1 и o1-mini.",
"qwq_32b.description": "Среднеразмерная модель логического вывода из семейства Qwen. По сравнению со стандартными моделями, обученными на инструкциях, способности QwQ к мышлению и логике значительно повышают производительность на сложных задачах.",
"r1-1776.description": "R1-1776 — дообученный вариант DeepSeek R1, предназначенный для предоставления нецензурированной, объективной и достоверной информации.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro от ByteDance поддерживает текст-видео, изображение-видео (первый кадр, первый+последний кадр) и генерацию аудио, синхронизированного с визуализацией.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite от BytePlus включает генерацию с дополнением веб-поиска для получения актуальной информации в реальном времени, улучшенную интерпретацию сложных запросов и повышенную согласованность ссылок для профессионального визуального творчества.",
"solar-mini-ja.description": "Solar Mini (Ja) расширяет возможности Solar Mini с акцентом на японский язык, сохраняя при этом высокую эффективность и производительность на английском и корейском.",
"solar-mini.description": "Solar Mini — компактная LLM-модель, превосходящая GPT-3.5, с мощной многоязычной поддержкой английского и корейского языков, предлагающая эффективное решение с малым объемом.",
"solar-pro.description": "Solar Pro — интеллектуальная LLM-модель от Upstage, ориентированная на следование инструкциям на одном GPU, с результатами IFEval выше 80. В настоящее время поддерживает английский язык; полный релиз с расширенной языковой поддержкой и увеличенным контекстом запланирован на ноябрь 2024 года.",
diff --git a/locales/ru-RU/providers.json b/locales/ru-RU/providers.json
index a8d7b88cb9d..14c784b315b 100644
--- a/locales/ru-RU/providers.json
+++ b/locales/ru-RU/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Основанная в 2020 году, Jina AI — ведущая компания в области поискового ИИ. Её стек включает векторные модели, переоценщики и малые языковые модели для создания надежных генеративных и мультимодальных поисковых приложений.",
"kimicodingplan.description": "Kimi Code от Moonshot AI предоставляет доступ к моделям Kimi, включая K2.5, для выполнения задач кодирования.",
"lmstudio.description": "LM Studio — это настольное приложение для разработки и экспериментов с LLM на вашем компьютере.",
- "lobehub.description": "Облачный сервис LobeHub использует официальные API для доступа к моделям ИИ и измеряет использование с помощью Кредитов, связанных с токенами моделей.",
"longcat.description": "LongCat — это серия больших моделей генеративного ИИ, разработанных Meituan. Она предназначена для повышения внутренней производительности предприятия и создания инновационных приложений благодаря эффективной вычислительной архитектуре и мощным мультимодальным возможностям.",
"minimax.description": "Основанная в 2021 году, MiniMax разрабатывает универсальные ИИ-модели на базе мультимодальных основ, включая текстовые модели с триллионами параметров, речевые и визуальные модели, а также приложения, такие как Hailuo AI.",
"minimaxcodingplan.description": "План токенов MiniMax предоставляет доступ к моделям MiniMax, включая M2.7, для выполнения задач кодирования по подписке с фиксированной оплатой.",
diff --git a/locales/ru-RU/setting.json b/locales/ru-RU/setting.json
index eb03fcf0c4d..311f3b76546 100644
--- a/locales/ru-RU/setting.json
+++ b/locales/ru-RU/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Заполнить вручную",
"tab.manualFill.desc": "Ручная настройка пользовательского навыка MCP",
"tab.memory": "Память",
+ "tab.messenger": "Мессенджер",
"tab.notification": "Уведомления",
"tab.profile": "Мой аккаунт",
"tab.provider": "Поставщик ИИ",
diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.json
index f4131f7474d..f443d62d9c2 100644
--- a/locales/tr-TR/chat.json
+++ b/locales/tr-TR/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Tüm araç çalıştırmalarını otomatik olarak onayla",
"tool.intervention.mode.manual": "Manuel",
"tool.intervention.mode.manualDesc": "Her çağrı için manuel onay gerekir",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Yeni kimlik onaydan sonra görünecek.",
- "tool.intervention.onboarding.agentIdentity.description": "Bu değişikliğin onaylanması, Gelen Kutusu'nda ve bu onboarding konuşmasında görünen Ajanı günceller.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Ajan avatarı",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Onboarding onayı",
- "tool.intervention.onboarding.agentIdentity.name": "Ajan adı",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Gelen Kutusu Ajanı",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Geçerli onboarding Ajanı",
- "tool.intervention.onboarding.agentIdentity.targets": "Uygulanan yerler",
"tool.intervention.onboarding.agentIdentity.title": "Ajan kimliği güncellemesini onayla",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Avatarımı güncelleyeceğim",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Adımı güncelleyeceğim",
"tool.intervention.onboarding.userProfile.applyHint": "Bu bilgiler onaylandıktan sonra profilinize kaydedilecektir.",
"tool.intervention.onboarding.userProfile.description": "Bu değişikliği onaylamak, temsilcinin gelecekteki yanıtları kişiselleştirebilmesi için giriş profilinizi günceller.",
"tool.intervention.onboarding.userProfile.eyebrow": "Giriş onayı",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "{{time}} tarihinde güncellendi",
"workingPanel.resources.viewMode.list": "Liste görünümü",
"workingPanel.resources.viewMode.tree": "Ağaç görünümü",
+ "workingPanel.review.baseRef.default": "varsayılan",
+ "workingPanel.review.baseRef.loading": "Dallar yükleniyor…",
+ "workingPanel.review.baseRef.reset": "Varsayılan dala sıfırla",
+ "workingPanel.review.baseRef.unresolved": "Bir temel dal seçin",
"workingPanel.review.binary": "İkili dosya — fark gösterilmiyor",
"workingPanel.review.collapseAll": "Hepsini daralt",
"workingPanel.review.copied": "Yol kopyalandı",
"workingPanel.review.copyPath": "Dosya yolunu kopyala",
"workingPanel.review.empty": "Çalışma ağacında değişiklik yok",
+ "workingPanel.review.empty.branch": "{{baseRef}} ile karşılaştırıldığında değişiklik yok",
+ "workingPanel.review.empty.noBaseRef": "Uzak varsayılan dal belirlenemedi. Terminalinizde `git remote set-head origin --auto` komutunu çalıştırın.",
"workingPanel.review.error": "Bu dosyanın farkı yüklenemedi",
"workingPanel.review.expandAll": "Hepsini genişlet",
+ "workingPanel.review.mode.branch": "Dal",
+ "workingPanel.review.mode.unstaged": "Sahnesiz",
"workingPanel.review.more": "Daha fazla seçenek",
"workingPanel.review.refresh": "Yenile",
"workingPanel.review.textDiff.disable": "Satır içi metin farkını devre dışı bırak",
diff --git a/locales/tr-TR/labs.json b/locales/tr-TR/labs.json
index edc923892e4..b869d08fdc6 100644
--- a/locales/tr-TR/labs.json
+++ b/locales/tr-TR/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Grup Sohbeti (Çoklu Temsilci)",
"features.inputMarkdown.desc": "Girdi alanında Markdown biçimlendirmesini (kalın metin, kod blokları, tablolar vb.) gerçek zamanlı olarak görüntüleyin.",
"features.inputMarkdown.title": "Girdi Markdown Görüntüleme",
+ "features.messenger.desc": "Telegram (ve diğer mesajlaşma uygulamaları) üzerinden LobeHub botu aracılığıyla ajanlarınızla konuşun. Hesabınızı bağlamak ve hangi ajanın mesajları alacağını seçmek için Ayarlar'da bir Mesajlaşma sekmesi ekler.",
+ "features.messenger.title": "Mesajlaşma",
"title": "Deneysel Özellikler"
}
diff --git a/locales/tr-TR/messenger.json b/locales/tr-TR/messenger.json
new file mode 100644
index 00000000000..1bc7ed126ff
--- /dev/null
+++ b/locales/tr-TR/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Aktif temsilci",
+ "messenger.activeAgentPlaceholder": "Bir temsilci seçin",
+ "messenger.detail.addServer": "Sunucu ekle",
+ "messenger.detail.addWorkspace": "Çalışma alanı ekle",
+ "messenger.detail.connections.connected": "Bağlı",
+ "messenger.detail.connections.empty": "Botu açın ve hesabınızı bağlamak için /start gönderin.",
+ "messenger.detail.connections.linkHint": "Çalışma alanı yüklendi. Slack'i açın ve kişisel hesabınızı bağlamak için bota DM gönderin.",
+ "messenger.detail.connections.pending": "Bekliyor",
+ "messenger.detail.connections.serverLabel": "sunucu",
+ "messenger.detail.connections.title": "Bağlantılar",
+ "messenger.detail.connections.userLabel": "kullanıcı",
+ "messenger.detail.connections.workspaceLabel": "çalışma alanı",
+ "messenger.detail.disconnect": "Bağlantıyı kes",
+ "messenger.discord.connectModal.description": "Yönettiğiniz bir Discord sunucusuna LobeHub botunu ekleyin.",
+ "messenger.discord.connectModal.inviteButton": "Discord sunucusuna ekle",
+ "messenger.discord.connectModal.notConfigured": "Discord şu anda kullanılamıyor. Lütfen daha sonra tekrar deneyin.",
+ "messenger.discord.connectModal.title": "Botu sunucunuza ekleyin",
+ "messenger.discord.connections.disconnectConfirm": "Bu sunucuyu denetim listenizden kaldırmak istiyor musunuz? Bot, bir sunucu yöneticisi tarafından çıkarılana kadar sunucuda kalacaktır.",
+ "messenger.discord.connections.disconnectFailed": "Sunucu kaldırılamadı.",
+ "messenger.discord.connections.disconnectSuccess": "Sunucu kaldırıldı.",
+ "messenger.discord.connections.disconnectTitle": "Sunucuyu kaldır",
+ "messenger.discord.userPending.cta": "Discord'da aç",
+ "messenger.discord.userPending.hint": "Discord'da botu açın ve hesabınızı bağlamak için herhangi bir mesaj gönderin.",
+ "messenger.discord.userPending.name": "Henüz bağlanmadı",
+ "messenger.error.agentNotFound": "Temsilci bulunamadı.",
+ "messenger.error.disconnectNotAllowed": "Yalnızca başlattığınız kurulumların bağlantısını kesebilirsiniz.",
+ "messenger.error.installationNotFound": "Kurulum bulunamadı.",
+ "messenger.error.linkRequired": "Bu bağlantıyı değiştirmeden önce botu açın ve /start gönderin.",
+ "messenger.error.pickDefaultAgent": "Onaylamadan önce bir varsayılan temsilci seçin.",
+ "messenger.error.platformNotConfigured": "Bu mesajlaşma platformu şu anda kullanılamıyor. Lütfen daha sonra tekrar deneyin.",
+ "messenger.linkCta": "Bağlan",
+ "messenger.linkModal.continueIn": "{{platform}}'da kuruluma devam edin",
+ "messenger.linkModal.instructions": "Botu açın, /start gönderin ve ardından LobeHub hesabınızı bağlamak için \"Hesabı Bağla\"ya dokunun.",
+ "messenger.linkModal.notConfigured": "Bu bağlantı şu anda kullanılamıyor. Lütfen daha sonra tekrar deneyin.",
+ "messenger.linkModal.openCta": "{{platform}}'da aç",
+ "messenger.linkModal.scanHint": "Veya {{platform}}'u açmak için telefonunuzla tarayın.",
+ "messenger.linkModal.title": "Mesajlaşma Platformunu Bağla",
+ "messenger.list.discord.description": "LobeHub temsilcilerinizle herhangi bir Discord sunucusundan DM aracılığıyla LobeHub botu ile sohbet edin.",
+ "messenger.list.slack.description": "LobeHub temsilcilerinizle herhangi bir Slack çalışma alanından DM veya @LobeHub aracılığıyla sohbet edin.",
+ "messenger.list.telegram.description": "Telegram'da LobeHub temsilcilerinizle sohbet edin ve her yerden yanıt verecek olanı seçin.",
+ "messenger.noPlatformsConfigured": "Henüz hiçbir platform kullanılamıyor. Yakında tekrar kontrol edin.",
+ "messenger.setActiveFailed": "Aktif olarak ayarlanamadı.",
+ "messenger.setActiveSuccess": "Aktif temsilci güncellendi.",
+ "messenger.slack.connectModal.continueButton": "Slack'te devam edin",
+ "messenger.slack.connectModal.description": "LobeHub çalışma alanı kurulumunu yetkilendirmek için Slack'e yönlendirileceksiniz.",
+ "messenger.slack.connectModal.notConfigured": "Slack şu anda kullanılamıyor. Lütfen daha sonra tekrar deneyin.",
+ "messenger.slack.connectModal.title": "Slack'te kuruluma devam edin",
+ "messenger.slack.connections.disconnectConfirm": "LobeHub botunun bu Slack çalışma alanından bağlantısını kesmek istiyor musunuz? Mevcut kullanıcı bağlantıları, yeniden yükleyene kadar duraklatılacaktır.",
+ "messenger.slack.connections.disconnectFailed": "Bağlantı kesilemedi.",
+ "messenger.slack.connections.disconnectSuccess": "Çalışma alanının bağlantısı kesildi.",
+ "messenger.slack.connections.disconnectTitle": "Çalışma alanının bağlantısını kes",
+ "messenger.slack.installBlocked.dismiss": "Anladım",
+ "messenger.slack.installBlocked.suggestion": "Slack'te @LobeHub'a DM göndererek kişisel hesabınızı bağlayın — yeniden yüklemenize gerek yok. Veya devralmak istiyorsanız, orijinal yükleyiciden önce bu çalışma alanının bağlantısını kesmesini isteyin.",
+ "messenger.slack.installBlocked.title": "Çalışma alanı zaten bağlı",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" başka bir kullanıcı tarafından LobeHub'a zaten bağlandı.",
+ "messenger.slack.installBlocked.withoutName": "Bu Slack çalışma alanı başka bir kullanıcı tarafından LobeHub'a zaten bağlandı.",
+ "messenger.slack.installResult.failed": "Slack kurulumu başarısız oldu ({{reason}}). Lütfen tekrar deneyin veya destek ile iletişime geçin.",
+ "messenger.slack.installResult.reasons.accessDenied": "yetkilendirme iptal edildi",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack yetkilendirmesi başarısız oldu",
+ "messenger.slack.installResult.reasons.generic": "bilinmeyen bir hata oluştu",
+ "messenger.slack.installResult.reasons.invalidState": "kurulum oturumu sona erdi",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack eksik uygulama bilgileri döndürdü",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack eksik kurulum parametreleri döndürdü",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack bir çalışma alanı tanımlayıcısı döndürmedi",
+ "messenger.slack.installResult.reasons.missingToken": "Slack bir bot tokeni döndürmedi",
+ "messenger.slack.installResult.reasons.persistFailed": "çalışma alanı bağlantısı kaydedilemedi",
+ "messenger.slack.installResult.success": "Slack çalışma alanı bağlandı.",
+ "messenger.subtitle": "Hesabınızı resmi LobeHub botuna bir kez bağlayın. Mesajları alacak temsilciyi seçin, buradan veya bottan istediğiniz zaman değiştirin.",
+ "messenger.title": "Mesajlaşma",
+ "messenger.unlinkConfirm": "{{platform}} hesabınızın LobeHub ile bağlantısını kesmek istiyor musunuz? Gelen mesajlar, tekrar /start yapana kadar duracaktır.",
+ "messenger.unlinkCta": "Bağlantıyı kes",
+ "messenger.unlinkFailed": "Bağlantı kesilemedi.",
+ "messenger.unlinkSuccess": "Bağlantı kesildi.",
+ "messenger.unlinkTitle": "Hesabın bağlantısını kes",
+ "verify.confirm.conflict.description": "Bu {{platform}} hesabı zaten {{email}} LobeHub hesabına bağlı. Bağlantıyı yönetmek için o hesaba giriş yapın veya yeniden denemeden önce orada bağlantıyı kesin.",
+ "verify.confirm.conflict.switchAccount": "Başka bir hesapla giriş yap",
+ "verify.confirm.conflict.title": "Bu hesap zaten bağlı",
+ "verify.confirm.cta": "Bağlantıyı onayla",
+ "verify.confirm.defaultAgent": "Varsayılan temsilci",
+ "verify.confirm.defaultAgentHint": "Mesajlarınız önce buraya yönlendirilecektir. Botta /agents veya Ayarlar → Mesajlaşma üzerinden istediğiniz zaman değiştirebilirsiniz.",
+ "verify.confirm.defaultAgentPlaceholder": "Bir temsilci seçin",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub hesabı",
+ "verify.confirm.fields.platformAccount": "{{platform}} hesabı",
+ "verify.confirm.fields.workspace": "Çalışma alanı",
+ "verify.confirm.noAgents": "Henüz hiçbir temsilciniz yok. LobeHub'da bir tane oluşturun, ardından bağlantıyı tamamlamak için geri dönün.",
+ "verify.confirm.title": "Bağlantıyı onayla",
+ "verify.confirm.workspace": "Çalışma alanı: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Bu hesap zaten başka bir LobeHub hesabına bağlı. Önce o hesaba giriş yapın.",
+ "verify.error.expired": "Bu bağlantı süresi doldu. Lütfen bota geri dönün ve tekrar /start gönderin.",
+ "verify.error.generic": "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
+ "verify.error.missingToken": "Geçersiz bağlantı. Bu sayfayı bottan açın.",
+ "verify.error.title": "Bağlantı onaylanamıyor",
+ "verify.labRequired.description": "Mesajlaşma şu anda bir Labs özelliği. Ayarlar → Gelişmiş → Labs bölümünden etkinleştirin ve bu sayfayı yeniden yükleyin.",
+ "verify.labRequired.openSettings": "Labs ayarlarını aç",
+ "verify.labRequired.title": "Devam etmek için Mesajlaşmayı etkinleştirin",
+ "verify.signInCta": "Devam etmek için giriş yapın",
+ "verify.signInRequired": "Bağlantıyı onaylamak için LobeHub'a giriş yapın.",
+ "verify.success.description": "Hesabınız artık {{platform}} ile bağlı. {{platform}}'u açın ve ilk mesajınızı gönderin.",
+ "verify.success.openBot": "{{platform}}'da aç",
+ "verify.success.title": "Başarıyla bağlandı!"
+}
diff --git a/locales/tr-TR/models.json b/locales/tr-TR/models.json
index 5eb7e00ed55..b48991d4e24 100644
--- a/locales/tr-TR/models.json
+++ b/locales/tr-TR/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Vücut hareketi, fiziksel gerçekçilik ve talimat takibinde kapsamlı yükseltmelerle yepyeni bir video üretim modeli.",
"MiniMax-M1.description": "80K düşünce zinciri ve 1M giriş desteğiyle üst düzey modellerle karşılaştırılabilir performans sunan yeni bir yerli akıl yürütme modeli.",
"MiniMax-M2-Stable.description": "Ticari kullanım için daha yüksek eşzamanlılık sunan, verimli kodlama ve ajan iş akışları için tasarlanmıştır.",
- "MiniMax-M2.1-Lightning.description": "Daha hızlı ve daha verimli çıkarım ile güçlü çok dilli programlama yetenekleri.",
"MiniMax-M2.1-highspeed.description": "Güçlü çok dilli programlama yetenekleri, kapsamlı olarak geliştirilmiş bir programlama deneyimi. Daha hızlı ve daha verimli.",
"MiniMax-M2.1.description": "MiniMax-M2.1, MiniMax tarafından geliştirilen amiral gemisi açık kaynak büyük modeldir ve karmaşık gerçek dünya görevlerini çözmeye odaklanır. Temel güçlü yönleri çok dilli programlama yetenekleri ve bir Ajan olarak karmaşık görevleri çözme becerisidir.",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: M2.5 ile aynı performans, ancak daha hızlı çıkarım.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku, Anthropic’in en hızlı ve en kompakt modelidir; anında yanıtlar için hızlı ve doğru performans sunar.",
"claude-3-opus-20240229.description": "Claude 3 Opus, karmaşık görevler için Anthropic’in en güçlü modelidir; performans, zeka, akıcılık ve anlama konularında üstündür.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet, kurumsal iş yükleri için zeka ve hızı dengeler; düşük maliyetle yüksek fayda ve güvenilir büyük ölçekli dağıtım sunar.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5, Anthropic'in en hızlı ve en akıllı Haiku modelidir, yıldırım hızında ve genişletilmiş düşünme yeteneğiyle.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5, Anthropic'in en hızlı ve en akıllı Haiku modelidir; yıldırım hızında ve gelişmiş akıl yürütme yeteneğine sahiptir.",
"claude-haiku-4-5.description": "Anthropic’in Claude Haiku 4.5 modeli — gelişmiş akıl yürütme ve görsel yeteneklere sahip yeni nesil Haiku.",
"claude-haiku-4.5.description": "Claude Haiku 4.5, Anthropic'in en hızlı ve en akıllı Haiku modeli olup, yıldırım hızında ve gelişmiş akıl yürütme yeteneklerine sahiptir.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking, akıl yürütme sürecini görünür şekilde ortaya koyabilen gelişmiş bir varyanttır.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1, Anthropic'in en son ve en yetenekli modeli olup, yüksek karmaşıklıktaki görevlerde performans, zeka, akıcılık ve anlama konularında mükemmeldir.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1, Anthropic'in en yeni ve en yetenekli modeli olup, yüksek karmaşıklıktaki görevlerde performans, zeka, akıcılık ve anlama konularında mükemmeldir.",
"claude-opus-4-1.description": "Anthropic’in Claude Opus 4.1 modeli — derin analiz yeteneklerine sahip üst seviye akıl yürütme modeli.",
- "claude-opus-4-20250514.description": "Claude Opus 4, Anthropic'in yüksek karmaşıklıktaki görevler için en güçlü modelidir ve performans, zeka, akıcılık ve anlama konularında mükemmeldir.",
+ "claude-opus-4-20250514.description": "Claude Opus 4, Anthropic'in yüksek karmaşıklıktaki görevler için en güçlü modelidir; performans, zeka, akıcılık ve kavrama konularında üstünlük sağlar.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5, Anthropic’in amiral gemisi modelidir; olağanüstü zeka ile ölçeklenebilir performansı birleştirir. En yüksek kaliteli yanıtlar ve akıl yürütme gerektiren karmaşık görevler için idealdir.",
"claude-opus-4-5.description": "Anthropic’in Claude Opus 4.5 modeli — üst düzey akıl yürütme ve kodlama yeteneklerine sahip amiral gemisi model.",
"claude-opus-4-6.description": "Anthropic’in Claude Opus 4.6 modeli — 1M bağlam penceresi ve gelişmiş akıl yürütme yetenekleriyle amiral gemisi sürümü.",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6, Anthropic'in ajanlar oluşturma ve kodlama için en akıllı modelidir.",
"claude-opus-4.6.description": "Claude Opus 4.6, Anthropic'in ajanlar oluşturma ve kodlama için en akıllı modelidir.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking, anında yanıtlar veya adım adım düşünme süreçleri üretebilir.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4, Anthropic'in bugüne kadarki en akıllı modelidir ve API kullanıcıları için ince ayarlı kontrol ile anında yanıtlar veya adım adım genişletilmiş düşünme sunar.",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5, Anthropic'in bugüne kadarki en akıllı modelidir.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4, anında yanıtlar üretebilir veya görünür bir süreçle adım adım düşünme yeteneği sunar.",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5, Anthropic'in bugüne kadarki en zeki modelidir.",
"claude-sonnet-4-5.description": "Anthropic’in Claude Sonnet 4.5 modeli — geliştirilmiş kodlama performansıyla güçlendirilmiş Sonnet sürümü.",
"claude-sonnet-4-6.description": "Anthropic’in Claude Sonnet 4.6 modeli — üstün kodlama ve araç kullanımıyla en yeni Sonnet.",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5, Anthropic'in bugüne kadarki en akıllı modelidir.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B), derin dil anlama ve etkileşim sunan yenilikçi bir modeldir.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1, karmaşık akıl yürütme ve düşünce zinciriyle derin analiz görevleri için geliştirilmiş yeni nesil bir modeldir.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2, daha güçlü karmaşık akıl yürütme ve düşünce zinciri yeteneklerine sahip yeni nesil bir akıl yürütme modelidir.",
- "deepseek-chat.description": "DeepSeek V4 Flash düşünmeyen mod için uyumluluk takma adı. Kullanımdan kaldırılacak — bunun yerine DeepSeek V4 Flash kullanın.",
+ "deepseek-chat.description": "Genel ve kod yeteneklerini birleştiren yeni bir açık kaynak modeli. Sohbet modelinin genel diyalog yeteneklerini ve kodlayıcı modelin güçlü kodlama yeteneklerini korur, daha iyi tercih uyumu sağlar. DeepSeek-V2.5 ayrıca yazma ve talimat takip etme konularında da iyileştirmeler sunar.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B, 2T token (%%87 kod, %%13 Çince/İngilizce metin) ile eğitilmiş bir kodlama dil modelidir. 16K bağlam penceresi ve ortadan doldurma görevleri sunar; proje düzeyinde kod tamamlama ve kod parçacığı doldurma sağlar.",
"deepseek-coder-v2.description": "DeepSeek Coder V2, GPT-4 Turbo ile karşılaştırılabilir güçlü performansa sahip açık kaynaklı bir MoE kod modeli.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2, GPT-4 Turbo ile karşılaştırılabilir güçlü performansa sahip açık kaynaklı bir MoE kod modeli.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Gerçek zamanlı web aramasıyla 671B ölçekli yetenek ve hızlı yanıtları birleştiren DeepSeek R1 hızlı tam sürüm.",
"deepseek-r1-online.description": "671B parametreli ve gerçek zamanlı web aramasına sahip DeepSeek R1 tam sürüm; güçlü anlama ve üretim sunar.",
"deepseek-r1.description": "DeepSeek-R1, RL öncesi soğuk başlangıç verileri kullanır ve matematik, kodlama ve akıl yürütmede OpenAI-o1 ile karşılaştırılabilir performans sunar.",
- "deepseek-reasoner.description": "DeepSeek V4 Flash düşünme modu için uyumluluk takma adı. Kullanımdan kaldırılacak — bunun yerine DeepSeek V4 Flash kullanın.",
+ "deepseek-reasoner.description": "DeepSeek V4 Flash düşünme modu için uyumluluk takma adı. Kullanımdan kaldırılması planlanıyor — bunun yerine deepseek-v4-flash kullanın.",
"deepseek-v2.description": "DeepSeek V2, maliyet etkin işlem için verimli bir MoE modelidir.",
"deepseek-v2:236b.description": "DeepSeek V2 236B, güçlü kod üretimi sunan DeepSeek’in kod odaklı modelidir.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324, programlama ve teknik yetenek, bağlam anlama ve uzun metin işleme konularında öne çıkan 671B parametreli bir MoE modelidir.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0, ByteDance Seed tarafından geliştirilen bir görsel üretim modelidir; metin ve görsel girişlerini destekler, yüksek kaliteli ve kontrol edilebilir görseller üretir. Metin istemlerinden görseller oluşturur.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5, ByteDance'in en son çok modlu görüntü modelidir. Metinden görüntüye, görüntüden görüntüye ve toplu görüntü oluşturma yeteneklerini entegre ederken, sağduyu ve akıl yürütme yeteneklerini içerir. Önceki 4.0 sürümüne kıyasla, daha iyi düzenleme tutarlılığı ve çoklu görüntü birleştirme ile önemli ölçüde geliştirilmiş üretim kalitesi sunar. Görsel detaylar üzerinde daha hassas kontrol sağlar, küçük metin ve küçük yüzleri daha doğal bir şekilde üretir ve daha uyumlu düzen ve renk elde ederek genel estetiği artırır.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite, ByteDance'in en son görüntü oluşturma modelidir. İlk kez çevrimiçi bilgi alma yeteneklerini entegre ederek gerçek zamanlı web bilgilerini dahil etmesine ve oluşturulan görüntülerin zamanlamasını artırmasına olanak tanır. Modelin zekası da yükseltilmiş, karmaşık talimatları ve görsel içeriği hassas bir şekilde yorumlama yeteneği kazandırılmıştır. Ayrıca, profesyonel senaryolarda daha iyi küresel bilgi kapsamı, referans tutarlılığı ve üretim kalitesi sunarak kurumsal düzeyde görsel yaratım ihtiyaçlarını daha iyi karşılar.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0, ByteDance tarafından geliştirilen en güçlü video üretim modelidir ve çok modlu referans video üretimi, video düzenleme, video genişletme, metinden videoya ve görüntüden videoya senkronize ses ile destekler.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast, Seedance 2.0 ile aynı yetenekleri daha hızlı üretim hızları ve daha rekabetçi bir fiyatla sunar.",
"emohaa.description": "Emohaa, kullanıcıların duygusal sorunları anlamalarına yardımcı olmak için profesyonel danışmanlık yeteneklerine sahip bir ruh sağlığı modelidir.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B, yerel ve özelleştirilmiş dağıtım için açık kaynaklı hafif bir modeldir.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Önizleme, ERNIE 4.5'in değerlendirilmesi için 8K bağlam önizleme modelidir.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K, karmaşık akıl yürütme ve çoklu dönüşlü sohbetler için 32K bağlamlı hızlı düşünme modelidir.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Önizleme, değerlendirme ve test için bir düşünme modeli önizlemesidir.",
"ernie-x1.1.description": "ERNIE X1.1, değerlendirme ve test için bir düşünme-modeli önizlemesidir.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, ByteDance Seed ekibi tarafından geliştirilmiştir ve çoklu görüntü düzenleme ve kompozisyonu destekler. Geliştirilmiş konu tutarlılığı, hassas talimat izleme, mekansal mantık anlama, estetik ifade, poster düzeni ve logo tasarımı ile yüksek hassasiyetli metin-görüntü oluşturma özelliklerine sahiptir.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, ByteDance Seed tarafından geliştirilmiştir ve istemlerden yüksek derecede kontrol edilebilir, yüksek kaliteli görüntü üretimi için metin ve görüntü girişlerini destekler.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, ByteDance Seed'in bir metin ve görüntü girişlerini destekleyen, yüksek kaliteli ve oldukça kontrol edilebilir görüntü üretimi sağlayan bir görüntü oluşturma modelidir. Metin istemlerinden görüntüler oluşturur.",
"fal-ai/flux-kontext/dev.description": "FLUX.1 modeli, metin ve görsel girdileri destekleyen görsel düzenleme odaklı bir modeldir.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro], metin ve referans görselleri girdi olarak alarak hedefe yönelik yerel düzenlemeler ve karmaşık sahne dönüşümleri sağlar.",
"fal-ai/flux/krea.description": "Flux Krea [dev], daha gerçekçi ve doğal görseller üretmeye eğilimli estetik önyargıya sahip bir görsel üretim modelidir.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Güçlü bir yerel çok modlu görsel üretim modelidir.",
"fal-ai/imagen4/preview.description": "Google tarafından geliştirilen yüksek kaliteli görsel üretim modeli.",
"fal-ai/nano-banana.description": "Nano Banana, Google’ın en yeni, en hızlı ve en verimli yerel çok modlu modelidir. Konuşma yoluyla görsel üretim ve düzenleme sağlar.",
- "fal-ai/qwen-image-edit.description": "Qwen ekibinden profesyonel bir görüntü düzenleme modeli olup, anlamsal ve görünüm düzenlemeleri, hassas Çince/İngilizce metin düzenleme, stil transferi, döndürme ve daha fazlasını destekler.",
- "fal-ai/qwen-image.description": "Qwen ekibinden güçlü bir görüntü üretim modeli olup, güçlü Çince metin işleme ve çeşitli görsel stiller sunar.",
+ "fal-ai/qwen-image-edit.description": "Qwen ekibinden, semantik ve görünüm düzenlemelerini destekleyen, Çince ve İngilizce metinleri hassas bir şekilde düzenleyen ve stil transferi ile nesne döndürme gibi yüksek kaliteli düzenlemeler yapabilen profesyonel bir görüntü düzenleme modeli.",
+ "fal-ai/qwen-image.description": "Qwen ekibinden, etkileyici Çince metin işleme ve çeşitli görsel stiller sunan güçlü bir görüntü oluşturma modeli.",
"flux-1-schnell.description": "Black Forest Labs tarafından geliştirilen 12 milyar parametreli metinden görsele model. Latent adversarial diffusion distillation yöntemiyle 1-4 adımda yüksek kaliteli görseller üretir. Kapalı kaynaklı alternatiflerle rekabet eder ve kişisel, araştırma ve ticari kullanım için Apache-2.0 lisansı ile sunulur.",
"flux-dev.description": "Açık kaynaklı Ar-Ge görsel üretim modelidir; ticari olmayan yenilikçi araştırmalar için verimli şekilde optimize edilmiştir.",
"flux-kontext-max.description": "Metin ve görselleri birleştirerek hassas ve tutarlı sonuçlar sunan son teknoloji bağlamsal görsel üretim ve düzenleme.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash, hız için tasarlanmış en akıllı modeldir. En son yapay zeka zekasını mükemmel arama temellendirmesiyle birleştirir.",
"gemini-3-flash.description": "Google’ın Gemini 3 Flash modeli — çok hızlı ve çok modlu giriş desteğine sahiptir.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro), Google'ın çok modlu diyaloğu da destekleyen görüntü oluşturma modelidir.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro), Google'ın görüntü üretim modelidir ve çok modlu sohbeti de destekler.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro), Google'ın görüntü oluşturma modelidir ve aynı zamanda çok modlu sohbeti destekler.",
"gemini-3-pro-preview.description": "Gemini 3 Pro, Google’ın en güçlü ajan ve vibe-coding modelidir. En yeni akıl yürütme yeteneklerinin üzerine zengin görseller ve derin etkileşim sunar.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2), Google'ın düşünme desteği, konuşmalı görüntü oluşturma ve düzenleme özelliklerine sahip en hızlı yerel görüntü oluşturma modelidir.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2), Flash hızında Pro seviyesinde görüntü kalitesi sunar ve çok modlu sohbet desteği sağlar.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2), Google'ın düşünme desteği, konuşmaya dayalı görüntü oluşturma ve düzenleme özellikleriyle en hızlı yerel görüntü oluşturma modelidir.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview, Google'ın en maliyet etkin çok modlu modeli olup, yüksek hacimli ajan görevleri, çeviri ve veri işleme için optimize edilmiştir.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview, Gemini 3 Pro'ya kıyasla geliştirilmiş akıl yürütme yetenekleri sunar ve orta düzey düşünme desteği ekler.",
"gemini-3.1-pro.description": "Google’ın Gemini 3.1 Pro modeli — 1M bağlam penceresine sahip üst düzey çok modlu model.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Grok 4 Fast modelimizi sunmaktan heyecan duyuyoruz; uygun maliyetli akıl yürütme modellerinde en son gelişmemizdir.",
"grok-4.20-0309-non-reasoning.description": "Basit kullanım senaryoları için akıl yürütme içermeyen varyant.",
"grok-4.20-0309-reasoning.description": "Yanıt vermeden önce akıl yürüten, son derece hızlı ve akıllı model.",
- "grok-4.20-beta-0309-non-reasoning.description": "Basit kullanım durumları için düşünmeyen bir varyant",
- "grok-4.20-beta-0309-reasoning.description": "Yanıt vermeden önce akıl yürüten, son derece hızlı ve zeki bir model",
"grok-4.20-multi-agent-0309.description": "4 veya 16 ajanlık bir ekip; araştırma senaryolarında üstündür. Şu anda istemci tarafı araçları desteklemez. Yalnızca xAI sunucu tarafı araçlarını (örn. X Search, Web Search araçları) ve uzak MCP araçlarını destekler.",
"grok-4.3.description": "Dünyanın en doğruyu arayan büyük dil modeli",
- "grok-4.description": "NLP, matematik ve akıl yürütmede mükemmel olan en yeni ve en güçlü amiral gemisi modelimiz—ideal bir çok yönlü.",
+ "grok-4.description": "Dil, matematik ve akıl yürütme konularında rakipsiz performansa sahip en son Grok amiral gemisi — gerçek bir çok yönlü model. Şu anda grok-4-0709'a işaret ediyor; sınırlı kaynaklar nedeniyle geçici olarak resmi fiyatlandırmadan %10 daha yüksek ve resmi fiyata dönmesi bekleniyor.",
"grok-code-fast-1.description": "Ajan tabanlı kodlama görevlerinde öne çıkan, hızlı ve uygun maliyetli bir akıl yürütme modeli olan grok-code-fast-1 modelini sunmaktan heyecan duyuyoruz.",
"grok-imagine-image-pro.description": "Metin istemlerinden görüntüler oluşturun, mevcut görüntüleri doğal dil ile düzenleyin veya çoklu dönüşlü konuşmalarla görüntüleri iteratif olarak geliştirin.",
"grok-imagine-image.description": "Metin istemlerinden görüntüler oluşturun, mevcut görüntüleri doğal dil ile düzenleyin veya çoklu dönüşlü konuşmalarla görüntüleri iteratif olarak geliştirin.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ, Qwen ailesine ait bir akıl yürütme modelidir. Standart talimatla eğitilmiş modellere kıyasla düşünme ve akıl yürütme yetenekleriyle özellikle zor problemler üzerinde performansı önemli ölçüde artırır. QwQ-32B, DeepSeek-R1 ve o1-mini gibi üst düzey modellerle rekabet eden orta boyutlu bir modeldir.",
"qwq_32b.description": "Qwen ailesine ait orta boyutlu bir akıl yürütme modelidir. Standart talimatla eğitilmiş modellere kıyasla QwQ’nun düşünme ve akıl yürütme yetenekleri, özellikle zor problemler üzerinde performansı önemli ölçüde artırır.",
"r1-1776.description": "R1-1776, sansürsüz ve tarafsız gerçek bilgi sunmak üzere DeepSeek R1 üzerine eğitilmiş bir varyanttır.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro, ByteDance tarafından geliştirilmiştir ve metinden videoya, görüntüden videoya (ilk kare, ilk+son kare) ve görsellerle senkronize ses üretimini destekler.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite, BytePlus tarafından geliştirilmiştir ve gerçek zamanlı bilgi için web arama ile artırılmış üretim, karmaşık istem yorumlama ve profesyonel görsel oluşturma için geliştirilmiş referans tutarlılığı sunar.",
"solar-mini-ja.description": "Solar Mini (Ja), Japonca odaklı geliştirilmiş Solar Mini modelidir; İngilizce ve Korece'de de verimli ve güçlü performans sunar.",
"solar-mini.description": "Solar Mini, GPT-3.5'i geride bırakan kompakt bir LLM'dir. İngilizce ve Korece destekli çok dilli yetenekleriyle verimli ve küçük boyutlu bir çözüm sunar.",
"solar-pro.description": "Solar Pro, Upstage tarafından geliştirilen yüksek zekaya sahip bir LLM'dir. Tek bir GPU üzerinde talimat izleme odaklıdır ve IFEval skorları 80'in üzerindedir. Şu anda İngilizce desteklidir; tam sürüm Kasım 2024'te daha fazla dil desteği ve uzun bağlamla planlanmıştır.",
diff --git a/locales/tr-TR/providers.json b/locales/tr-TR/providers.json
index 7548148d43d..02005f30450 100644
--- a/locales/tr-TR/providers.json
+++ b/locales/tr-TR/providers.json
@@ -33,7 +33,6 @@
"jina.description": "2020 yılında kurulan Jina AI, önde gelen bir arama yapay zekası şirketidir. Vektör modelleri, yeniden sıralayıcılar ve küçük dil modelleri içeren arama yığını ile güvenilir ve yüksek kaliteli üretken ve çok modlu arama uygulamaları geliştirir.",
"kimicodingplan.description": "Moonshot AI'den Kimi Code, kodlama görevleri için K2.5 dahil olmak üzere Kimi modellerine erişim sağlar.",
"lmstudio.description": "LM Studio, bilgisayarınızda büyük dil modelleriyle geliştirme ve denemeler yapmanızı sağlayan bir masaüstü uygulamasıdır.",
- "lobehub.description": "LobeHub Cloud, resmi API'leri kullanarak yapay zeka modellerine erişir ve kullanımını model jetonlarına bağlı Kredilerle ölçer.",
"longcat.description": "LongCat, Meituan tarafından bağımsız olarak geliştirilen bir dizi üretken yapay zeka büyük modelidir. Verimli bir hesaplama mimarisi ve güçlü çok modlu yetenekler aracılığıyla kurumsal iç verimliliği artırmak ve yenilikçi uygulamaları mümkün kılmak için tasarlanmıştır.",
"minimax.description": "2021 yılında kurulan MiniMax, çok modlu temel modellerle genel amaçlı yapay zeka geliştirir. Trilyon parametreli MoE metin modelleri, ses ve görsel modellerin yanı sıra Hailuo AI gibi uygulamalar sunar.",
"minimaxcodingplan.description": "MiniMax Token Planı, sabit ücretli bir abonelik aracılığıyla kodlama görevleri için M2.7 dahil olmak üzere MiniMax modellerine erişim sağlar.",
diff --git a/locales/tr-TR/setting.json b/locales/tr-TR/setting.json
index 4a7ea95d545..782ef20ce8e 100644
--- a/locales/tr-TR/setting.json
+++ b/locales/tr-TR/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Manuel Doldur",
"tab.manualFill.desc": "Özel bir MCP becerisini manuel olarak yapılandırın",
"tab.memory": "Hafıza",
+ "tab.messenger": "Mesajlaşma",
"tab.notification": "Bildirimler",
"tab.profile": "Hesabım",
"tab.provider": "Yapay Zeka Hizmet Sağlayıcısı",
diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.json
index 6aff729fbad..93d4993b4f4 100644
--- a/locales/vi-VN/chat.json
+++ b/locales/vi-VN/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "Tự động chấp thuận tất cả các lần thực thi công cụ",
"tool.intervention.mode.manual": "Thủ công",
"tool.intervention.mode.manualDesc": "Yêu cầu chấp thuận thủ công cho mỗi lần gọi",
- "tool.intervention.onboarding.agentIdentity.applyHint": "Danh tính mới sẽ xuất hiện sau khi được phê duyệt.",
- "tool.intervention.onboarding.agentIdentity.description": "Phê duyệt thay đổi này sẽ cập nhật Tác tử hiển thị trong Hộp thư và trong hội thoại onboarding này.",
- "tool.intervention.onboarding.agentIdentity.emoji": "Ảnh đại diện tác tử",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "Phê duyệt onboarding",
- "tool.intervention.onboarding.agentIdentity.name": "Tên tác tử",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "Tác tử Hộp thư",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "Tác tử Onboarding hiện tại",
- "tool.intervention.onboarding.agentIdentity.targets": "Áp dụng cho",
"tool.intervention.onboarding.agentIdentity.title": "Xác nhận cập nhật danh tính Tác tử",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "Tôi sẽ cập nhật ảnh đại diện của mình",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "Tôi sẽ cập nhật tên của mình",
"tool.intervention.onboarding.userProfile.applyHint": "Những thông tin này sẽ được lưu vào hồ sơ của bạn sau khi được phê duyệt.",
"tool.intervention.onboarding.userProfile.description": "Phê duyệt thay đổi này sẽ cập nhật hồ sơ giới thiệu của bạn để Đại lý có thể điều chỉnh các phản hồi trong tương lai.",
"tool.intervention.onboarding.userProfile.eyebrow": "Phê duyệt giới thiệu",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "Cập nhật {{time}}",
"workingPanel.resources.viewMode.list": "Chế độ danh sách",
"workingPanel.resources.viewMode.tree": "Chế độ cây",
+ "workingPanel.review.baseRef.default": "mặc định",
+ "workingPanel.review.baseRef.loading": "Đang tải các nhánh…",
+ "workingPanel.review.baseRef.reset": "Đặt lại về nhánh mặc định",
+ "workingPanel.review.baseRef.unresolved": "Chọn một nhánh cơ sở",
"workingPanel.review.binary": "Tệp nhị phân — không hiển thị sự khác biệt",
"workingPanel.review.collapseAll": "Thu gọn tất cả",
"workingPanel.review.copied": "Đã sao chép đường dẫn",
"workingPanel.review.copyPath": "Sao chép đường dẫn tệp",
"workingPanel.review.empty": "Không có thay đổi trong cây làm việc",
+ "workingPanel.review.empty.branch": "Không có thay đổi so với {{baseRef}}",
+ "workingPanel.review.empty.noBaseRef": "Không thể xác định nhánh mặc định từ xa. Chạy lệnh `git remote set-head origin --auto` trong terminal của bạn.",
"workingPanel.review.error": "Không thể tải sự khác biệt của tệp này",
"workingPanel.review.expandAll": "Mở rộng tất cả",
+ "workingPanel.review.mode.branch": "Nhánh",
+ "workingPanel.review.mode.unstaged": "Chưa được dàn dựng",
"workingPanel.review.more": "Thêm tùy chọn",
"workingPanel.review.refresh": "Làm mới",
"workingPanel.review.textDiff.disable": "Tắt so sánh văn bản nội tuyến",
diff --git a/locales/vi-VN/labs.json b/locales/vi-VN/labs.json
index 572930982b8..463ac5576c6 100644
--- a/locales/vi-VN/labs.json
+++ b/locales/vi-VN/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "Trò Chuyện Nhóm (Đa Tác Nhân)",
"features.inputMarkdown.desc": "Hiển thị Markdown trong khu vực nhập liệu theo thời gian thực (văn bản in đậm, khối mã, bảng, v.v.).",
"features.inputMarkdown.title": "Hiển Thị Markdown Trong Ô Nhập",
+ "features.messenger.desc": "Trò chuyện với các đại lý của bạn từ Telegram (và các ứng dụng nhắn tin khác) thông qua bot LobeHub được chia sẻ. Thêm một tab Messenger trong Cài đặt để liên kết tài khoản của bạn và chọn đại lý nhận tin nhắn.",
+ "features.messenger.title": "Nhắn tin",
"title": "Phòng Thí Nghiệm"
}
diff --git a/locales/vi-VN/messenger.json b/locales/vi-VN/messenger.json
new file mode 100644
index 00000000000..d351d4c282f
--- /dev/null
+++ b/locales/vi-VN/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "Đại lý đang hoạt động",
+ "messenger.activeAgentPlaceholder": "Chọn một đại lý",
+ "messenger.detail.addServer": "Thêm máy chủ",
+ "messenger.detail.addWorkspace": "Thêm không gian làm việc",
+ "messenger.detail.connections.connected": "Đã kết nối",
+ "messenger.detail.connections.empty": "Mở bot và gửi /start để liên kết tài khoản của bạn.",
+ "messenger.detail.connections.linkHint": "Không gian làm việc đã được cài đặt. Mở Slack và nhắn tin cho bot để hoàn tất liên kết tài khoản cá nhân của bạn.",
+ "messenger.detail.connections.pending": "Đang chờ xử lý",
+ "messenger.detail.connections.serverLabel": "máy chủ",
+ "messenger.detail.connections.title": "Kết nối",
+ "messenger.detail.connections.userLabel": "người dùng",
+ "messenger.detail.connections.workspaceLabel": "không gian làm việc",
+ "messenger.detail.disconnect": "Ngắt kết nối",
+ "messenger.discord.connectModal.description": "Thêm bot LobeHub vào một máy chủ Discord mà bạn quản lý.",
+ "messenger.discord.connectModal.inviteButton": "Thêm vào máy chủ Discord",
+ "messenger.discord.connectModal.notConfigured": "Discord hiện không khả dụng. Vui lòng thử lại sau.",
+ "messenger.discord.connectModal.title": "Thêm bot vào máy chủ của bạn",
+ "messenger.discord.connections.disconnectConfirm": "Xóa máy chủ này khỏi danh sách kiểm tra của bạn? Bot sẽ vẫn ở trong máy chủ cho đến khi quản trị viên máy chủ xóa nó.",
+ "messenger.discord.connections.disconnectFailed": "Không thể xóa máy chủ.",
+ "messenger.discord.connections.disconnectSuccess": "Máy chủ đã được xóa.",
+ "messenger.discord.connections.disconnectTitle": "Xóa máy chủ",
+ "messenger.discord.userPending.cta": "Mở trong Discord",
+ "messenger.discord.userPending.hint": "Mở bot trong Discord và gửi bất kỳ tin nhắn nào để hoàn tất liên kết tài khoản của bạn.",
+ "messenger.discord.userPending.name": "Chưa được liên kết",
+ "messenger.error.agentNotFound": "Không tìm thấy đại lý.",
+ "messenger.error.disconnectNotAllowed": "Bạn chỉ có thể ngắt kết nối các cài đặt mà bạn đã bắt đầu.",
+ "messenger.error.installationNotFound": "Không tìm thấy cài đặt.",
+ "messenger.error.linkRequired": "Mở bot và gửi /start trước khi thay đổi kết nối này.",
+ "messenger.error.pickDefaultAgent": "Chọn một đại lý mặc định trước khi xác nhận.",
+ "messenger.error.platformNotConfigured": "Nền tảng nhắn tin này hiện không khả dụng. Vui lòng thử lại sau.",
+ "messenger.linkCta": "Kết nối",
+ "messenger.linkModal.continueIn": "Tiếp tục thiết lập trong {{platform}}",
+ "messenger.linkModal.instructions": "Mở bot, gửi /start, sau đó nhấn \"Liên kết Tài khoản\" để kết nối tài khoản LobeHub của bạn.",
+ "messenger.linkModal.notConfigured": "Kết nối này hiện không khả dụng. Vui lòng thử lại sau.",
+ "messenger.linkModal.openCta": "Mở trong {{platform}}",
+ "messenger.linkModal.scanHint": "Hoặc quét bằng điện thoại của bạn để mở {{platform}}.",
+ "messenger.linkModal.title": "Kết nối Messenger",
+ "messenger.list.discord.description": "Trò chuyện với các đại lý LobeHub của bạn từ bất kỳ máy chủ Discord nào qua DM với bot LobeHub.",
+ "messenger.list.slack.description": "Trò chuyện với các đại lý LobeHub của bạn từ bất kỳ không gian làm việc Slack nào qua DM hoặc @LobeHub.",
+ "messenger.list.telegram.description": "Trò chuyện với các đại lý LobeHub của bạn trong Telegram và chọn ai sẽ trả lời từ bất kỳ đâu.",
+ "messenger.noPlatformsConfigured": "Chưa có nền tảng nào khả dụng. Quay lại sau.",
+ "messenger.setActiveFailed": "Không thể đặt làm hoạt động.",
+ "messenger.setActiveSuccess": "Đại lý hoạt động đã được cập nhật.",
+ "messenger.slack.connectModal.continueButton": "Tiếp tục trong Slack",
+ "messenger.slack.connectModal.description": "Bạn sẽ được chuyển hướng đến Slack để ủy quyền cài đặt không gian làm việc LobeHub.",
+ "messenger.slack.connectModal.notConfigured": "Slack hiện không khả dụng. Vui lòng thử lại sau.",
+ "messenger.slack.connectModal.title": "Tiếp tục thiết lập trong Slack",
+ "messenger.slack.connections.disconnectConfirm": "Ngắt kết nối bot LobeHub khỏi không gian làm việc Slack này? Các liên kết người dùng hiện tại sẽ tạm dừng cho đến khi bạn cài đặt lại.",
+ "messenger.slack.connections.disconnectFailed": "Không thể ngắt kết nối.",
+ "messenger.slack.connections.disconnectSuccess": "Không gian làm việc đã được ngắt kết nối.",
+ "messenger.slack.connections.disconnectTitle": "Ngắt kết nối không gian làm việc",
+ "messenger.slack.installBlocked.dismiss": "Đã hiểu",
+ "messenger.slack.installBlocked.suggestion": "DM @LobeHub trong Slack để liên kết tài khoản cá nhân của bạn — bạn không cần cài đặt lại. Hoặc yêu cầu người cài đặt ban đầu ngắt kết nối không gian làm việc này trước nếu bạn muốn tiếp quản quyền sở hữu.",
+ "messenger.slack.installBlocked.title": "Không gian làm việc đã được kết nối",
+ "messenger.slack.installBlocked.withName": "\"{{workspace}}\" đã được kết nối với LobeHub bởi một người dùng khác.",
+ "messenger.slack.installBlocked.withoutName": "Không gian làm việc Slack này đã được kết nối với LobeHub bởi một người dùng khác.",
+ "messenger.slack.installResult.failed": "Cài đặt Slack thất bại ({{reason}}). Vui lòng thử lại hoặc liên hệ hỗ trợ.",
+ "messenger.slack.installResult.reasons.accessDenied": "ủy quyền đã bị hủy",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Ủy quyền Slack thất bại",
+ "messenger.slack.installResult.reasons.generic": "đã xảy ra lỗi không xác định",
+ "messenger.slack.installResult.reasons.invalidState": "phiên cài đặt đã hết hạn",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack trả về thông tin ứng dụng không đầy đủ",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack trả về các tham số cài đặt không đầy đủ",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack không trả về mã định danh không gian làm việc",
+ "messenger.slack.installResult.reasons.missingToken": "Slack không trả về mã thông báo bot",
+ "messenger.slack.installResult.reasons.persistFailed": "kết nối không gian làm việc không thể được lưu",
+ "messenger.slack.installResult.success": "Không gian làm việc Slack đã được kết nối.",
+ "messenger.subtitle": "Kết nối tài khoản của bạn với bot chính thức của LobeHub một lần. Chọn đại lý nhận tin nhắn, chuyển đổi bất kỳ lúc nào từ đây hoặc từ bot.",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "Ngắt kết nối tài khoản {{platform}} của bạn khỏi LobeHub? Tin nhắn đến sẽ dừng cho đến khi bạn gửi lại /start.",
+ "messenger.unlinkCta": "Ngắt kết nối",
+ "messenger.unlinkFailed": "Không thể ngắt kết nối.",
+ "messenger.unlinkSuccess": "Đã ngắt kết nối.",
+ "messenger.unlinkTitle": "Ngắt kết nối tài khoản",
+ "verify.confirm.conflict.description": "Tài khoản {{platform}} này đã được liên kết với tài khoản LobeHub {{email}}. Đăng nhập vào tài khoản đó để quản lý liên kết, hoặc hủy liên kết ở đó trước khi thử lại.",
+ "verify.confirm.conflict.switchAccount": "Đăng nhập bằng tài khoản khác",
+ "verify.confirm.conflict.title": "Tài khoản này đã được liên kết",
+ "verify.confirm.cta": "Xác nhận liên kết",
+ "verify.confirm.defaultAgent": "Đại lý mặc định",
+ "verify.confirm.defaultAgentHint": "Tin nhắn của bạn sẽ được chuyển đến đây trước tiên. Bạn có thể chuyển đổi bất kỳ lúc nào qua /agents trong bot hoặc từ Cài đặt → Messenger.",
+ "verify.confirm.defaultAgentPlaceholder": "Chọn một đại lý",
+ "verify.confirm.fields.lobeHubAccount": "Tài khoản LobeHub",
+ "verify.confirm.fields.platformAccount": "Tài khoản {{platform}}",
+ "verify.confirm.fields.workspace": "Không gian làm việc",
+ "verify.confirm.noAgents": "Bạn chưa có đại lý nào. Tạo một đại lý trong LobeHub, sau đó quay lại để hoàn tất liên kết.",
+ "verify.confirm.title": "Xác nhận liên kết",
+ "verify.confirm.workspace": "Không gian làm việc: {{workspace}}",
+ "verify.error.alreadyLinkedToOther": "Tài khoản này đã được liên kết với một tài khoản LobeHub khác. Đăng nhập vào tài khoản đó trước.",
+ "verify.error.expired": "Liên kết này đã hết hạn. Vui lòng quay lại bot và gửi lại /start.",
+ "verify.error.generic": "Đã xảy ra lỗi. Vui lòng thử lại.",
+ "verify.error.missingToken": "Liên kết không hợp lệ. Mở trang này từ bot.",
+ "verify.error.title": "Không thể xác nhận liên kết",
+ "verify.labRequired.description": "Messenger hiện là một tính năng Labs. Bật nó trong Cài đặt → Nâng cao → Labs và tải lại trang này.",
+ "verify.labRequired.openSettings": "Mở cài đặt Labs",
+ "verify.labRequired.title": "Bật Messenger để tiếp tục",
+ "verify.signInCta": "Đăng nhập để tiếp tục",
+ "verify.signInRequired": "Vui lòng đăng nhập vào LobeHub để xác nhận liên kết.",
+ "verify.success.description": "Tài khoản của bạn hiện đã được kết nối với {{platform}}. Mở {{platform}} và gửi tin nhắn đầu tiên của bạn.",
+ "verify.success.openBot": "Mở trong {{platform}}",
+ "verify.success.title": "Liên kết thành công!"
+}
diff --git a/locales/vi-VN/models.json b/locales/vi-VN/models.json
index ac178290556..bca01f48c17 100644
--- a/locales/vi-VN/models.json
+++ b/locales/vi-VN/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "Mô hình tạo video hoàn toàn mới với các nâng cấp toàn diện về chuyển động cơ thể, tính hiện thực vật lý và tuân thủ hướng dẫn.",
"MiniMax-M1.description": "Mô hình suy luận nội bộ mới với 80K chuỗi suy nghĩ và đầu vào 1M, đạt hiệu suất tương đương các mô hình hàng đầu toàn cầu.",
"MiniMax-M2-Stable.description": "Được xây dựng cho lập trình hiệu quả và quy trình tác tử, với khả năng đồng thời cao hơn cho mục đích thương mại.",
- "MiniMax-M2.1-Lightning.description": "Khả năng lập trình đa ngôn ngữ mạnh mẽ với suy luận nhanh hơn và hiệu quả hơn.",
"MiniMax-M2.1-highspeed.description": "Khả năng lập trình đa ngôn ngữ mạnh mẽ, trải nghiệm lập trình được nâng cấp toàn diện. Nhanh hơn và hiệu quả hơn.",
"MiniMax-M2.1.description": "Khả năng lập trình đa ngôn ngữ mạnh mẽ, trải nghiệm lập trình được nâng cấp toàn diện",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed: Hiệu suất tương tự như M2.5 với suy luận nhanh hơn.",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku là mô hình nhanh nhất và nhỏ gọn nhất của Anthropic, được thiết kế cho phản hồi gần như tức thì với hiệu suất nhanh và chính xác.",
"claude-3-opus-20240229.description": "Claude 3 Opus là mô hình mạnh mẽ nhất của Anthropic cho các tác vụ phức tạp, xuất sắc về hiệu suất, trí tuệ, lưu loát và hiểu biết.",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet cân bằng giữa trí tuệ và tốc độ cho khối lượng công việc doanh nghiệp, mang lại giá trị cao với chi phí thấp hơn và triển khai quy mô lớn đáng tin cậy.",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 là mô hình Haiku nhanh nhất và thông minh nhất của Anthropic, với tốc độ nhanh như chớp và khả năng tư duy mở rộng.",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 là mô hình Haiku nhanh nhất và thông minh nhất của Anthropic, với tốc độ cực nhanh và khả năng suy luận mở rộng.",
"claude-haiku-4-5.description": "Claude Haiku 4.5 của Anthropic — Haiku thế hệ mới với khả năng lý luận và thị giác nâng cao.",
"claude-haiku-4.5.description": "Claude Haiku 4.5 là mô hình Haiku nhanh nhất và thông minh nhất của Anthropic, với tốc độ vượt trội và khả năng suy luận mở rộng.",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking là biến thể nâng cao có thể hiển thị quá trình suy luận của nó.",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 là mô hình mới nhất và mạnh mẽ nhất của Anthropic dành cho các nhiệm vụ cực kỳ phức tạp, vượt trội về hiệu suất, trí thông minh, sự lưu loát và khả năng hiểu.",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 là mô hình mới nhất và mạnh mẽ nhất của Anthropic dành cho các nhiệm vụ phức tạp cao, vượt trội về hiệu suất, trí tuệ, sự lưu loát và khả năng hiểu biết.",
"claude-opus-4-1.description": "Claude Opus 4.1 của Anthropic — mô hình lý luận cao cấp với khả năng phân tích sâu.",
- "claude-opus-4-20250514.description": "Claude Opus 4 là mô hình mạnh mẽ nhất của Anthropic dành cho các nhiệm vụ cực kỳ phức tạp, vượt trội về hiệu suất, trí thông minh, sự lưu loát và khả năng hiểu.",
+ "claude-opus-4-20250514.description": "Claude Opus 4 là mô hình mạnh mẽ nhất của Anthropic dành cho các nhiệm vụ phức tạp cao, vượt trội về hiệu suất, trí tuệ, sự lưu loát và khả năng hiểu.",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 là mô hình hàng đầu của Anthropic, kết hợp trí tuệ vượt trội với hiệu suất có thể mở rộng, lý tưởng cho các tác vụ phức tạp đòi hỏi phản hồi và suy luận chất lượng cao nhất.",
"claude-opus-4-5.description": "Claude Opus 4.5 của Anthropic — mô hình hàng đầu với khả năng lý luận và mã hóa đỉnh cao.",
"claude-opus-4-6.description": "Claude Opus 4.6 của Anthropic — mô hình hàng đầu với cửa sổ ngữ cảnh 1 triệu và khả năng lý luận nâng cao.",
@@ -335,7 +334,7 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 là mô hình thông minh nhất của Anthropic dành cho việc xây dựng các tác nhân và lập trình.",
"claude-opus-4.6.description": "Claude Opus 4.6 là mô hình thông minh nhất của Anthropic dành cho việc xây dựng các tác nhân và lập trình.",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking có thể tạo phản hồi gần như tức thì hoặc suy luận từng bước mở rộng với quy trình hiển thị.",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 là mô hình thông minh nhất của Anthropic cho đến nay, cung cấp các phản hồi gần như tức thì hoặc tư duy từng bước mở rộng với khả năng kiểm soát chi tiết cho người dùng API.",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 có thể tạo ra các phản hồi gần như tức thì hoặc suy nghĩ từng bước một với quy trình rõ ràng.",
"claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 là mô hình thông minh nhất của Anthropic cho đến nay.",
"claude-sonnet-4-5.description": "Claude Sonnet 4.5 của Anthropic — Sonnet được cải tiến với hiệu suất mã hóa nâng cao.",
"claude-sonnet-4-6.description": "Claude Sonnet 4.6 của Anthropic — Sonnet mới nhất với khả năng mã hóa và sử dụng công cụ vượt trội.",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat (67B) là một mô hình sáng tạo cung cấp khả năng hiểu và tương tác ngôn ngữ sâu sắc.",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 là mô hình suy luận thế hệ mới với khả năng suy luận phức tạp mạnh mẽ và chuỗi suy nghĩ cho các tác vụ phân tích chuyên sâu.",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 là mô hình suy luận thế hệ mới với khả năng suy luận phức tạp mạnh mẽ và tư duy chuỗi.",
- "deepseek-chat.description": "Bí danh tương thích cho chế độ không tư duy của DeepSeek V4 Flash. Dự kiến sẽ ngừng sử dụng — hãy sử dụng DeepSeek V4 Flash thay thế.",
+ "deepseek-chat.description": "Một mô hình mã nguồn mở mới kết hợp khả năng tổng quát và mã hóa. Nó duy trì đối thoại tổng quát của mô hình chat và khả năng mã hóa mạnh mẽ của mô hình coder, với sự điều chỉnh ưu tiên tốt hơn. DeepSeek-V2.5 cũng cải thiện khả năng viết và tuân theo hướng dẫn.",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B là mô hình ngôn ngữ lập trình được huấn luyện trên 2 nghìn tỷ token (87% mã nguồn, 13% văn bản tiếng Trung/Anh). Mô hình này hỗ trợ cửa sổ ngữ cảnh 16K và nhiệm vụ điền vào giữa đoạn mã, cung cấp khả năng hoàn thành mã ở cấp độ dự án và chèn đoạn mã chính xác.",
"deepseek-coder-v2.description": "DeepSeek Coder V2 là mô hình mã nguồn MoE mã nguồn mở với hiệu suất mạnh mẽ trong các tác vụ lập trình, có thể so sánh với GPT-4 Turbo.",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 là mô hình mã nguồn MoE mã nguồn mở với hiệu suất mạnh mẽ trong các tác vụ lập trình, có thể so sánh với GPT-4 Turbo.",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "Phiên bản đầy đủ DeepSeek R1 nhanh với tìm kiếm web thời gian thực, kết hợp khả năng 671B và phản hồi nhanh hơn.",
"deepseek-r1-online.description": "Phiên bản đầy đủ DeepSeek R1 với 671B tham số và tìm kiếm web thời gian thực, mang lại khả năng hiểu và tạo nội dung mạnh mẽ hơn.",
"deepseek-r1.description": "DeepSeek-R1 sử dụng dữ liệu khởi động lạnh trước khi áp dụng học tăng cường và đạt hiệu suất tương đương OpenAI-o1 trong các tác vụ toán học, lập trình và suy luận.",
- "deepseek-reasoner.description": "Bí danh tương thích cho chế độ tư duy của DeepSeek V4 Flash. Dự kiến sẽ ngừng sử dụng — hãy sử dụng DeepSeek V4 Flash thay thế.",
+ "deepseek-reasoner.description": "Tên thay thế tương thích cho chế độ suy nghĩ nhanh DeepSeek V4. Dự kiến sẽ bị loại bỏ — hãy sử dụng deepseek-v4-flash thay thế.",
"deepseek-v2.description": "DeepSeek V2 là mô hình MoE hiệu quả cho xử lý tiết kiệm chi phí.",
"deepseek-v2:236b.description": "DeepSeek V2 236B là mô hình tập trung vào mã nguồn của DeepSeek với khả năng tạo mã mạnh mẽ.",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 là mô hình MoE với 671B tham số, nổi bật về lập trình, khả năng kỹ thuật, hiểu ngữ cảnh và xử lý văn bản dài.",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 là mô hình tạo hình ảnh từ ByteDance Seed, hỗ trợ đầu vào văn bản và hình ảnh với khả năng tạo hình ảnh chất lượng cao, dễ kiểm soát. Mô hình tạo hình ảnh từ văn bản gợi ý.",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 là mô hình hình ảnh đa phương thức mới nhất của ByteDance, tích hợp khả năng tạo hình ảnh từ văn bản, chỉnh sửa hình ảnh và tạo hình ảnh hàng loạt, đồng thời kết hợp khả năng suy luận và kiến thức thông thường. So với phiên bản 4.0 trước đó, nó mang lại chất lượng tạo hình ảnh được cải thiện đáng kể, với sự nhất quán chỉnh sửa tốt hơn và khả năng hợp nhất nhiều hình ảnh. Nó cung cấp khả năng kiểm soát chi tiết hình ảnh chính xác hơn, tạo ra văn bản nhỏ và khuôn mặt nhỏ một cách tự nhiên hơn, và đạt được bố cục và màu sắc hài hòa hơn, nâng cao tính thẩm mỹ tổng thể.",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite là mô hình tạo hình ảnh mới nhất của ByteDance. Lần đầu tiên, nó tích hợp khả năng truy xuất trực tuyến, cho phép kết hợp thông tin web theo thời gian thực và nâng cao tính kịp thời của hình ảnh được tạo. Trí tuệ của mô hình cũng được nâng cấp, cho phép diễn giải chính xác các hướng dẫn phức tạp và nội dung hình ảnh. Ngoài ra, nó cung cấp phạm vi kiến thức toàn cầu được cải thiện, tính nhất quán tham chiếu và chất lượng tạo hình ảnh trong các tình huống chuyên nghiệp, đáp ứng tốt hơn nhu cầu sáng tạo hình ảnh ở cấp độ doanh nghiệp.",
- "dreamina-seedance-2-0-260128.description": "Seedance 2.0 của ByteDance là mô hình tạo video mạnh mẽ nhất, hỗ trợ tạo video tham chiếu đa phương thức, chỉnh sửa video, mở rộng video, chuyển văn bản thành video và chuyển hình ảnh thành video với âm thanh đồng bộ.",
- "dreamina-seedance-2-0-fast-260128.description": "Seedance 2.0 Fast của ByteDance cung cấp các khả năng tương tự như Seedance 2.0 với tốc độ tạo nhanh hơn và giá cả cạnh tranh hơn.",
"emohaa.description": "Emohaa là mô hình hỗ trợ sức khỏe tinh thần với khả năng tư vấn chuyên nghiệp, giúp người dùng hiểu rõ các vấn đề cảm xúc.",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B là mô hình nhẹ mã nguồn mở, phù hợp để triển khai cục bộ và tùy chỉnh.",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview là mô hình xem trước với ngữ cảnh 8K để đánh giá ERNIE 4.5.",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K là mô hình tư duy nhanh với ngữ cảnh 32K dành cho lý luận phức tạp và trò chuyện nhiều lượt.",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview là bản xem trước mô hình tư duy để đánh giá và thử nghiệm.",
"ernie-x1.1.description": "ERNIE X1.1 là mô hình suy nghĩ thử nghiệm dành cho đánh giá và kiểm tra.",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5, được xây dựng bởi đội ngũ ByteDance Seed, hỗ trợ chỉnh sửa và sáng tạo đa hình ảnh. Các tính năng bao gồm duy trì tính nhất quán chủ đề, tuân theo hướng dẫn chính xác, hiểu logic không gian, biểu đạt thẩm mỹ, bố cục poster và thiết kế logo với khả năng kết xuất văn bản-hình ảnh chính xác cao.",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0, được xây dựng bởi ByteDance Seed, hỗ trợ đầu vào văn bản và hình ảnh để tạo hình ảnh chất lượng cao, có thể kiểm soát cao từ các gợi ý.",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 là mô hình tạo hình ảnh từ ByteDance Seed, hỗ trợ đầu vào văn bản và hình ảnh với khả năng tạo hình ảnh chất lượng cao, có thể kiểm soát tốt. Nó tạo ra hình ảnh từ các gợi ý văn bản.",
"fal-ai/flux-kontext/dev.description": "Mô hình FLUX.1 tập trung vào chỉnh sửa hình ảnh, hỗ trợ đầu vào văn bản và hình ảnh.",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] chấp nhận đầu vào là văn bản và hình ảnh tham chiếu, cho phép chỉnh sửa cục bộ chính xác và biến đổi toàn cảnh phức tạp.",
"fal-ai/flux/krea.description": "Flux Krea [dev] là mô hình tạo hình ảnh với thiên hướng thẩm mỹ hướng đến hình ảnh chân thực và tự nhiên hơn.",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "Mô hình tạo hình ảnh đa phương thức mạnh mẽ bản địa.",
"fal-ai/imagen4/preview.description": "Mô hình tạo hình ảnh chất lượng cao từ Google.",
"fal-ai/nano-banana.description": "Nano Banana là mô hình đa phương thức bản địa mới nhất, nhanh nhất và hiệu quả nhất của Google, cho phép tạo và chỉnh sửa hình ảnh thông qua hội thoại.",
- "fal-ai/qwen-image-edit.description": "Mô hình chỉnh sửa hình ảnh chuyên nghiệp từ đội ngũ Qwen, hỗ trợ chỉnh sửa ngữ nghĩa và diện mạo, chỉnh sửa văn bản tiếng Trung/Anh chính xác, chuyển đổi phong cách, xoay và nhiều hơn nữa.",
- "fal-ai/qwen-image.description": "Mô hình tạo hình ảnh mạnh mẽ từ đội ngũ Qwen với khả năng kết xuất văn bản tiếng Trung mạnh mẽ và các phong cách hình ảnh đa dạng.",
+ "fal-ai/qwen-image-edit.description": "Một mô hình chỉnh sửa hình ảnh chuyên nghiệp từ đội ngũ Qwen, hỗ trợ chỉnh sửa ngữ nghĩa và hình thức, chỉnh sửa chính xác văn bản tiếng Trung và tiếng Anh, và cho phép các chỉnh sửa chất lượng cao như chuyển đổi phong cách và xoay đối tượng.",
+ "fal-ai/qwen-image.description": "Một mô hình tạo hình ảnh mạnh mẽ từ đội ngũ Qwen với khả năng hiển thị văn bản tiếng Trung ấn tượng và các phong cách hình ảnh đa dạng.",
"flux-1-schnell.description": "Mô hình chuyển văn bản thành hình ảnh với 12 tỷ tham số từ Black Forest Labs, sử dụng phương pháp khuếch tán đối kháng tiềm ẩn để tạo hình ảnh chất lượng cao chỉ trong 1–4 bước. Mô hình cạnh tranh với các lựa chọn đóng và được phát hành theo giấy phép Apache-2.0 cho mục đích cá nhân, nghiên cứu và thương mại.",
"flux-dev.description": "Mô hình tạo ảnh R&D mã nguồn mở, tối ưu hiệu quả cho nghiên cứu sáng tạo phi thương mại.",
"flux-kontext-max.description": "Tạo và chỉnh sửa hình ảnh theo ngữ cảnh tiên tiến, kết hợp văn bản và hình ảnh để tạo ra kết quả chính xác và mạch lạc.",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash là mô hình thông minh nhất được xây dựng để tối ưu tốc độ, kết hợp trí tuệ tiên tiến với khả năng tìm kiếm chính xác.",
"gemini-3-flash.description": "Gemini 3 Flash của Google — mô hình siêu nhanh với hỗ trợ đầu vào đa phương thức.",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image (Nano Banana Pro) là mô hình tạo hình ảnh của Google, cũng hỗ trợ đối thoại đa phương thức.",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) là mô hình tạo hình ảnh của Google và cũng hỗ trợ trò chuyện đa phương thức.",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image (Nano Banana Pro) là mô hình tạo hình ảnh của Google và cũng hỗ trợ chat đa phương thức.",
"gemini-3-pro-preview.description": "Gemini 3 Pro là mô hình mạnh mẽ nhất của Google, kết hợp khả năng mã hóa cảm xúc và suy luận tiên tiến, mang đến hình ảnh phong phú và tương tác sâu sắc.",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) là mô hình tạo hình ảnh bản địa nhanh nhất của Google với hỗ trợ suy nghĩ, tạo hình ảnh đối thoại và chỉnh sửa.",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) cung cấp chất lượng hình ảnh cấp Pro với tốc độ Flash và hỗ trợ trò chuyện đa phương thức.",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image (Nano Banana 2) là mô hình tạo hình ảnh bản địa nhanh nhất của Google với hỗ trợ suy nghĩ, tạo hình ảnh và chỉnh sửa trong hội thoại.",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview là mô hình đa phương thức tiết kiệm chi phí nhất của Google, được tối ưu hóa cho các nhiệm vụ tác nhân khối lượng lớn, dịch thuật và xử lý dữ liệu.",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview cải tiến Gemini 3 Pro với khả năng suy luận nâng cao và bổ sung hỗ trợ mức suy nghĩ trung bình.",
"gemini-3.1-pro.description": "Gemini 3.1 Pro của Google — mô hình đa phương thức cao cấp với cửa sổ ngữ cảnh 1 triệu.",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "Chúng tôi rất vui mừng ra mắt Grok 4 Fast, bước tiến mới nhất trong các mô hình suy luận tiết kiệm chi phí.",
"grok-4.20-0309-non-reasoning.description": "Biến thể không lý luận dành cho các trường hợp sử dụng đơn giản.",
"grok-4.20-0309-reasoning.description": "Mô hình thông minh, siêu nhanh, lý luận trước khi phản hồi.",
- "grok-4.20-beta-0309-non-reasoning.description": "Biến thể không tư duy dành cho các trường hợp sử dụng đơn giản",
- "grok-4.20-beta-0309-reasoning.description": "Mô hình thông minh, cực nhanh, có khả năng lý luận trước khi phản hồi",
"grok-4.20-multi-agent-0309.description": "Một nhóm gồm 4 hoặc 16 tác nhân, xuất sắc trong các trường hợp nghiên cứu. Hiện không hỗ trợ công cụ phía khách hàng. Chỉ hỗ trợ công cụ phía máy chủ xAI (ví dụ: X Search, công cụ tìm kiếm web) và công cụ MCP từ xa.",
"grok-4.3.description": "Mô hình ngôn ngữ lớn tìm kiếm sự thật nhất trên thế giới",
- "grok-4.description": "Mô hình hàng đầu mới nhất và mạnh mẽ nhất của chúng tôi, vượt trội trong NLP, toán học và lý luận — một lựa chọn toàn diện lý tưởng.",
+ "grok-4.description": "Mô hình Grok hàng đầu mới nhất với hiệu suất vượt trội trong ngôn ngữ, toán học và suy luận — một mô hình toàn diện thực sự. Hiện tại liên kết với grok-4-0709; do nguồn lực hạn chế, giá tạm thời cao hơn 10% so với giá chính thức và dự kiến sẽ trở lại mức giá chính thức sau này.",
"grok-code-fast-1.description": "Chúng tôi rất vui mừng ra mắt grok-code-fast-1, một mô hình suy luận nhanh và tiết kiệm chi phí, nổi bật trong lập trình tác vụ tự động.",
"grok-imagine-image-pro.description": "Tạo hình ảnh từ các gợi ý văn bản, chỉnh sửa hình ảnh hiện có bằng ngôn ngữ tự nhiên hoặc tinh chỉnh hình ảnh thông qua hội thoại nhiều lượt.",
"grok-imagine-image.description": "Tạo hình ảnh từ các gợi ý văn bản, chỉnh sửa hình ảnh hiện có bằng ngôn ngữ tự nhiên hoặc tinh chỉnh hình ảnh thông qua hội thoại nhiều lượt.",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ là mô hình lập luận trong họ Qwen. So với các mô hình điều chỉnh theo hướng dẫn tiêu chuẩn, nó mang lại khả năng tư duy và lập luận giúp cải thiện đáng kể hiệu suất các tác vụ phía sau, đặc biệt là các vấn đề khó. QwQ-32B là mô hình lập luận tầm trung có thể cạnh tranh với các mô hình hàng đầu như DeepSeek-R1 và o1-mini.",
"qwq_32b.description": "Mô hình lập luận tầm trung trong họ Qwen. So với các mô hình điều chỉnh theo hướng dẫn tiêu chuẩn, khả năng tư duy và lập luận của QwQ giúp cải thiện đáng kể hiệu suất các tác vụ phía sau, đặc biệt là các vấn đề khó.",
"r1-1776.description": "R1-1776 là biến thể hậu huấn luyện của DeepSeek R1 được thiết kế để cung cấp thông tin thực tế không kiểm duyệt, không thiên lệch.",
- "seedance-1-5-pro-251215.description": "Seedance 1.5 Pro của ByteDance hỗ trợ chuyển văn bản thành video, chuyển hình ảnh thành video (khung đầu tiên, khung đầu tiên + cuối cùng) và tạo âm thanh đồng bộ với hình ảnh.",
- "seedream-5-0-260128.description": "ByteDance-Seedream-5.0-lite của BytePlus có tính năng tạo nội dung tăng cường tìm kiếm trên web để cung cấp thông tin thời gian thực, cải thiện diễn giải gợi ý phức tạp và tăng cường tính nhất quán tham chiếu cho sáng tạo hình ảnh chuyên nghiệp.",
"solar-mini-ja.description": "Solar Mini (Ja) mở rộng Solar Mini với trọng tâm vào tiếng Nhật trong khi vẫn duy trì hiệu suất mạnh mẽ và hiệu quả với tiếng Anh và tiếng Hàn.",
"solar-mini.description": "Solar Mini là mô hình ngôn ngữ nhỏ gọn vượt trội hơn GPT-3.5, với khả năng đa ngôn ngữ mạnh mẽ hỗ trợ tiếng Anh và tiếng Hàn, mang lại giải pháp hiệu quả với dung lượng nhỏ.",
"solar-pro.description": "Solar Pro là mô hình ngôn ngữ thông minh cao từ Upstage, tập trung vào tuân thủ hướng dẫn trên một GPU duy nhất, với điểm IFEval trên 80. Hiện hỗ trợ tiếng Anh; bản phát hành đầy đủ dự kiến vào tháng 11 năm 2024 với hỗ trợ ngôn ngữ mở rộng và ngữ cảnh dài hơn.",
diff --git a/locales/vi-VN/providers.json b/locales/vi-VN/providers.json
index 13090b1ef52..f02a27c5418 100644
--- a/locales/vi-VN/providers.json
+++ b/locales/vi-VN/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Thành lập năm 2020, Jina AI là công ty hàng đầu về AI tìm kiếm. Bộ công cụ tìm kiếm của họ bao gồm mô hình vector, bộ xếp hạng lại và mô hình ngôn ngữ nhỏ để xây dựng ứng dụng tìm kiếm sinh và đa phương thức chất lượng cao.",
"kimicodingplan.description": "Kimi Code từ Moonshot AI cung cấp quyền truy cập vào các mô hình Kimi bao gồm K2.5 cho các nhiệm vụ lập trình.",
"lmstudio.description": "LM Studio là ứng dụng máy tính để phát triển và thử nghiệm LLM ngay trên máy của bạn.",
- "lobehub.description": "LobeHub Cloud sử dụng API chính thức để truy cập các mô hình AI và đo lường mức sử dụng bằng Tín dụng gắn liền với các token của mô hình.",
"longcat.description": "LongCat là một loạt các mô hình AI tạo sinh lớn được phát triển độc lập bởi Meituan. Nó được thiết kế để nâng cao năng suất nội bộ của doanh nghiệp và thúc đẩy các ứng dụng sáng tạo thông qua kiến trúc tính toán hiệu quả và khả năng đa phương thức mạnh mẽ.",
"minimax.description": "Thành lập năm 2021, MiniMax xây dựng AI đa năng với các mô hình nền tảng đa phương thức, bao gồm mô hình văn bản MoE hàng nghìn tỷ tham số, mô hình giọng nói và thị giác, cùng các ứng dụng như Hailuo AI.",
"minimaxcodingplan.description": "MiniMax Token Plan cung cấp quyền truy cập vào các mô hình MiniMax bao gồm M2.7 cho các nhiệm vụ lập trình thông qua gói đăng ký cố định.",
diff --git a/locales/vi-VN/setting.json b/locales/vi-VN/setting.json
index 416c8414bd6..b8466121a6b 100644
--- a/locales/vi-VN/setting.json
+++ b/locales/vi-VN/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "Điền Thủ công",
"tab.manualFill.desc": "Cấu hình thủ công một kỹ năng MCP tùy chỉnh",
"tab.memory": "Bộ Nhớ",
+ "tab.messenger": "Tin nhắn",
"tab.notification": "Thông Báo",
"tab.profile": "Tài Khoản Của Tôi",
"tab.provider": "Nhà Cung Cấp AI",
diff --git a/locales/zh-CN/labs.json b/locales/zh-CN/labs.json
index 45716338e53..45d140b7764 100644
--- a/locales/zh-CN/labs.json
+++ b/locales/zh-CN/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "群聊(多代理)",
"features.inputMarkdown.desc": "在输入区域实时渲染 Markdown(粗体、代码块、表格等)",
"features.inputMarkdown.title": "输入框 Markdown 渲染",
+ "features.messenger.desc": "通过共享的 LobeHub 机器人,从 Telegram(以及其他消息应用)与您的代理进行对话。在设置中添加一个消息应用选项卡,用于绑定您的账户并选择接收消息的代理。",
+ "features.messenger.title": "消息应用",
"title": "实验室"
}
diff --git a/locales/zh-CN/messenger.json b/locales/zh-CN/messenger.json
new file mode 100644
index 00000000000..d14634802d0
--- /dev/null
+++ b/locales/zh-CN/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "当前激活 Agent",
+ "messenger.activeAgentPlaceholder": "请选择 Agent",
+ "messenger.detail.addServer": "添加服务器",
+ "messenger.detail.addWorkspace": "添加工作区",
+ "messenger.detail.connections.connected": "已连接",
+ "messenger.detail.connections.empty": "在机器人中发送 /start 来绑定你的账号。",
+ "messenger.detail.connections.linkHint": "工作区已安装。打开 Slack 私信机器人完成个人账号绑定。",
+ "messenger.detail.connections.pending": "待绑定",
+ "messenger.detail.connections.serverLabel": "服务器",
+ "messenger.detail.connections.title": "连接",
+ "messenger.detail.connections.userLabel": "用户",
+ "messenger.detail.connections.workspaceLabel": "工作区",
+ "messenger.detail.disconnect": "断开",
+ "messenger.discord.connectModal.description": "把 LobeHub 机器人添加到你管理的 Discord 服务器。",
+ "messenger.discord.connectModal.inviteButton": "添加到 Discord 服务器",
+ "messenger.discord.connectModal.notConfigured": "Discord 暂不可用,请稍后再试。",
+ "messenger.discord.connectModal.title": "把机器人添加到你的服务器",
+ "messenger.discord.connections.disconnectConfirm": "要从审计列表中移除这个服务器吗?机器人会继续留在服务器中,直到服务器管理员将其移除。",
+ "messenger.discord.connections.disconnectFailed": "移除服务器失败。",
+ "messenger.discord.connections.disconnectSuccess": "服务器已移除。",
+ "messenger.discord.connections.disconnectTitle": "移除服务器",
+ "messenger.discord.userPending.cta": "在 Discord 中打开",
+ "messenger.discord.userPending.hint": "在 Discord 中打开机器人并发送任意消息,完成账号绑定。",
+ "messenger.discord.userPending.name": "尚未绑定",
+ "messenger.error.agentNotFound": "未找到代理。",
+ "messenger.error.disconnectNotAllowed": "您只能断开您启动的安装。",
+ "messenger.error.installationNotFound": "未找到安装。",
+ "messenger.error.linkRequired": "在更改此连接之前,请打开机器人并发送 /start。",
+ "messenger.error.pickDefaultAgent": "在确认之前请选择一个默认代理。",
+ "messenger.error.platformNotConfigured": "此消息平台目前不可用。请稍后再试。",
+ "messenger.linkCta": "连接",
+ "messenger.linkModal.continueIn": "继续在 {{platform}} 中设置",
+ "messenger.linkModal.instructions": "打开机器人,发送 /start,然后点击「绑定账号」连接你的 LobeHub 账号。",
+ "messenger.linkModal.notConfigured": "此连接暂不可用,请稍后再试。",
+ "messenger.linkModal.openCta": "在 {{platform}} 中打开",
+ "messenger.linkModal.scanHint": "或用手机扫码打开 {{platform}}。",
+ "messenger.linkModal.title": "连接 Messenger",
+ "messenger.list.discord.description": "在任意 Discord 服务器中通过私信 LobeHub 机器人与你的 Agent 对话。",
+ "messenger.list.slack.description": "在任意 Slack 工作区中通过私信或 @LobeHub 与你的 Agent 对话。",
+ "messenger.list.telegram.description": "在 Telegram 中与你的 LobeHub Agent 对话,随时切换接收消息的 Agent。",
+ "messenger.noPlatformsConfigured": "暂无可用平台,敬请期待。",
+ "messenger.setActiveFailed": "设置失败。",
+ "messenger.setActiveSuccess": "已更新当前激活 Agent。",
+ "messenger.slack.connectModal.continueButton": "继续前往 Slack",
+ "messenger.slack.connectModal.description": "你将被重定向到 Slack 以授权 LobeHub 工作区安装。",
+ "messenger.slack.connectModal.notConfigured": "Slack 暂不可用,请稍后再试。",
+ "messenger.slack.connectModal.title": "继续在 Slack 中设置",
+ "messenger.slack.connections.disconnectConfirm": "确定要把 LobeHub bot 从这个 Slack 工作区断开吗?现有用户绑定将暂停,直到重新安装。",
+ "messenger.slack.connections.disconnectFailed": "断开失败。",
+ "messenger.slack.connections.disconnectSuccess": "工作区已断开。",
+ "messenger.slack.connections.disconnectTitle": "断开工作区",
+ "messenger.slack.installBlocked.dismiss": "我知道了",
+ "messenger.slack.installBlocked.suggestion": "在 Slack 中私信 @LobeHub 即可绑定个人账号——不需要再次安装。如果想接管该工作区,请让原安装人先断开连接。",
+ "messenger.slack.installBlocked.title": "工作区已被连接",
+ "messenger.slack.installBlocked.withName": "「{{workspace}}」已被另一位 LobeHub 用户连接到 LobeHub。",
+ "messenger.slack.installBlocked.withoutName": "该 Slack 工作区已被另一位 LobeHub 用户连接到 LobeHub。",
+ "messenger.slack.installResult.failed": "Slack 安装失败({{reason}})。请重试或联系支持。",
+ "messenger.slack.installResult.reasons.accessDenied": "授权已取消",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack 授权失败",
+ "messenger.slack.installResult.reasons.generic": "发生未知错误",
+ "messenger.slack.installResult.reasons.invalidState": "安装会话已过期",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack 返回的应用信息不完整",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack 返回的安装参数不完整",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack 未返回工作区标识符",
+ "messenger.slack.installResult.reasons.missingToken": "Slack 未返回机器人令牌",
+ "messenger.slack.installResult.reasons.persistFailed": "无法保存工作区连接",
+ "messenger.slack.installResult.success": "Slack 工作区已连接。",
+ "messenger.subtitle": "将你的账号连接到官方 LobeHub 机器人。选择由哪个 Agent 接收消息,可随时从此处或机器人中切换。",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "确定要把你的 {{platform}} 账号从 LobeHub 断开吗?在你重新 /start 之前,传入消息将停止。",
+ "messenger.unlinkCta": "断开",
+ "messenger.unlinkFailed": "断开失败。",
+ "messenger.unlinkSuccess": "已断开。",
+ "messenger.unlinkTitle": "断开账号",
+ "verify.confirm.conflict.description": "此 {{platform}} 账号已绑定到 LobeHub 账号 {{email}}。请登录该账号管理绑定,或先在该账号下解绑后再试。",
+ "verify.confirm.conflict.switchAccount": "切换其他账号登录",
+ "verify.confirm.conflict.title": "该账号已被绑定",
+ "verify.confirm.cta": "确认绑定",
+ "verify.confirm.defaultAgent": "默认 Agent",
+ "verify.confirm.defaultAgentHint": "你的消息将首先路由到这里。你可以随时在机器人中通过 /agents 或在「设置 → Messenger」中切换。",
+ "verify.confirm.defaultAgentPlaceholder": "请选择 Agent",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub 账号",
+ "verify.confirm.fields.platformAccount": "{{platform}} 账号",
+ "verify.confirm.fields.workspace": "工作区",
+ "verify.confirm.noAgents": "你还没有 Agent。请先在 LobeHub 中创建一个,再回来完成绑定。",
+ "verify.confirm.title": "确认绑定",
+ "verify.confirm.workspace": "工作区:{{workspace}}",
+ "verify.error.alreadyLinkedToOther": "该账号已绑定到另一个 LobeHub 账号。请先登录到那个账号。",
+ "verify.error.expired": "此链接已过期。请返回机器人并重新发送 /start。",
+ "verify.error.generic": "出错了。请重试。",
+ "verify.error.missingToken": "无效链接。请从机器人中打开此页面。",
+ "verify.error.title": "无法确认绑定",
+ "verify.labRequired.description": "Messenger 目前为 Labs 功能。请在「设置 → 高级 → Labs」中启用并重新加载此页面。",
+ "verify.labRequired.openSettings": "打开 Labs 设置",
+ "verify.labRequired.title": "启用 Messenger 以继续",
+ "verify.signInCta": "登录以继续",
+ "verify.signInRequired": "请登录 LobeHub 以确认绑定。",
+ "verify.success.description": "你的账号已连接到 {{platform}}。打开 {{platform}} 并发送你的第一条消息。",
+ "verify.success.openBot": "在 {{platform}} 中打开",
+ "verify.success.title": "绑定成功!"
+}
diff --git a/locales/zh-CN/models.json b/locales/zh-CN/models.json
index 61339e82959..2055ad7ffad 100644
--- a/locales/zh-CN/models.json
+++ b/locales/zh-CN/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "全新视频生成模型,在身体动作、物理真实感和指令遵循性方面全面升级。",
"MiniMax-M1.description": "一款全新自研推理模型,支持 80K 思维链和 100 万输入,性能媲美全球顶尖模型。",
"MiniMax-M2-Stable.description": "专为高效编程与智能体工作流打造,具备更高并发能力,适用于商业场景。",
- "MiniMax-M2.1-Lightning.description": "强大的多语言编程能力,推理速度更快、更高效。",
"MiniMax-M2.1-highspeed.description": "强大的多语言编程能力,全面升级的编程体验。更快、更高效。",
"MiniMax-M2.1.description": "MiniMax-M2.1 是 MiniMax 推出的旗舰开源大模型,专注于解决复杂的现实世界任务。其核心优势在于多语言编程能力以及作为智能体解决复杂任务的能力。",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 Highspeed:与M2.5性能相同,但推理速度更快。",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku 是 Anthropic 推出的最快、最紧凑的模型,专为近乎即时响应而设计,具备快速且准确的性能。",
"claude-3-opus-20240229.description": "Claude 3 Opus 是 Anthropic 最强大的模型,适用于高度复杂的任务,在性能、智能、流畅性和理解力方面表现卓越。",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet 在智能与速度之间取得平衡,适用于企业级工作负载,提供高效能与低成本的可靠部署。",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 是 Anthropic 最快、最智能的 Haiku 模型,具有闪电般的速度和扩展思维能力。",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 是 Anthropic 最快、最智能的 Haiku 模型,具有闪电般的速度和扩展的推理能力。",
"claude-haiku-4-5.description": "Anthropic 的 Claude Haiku 4.5 —— 新一代 Haiku,具备更强推理与视觉能力。",
"claude-haiku-4.5.description": "Claude Haiku 4.5 是 Anthropic 最快速、最智能的 Haiku 模型,具有闪电般的速度和扩展的推理能力。",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking 是一款高级变体,能够展示其推理过程。",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 是 Anthropic 最新且最强大的模型,适用于高度复杂的任务,在性能、智能、流畅性和理解力方面表现卓越。",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 是 Anthropic 最新且最强大的模型,专为处理高度复杂的任务而设计,表现卓越,智能、流畅性和理解力均出色。",
"claude-opus-4-1.description": "Anthropic 的 Claude Opus 4.1 —— 高端推理模型,具备深度分析能力。",
- "claude-opus-4-20250514.description": "Claude Opus 4 是 Anthropic 最强大的模型,适用于高度复杂的任务,在性能、智能、流畅性和理解力方面表现卓越。",
+ "claude-opus-4-20250514.description": "Claude Opus 4 是 Anthropic 最强大的模型,专为处理高度复杂的任务而设计,表现卓越,智能、流畅性和理解力均出色。",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 是 Anthropic 的旗舰模型,结合卓越智能与可扩展性能,适用于需要最高质量响应与推理的复杂任务。",
"claude-opus-4-5.description": "Anthropic 的 Claude Opus 4.5 —— 旗舰模型,具备顶级推理与编码能力。",
"claude-opus-4-6.description": "Anthropic 的 Claude Opus 4.6 —— 具备 100 万上下文窗口的旗舰模型,拥有先进推理能力。",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 是 Anthropic 最智能的模型,用于构建代理和编程。",
"claude-opus-4.6.description": "Claude Opus 4.6 是 Anthropic 最智能的模型,用于构建代理和编程。",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking 可生成近乎即时的响应或可视化的逐步推理过程。",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 是 Anthropic 迄今为止最智能的模型,为 API 用户提供近乎即时的响应或逐步扩展的思维控制。",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 是 Anthropic 迄今为止最智能的模型。",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 能够生成近乎即时的响应或通过可见的过程进行扩展的逐步思考。",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 是迄今为止 Anthropic 最智能的模型。",
"claude-sonnet-4-5.description": "Anthropic 的 Claude Sonnet 4.5 —— 性能增强的新一代 Sonnet,具备更强编码能力。",
"claude-sonnet-4-6.description": "Anthropic 的 Claude Sonnet 4.6 —— 最新 Sonnet 模型,在编码与工具使用方面表现更强。",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 是迄今为止 Anthropic 最智能的模型。",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat(67B)是一款创新模型,具备深度语言理解与交互能力。",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 是下一代推理模型,具备更强的复杂推理与链式思维能力,适用于深度分析任务。",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2是下一代推理模型,具备更强的复杂推理和链式思维能力。",
- "deepseek-chat.description": "DeepSeek V4 Flash 非推理模式的兼容别名。计划弃用——请改用 DeepSeek V4 Flash。",
+ "deepseek-chat.description": "一个结合通用能力和代码能力的开源新模型。它保留了聊天模型的通用对话能力和编码模型的强大编程能力,同时具有更好的偏好对齐。DeepSeek-V2.5 还改进了写作和指令遵循能力。",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B 是一款代码语言模型,训练于 2T 数据(87% 代码,13% 中英文文本)。支持 16K 上下文窗口与中间填充任务,提供项目级代码补全与片段填充。",
"deepseek-coder-v2.description": "DeepSeek Coder V2 是一款开源 MoE 编程模型,在编程任务中表现强劲,可媲美 GPT-4 Turbo。",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 是一款开源 MoE 编程模型,在编程任务中表现强劲,可媲美 GPT-4 Turbo。",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 快速全量版本,支持实时网页搜索,结合 671B 规模能力与更快响应。",
"deepseek-r1-online.description": "DeepSeek R1 全量版本,具备 671B 参数与实时网页搜索,提供更强理解与生成能力。",
"deepseek-r1.description": "DeepSeek-R1 在强化学习前使用冷启动数据,在数学、编程和推理任务中表现可与 OpenAI-o1 相媲美。",
- "deepseek-reasoner.description": "DeepSeek V4 Flash 推理模式的兼容别名。计划弃用——请改用 DeepSeek V4 Flash。",
+ "deepseek-reasoner.description": "DeepSeek V4 快速思考模式的兼容别名。计划弃用——请使用 deepseek-v4-flash。",
"deepseek-v2.description": "DeepSeek V2 是一款高效的 MoE 模型,适用于成本敏感型处理任务。",
"deepseek-v2:236b.description": "DeepSeek V2 236B 是 DeepSeek 推出的代码专用模型,具备强大代码生成能力。",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 是一款拥有 671B 参数的 MoE 模型,在编程与技术能力、上下文理解和长文本处理方面表现突出。",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 是字节跳动 Seed 推出的图像生成模型,支持文本与图像输入,具备高度可控的高质量图像生成能力。可根据文本提示生成图像。",
"doubao-seedream-4-5-251128.description": "Seedream 4.5是字节跳动最新的多模态图像模型,集成了文本生成图像、图像生成图像和批量图像生成功能,同时具备常识和推理能力。与之前的4.0版本相比,生成质量显著提升,编辑一致性和多图融合效果更好。它对视觉细节的控制更加精确,能够更自然地生成小文字和小面部,并实现更和谐的布局和色彩,提升整体美感。",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite是字节跳动最新的图像生成模型。首次集成在线检索功能,能够结合实时网络信息,提升生成图像的时效性。模型智能性也得到升级,能够精确解析复杂指令和视觉内容。此外,它在专业场景中的全球知识覆盖、参考一致性和生成质量方面均有提升,更好地满足企业级视觉创作需求。",
- "dreamina-seedance-2-0-260128.description": "字节跳动推出的 Seedance 2.0 是最强大的视频生成模型,支持多模态参考视频生成、视频编辑、视频扩展、文本生成视频以及图像生成视频,并同步音频。",
- "dreamina-seedance-2-0-fast-260128.description": "字节跳动推出的 Seedance 2.0 Fast 提供与 Seedance 2.0 相同的功能,但生成速度更快,价格更具竞争力。",
"emohaa.description": "Emohaa 是一款心理健康模型,具备专业咨询能力,帮助用户理解情绪问题。",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B 是一款开源轻量级模型,适用于本地和定制化部署。",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview 是一款用于评估 ERNIE 4.5 的 8K 上下文预览模型。",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K 是一款快速思考模型,具备 32K 上下文能力,适合复杂推理与多轮对话。",
"ernie-x1.1-preview.description": "ERNIE X1.1 Preview 是一款用于评估与测试的思考模型预览版。",
"ernie-x1.1.description": "ERNIE X1.1是一个用于评估和测试的思维模型预览版。",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5 由字节跳动 Seed 团队构建,支持多图像编辑与合成。功能包括增强的主体一致性、精确的指令遵循、空间逻辑理解、美学表达、海报布局和高精度文本图像渲染的标志设计。",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 由字节跳动 Seed 团队构建,支持文本和图像输入,可根据提示生成高度可控的高质量图像。",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 是字节跳动 Seed 的图像生成模型,支持文本和图像输入,能够生成高度可控、高质量的图像。它可以根据文本提示生成图像。",
"fal-ai/flux-kontext/dev.description": "FLUX.1 模型专注于图像编辑,支持文本与图像输入。",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] 接受文本与参考图像输入,支持局部精准编辑与复杂全局场景变换。",
"fal-ai/flux/krea.description": "Flux Krea [dev] 是一款图像生成模型,偏好更真实自然的美学风格。",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "一款强大的原生多模态图像生成模型。",
"fal-ai/imagen4/preview.description": "来自 Google 的高质量图像生成模型。",
"fal-ai/nano-banana.description": "Nano Banana 是 Google 最新、最快、最高效的原生多模态模型,支持通过对话生成与编辑图像。",
- "fal-ai/qwen-image-edit.description": "Qwen 团队推出的专业图像编辑模型,支持语义和外观编辑、精确的中英文文本编辑、风格迁移、旋转等功能。",
- "fal-ai/qwen-image.description": "Qwen 团队推出的强大图像生成模型,具有强大的中文文本渲染能力和多样化的视觉风格。",
+ "fal-ai/qwen-image-edit.description": "Qwen 团队的专业图像编辑模型,支持语义和外观编辑,精准编辑中英文文本,并实现高质量的编辑效果,如风格转换和物体旋转。",
+ "fal-ai/qwen-image.description": "Qwen 团队的强大图像生成模型,具有令人印象深刻的中文文本渲染能力和多样化的视觉风格。",
"flux-1-schnell.description": "来自 Black Forest Labs 的 120 亿参数文本转图像模型,采用潜在对抗扩散蒸馏技术,可在 1-4 步内生成高质量图像。性能媲美闭源模型,采用 Apache-2.0 许可,适用于个人、研究与商业用途。",
"flux-dev.description": "开源研发图像生成模型,专为非商业创新研究进行高效优化。",
"flux-kontext-max.description": "最先进的上下文图像生成与编辑模型,结合文本与图像输入,实现精准一致的结果。",
@@ -571,10 +567,10 @@
"gemini-3-flash-preview.description": "Gemini 3 Flash 是一款以速度为核心的智能模型,融合前沿智能与卓越的搜索能力。",
"gemini-3-flash.description": "Google 的 Gemini 3 Flash —— 超高速模型,支持多模态输入。",
"gemini-3-pro-image-preview.description": "Gemini 3 Pro Image(Nano Banana Pro)是 Google 的图像生成模型,同时支持多模态对话。",
- "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image(Nano Banana Pro)是谷歌的图像生成模型,同时支持多模态聊天。",
+ "gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image(Nano Banana Pro)是 Google 的图像生成模型,同时支持多模态聊天。",
"gemini-3-pro-preview.description": "Gemini 3 Pro 是 Google 最强大的智能体与编程模型,在最先进推理基础上提供更丰富的视觉效果与更深入的交互体验。",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image(Nano Banana 2)是 Google 最快的原生图像生成模型,支持思考、对话式图像生成和编辑。",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)以闪电般的速度提供专业级图像质量,并支持多模态聊天。",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)是 Google 最快的原生图像生成模型,支持思维能力、对话式图像生成和编辑。",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview是谷歌最具成本效益的多模态模型,专为高容量代理任务、翻译和数据处理优化。",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview在Gemini 3 Pro的基础上增强了推理能力,并增加了中等思维水平支持。",
"gemini-3.1-pro.description": "Google 的 Gemini 3.1 Pro —— 高端多模态模型,具备 100 万上下文窗口。",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "我们很高兴发布 Grok 4 Fast,这是我们在高性价比推理模型方面的最新进展。",
"grok-4.20-0309-non-reasoning.description": "无推理模式版本,适用于简单场景。",
"grok-4.20-0309-reasoning.description": "智能、高速的推理模型,先思考后回答。",
- "grok-4.20-beta-0309-non-reasoning.description": "适用于简单用例的非推理变体",
- "grok-4.20-beta-0309-reasoning.description": "智能且极速的模型,在响应前进行推理",
"grok-4.20-multi-agent-0309.description": "由 4 至 16 个 Agent 组成的团队,擅长科研类任务。目前不支持客户端工具,只支持 xAI 服务器端工具(如 X Search、Web Search)及远程 MCP 工具。",
"grok-4.3.description": "世界上最追求真理的大型语言模型",
- "grok-4.description": "我们最新且最强大的旗舰模型,在自然语言处理、数学和推理方面表现卓越,是理想的全能型模型。",
+ "grok-4.description": "最新的 Grok 旗舰模型,语言、数学和推理能力无与伦比——真正的全能型选手。目前指向 grok-4-0709;由于资源有限,暂时比官方定价高 10%,预计稍后会恢复至官方价格。",
"grok-code-fast-1.description": "我们很高兴推出 grok-code-fast-1,这是一款快速且高性价比的推理模型,擅长智能体编程。",
"grok-imagine-image-pro.description": "通过文本提示生成图像,用自然语言编辑现有图像,或通过多轮对话迭代优化图像。",
"grok-imagine-image.description": "通过文本提示生成图像,用自然语言编辑现有图像,或通过多轮对话迭代优化图像。",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ 是 Qwen 系列中的推理模型。相比标准指令微调模型,具备更强的思维与推理能力,显著提升下游复杂任务表现。QwQ-32B 是一款中型推理模型,性能可媲美 DeepSeek-R1 和 o1-mini 等顶级模型。",
"qwq_32b.description": "Qwen 系列中的中型推理模型。相比标准指令微调模型,QwQ 的思维与推理能力显著提升下游复杂任务表现。",
"r1-1776.description": "R1-1776 是 DeepSeek R1 的后训练版本,旨在提供无审查、无偏见的真实信息。",
- "seedance-1-5-pro-251215.description": "字节跳动推出的 Seedance 1.5 Pro 支持文本生成视频、图像生成视频(首帧、首+尾帧)以及与视觉同步的音频生成。",
- "seedream-5-0-260128.description": "字节跳动-Seedream-5.0-lite 由 BytePlus 提供,支持基于网络检索增强的实时信息生成,改进复杂提示解释,并提升参考一致性,适用于专业视觉创作。",
"solar-mini-ja.description": "Solar Mini (Ja) 是 Solar Mini 的日语增强版本,同时保持在英语和韩语中的高效强性能。",
"solar-mini.description": "Solar Mini 是一款紧凑型大语言模型,性能超越 GPT-3.5,具备强大的多语言能力,支持英语和韩语,提供高效的小体积解决方案。",
"solar-pro.description": "Solar Pro 是 Upstage 推出的高智能大语言模型,专注于单 GPU 上的指令跟随任务,IFEval 得分超过 80。目前支持英语,完整版本计划于 2024 年 11 月发布,届时将扩展语言支持并提升上下文长度。",
diff --git a/locales/zh-CN/providers.json b/locales/zh-CN/providers.json
index d393cbad9da..52bcd46109e 100644
--- a/locales/zh-CN/providers.json
+++ b/locales/zh-CN/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Jina AI 成立于 2020 年,是领先的搜索 AI 公司,其搜索技术栈包括向量模型、重排序器与小型语言模型,支持构建高质量的生成式与多模态搜索应用。",
"kimicodingplan.description": "Kimi Code Plan 由 Moonshot AI 提供,通过固定月费订阅方式访问 Kimi 模型(包括 K2.5)用于编程任务。",
"lmstudio.description": "LM Studio 是一款桌面应用,支持在本地开发与实验大语言模型。",
- "lobehub.description": "LobeHub 云通过官方 API 访问 AI 模型,并使用与模型令牌相关的积分来衡量使用情况。",
"longcat.description": "LongCat 是由美团自主研发的生成式 AI 大模型系列,旨在通过高效的计算架构和强大的多模态能力,提升企业内部工作效率并推动创新应用的发展。",
"minimax.description": "MiniMax 成立于 2021 年,致力于构建通用 AI,拥有多模态基础模型,包括万亿参数的 MoE 文本模型、语音模型与视觉模型,并推出海螺 AI 等应用。",
"minimaxcodingplan.description": "MiniMax Token Plan 提供对 MiniMax 模型(包括 M2.7)的访问,适用于编程任务,采用固定月费订阅模式。",
diff --git a/locales/zh-CN/setting.json b/locales/zh-CN/setting.json
index ee7258bd681..425e617a518 100644
--- a/locales/zh-CN/setting.json
+++ b/locales/zh-CN/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "自行填写内容",
"tab.manualFill.desc": "手动配置自定义 MCP 技能",
"tab.memory": "记忆设置",
+ "tab.messenger": "聊天平台",
"tab.notification": "通知",
"tab.profile": "我的账号",
"tab.provider": "AI 服务商",
diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.json
index d56ceb307f4..5c1b403ecd2 100644
--- a/locales/zh-TW/chat.json
+++ b/locales/zh-TW/chat.json
@@ -681,15 +681,9 @@
"tool.intervention.mode.autoRunDesc": "自動批准所有工具執行",
"tool.intervention.mode.manual": "手動",
"tool.intervention.mode.manualDesc": "每次調用都需要手動批准",
- "tool.intervention.onboarding.agentIdentity.applyHint": "新身分將在核准後顯示。",
- "tool.intervention.onboarding.agentIdentity.description": "核准此變更後,將更新收件匣和此導引對話中顯示的代理身分。",
- "tool.intervention.onboarding.agentIdentity.emoji": "代理頭像",
- "tool.intervention.onboarding.agentIdentity.eyebrow": "導引核准",
- "tool.intervention.onboarding.agentIdentity.name": "代理名稱",
- "tool.intervention.onboarding.agentIdentity.targetInbox": "收件匣代理",
- "tool.intervention.onboarding.agentIdentity.targetOnboarding": "目前的導引代理",
- "tool.intervention.onboarding.agentIdentity.targets": "適用對象",
"tool.intervention.onboarding.agentIdentity.title": "確認代理身分更新",
+ "tool.intervention.onboarding.agentIdentity.titleAvatarOnly": "我會更新我的頭像",
+ "tool.intervention.onboarding.agentIdentity.titleNameOnly": "我會更新我的名字",
"tool.intervention.onboarding.userProfile.applyHint": "這些詳細資料將在批准後儲存到您的個人檔案中。",
"tool.intervention.onboarding.userProfile.description": "批准此變更將更新您的入職檔案,以便代理可以量身定制未來的回覆。",
"tool.intervention.onboarding.userProfile.eyebrow": "入職批准",
@@ -857,13 +851,21 @@
"workingPanel.resources.updatedAt": "更新於 {{time}}",
"workingPanel.resources.viewMode.list": "列表檢視",
"workingPanel.resources.viewMode.tree": "樹狀檢視",
+ "workingPanel.review.baseRef.default": "預設",
+ "workingPanel.review.baseRef.loading": "正在載入分支…",
+ "workingPanel.review.baseRef.reset": "重置為預設分支",
+ "workingPanel.review.baseRef.unresolved": "選擇一個基礎分支",
"workingPanel.review.binary": "二進位檔案 — 無法顯示差異",
"workingPanel.review.collapseAll": "全部摺疊",
"workingPanel.review.copied": "路徑已複製",
"workingPanel.review.copyPath": "複製檔案路徑",
"workingPanel.review.empty": "沒有工作樹變更",
+ "workingPanel.review.empty.branch": "與 {{baseRef}} 無變更",
+ "workingPanel.review.empty.noBaseRef": "無法確定遠端的預設分支。請在終端機中執行 `git remote set-head origin --auto`。",
"workingPanel.review.error": "無法載入此檔案的差異",
"workingPanel.review.expandAll": "全部展開",
+ "workingPanel.review.mode.branch": "分支",
+ "workingPanel.review.mode.unstaged": "未暫存",
"workingPanel.review.more": "更多選項",
"workingPanel.review.refresh": "重新整理",
"workingPanel.review.textDiff.disable": "停用內嵌文字差異",
diff --git a/locales/zh-TW/labs.json b/locales/zh-TW/labs.json
index 39f74555a36..2562c4ff085 100644
--- a/locales/zh-TW/labs.json
+++ b/locales/zh-TW/labs.json
@@ -9,5 +9,7 @@
"features.groupChat.title": "群組聊天(多智能體)",
"features.inputMarkdown.desc": "在輸入區即時渲染 Markdown(粗體、程式碼區塊、表格等)。",
"features.inputMarkdown.title": "輸入框 Markdown 渲染",
+ "features.messenger.desc": "透過共享的 LobeHub 機器人,從 Telegram(以及其他即時通訊工具)與您的代理進行對話。在設定中新增「Messenger」標籤,用於綁定您的帳戶並選擇接收訊息的代理。",
+ "features.messenger.title": "即時通訊",
"title": "實驗室"
}
diff --git a/locales/zh-TW/messenger.json b/locales/zh-TW/messenger.json
new file mode 100644
index 00000000000..3c4bdf1fc6c
--- /dev/null
+++ b/locales/zh-TW/messenger.json
@@ -0,0 +1,102 @@
+{
+ "messenger.activeAgent": "啟用的代理",
+ "messenger.activeAgentPlaceholder": "選擇一個代理",
+ "messenger.detail.addServer": "新增伺服器",
+ "messenger.detail.addWorkspace": "新增工作區",
+ "messenger.detail.connections.connected": "已連接",
+ "messenger.detail.connections.empty": "打開機器人並發送 /start 以連結您的帳戶。",
+ "messenger.detail.connections.linkHint": "工作區已安裝。打開 Slack 並私訊機器人以完成個人帳戶的連結。",
+ "messenger.detail.connections.pending": "待處理",
+ "messenger.detail.connections.serverLabel": "伺服器",
+ "messenger.detail.connections.title": "連接",
+ "messenger.detail.connections.userLabel": "使用者",
+ "messenger.detail.connections.workspaceLabel": "工作區",
+ "messenger.detail.disconnect": "斷開連接",
+ "messenger.discord.connectModal.description": "將 LobeHub 機器人新增到您管理的 Discord 伺服器。",
+ "messenger.discord.connectModal.inviteButton": "新增到 Discord 伺服器",
+ "messenger.discord.connectModal.notConfigured": "Discord 目前無法使用。請稍後再試。",
+ "messenger.discord.connectModal.title": "將機器人新增到您的伺服器",
+ "messenger.discord.connections.disconnectConfirm": "從您的審核列表中移除此伺服器?機器人將留在伺服器中,直到伺服器管理員將其移除。",
+ "messenger.discord.connections.disconnectFailed": "移除伺服器失敗。",
+ "messenger.discord.connections.disconnectSuccess": "伺服器已移除。",
+ "messenger.discord.connections.disconnectTitle": "移除伺服器",
+ "messenger.discord.userPending.cta": "在 Discord 中打開",
+ "messenger.discord.userPending.hint": "在 Discord 中打開機器人並發送任何訊息以完成帳戶連結。",
+ "messenger.discord.userPending.name": "尚未連結",
+ "messenger.error.agentNotFound": "找不到代理。",
+ "messenger.error.disconnectNotAllowed": "您只能斷開您啟動的安裝。",
+ "messenger.error.installationNotFound": "找不到安裝。",
+ "messenger.error.linkRequired": "在更改此連接之前,請打開機器人並發送 /start。",
+ "messenger.error.pickDefaultAgent": "在確認之前選擇一個預設代理。",
+ "messenger.error.platformNotConfigured": "此通訊平台目前無法使用。請稍後再試。",
+ "messenger.linkCta": "連接",
+ "messenger.linkModal.continueIn": "在 {{platform}} 中繼續設置",
+ "messenger.linkModal.instructions": "打開機器人,發送 /start,然後點擊「連結帳戶」以連接您的 LobeHub 帳戶。",
+ "messenger.linkModal.notConfigured": "此連接目前無法使用。請稍後再試。",
+ "messenger.linkModal.openCta": "在 {{platform}} 中打開",
+ "messenger.linkModal.scanHint": "或使用您的手機掃描以打開 {{platform}}。",
+ "messenger.linkModal.title": "連接 Messenger",
+ "messenger.list.discord.description": "從任何 Discord 伺服器通過私訊與您的 LobeHub 代理聊天。",
+ "messenger.list.slack.description": "從任何 Slack 工作區通過私訊或 @LobeHub 與您的 LobeHub 代理聊天。",
+ "messenger.list.telegram.description": "在 Telegram 中與您的 LobeHub 代理聊天,並選擇從任何地方回應的代理。",
+ "messenger.noPlatformsConfigured": "目前尚無可用平台。請稍後再查看。",
+ "messenger.setActiveFailed": "設置為啟用失敗。",
+ "messenger.setActiveSuccess": "啟用的代理已更新。",
+ "messenger.slack.connectModal.continueButton": "在 Slack 中繼續",
+ "messenger.slack.connectModal.description": "您將被重定向到 Slack 以授權 LobeHub 工作區安裝。",
+ "messenger.slack.connectModal.notConfigured": "Slack 目前無法使用。請稍後再試。",
+ "messenger.slack.connectModal.title": "在 Slack 中繼續設置",
+ "messenger.slack.connections.disconnectConfirm": "將 LobeHub 機器人從此 Slack 工作區斷開連接?現有的使用者連結將暫停,直到您重新安裝。",
+ "messenger.slack.connections.disconnectFailed": "斷開連接失敗。",
+ "messenger.slack.connections.disconnectSuccess": "工作區已斷開連接。",
+ "messenger.slack.connections.disconnectTitle": "斷開工作區",
+ "messenger.slack.installBlocked.dismiss": "知道了",
+ "messenger.slack.installBlocked.suggestion": "在 Slack 中私訊 @LobeHub 以連結您的個人帳戶——您不需要再次安裝。如果您想接管所有權,請先要求原始安裝者斷開此工作區。",
+ "messenger.slack.installBlocked.title": "工作區已連接",
+ "messenger.slack.installBlocked.withName": "「{{workspace}}」已由其他使用者連接到 LobeHub。",
+ "messenger.slack.installBlocked.withoutName": "此 Slack 工作區已由其他使用者連接到 LobeHub。",
+ "messenger.slack.installResult.failed": "Slack 安裝失敗({{reason}})。請重試或聯繫支援。",
+ "messenger.slack.installResult.reasons.accessDenied": "授權已取消",
+ "messenger.slack.installResult.reasons.exchangeFailed": "Slack 授權失敗",
+ "messenger.slack.installResult.reasons.generic": "發生未知錯誤",
+ "messenger.slack.installResult.reasons.invalidState": "安裝會話已過期",
+ "messenger.slack.installResult.reasons.missingAppId": "Slack 返回的應用程式資訊不完整",
+ "messenger.slack.installResult.reasons.missingCodeOrState": "Slack 返回的安裝參數不完整",
+ "messenger.slack.installResult.reasons.missingTenant": "Slack 未返回工作區標識符",
+ "messenger.slack.installResult.reasons.missingToken": "Slack 未返回機器人令牌",
+ "messenger.slack.installResult.reasons.persistFailed": "無法保存工作區連接",
+ "messenger.slack.installResult.success": "Slack 工作區已連接。",
+ "messenger.subtitle": "將您的帳戶連接到官方 LobeHub 機器人一次。選擇接收訊息的代理,隨時從此處或機器人切換。",
+ "messenger.title": "Messenger",
+ "messenger.unlinkConfirm": "將您的 {{platform}} 帳戶從 LobeHub 斷開連接?入站訊息將停止,直到您再次發送 /start。",
+ "messenger.unlinkCta": "斷開連接",
+ "messenger.unlinkFailed": "斷開連接失敗。",
+ "messenger.unlinkSuccess": "已斷開連接。",
+ "messenger.unlinkTitle": "斷開帳戶",
+ "verify.confirm.conflict.description": "此 {{platform}} 帳戶已連接到 LobeHub 帳戶 {{email}}。請登入該帳戶以管理連結,或在重試前先在那裡取消連結。",
+ "verify.confirm.conflict.switchAccount": "使用其他帳戶登入",
+ "verify.confirm.conflict.title": "此帳戶已連接",
+ "verify.confirm.cta": "確認連結",
+ "verify.confirm.defaultAgent": "預設代理",
+ "verify.confirm.defaultAgentHint": "您的訊息將首先路由到這裡。您可以隨時通過機器人中的 /agents 或從設置 → Messenger 切換。",
+ "verify.confirm.defaultAgentPlaceholder": "選擇一個代理",
+ "verify.confirm.fields.lobeHubAccount": "LobeHub 帳戶",
+ "verify.confirm.fields.platformAccount": "{{platform}} 帳戶",
+ "verify.confirm.fields.workspace": "工作區",
+ "verify.confirm.noAgents": "您還沒有任何代理。在 LobeHub 中創建一個,然後回來完成連結。",
+ "verify.confirm.title": "確認連結",
+ "verify.confirm.workspace": "工作區:{{workspace}}",
+ "verify.error.alreadyLinkedToOther": "此帳戶已連接到其他 LobeHub 帳戶。請先登入該帳戶。",
+ "verify.error.expired": "此連結已過期。請返回機器人並再次發送 /start。",
+ "verify.error.generic": "發生錯誤。請重試。",
+ "verify.error.missingToken": "無效的連結。請從機器人打開此頁面。",
+ "verify.error.title": "無法確認連結",
+ "verify.labRequired.description": "Messenger 目前是一個實驗室功能。請在設置 → 高級 → 實驗室中啟用,然後重新加載此頁面。",
+ "verify.labRequired.openSettings": "打開實驗室設置",
+ "verify.labRequired.title": "啟用 Messenger 以繼續",
+ "verify.signInCta": "登入以繼續",
+ "verify.signInRequired": "請登入 LobeHub 以確認連結。",
+ "verify.success.description": "您的帳戶現在已連接到 {{platform}}。打開 {{platform}} 並發送您的第一條訊息。",
+ "verify.success.openBot": "在 {{platform}} 中打開",
+ "verify.success.title": "連結成功!"
+}
diff --git a/locales/zh-TW/models.json b/locales/zh-TW/models.json
index 590b2b751ac..1ae11439ab4 100644
--- a/locales/zh-TW/models.json
+++ b/locales/zh-TW/models.json
@@ -106,7 +106,6 @@
"MiniMax-Hailuo-2.3.description": "全新影像生成模型,全面升級身體動作、物理真實性及指令遵循性。",
"MiniMax-M1.description": "一款內部開發的推理模型,具備 80K 思路鏈與 100 萬輸入,效能媲美全球頂尖模型。",
"MiniMax-M2-Stable.description": "專為高效編碼與代理流程設計,具備更高併發能力,適用於商業應用。",
- "MiniMax-M2.1-Lightning.description": "強大的多語言編程能力,推理速度更快、更高效。",
"MiniMax-M2.1-highspeed.description": "強大的多語言編程能力,全面升級的編程體驗。速度更快,效率更高。",
"MiniMax-M2.1.description": "MiniMax-M2.1 是 MiniMax 推出的旗艦開源大型模型,專注於解決複雜的真實世界任務。其核心優勢在於多語言程式設計能力與作為智能代理執行複雜任務的能力。",
"MiniMax-M2.5-highspeed.description": "MiniMax M2.5 高速版:與 M2.5 性能相同,但推理速度更快。",
@@ -320,13 +319,13 @@
"claude-3-haiku-20240307.description": "Claude 3 Haiku 是 Anthropic 推出的最快速且最精簡的模型,設計用於即時回應,具備快速且準確的表現。",
"claude-3-opus-20240229.description": "Claude 3 Opus 是 Anthropic 最強大的模型,適用於高度複雜任務,具備卓越的效能、智慧、流暢度與理解力。",
"claude-3-sonnet-20240229.description": "Claude 3 Sonnet 在智慧與速度之間取得平衡,適合企業工作負載,提供高效能與低成本的大規模部署。",
- "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 是 Anthropic 最快且最智能的 Haiku 模型,具有閃電般的速度和延展性思考能力。",
+ "claude-haiku-4-5-20251001.description": "Claude Haiku 4.5 是 Anthropic 最快速且最智能的 Haiku 模型,具備閃電般的速度和延展的推理能力。",
"claude-haiku-4-5.description": "Anthropic 的 Claude Haiku 4.5 —— 新一代 Haiku,具備更強推理與視覺能力。",
"claude-haiku-4.5.description": "Claude Haiku 4.5 是 Anthropic 最快速且最聰明的 Haiku 模型,具備閃電般的速度和延展的推理能力。",
"claude-opus-4-1-20250805-thinking.description": "Claude Opus 4.1 Thinking 是一個進階版本,能夠揭示其推理過程。",
- "claude-opus-4-1-20250805.description": "Claude Opus 4.1 是 Anthropic 最新且最強大的模型,擅長處理高度複雜的任務,表現出色,智能、流暢且理解力強。",
+ "claude-opus-4-1-20250805.description": "Claude Opus 4.1 是 Anthropic 最新且最強大的模型,專為高度複雜的任務設計,表現出色,具備卓越的智能、流暢性和理解力。",
"claude-opus-4-1.description": "Anthropic 的 Claude Opus 4.1 —— 旗艦級推理模型,擅長深度分析。",
- "claude-opus-4-20250514.description": "Claude Opus 4 是 Anthropic 最強大的模型,擅長處理高度複雜的任務,表現出色,智能、流暢且理解力強。",
+ "claude-opus-4-20250514.description": "Claude Opus 4 是 Anthropic 最強大的模型,專為高度複雜的任務設計,表現出色,具備卓越的智能、流暢性和理解能力。",
"claude-opus-4-5-20251101.description": "Claude Opus 4.5 是 Anthropic 的旗艦模型,結合卓越智慧與可擴展效能,適合需要最高品質回應與推理的複雜任務。",
"claude-opus-4-5.description": "Anthropic 的 Claude Opus 4.5 —— 旗艦模型,具備頂級推理與程式能力。",
"claude-opus-4-6.description": "Anthropic 的 Claude Opus 4.6 —— 支援 100 萬上下文的旗艦模型,擁有先進推理能力。",
@@ -335,8 +334,8 @@
"claude-opus-4.6-fast.description": "Claude Opus 4.6 是 Anthropic 最智能的模型,用於構建代理和編碼。",
"claude-opus-4.6.description": "Claude Opus 4.6 是 Anthropic 最智能的模型,用於構建代理和編碼。",
"claude-sonnet-4-20250514-thinking.description": "Claude Sonnet 4 Thinking 可產生即時回應或延伸的逐步思考,並顯示其推理過程。",
- "claude-sonnet-4-20250514.description": "Claude Sonnet 4 是 Anthropic 至今最智能的模型,提供近乎即時的響應或延展的逐步思考,為 API 用戶提供精細控制。",
- "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 是 Anthropic 至今最智能的模型。",
+ "claude-sonnet-4-20250514.description": "Claude Sonnet 4 能夠生成幾乎即時的回應,或提供帶有可見過程的逐步推理。",
+ "claude-sonnet-4-5-20250929.description": "Claude Sonnet 4.5 是迄今為止 Anthropic 最智能的模型。",
"claude-sonnet-4-5.description": "Anthropic 的 Claude Sonnet 4.5 —— 強化版 Sonnet,提升程式能力。",
"claude-sonnet-4-6.description": "Anthropic 的 Claude Sonnet 4.6 —— 最新 Sonnet,具備更卓越的程式與工具使用能力。",
"claude-sonnet-4.5.description": "Claude Sonnet 4.5 是 Anthropic 迄今為止最智能的模型。",
@@ -409,7 +408,7 @@
"deepseek-ai/deepseek-llm-67b-chat.description": "DeepSeek LLM Chat(67B)是一款創新模型,具備深層語言理解與互動能力。",
"deepseek-ai/deepseek-v3.1-terminus.description": "DeepSeek V3.1 是新一代推理模型,具備更強的複雜推理與思維鏈能力,適用於深度分析任務。",
"deepseek-ai/deepseek-v3.2.description": "DeepSeek V3.2 是下一代推理模型,具備更強的複雜推理和連鎖思維能力。",
- "deepseek-chat.description": "DeepSeek V4 Flash 非思考模式的兼容別名。計劃淘汰——請使用 DeepSeek V4 Flash。",
+ "deepseek-chat.description": "一個結合通用能力與編碼能力的新開源模型。它保留了聊天模型的通用對話能力和編碼模型的強大編碼能力,並具有更好的偏好對齊。DeepSeek-V2.5 還改進了寫作和指令遵循能力。",
"deepseek-coder-33B-instruct.description": "DeepSeek Coder 33B 是一款程式語言模型,訓練於 2T token(87% 程式碼,13% 中英文文本),支援 16K 上下文視窗與中間填充任務,提供專案級程式補全與片段填充功能。",
"deepseek-coder-v2.description": "DeepSeek Coder V2 是一款開源 MoE 程式模型,在程式任務中表現強勁,媲美 GPT-4 Turbo。",
"deepseek-coder-v2:236b.description": "DeepSeek Coder V2 是一款開源 MoE 程式模型,在程式任務中表現強勁,媲美 GPT-4 Turbo。",
@@ -431,7 +430,7 @@
"deepseek-r1-fast-online.description": "DeepSeek R1 快速全量版,支援即時網頁搜尋,結合 671B 規模能力與快速回應。",
"deepseek-r1-online.description": "DeepSeek R1 全量版擁有 671B 參數與即時網頁搜尋功能,提供更強的理解與生成能力。",
"deepseek-r1.description": "DeepSeek-R1 在強化學習前使用冷啟動資料,於數學、程式碼與推理任務中表現可媲美 OpenAI-o1。",
- "deepseek-reasoner.description": "DeepSeek V4 Flash 思考模式的兼容別名。計劃淘汰——請使用 DeepSeek V4 Flash。",
+ "deepseek-reasoner.description": "DeepSeek V4 快速思考模式的兼容別名。計劃淘汰——請改用 deepseek-v4-flash。",
"deepseek-v2.description": "DeepSeek V2 是一款高效的 MoE 模型,適用於具成本效益的處理任務。",
"deepseek-v2:236b.description": "DeepSeek V2 236B 是 DeepSeek 專注於程式碼生成的模型,具備強大能力。",
"deepseek-v3-0324.description": "DeepSeek-V3-0324 是一款擁有 671B 參數的 MoE 模型,在程式設計、技術能力、語境理解與長文本處理方面表現出色。",
@@ -496,8 +495,6 @@
"doubao-seedream-4-0-250828.description": "Seedream 4.0 是字節跳動 Seed 團隊推出的圖像生成模型,支援文字與圖像輸入,實現高度可控、高品質的圖像生成。可根據文字提示生成圖像。",
"doubao-seedream-4-5-251128.description": "Seedream 4.5 是字節跳動最新的多模態圖像模型,整合了文本生成圖像、圖像生成圖像和批量圖像生成功能,同時融入了常識和推理能力。與之前的 4.0 版本相比,生成質量顯著提升,編輯一致性和多圖融合效果更好。它對視覺細節的控制更加精確,能更自然地生成小字和小臉,並實現更和諧的佈局和色彩,提升整體美感。",
"doubao-seedream-5-0-260128.description": "Doubao-Seedream-5.0-lite 是字節跳動最新的圖像生成模型。首次整合了在線檢索功能,能夠結合實時網絡信息,提升生成圖像的時效性。模型的智能性也得到了升級,能夠精確解讀複雜指令和視覺內容。此外,它在專業場景中的全球知識覆蓋、參考一致性和生成質量方面均有改進,更好地滿足企業級視覺創作需求。",
- "dreamina-seedance-2-0-260128.description": "字節跳動推出的 Seedance 2.0 是最強大的視頻生成模型,支持多模態參考視頻生成、視頻編輯、視頻擴展、文本生成視頻以及圖像生成視頻,並同步音頻。",
- "dreamina-seedance-2-0-fast-260128.description": "字節跳動推出的 Seedance 2.0 Fast 提供與 Seedance 2.0 相同的功能,但生成速度更快,價格更具競爭力。",
"emohaa.description": "Emohaa 是一款心理健康模型,具備專業諮詢能力,協助使用者理解情緒問題。",
"ernie-4.5-0.3b.description": "ERNIE 4.5 0.3B 是一款開源輕量級模型,適合本地與客製化部署。",
"ernie-4.5-8k-preview.description": "ERNIE 4.5 8K Preview 是一款 8K 上下文預覽模型,用於評估 ERNIE 4.5。",
@@ -522,8 +519,7 @@
"ernie-x1-turbo-32k.description": "ERNIE X1 Turbo 32K 是一款快速思考模型,具備 32K 上下文,適合複雜推理與多輪對話。",
"ernie-x1.1-preview.description": "ERNIE X1.1 預覽版是一款思考模型預覽,用於評估與測試。",
"ernie-x1.1.description": "ERNIE X1.1 是一個用於評估和測試的思考模型預覽版。",
- "fal-ai/bytedance/seedream/v4.5.description": "Seedream 4.5 由字節跳動 Seed 團隊打造,支持多圖像編輯和合成。特點包括增強主題一致性、精確指令跟隨、空間邏輯理解、美學表達、海報佈局和標誌設計,並具有高精度文本圖像渲染能力。",
- "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 由字節跳動 Seed 團隊打造,支持文本和圖像輸入,能根據提示生成高度可控、高質量的圖像。",
+ "fal-ai/bytedance/seedream/v4.description": "Seedream 4.0 是來自字節跳動 Seed 的圖像生成模型,支持文本和圖像輸入,能夠進行高度可控、高品質的圖像生成。它可以根據文本提示生成圖像。",
"fal-ai/flux-kontext/dev.description": "FLUX.1 模型專注於圖像編輯,支援文字與圖像輸入。",
"fal-ai/flux-pro/kontext.description": "FLUX.1 Kontext [pro] 接受文字與參考圖像輸入,實現目標區域編輯與複雜場景轉換。",
"fal-ai/flux/krea.description": "Flux Krea [dev] 是一款圖像生成模型,偏好更真實自然的美學風格。",
@@ -531,8 +527,8 @@
"fal-ai/hunyuan-image/v3.description": "一款強大的原生多模態圖像生成模型。",
"fal-ai/imagen4/preview.description": "來自 Google 的高品質圖像生成模型。",
"fal-ai/nano-banana.description": "Nano Banana 是 Google 最新、最快且最高效的原生多模態模型,支援透過對話進行圖像生成與編輯。",
- "fal-ai/qwen-image-edit.description": "Qwen 團隊推出的專業圖像編輯模型,支持語義和外觀編輯、精確的中英文文本編輯、風格轉換、旋轉等功能。",
- "fal-ai/qwen-image.description": "Qwen 團隊推出的強大圖像生成模型,具有強大的中文文本渲染能力和多樣化的視覺風格。",
+ "fal-ai/qwen-image-edit.description": "來自 Qwen 團隊的專業圖像編輯模型,支持語義和外觀編輯,精確編輯中英文文本,並實現高品質的編輯效果,如風格轉換和物體旋轉。",
+ "fal-ai/qwen-image.description": "來自 Qwen 團隊的強大圖像生成模型,具有令人印象深刻的中文文本渲染能力和多樣化的視覺風格。",
"flux-1-schnell.description": "來自黑森林實驗室的 12B 參數文字轉圖像模型,透過潛在對抗擴散蒸餾技術,在 1 至 4 步內生成高品質圖像。其表現媲美封閉式替代方案,並以 Apache-2.0 授權釋出,供個人、研究與商業用途。",
"flux-dev.description": "開源研發導向的影像生成模型,針對非商業創新研究進行高效優化。",
"flux-kontext-max.description": "最先進的語境圖像生成與編輯技術,結合文字與圖像輸入,實現精準且一致的結果。",
@@ -574,7 +570,7 @@
"gemini-3-pro-image-preview:image.description": "Gemini 3 Pro Image(Nano Banana Pro)是 Google 的圖像生成模型,並支持多模態聊天。",
"gemini-3-pro-preview.description": "Gemini 3 Pro 是 Google 最強大的智能代理與情境編碼模型,具備頂尖推理能力、豐富視覺表現與深度互動。",
"gemini-3.1-flash-image-preview.description": "Gemini 3.1 Flash Image (Nano Banana 2) 是 Google 最快的原生影像生成模型,支持思考、對話式影像生成與編輯。",
- "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)以閃電速度提供專業級圖像質量,並支持多模態聊天。",
+ "gemini-3.1-flash-image-preview:image.description": "Gemini 3.1 Flash Image(Nano Banana 2)是 Google 最快速的原生圖像生成模型,支持思考、對話式圖像生成和編輯。",
"gemini-3.1-flash-lite-preview.description": "Gemini 3.1 Flash-Lite Preview 是 Google 最具成本效益的多模態模型,專為高容量代理任務、翻譯和數據處理而優化。",
"gemini-3.1-pro-preview.description": "Gemini 3.1 Pro Preview 在 Gemini 3 Pro 的基礎上增強了推理能力,並新增了中等思考層級支持。",
"gemini-3.1-pro.description": "Google Gemini 3.1 Pro —— 旗艦多模態模型,具備 100 萬上下文。",
@@ -740,11 +736,9 @@
"grok-4-fast-reasoning.description": "我們很高興推出 Grok 4 Fast,這是我們在高性價比推理模型上的最新進展。",
"grok-4.20-0309-non-reasoning.description": "不具推理功能的版本,適用於簡單使用情境。",
"grok-4.20-0309-reasoning.description": "智慧、極速的模型,會先思考再作答。",
- "grok-4.20-beta-0309-non-reasoning.description": "適用於簡單使用場景的非推理變體",
- "grok-4.20-beta-0309-reasoning.description": "智能且極速的模型,在響應前進行推理",
"grok-4.20-multi-agent-0309.description": "由 4 或 16 個代理組成的團隊,擅長研究類任務。目前不支援客戶端工具,只支援 xAI 伺服器端工具(如 X Search、Web Search)及遠端 MCP 工具。",
"grok-4.3.description": "世界上最追求真理的大型語言模型",
- "grok-4.description": "我們最新且最強大的旗艦模型,在 NLP、數學和推理方面表現卓越,是理想的全能型模型。",
+ "grok-4.description": "最新的 Grok 旗艦模型,在語言、數學和推理方面表現無與倫比——真正的全能選手。目前指向 grok-4-0709;由於資源有限,暫時比官方定價高 10%,預計稍後將恢復至官方價格。",
"grok-code-fast-1.description": "我們很高興推出 grok-code-fast-1,一款快速且高性價比的推理模型,特別擅長智能體編碼。",
"grok-imagine-image-pro.description": "從文本提示生成圖像,使用自然語言編輯現有圖像,或通過多輪對話迭代優化圖像。",
"grok-imagine-image.description": "從文本提示生成圖像,使用自然語言編輯現有圖像,或通過多輪對話迭代優化圖像。",
@@ -1233,8 +1227,6 @@
"qwq.description": "QwQ 是 Qwen 系列中的推理模型。相較於標準指令微調模型,它具備更強的思考與推理能力,顯著提升下游任務表現,特別是在處理困難問題時。QwQ-32B 是中型推理模型,表現可媲美 DeepSeek-R1 與 o1-mini 等頂尖模型。",
"qwq_32b.description": "Qwen 系列中的中型推理模型。相較於標準指令微調模型,QwQ 的思考與推理能力顯著提升下游任務表現,特別是在處理困難問題時。",
"r1-1776.description": "R1-1776 是 DeepSeek R1 的後訓練版本,旨在提供未經審查、無偏見的事實資訊。",
- "seedance-1-5-pro-251215.description": "字節跳動推出的 Seedance 1.5 Pro 支持文本生成視頻、圖像生成視頻(首幀、首幀+末幀)以及與視覺同步的音頻生成。",
- "seedream-5-0-260128.description": "字節跳動-Seedream-5.0-lite 由 BytePlus 推出,具有網絡檢索增強生成功能,用於實時信息、增強複雜提示解釋以及改進參考一致性,適用於專業視覺創作。",
"solar-mini-ja.description": "Solar Mini (Ja) 是 Solar Mini 的日文強化版本,同時維持在英文與韓文上的高效能表現。",
"solar-mini.description": "Solar Mini 是一款緊湊型大型語言模型,效能超越 GPT-3.5,具備強大的多語言能力,支援英文與韓文,提供高效能且佔用資源小的解決方案。",
"solar-pro.description": "Solar Pro 是 Upstage 推出的高智慧大型語言模型,專注於單 GPU 上的指令遵循任務,IFEval 分數超過 80。目前支援英文,完整版本預計於 2024 年 11 月推出,將擴展語言支援與上下文長度。",
diff --git a/locales/zh-TW/providers.json b/locales/zh-TW/providers.json
index 68348ea3ceb..41054f2aa6b 100644
--- a/locales/zh-TW/providers.json
+++ b/locales/zh-TW/providers.json
@@ -33,7 +33,6 @@
"jina.description": "Jina AI 成立於 2020 年,是領先的搜尋 AI 公司。其搜尋技術堆疊包含向量模型、重排序器與小型語言模型,打造可靠且高品質的生成式與多模態搜尋應用。",
"kimicodingplan.description": "來自 Moonshot AI 的 Kimi Code 提供對 Kimi 模型(包括 K2.5)的訪問,用於編碼任務。",
"lmstudio.description": "LM Studio 是一款桌面應用程式,可在本機開發與實驗大型語言模型。",
- "lobehub.description": "LobeHub Cloud 使用官方 API 存取 AI 模型,並以與模型代幣相關的點數來計算使用量。",
"longcat.description": "LongCat 是美團自主研發的一系列生成式 AI 大模型。其設計旨在通過高效的計算架構和強大的多模態能力,提升企業內部生產力並實現創新應用。",
"minimax.description": "MiniMax 成立於 2021 年,致力於打造通用 AI,擁有多模態基礎模型,包括兆級參數的 MoE 文本模型、語音模型與視覺模型,並推出如海螺 AI 等應用。",
"minimaxcodingplan.description": "MiniMax 代幣計劃通過固定費用訂閱提供對 MiniMax 模型(包括 M2.7)的訪問,用於編碼任務。",
diff --git a/locales/zh-TW/setting.json b/locales/zh-TW/setting.json
index 1c2230ffd80..33b86a63f9e 100644
--- a/locales/zh-TW/setting.json
+++ b/locales/zh-TW/setting.json
@@ -857,6 +857,7 @@
"tab.manualFill": "手動填寫",
"tab.manualFill.desc": "手動配置自訂 MCP 技能",
"tab.memory": "記憶設定",
+ "tab.messenger": "訊息",
"tab.notification": "通知",
"tab.profile": "我的帳號",
"tab.provider": "AI 服務商",
diff --git a/packages/agent-runtime/src/types/hooks.ts b/packages/agent-runtime/src/types/hooks.ts
index 7fd77044753..cf11bc8bd00 100644
--- a/packages/agent-runtime/src/types/hooks.ts
+++ b/packages/agent-runtime/src/types/hooks.ts
@@ -45,6 +45,14 @@ export interface AgentHookEvent {
errorMessage?: string;
+ /**
+ * Stable error code (e.g. `NoAvailableProvider`, `InvalidProviderAPIKey`).
+ * Populated when the underlying error carries an `errorType` from
+ * `AgentRuntimeError.chat`. Hooks should switch on this code rather than
+ * pattern-matching `errorMessage`, which is free-form text.
+ */
+ errorType?: string;
+
/** Step execution time in ms (afterStep only) */
executionTimeMs?: number;
/**
diff --git a/packages/database/src/models/__tests__/messengerAccountLink.test.ts b/packages/database/src/models/__tests__/messengerAccountLink.test.ts
index a1b06305089..32ff19434a5 100644
--- a/packages/database/src/models/__tests__/messengerAccountLink.test.ts
+++ b/packages/database/src/models/__tests__/messengerAccountLink.test.ts
@@ -4,7 +4,10 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { getTestDB } from '../../core/getTestDB';
import { agents, messengerAccountLinks, users } from '../../schemas';
import type { LobeChatDatabase } from '../../type';
-import { MessengerAccountLinkModel } from '../messengerAccountLink';
+import {
+ MessengerAccountLinkConflictError,
+ MessengerAccountLinkModel,
+} from '../messengerAccountLink';
const serverDB: LobeChatDatabase = await getTestDB();
@@ -64,6 +67,55 @@ describe('MessengerAccountLinkModel', () => {
expect(linkB.tenantId).toBe('T_BETA');
});
+ it('throws MessengerAccountLinkConflictError when the IM identity is owned by another user', async () => {
+ // userB already owns this Telegram identity.
+ await new MessengerAccountLinkModel(serverDB, userB).upsertForPlatform({
+ activeAgentId: agentB,
+ platform: 'telegram',
+ platformUserId: 'tg-shared',
+ });
+
+ const promise = new MessengerAccountLinkModel(serverDB, userA).upsertForPlatform({
+ activeAgentId: agentA,
+ platform: 'telegram',
+ platformUserId: 'tg-shared',
+ });
+
+ await expect(promise).rejects.toBeInstanceOf(MessengerAccountLinkConflictError);
+ await expect(promise).rejects.toMatchObject({
+ code: 'MESSENGER_ACCOUNT_LINK_CONFLICT',
+ existingUserId: userB,
+ });
+
+ // userB's row must not have been mutated.
+ const stillUserB = await MessengerAccountLinkModel.findByPlatformUser(
+ serverDB,
+ 'telegram',
+ 'tg-shared',
+ );
+ expect(stillUserB?.userId).toBe(userB);
+ });
+
+ it('refreshes (does not duplicate) when the same user re-asserts the same IM identity', async () => {
+ const model = new MessengerAccountLinkModel(serverDB, userA);
+ const first = await model.upsertForPlatform({
+ activeAgentId: agentA,
+ platform: 'telegram',
+ platformUserId: 'tg-1',
+ platformUsername: '@old',
+ });
+ const second = await model.upsertForPlatform({
+ platform: 'telegram',
+ platformUserId: 'tg-1',
+ platformUsername: '@new',
+ });
+
+ expect(second.id).toBe(first.id);
+ expect(second.platformUsername).toBe('@new');
+ // activeAgentId stays since the second call didn't override it.
+ expect(second.activeAgentId).toBe(agentA);
+ });
+
it('overwrites the existing row when re-linking the same (platform, tenant)', async () => {
const model = new MessengerAccountLinkModel(serverDB, userA);
const first = await model.upsertForPlatform({
diff --git a/packages/database/src/models/messengerAccountLink.ts b/packages/database/src/models/messengerAccountLink.ts
index daee250ffc2..6900ebedc10 100644
--- a/packages/database/src/models/messengerAccountLink.ts
+++ b/packages/database/src/models/messengerAccountLink.ts
@@ -11,6 +11,22 @@ import type { LobeChatDatabase } from '../type';
*/
const GLOBAL_TENANT_ID = '';
+/**
+ * Thrown by `upsertForPlatform` when the IM identity is already bound to a
+ * different LobeHub user. Callers (e.g. the messenger router) should surface
+ * a friendly 409 — never let the underlying DB unique-index error escape.
+ */
+export class MessengerAccountLinkConflictError extends Error {
+ readonly code = 'MESSENGER_ACCOUNT_LINK_CONFLICT' as const;
+ readonly existingUserId: string;
+
+ constructor(existingUserId: string, message?: string) {
+ super(message ?? 'IM identity is already linked to another LobeHub user');
+ this.name = 'MessengerAccountLinkConflictError';
+ this.existingUserId = existingUserId;
+ }
+}
+
export class MessengerAccountLinkModel {
private userId: string;
private db: LobeChatDatabase;
@@ -33,24 +49,60 @@ export class MessengerAccountLinkModel {
* defaults to the empty string, which collapses the new 3-column index
* back to the original `(user, platform)` semantic.
*
+ * Resolution order is `(platform, tenant, platformUserId)` first, then
+ * `(user, platform, tenant)` — so we never let the
+ * `messenger_account_links_platform_tenant_user_unique` constraint surface
+ * as an opaque DB error when the IM identity is already owned by another
+ * LobeHub user; we throw `MessengerAccountLinkConflictError` instead.
+ *
* Returns the resulting link row.
*/
upsertForPlatform = async (
params: Omit<NewMessengerAccountLink, 'userId' | 'id'>,
): Promise<MessengerAccountLinkItem> => {
const tenantId = params.tenantId ?? GLOBAL_TENANT_ID;
- const existing = await this.findByPlatform(params.platform, tenantId);
- if (existing) {
+ // Resolve by IM identity first. If the row exists and belongs to another
+ // user, refuse — the caller (router) should already have surfaced a
+ // friendly 409, this is the defensive backstop.
+ const byIdentity = await MessengerAccountLinkModel.findByPlatformUser(
+ this.db,
+ params.platform,
+ params.platformUserId,
+ tenantId,
+ );
+
+ if (byIdentity) {
+ if (byIdentity.userId !== this.userId) {
+ throw new MessengerAccountLinkConflictError(byIdentity.userId);
+ }
+ const [updated] = await this.db
+ .update(messengerAccountLinks)
+ .set({
+ activeAgentId: params.activeAgentId ?? byIdentity.activeAgentId,
+ platformUsername: params.platformUsername ?? null,
+ updatedAt: new Date(),
+ })
+ .where(eq(messengerAccountLinks.id, byIdentity.id))
+ .returning();
+ return updated;
+ }
+
+ // IM identity is unbound. If the user already has a row for this
+ // `(platform, tenant)` (e.g. they previously linked a different account),
+ // overwrite it with the new platformUserId.
+ const existingForUser = await this.findByPlatform(params.platform, tenantId);
+
+ if (existingForUser) {
const [updated] = await this.db
.update(messengerAccountLinks)
.set({
- activeAgentId: params.activeAgentId ?? existing.activeAgentId,
+ activeAgentId: params.activeAgentId ?? existingForUser.activeAgentId,
platformUserId: params.platformUserId,
platformUsername: params.platformUsername ?? null,
updatedAt: new Date(),
})
- .where(eq(messengerAccountLinks.id, existing.id))
+ .where(eq(messengerAccountLinks.id, existingForUser.id))
.returning();
return updated;
}
diff --git a/packages/model-runtime/src/core/RouterRuntime/createRuntime.test.ts b/packages/model-runtime/src/core/RouterRuntime/createRuntime.test.ts
index eb0b4234ff9..c18d0245453 100644
--- a/packages/model-runtime/src/core/RouterRuntime/createRuntime.test.ts
+++ b/packages/model-runtime/src/core/RouterRuntime/createRuntime.test.ts
@@ -10,7 +10,7 @@ describe('createRouterRuntime', () => {
});
describe('initialization', () => {
- it('should throw error when routers array is empty', async () => {
+ it('should throw NoAvailableProvider error when routers array is empty', async () => {
const Runtime = createRouterRuntime({
id: 'test-runtime',
routers: [],
@@ -20,7 +20,11 @@ describe('createRouterRuntime', () => {
// 现在错误在使用时才抛出,因为是延迟创建
await expect(
runtime.chat({ model: 'test-model', messages: [], temperature: 0.7 }),
- ).rejects.toThrow('empty providers');
+ ).rejects.toMatchObject({
+ error: { message: 'empty providers' },
+ errorType: AgentRuntimeErrorType.NoAvailableProvider,
+ provider: 'test-runtime',
+ });
});
it('should create UniformRuntime class with valid routers', () => {
@@ -369,7 +373,7 @@ describe('createRouterRuntime', () => {
);
});
- it('should throw error when dynamic routers function returns empty array', async () => {
+ it('should throw NoAvailableProvider error when dynamic routers function returns empty array', async () => {
const emptyRoutersFunction = () => [];
const Runtime = createRouterRuntime({
@@ -381,7 +385,11 @@ describe('createRouterRuntime', () => {
// 现在错误在使用时才抛出,因为是延迟创建
await expect(
runtime.chat({ model: 'test-model', messages: [], temperature: 0.7 }),
- ).rejects.toThrow('empty providers');
+ ).rejects.toMatchObject({
+ error: { message: 'empty providers' },
+ errorType: AgentRuntimeErrorType.NoAvailableProvider,
+ provider: 'test-runtime',
+ });
});
it('should support async function-based routers configuration', async () => {
diff --git a/packages/model-runtime/src/core/RouterRuntime/createRuntime.ts b/packages/model-runtime/src/core/RouterRuntime/createRuntime.ts
index 83137ff2ed7..ca73823b083 100644
--- a/packages/model-runtime/src/core/RouterRuntime/createRuntime.ts
+++ b/packages/model-runtime/src/core/RouterRuntime/createRuntime.ts
@@ -2,6 +2,7 @@
* @see https://github.com/lobehub/lobe-chat/discussions/6563
*/
import type { GoogleGenAIOptions } from '@google/genai';
+import { AgentRuntimeErrorType } from '@lobechat/types';
import type { ChatModelCard } from '@lobechat/types';
import debug from 'debug';
import type { ClientOptions } from 'openai';
@@ -30,6 +31,7 @@ import type {
ILobeAgentRuntimeErrorType,
TextToSpeechPayload,
} from '../../types';
+import { AgentRuntimeError } from '../../utils/createError';
import { isNonRetryableRequestError } from '../../utils/isNonRetryableRequestError';
import { postProcessModelList } from '../../utils/postProcessModelList';
import { safeParseJSON } from '../../utils/safeParseJSON';
@@ -209,7 +211,11 @@ export const createRouterRuntime = ({
: this._routers;
if (resolvedRouters.length === 0) {
- throw new Error('empty providers');
+ throw AgentRuntimeError.chat({
+ error: { message: 'empty providers' },
+ errorType: AgentRuntimeErrorType.NoAvailableProvider,
+ provider: this._id,
+ });
}
return resolvedRouters;
diff --git a/packages/types/src/agentRuntime.ts b/packages/types/src/agentRuntime.ts
index 1e81d85b00b..b97742fbd3d 100644
--- a/packages/types/src/agentRuntime.ts
+++ b/packages/types/src/agentRuntime.ts
@@ -25,6 +25,12 @@ export const AgentRuntimeErrorType = {
*/
ConversationParentMissing: 'ConversationParentMissing',
LocationNotSupportError: 'LocationNotSupportError',
+ /**
+ * No model provider is configured / enabled for the requested model. Surfaces
+ * from `RouterRuntime.resolveRouters` when the router list resolves empty —
+ * typically because the user has not added an API key or enabled a provider.
+ */
+ NoAvailableProvider: 'NoAvailableProvider',
AccountDeactivated: 'AccountDeactivated',
QuotaLimitReached: 'QuotaLimitReached',
diff --git a/packages/types/src/user/preference.ts b/packages/types/src/user/preference.ts
index c5d1ae94629..19e18aaf083 100644
--- a/packages/types/src/user/preference.ts
+++ b/packages/types/src/user/preference.ts
@@ -54,6 +54,10 @@ export const UserLabSchema = z.object({
* enable markdown rendering in chat input editor
*/
enableInputMarkdown: z.boolean().optional(),
+ /**
+ * enable the shared Messenger bot integration (Telegram, Slack)
+ */
+ enableMessenger: z.boolean().optional(),
});
export type UserLab = z.infer<typeof UserLabSchema>;
diff --git a/src/app/(backend)/api/agent/messenger/[platform]/install/route.test.ts b/src/app/(backend)/api/agent/messenger/[platform]/install/route.test.ts
new file mode 100644
index 00000000000..66034df9954
--- /dev/null
+++ b/src/app/(backend)/api/agent/messenger/[platform]/install/route.test.ts
@@ -0,0 +1,155 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { auth } from '@/auth';
+import { issueOAuthState } from '@/server/services/messenger/oauth/stateStore';
+
+import { GET } from './route';
+
+vi.mock('@/auth', () => ({
+ auth: {
+ api: {
+ getSession: vi.fn(),
+ },
+ },
+}));
+
+vi.mock('@/server/services/messenger/oauth/stateStore', () => ({
+ issueOAuthState: vi.fn(),
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerDiscordConfig: vi.fn(),
+ getMessengerSlackConfig: vi.fn(),
+}));
+
+vi.mock('@/envs/app', () => ({
+ appEnv: { APP_URL: 'https://app.example.com' },
+}));
+
+const { getMessengerSlackConfig, getMessengerDiscordConfig } = await import('@/config/messenger');
+
+const VALID_SLACK_CONFIG = {
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+};
+
+const VALID_DISCORD_CONFIG = {
+ applicationId: 'D_APP',
+ botToken: 'bot-token',
+ clientSecret: 'd-secret',
+ publicKey: 'pubkey',
+};
+
+const buildRequest = (path: string): Request => new Request(`https://app.example.com${path}`);
+const ctx = (platform: string) => ({ params: Promise.resolve({ platform }) });
+
+beforeEach(() => {
+ vi.mocked(auth.api.getSession).mockResolvedValue({
+ session: {} as any,
+ user: { id: 'lobe-user-1' } as any,
+ });
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(VALID_SLACK_CONFIG);
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValue(VALID_DISCORD_CONFIG);
+ vi.mocked(issueOAuthState).mockResolvedValue('state-nonce-1');
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('GET /api/agent/messenger/[platform]/install', () => {
+ describe('platform routing', () => {
+ it('404s for an unknown platform', async () => {
+ const res = await GET(buildRequest('/api/agent/messenger/unknown/install'), ctx('unknown'));
+ expect(res.status).toBe(404);
+ });
+
+ it('404s for a known platform that has no OAuth adapter (telegram)', async () => {
+ const res = await GET(buildRequest('/api/agent/messenger/telegram/install'), ctx('telegram'));
+ expect(res.status).toBe(404);
+ });
+ });
+
+ describe('slack', () => {
+ it('redirects unauthenticated users to /signin with callbackUrl', async () => {
+ vi.mocked(auth.api.getSession).mockResolvedValue(null);
+
+ const res = await GET(buildRequest('/api/agent/messenger/slack/install'), ctx('slack'));
+ expect(res.status).toBe(302);
+ const parsed = new URL(res.headers.get('location')!);
+ expect(parsed.pathname).toBe('/signin');
+ expect(parsed.searchParams.get('callbackUrl')).toBe('/api/agent/messenger/slack/install');
+ });
+
+ it('returns 503 when Slack OAuth env is not configured', async () => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(null);
+
+ const res = await GET(buildRequest('/api/agent/messenger/slack/install'), ctx('slack'));
+ expect(res.status).toBe(503);
+ expect(await res.text()).toMatch(/Slack messenger is not configured/);
+ });
+
+ it('issues a state token bound to the LobeHub user and 302s to Slack authorize', async () => {
+ const res = await GET(buildRequest('/api/agent/messenger/slack/install'), ctx('slack'));
+ expect(res.status).toBe(302);
+
+ expect(issueOAuthState).toHaveBeenCalledWith({
+ lobeUserId: 'lobe-user-1',
+ returnTo: undefined,
+ });
+
+ const parsed = new URL(res.headers.get('location')!);
+ expect(parsed.origin + parsed.pathname).toBe('https://slack.com/oauth/v2/authorize');
+ expect(parsed.searchParams.get('client_id')).toBe('cid');
+ expect(parsed.searchParams.get('state')).toBe('state-nonce-1');
+ expect(parsed.searchParams.get('redirect_uri')).toBe(
+ 'https://app.example.com/api/agent/messenger/slack/oauth/callback',
+ );
+ expect(parsed.searchParams.get('scope')).toContain('chat:write');
+ expect(parsed.searchParams.get('scope')).toContain('users:read.email');
+ });
+
+ it('forwards returnTo into the state payload when provided', async () => {
+ await GET(
+ buildRequest('/api/agent/messenger/slack/install?returnTo=/settings/messenger'),
+ ctx('slack'),
+ );
+ expect(issueOAuthState).toHaveBeenCalledWith({
+ lobeUserId: 'lobe-user-1',
+ returnTo: '/settings/messenger',
+ });
+ });
+ });
+
+ describe('discord', () => {
+ it('returns 503 when Discord client_secret is not configured', async () => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValue({
+ ...VALID_DISCORD_CONFIG,
+ clientSecret: undefined,
+ });
+
+ const res = await GET(buildRequest('/api/agent/messenger/discord/install'), ctx('discord'));
+ expect(res.status).toBe(503);
+ expect(await res.text()).toMatch(/Discord messenger is not configured/);
+ });
+
+ it('302s to discord.com authorize with bot scope and permissions', async () => {
+ const res = await GET(buildRequest('/api/agent/messenger/discord/install'), ctx('discord'));
+ expect(res.status).toBe(302);
+ const parsed = new URL(res.headers.get('location')!);
+ expect(parsed.origin + parsed.pathname).toBe('https://discord.com/api/oauth2/authorize');
+ expect(parsed.searchParams.get('client_id')).toBe('D_APP');
+ expect(parsed.searchParams.get('response_type')).toBe('code');
+ expect(parsed.searchParams.get('state')).toBe('state-nonce-1');
+ expect(parsed.searchParams.get('scope')).toContain('bot');
+ expect(parsed.searchParams.get('scope')).toContain('applications.commands');
+ expect(parsed.searchParams.get('permissions')).toMatch(/^\d+$/);
+ expect(parsed.searchParams.get('redirect_uri')).toBe(
+ 'https://app.example.com/api/agent/messenger/discord/oauth/callback',
+ );
+ });
+ });
+});
diff --git a/src/app/(backend)/api/agent/messenger/[platform]/install/route.ts b/src/app/(backend)/api/agent/messenger/[platform]/install/route.ts
new file mode 100644
index 00000000000..33dc08f2614
--- /dev/null
+++ b/src/app/(backend)/api/agent/messenger/[platform]/install/route.ts
@@ -0,0 +1,87 @@
+import debug from 'debug';
+
+import { auth } from '@/auth';
+import { appEnv } from '@/envs/app';
+import { issueOAuthState } from '@/server/services/messenger/oauth/stateStore';
+import { messengerPlatformRegistry } from '@/server/services/messenger/platforms';
+
+const log = debug('lobe-server:messenger:install');
+
+/**
+ * Generic install entry point for any messenger platform whose definition
+ * exposes an OAuth adapter (`MessengerPlatformDefinition.oauth`). The route is
+ * platform-agnostic — every Slack-specific concern (scopes, authorize host,
+ * deep-link target) lives behind the adapter at
+ * `platforms/<id>/oauth.ts`.
+ *
+ * Always reached from the LobeHub web settings (the "Connect" modal does
+ * `window.location.href`s here), so we require an authenticated session —
+ * that's how we capture which LobeHub user owns this install
+ * (`messenger_installations.installed_by_user_id`).
+ *
+ * Manus's flow is the same shape: install starts on the product, NOT on a
+ * public Marketplace deep link, so the install row is bound to a real user
+ * end-to-end.
+ */
+export const GET = async (
+ req: Request,
+ { params }: { params: Promise<{ platform: string }> },
+): Promise<Response> => {
+ const { platform } = await params;
+ const url = new URL(req.url);
+
+ // 1. Platform definition must exist and expose an OAuth adapter.
+ const definition = messengerPlatformRegistry.getPlatform(platform);
+ if (!definition?.oauth) {
+ log('install: platform %s has no OAuth adapter', platform);
+ return new Response(`Messenger platform "${platform}" does not support OAuth install.`, {
+ status: 404,
+ });
+ }
+
+ // 2. Session check — unauth users get bounced through sign-in and back.
+ let session: Awaited<ReturnType<typeof auth.api.getSession>>;
+ try {
+ session = await auth.api.getSession({ headers: req.headers });
+ } catch (error) {
+ log('install: getSession failed: %O', error);
+ session = null;
+ }
+ if (!session?.user?.id) {
+ const callbackUrl = encodeURIComponent(`/api/agent/messenger/${platform}/install`);
+ return Response.redirect(new URL(`/signin?callbackUrl=${callbackUrl}`, url.origin), 302);
+ }
+
+ // 3. Config precondition — give a clear 503 instead of letting the upstream reject us.
+ const config = await definition.oauth.getAppConfig();
+ if (!config) {
+ log('install: %s messenger not configured', platform);
+ return new Response(
+ `${definition.name} messenger is not configured on this LobeHub deployment. ` +
+ `Ask the operator to add a ${definition.name} bot in dc-center → Agent → System Bots ` +
+ `and enable it.`,
+ { status: 503 },
+ );
+ }
+
+ if (!appEnv.APP_URL) {
+ log('install: APP_URL not set, cannot build redirect_uri');
+ return new Response('APP_URL is not configured', { status: 503 });
+ }
+
+ // 4. Mint an OAuth state, store the originating user → Redis (10-min TTL).
+ const returnTo = url.searchParams.get('returnTo') || undefined;
+ const state = await issueOAuthState({ lobeUserId: session.user.id, returnTo });
+
+ // 5. Build the platform's authorize URL and 302. The redirect_uri must
+ // match exactly at the callback — we generate it the same way both sides.
+ const redirectUri = `${appEnv.APP_URL.replace(/\/$/, '')}/api/agent/messenger/${platform}/oauth/callback`;
+ const authorizeUrl = definition.oauth.buildAuthorizeUrl({
+ clientId: config.clientId,
+ redirectUri,
+ state,
+ });
+
+ log('install: redirecting user=%s to %s authorize', session.user.id, platform);
+ return Response.redirect(authorizeUrl, 302);
+};
diff --git a/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.test.ts b/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.test.ts
new file mode 100644
index 00000000000..d23526d4b16
--- /dev/null
+++ b/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.test.ts
@@ -0,0 +1,377 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { MessengerInstallationModel } from '@/database/models/messengerInstallation';
+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
+import { exchangeCode } from '@/server/services/messenger/oauth/slackOAuth';
+import { consumeOAuthState } from '@/server/services/messenger/oauth/stateStore';
+
+import { GET } from './route';
+
+vi.mock('@/database/core/db-adaptor', () => ({
+ getServerDB: vi.fn().mockResolvedValue({}),
+}));
+
+vi.mock('@/database/models/messengerInstallation', () => ({
+ MessengerInstallationModel: {
+ findByTenant: vi.fn(),
+ upsert: vi.fn(),
+ },
+}));
+
+vi.mock('@/server/services/messenger/oauth/stateStore', () => ({
+ consumeOAuthState: vi.fn(),
+}));
+
+vi.mock('@/server/services/messenger/oauth/slackOAuth', () => ({
+ exchangeCode: vi.fn(),
+}));
+
+vi.mock('@/server/modules/KeyVaultsEncrypt', () => ({
+ KeyVaultsGateKeeper: {
+ initWithEnvKey: vi.fn(),
+ },
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerDiscordConfig: vi.fn(),
+ getMessengerSlackConfig: vi.fn(),
+}));
+
+vi.mock('@/envs/app', () => ({
+ appEnv: { APP_URL: 'https://app.example.com' },
+}));
+
+const { getMessengerSlackConfig, getMessengerDiscordConfig } = await import('@/config/messenger');
+
+const VALID_SLACK_CONFIG = {
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+};
+
+const VALID_DISCORD_CONFIG = {
+ applicationId: 'D_APP',
+ botToken: 'bot-token',
+ clientSecret: 'd-secret',
+ publicKey: 'pubkey',
+};
+
+const buildRequest = (platform: string, qs: string): Request =>
+ new Request(`https://app.example.com/api/agent/messenger/${platform}/oauth/callback?${qs}`);
+const ctx = (platform: string) => ({ params: Promise.resolve({ platform }) });
+
+beforeEach(() => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(VALID_SLACK_CONFIG);
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValue(VALID_DISCORD_CONFIG);
+ vi.mocked(KeyVaultsGateKeeper.initWithEnvKey).mockResolvedValue({} as any);
+ vi.mocked(consumeOAuthState).mockResolvedValue({ lobeUserId: 'lobe-user-1', ts: Date.now() });
+ vi.mocked(exchangeCode).mockResolvedValue({
+ access_token: 'xoxb-real',
+ app_id: 'A_APP',
+ authed_user: { id: 'U_INSTALLER' },
+ bot_user_id: 'U_BOT',
+ is_enterprise_install: false,
+ ok: true,
+ scope: 'chat:write,im:history',
+ team: { id: 'T_ACME', name: 'Acme Inc' },
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(null);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('GET /api/agent/messenger/[platform]/oauth/callback', () => {
+ describe('platform routing', () => {
+ it('404s for an unknown platform', async () => {
+ const res = await GET(buildRequest('unknown', 'code=c&state=s'), ctx('unknown'));
+ expect(res.status).toBe(404);
+ });
+
+ it('404s for telegram (no OAuth adapter)', async () => {
+ const res = await GET(buildRequest('telegram', 'code=c&state=s'), ctx('telegram'));
+ expect(res.status).toBe(404);
+ });
+ });
+
+ describe('slack — error / validation paths', () => {
+ it('redirects to settings with error when the upstream returned ?error=', async () => {
+ const res = await GET(buildRequest('slack', 'error=access_denied'), ctx('slack'));
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.pathname).toBe('/settings/messenger/slack');
+ expect(loc.searchParams.get('error')).toBe('access_denied');
+ });
+
+ it('redirects to settings with missing_code_or_state when params are absent', async () => {
+ const res = await GET(buildRequest('slack', ''), ctx('slack'));
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.pathname).toBe('/settings/messenger/slack');
+ expect(loc.searchParams.get('error')).toBe('missing_code_or_state');
+ });
+
+ it('returns 503 when Slack messenger env is not configured', async () => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(null);
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+ expect(res.status).toBe(503);
+ });
+
+ it('redirects with invalid_state when the state token has expired or never existed', async () => {
+ vi.mocked(consumeOAuthState).mockResolvedValue(null);
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.searchParams.get('error')).toBe('invalid_state');
+ });
+
+ it('redirects with exchange_failed when oauth.v2.access throws', async () => {
+ vi.mocked(exchangeCode).mockRejectedValue(new Error('upstream 502'));
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.searchParams.get('error')).toBe('exchange_failed');
+ });
+
+ it('redirects with exchange_failed when neither team.id nor enterprise.id is present', async () => {
+ vi.mocked(exchangeCode).mockResolvedValue({
+ access_token: 'xoxb-real',
+ app_id: 'A_APP',
+ is_enterprise_install: false,
+ ok: true,
+ team: null,
+ });
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ // missing_tenant is mapped to exchange_failed at the route level since
+ // the adapter throws — error code surface stays generic per platform.
+ expect(loc.searchParams.get('error')).toBe('exchange_failed');
+ });
+ });
+
+ describe('slack — happy path: workspace install', () => {
+ it('persists the installation and redirects to slack.com/app/open', async () => {
+ const res = await GET(buildRequest('slack', 'code=the-code&state=the-state'), ctx('slack'));
+
+ expect(consumeOAuthState).toHaveBeenCalledWith('the-state');
+ expect(exchangeCode).toHaveBeenCalledWith({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ code: 'the-code',
+ redirectUri: 'https://app.example.com/api/agent/messenger/slack/oauth/callback',
+ });
+ expect(MessengerInstallationModel.upsert).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.objectContaining({
+ accountId: 'U_BOT',
+ applicationId: 'A_APP',
+ credentials: { botToken: 'xoxb-real' },
+ installedByPlatformUserId: 'U_INSTALLER',
+ installedByUserId: 'lobe-user-1',
+ metadata: expect.objectContaining({
+ isEnterpriseInstall: false,
+ scope: 'chat:write,im:history',
+ tenantName: 'Acme Inc',
+ }),
+ platform: 'slack',
+ tenantId: 'T_ACME',
+ }),
+ expect.anything(),
+ );
+
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.origin + loc.pathname).toBe('https://slack.com/app/open');
+ expect(loc.searchParams.get('team')).toBe('T_ACME');
+ expect(loc.searchParams.get('id')).toBe('A_APP');
+ });
+
+ it('stores refreshToken + tokenExpiresAt when token rotation is enabled', async () => {
+ vi.mocked(exchangeCode).mockResolvedValue({
+ access_token: 'xoxe.xoxb-rot',
+ app_id: 'A_APP',
+ bot_user_id: 'U_BOT',
+ expires_in: 43_200,
+ is_enterprise_install: false,
+ ok: true,
+ refresh_token: 'xoxe-1-r',
+ team: { id: 'T_ROT', name: 'Rotating' },
+ });
+
+ await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+
+ const upsertCall = vi.mocked(MessengerInstallationModel.upsert).mock.calls.at(-1)!;
+ const params = upsertCall[1];
+ expect(params.credentials).toEqual({
+ botToken: 'xoxe.xoxb-rot',
+ refreshToken: 'xoxe-1-r',
+ });
+ expect(params.tokenExpiresAt).toBeInstanceOf(Date);
+ });
+ });
+
+ describe('slack — takeover guard', () => {
+ const existingInstall = {
+ applicationId: 'A_APP',
+ credentials: {},
+ id: 'install-1',
+ installedByPlatformUserId: 'U_FIRST_PLATFORM',
+ installedByUserId: 'lobe-user-other',
+ platform: 'slack',
+ revokedAt: null,
+ tenantId: 'T_ACME',
+ } as any;
+
+ it('refreshes credentials but preserves the original owner, then redirects with already_installed', async () => {
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(existingInstall);
+
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+
+ expect(MessengerInstallationModel.upsert).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.objectContaining({
+ credentials: { botToken: 'xoxb-real' },
+ installedByPlatformUserId: 'U_FIRST_PLATFORM',
+ installedByUserId: 'lobe-user-other',
+ tenantId: 'T_ACME',
+ }),
+ expect.anything(),
+ );
+
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.pathname).toBe('/settings/messenger/slack');
+ expect(loc.searchParams.get('error')).toBe('already_installed');
+ expect(loc.searchParams.get('workspace')).toBe('Acme Inc');
+ });
+
+ it('allows takeover when the previous installer was deleted (installedByUserId null)', async () => {
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue({
+ ...existingInstall,
+ installedByUserId: null,
+ });
+
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+
+ expect(MessengerInstallationModel.upsert).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.objectContaining({ installedByUserId: 'lobe-user-1' }),
+ expect.anything(),
+ );
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.origin + loc.pathname).toBe('https://slack.com/app/open');
+ });
+
+ it('allows the same user to re-install (token refresh / scope bump)', async () => {
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue({
+ ...existingInstall,
+ installedByUserId: 'lobe-user-1',
+ });
+
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+
+ expect(MessengerInstallationModel.upsert).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.objectContaining({ installedByUserId: 'lobe-user-1' }),
+ expect.anything(),
+ );
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.origin + loc.pathname).toBe('https://slack.com/app/open');
+ });
+ });
+
+ describe('slack — Enterprise Grid org install', () => {
+ it('keys on enterprise.id and lands on the settings page (no slack.com/app/open)', async () => {
+ vi.mocked(exchangeCode).mockResolvedValue({
+ access_token: 'xoxb-org',
+ app_id: 'A_APP',
+ bot_user_id: 'U_BOT',
+ enterprise: { id: 'E_BIG', name: 'Big Co' },
+ is_enterprise_install: true,
+ ok: true,
+ team: null,
+ });
+
+ const res = await GET(buildRequest('slack', 'code=c&state=s'), ctx('slack'));
+
+ const upsertCall = vi.mocked(MessengerInstallationModel.upsert).mock.calls.at(-1)!;
+ const params = upsertCall[1];
+ expect(params.tenantId).toBe('E_BIG');
+ expect(params.metadata).toEqual(
+ expect.objectContaining({
+ enterpriseId: 'E_BIG',
+ isEnterpriseInstall: true,
+ tenantName: 'Big Co',
+ }),
+ );
+
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.pathname).toBe('/settings/messenger/slack');
+ expect(loc.searchParams.get('installed')).toBe('ok');
+ });
+ });
+
+ describe('discord — happy path: guild install', () => {
+ let originalFetch: typeof globalThis.fetch;
+ const fetchMock = vi.fn();
+
+ beforeEach(() => {
+ originalFetch = globalThis.fetch;
+ fetchMock.mockResolvedValue(
+ new Response(
+ JSON.stringify({
+ access_token: 'd-access',
+ application: { id: 'D_APP' },
+ expires_in: 604_800,
+ guild: { icon: null, id: 'G_GUILD', name: 'My Guild' },
+ refresh_token: 'd-refresh',
+ scope: 'bot applications.commands',
+ token_type: 'Bearer',
+ }),
+ { headers: { 'Content-Type': 'application/json' }, status: 200 },
+ ),
+ );
+ globalThis.fetch = fetchMock as unknown as typeof globalThis.fetch;
+ });
+
+ afterEach(() => {
+ globalThis.fetch = originalFetch;
+ fetchMock.mockReset();
+ });
+
+ it('persists the installation and falls back to settings (no deep link for discord)', async () => {
+ const res = await GET(
+ buildRequest('discord', 'code=the-code&state=the-state'),
+ ctx('discord'),
+ );
+
+ expect(fetchMock).toHaveBeenCalledWith(
+ 'https://discord.com/api/oauth2/token',
+ expect.objectContaining({ method: 'POST' }),
+ );
+ expect(MessengerInstallationModel.upsert).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.objectContaining({
+ applicationId: 'D_APP',
+ credentials: { accessToken: 'd-access', refreshToken: 'd-refresh' },
+ metadata: expect.objectContaining({ tenantName: 'My Guild' }),
+ platform: 'discord',
+ tenantId: 'G_GUILD',
+ }),
+ expect.anything(),
+ );
+
+ expect(res.status).toBe(302);
+ const loc = new URL(res.headers.get('location')!);
+ expect(loc.pathname).toBe('/settings/messenger/discord');
+ expect(loc.searchParams.get('installed')).toBe('ok');
+ });
+ });
+});
diff --git a/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.ts b/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.ts
new file mode 100644
index 00000000000..35f5eaa5ca3
--- /dev/null
+++ b/src/app/(backend)/api/agent/messenger/[platform]/oauth/callback/route.ts
@@ -0,0 +1,204 @@
+import debug from 'debug';
+
+import { getServerDB } from '@/database/core/db-adaptor';
+import { MessengerInstallationModel } from '@/database/models/messengerInstallation';
+import { appEnv } from '@/envs/app';
+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
+import { consumeOAuthState } from '@/server/services/messenger/oauth/stateStore';
+import { messengerPlatformRegistry } from '@/server/services/messenger/platforms';
+
+const log = debug('lobe-server:messenger:oauth-callback');
+
+const SETTINGS_PATH = '/settings/messenger';
+
+// All OAuth callbacks land on the per-platform detail page so the user sees the
+// freshly-installed workspace/server without an extra click. The detail page
+// reads `installed=ok` / `error=...` / `workspace=...` from the URL.
+const redirectToPlatform = (origin: string, platform: string, query?: string): Response => {
+ const target = new URL(`${SETTINGS_PATH}/${platform}${query ? `?${query}` : ''}`, origin);
+ return Response.redirect(target, 302);
+};
+
+const errorRedirect = (origin: string, platform: string, code: string, extra?: URLSearchParams) => {
+ const params = new URLSearchParams(extra);
+ params.set('error', code);
+ return redirectToPlatform(origin, platform, params.toString());
+};
+
+/**
+ * Generic OAuth redirect target for the per-tenant install flow. The upstream
+ * (Slack / Discord / …) hits this with `?code=...&state=...` (success) or
+ * `?error=access_denied` (cancel). Platform-specific concerns — token
+ * exchange, response shape, deep-link target — live behind the platform's
+ * `oauth` adapter at `platforms/<id>/oauth.ts`.
+ *
+ * Success path:
+ * 1. Validate single-use state → recover the LobeHub user who initiated
+ * 2. Exchange the code via the platform adapter, normalised into
+ * `NormalizedInstallation`
+ * 3. Detect tenant takeover (another LobeHub user already owns this row)
+ * 4. Encrypt + upsert into `messenger_installations`
+ * 5. Hand off to the platform's deep-link redirect (Slack
+ * `slack.com/app/open`) or fall back to the settings page.
+ */
+export const GET = async (
+ req: Request,
+ { params }: { params: Promise<{ platform: string }> },
+): Promise<Response> => {
+ const { platform } = await params;
+ const url = new URL(req.url);
+
+ const definition = messengerPlatformRegistry.getPlatform(platform);
+ if (!definition?.oauth) {
+ log('callback: platform %s has no OAuth adapter', platform);
+ return new Response(`Messenger platform "${platform}" does not support OAuth install.`, {
+ status: 404,
+ });
+ }
+
+ const errorParam = url.searchParams.get('error');
+ if (errorParam) {
+ log('callback[%s]: user denied or upstream error: %s', platform, errorParam);
+ return errorRedirect(url.origin, platform, errorParam);
+ }
+
+ const code = url.searchParams.get('code');
+ const state = url.searchParams.get('state');
+ if (!code || !state) {
+ log('callback[%s]: missing code or state', platform);
+ return errorRedirect(url.origin, platform, 'missing_code_or_state');
+ }
+
+ const config = await definition.oauth.getAppConfig();
+ if (!config) {
+ log('callback[%s]: messenger env not configured', platform);
+ return new Response(
+ `${definition.name} messenger is not configured on this LobeHub deployment.`,
+ { status: 503 },
+ );
+ }
+
+ if (!appEnv.APP_URL) {
+ return new Response('APP_URL is not configured', { status: 503 });
+ }
+
+ // 1. State validation — single-use; gone after this call.
+ const statePayload = await consumeOAuthState(state);
+ if (!statePayload) {
+ log('callback[%s]: invalid or expired state', platform);
+ return errorRedirect(url.origin, platform, 'invalid_state');
+ }
+
+ // 2. Exchange via platform adapter. Use the SAME redirect_uri we generated
+ // at install time — most upstreams reject the exchange otherwise.
+ const redirectUri = `${appEnv.APP_URL.replace(/\/$/, '')}/api/agent/messenger/${platform}/oauth/callback`;
+ let install;
+ try {
+ install = await definition.oauth.exchangeCode({
+ clientId: config.clientId,
+ clientSecret: config.clientSecret,
+ code,
+ redirectUri,
+ });
+ } catch (error) {
+ log('callback[%s]: exchangeCode failed: %O', platform, error);
+ return errorRedirect(url.origin, platform, 'exchange_failed');
+ }
+
+ // 3. Detect takeover by another LobeHub user. The tenant install is shared
+ // infrastructure: whoever connected first owns the row. OAuth doesn't let
+ // us refuse the install (the token has already been minted by the time we
+ // get here), and revoking would uninstall the App from the tenant —
+ // destructive — so instead we **refresh the credentials** (the upstream
+ // may have rotated tokens as part of the re-install) but **preserve the
+ // original owner**. The new user is told the tenant is already connected
+ // and routed to DM the bot for personal-account linking.
+ //
+ // Re-installs by the SAME user (token refresh / scope bump) and takeovers
+ // after the previous owner was deleted (`installed_by_user_id IS NULL`)
+ // or the install was revoked (`revoked_at IS NOT NULL`) take normal
+ // ownership.
+ const serverDB = await getServerDB();
+ const existing = await MessengerInstallationModel.findByTenant(
+ serverDB,
+ platform,
+ install.tenantId,
+ install.applicationId,
+ );
+ const isTakeoverAttempt =
+ !!existing &&
+ !!existing.installedByUserId &&
+ existing.installedByUserId !== statePayload.lobeUserId;
+
+ // 4. Encrypt + upsert.
+ let gateKeeper: KeyVaultsGateKeeper | undefined;
+ try {
+ gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey();
+ } catch (error) {
+ log(
+ 'callback[%s]: KeyVaultsGateKeeper init failed (KEY_VAULTS_SECRET unset?): %O',
+ platform,
+ error,
+ );
+ return new Response(
+ `Server is missing KEY_VAULTS_SECRET — ${definition.name} install token cannot be encrypted.`,
+ { status: 503 },
+ );
+ }
+
+ try {
+ await MessengerInstallationModel.upsert(
+ serverDB,
+ {
+ accountId: install.accountId,
+ applicationId: install.applicationId,
+ credentials: install.credentials,
+ installedByPlatformUserId: isTakeoverAttempt
+ ? existing!.installedByPlatformUserId
+ : install.installedByPlatformUserId,
+ installedByUserId: isTakeoverAttempt
+ ? existing!.installedByUserId
+ : statePayload.lobeUserId,
+ metadata: install.metadata,
+ platform,
+ tenantId: install.tenantId,
+ tokenExpiresAt: install.tokenExpiresAt,
+ },
+ gateKeeper,
+ );
+ } catch (error) {
+ log('callback[%s]: failed to persist installation row: %O', platform, error);
+ return errorRedirect(url.origin, platform, 'persist_failed');
+ }
+
+ // 5. Branch on outcome. Takeover attempts get bounced to settings with a
+ // dedicated error so the page can render a Modal explaining the situation
+ // (tenant name lets the UI name the workspace/guild).
+ if (isTakeoverAttempt) {
+ log(
+ 'callback[%s]: refreshed credentials for tenant=%s but preserved owner=%s (blocked takeover by user=%s)',
+ platform,
+ install.tenantId,
+ existing!.installedByUserId,
+ statePayload.lobeUserId,
+ );
+ const extra = new URLSearchParams();
+ if (install.tenantName) extra.set('workspace', install.tenantName);
+ return errorRedirect(url.origin, platform, 'already_installed', extra);
+ }
+
+ // 6. Hand off to the platform's deep-link if it provides one, otherwise
+ // fall back to the settings page with a `<platform>_installed=ok` flag.
+ const deepLink = definition.oauth.buildPostInstallRedirect?.(install, url.origin);
+ if (deepLink) {
+ log(
+ 'callback[%s]: install complete for tenant=%s, redirecting to %s',
+ platform,
+ install.tenantId,
+ deepLink,
+ );
+ return Response.redirect(deepLink, 302);
+ }
+
+ return redirectToPlatform(url.origin, platform, 'installed=ok');
+};
diff --git a/src/app/(backend)/api/agent/messenger/webhooks/[platform]/route.ts b/src/app/(backend)/api/agent/messenger/webhooks/[platform]/route.ts
new file mode 100644
index 00000000000..c26a07bd515
--- /dev/null
+++ b/src/app/(backend)/api/agent/messenger/webhooks/[platform]/route.ts
@@ -0,0 +1,28 @@
+import debug from 'debug';
+
+import { getMessengerRouter } from '@/server/services/messenger';
+
+const log = debug('lobe-server:messenger:webhook-route');
+
+/**
+ * Webhook endpoint for the shared Messenger bot.
+ *
+ * Distinct from `/api/agent/webhooks/[platform]/[appId]` which routes per-user
+ * Bot Channels by `applicationId`. Here, the bot is global per platform with
+ * credentials in env, and routing is by message sender → linked agent.
+ *
+ * - POST /api/agent/messenger/webhooks/telegram
+ * - POST /api/agent/messenger/webhooks/slack (planned)
+ */
+export const POST = async (
+ req: Request,
+ { params }: { params: Promise<{ platform: string }> },
+): Promise<Response> => {
+ const { platform } = await params;
+
+ log('Received messenger webhook: platform=%s, url=%s', platform, req.url);
+
+ const router = getMessengerRouter();
+ const handler = router.getWebhookHandler(platform);
+ return handler(req);
+};
diff --git a/src/app/[variants]/(auth)/_layout/createAuthI18n.ts b/src/app/[variants]/(auth)/_layout/createAuthI18n.ts
index e162b7e942b..eb519e8ceb3 100644
--- a/src/app/[variants]/(auth)/_layout/createAuthI18n.ts
+++ b/src/app/[variants]/(auth)/_layout/createAuthI18n.ts
@@ -11,6 +11,7 @@ const AUTH_I18N_NAMESPACES = [
'common',
'error',
'marketAuth',
+ 'messenger',
'oauth',
] as const;
type AuthI18nNamespace = (typeof AUTH_I18N_NAMESPACES)[number];
@@ -35,6 +36,9 @@ const loadDefaultNamespace = async (ns: AuthI18nNamespace) => {
case 'marketAuth': {
return import('@/locales/default/marketAuth');
}
+ case 'messenger': {
+ return import('@/locales/default/messenger');
+ }
case 'oauth': {
return import('@/locales/default/oauth');
}
@@ -58,6 +62,9 @@ const loadZhNamespace = async (ns: AuthI18nNamespace) => {
case 'marketAuth': {
return import('@/../locales/zh-CN/marketAuth.json');
}
+ case 'messenger': {
+ return import('@/../locales/zh-CN/messenger.json');
+ }
case 'oauth': {
return import('@/../locales/zh-CN/oauth.json');
}
diff --git a/src/app/[variants]/(auth)/verify-im/page.tsx b/src/app/[variants]/(auth)/verify-im/page.tsx
new file mode 100644
index 00000000000..c53680bc47c
--- /dev/null
+++ b/src/app/[variants]/(auth)/verify-im/page.tsx
@@ -0,0 +1,3 @@
+import MessengerVerifyPage from '@/features/Messenger/Verify';
+
+export default MessengerVerifyPage;
diff --git a/src/config/messenger.ts b/src/config/messenger.ts
new file mode 100644
index 00000000000..df5b5d3ad96
--- /dev/null
+++ b/src/config/messenger.ts
@@ -0,0 +1,188 @@
+import { createEnv } from '@t3-oss/env-nextjs';
+import debug from 'debug';
+import { z } from 'zod';
+
+import { getServerDB } from '@/database/core/db-adaptor';
+import {
+ type DecryptedSystemBotProvider,
+ SystemBotProviderModel,
+} from '@/database/models/systemBotProvider';
+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
+
+const log = debug('lobe-server:messenger:config');
+
+/**
+ * Messenger bot configuration — DB-backed.
+ *
+ * Replaces the env-only path. Credentials live in `system_bot_providers` and
+ * are managed from develop-center. The only env knob left is the link-token
+ * TTL (no secrets, just a tunable).
+ *
+ * Two distribution models still apply downstream:
+ *
+ * - **Global-token platforms (Telegram, Discord)**: a single LobeHub-owned
+ * bot serves every user. The full credential bundle for the bot lives in
+ * the row.
+ *
+ * - **Per-tenant OAuth platforms (Slack)**: the row carries App-level
+ * credentials (`appId` / `clientId` / `clientSecret` / `signingSecret`);
+ * each workspace bot token is acquired via OAuth on install and stored
+ * in `messenger_installations`.
+ */
+export const getMessengerConfig = () => {
+ return createEnv({
+ client: {},
+ runtimeEnv: {
+ LOBE_LINK_TOKEN_TTL_SECONDS: process.env.LOBE_LINK_TOKEN_TTL_SECONDS,
+ },
+ server: {
+ LOBE_LINK_TOKEN_TTL_SECONDS: z.coerce.number().int().positive().default(1800),
+ },
+ });
+};
+
+export const messengerEnv = getMessengerConfig();
+
+export type MessengerPlatform = 'telegram' | 'slack' | 'discord';
+
+export interface MessengerTelegramConfig {
+ botToken: string;
+ botUsername?: string;
+ webhookSecret?: string;
+}
+
+export interface MessengerSlackConfig {
+ appId: string;
+ clientId: string;
+ clientSecret: string;
+ signingSecret: string;
+}
+
+export interface MessengerDiscordConfig {
+ applicationId: string;
+ botToken: string;
+ /**
+ * Discord OAuth client secret. Required only for the per-guild install flow
+ * (`[platform]/install` → `[platform]/oauth/callback`). The runtime bot
+ * itself uses `botToken` only, so legacy deployments without OAuth wiring
+ * keep working.
+ */
+ clientSecret?: string;
+ publicKey: string;
+}
+
+// ---------------------------------------------------------------------------
+// In-process cache.
+//
+// Webhooks fire frequently — every Discord MESSAGE_CREATE, every Slack event,
+// every Telegram update would otherwise hit the DB to read the App config.
+// 30s TTL keeps the round-trip out of the hot path while letting credential
+// rotations from dc-center take effect within ~30s without a deploy.
+// ---------------------------------------------------------------------------
+
+const CACHE_TTL_MS = 30_000;
+
+interface CacheEntry<T> {
+ expiresAt: number;
+ value: T | null;
+}
+
+const platformCache = new Map<MessengerPlatform, CacheEntry<unknown>>();
+
+/** Drop the cached config for a platform (or all). Called by mutations after
+ * the dc-center admin saves new credentials. Best-effort: cross-process
+ * invalidation is not guaranteed (Vercel functions don't share memory), so
+ * the 30s TTL is the real backstop. */
+export const invalidateMessengerConfigCache = (platform?: MessengerPlatform): void => {
+ if (platform) {
+ platformCache.delete(platform);
+ } else {
+ platformCache.clear();
+ }
+};
+
+const fetchAndCache = async <T>(
+ platform: MessengerPlatform,
+ decode: (decrypted: DecryptedSystemBotProvider) => T | null,
+): Promise<T | null> => {
+ const cached = platformCache.get(platform) as CacheEntry<T> | undefined;
+ if (cached && cached.expiresAt > Date.now()) return cached.value;
+
+ let value: T | null = null;
+ try {
+ const db = await getServerDB();
+ const gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey().catch(() => undefined);
+ const row = await SystemBotProviderModel.findEnabledByPlatform(db, platform, gateKeeper);
+ if (row) value = decode(row);
+ } catch (error) {
+ log('fetchAndCache: lookup failed for platform=%s: %O', platform, error);
+ }
+
+ platformCache.set(platform, { expiresAt: Date.now() + CACHE_TTL_MS, value });
+ return value;
+};
+
+export const getMessengerTelegramConfig = async (): Promise<MessengerTelegramConfig | null> => {
+ return fetchAndCache<MessengerTelegramConfig>('telegram', (row) => {
+ const c = row.credentials as Partial<MessengerTelegramConfig>;
+ if (!c.botToken) return null;
+ return {
+ botToken: c.botToken,
+ botUsername: c.botUsername,
+ webhookSecret: c.webhookSecret,
+ };
+ });
+};
+
+export const getMessengerSlackConfig = async (): Promise<MessengerSlackConfig | null> => {
+ return fetchAndCache<MessengerSlackConfig>('slack', (row) => {
+ const c = row.credentials as Partial<Omit<MessengerSlackConfig, 'appId'>>;
+ if (!row.applicationId || !c.clientId || !c.clientSecret || !c.signingSecret) return null;
+ return {
+ appId: row.applicationId,
+ clientId: c.clientId,
+ clientSecret: c.clientSecret,
+ signingSecret: c.signingSecret,
+ };
+ });
+};
+
+export const getMessengerDiscordConfig = async (): Promise<MessengerDiscordConfig | null> => {
+ return fetchAndCache<MessengerDiscordConfig>('discord', (row) => {
+ const c = row.credentials as Partial<Omit<MessengerDiscordConfig, 'applicationId'>>;
+ if (!row.applicationId || !c.botToken || !c.publicKey) return null;
+ return {
+ applicationId: row.applicationId,
+ botToken: c.botToken,
+ clientSecret: c.clientSecret,
+ publicKey: c.publicKey,
+ };
+ });
+};
+
+export const isMessengerPlatformEnabled = async (platform: MessengerPlatform): Promise<boolean> => {
+ switch (platform) {
+ case 'telegram': {
+ return !!(await getMessengerTelegramConfig());
+ }
+ case 'slack': {
+ return !!(await getMessengerSlackConfig());
+ }
+ case 'discord': {
+ return !!(await getMessengerDiscordConfig());
+ }
+ default: {
+ return false;
+ }
+ }
+};
+
+export const getEnabledMessengerPlatforms = async (): Promise<MessengerPlatform[]> => {
+ const platforms = ['telegram', 'slack', 'discord'] as const;
+ const checks = await Promise.all(
+ platforms.map(async (p) => ((await isMessengerPlatformEnabled(p)) ? p : null)),
+ );
+ return checks.filter((p): p is MessengerPlatform => p !== null);
+};
+
+export const getMessengerLinkTokenTtl = (): number => messengerEnv.LOBE_LINK_TOKEN_TTL_SECONDS;
diff --git a/src/features/Messenger/AgentSelect.tsx b/src/features/Messenger/AgentSelect.tsx
new file mode 100644
index 00000000000..42d1aca6fee
--- /dev/null
+++ b/src/features/Messenger/AgentSelect.tsx
@@ -0,0 +1,69 @@
+'use client';
+
+import { Avatar, Flexbox, Select, type SelectProps, Text } from '@lobehub/ui';
+import { memo, useMemo } from 'react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import { DEFAULT_AVATAR } from '@/const/meta';
+import { messengerService } from '@/services/messenger';
+
+interface AgentSelectProps extends Omit<
+ SelectProps,
+ 'options' | 'showSearch' | 'optionFilterProp' | 'value' | 'onChange'
+> {
+ onChange?: (agentId: string | undefined) => void;
+ value?: string;
+}
+
+/**
+ * Shared agent picker used wherever the messenger feature asks the user to
+ * pick which agent receives messages. Single source of truth for the option
+ * shape (avatar + title, locale-aware fallback) so verify-im and the Settings
+ * panel render identically. Fetches `messenger.listAgentsForBinding` (which
+ * already pins LobeAI to the top and matches the bot's `/agents` ordering).
+ */
+const AgentSelect = memo<AgentSelectProps>(({ value, onChange, ...rest }) => {
+ const { t: tCommon } = useTranslation('common');
+ const agentsSWR = useSWR('messenger:agentsForBinding', () =>
+ messengerService.listAgentsForBinding(),
+ );
+
+ const defaultAgentTitle = tCommon('defaultSession');
+ const options = useMemo(
+ () =>
+ (agentsSWR.data ?? []).map((agent) => {
+ const title = agent.title || defaultAgentTitle;
+ return {
+ label: (
+ <Flexbox horizontal align="center" gap={8}>
+ <Avatar
+ avatar={agent.avatar || DEFAULT_AVATAR}
+ background={agent.backgroundColor ?? undefined}
+ size={20}
+ />
+ <Text ellipsis>{title}</Text>
+ </Flexbox>
+ ),
+ searchValue: title,
+ title,
+ value: agent.id,
+ };
+ }),
+ [agentsSWR.data, defaultAgentTitle],
+ );
+
+ return (
+ <Select
+ optionFilterProp="searchValue"
+ options={options}
+ value={value}
+ onChange={(next) => onChange?.(next as string | undefined)}
+ {...rest}
+ />
+ );
+});
+
+AgentSelect.displayName = 'MessengerAgentSelect';
+
+export default AgentSelect;
diff --git a/src/features/Messenger/IntegrationDetail/Discord.tsx b/src/features/Messenger/IntegrationDetail/Discord.tsx
new file mode 100644
index 00000000000..1579d9301de
--- /dev/null
+++ b/src/features/Messenger/IntegrationDetail/Discord.tsx
@@ -0,0 +1,153 @@
+'use client';
+
+import { Button, Icon, Text } from '@lobehub/ui';
+import { LinkIcon, ServerIcon, Trash2Icon, UserIcon } from 'lucide-react';
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { buildDiscordOpenBotUrl } from '../constants';
+import LinkModal from '../LinkModal';
+import {
+ ConnectionRow,
+ DetailLayout,
+ IntegrationDetailSkeleton,
+ styles,
+ useDisconnectInstallation,
+ useLinkActions,
+ useMessengerData,
+ UserAgentConnection,
+} from './shared';
+
+interface DiscordDetailProps {
+ appId?: string;
+ botUsername?: string;
+ name: string;
+ onBack: () => void;
+}
+
+// Discord: a single global user link (Discord uses an env-side bot token, so
+// there's no per-guild link), plus an audit list of server installs.
+// Disconnecting only removes the audit entry — the bot stays in the guild
+// until a server admin kicks it. Disconnect copy
+// (`messenger.discord.connections.*`) makes that distinction explicit.
+const DiscordDetail = memo<DiscordDetailProps>(({ appId, botUsername, name, onBack }) => {
+ const { t } = useTranslation('messenger');
+ const [linkOpen, setLinkOpen] = useState(false);
+
+ const data = useMessengerData('discord');
+ const { handleSetActive, handleUnlink } = useLinkActions({
+ installationsMutate: data.installationsMutate,
+ linksMutate: data.linksMutate,
+ name,
+ platform: 'discord',
+ });
+ const disconnectInstallation = useDisconnectInstallation({
+ installationsMutate: data.installationsMutate,
+ linksMutate: data.linksMutate,
+ });
+
+ const handleDisconnectInstallation = (id: string) =>
+ disconnectInstallation(id, {
+ confirm: t('messenger.discord.connections.disconnectConfirm'),
+ failedKey: 'messenger.discord.connections.disconnectFailed',
+ success: t('messenger.discord.connections.disconnectSuccess'),
+ title: t('messenger.discord.connections.disconnectTitle'),
+ });
+
+ if (data.isInitialLoading) return <IntegrationDetailSkeleton withNestedContent />;
+
+ const { installations, links } = data;
+ const hasInstallations = installations.length > 0;
+ const hasLinks = links.length > 0;
+ const link = links[0];
+
+ const headerAction = (
+ <Button
+ icon={<Icon icon={LinkIcon} />}
+ type={hasInstallations ? 'default' : 'primary'}
+ onClick={() => setLinkOpen(true)}
+ >
+ {hasInstallations ? t('messenger.detail.addServer') : t('messenger.linkCta')}
+ </Button>
+ );
+
+ return (
+ <>
+ <DetailLayout
+ hasConnections={hasInstallations || hasLinks}
+ headerAction={headerAction}
+ name={name}
+ platform="discord"
+ onBack={onBack}
+ >
+ {installations.map((install) => (
+ <ConnectionRow
+ icon={<Icon icon={ServerIcon} size="small" />}
+ key={install.id}
+ label={t('messenger.detail.connections.serverLabel')}
+ name={install.tenantName || install.tenantId}
+ status="connected"
+ action={
+ <Button
+ danger
+ icon={<Icon icon={Trash2Icon} />}
+ size="small"
+ onClick={() => handleDisconnectInstallation(install.id)}
+ >
+ {t('messenger.detail.disconnect')}
+ </Button>
+ }
+ />
+ ))}
+ {link ? (
+ <UserAgentConnection
+ link={link}
+ onSetActive={(agentId) => handleSetActive('', agentId)}
+ onUnlink={() => handleUnlink('')}
+ />
+ ) : (
+ hasInstallations &&
+ appId && (
+ <ConnectionRow
+ icon={<Icon icon={UserIcon} size="small" />}
+ label={t('messenger.detail.connections.userLabel')}
+ name={t('messenger.discord.userPending.name')}
+ status="pending"
+ action={
+ <Button
+ href={buildDiscordOpenBotUrl(appId)}
+ icon={<Icon icon={LinkIcon} />}
+ size="small"
+ target="_blank"
+ type="primary"
+ >
+ {t('messenger.discord.userPending.cta')}
+ </Button>
+ }
+ >
+ <Text style={{ fontSize: 12 }} type="secondary">
+ {t('messenger.discord.userPending.hint')}
+ </Text>
+ </ConnectionRow>
+ )
+ )}
+ {!hasLinks && !hasInstallations && (
+ <div className={styles.emptyRow}>{t('messenger.detail.connections.empty')}</div>
+ )}
+ </DetailLayout>
+
+ <LinkModal
+ appId={appId}
+ botUsername={botUsername}
+ name={name}
+ open={linkOpen}
+ platform="discord"
+ onClose={() => setLinkOpen(false)}
+ />
+ </>
+ );
+});
+
+DiscordDetail.displayName = 'MessengerDiscordDetail';
+
+export default DiscordDetail;
diff --git a/src/features/Messenger/IntegrationDetail/Slack.tsx b/src/features/Messenger/IntegrationDetail/Slack.tsx
new file mode 100644
index 00000000000..3d965f17625
--- /dev/null
+++ b/src/features/Messenger/IntegrationDetail/Slack.tsx
@@ -0,0 +1,137 @@
+'use client';
+
+import { Button, Icon } from '@lobehub/ui';
+import { BriefcaseIcon, LinkIcon, Trash2Icon } from 'lucide-react';
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import LinkModal from '../LinkModal';
+import {
+ ConnectionRow,
+ DetailLayout,
+ IntegrationDetailSkeleton,
+ styles,
+ useDisconnectInstallation,
+ useLinkActions,
+ useMessengerData,
+ UserAgentConnection,
+} from './shared';
+
+interface SlackDetailProps {
+ appId?: string;
+ botUsername?: string;
+ name: string;
+ onBack: () => void;
+}
+
+const SlackDetail = memo<SlackDetailProps>(({ appId, botUsername, name, onBack }) => {
+ const { t } = useTranslation('messenger');
+ const [linkOpen, setLinkOpen] = useState(false);
+
+ const data = useMessengerData('slack');
+ const { handleSetActive, handleUnlink } = useLinkActions({
+ installationsMutate: data.installationsMutate,
+ linksMutate: data.linksMutate,
+ name,
+ platform: 'slack',
+ });
+ const disconnectInstallation = useDisconnectInstallation({
+ installationsMutate: data.installationsMutate,
+ linksMutate: data.linksMutate,
+ });
+
+ // For Slack, disconnecting an install row freezes the workspace's bot —
+ // dispatch is token-gated, so removing the install effectively kills the
+ // workspace integration even though the bot user remains in Slack.
+ const handleDisconnectInstallation = (id: string) =>
+ disconnectInstallation(id, {
+ confirm: t('messenger.slack.connections.disconnectConfirm'),
+ failedKey: 'messenger.slack.connections.disconnectFailed',
+ success: t('messenger.slack.connections.disconnectSuccess'),
+ title: t('messenger.slack.connections.disconnectTitle'),
+ });
+
+ if (data.isInitialLoading) return <IntegrationDetailSkeleton />;
+
+ const { installations, links, tenantNameByTenantId } = data;
+ const hasInstallations = installations.length > 0;
+ const hasLinks = links.length > 0;
+
+ const headerAction = (
+ <Button
+ icon={<Icon icon={LinkIcon} />}
+ type={hasInstallations ? 'default' : 'primary'}
+ onClick={() => setLinkOpen(true)}
+ >
+ {hasInstallations ? t('messenger.detail.addWorkspace') : t('messenger.linkCta')}
+ </Button>
+ );
+
+ // Slack: render one workspace row per install + one user row per link.
+ // Installs without a matching link are surfaced with `pending` status so the
+ // user knows they still need to DM the bot to finish per-account binding.
+ const linkByTenantId = new Map(links.map((l) => [l.tenantId, l]));
+ const allInstallsUnlinked =
+ hasInstallations && installations.every((install) => !linkByTenantId.has(install.tenantId));
+
+ return (
+ <>
+ <DetailLayout
+ hasConnections={hasInstallations || hasLinks}
+ headerAction={headerAction}
+ name={name}
+ platform="slack"
+ onBack={onBack}
+ >
+ {installations.map((install) => (
+ <ConnectionRow
+ icon={<Icon icon={BriefcaseIcon} size="small" />}
+ key={install.id}
+ label={t('messenger.detail.connections.workspaceLabel')}
+ name={install.tenantName || install.tenantId}
+ status="connected"
+ action={
+ <Button
+ danger
+ icon={<Icon icon={Trash2Icon} />}
+ size="small"
+ onClick={() => handleDisconnectInstallation(install.id)}
+ >
+ {t('messenger.detail.disconnect')}
+ </Button>
+ }
+ />
+ ))}
+ {links.map((link) => {
+ const workspace = tenantNameByTenantId.get(link.tenantId) || link.tenantId;
+ return (
+ <UserAgentConnection
+ extraLabel={workspace}
+ key={link.id}
+ link={link}
+ onSetActive={(agentId) => handleSetActive(link.tenantId, agentId)}
+ onUnlink={() => handleUnlink(link.tenantId)}
+ />
+ );
+ })}
+ {/* Installs without any user link yet — gentle nudge to /start in Slack. */}
+ {allInstallsUnlinked && !hasLinks && (
+ <div className={styles.emptyRow}>{t('messenger.detail.connections.linkHint')}</div>
+ )}
+ </DetailLayout>
+
+ <LinkModal
+ appId={appId}
+ botUsername={botUsername}
+ name={name}
+ open={linkOpen}
+ platform="slack"
+ onClose={() => setLinkOpen(false)}
+ />
+ </>
+ );
+});
+
+SlackDetail.displayName = 'MessengerSlackDetail';
+
+export default SlackDetail;
diff --git a/src/features/Messenger/IntegrationDetail/Telegram.tsx b/src/features/Messenger/IntegrationDetail/Telegram.tsx
new file mode 100644
index 00000000000..a85b18565e8
--- /dev/null
+++ b/src/features/Messenger/IntegrationDetail/Telegram.tsx
@@ -0,0 +1,90 @@
+'use client';
+
+import { Button, Icon } from '@lobehub/ui';
+import { LinkIcon, Trash2Icon } from 'lucide-react';
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import LinkModal from '../LinkModal';
+import {
+ DetailLayout,
+ IntegrationDetailSkeleton,
+ styles,
+ useLinkActions,
+ useMessengerData,
+ UserAgentConnection,
+} from './shared';
+
+interface TelegramDetailProps {
+ appId?: string;
+ botUsername?: string;
+ name: string;
+ onBack: () => void;
+}
+
+// Telegram is the only remaining global-token bot with no install audit list,
+// so it's a single global user link with a connect/disconnect toggle in the
+// header.
+const TelegramDetail = memo<TelegramDetailProps>(({ appId, botUsername, name, onBack }) => {
+ const { t } = useTranslation('messenger');
+ const [linkOpen, setLinkOpen] = useState(false);
+
+ const data = useMessengerData('telegram');
+ const { handleSetActive, handleUnlink } = useLinkActions({
+ installationsMutate: data.installationsMutate,
+ linksMutate: data.linksMutate,
+ name,
+ platform: 'telegram',
+ });
+
+ if (data.isInitialLoading) return <IntegrationDetailSkeleton withNestedContent />;
+
+ const { links } = data;
+ const hasLinks = links.length > 0;
+ const link = links[0];
+
+ const headerAction = hasLinks ? (
+ <Button danger icon={<Icon icon={Trash2Icon} />} onClick={() => handleUnlink('')}>
+ {t('messenger.unlinkCta')}
+ </Button>
+ ) : (
+ <Button icon={<Icon icon={LinkIcon} />} type="primary" onClick={() => setLinkOpen(true)}>
+ {t('messenger.linkCta')}
+ </Button>
+ );
+
+ return (
+ <>
+ <DetailLayout
+ hasConnections={hasLinks}
+ headerAction={headerAction}
+ name={name}
+ platform="telegram"
+ onBack={onBack}
+ >
+ {link ? (
+ <UserAgentConnection
+ link={link}
+ onSetActive={(agentId) => handleSetActive('', agentId)}
+ onUnlink={() => handleUnlink('')}
+ />
+ ) : (
+ <div className={styles.emptyRow}>{t('messenger.detail.connections.empty')}</div>
+ )}
+ </DetailLayout>
+
+ <LinkModal
+ appId={appId}
+ botUsername={botUsername}
+ name={name}
+ open={linkOpen}
+ platform="telegram"
+ onClose={() => setLinkOpen(false)}
+ />
+ </>
+ );
+});
+
+TelegramDetail.displayName = 'MessengerTelegramDetail';
+
+export default TelegramDetail;
diff --git a/src/features/Messenger/IntegrationDetail/index.tsx b/src/features/Messenger/IntegrationDetail/index.tsx
new file mode 100644
index 00000000000..03647580f82
--- /dev/null
+++ b/src/features/Messenger/IntegrationDetail/index.tsx
@@ -0,0 +1,35 @@
+'use client';
+
+import { memo } from 'react';
+
+import type { MessengerPlatform } from '../constants';
+import DiscordDetail from './Discord';
+import SlackDetail from './Slack';
+import TelegramDetail from './Telegram';
+
+interface IntegrationDetailProps {
+ appId?: string;
+ botUsername?: string;
+ /** Brand-name label (e.g. `"Slack"`) sourced from the registry. */
+ name: string;
+ onBack: () => void;
+ platform: MessengerPlatform;
+}
+
+const IntegrationDetail = memo<IntegrationDetailProps>(({ platform, ...rest }) => {
+ switch (platform) {
+ case 'slack': {
+ return <SlackDetail {...rest} />;
+ }
+ case 'discord': {
+ return <DiscordDetail {...rest} />;
+ }
+ case 'telegram': {
+ return <TelegramDetail {...rest} />;
+ }
+ }
+});
+
+IntegrationDetail.displayName = 'MessengerIntegrationDetail';
+
+export default IntegrationDetail;
diff --git a/src/features/Messenger/IntegrationDetail/shared.tsx b/src/features/Messenger/IntegrationDetail/shared.tsx
new file mode 100644
index 00000000000..8772f5e6ff3
--- /dev/null
+++ b/src/features/Messenger/IntegrationDetail/shared.tsx
@@ -0,0 +1,381 @@
+'use client';
+
+import { Block, Button, Flexbox, Icon, Skeleton, Tag, Text } from '@lobehub/ui';
+import { App } from 'antd';
+import { createStaticStyles } from 'antd-style';
+import { ArrowLeftIcon, CheckCircle2Icon, Trash2Icon, UserIcon } from 'lucide-react';
+import type { ReactNode } from 'react';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import { messengerService } from '@/services/messenger';
+
+import AgentSelect from '../AgentSelect';
+import { type MessengerPlatform, PlatformAvatar } from '../constants';
+import { getMessengerErrorMessage, type MessengerTranslationKey } from '../i18n';
+
+export const styles = createStaticStyles(({ css, cssVar }) => ({
+ backButton: css`
+ cursor: pointer;
+
+ display: inline-flex;
+ gap: 6px;
+ align-items: center;
+
+ color: ${cssVar.colorTextSecondary};
+
+ &:hover {
+ color: ${cssVar.colorText};
+ }
+ `,
+ card: css`
+ padding: 16px;
+ border: 1px solid ${cssVar.colorBorder};
+ border-radius: ${cssVar.borderRadius};
+ `,
+ emptyRow: css`
+ padding-block: 32px;
+ padding-inline: 16px;
+ border: 1px dashed ${cssVar.colorBorder};
+ border-radius: ${cssVar.borderRadius};
+
+ color: ${cssVar.colorTextSecondary};
+ text-align: center;
+ `,
+ rowIcon: css`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ width: 36px;
+ height: 36px;
+ border-radius: 8px;
+
+ color: ${cssVar.colorTextSecondary};
+
+ background: ${cssVar.colorFillTertiary};
+ `,
+}));
+
+export interface ConnectionRowProps {
+ action?: ReactNode;
+ children?: ReactNode;
+ icon: ReactNode;
+ label: string;
+ name: string;
+ status: 'connected' | 'pending';
+}
+
+export const ConnectionRow = memo<ConnectionRowProps>(
+ ({ action, children, icon, label, name, status }) => {
+ const { t } = useTranslation('messenger');
+
+ return (
+ <Block className={styles.card}>
+ <Flexbox gap={12}>
+ <Flexbox horizontal align="center" gap={12}>
+ <div className={styles.rowIcon}>{icon}</div>
+ <Flexbox flex={1} gap={2}>
+ <Text style={{ fontSize: 12 }} type="secondary">
+ {label}
+ </Text>
+ <Text strong>{name}</Text>
+ </Flexbox>
+ {status === 'connected' ? (
+ <Tag color="success" icon={<Icon icon={CheckCircle2Icon} size="small" />}>
+ {t('messenger.detail.connections.connected')}
+ </Tag>
+ ) : (
+ <Tag color="warning">{t('messenger.detail.connections.pending')}</Tag>
+ )}
+ {action}
+ </Flexbox>
+ {children && <Flexbox style={{ paddingInlineStart: 48 }}>{children}</Flexbox>}
+ </Flexbox>
+ </Block>
+ );
+ },
+);
+ConnectionRow.displayName = 'MessengerConnectionRow';
+
+const ConnectionsSkeleton = memo<{ withNestedContent?: boolean }>(
+ ({ withNestedContent = false }) => (
+ <Flexbox gap={12}>
+ {Array.from({ length: 2 }).map((_, index) => (
+ <Block className={styles.card} key={index}>
+ <Flexbox gap={12}>
+ <Flexbox horizontal align="center" gap={12}>
+ <Skeleton.Avatar active shape={'square'} size={36} />
+ <Flexbox flex={1} gap={6}>
+ <Skeleton.Button active size={'small'} style={{ width: 56 }} />
+ <Skeleton.Button active style={{ height: 18, width: '40%' }} />
+ </Flexbox>
+ <Skeleton.Button active size={'small'} style={{ width: 72 }} />
+ <Skeleton.Button active size={'small'} style={{ width: 84 }} />
+ </Flexbox>
+ {withNestedContent && (
+ <Flexbox gap={6} style={{ paddingInlineStart: 48 }}>
+ <Skeleton.Button active size={'small'} style={{ width: 72 }} />
+ <Skeleton.Button active style={{ height: 32, width: '100%' }} />
+ </Flexbox>
+ )}
+ </Flexbox>
+ </Block>
+ ))}
+ </Flexbox>
+ ),
+);
+ConnectionsSkeleton.displayName = 'MessengerConnectionsSkeleton';
+
+export const IntegrationDetailSkeleton = memo<{ withNestedContent?: boolean }>(
+ ({ withNestedContent = false }) => (
+ <Flexbox gap={20}>
+ <Flexbox horizontal align="center" gap={12}>
+ <Skeleton.Button active size={'small'} style={{ width: 20 }} />
+ <Skeleton.Button active style={{ height: 28, width: 96 }} />
+ </Flexbox>
+
+ <Block className={styles.card}>
+ <Flexbox horizontal align="center" gap={16}>
+ <Skeleton.Avatar active shape={'square'} size={48} />
+ <Flexbox flex={1} gap={6}>
+ <Skeleton.Button active size={'small'} style={{ width: 64 }} />
+ <Skeleton active paragraph={{ rows: 1, width: '65%' }} title={false} />
+ </Flexbox>
+ <Skeleton.Button active style={{ height: 40, width: 120 }} />
+ </Flexbox>
+ </Block>
+
+ <Flexbox gap={8}>
+ <Skeleton.Button active size={'small'} style={{ width: 72 }} />
+ <ConnectionsSkeleton withNestedContent={withNestedContent} />
+ </Flexbox>
+ </Flexbox>
+ ),
+);
+IntegrationDetailSkeleton.displayName = 'MessengerIntegrationDetailSkeleton';
+
+interface DetailLayoutProps {
+ children?: ReactNode;
+ hasConnections: boolean;
+ headerAction: ReactNode;
+ name: string;
+ onBack: () => void;
+ platform: MessengerPlatform;
+}
+
+export const DetailLayout = memo<DetailLayoutProps>(
+ ({ children, headerAction, hasConnections, name, onBack, platform }) => {
+ const { t } = useTranslation('messenger');
+
+ return (
+ <Flexbox gap={20}>
+ <Flexbox horizontal align="center" gap={8}>
+ <span className={styles.backButton} onClick={onBack}>
+ <Icon icon={ArrowLeftIcon} size="small" />
+ </span>
+ <Text strong style={{ fontSize: 20 }}>
+ {name}
+ </Text>
+ </Flexbox>
+
+ <Block className={styles.card}>
+ <Flexbox horizontal align="center" gap={16}>
+ <PlatformAvatar platform={platform} size={48} />
+ <Flexbox flex={1} gap={2}>
+ <Text strong style={{ fontSize: 15 }}>
+ {name}
+ </Text>
+ <Text style={{ fontSize: 13 }} type="secondary">
+ {t(`messenger.list.${platform}.description` as any)}
+ </Text>
+ </Flexbox>
+ {headerAction}
+ </Flexbox>
+ </Block>
+
+ {hasConnections && (
+ <Flexbox gap={8}>
+ <Text strong style={{ fontSize: 15 }}>
+ {t('messenger.detail.connections.title')}
+ </Text>
+ <Flexbox gap={12}>{children}</Flexbox>
+ </Flexbox>
+ )}
+ </Flexbox>
+ );
+ },
+);
+DetailLayout.displayName = 'MessengerDetailLayout';
+
+interface UserLinkLike {
+ activeAgentId: string | null;
+ platformUserId: string;
+ platformUsername: string | null;
+}
+
+export const formatUserHandle = (link: UserLinkLike): string =>
+ link.platformUsername ? `@${link.platformUsername}` : `ID ${link.platformUserId}`;
+
+interface UserAgentConnectionProps {
+ extraLabel?: string;
+ link: UserLinkLike;
+ onSetActive: (agentId: string | null) => void;
+ onUnlink: () => void;
+}
+
+export const UserAgentConnection = memo<UserAgentConnectionProps>(
+ ({ extraLabel, link, onSetActive, onUnlink }) => {
+ const { t } = useTranslation('messenger');
+ const handle = formatUserHandle(link);
+ const name = extraLabel ? `${handle} · ${extraLabel}` : handle;
+
+ return (
+ <ConnectionRow
+ icon={<Icon icon={UserIcon} size="small" />}
+ label={t('messenger.detail.connections.userLabel')}
+ name={name}
+ status="connected"
+ action={
+ <Button danger icon={<Icon icon={Trash2Icon} />} size="small" onClick={onUnlink}>
+ {t('messenger.detail.disconnect')}
+ </Button>
+ }
+ >
+ <Flexbox gap={6}>
+ <Text style={{ fontSize: 12 }} type="secondary">
+ {t('messenger.activeAgent')}
+ </Text>
+ <AgentSelect
+ placeholder={t('messenger.activeAgentPlaceholder')}
+ value={link.activeAgentId ?? undefined}
+ onChange={(agentId) => onSetActive((agentId ?? null) as string | null)}
+ />
+ </Flexbox>
+ </ConnectionRow>
+ );
+ },
+);
+UserAgentConnection.displayName = 'MessengerUserAgentConnection';
+
+export const useMessengerData = (platform: MessengerPlatform) => {
+ const linksSWR = useSWR('messenger:listMyLinks', () => messengerService.listMyLinks());
+ const installationsSWR = useSWR('messenger:listMyInstallations', () =>
+ messengerService.listMyInstallations(),
+ );
+
+ const links = (linksSWR.data ?? []).filter((l) => l.platform === platform);
+ const installations = (installationsSWR.data ?? []).filter((i) => i.platform === platform);
+ const tenantNameByTenantId = new Map(installations.map((i) => [i.tenantId, i.tenantName]));
+ const isInitialLoading = linksSWR.data === undefined || installationsSWR.data === undefined;
+
+ return {
+ installations,
+ installationsMutate: installationsSWR.mutate,
+ isInitialLoading,
+ links,
+ linksMutate: linksSWR.mutate,
+ tenantNameByTenantId,
+ };
+};
+
+interface UseLinkActionsArgs {
+ installationsMutate: () => Promise<unknown>;
+ linksMutate: () => Promise<unknown>;
+ name: string;
+ platform: MessengerPlatform;
+}
+
+export const useLinkActions = ({
+ installationsMutate,
+ linksMutate,
+ name,
+ platform,
+}: UseLinkActionsArgs) => {
+ const { t } = useTranslation('messenger');
+ const { message, modal } = App.useApp();
+
+ const handleSetActive = async (tenantId: string, agentId: string | null) => {
+ try {
+ await messengerService.setActiveAgent({
+ agentId,
+ platform,
+ tenantId: tenantId || undefined,
+ });
+ await linksMutate();
+ message.success(t('messenger.setActiveSuccess'));
+ } catch (error) {
+ message.error(getMessengerErrorMessage(error, t, 'messenger.setActiveFailed'));
+ }
+ };
+
+ const handleUnlink = (tenantId: string) => {
+ modal.confirm({
+ content: t('messenger.unlinkConfirm', { platform: name }),
+ okButtonProps: { danger: true },
+ onOk: async () => {
+ try {
+ await messengerService.unlink({ platform, tenantId: tenantId || undefined });
+ await linksMutate();
+ message.success(t('messenger.unlinkSuccess'));
+ } catch (error) {
+ message.error(getMessengerErrorMessage(error, t, 'messenger.unlinkFailed'));
+ }
+ },
+ title: t('messenger.unlinkTitle'),
+ });
+ };
+
+ return { handleSetActive, handleUnlink };
+};
+
+export interface DisconnectInstallationCopy {
+ /** Confirm modal body. */
+ confirm: string;
+ /** i18n key used for the toast fallback when the server doesn't return a known messenger error. */
+ failedKey: MessengerTranslationKey;
+ /** Toast text on success. */
+ success: string;
+ /** Confirm modal title. */
+ title: string;
+}
+
+interface UseDisconnectInstallationArgs {
+ installationsMutate: () => Promise<unknown>;
+ linksMutate: () => Promise<unknown>;
+}
+
+/**
+ * Disconnect-installation handler shared by Slack and Discord. The copy
+ * diverges sharply between platforms — for Slack the operation freezes the
+ * workspace's bot (token-gated dispatch); for Discord it only removes the
+ * audit entry, since the bot stays in the guild until a server admin kicks
+ * it. The platform passes already-localized strings + the `failedKey` so the
+ * shared hook avoids embedding any platform-specific copy.
+ */
+export const useDisconnectInstallation = ({
+ installationsMutate,
+ linksMutate,
+}: UseDisconnectInstallationArgs) => {
+ const { t } = useTranslation('messenger');
+ const { message, modal } = App.useApp();
+
+ return (id: string, copy: DisconnectInstallationCopy) => {
+ modal.confirm({
+ content: copy.confirm,
+ okButtonProps: { danger: true },
+ onOk: async () => {
+ try {
+ await messengerService.uninstallInstallation({ installationId: id });
+ await installationsMutate();
+ await linksMutate();
+ message.success(copy.success);
+ } catch (error) {
+ message.error(getMessengerErrorMessage(error, t, copy.failedKey));
+ }
+ },
+ title: copy.title,
+ });
+ };
+};
diff --git a/src/features/Messenger/IntegrationList.tsx b/src/features/Messenger/IntegrationList.tsx
new file mode 100644
index 00000000000..65252d926f8
--- /dev/null
+++ b/src/features/Messenger/IntegrationList.tsx
@@ -0,0 +1,70 @@
+'use client';
+
+import { Block, Flexbox, Icon, Text } from '@lobehub/ui';
+import { createStaticStyles } from 'antd-style';
+import { ChevronRightIcon } from 'lucide-react';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import type { SerializedMessengerPlatformDefinition } from '@/server/services/messenger/platforms/types';
+
+import { type MessengerPlatform, PlatformAvatar } from './constants';
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ card: css`
+ cursor: pointer;
+
+ padding: 16px;
+ border: 1px solid ${cssVar.colorBorder};
+ border-radius: ${cssVar.borderRadius};
+
+ transition: border-color 0.2s ease;
+
+ &:hover {
+ border-color: ${cssVar.colorPrimaryBorderHover};
+ }
+ `,
+ grid: css`
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 12px;
+
+ @media (width <= 720px) {
+ grid-template-columns: 1fr;
+ }
+ `,
+}));
+
+interface IntegrationListProps {
+ onSelect: (platform: MessengerPlatform) => void;
+ platforms: SerializedMessengerPlatformDefinition[];
+}
+
+const IntegrationList = memo<IntegrationListProps>(({ onSelect, platforms }) => {
+ const { t } = useTranslation('messenger');
+
+ return (
+ <div className={styles.grid}>
+ {platforms.map((platform) => (
+ <Block className={styles.card} key={platform.id} onClick={() => onSelect(platform.id)}>
+ <Flexbox horizontal align="center" gap={16}>
+ <PlatformAvatar platform={platform.id} size={48} />
+ <Flexbox flex={1} gap={2}>
+ <Text strong style={{ fontSize: 15 }}>
+ {platform.name}
+ </Text>
+ <Text style={{ fontSize: 13 }} type="secondary">
+ {t(`messenger.list.${platform.id}.description` as any)}
+ </Text>
+ </Flexbox>
+ <Icon icon={ChevronRightIcon} />
+ </Flexbox>
+ </Block>
+ ))}
+ </div>
+ );
+});
+
+IntegrationList.displayName = 'MessengerIntegrationList';
+
+export default IntegrationList;
diff --git a/src/features/Messenger/LinkModal/Discord.tsx b/src/features/Messenger/LinkModal/Discord.tsx
new file mode 100644
index 00000000000..7eb689b2330
--- /dev/null
+++ b/src/features/Messenger/LinkModal/Discord.tsx
@@ -0,0 +1,61 @@
+'use client';
+
+import { Button, Flexbox, Icon, Text } from '@lobehub/ui';
+import { LinkIcon } from 'lucide-react';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { PlatformAvatar } from '../constants';
+
+interface DiscordLinkBodyProps {
+ appId?: string;
+ /** Brand-name label (e.g. `"Discord"`) sourced from the registry. */
+ name: string;
+}
+
+const DiscordLinkBody = memo<DiscordLinkBodyProps>(({ appId, name }) => {
+ const { t } = useTranslation('messenger');
+
+ // Route Discord installs through the LobeHub install endpoint so the OAuth
+ // redirect lands at our callback — we read `guild_id` straight off the
+ // redirect (Discord puts it in the URL for `scope=bot` flows) and fetch
+ // guild metadata via the bot token, so no `client_secret` is needed.
+ // `appId` gating still surfaces "not configured" copy when no bot is
+ // registered at all.
+ if (!appId) {
+ return (
+ <>
+ <Icon icon={LinkIcon} size={36} />
+ <Text strong>{t('messenger.linkModal.continueIn', { platform: name })}</Text>
+ <Text type="warning">{t('messenger.discord.connectModal.notConfigured')}</Text>
+ </>
+ );
+ }
+
+ return (
+ <>
+ <PlatformAvatar platform="discord" size={64} />
+ <Flexbox align="center" gap={6}>
+ <Text strong style={{ fontSize: 18 }}>
+ {t('messenger.discord.connectModal.title')}
+ </Text>
+ <Text style={{ textAlign: 'center' }} type="secondary">
+ {t('messenger.discord.connectModal.description')}
+ </Text>
+ </Flexbox>
+ <Button
+ block
+ href="/api/agent/messenger/discord/install"
+ size="large"
+ target="_blank"
+ type="primary"
+ >
+ {t('messenger.discord.connectModal.inviteButton')}
+ </Button>
+ </>
+ );
+});
+
+DiscordLinkBody.displayName = 'MessengerDiscordLinkBody';
+
+export default DiscordLinkBody;
diff --git a/src/features/Messenger/LinkModal/Slack.tsx b/src/features/Messenger/LinkModal/Slack.tsx
new file mode 100644
index 00000000000..92b7ec08caf
--- /dev/null
+++ b/src/features/Messenger/LinkModal/Slack.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import { Button, Flexbox, Text } from '@lobehub/ui';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { PlatformAvatar } from '../constants';
+
+const SlackLinkBody = memo(() => {
+ const { t } = useTranslation('messenger');
+
+ return (
+ <>
+ <PlatformAvatar platform="slack" size={64} />
+ <Flexbox align="center" gap={6}>
+ <Text strong style={{ fontSize: 18 }}>
+ {t('messenger.slack.connectModal.title')}
+ </Text>
+ <Text style={{ textAlign: 'center' }} type="secondary">
+ {t('messenger.slack.connectModal.description')}
+ </Text>
+ </Flexbox>
+ <Button
+ block
+ href="/api/agent/messenger/slack/install"
+ size="large"
+ target="_blank"
+ type="primary"
+ >
+ {t('messenger.slack.connectModal.continueButton')}
+ </Button>
+ </>
+ );
+});
+
+SlackLinkBody.displayName = 'MessengerSlackLinkBody';
+
+export default SlackLinkBody;
diff --git a/src/features/Messenger/LinkModal/Telegram.tsx b/src/features/Messenger/LinkModal/Telegram.tsx
new file mode 100644
index 00000000000..eabf6e83e10
--- /dev/null
+++ b/src/features/Messenger/LinkModal/Telegram.tsx
@@ -0,0 +1,84 @@
+'use client';
+
+import { Button, Flexbox, Icon, Text } from '@lobehub/ui';
+import { QRCode } from 'antd';
+import { createStaticStyles } from 'antd-style';
+import { LinkIcon } from 'lucide-react';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { buildTelegramDeepLink, PlatformAvatar } from '../constants';
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ qrIconOverlay: css`
+ pointer-events: none;
+
+ position: absolute;
+ z-index: 1;
+ inset-block-start: 50%;
+ inset-inline-start: 50%;
+ transform: translate(-50%, -50%);
+
+ border: 3px solid ${cssVar.colorBgContainer};
+ border-radius: 50%;
+
+ line-height: 0;
+ `,
+ qrWrap: css`
+ position: relative;
+
+ padding: 14px;
+ border: 1px solid ${cssVar.colorBorderSecondary};
+ border-radius: 16px;
+
+ background: ${cssVar.colorBgContainer};
+ `,
+}));
+
+interface TelegramLinkBodyProps {
+ botUsername?: string;
+ /** Brand-name label (e.g. `"Telegram"`) sourced from the registry. */
+ name: string;
+}
+
+const TelegramLinkBody = memo<TelegramLinkBodyProps>(({ botUsername, name }) => {
+ const { t } = useTranslation('messenger');
+
+ if (!botUsername) {
+ return (
+ <>
+ <Icon icon={LinkIcon} size={36} />
+ <Text strong>{t('messenger.linkModal.continueIn', { platform: name })}</Text>
+ <Text type="warning">{t('messenger.linkModal.notConfigured')}</Text>
+ </>
+ );
+ }
+
+ const deepLink = buildTelegramDeepLink(botUsername);
+
+ return (
+ <>
+ <div className={styles.qrWrap}>
+ <QRCode bordered={false} size={200} value={deepLink} />
+ <div className={styles.qrIconOverlay}>
+ <PlatformAvatar platform="telegram" size={44} />
+ </div>
+ </div>
+ <Flexbox align="center" gap={6}>
+ <Text strong style={{ fontSize: 18 }}>
+ {t('messenger.linkModal.continueIn', { platform: name })}
+ </Text>
+ <Text style={{ textAlign: 'center' }} type="secondary">
+ {t('messenger.linkModal.scanHint', { platform: name })}
+ </Text>
+ </Flexbox>
+ <Button block href={deepLink} size="large" target="_blank" type="primary">
+ {t('messenger.linkModal.openCta', { platform: name })}
+ </Button>
+ </>
+ );
+});
+
+TelegramLinkBody.displayName = 'MessengerTelegramLinkBody';
+
+export default TelegramLinkBody;
diff --git a/src/features/Messenger/LinkModal/index.tsx b/src/features/Messenger/LinkModal/index.tsx
new file mode 100644
index 00000000000..5db5623f003
--- /dev/null
+++ b/src/features/Messenger/LinkModal/index.tsx
@@ -0,0 +1,56 @@
+'use client';
+
+import { Flexbox, Modal } from '@lobehub/ui';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import type { MessengerPlatform } from '../constants';
+import DiscordLinkBody from './Discord';
+import SlackLinkBody from './Slack';
+import TelegramLinkBody from './Telegram';
+
+interface LinkModalProps {
+ appId?: string;
+ botUsername?: string;
+ /** Brand-name label (e.g. `"Slack"`) sourced from the registry. */
+ name: string;
+ onClose: () => void;
+ open: boolean;
+ platform: MessengerPlatform;
+}
+
+const LinkModal = memo<LinkModalProps>(({ appId, botUsername, name, onClose, open, platform }) => {
+ const { t } = useTranslation('messenger');
+
+ const renderBody = () => {
+ switch (platform) {
+ case 'slack': {
+ return <SlackLinkBody />;
+ }
+ case 'discord': {
+ return <DiscordLinkBody appId={appId} name={name} />;
+ }
+ case 'telegram': {
+ return <TelegramLinkBody botUsername={botUsername} name={name} />;
+ }
+ }
+ };
+
+ return (
+ <Modal
+ footer={null}
+ open={open}
+ title={t('messenger.linkModal.title')}
+ width={480}
+ onCancel={onClose}
+ >
+ <Flexbox align="center" gap={20} style={{ paddingBlock: 16 }}>
+ {renderBody()}
+ </Flexbox>
+ </Modal>
+ );
+});
+
+LinkModal.displayName = 'MessengerLinkModal';
+
+export default LinkModal;
diff --git a/src/features/Messenger/Verify/Body/Discord.tsx b/src/features/Messenger/Verify/Body/Discord.tsx
new file mode 100644
index 00000000000..2fc8b964db2
--- /dev/null
+++ b/src/features/Messenger/Verify/Body/Discord.tsx
@@ -0,0 +1,71 @@
+'use client';
+
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { buildDiscordOpenBotUrl } from '../../constants';
+import {
+ ConfirmCard,
+ type ExistingLink,
+ type InfoRow,
+ type PeekedToken,
+ type PlatformMeta,
+ SuccessCard,
+} from './shared';
+
+interface DiscordBodyProps {
+ existingLink?: ExistingLink | null;
+ lobeAccount: string;
+ platformMeta?: PlatformMeta;
+ randomId: string;
+ signInUrl: string;
+ tokenData?: PeekedToken | null;
+}
+
+const DiscordBody = memo<DiscordBodyProps>(
+ ({ existingLink, lobeAccount, platformMeta, randomId, signInUrl, tokenData }) => {
+ const { t } = useTranslation('messenger');
+ const [done, setDone] = useState(false);
+
+ const platformLabel = platformMeta?.name ?? 'Discord';
+ const appId = platformMeta?.appId;
+
+ if (existingLink || done) {
+ return (
+ <SuccessCard
+ openBotUrl={appId ? buildDiscordOpenBotUrl(appId) : null}
+ platformLabel={platformLabel}
+ />
+ );
+ }
+
+ if (!tokenData) return null;
+
+ const handle = tokenData.platformUsername ?? `ID ${tokenData.platformUserId}`;
+ const infoRows: InfoRow[] = [
+ { label: t('verify.confirm.fields.lobeHubAccount'), value: lobeAccount },
+ {
+ label: t('verify.confirm.fields.platformAccount', { platform: platformLabel }),
+ value: handle,
+ },
+ ];
+ if (tokenData.tenantName) {
+ infoRows.push({ label: t('verify.confirm.fields.workspace'), value: tokenData.tenantName });
+ }
+
+ return (
+ <ConfirmCard
+ conflictEmail={tokenData.linkedToEmail ?? undefined}
+ infoRows={infoRows}
+ platform="discord"
+ platformLabel={platformLabel}
+ randomId={randomId}
+ signInUrl={signInUrl}
+ onSuccess={() => setDone(true)}
+ />
+ );
+ },
+);
+DiscordBody.displayName = 'MessengerVerifyDiscordBody';
+
+export default DiscordBody;
diff --git a/src/features/Messenger/Verify/Body/Slack.tsx b/src/features/Messenger/Verify/Body/Slack.tsx
new file mode 100644
index 00000000000..60ebec9129d
--- /dev/null
+++ b/src/features/Messenger/Verify/Body/Slack.tsx
@@ -0,0 +1,74 @@
+'use client';
+
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { buildSlackOpenBotUrl } from '../../constants';
+import {
+ ConfirmCard,
+ type ExistingLink,
+ type InfoRow,
+ type PeekedToken,
+ type PlatformMeta,
+ SuccessCard,
+} from './shared';
+
+interface SlackBodyProps {
+ existingLink?: ExistingLink | null;
+ lobeAccount: string;
+ platformMeta?: PlatformMeta;
+ randomId: string;
+ signInUrl: string;
+ tokenData?: PeekedToken | null;
+}
+
+const SlackBody = memo<SlackBodyProps>(
+ ({ existingLink, lobeAccount, platformMeta, randomId, signInUrl, tokenData }) => {
+ const { t } = useTranslation('messenger');
+ const [done, setDone] = useState(false);
+
+ const platformLabel = platformMeta?.name ?? 'Slack';
+ // Slack uses tenant from the existing link (post-confirm/refresh) or the
+ // pending token (pre-confirm). Without a tenant, the workspace deep-link
+ // can't be built, so the success state hides the CTA.
+ const tenantId = existingLink?.tenantId ?? tokenData?.tenantId ?? undefined;
+
+ if (existingLink || done) {
+ return (
+ <SuccessCard
+ openBotUrl={tenantId ? buildSlackOpenBotUrl(tenantId, platformMeta?.appId) : null}
+ platformLabel={platformLabel}
+ />
+ );
+ }
+
+ if (!tokenData) return null;
+
+ const handle = tokenData.platformUsername ?? `ID ${tokenData.platformUserId}`;
+ const infoRows: InfoRow[] = [
+ { label: t('verify.confirm.fields.lobeHubAccount'), value: lobeAccount },
+ {
+ label: t('verify.confirm.fields.platformAccount', { platform: platformLabel }),
+ value: handle,
+ },
+ ];
+ if (tokenData.tenantName) {
+ infoRows.push({ label: t('verify.confirm.fields.workspace'), value: tokenData.tenantName });
+ }
+
+ return (
+ <ConfirmCard
+ conflictEmail={tokenData.linkedToEmail ?? undefined}
+ infoRows={infoRows}
+ platform="slack"
+ platformLabel={platformLabel}
+ randomId={randomId}
+ signInUrl={signInUrl}
+ onSuccess={() => setDone(true)}
+ />
+ );
+ },
+);
+SlackBody.displayName = 'MessengerVerifySlackBody';
+
+export default SlackBody;
diff --git a/src/features/Messenger/Verify/Body/Telegram.tsx b/src/features/Messenger/Verify/Body/Telegram.tsx
new file mode 100644
index 00000000000..df92f627761
--- /dev/null
+++ b/src/features/Messenger/Verify/Body/Telegram.tsx
@@ -0,0 +1,69 @@
+'use client';
+
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { buildTelegramBotUrl } from '../../constants';
+import {
+ ConfirmCard,
+ type ExistingLink,
+ type InfoRow,
+ type PeekedToken,
+ type PlatformMeta,
+ SuccessCard,
+} from './shared';
+
+interface TelegramBodyProps {
+ existingLink?: ExistingLink | null;
+ lobeAccount: string;
+ platformMeta?: PlatformMeta;
+ randomId: string;
+ signInUrl: string;
+ tokenData?: PeekedToken | null;
+}
+
+const TelegramBody = memo<TelegramBodyProps>(
+ ({ existingLink, lobeAccount, platformMeta, randomId, signInUrl, tokenData }) => {
+ const { t } = useTranslation('messenger');
+ const [done, setDone] = useState(false);
+
+ const platformLabel = platformMeta?.name ?? 'Telegram';
+ const botUsername = platformMeta?.botUsername;
+
+ if (existingLink || done) {
+ return (
+ <SuccessCard
+ openBotUrl={botUsername ? buildTelegramBotUrl(botUsername) : null}
+ platformLabel={platformLabel}
+ />
+ );
+ }
+
+ if (!tokenData) return null;
+
+ // Telegram has no workspace/tenant concept — skip the workspace row entirely.
+ const handle = tokenData.platformUsername ?? `ID ${tokenData.platformUserId}`;
+ const infoRows: InfoRow[] = [
+ { label: t('verify.confirm.fields.lobeHubAccount'), value: lobeAccount },
+ {
+ label: t('verify.confirm.fields.platformAccount', { platform: platformLabel }),
+ value: handle,
+ },
+ ];
+
+ return (
+ <ConfirmCard
+ conflictEmail={tokenData.linkedToEmail ?? undefined}
+ infoRows={infoRows}
+ platform="telegram"
+ platformLabel={platformLabel}
+ randomId={randomId}
+ signInUrl={signInUrl}
+ onSuccess={() => setDone(true)}
+ />
+ );
+ },
+);
+TelegramBody.displayName = 'MessengerVerifyTelegramBody';
+
+export default TelegramBody;
diff --git a/src/features/Messenger/Verify/Body/index.tsx b/src/features/Messenger/Verify/Body/index.tsx
new file mode 100644
index 00000000000..801c144ba36
--- /dev/null
+++ b/src/features/Messenger/Verify/Body/index.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import { memo } from 'react';
+
+import type { MessengerPlatform } from '../../constants';
+import DiscordBody from './Discord';
+import type { ExistingLink, PeekedToken, PlatformMeta } from './shared';
+import SlackBody from './Slack';
+import TelegramBody from './Telegram';
+
+interface BodyProps {
+ existingLink?: ExistingLink | null;
+ lobeAccount: string;
+ platform: MessengerPlatform;
+ platformMeta?: PlatformMeta;
+ randomId: string;
+ signInUrl: string;
+ tokenData?: PeekedToken | null;
+}
+
+const Body = memo<BodyProps>(({ platform, ...rest }) => {
+ switch (platform) {
+ case 'slack': {
+ return <SlackBody {...rest} />;
+ }
+ case 'discord': {
+ return <DiscordBody {...rest} />;
+ }
+ case 'telegram': {
+ return <TelegramBody {...rest} />;
+ }
+ }
+});
+
+Body.displayName = 'MessengerVerifyBody';
+
+export default Body;
diff --git a/src/features/Messenger/Verify/Body/shared.tsx b/src/features/Messenger/Verify/Body/shared.tsx
new file mode 100644
index 00000000000..8c894e46013
--- /dev/null
+++ b/src/features/Messenger/Verify/Body/shared.tsx
@@ -0,0 +1,304 @@
+'use client';
+
+import { Block, Button, Flexbox, Icon, Text } from '@lobehub/ui';
+import { App } from 'antd';
+import { createStaticStyles } from 'antd-style';
+import { AlertTriangleIcon, CheckCircle2Icon, LinkIcon } from 'lucide-react';
+import { memo, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import { ProductLogo } from '@/components/Branding';
+import { messengerService } from '@/services/messenger';
+
+import AgentSelect from '../../AgentSelect';
+import { type MessengerPlatform, PlatformBrandIcon } from '../../constants';
+import { getMessengerErrorMessage } from '../../i18n';
+
+export const styles = createStaticStyles(({ css, cssVar }) => ({
+ bubble: css`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ width: 64px;
+ height: 64px;
+ border-radius: 14px;
+
+ background: ${cssVar.colorBgContainer};
+ box-shadow:
+ 0 1px 2px rgb(0 0 0 / 6%),
+ 0 4px 12px rgb(0 0 0 / 4%);
+ `,
+ card: css`
+ width: 100%;
+ max-width: 440px;
+ `,
+ chainBubble: css`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ width: 24px;
+ height: 24px;
+ border-radius: 999px;
+
+ color: ${cssVar.colorBgContainer};
+
+ background: ${cssVar.colorTextBase};
+ `,
+ iconRow: css`
+ display: flex;
+ gap: 12px;
+ align-items: center;
+ justify-content: center;
+
+ margin-block-end: 8px;
+ `,
+ infoRow: css`
+ display: flex;
+ gap: 16px;
+ align-items: center;
+ justify-content: space-between;
+
+ padding-block: 10px;
+
+ & + & {
+ border-block-start: 1px solid ${cssVar.colorBorderSecondary};
+ }
+ `,
+ infoValue: css`
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ `,
+ successBubble: css`
+ color: #fff;
+ background: #22c55e;
+ `,
+ warningBlock: css`
+ padding-block: 12px;
+ padding-inline: 16px;
+ border-color: ${cssVar.colorWarningBorder};
+ background: ${cssVar.colorWarningBg};
+ `,
+ warningIcon: css`
+ flex-shrink: 0;
+ color: ${cssVar.colorWarning};
+ `,
+}));
+
+const ChainBubble = () => (
+ <div className={styles.chainBubble}>
+ <Icon icon={LinkIcon} size={16} />
+ </div>
+);
+
+const PlatformBubble = ({ platform }: { platform: MessengerPlatform }) => (
+ <div className={styles.bubble}>
+ <PlatformBrandIcon platform={platform} size={platform === 'telegram' ? 36 : 32} />
+ </div>
+);
+
+export const IconRow = memo<{ platform: MessengerPlatform }>(({ platform }) => (
+ <div className={styles.iconRow}>
+ <div className={styles.bubble}>
+ <ProductLogo size={36} type="3d" />
+ </div>
+ <ChainBubble />
+ <PlatformBubble platform={platform} />
+ </div>
+));
+IconRow.displayName = 'MessengerVerifyIconRow';
+
+export const Heading = memo<{ subtitle?: string; title: string }>(({ subtitle, title }) => (
+ <Flexbox align="center" gap={12}>
+ <Text
+ align="center"
+ as="h1"
+ style={{ fontSize: 28, fontWeight: 700, lineHeight: 1.3, margin: 0 }}
+ >
+ {title}
+ </Text>
+ {subtitle && (
+ <Text align="center" style={{ fontSize: 16, lineHeight: 1.5 }} type="secondary">
+ {subtitle}
+ </Text>
+ )}
+ </Flexbox>
+));
+Heading.displayName = 'MessengerVerifyHeading';
+
+export interface InfoRow {
+ label: string;
+ value: string;
+}
+
+export interface ConfirmCardProps {
+ /** Email of the LobeHub account already bound to this IM identity, if any. */
+ conflictEmail?: string;
+ infoRows: InfoRow[];
+ onSuccess: () => void;
+ platform: MessengerPlatform;
+ platformLabel: string;
+ randomId: string;
+ /** Fallback URL the conflict warning sends the user to so they can switch accounts. */
+ signInUrl: string;
+}
+
+export const ConfirmCard = memo<ConfirmCardProps>(
+ ({ conflictEmail, infoRows, onSuccess, platform, platformLabel, randomId, signInUrl }) => {
+ const { t } = useTranslation('messenger');
+ const { message } = App.useApp();
+
+ const agentsSWR = useSWR('messenger:agentsForBinding', () =>
+ messengerService.listAgentsForBinding(),
+ );
+
+ const [selectedAgentId, setSelectedAgentId] = useState<string | undefined>(undefined);
+ const [confirming, setConfirming] = useState(false);
+
+ // Default-select the first agent once loaded; user can change before confirming.
+ useEffect(() => {
+ if (selectedAgentId || !agentsSWR.data?.length) return;
+ setSelectedAgentId(agentsSWR.data[0].id);
+ }, [agentsSWR.data, selectedAgentId]);
+
+ const hasConflict = !!conflictEmail;
+
+ const handleConfirm = async () => {
+ if (!selectedAgentId) return;
+ setConfirming(true);
+ try {
+ await messengerService.confirmLink({ initialAgentId: selectedAgentId, randomId });
+ onSuccess();
+ } catch (error) {
+ message.error(getMessengerErrorMessage(error, t, 'verify.error.generic'));
+ } finally {
+ setConfirming(false);
+ }
+ };
+
+ return (
+ <Flexbox align="center" className={styles.card} gap={32}>
+ <IconRow platform={platform} />
+
+ <Heading title={t('verify.confirm.title')} />
+
+ <Block padding={4} style={{ width: '100%' }} variant={'outlined'}>
+ <Flexbox paddingInline={16}>
+ {infoRows.map((row) => (
+ <div className={styles.infoRow} key={row.label}>
+ <Text type="secondary">{row.label}</Text>
+ <Text strong className={styles.infoValue} title={row.value}>
+ {row.value}
+ </Text>
+ </div>
+ ))}
+ </Flexbox>
+ </Block>
+
+ {hasConflict && (
+ <Block className={styles.warningBlock} style={{ width: '100%' }} variant={'outlined'}>
+ <Flexbox horizontal gap={12}>
+ <Icon className={styles.warningIcon} icon={AlertTriangleIcon} size={20} />
+ <Flexbox gap={8} style={{ flex: 1 }}>
+ <Text strong>{t('verify.confirm.conflict.title')}</Text>
+ <Text style={{ fontSize: 13 }} type="secondary">
+ {t('verify.confirm.conflict.description', {
+ email: conflictEmail,
+ platform: platformLabel,
+ })}
+ </Text>
+ <Button block href={signInUrl} type="default">
+ {t('verify.confirm.conflict.switchAccount')}
+ </Button>
+ </Flexbox>
+ </Flexbox>
+ </Block>
+ )}
+
+ {!hasConflict && (
+ <Flexbox gap={8} style={{ width: '100%' }}>
+ <Text strong>{t('verify.confirm.defaultAgent')}</Text>
+ {agentsSWR.data?.length === 0 ? (
+ <Text type="warning">{t('verify.confirm.noAgents')}</Text>
+ ) : (
+ <AgentSelect
+ placeholder={t('verify.confirm.defaultAgentPlaceholder')}
+ value={selectedAgentId}
+ onChange={setSelectedAgentId}
+ />
+ )}
+ <Text style={{ fontSize: 12 }} type="secondary">
+ {t('verify.confirm.defaultAgentHint')}
+ </Text>
+ </Flexbox>
+ )}
+
+ <Button
+ block
+ disabled={hasConflict || !selectedAgentId}
+ loading={confirming}
+ size="large"
+ type="primary"
+ onClick={handleConfirm}
+ >
+ {t('verify.confirm.cta')}
+ </Button>
+ </Flexbox>
+ );
+ },
+);
+ConfirmCard.displayName = 'MessengerVerifyConfirmCard';
+
+export interface SuccessCardProps {
+ /** Pre-built deep link back to the bot. When omitted, the CTA is hidden. */
+ openBotUrl?: string | null;
+ platformLabel: string;
+}
+
+export const SuccessCard = memo<SuccessCardProps>(({ openBotUrl, platformLabel }) => {
+ const { t } = useTranslation('messenger');
+
+ return (
+ <Flexbox align="center" className={styles.card} gap={24}>
+ <div className={styles.iconRow}>
+ <div className={`${styles.bubble} ${styles.successBubble}`}>
+ <Icon icon={CheckCircle2Icon} size={32} />
+ </div>
+ </div>
+ <Heading
+ subtitle={t('verify.success.description', { platform: platformLabel })}
+ title={t('verify.success.title')}
+ />
+ {openBotUrl && (
+ <Button block href={openBotUrl} size="large" target="_blank" type="primary">
+ {t('verify.success.openBot', { platform: platformLabel })}
+ </Button>
+ )}
+ </Flexbox>
+ );
+});
+SuccessCard.displayName = 'MessengerVerifySuccessCard';
+
+export interface PeekedToken {
+ linkedToEmail?: string | null;
+ platform: MessengerPlatform;
+ platformUserId: string;
+ platformUsername?: string | null;
+ tenantId?: string | null;
+ tenantName?: string | null;
+}
+
+export interface ExistingLink {
+ platform: string;
+ tenantId?: string | null;
+}
+
+export interface PlatformMeta {
+ appId?: string;
+ botUsername?: string;
+ id: string;
+ name: string;
+}
diff --git a/src/features/Messenger/Verify/index.tsx b/src/features/Messenger/Verify/index.tsx
new file mode 100644
index 00000000000..ee929c96c57
--- /dev/null
+++ b/src/features/Messenger/Verify/index.tsx
@@ -0,0 +1,165 @@
+'use client';
+
+import { Button, Flexbox } from '@lobehub/ui';
+import { useSearchParams } from 'next/navigation';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import Loading from '@/components/Loading/BrandTextLoading';
+import { useSession } from '@/libs/better-auth/auth-client';
+import { lambdaClient } from '@/libs/trpc/client';
+import { messengerService } from '@/services/messenger';
+
+import { type MessengerPlatform } from '../constants';
+import { getMessengerErrorMessage } from '../i18n';
+import Body from './Body';
+import { Heading, IconRow, styles } from './Body/shared';
+
+const isSupportedPlatform = (value: string): value is MessengerPlatform =>
+ value === 'telegram' || value === 'slack' || value === 'discord';
+
+const MessengerVerifyPage = memo(() => {
+ const { t } = useTranslation('messenger');
+ const searchParams = useSearchParams();
+
+ const randomId = searchParams.get('random_id') ?? '';
+ const imType = searchParams.get('im_type') ?? '';
+ const platform = isSupportedPlatform(imType) ? imType : null;
+
+ const { data: session, isPending: sessionPending } = useSession();
+ const isSignedIn = !!session?.user;
+
+ // Messenger is a Labs-gated feature: don't let a user bind a new account
+ // unless they've explicitly opted in. (Existing bindings keep working — the
+ // bot's webhook doesn't consult this flag — but forming new ones requires
+ // a deliberate Labs toggle.)
+ const userStateSWR = useSWR(isSignedIn ? ['user:state'] : null, () =>
+ lambdaClient.user.getUserState.query(),
+ );
+ const labMessengerEnabled = !!userStateSWR.data?.preference?.lab?.enableMessenger;
+
+ // Used in the success state to deep-link the user back to the bot.
+ const platformsSWR = useSWR('messenger:availablePlatforms', () =>
+ messengerService.availablePlatforms(),
+ );
+
+ const tokenSWR = useSWR(randomId && isSignedIn ? ['messenger:peek', randomId] : null, async () =>
+ messengerService.peekLinkToken(randomId),
+ );
+
+ // Refresh-friendly: if the user already has a link for *this* (platform,
+ // tenant) pair, skip the token flow entirely and jump to the success state.
+ // Without this, refreshing the page after a successful link looks like an
+ // expired-token error (the random_id token gets consumed on confirm).
+ //
+ // Scoping by tenant is critical for Slack multi-workspace: a user already
+ // linked to workspace A must not short-circuit when verifying workspace B,
+ // otherwise confirmLink for B never runs. We wait for the token payload to
+ // resolve so we know the tenant. If the token is gone (expired/consumed,
+ // typical of a post-confirm refresh), fall back to the unscoped lookup so
+ // the refresh still lands on success.
+ const tokenResolved = !tokenSWR.isLoading;
+ const tokenTenantId = tokenSWR.data?.tenantId;
+ const tokenScopeKey = tokenSWR.data ? (tokenTenantId ?? '') : '__any__';
+ const existingLinkSWR = useSWR(
+ isSignedIn && tokenResolved && platform ? ['messenger:myLink', platform, tokenScopeKey] : null,
+ async () => messengerService.getMyLink(platform!, tokenSWR.data ? tokenTenantId : undefined),
+ );
+
+ if (!randomId) {
+ return (
+ <Flexbox align="center" className={styles.card} gap={24}>
+ <Heading subtitle={t('verify.error.missingToken')} title={t('verify.error.title')} />
+ </Flexbox>
+ );
+ }
+
+ if (
+ sessionPending ||
+ userStateSWR.isLoading ||
+ // Wait for the token peek so the existing-link lookup below can scope by
+ // tenantId (otherwise a Slack workspace-A link short-circuits workspace-B
+ // verification). isSignedIn is required for tokenSWR to fire at all.
+ (isSignedIn && tokenSWR.isLoading) ||
+ existingLinkSWR.isLoading
+ ) {
+ return <Loading debugId="MessengerVerify" />;
+ }
+
+ const signInUrl = `/signin?callbackUrl=${encodeURIComponent(
+ `/verify-im?${searchParams.toString()}`,
+ )}`;
+
+ if (!isSignedIn) {
+ return (
+ <Flexbox align="center" className={styles.card} gap={32}>
+ {platform && <IconRow platform={platform} />}
+ <Heading subtitle={t('verify.signInRequired')} title={t('verify.confirm.title')} />
+ <Button block href={signInUrl} size="large" type="primary">
+ {t('verify.signInCta')}
+ </Button>
+ </Flexbox>
+ );
+ }
+
+ // Lab gate: Messenger is opt-in. If the user already linked, we let them
+ // through to the success state below — disabling the lab shouldn't strand
+ // someone mid-flow on a binding they already started.
+ if (!labMessengerEnabled && !existingLinkSWR.data) {
+ return (
+ <Flexbox align="center" className={styles.card} gap={24}>
+ <Heading
+ subtitle={t('verify.labRequired.description')}
+ title={t('verify.labRequired.title')}
+ />
+ <Button block href="/settings/advanced" size="large" type="primary">
+ {t('verify.labRequired.openSettings')}
+ </Button>
+ </Flexbox>
+ );
+ }
+
+ if (!platform) {
+ return (
+ <Flexbox align="center" className={styles.card} gap={24}>
+ <Heading subtitle={t('verify.error.expired')} title={t('verify.error.title')} />
+ </Flexbox>
+ );
+ }
+
+ // Token may be expired/consumed on a post-confirm refresh. We only block on
+ // token errors when there's no existing link to fall back on; otherwise the
+ // body's success state handles the refresh case below.
+ if (!existingLinkSWR.data && (tokenSWR.error || !tokenSWR.data)) {
+ return (
+ <Flexbox align="center" className={styles.card} gap={24}>
+ <Heading
+ subtitle={getMessengerErrorMessage(tokenSWR.error, t, 'verify.error.expired')}
+ title={t('verify.error.title')}
+ />
+ </Flexbox>
+ );
+ }
+
+ const platformMeta = platformsSWR.data?.find(
+ (p) => p.id === (existingLinkSWR.data?.platform ?? tokenSWR.data?.platform ?? platform),
+ );
+ const lobeAccount = session?.user?.email ?? session?.user?.name ?? '';
+
+ return (
+ <Body
+ existingLink={existingLinkSWR.data ?? null}
+ lobeAccount={lobeAccount}
+ platform={platform}
+ platformMeta={platformMeta}
+ randomId={randomId}
+ signInUrl={signInUrl}
+ tokenData={tokenSWR.data ?? null}
+ />
+ );
+});
+
+MessengerVerifyPage.displayName = 'MessengerVerifyPage';
+
+export default MessengerVerifyPage;
diff --git a/src/features/Messenger/constants.tsx b/src/features/Messenger/constants.tsx
new file mode 100644
index 00000000000..303d7742867
--- /dev/null
+++ b/src/features/Messenger/constants.tsx
@@ -0,0 +1,69 @@
+import { Discord, Slack, Telegram } from '@lobehub/ui/icons';
+import type { ReactNode } from 'react';
+
+export type MessengerPlatform = 'telegram' | 'slack' | 'discord';
+
+export const PLATFORM_TAB_ICONS: Record<MessengerPlatform, ReactNode> = {
+ discord: <Discord.Color size={16} />,
+ slack: <Slack.Color size={16} />,
+ telegram: <Telegram.Color size={16} />,
+};
+
+export const PlatformAvatar = ({
+ platform,
+ size,
+}: {
+ platform: MessengerPlatform;
+ size: number;
+}) => {
+ if (platform === 'telegram') return <Telegram.Avatar size={size} />;
+ if (platform === 'discord') return <Discord.Avatar size={size} />;
+ return <Slack.Avatar size={size} />;
+};
+
+export const PlatformBrandIcon = ({
+ platform,
+ size,
+}: {
+ platform: MessengerPlatform;
+ size: number;
+}) => {
+ if (platform === 'telegram') return <Telegram.Color size={size} />;
+ if (platform === 'discord') return <Discord.Color size={size} />;
+ return <Slack.Color size={size} />;
+};
+
+/**
+ * Plain Telegram bot URL — no `?start=messenger` suffix. Used by the verify
+ * success state where re-triggering the bot's `/start` flow right after
+ * binding would be redundant.
+ */
+export const buildTelegramBotUrl = (botUsername: string): string =>
+ `https://t.me/${botUsername.replace(/^@/, '')}`;
+
+export const buildTelegramDeepLink = (botUsername: string): string =>
+ `${buildTelegramBotUrl(botUsername)}?start=messenger`;
+
+/**
+ * Slack bot deep link. Prefer the `app_redirect` form when both `appId` and
+ * `tenantId` are known — Slack handles desktop hand-off and lands the user in
+ * the bot DM. Falls back to the workspace URL when only the team id is known.
+ */
+export const buildSlackOpenBotUrl = (tenantId: string, appId?: string): string =>
+ appId
+ ? `https://slack.com/app_redirect?app=${appId}&team=${tenantId}`
+ : `https://app.slack.com/client/${tenantId}`;
+
+/**
+ * Direct link to the bot's user profile in Discord. App IDs double as the
+ * bot user id for bot accounts, so this URL opens the bot's profile page;
+ * the user clicks "Send Message" to start a DM.
+ *
+ * Note: the "Add to Discord server" install flow goes through
+ * `/api/agent/messenger/discord/install` (OAuth code-grant) rather than a
+ * hardcoded `discord.com/oauth2/authorize` URL, so the callback can persist
+ * the guild as an audit row. Bot scopes / permissions live in
+ * `src/server/services/messenger/platforms/discord/oauth.ts`.
+ */
+export const buildDiscordOpenBotUrl = (applicationId: string): string =>
+ `https://discord.com/users/${applicationId}`;
diff --git a/src/features/Messenger/i18n.ts b/src/features/Messenger/i18n.ts
new file mode 100644
index 00000000000..60c27228c0d
--- /dev/null
+++ b/src/features/Messenger/i18n.ts
@@ -0,0 +1,45 @@
+import type { TFunction } from 'i18next';
+
+type MessengerT = TFunction<'messenger'>;
+export type MessengerTranslationKey = `messenger.${string}` | `verify.${string}`;
+
+const SLACK_INSTALL_ERROR_REASON_KEYS = {
+ access_denied: 'messenger.slack.installResult.reasons.accessDenied',
+ exchange_failed: 'messenger.slack.installResult.reasons.exchangeFailed',
+ invalid_state: 'messenger.slack.installResult.reasons.invalidState',
+ missing_app_id: 'messenger.slack.installResult.reasons.missingAppId',
+ missing_code_or_state: 'messenger.slack.installResult.reasons.missingCodeOrState',
+ missing_tenant: 'messenger.slack.installResult.reasons.missingTenant',
+ missing_token: 'messenger.slack.installResult.reasons.missingToken',
+ persist_failed: 'messenger.slack.installResult.reasons.persistFailed',
+} as const satisfies Record<string, MessengerTranslationKey>;
+
+const getMessengerTranslationKey = (error: unknown): MessengerTranslationKey | undefined => {
+ if (!error || typeof error !== 'object' || !('message' in error)) return;
+
+ const message = (error as { message?: unknown }).message;
+ if (typeof message !== 'string') return;
+
+ if (message.startsWith('messenger.') || message.startsWith('verify.')) {
+ return message as MessengerTranslationKey;
+ }
+};
+
+export const getMessengerErrorMessage = (
+ error: unknown,
+ t: MessengerT,
+ fallbackKey: MessengerTranslationKey,
+): string => {
+ const key = getMessengerTranslationKey(error);
+
+ return key ? t(key as any) : t(fallbackKey as any);
+};
+
+export const getSlackInstallErrorReason = (t: MessengerT, reason?: string | null) => {
+ if (!reason) return t('messenger.slack.installResult.reasons.generic');
+
+ const key =
+ SLACK_INSTALL_ERROR_REASON_KEYS[reason as keyof typeof SLACK_INSTALL_ERROR_REASON_KEYS];
+
+ return key ? t(key) : reason;
+};
diff --git a/src/features/Messenger/index.tsx b/src/features/Messenger/index.tsx
new file mode 100644
index 00000000000..e77acbf59cc
--- /dev/null
+++ b/src/features/Messenger/index.tsx
@@ -0,0 +1,157 @@
+'use client';
+
+import { Button, Flexbox, Modal, Skeleton, Text } from '@lobehub/ui';
+import { App } from 'antd';
+import { createStaticStyles } from 'antd-style';
+import { memo, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { useNavigate, useParams } from 'react-router-dom';
+import useSWR from 'swr';
+
+import { messengerService } from '@/services/messenger';
+
+import { type MessengerPlatform, PlatformAvatar } from './constants';
+import { getSlackInstallErrorReason } from './i18n';
+import IntegrationDetail from './IntegrationDetail';
+import IntegrationList from './IntegrationList';
+
+const VALID_PLATFORMS: ReadonlySet<MessengerPlatform> = new Set(['slack', 'telegram', 'discord']);
+
+const isMessengerPlatform = (value: string | undefined): value is MessengerPlatform =>
+ !!value && VALID_PLATFORMS.has(value as MessengerPlatform);
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ emptyState: css`
+ padding-block: 48px;
+ padding-inline: 24px;
+ border: 1px dashed ${cssVar.colorBorder};
+ border-radius: ${cssVar.borderRadius};
+
+ color: ${cssVar.colorTextSecondary};
+ text-align: center;
+ `,
+ page: css`
+ overflow-y: auto;
+ flex: 1;
+ `,
+}));
+
+const MessengerSettings = memo(() => {
+ const { t } = useTranslation('messenger');
+ const { message } = App.useApp();
+ const navigate = useNavigate();
+ const params = useParams<{ sub?: string }>();
+ const selected: MessengerPlatform | null = isMessengerPlatform(params.sub) ? params.sub : null;
+ // Workspace name from `?slack_workspace=...`. When set, render the takeover
+ // explainer modal — toast is too transient for a flow where the user just
+ // round-tripped through Slack OAuth and needs clear next-step guidance.
+ const [blockedWorkspace, setBlockedWorkspace] = useState<string | null>(null);
+
+ const platformsSWR = useSWR('messenger:availablePlatforms', () =>
+ messengerService.availablePlatforms(),
+ );
+
+ // If the URL points at an unknown platform sub-segment, replace it with the
+ // bare list URL — keeps deep-links graceful when bots get removed from the
+ // registry.
+ useEffect(() => {
+ if (params.sub && !isMessengerPlatform(params.sub)) {
+ navigate('/settings/messenger', { replace: true });
+ }
+ }, [navigate, params.sub]);
+
+ // Surface OAuth callback outcomes for the currently-selected platform. The
+ // callback redirects to `/settings/messenger/<platform>?installed=ok` (or
+ // `?error=...&workspace=...`); we toast success/generic-failure and escalate
+ // Slack's "already installed by another user" to a modal — the user just
+ // round-tripped through OAuth and needs clear next-step guidance.
+ useEffect(() => {
+ if (typeof window === 'undefined') return;
+ if (!selected) return;
+ const url = new URL(window.location.href);
+ const installed = url.searchParams.get('installed');
+ const error = url.searchParams.get('error');
+ const workspace = url.searchParams.get('workspace');
+ if (!installed && !error) return;
+
+ if (installed && selected === 'slack') {
+ message.success(t('messenger.slack.installResult.success'));
+ } else if (error === 'already_installed' && selected === 'slack') {
+ // Empty string sentinel = open modal even when workspace name is unknown.
+ setBlockedWorkspace(workspace ?? '');
+ } else if (error && selected === 'slack') {
+ message.error(
+ t('messenger.slack.installResult.failed', {
+ reason: getSlackInstallErrorReason(t, error),
+ }),
+ );
+ }
+
+ url.searchParams.delete('installed');
+ url.searchParams.delete('error');
+ url.searchParams.delete('workspace');
+ window.history.replaceState({}, '', url.pathname + (url.search ? `?${url.searchParams}` : ''));
+ }, [message, t, selected]);
+
+ const platforms = platformsSWR.data ?? [];
+ const selectedMeta = platforms.find((p) => p.id === selected);
+
+ return (
+ <div className={styles.page}>
+ <Flexbox gap={20}>
+ {selected && selectedMeta ? (
+ <IntegrationDetail
+ appId={selectedMeta.appId}
+ botUsername={selectedMeta.botUsername}
+ name={selectedMeta.name}
+ platform={selected}
+ onBack={() => navigate('/settings/messenger')}
+ />
+ ) : (
+ <>
+ <Text type="secondary">{t('messenger.subtitle')}</Text>
+ {platformsSWR.isLoading ? (
+ <Skeleton active paragraph={{ rows: 3 }} title={false} />
+ ) : platforms.length === 0 ? (
+ <div className={styles.emptyState}>{t('messenger.noPlatformsConfigured')}</div>
+ ) : (
+ <IntegrationList
+ platforms={platforms}
+ onSelect={(platform) => navigate(`/settings/messenger/${platform}`)}
+ />
+ )}
+ </>
+ )}
+ </Flexbox>
+
+ <Modal
+ footer={null}
+ open={blockedWorkspace !== null}
+ title={t('messenger.slack.installBlocked.title')}
+ width={480}
+ onCancel={() => setBlockedWorkspace(null)}
+ >
+ <Flexbox align="center" gap={20} style={{ paddingBlock: 16 }}>
+ <PlatformAvatar platform="slack" size={56} />
+ <Flexbox align="center" gap={8}>
+ <Text strong style={{ fontSize: 16, textAlign: 'center' }}>
+ {blockedWorkspace
+ ? t('messenger.slack.installBlocked.withName', { workspace: blockedWorkspace })
+ : t('messenger.slack.installBlocked.withoutName')}
+ </Text>
+ <Text style={{ textAlign: 'center' }} type="secondary">
+ {t('messenger.slack.installBlocked.suggestion')}
+ </Text>
+ </Flexbox>
+ <Button block size="large" type="primary" onClick={() => setBlockedWorkspace(null)}>
+ {t('messenger.slack.installBlocked.dismiss')}
+ </Button>
+ </Flexbox>
+ </Modal>
+ </div>
+ );
+});
+
+MessengerSettings.displayName = 'MessengerSettings';
+
+export default MessengerSettings;
diff --git a/src/instrumentation.ts b/src/instrumentation.ts
index 6e56ec90eab..868cea491ec 100644
--- a/src/instrumentation.ts
+++ b/src/instrumentation.ts
@@ -22,6 +22,12 @@ export async function register() {
});
}
+ // Note: messenger system bot connections (Discord/Telegram) are managed
+ // entirely from dc-center's System Bots admin — save / enable / forceReconnect
+ // mutations call MessageGateway directly. The main app's only role here is
+ // to receive forwarded events at `/api/agent/messenger/webhooks/<platform>`,
+ // which doesn't require any startup work.
+
if (process.env.NODE_ENV !== 'production' && !process.env.ENABLE_TELEMETRY_IN_DEV) {
return;
}
diff --git a/src/libs/next/nextjsOnlyRoutes.ts b/src/libs/next/nextjsOnlyRoutes.ts
index a078941b2d7..57355a0efa4 100644
--- a/src/libs/next/nextjsOnlyRoutes.ts
+++ b/src/libs/next/nextjsOnlyRoutes.ts
@@ -10,4 +10,5 @@ export const nextjsOnlyRoutes = [
'/market-auth-callback',
'/discover',
'/welcome',
+ '/verify-im',
];
diff --git a/src/libs/next/proxy/define-config.ts b/src/libs/next/proxy/define-config.ts
index 88254e050eb..0f8aef934fd 100644
--- a/src/libs/next/proxy/define-config.ts
+++ b/src/libs/next/proxy/define-config.ts
@@ -195,6 +195,10 @@ export function defineConfig() {
'/market-auth-callback',
// public share pages
'/share(.*)',
+ // messenger verify-im — page itself handles unauth (in-page sign-in CTA)
+ // and the random_id token is the actual capability check; no need for
+ // session-protected access at the middleware layer.
+ '/verify-im',
]);
const betterAuthMiddleware = async (req: NextRequest) => {
diff --git a/src/locales/default/index.ts b/src/locales/default/index.ts
index d13a0c78b66..c02bb2c1c6c 100644
--- a/src/locales/default/index.ts
+++ b/src/locales/default/index.ts
@@ -21,6 +21,7 @@ import knowledgeBase from './knowledgeBase';
import labs from './labs';
import marketAuth from './marketAuth';
import memory from './memory';
+import messenger from './messenger';
import metadata from './metadata';
import migration from './migration';
import modelProvider from './modelProvider';
@@ -68,6 +69,7 @@ const resources = {
labs,
marketAuth,
memory,
+ messenger,
metadata,
migration,
modelProvider,
diff --git a/src/locales/default/labs.ts b/src/locales/default/labs.ts
index 7fca0421059..ff55681cc66 100644
--- a/src/locales/default/labs.ts
+++ b/src/locales/default/labs.ts
@@ -13,5 +13,8 @@ export default {
'features.inputMarkdown.desc':
'Render Markdown in the input area in real time (bold text, code blocks, tables, etc.).',
'features.inputMarkdown.title': 'Input Markdown Rendering',
+ 'features.messenger.desc':
+ 'Talk to your agents from Telegram (and other messengers) via the shared LobeHub bot. Adds a Messenger tab in Settings for binding your account and choosing which agent receives messages.',
+ 'features.messenger.title': 'Messenger',
'title': 'Labs',
};
diff --git a/src/locales/default/messenger.ts b/src/locales/default/messenger.ts
new file mode 100644
index 00000000000..39c31efb98b
--- /dev/null
+++ b/src/locales/default/messenger.ts
@@ -0,0 +1,131 @@
+export default {
+ 'messenger.activeAgent': 'Active agent',
+ 'messenger.activeAgentPlaceholder': 'Select an agent',
+ 'messenger.detail.addServer': 'Add server',
+ 'messenger.detail.addWorkspace': 'Add workspace',
+ 'messenger.detail.connections.connected': 'Connected',
+ 'messenger.detail.connections.empty': 'Open the bot and send /start to link your account.',
+ 'messenger.detail.connections.linkHint':
+ 'Workspace installed. Open Slack and DM the bot to finish linking your personal account.',
+ 'messenger.detail.connections.pending': 'Pending',
+ 'messenger.detail.connections.serverLabel': 'server',
+ 'messenger.detail.connections.title': 'Connections',
+ 'messenger.detail.connections.userLabel': 'user',
+ 'messenger.detail.connections.workspaceLabel': 'workspace',
+ 'messenger.detail.disconnect': 'Disconnect',
+ 'messenger.error.agentNotFound': 'Agent not found.',
+ 'messenger.error.disconnectNotAllowed': 'You can only disconnect installations you started.',
+ 'messenger.error.installationNotFound': 'Installation not found.',
+ 'messenger.error.linkRequired': 'Open the bot and send /start before changing this connection.',
+ 'messenger.error.pickDefaultAgent': 'Select a default agent before confirming.',
+ 'messenger.error.platformNotConfigured':
+ "This messenger platform isn't available right now. Please try again later.",
+ 'messenger.linkCta': 'Connect',
+ 'messenger.linkModal.continueIn': 'Continue setup in {{platform}}',
+ 'messenger.linkModal.instructions':
+ 'Open the bot, send /start, then tap "Link Account" to connect your LobeHub account.',
+ 'messenger.linkModal.notConfigured':
+ "This connection isn't available right now. Please try again later.",
+ 'messenger.linkModal.openCta': 'Open in {{platform}}',
+ 'messenger.linkModal.scanHint': 'Or scan with your phone to open {{platform}}.',
+ 'messenger.linkModal.title': 'Connect Messenger',
+ 'messenger.noPlatformsConfigured': 'No platforms are available yet. Check back soon.',
+ 'messenger.slack.connectModal.continueButton': 'Continue in Slack',
+ 'messenger.slack.connectModal.description':
+ 'You will be redirected to Slack to authorize the LobeHub workspace install.',
+ 'messenger.slack.connectModal.notConfigured':
+ "Slack isn't available right now. Please try again later.",
+ 'messenger.slack.connectModal.title': 'Continue setup in Slack',
+ 'messenger.slack.connections.disconnectConfirm':
+ 'Disconnect the LobeHub bot from this Slack workspace? Existing user links will pause until you re-install.',
+ 'messenger.slack.connections.disconnectFailed': 'Failed to disconnect.',
+ 'messenger.slack.connections.disconnectSuccess': 'Workspace disconnected.',
+ 'messenger.slack.connections.disconnectTitle': 'Disconnect workspace',
+ 'messenger.slack.installBlocked.dismiss': 'Got it',
+ 'messenger.slack.installBlocked.suggestion':
+ "DM @LobeHub in Slack to link your personal account — you don't need to install again. Or ask the original installer to disconnect this workspace first if you want to take over ownership.",
+ 'messenger.slack.installBlocked.title': 'Workspace already connected',
+ 'messenger.slack.installBlocked.withName':
+ '"{{workspace}}" is already connected to LobeHub by another user.',
+ 'messenger.slack.installBlocked.withoutName':
+ 'This Slack workspace is already connected to LobeHub by another user.',
+ 'messenger.slack.installResult.failed':
+ 'Slack install failed ({{reason}}). Please try again or contact support.',
+ 'messenger.slack.installResult.reasons.accessDenied': 'authorization was cancelled',
+ 'messenger.slack.installResult.reasons.exchangeFailed': 'Slack authorization failed',
+ 'messenger.slack.installResult.reasons.generic': 'an unknown error occurred',
+ 'messenger.slack.installResult.reasons.invalidState': 'the install session expired',
+ 'messenger.slack.installResult.reasons.missingAppId': 'Slack returned incomplete app information',
+ 'messenger.slack.installResult.reasons.missingCodeOrState':
+ 'Slack returned incomplete install parameters',
+ 'messenger.slack.installResult.reasons.missingTenant':
+ 'Slack did not return a workspace identifier',
+ 'messenger.slack.installResult.reasons.missingToken': 'Slack did not return a bot token',
+ 'messenger.slack.installResult.reasons.persistFailed':
+ 'the workspace connection could not be saved',
+ 'messenger.slack.installResult.success': 'Slack workspace connected.',
+ 'messenger.discord.connectModal.description':
+ 'Add the LobeHub bot to a Discord server you manage.',
+ 'messenger.discord.connectModal.inviteButton': 'Add to Discord server',
+ 'messenger.discord.connectModal.notConfigured':
+ "Discord isn't available right now. Please try again later.",
+ 'messenger.discord.connectModal.title': 'Add bot to your server',
+ 'messenger.discord.connections.disconnectConfirm':
+ 'Remove this server from your audit list? The bot will stay in the server until a server admin kicks it.',
+ 'messenger.discord.connections.disconnectFailed': 'Failed to remove server.',
+ 'messenger.discord.connections.disconnectSuccess': 'Server removed.',
+ 'messenger.discord.connections.disconnectTitle': 'Remove server',
+ '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',
+ 'messenger.list.discord.description':
+ 'Chat with your LobeHub agents from any Discord server via DM with the LobeHub bot.',
+ 'messenger.list.slack.description':
+ 'Chat with your LobeHub agents from any Slack workspace via DM or @LobeHub.',
+ 'messenger.list.telegram.description':
+ 'Chat with your LobeHub agents in Telegram and pick which one answers from anywhere.',
+ 'messenger.setActiveFailed': 'Failed to set as active.',
+ 'messenger.setActiveSuccess': 'Active agent updated.',
+ 'messenger.subtitle':
+ 'Connect your account to the official LobeHub bot once. Pick which agent receives messages, switch any time from here or from the bot.',
+ 'messenger.title': 'Messenger',
+ 'messenger.unlinkConfirm':
+ 'Disconnect your {{platform}} account from LobeHub? Inbound messages will stop until you /start again.',
+ 'messenger.unlinkCta': 'Disconnect',
+ 'messenger.unlinkFailed': 'Failed to disconnect.',
+ 'messenger.unlinkSuccess': 'Disconnected.',
+ 'messenger.unlinkTitle': 'Disconnect account',
+ 'verify.confirm.conflict.description':
+ 'This {{platform}} account is already linked to LobeHub account {{email}}. Sign in to that account to manage the link, or unlink there before retrying.',
+ 'verify.confirm.conflict.switchAccount': 'Sign in with another account',
+ 'verify.confirm.conflict.title': 'This account is already linked',
+ 'verify.confirm.cta': 'Confirm linking',
+ 'verify.confirm.defaultAgent': 'Default agent',
+ 'verify.confirm.defaultAgentHint':
+ 'Your messages will be routed here first. You can switch any time via /agents in the bot or from Settings → Messenger.',
+ 'verify.confirm.defaultAgentPlaceholder': 'Select an agent',
+ 'verify.confirm.fields.lobeHubAccount': 'LobeHub account',
+ 'verify.confirm.fields.platformAccount': '{{platform}} account',
+ 'verify.confirm.fields.workspace': 'Workspace',
+ 'verify.confirm.noAgents':
+ "You don't have any agents yet. Create one in LobeHub, then come back to finish linking.",
+ 'verify.confirm.title': 'Confirm linking',
+ 'verify.confirm.workspace': 'Workspace: {{workspace}}',
+ 'verify.error.alreadyLinkedToOther':
+ 'This account is already linked to a different LobeHub account. Sign in to that account first.',
+ 'verify.error.expired': 'This link has expired. Please return to the bot and send /start again.',
+ 'verify.error.generic': 'Something went wrong. Please try again.',
+ 'verify.error.missingToken': 'Invalid link. Open this page from the bot.',
+ 'verify.error.title': 'Unable to confirm link',
+ 'verify.labRequired.description':
+ 'Messenger is currently a Labs feature. Enable it in Settings → Advanced → Labs and reload this page.',
+ 'verify.labRequired.openSettings': 'Open Labs settings',
+ 'verify.labRequired.title': 'Enable Messenger to continue',
+ 'verify.signInCta': 'Sign in to continue',
+ 'verify.signInRequired': 'Please sign in to LobeHub to confirm the link.',
+ 'verify.success.description':
+ 'Your account is now connected to {{platform}}. Open {{platform}} and send your first message.',
+ 'verify.success.openBot': 'Open in {{platform}}',
+ 'verify.success.title': 'Linked successfully!',
+};
diff --git a/src/locales/default/setting.ts b/src/locales/default/setting.ts
index ab8f713f1d8..6e882c1d9b0 100644
--- a/src/locales/default/setting.ts
+++ b/src/locales/default/setting.ts
@@ -983,6 +983,7 @@ When I am ___, I need ___
'tab.manualFill': 'Manually Fill In',
'tab.manualFill.desc': 'Configure a custom MCP skill manually',
'tab.memory': 'Memory',
+ 'tab.messenger': 'Messenger',
'tab.notification': 'Notifications',
'tab.profile': 'My Account',
'tab.provider': 'Provider',
diff --git a/src/proxy.ts b/src/proxy.ts
index 835fb0193c1..25213718c8e 100644
--- a/src/proxy.ts
+++ b/src/proxy.ts
@@ -37,6 +37,7 @@ export const config = {
'/signup(.*)',
'/signin(.*)',
'/verify-email(.*)',
+ '/verify-im(.*)',
'/reset-password(.*)',
'/auth-error(.*)',
'/oauth(.*)',
diff --git a/src/routes/(main)/settings/advanced/index.tsx b/src/routes/(main)/settings/advanced/index.tsx
index abc0196dfad..f42874db020 100644
--- a/src/routes/(main)/settings/advanced/index.tsx
+++ b/src/routes/(main)/settings/advanced/index.tsx
@@ -9,10 +9,12 @@ import isEqual from 'fast-deep-equal';
import { Loader2Icon } from 'lucide-react';
import { memo, useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
import { FORM_STYLE } from '@/const/layoutTokens';
import SettingHeader from '@/routes/(main)/settings/features/SettingHeader';
import { autoUpdateService } from '@/services/electron/autoUpdate';
+import { messengerService } from '@/services/messenger';
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
import { useUserStore } from '@/store/user';
import { labPreferSelectors, preferenceSelectors, settingsSelectors } from '@/store/user/selectors';
@@ -40,18 +42,26 @@ const Page = memo(() => {
enableAgentSelfIteration,
enableInputMarkdown,
enableGatewayMode,
+ enableMessenger,
updateLab,
] = useUserStore((s) => [
preferenceSelectors.isPreferenceInit(s),
labPreferSelectors.enableAgentSelfIteration(s),
labPreferSelectors.enableInputMarkdown(s),
labPreferSelectors.enableGatewayMode(s),
+ labPreferSelectors.enableMessenger(s),
s.updateLab,
]);
const { enableAgentSelfIteration: canShowAgentSelfIterationLab } =
useServerConfigStore(featureFlagsSelectors);
const hasGatewayUrl = useServerConfigStore((s) => !!s.serverConfig.agentGatewayUrl);
+ // Only surface the Messenger lab when the server actually has a messenger
+ // bot configured — otherwise toggling it would do nothing useful.
+ const messengerPlatformsSWR = useSWR('messenger:availablePlatforms', () =>
+ messengerService.availablePlatforms(),
+ );
+ const hasMessengerPlatform = (messengerPlatformsSWR.data?.length ?? 0) > 0;
const [channel, setChannel] = useState<UpdateChannelValue>('stable');
@@ -158,6 +168,23 @@ const Page = memo(() => {
} satisfies FormItemProps,
]
: []),
+ ...(hasMessengerPlatform
+ ? [
+ {
+ children: (
+ <Switch
+ checked={enableMessenger}
+ loading={!isPreferenceInit}
+ onChange={(checked: boolean) => updateLab({ enableMessenger: checked })}
+ />
+ ),
+ className: styles.labItem,
+ desc: tLabs('features.messenger.desc'),
+ label: tLabs('features.messenger.title'),
+ minWidth: undefined,
+ } satisfies FormItemProps,
+ ]
+ : []),
];
const labsGroup: FormGroupItemType = {
diff --git a/src/routes/(main)/settings/features/componentMap.desktop.ts b/src/routes/(main)/settings/features/componentMap.desktop.ts
index 4a76d51621f..4eb60e97010 100644
--- a/src/routes/(main)/settings/features/componentMap.desktop.ts
+++ b/src/routes/(main)/settings/features/componentMap.desktop.ts
@@ -13,6 +13,7 @@ import Appearance from '../appearance';
import Creds from '../creds';
import Hotkey from '../hotkey';
import Memory from '../memory';
+import Messenger from '../messenger';
import Profile from '../profile';
import Provider from '../provider';
import Proxy from '../proxy';
@@ -29,6 +30,7 @@ export const componentMap = {
[SettingsTabs.Provider]: Provider,
[SettingsTabs.ServiceModel]: ServiceModel,
[SettingsTabs.Memory]: Memory,
+ [SettingsTabs.Messenger]: Messenger,
[SettingsTabs.Notification]: Notification,
[SettingsTabs.About]: About,
[SettingsTabs.Hotkey]: Hotkey,
diff --git a/src/routes/(main)/settings/features/componentMap.ts b/src/routes/(main)/settings/features/componentMap.ts
index 6d2f5244ee2..b33d9d44602 100644
--- a/src/routes/(main)/settings/features/componentMap.ts
+++ b/src/routes/(main)/settings/features/componentMap.ts
@@ -22,6 +22,9 @@ export const componentMap = {
[SettingsTabs.Memory]: dynamic(() => import('../memory'), {
loading: loading('Settings > Memory'),
}),
+ [SettingsTabs.Messenger]: dynamic(() => import('../messenger'), {
+ loading: loading('Settings > Messenger'),
+ }),
[SettingsTabs.Notification]: dynamic(
() => import('@/business/client/BusinessSettingPages/Notification'),
{
diff --git a/src/routes/(main)/settings/hooks/useCategory.tsx b/src/routes/(main)/settings/hooks/useCategory.tsx
index cf5d11a3770..4f495ffc7af 100644
--- a/src/routes/(main)/settings/hooks/useCategory.tsx
+++ b/src/routes/(main)/settings/hooks/useCategory.tsx
@@ -17,6 +17,7 @@ import {
KeyIcon,
KeyRound,
Map,
+ MessageCircleIcon,
PaletteIcon,
Sparkles,
TerminalSquare,
@@ -34,6 +35,7 @@ import {
} from '@/store/serverConfig';
import { useUserStore } from '@/store/user';
import { userProfileSelectors } from '@/store/user/slices/auth/selectors';
+import { labPreferSelectors } from '@/store/user/slices/preference/selectors/labPrefer';
import { userGeneralSettingsSelectors } from '@/store/user/slices/settings/selectors';
export enum SettingsGroupKey {
@@ -67,6 +69,7 @@ export const useCategory = () => {
]);
const remoteServerUrl = useElectronStore(electronSyncSelectors.remoteServerUrl);
const isDevMode = useUserStore((s) => userGeneralSettingsSelectors.config(s).isDevMode);
+ const enableMessenger = useUserStore(labPreferSelectors.enableMessenger);
const avatarUrl = useMemo(() => {
if (!avatar) return undefined;
@@ -84,7 +87,7 @@ export const useCategory = () => {
{
icon: avatarUrl ? <Avatar avatar={avatarUrl} shape={'square'} size={26} /> : undefined,
key: SettingsTabs.Profile,
- label: username ? username : tAuth('tab.profile'),
+ label: username || tAuth('tab.profile'),
},
{
icon: ChartColumnBigIcon,
@@ -163,6 +166,13 @@ export const useCategory = () => {
key: SettingsTabs.APIKey,
label: tAuth('tab.apikey'),
},
+ // Gated by Labs → Messenger; the lab flag also controls whether the
+ // verify-im binding flow is reachable.
+ enableMessenger && {
+ icon: MessageCircleIcon,
+ key: SettingsTabs.Messenger,
+ label: t('tab.messenger'),
+ },
].filter(Boolean) as CategoryItem[];
groups.push({
@@ -221,6 +231,7 @@ export const useCategory = () => {
mobile,
showApiKeyManage,
isDevMode,
+ enableMessenger,
avatarUrl,
username,
]);
diff --git a/src/routes/(main)/settings/messenger/index.tsx b/src/routes/(main)/settings/messenger/index.tsx
new file mode 100644
index 00000000000..5f1b864f5d6
--- /dev/null
+++ b/src/routes/(main)/settings/messenger/index.tsx
@@ -0,0 +1,16 @@
+import { useTranslation } from 'react-i18next';
+
+import MessengerSettings from '@/features/Messenger';
+import SettingHeader from '@/routes/(main)/settings/features/SettingHeader';
+
+const Page = () => {
+ const { t } = useTranslation('setting');
+ return (
+ <>
+ <SettingHeader title={t('tab.messenger')} />
+ <MessengerSettings />
+ </>
+ );
+};
+
+export default Page;
diff --git a/src/server/routers/lambda/__tests__/messenger.test.ts b/src/server/routers/lambda/__tests__/messenger.test.ts
new file mode 100644
index 00000000000..4d3a3b124e6
--- /dev/null
+++ b/src/server/routers/lambda/__tests__/messenger.test.ts
@@ -0,0 +1,116 @@
+// @vitest-environment node
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { createCallerFactory } from '@/libs/trpc/lambda';
+import { createContextInner } from '@/libs/trpc/lambda/context';
+
+import { messengerRouter } from '../messenger';
+
+const {
+ mockGetServerDB,
+ mockInitWithEnvKey,
+ mockListByInstallerUserId,
+ mockMarkRevoked,
+ mockSlackAuthTest,
+} = vi.hoisted(() => ({
+ mockGetServerDB: vi.fn(),
+ mockInitWithEnvKey: vi.fn(),
+ mockListByInstallerUserId: vi.fn(),
+ mockMarkRevoked: vi.fn(),
+ mockSlackAuthTest: vi.fn(),
+}));
+
+vi.mock('@/database/core/db-adaptor', () => ({
+ getServerDB: mockGetServerDB,
+}));
+
+vi.mock('@/database/models/messengerInstallation', () => ({
+ MessengerInstallationModel: {
+ findById: vi.fn(),
+ listByInstallerUserId: mockListByInstallerUserId,
+ markRevoked: mockMarkRevoked,
+ },
+}));
+
+vi.mock('@/server/modules/KeyVaultsEncrypt', () => ({
+ KeyVaultsGateKeeper: {
+ initWithEnvKey: mockInitWithEnvKey,
+ },
+}));
+
+vi.mock('@/server/services/bot/platforms/slack/api', () => ({
+ SLACK_API_BASE: 'https://slack.com/api',
+ SlackApi: vi.fn().mockImplementation(() => ({
+ authTest: mockSlackAuthTest,
+ })),
+}));
+
+const createCaller = createCallerFactory(messengerRouter);
+
+const buildSlackInstall = () => ({
+ accountId: null,
+ applicationId: 'A_LOBE',
+ createdAt: new Date('2026-05-06T00:00:00.000Z'),
+ credentials: { botToken: 'xoxb-valid' },
+ id: 'install-1',
+ installedByPlatformUserId: 'U_INSTALLER',
+ installedByUserId: 'user-1',
+ metadata: { scope: 'chat:write', tenantName: 'LobeHub' },
+ platform: 'slack',
+ revokedAt: null,
+ tenantId: 'T_LOBE',
+ tokenExpiresAt: null,
+ updatedAt: new Date('2026-05-06T00:00:00.000Z'),
+});
+
+describe('messengerRouter.listMyInstallations', () => {
+ const serverDB = { kind: 'server-db' };
+
+ beforeEach(() => {
+ vi.clearAllMocks();
+ mockGetServerDB.mockResolvedValue(serverDB);
+ mockInitWithEnvKey.mockResolvedValue(undefined);
+ });
+
+ it('keeps active Slack installations visible', async () => {
+ mockListByInstallerUserId.mockResolvedValue([buildSlackInstall()]);
+ mockSlackAuthTest.mockResolvedValue({ ok: true });
+
+ const caller = createCaller(await createContextInner({ userId: 'user-1' }));
+ const result = await caller.listMyInstallations();
+
+ expect(result).toEqual([
+ expect.objectContaining({
+ applicationId: 'A_LOBE',
+ id: 'install-1',
+ platform: 'slack',
+ scope: 'chat:write',
+ tenantId: 'T_LOBE',
+ tenantName: 'LobeHub',
+ }),
+ ]);
+ expect(mockMarkRevoked).not.toHaveBeenCalled();
+ });
+
+ it('revokes and hides Slack installs when auth.test reports token revocation', async () => {
+ mockListByInstallerUserId.mockResolvedValue([buildSlackInstall()]);
+ mockSlackAuthTest.mockRejectedValue(new Error('Slack API auth.test failed: invalid_auth'));
+
+ const caller = createCaller(await createContextInner({ userId: 'user-1' }));
+ const result = await caller.listMyInstallations();
+
+ expect(result).toEqual([]);
+ expect(mockMarkRevoked).toHaveBeenCalledWith(serverDB, 'install-1');
+ });
+
+ it('does not revoke installs on transient Slack verification failures', async () => {
+ mockListByInstallerUserId.mockResolvedValue([buildSlackInstall()]);
+ mockSlackAuthTest.mockRejectedValue(new Error('network timeout'));
+
+ const caller = createCaller(await createContextInner({ userId: 'user-1' }));
+ const result = await caller.listMyInstallations();
+
+ expect(result).toHaveLength(1);
+ expect(mockMarkRevoked).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/routers/lambda/index.ts b/src/server/routers/lambda/index.ts
index 0bc91ab886a..4b8e1b363a1 100644
--- a/src/server/routers/lambda/index.ts
+++ b/src/server/routers/lambda/index.ts
@@ -46,6 +46,7 @@ import { knowledgeRouter } from './knowledge';
import { knowledgeBaseRouter } from './knowledgeBase';
import { marketRouter } from './market';
import { messageRouter } from './message';
+import { messengerRouter } from './messenger';
import { notebookRouter } from './notebook';
import { notificationRouter } from './notification';
import { oauthDeviceFlowRouter } from './oauthDeviceFlow';
@@ -106,6 +107,7 @@ export const lambdaRouter = router({
knowledgeBase: knowledgeBaseRouter,
market: marketRouter,
message: messageRouter,
+ messenger: messengerRouter,
notebook: notebookRouter,
notification: notificationRouter,
oauthDeviceFlow: oauthDeviceFlowRouter,
diff --git a/src/server/routers/lambda/messenger.ts b/src/server/routers/lambda/messenger.ts
new file mode 100644
index 00000000000..fb8ff19e4ab
--- /dev/null
+++ b/src/server/routers/lambda/messenger.ts
@@ -0,0 +1,530 @@
+import { DEFAULT_INBOX_AVATAR, INBOX_SESSION_ID } from '@lobechat/const';
+import { TRPCError } from '@trpc/server';
+import { and, desc, eq, ne, or } from 'drizzle-orm';
+import { z } from 'zod';
+
+import {
+ getEnabledMessengerPlatforms,
+ getMessengerDiscordConfig,
+ getMessengerSlackConfig,
+ getMessengerTelegramConfig,
+ isMessengerPlatformEnabled,
+ type MessengerPlatform,
+} from '@/config/messenger';
+import {
+ MessengerAccountLinkConflictError,
+ MessengerAccountLinkModel,
+} from '@/database/models/messengerAccountLink';
+import type { DecryptedMessengerInstallation } from '@/database/models/messengerInstallation';
+import { MessengerInstallationModel } from '@/database/models/messengerInstallation';
+import { agents, users } from '@/database/schemas';
+import type { LobeChatDatabase } from '@/database/type';
+import { authedProcedure, publicProcedure, router } from '@/libs/trpc/lambda';
+import { serverDatabase } from '@/libs/trpc/lambda/middleware';
+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
+import { SlackApi } from '@/server/services/bot/platforms/slack/api';
+import {
+ consumeLinkToken,
+ MessengerDiscordBinder,
+ messengerPlatformRegistry,
+ MessengerSlackBinder,
+ MessengerTelegramBinder,
+ peekLinkToken,
+} from '@/server/services/messenger';
+
+const platformEnum = z.enum([
+ 'telegram',
+ 'slack',
+ 'discord',
+]) satisfies z.ZodType<MessengerPlatform>;
+
+const REVOKED_SLACK_AUTH_ERRORS = new Set([
+ 'account_inactive',
+ 'invalid_auth',
+ 'not_authed',
+ 'token_revoked',
+]);
+
+const extractSlackAuthErrorCode = (error: unknown): string | null => {
+ if (!(error instanceof Error)) return null;
+
+ const match = error.message.match(/Slack API auth\.test failed: ([a-z_]+)/);
+ return match?.[1] ?? null;
+};
+
+const reconcileSlackInstallation = async (
+ serverDB: LobeChatDatabase,
+ row: DecryptedMessengerInstallation,
+): Promise<DecryptedMessengerInstallation | null> => {
+ if (row.platform !== 'slack') return row;
+
+ const botToken = (row.credentials as { botToken?: string })?.botToken;
+ if (!botToken) return row;
+
+ try {
+ await new SlackApi(botToken).authTest();
+ return row;
+ } catch (error) {
+ const errorCode = extractSlackAuthErrorCode(error);
+
+ if (errorCode && REVOKED_SLACK_AUTH_ERRORS.has(errorCode)) {
+ await MessengerInstallationModel.markRevoked(serverDB, row.id);
+ return null;
+ }
+
+ console.error('[messenger:listMyInstallations] failed to verify Slack installation', error);
+ return row;
+ }
+};
+
+/**
+ * Reveal enough of the email so a legitimate owner recognizes the account
+ * without exposing the full address to anyone with Slack-side access to
+ * the IM identity.
+ */
+const maskEmail = (email: string): string => {
+ const [local, domain] = email.split('@');
+ if (!domain) return email;
+ const head = local.slice(0, Math.min(2, local.length));
+ return `${head}***@${domain}`;
+};
+
+const messengerProcedure = authedProcedure.use(serverDatabase).use(async (opts) => {
+ const { ctx } = opts;
+ return opts.next({
+ ctx: {
+ messengerLinkModel: new MessengerAccountLinkModel(ctx.serverDB, ctx.userId),
+ },
+ });
+});
+
+export const messengerRouter = router({
+ /**
+ * Surface available platforms + bot deep-link metadata to the UI.
+ *
+ * The static per-platform fields (`id`, `name`, ...) come from the
+ * registry's serialized definitions — same pattern as
+ * `agentBotProvider.listPlatforms` for bot channels. Per-deployment
+ * fields (`appId`, `botUsername`) layer on top from each platform's
+ * DB-backed config:
+ *
+ * - Slack `appId` powers the verify-im success state's
+ * `slack://app?team=…&id=…` deep link straight into the bot DM.
+ * - Discord `applicationId` doubles as the bot user id and feeds the
+ * LinkModal's OAuth2 install URL.
+ */
+ availablePlatforms: publicProcedure.query(async () => {
+ const enabled = await getEnabledMessengerPlatforms();
+ const enabledSet = new Set<string>(enabled);
+ const definitions = messengerPlatformRegistry
+ .listSerializedPlatforms()
+ .filter((def) => enabledSet.has(def.id));
+
+ const [discordConfig, slackConfig, telegramConfig] = await Promise.all([
+ enabledSet.has('discord') ? getMessengerDiscordConfig() : Promise.resolve(null),
+ enabledSet.has('slack') ? getMessengerSlackConfig() : Promise.resolve(null),
+ enabledSet.has('telegram') ? getMessengerTelegramConfig() : Promise.resolve(null),
+ ]);
+
+ return definitions.map((def) => ({
+ ...def,
+ appId:
+ def.id === 'slack'
+ ? slackConfig?.appId
+ : def.id === 'discord'
+ ? discordConfig?.applicationId
+ : undefined,
+ // Telegram-only: deep-link target (`https://t.me/<botUsername>`) — no
+ // direct equivalent on Slack/Discord, both of which use App/Application
+ // IDs to deep-link to the bot.
+ botUsername: def.id === 'telegram' ? telegramConfig?.botUsername : undefined,
+ enabled: true,
+ // Legacy field — older callers index by `.platform` rather than `.id`.
+ // Keep until those callers migrate; safe alias of the registry id.
+ platform: def.id,
+ }));
+ }),
+
+ /**
+ * Public peek used by the verify-im page to render the IM identity preview
+ * before the user confirms. Does NOT consume the token.
+ *
+ * Also surfaces `linkedToEmail` when the IM identity is already bound to
+ * a LobeHub account — the page uses it to warn the user before they create
+ * a duplicate that would either fail the unique index or shadow another
+ * account's binding. Email is partially masked for privacy.
+ */
+ peekLinkToken: publicProcedure
+ .use(serverDatabase)
+ .input(z.object({ randomId: z.string().min(8) }))
+ .query(async ({ input, ctx }) => {
+ const payload = await peekLinkToken(input.randomId);
+ if (!payload) {
+ throw new TRPCError({
+ code: 'NOT_FOUND',
+ message: 'verify.error.expired',
+ });
+ }
+
+ const existingLink = await MessengerAccountLinkModel.findByPlatformUser(
+ ctx.serverDB,
+ payload.platform,
+ payload.platformUserId,
+ payload.tenantId ?? '',
+ );
+
+ let linkedToEmail: string | null = null;
+ if (existingLink) {
+ const [owner] = await ctx.serverDB
+ .select({ email: users.email })
+ .from(users)
+ .where(eq(users.id, existingLink.userId))
+ .limit(1);
+ if (owner?.email) linkedToEmail = maskEmail(owner.email);
+ }
+
+ return {
+ // Set when the IM identity is already linked to some LobeHub account.
+ // The verify-im page compares against the current session email and
+ // shows a warning when they don't match.
+ linkedToEmail,
+ platform: payload.platform,
+ platformUserId: payload.platformUserId,
+ platformUsername: payload.platformUsername,
+ // Tenant fields are populated by the binder for per-tenant platforms
+ // (Slack workspace name) and absent for global-bot platforms; the
+ // verify-im page conditionally renders the workspace blurb.
+ tenantId: payload.tenantId,
+ tenantName: payload.tenantName,
+ };
+ }),
+
+ /**
+ * Confirm the account link. Account-level: creates (or overwrites) a single
+ * `messenger_account_links` row for `(userId, platform)`. `initialAgentId` is
+ * required so the user's first IM message has somewhere to land — they can
+ * always change it later via `/agents` (tap to switch) or the per-agent UI.
+ */
+ confirmLink: messengerProcedure
+ .input(
+ z.object({
+ initialAgentId: z.string().min(1, 'messenger.error.pickDefaultAgent'),
+ randomId: z.string().min(8),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ // Peek first so a cross-user conflict / missing agent doesn't burn the
+ // one-shot token — the user can fix the issue (re-login, pick another
+ // agent) without going back to the bot for a fresh /start.
+ const peeked = await peekLinkToken(input.randomId);
+ if (!peeked) {
+ throw new TRPCError({
+ code: 'NOT_FOUND',
+ message: 'verify.error.expired',
+ });
+ }
+
+ // Cross-user conflict: the (platform, tenant, platformUserId) tuple is
+ // already bound to a different LobeHub account. The DB unique index
+ // would surface this as an opaque "duplicate key" — replace with a
+ // user-facing 409 carrying the masked email of the existing owner.
+ const existingLink = await MessengerAccountLinkModel.findByPlatformUser(
+ ctx.serverDB,
+ peeked.platform,
+ peeked.platformUserId,
+ peeked.tenantId ?? '',
+ );
+ if (existingLink && existingLink.userId !== ctx.userId) {
+ // The verify-im page surfaces the same conflict (with the masked
+ // email of the existing owner) via peekLinkToken's `linkedToEmail`
+ // before the user even clicks confirm — this throw is the defensive
+ // backstop for the rare race / direct-API caller.
+ throw new TRPCError({
+ code: 'CONFLICT',
+ message: 'verify.error.alreadyLinkedToOther',
+ });
+ }
+
+ const [agentRow] = await ctx.serverDB
+ .select({ id: agents.id, title: agents.title })
+ .from(agents)
+ .where(and(eq(agents.id, input.initialAgentId), eq(agents.userId, ctx.userId)))
+ .limit(1);
+ if (!agentRow) {
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'messenger.error.agentNotFound' });
+ }
+
+ // Now safe to consume — token is single-use; do this last so any error
+ // above leaves the token available for retry.
+ const payload = await consumeLinkToken(input.randomId);
+ if (!payload) {
+ // Lost a race with another consumer (or the token expired during the
+ // checks above). Treat the same as the initial peek-miss.
+ throw new TRPCError({
+ code: 'NOT_FOUND',
+ message: 'verify.error.expired',
+ });
+ }
+
+ let link;
+ try {
+ link = await ctx.messengerLinkModel.upsertForPlatform({
+ activeAgentId: agentRow.id,
+ platform: payload.platform,
+ platformUserId: payload.platformUserId,
+ platformUsername: payload.platformUsername ?? null,
+ tenantId: payload.tenantId ?? '',
+ });
+ } catch (error) {
+ // Race backstop: the IM identity got bound to another LobeHub user
+ // between the pre-check above and the upsert. Re-surface as the same
+ // friendly 409 the verify-im UI already knows how to render.
+ if (error instanceof MessengerAccountLinkConflictError) {
+ throw new TRPCError({
+ code: 'CONFLICT',
+ message: 'verify.error.alreadyLinkedToOther',
+ });
+ }
+ throw error;
+ }
+
+ // Best-effort confirmation back to the IM platform.
+ void notifyLinkSuccess(payload.platform, {
+ activeAgentName: agentRow.title ?? undefined,
+ platformUserId: payload.platformUserId,
+ tenantId: payload.tenantId,
+ });
+
+ return { data: link, success: true };
+ }),
+
+ /**
+ * Agent list for the verify-im UI's "pick an initial agent" dropdown.
+ *
+ * Excludes virtual agents (page-copilot, etc.) but explicitly keeps the
+ * inbox/LobeAI agent — historical inbox sessions get migrated with
+ * `virtual=true`, so a plain virtual filter would hide LobeAI even though
+ * the home sidebar shows it (sidebar fetches it separately via
+ * `agent.getBuiltinAgent`).
+ *
+ * Order matches the home sidebar (`updatedAt DESC`). Title fallback for the
+ * inbox agent resolves to `"LobeAI"` + default avatar; everything else falls
+ * back on the client via `common.defaultSession`.
+ */
+ listAgentsForBinding: messengerProcedure.query(async ({ ctx }) => {
+ const rows = await ctx.serverDB
+ .select({
+ avatar: agents.avatar,
+ backgroundColor: agents.backgroundColor,
+ id: agents.id,
+ slug: agents.slug,
+ title: agents.title,
+ })
+ .from(agents)
+ .where(
+ and(
+ eq(agents.userId, ctx.userId),
+ or(ne(agents.virtual, true), eq(agents.slug, INBOX_SESSION_ID)),
+ ),
+ )
+ .orderBy(desc(agents.updatedAt));
+
+ const mapped = rows
+ .filter((row) => row.id)
+ .map((row) => ({
+ avatar: row.avatar || (row.slug === INBOX_SESSION_ID ? DEFAULT_INBOX_AVATAR : null),
+ backgroundColor: row.backgroundColor,
+ id: row.id,
+ slug: row.slug,
+ title: row.title || (row.slug === INBOX_SESSION_ID ? 'LobeAI' : null),
+ }));
+
+ // Pin the inbox/LobeAI agent to the top regardless of updatedAt — it's the
+ // implicit "default" agent and should always be the first option.
+ const inboxIdx = mapped.findIndex((row) => row.slug === INBOX_SESSION_ID);
+ if (inboxIdx > 0) {
+ const [inbox] = mapped.splice(inboxIdx, 1);
+ mapped.unshift(inbox);
+ }
+ return mapped.map(({ slug: _slug, ...rest }) => rest);
+ }),
+
+ /**
+ * Get the current user's link for one platform (or null). `tenantId`
+ * narrows to a specific Slack workspace; omit for Telegram (global bot).
+ */
+ getMyLink: messengerProcedure
+ .input(z.object({ platform: platformEnum, tenantId: z.string().optional() }))
+ .query(async ({ input, ctx }) => {
+ return (await ctx.messengerLinkModel.findByPlatform(input.platform, input.tenantId)) ?? null;
+ }),
+
+ /** List all the current user's links across platforms (and tenants). */
+ listMyLinks: messengerProcedure.query(async ({ ctx }) => {
+ return ctx.messengerLinkModel.list();
+ }),
+
+ /**
+ * Set which agent the IM session routes to. Pass `agentId: null` to clear
+ * the active agent (next inbound message will get the "/agents to pick"
+ * prompt). Pass `tenantId` to scope to a specific Slack workspace.
+ */
+ setActiveAgent: messengerProcedure
+ .input(
+ z.object({
+ agentId: z.string().nullable(),
+ platform: platformEnum,
+ tenantId: z.string().optional(),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ // Validate ownership when setting a non-null agent.
+ if (input.agentId !== null) {
+ const [agentRow] = await ctx.serverDB
+ .select({ id: agents.id })
+ .from(agents)
+ .where(and(eq(agents.id, input.agentId), eq(agents.userId, ctx.userId)))
+ .limit(1);
+ if (!agentRow) {
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'messenger.error.agentNotFound' });
+ }
+ }
+
+ const updated = await ctx.messengerLinkModel.setActiveAgent(
+ input.platform,
+ input.agentId,
+ input.tenantId,
+ );
+ if (!updated) {
+ throw new TRPCError({
+ code: 'NOT_FOUND',
+ message: 'messenger.error.linkRequired',
+ });
+ }
+ return { data: updated, success: true };
+ }),
+
+ /** Remove the user's account link for a platform (optionally scoped to one tenant). */
+ unlink: messengerProcedure
+ .input(z.object({ platform: platformEnum, tenantId: z.string().optional() }))
+ .mutation(async ({ input, ctx }) => {
+ if (!(await isMessengerPlatformEnabled(input.platform))) {
+ throw new TRPCError({
+ code: 'BAD_REQUEST',
+ message: 'messenger.error.platformNotConfigured',
+ });
+ }
+ await ctx.messengerLinkModel.deleteByPlatform(input.platform, input.tenantId);
+ return { success: true };
+ }),
+
+ /**
+ * List the Slack workspaces this LobeHub user has installed the bot into.
+ * Used by the messenger settings page to render the "Connections" panel
+ * (Manus's `manus.im/app#settings/integrations/slack` analogue). Returns
+ * the safe metadata only — never the encrypted credentials.
+ */
+ listMyInstallations: messengerProcedure.query(async ({ ctx }) => {
+ const gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey().catch(() => undefined);
+ const rows = await MessengerInstallationModel.listByInstallerUserId(
+ ctx.serverDB,
+ ctx.userId,
+ gateKeeper,
+ );
+ const activeRows = (
+ await Promise.all(rows.map((row) => reconcileSlackInstallation(ctx.serverDB, row)))
+ ).filter((row): row is DecryptedMessengerInstallation => row !== null);
+
+ return activeRows.map((row) => ({
+ applicationId: row.applicationId,
+ enterpriseId: (row.metadata as Record<string, unknown> | null)?.enterpriseId ?? null,
+ id: row.id,
+ installedAt: row.createdAt,
+ isEnterpriseInstall:
+ (row.metadata as Record<string, unknown> | null)?.isEnterpriseInstall === true,
+ platform: row.platform,
+ scope: ((row.metadata as Record<string, unknown> | null)?.scope as string) ?? '',
+ tenantId: row.tenantId,
+ tenantName: ((row.metadata as Record<string, unknown> | null)?.tenantName as string) ?? '',
+ }));
+ }),
+
+ /**
+ * Disconnect a per-tenant install row. Platform-agnostic — the underlying
+ * action is `markRevoked`, which the router uses to short-circuit inbound
+ * traffic.
+ *
+ * Semantics differ per platform: for Slack, revoking the row freezes the
+ * workspace's bot since dispatch is gated on the install token. For Discord,
+ * the runtime still uses the global env-side bot token, so revoking only
+ * removes the audit/listing entry — the bot itself remains in the guild
+ * until an admin removes it. UI copy is responsible for surfacing this.
+ *
+ * Cascading effect on `messenger_account_links` rows for that tenant is
+ * intentional: link rows persist so re-installing later restores the
+ * binding without re-running verify-im. To wipe a user's link, call `unlink`
+ * with `tenantId`.
+ *
+ * Slack's `auth.revoke` to invalidate the token server-side is a
+ * nice-to-have (frees a workspace bot slot), deferred to PR3.
+ */
+ uninstallInstallation: messengerProcedure
+ .input(z.object({ installationId: z.string().min(1) }))
+ .mutation(async ({ input, ctx }) => {
+ const gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey().catch(() => undefined);
+ const row = await MessengerInstallationModel.findById(
+ ctx.serverDB,
+ input.installationId,
+ gateKeeper,
+ );
+ if (!row) {
+ throw new TRPCError({
+ code: 'NOT_FOUND',
+ message: 'messenger.error.installationNotFound',
+ });
+ }
+ // Authorization: only the user who initiated the install can disconnect
+ // it. Workspace admins who installed via a different LobeHub account
+ // can disconnect through their own settings page.
+ if (row.installedByUserId !== ctx.userId) {
+ throw new TRPCError({
+ code: 'FORBIDDEN',
+ message: 'messenger.error.disconnectNotAllowed',
+ });
+ }
+ await MessengerInstallationModel.markRevoked(ctx.serverDB, row.id);
+ return { success: true };
+ }),
+});
+
+/**
+ * Best-effort confirmation back to the IM platform after a successful link.
+ * Slack needs `tenantId` to resolve the right per-workspace bot token; Telegram
+ * is a global bot and ignores it. PR2.4 (LOBE-8453) rewires the Slack binder
+ * to receive `InstallationCredentials` via the router's installation store —
+ * until then this entry point falls back to no-op for Slack (binder.createClient
+ * returns null in PR1's intermediate state).
+ */
+const notifyLinkSuccess = async (
+ platform: MessengerPlatform,
+ params: { activeAgentName?: string; platformUserId: string; tenantId?: string },
+) => {
+ try {
+ switch (platform) {
+ case 'telegram': {
+ await new MessengerTelegramBinder().notifyLinkSuccess(params);
+ break;
+ }
+ case 'slack': {
+ await new MessengerSlackBinder().notifyLinkSuccess(params);
+ break;
+ }
+ case 'discord': {
+ await new MessengerDiscordBinder().notifyLinkSuccess(params);
+ break;
+ }
+ }
+ } catch (error) {
+ console.error('[messenger:notifyLinkSuccess]', error);
+ }
+};
diff --git a/src/server/services/agentRuntime/AgentRuntimeService.ts b/src/server/services/agentRuntime/AgentRuntimeService.ts
index 06ab7c07d7b..cff35170c07 100644
--- a/src/server/services/agentRuntime/AgentRuntimeService.ts
+++ b/src/server/services/agentRuntime/AgentRuntimeService.ts
@@ -1746,6 +1746,7 @@ export class AgentRuntimeService {
duration,
errorDetail: state?.error,
errorMessage: this.extractErrorMessage?.(state?.error) || String(state?.error || ''),
+ errorType: this.extractErrorType?.(state?.error),
finalState: state,
lastAssistantContent,
llmCalls: state?.usage?.llm?.apiCalls,
@@ -1896,6 +1897,23 @@ export class AgentRuntimeService {
return undefined;
}
+ /**
+ * Extract a stable error code (e.g. `NoAvailableProvider`,
+ * `InvalidProviderAPIKey`) from the agent state error object. Used by
+ * downstream consumers (bot reply rendering, observability) to dispatch on
+ * the error kind without pattern-matching free-form messages.
+ */
+ private extractErrorType(error: any): string | undefined {
+ if (!error) return undefined;
+
+ // ChatCompletionErrorPayload / ChatMessageError both expose the code as
+ // `errorType` or `type` at the top level.
+ const errorType = error.errorType || error.type;
+ if (errorType) return String(errorType);
+
+ return undefined;
+ }
+
/**
* Decide whether to continue execution
*/
diff --git a/src/server/services/agentRuntime/__tests__/extractErrorMessage.test.ts b/src/server/services/agentRuntime/__tests__/extractErrorMessage.test.ts
index e979129285e..fe5d6a7509b 100644
--- a/src/server/services/agentRuntime/__tests__/extractErrorMessage.test.ts
+++ b/src/server/services/agentRuntime/__tests__/extractErrorMessage.test.ts
@@ -133,3 +133,42 @@ describe('AgentRuntimeService.extractErrorMessage', () => {
expect(result).toBe('Budget exceeded');
});
});
+
+describe('AgentRuntimeService.extractErrorType', () => {
+ const createService = () => {
+ return new AgentRuntimeService({} as any, 'user-1', { queueService: null });
+ };
+
+ it('extracts errorType from ChatCompletionErrorPayload', () => {
+ const service = createService();
+ const error = {
+ error: { message: 'empty providers' },
+ errorType: 'NoAvailableProvider',
+ provider: 'lobehub',
+ };
+
+ expect((service as any).extractErrorType(error)).toBe('NoAvailableProvider');
+ });
+
+ it('extracts type from formatted ChatMessageError', () => {
+ const service = createService();
+ const error = {
+ body: { message: 'Rate limit exceeded' },
+ message: 'Rate limit exceeded',
+ type: 'TooManyRequests',
+ };
+
+ expect((service as any).extractErrorType(error)).toBe('TooManyRequests');
+ });
+
+ it('returns undefined for plain Error without a code', () => {
+ const service = createService();
+ expect((service as any).extractErrorType(new Error('oops'))).toBeUndefined();
+ });
+
+ it('returns undefined for null/undefined', () => {
+ const service = createService();
+ expect((service as any).extractErrorType(null)).toBeUndefined();
+ expect((service as any).extractErrorType(undefined)).toBeUndefined();
+ });
+});
diff --git a/src/server/services/bot/AgentBridgeService.ts b/src/server/services/bot/AgentBridgeService.ts
index c58f1ff5f12..0b5b6582019 100644
--- a/src/server/services/bot/AgentBridgeService.ts
+++ b/src/server/services/bot/AgentBridgeService.ts
@@ -24,6 +24,7 @@ import {
} from './platforms';
import { clearReactionState, saveReactionState } from './reactionState';
import {
+ renderAgentError,
renderError,
renderErrorWithDetails,
renderFinalReply,
@@ -349,9 +350,11 @@ export class AgentBridgeService {
AgentBridgeService.clearActiveThread(thread.id);
- const errorContent = stopped
- ? renderStopped(errorMessage, replyLocale)
- : renderError(operationId, replyLocale);
+ const errorContent = {
+ markdown: stopped
+ ? renderStopped(errorMessage, replyLocale)
+ : renderError(operationId, replyLocale),
+ };
if (progressMessage) {
try {
@@ -461,9 +464,10 @@ export class AgentBridgeService {
log('handleMention: stored topicId=%s in thread=%s state', topicId, thread.id);
}
} catch (error) {
- log('handleMention error: %O', error);
+ const operationId = AgentBridgeService.activeOperations.get(thread.id);
+ log('handleMention error: operationId=%s, %O', operationId, error);
try {
- await thread.post(renderError(undefined, replyLocale));
+ await thread.post({ markdown: renderError(operationId, replyLocale) });
} catch (postError) {
log('handleMention: failed to post error message: %O', postError);
}
@@ -601,9 +605,12 @@ export class AgentBridgeService {
return this.handleMention(thread, message, opts);
}
- log('handleSubscribedMessage error: %O', error);
+ const operationId = AgentBridgeService.activeOperations.get(thread.id);
+ log('handleSubscribedMessage error: operationId=%s, %O', operationId, error);
try {
- await thread.post(renderErrorWithDetails(errMsg, replyLocale));
+ await thread.post({
+ markdown: renderErrorWithDetails(errMsg, replyLocale, operationId),
+ });
} catch (postError) {
log('handleSubscribedMessage: failed to post error message: %O', postError);
}
@@ -1007,6 +1014,11 @@ export class AgentBridgeService {
let { progressMessage } = opts;
let operationStartTime = 0;
+ // Tracks the last markdown body written to `progressMessage` so we can
+ // skip redundant edits. Telegram rejects edits with identical content
+ // ("message is not modified"), and the final reply often matches the
+ // last streamed progress frame.
+ let lastProgressText: string | undefined;
const stopGatewayTyping = () => {
if (gatewayConnectionId && botContext?.platformThreadId) {
@@ -1079,11 +1091,20 @@ export class AgentBridgeService {
totalCost: event.totalCost ?? 0,
totalTokens: event.totalTokens ?? 0,
};
- const formatted = client?.formatMarkdown?.(msgBody) ?? msgBody;
- const progressText = client?.formatReply?.(formatted, stats) ?? formatted;
+ // Local mode goes through the Chat SDK adapter, which only
+ // applies the platform's markdown parse_mode when the message
+ // is `{ markdown }`. Pre-converting via `formatMarkdown` (HTML
+ // for Telegram, mrkdwn for Slack, …) would land in a plain
+ // string branch and render literal `**` / `<b>`. `formatReply`
+ // only appends a plain stats line, so it composes cleanly with
+ // the markdown body.
+ const progressBody = client?.formatReply?.(msgBody, stats) ?? msgBody;
+
+ if (progressBody === lastProgressText) return;
try {
- progressMessage = await progressMessage.edit(progressText);
+ progressMessage = await progressMessage.edit({ markdown: progressBody });
+ lastProgressText = progressBody;
} catch (error) {
log('executeWithCallback[local]: failed to edit progress message: %O', error);
}
@@ -1107,28 +1128,43 @@ export class AgentBridgeService {
if (reason === 'error') {
const errorMsg = event.errorMessage || 'Agent execution failed';
log(
- 'onComplete: agent run failed, operationId=%s, errorMessage=%s',
+ 'onComplete: agent run failed, operationId=%s, errorType=%s, errorMessage=%s',
event.operationId,
+ event.errorType,
errorMsg,
);
try {
- const errorText = renderError(event.operationId, replyLocale);
+ const errorBody = renderAgentError(
+ event.errorType,
+ event.operationId,
+ replyLocale,
+ );
+ // Wrap in `{ markdown }` so the Chat SDK adapter sets the
+ // platform's markdown parse_mode (e.g. Telegram `Markdown`,
+ // Slack `mrkdwn`) and converts the body. Plain strings are
+ // sent without parse_mode and would render literal `**`.
if (progressMessage) {
- await progressMessage.edit(errorText);
+ await progressMessage.edit({ markdown: errorBody });
} else {
- await thread.post(errorText);
+ await thread.post({ markdown: errorBody });
}
} catch {
// ignore send failure
}
- reject(new Error(errorMsg));
+ // Resolve (not reject) — the friendly error has already been
+ // posted to the user. Rejecting would bubble up to the outer
+ // try/catch in handleMention and cause a duplicate generic
+ // "Agent Execution Failed" message on top of the friendly one.
+ resolve({ reply: '', topicId: resolvedTopicId });
return;
}
if (reason === 'interrupted') {
if (progressMessage) {
try {
- await progressMessage.edit(renderStopped(undefined, replyLocale));
+ await progressMessage.edit({
+ markdown: renderStopped(undefined, replyLocale),
+ });
} catch {
// ignore edit failure
}
@@ -1149,21 +1185,26 @@ export class AgentBridgeService {
totalCost: event.cost ?? 0,
totalTokens: event.totalTokens ?? 0,
};
- const formattedBody = client?.formatMarkdown?.(replyBody) ?? replyBody;
- const finalText =
- client?.formatReply?.(formattedBody, replyStats) ?? formattedBody;
+ // See progress-handler note above: keep the body as
+ // markdown and let the Chat SDK adapter render it with the
+ // platform's parse_mode. `formatReply` only appends a
+ // plain-text stats line.
+ const finalText = client?.formatReply?.(replyBody, replyStats) ?? replyBody;
const chunks = splitMessage(finalText, charLimit);
try {
if (progressMessage) {
- await progressMessage.edit(chunks[0]);
+ if (chunks[0] !== lastProgressText) {
+ await progressMessage.edit({ markdown: chunks[0] });
+ lastProgressText = chunks[0];
+ }
for (let i = 1; i < chunks.length; i++) {
- await thread.post(chunks[i]);
+ await thread.post({ markdown: chunks[i] });
}
} else {
for (const chunk of chunks) {
- await thread.post(chunk);
+ await thread.post({ markdown: chunk });
}
}
} catch (error) {
@@ -1241,7 +1282,9 @@ export class AgentBridgeService {
if (progressMessage) {
try {
- await progressMessage.edit(renderError(result.operationId, replyLocale));
+ await progressMessage.edit({
+ markdown: renderError(result.operationId, replyLocale),
+ });
} catch (error) {
log('executeWithCallback[local]: failed to edit startup error: %O', error);
}
@@ -1279,7 +1322,9 @@ export class AgentBridgeService {
if (isAbortError(error)) {
if (progressMessage) {
try {
- await progressMessage.edit(renderStopped(error.message, replyLocale));
+ await progressMessage.edit({
+ markdown: renderStopped(error.message, replyLocale),
+ });
} catch (editError) {
log('executeWithCallback[local]: failed to edit stopped message: %O', editError);
}
@@ -1301,9 +1346,17 @@ export class AgentBridgeService {
return;
}
+ // If execAgent rejected after the operation was registered (e.g. an
+ // error inside the resolved-then path), the operationId may already
+ // have been stashed in activeOperations — surface it so the failure
+ // is traceable instead of opaque.
+ const fallbackOperationId = AgentBridgeService.activeOperations.get(thread.id);
+
if (progressMessage) {
try {
- await progressMessage.edit(renderError(undefined, replyLocale));
+ await progressMessage.edit({
+ markdown: renderError(fallbackOperationId, replyLocale),
+ });
} catch (editError) {
log('executeWithCallback[local]: failed to edit startup error: %O', editError);
}
diff --git a/src/server/services/bot/BotCallbackService.ts b/src/server/services/bot/BotCallbackService.ts
index 7ea5f72bafa..6846718d033 100644
--- a/src/server/services/bot/BotCallbackService.ts
+++ b/src/server/services/bot/BotCallbackService.ts
@@ -18,7 +18,7 @@ import {
} from './platforms';
import { clearReactionState, getReactionState, saveReactionState } from './reactionState';
import {
- renderError,
+ renderAgentError,
renderFinalReply,
renderStepProgress,
renderStopped,
@@ -36,6 +36,7 @@ export interface BotCallbackBody {
duration?: number;
elapsedMs?: number;
errorMessage?: string;
+ errorType?: string;
executionTimeMs?: number;
/** Hook ID from HookDispatcher (e.g. 'bot-step-progress', 'bot-completion') */
hookId?: string;
@@ -241,15 +242,17 @@ export class BotCallbackService {
charLimit?: number,
canEdit = true,
): Promise<void> {
- const { reason, lastAssistantContent, errorMessage, operationId } = body;
+ const { reason, lastAssistantContent, errorMessage, errorType, operationId } = body;
if (reason === 'error') {
log(
- 'handleCompletion: agent run failed, operationId=%s, errorMessage=%s',
+ 'handleCompletion: agent run failed, operationId=%s, errorType=%s, errorMessage=%s',
operationId,
+ errorType,
errorMessage,
);
- const errorText = renderError(operationId, replyLocale);
+ const errorBody = renderAgentError(errorType, operationId, replyLocale);
+ const errorText = client.formatMarkdown?.(errorBody) ?? errorBody;
try {
if (canEdit && progressMessageId) {
await messenger.editMessage(progressMessageId, errorText);
diff --git a/src/server/services/bot/BotMessageRouter.ts b/src/server/services/bot/BotMessageRouter.ts
index 57d2cfdcbf0..9035c1f251a 100644
--- a/src/server/services/bot/BotMessageRouter.ts
+++ b/src/server/services/bot/BotMessageRouter.ts
@@ -7,6 +7,7 @@ import { getServerDB } from '@/database/core/db-adaptor';
import type { DecryptedBotProvider } from '@/database/models/agentBotProvider';
import { AgentBotProviderModel } from '@/database/models/agentBotProvider';
import type { LobeChatDatabase } from '@/database/type';
+import { appEnv } from '@/envs/app';
import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';
import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
import { emitAgentSignalSourceEvent } from '@/server/services/agentSignal';
@@ -296,7 +297,7 @@ export class BotMessageRouter {
);
const runtimeContext: BotPlatformRuntimeContext = {
- appUrl: process.env.APP_URL,
+ appUrl: appEnv.APP_URL,
redisClient: getAgentRuntimeRedisClient() as any,
};
@@ -881,9 +882,14 @@ export class BotMessageRouter {
replyLocale,
});
} catch (error) {
- log('onNewMention: unhandled error from handleMention: %O', error);
+ const operationId = AgentBridgeService.getActiveOperationId(thread.id);
+ log(
+ 'onNewMention: unhandled error from handleMention: operationId=%s, %O',
+ operationId,
+ error,
+ );
try {
- await thread.post(renderError(undefined, replyLocale));
+ await thread.post({ markdown: renderError(operationId, replyLocale) });
} catch {
// best-effort notification
}
@@ -990,9 +996,14 @@ export class BotMessageRouter {
replyLocale,
});
} catch (error) {
- log('onSubscribedMessage: unhandled error from handleSubscribedMessage: %O', error);
+ const operationId = AgentBridgeService.getActiveOperationId(thread.id);
+ log(
+ 'onSubscribedMessage: unhandled error from handleSubscribedMessage: operationId=%s, %O',
+ operationId,
+ error,
+ );
try {
- await thread.post(renderError(undefined, replyLocale));
+ await thread.post({ markdown: renderError(operationId, replyLocale) });
} catch {
// best-effort notification
}
@@ -1111,7 +1122,7 @@ export class BotMessageRouter {
log('onNewMessage: unhandled error from handleMention: %O', error);
try {
const errMsg = error instanceof Error ? error.message : String(error);
- await thread.post(renderInlineError(errMsg, replyLocale));
+ await thread.post({ markdown: renderInlineError(errMsg, replyLocale) });
} catch {
// best-effort notification
}
diff --git a/src/server/services/bot/__tests__/BotMessageRouter.test.ts b/src/server/services/bot/__tests__/BotMessageRouter.test.ts
index 9ea5b3b5945..ebdfc50c106 100644
--- a/src/server/services/bot/__tests__/BotMessageRouter.test.ts
+++ b/src/server/services/bot/__tests__/BotMessageRouter.test.ts
@@ -51,6 +51,14 @@ vi.mock('@/server/modules/AgentRuntime/redis', () => ({
getAgentRuntimeRedisClient: mockGetAgentRuntimeRedisClient,
}));
+// Stub appEnv so accessing `appEnv.APP_URL` in vitest doesn't trip
+// `@t3-oss/env-nextjs`'s client-side access guard.
+vi.mock('@/envs/app', () => ({
+ appEnv: {
+ APP_URL: 'http://localhost:3010',
+ },
+}));
+
vi.mock('@chat-adapter/state-ioredis', () => ({
createIoRedisState: vi.fn(),
}));
diff --git a/src/server/services/bot/__tests__/replyTemplate.test.ts b/src/server/services/bot/__tests__/replyTemplate.test.ts
index 5c00c06932a..6acadee45a7 100644
--- a/src/server/services/bot/__tests__/replyTemplate.test.ts
+++ b/src/server/services/bot/__tests__/replyTemplate.test.ts
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest';
import type { RenderStepParams } from '../replyTemplate';
import {
formatTokens,
+ renderAgentError,
renderCommandReply,
renderDmRejected,
renderError,
@@ -355,6 +356,62 @@ describe('replyTemplate', () => {
});
});
+ // ==================== renderAgentError ====================
+
+ describe('renderAgentError', () => {
+ it('returns the friendly NoAvailableProvider copy and appends the operation id footer', () => {
+ const out = renderAgentError('NoAvailableProvider', 'op-abc');
+ expect(out).toContain('No model provider configured');
+ // The friendly message guides the user; the op id is appended as a
+ // traceable footer so operators can still find the failure in logs.
+ expect(out).toContain('op-abc');
+ });
+
+ it('renders Chinese NoAvailableProvider copy with operation id footer when locale is zh-CN', () => {
+ const out = renderAgentError('NoAvailableProvider', 'op-abc', 'zh-CN');
+ expect(out).toContain('未配置可用的模型 Provider');
+ expect(out).toContain('op-abc');
+ });
+
+ it('omits the operation id footer when none is provided', () => {
+ const out = renderAgentError('NoAvailableProvider', undefined);
+ expect(out).toContain('No model provider configured');
+ expect(out).not.toContain('Operation ID');
+ });
+
+ it('returns the friendly InvalidProviderAPIKey copy', () => {
+ const en = renderAgentError('InvalidProviderAPIKey', 'op-1');
+ expect(en).toContain('Invalid or missing API key');
+ const zh = renderAgentError('InvalidProviderAPIKey', 'op-1', 'zh-CN');
+ expect(zh).toContain('API Key 无效');
+ });
+
+ it('returns the friendly ExceededContextWindow copy', () => {
+ expect(renderAgentError('ExceededContextWindow', 'op-1')).toContain(
+ 'Context window exceeded',
+ );
+ expect(renderAgentError('ExceededContextWindow', 'op-1', 'zh-CN')).toContain('上下文已超出');
+ });
+
+ it('maps both QuotaLimitReached and InsufficientQuota to the same quota copy', () => {
+ const a = renderAgentError('QuotaLimitReached', 'op-1');
+ const b = renderAgentError('InsufficientQuota', 'op-1');
+ expect(a).toContain('quota');
+ expect(b).toContain('quota');
+ expect(a).toBe(b);
+ });
+
+ it('falls back to the generic op-id template for unknown error codes', () => {
+ expect(renderAgentError('SomeNewErrorCode', 'op-1')).toBe(
+ '**Agent Execution Failed**\nOperation ID: `op-1`',
+ );
+ });
+
+ it('falls back to the generic header when neither errorType nor operationId is known', () => {
+ expect(renderAgentError(undefined, undefined)).toBe('**Agent Execution Failed**');
+ });
+ });
+
// ==================== renderStopped ====================
describe('renderStopped', () => {
@@ -445,6 +502,16 @@ describe('replyTemplate', () => {
expect(out).toContain('详细信息');
expect(out).toContain('stack trace');
});
+
+ it('includes the Operation ID footer when an operationId is provided', () => {
+ const en = renderErrorWithDetails('stack trace', undefined, 'op-xyz');
+ expect(en).toContain('Operation ID: `op-xyz`');
+ expect(en).toContain('stack trace');
+
+ const zh = renderErrorWithDetails('stack trace', 'zh-CN', 'op-xyz');
+ expect(zh).toContain('Operation ID: `op-xyz`');
+ expect(zh).toContain('stack trace');
+ });
});
// ==================== renderCommandReply ====================
diff --git a/src/server/services/bot/platforms/discord/api.ts b/src/server/services/bot/platforms/discord/api.ts
index 1fd6768c6c0..fb61ab2532a 100644
--- a/src/server/services/bot/platforms/discord/api.ts
+++ b/src/server/services/bot/platforms/discord/api.ts
@@ -3,7 +3,9 @@ import debug from 'debug';
import {
ApplicationCommandOptionType,
ApplicationCommandType,
+ ButtonStyle,
ChannelType,
+ ComponentType,
type RESTGetAPIChannelMessageReactionUsersResult,
type RESTGetAPIChannelMessageResult,
type RESTGetAPIChannelMessagesResult,
@@ -17,6 +19,61 @@ import {
Routes,
} from 'discord-api-types/v10';
+/**
+ * Generic shape for a button rendered into a Discord ActionRow.
+ *
+ * Defined locally rather than re-exporting `discord-api-types` shapes so
+ * callers stay one level above Discord's `ButtonStyle` enum (the messenger
+ * picker only cares about "active" vs "default" — Discord-style mapping
+ * happens inside `buildButtonComponents`).
+ */
+export interface DiscordButtonSpec {
+ customId: string;
+ /** When true, the button renders in Discord's primary (blue) style. */
+ isPrimary?: boolean;
+ label: string;
+}
+
+/** Discord caps each ActionRow at 5 buttons and each message at 5 ActionRows = 25 buttons. */
+const DISCORD_MAX_BUTTONS_PER_ROW = 5;
+const DISCORD_MAX_BUTTONS_PER_MESSAGE = 25;
+
+const buildButtonComponents = (
+ buttons: DiscordButtonSpec[],
+): Array<{
+ components: Array<{
+ custom_id: string;
+ label: string;
+ style: ButtonStyle;
+ type: ComponentType.Button;
+ }>;
+ type: ComponentType.ActionRow;
+}> => {
+ const truncated = buttons.slice(0, DISCORD_MAX_BUTTONS_PER_MESSAGE);
+ const rows: Array<{
+ components: Array<{
+ custom_id: string;
+ label: string;
+ style: ButtonStyle;
+ type: ComponentType.Button;
+ }>;
+ type: ComponentType.ActionRow;
+ }> = [];
+ for (let i = 0; i < truncated.length; i += DISCORD_MAX_BUTTONS_PER_ROW) {
+ rows.push({
+ components: truncated.slice(i, i + DISCORD_MAX_BUTTONS_PER_ROW).map((btn) => ({
+ custom_id: btn.customId,
+ // Discord caps button labels at 80 chars; longer agent names get truncated.
+ label: btn.label.length > 80 ? `${btn.label.slice(0, 77)}...` : btn.label,
+ style: btn.isPrimary ? ButtonStyle.Primary : ButtonStyle.Secondary,
+ type: ComponentType.Button,
+ })),
+ type: ComponentType.ActionRow,
+ });
+ }
+ return rows;
+};
+
const log = debug('bot-platform:discord:client');
export class DiscordApi {
@@ -70,6 +127,54 @@ export class DiscordApi {
return { id: data.id };
}
+ /**
+ * Post a message containing a grid of interactive buttons (Discord ActionRow
+ * + Button components). Used by the messenger's agent picker so the user
+ * can switch the active agent with a tap.
+ *
+ * Returns the message id so callers can later edit the picker in place via
+ * {@link editMessageWithButtons} when the underlying state changes.
+ */
+ async createMessageWithButtons(
+ channelId: string,
+ content: string,
+ buttons: DiscordButtonSpec[],
+ ): Promise<{ id: string }> {
+ log('createMessageWithButtons: channel=%s, buttons=%d', channelId, buttons.length);
+ const data = (await this.rest.post(Routes.channelMessages(channelId), {
+ body: {
+ components: buildButtonComponents(buttons),
+ content,
+ },
+ })) as RESTPostAPIChannelMessageResult;
+ return { id: data.id };
+ }
+
+ /**
+ * Replace an existing message's content + button grid in place. Mirrors
+ * Slack's `chat.update` flow used to re-render the picker after a button
+ * is tapped so the new "active" marker shows up without spamming the chat.
+ */
+ async editMessageWithButtons(
+ channelId: string,
+ messageId: string,
+ content: string,
+ buttons: DiscordButtonSpec[],
+ ): Promise<void> {
+ log(
+ 'editMessageWithButtons: channel=%s, message=%s, buttons=%d',
+ channelId,
+ messageId,
+ buttons.length,
+ );
+ await this.rest.patch(Routes.channelMessage(channelId, messageId), {
+ body: {
+ components: buildButtonComponents(buttons),
+ content,
+ },
+ });
+ }
+
// ==================== Message Operations ====================
async getMessages(
diff --git a/src/server/services/bot/platforms/discord/client.ts b/src/server/services/bot/platforms/discord/client.ts
index 9c43b1beb04..01dd559fc31 100644
--- a/src/server/services/bot/platforms/discord/client.ts
+++ b/src/server/services/bot/platforms/discord/client.ts
@@ -31,6 +31,14 @@ const DEFAULT_DURATION_MS = 8 * 60 * 60 * 1000; // 8 hours
export interface GatewayListenerOptions {
durationMs?: number;
waitUntil?: (task: Promise<any>) => void;
+ /**
+ * Override the URL the Gateway listener forwards events to. Defaults to
+ * `${appUrl}/api/agent/webhooks/discord/${applicationId}` (the per-agent
+ * bot path). Set when the same gateway connection should drive a different
+ * surface — e.g. the LobeHub Messenger forwards to
+ * `/api/agent/messenger/webhooks/discord`.
+ */
+ webhookUrl?: string;
}
function extractChannelId(platformThreadId: string): string {
@@ -116,7 +124,9 @@ class DiscordGatewayClient implements PlatformClient {
const discordAdapter = (bot as any).adapters.get('discord') as DiscordAdapter;
const waitUntil = options?.waitUntil ?? ((task: Promise<any>) => task.catch(() => {}));
- const webhookUrl = `${(this.context.appUrl || '').trim()}/api/agent/webhooks/discord/${this.applicationId}`;
+ const webhookUrl =
+ options?.webhookUrl ??
+ `${(this.context.appUrl || '').trim()}/api/agent/webhooks/discord/${this.applicationId}`;
await discordAdapter.startGatewayListener(
{ waitUntil },
@@ -125,7 +135,15 @@ class DiscordGatewayClient implements PlatformClient {
webhookUrl,
);
- if (!options) {
+ // Auto-refresh by default. Skip ONLY when an explicit `waitUntil` is
+ // passed (the serverless / GatewayManager call sites manage their own
+ // lifecycle). Persist `webhookUrl` across the refresh cycle so callers
+ // that overrode the forwarding target keep their override.
+ const shouldAutoRefresh = !options?.waitUntil;
+ if (shouldAutoRefresh) {
+ const refreshOptions: GatewayListenerOptions | undefined = options?.webhookUrl
+ ? { webhookUrl: options.webhookUrl }
+ : undefined;
this.refreshTimer = setTimeout(() => {
if (this.abort.signal.aborted || this.stopped) return;
@@ -135,7 +153,7 @@ class DiscordGatewayClient implements PlatformClient {
durationMs / 3_600_000,
);
this.abort.abort();
- this.start().catch((err) => {
+ this.start(refreshOptions).catch((err) => {
log('Failed to refresh DiscordBot appId=%s: %O', this.applicationId, err);
});
}, durationMs);
diff --git a/src/server/services/bot/platforms/slack/api.ts b/src/server/services/bot/platforms/slack/api.ts
index 22097fdf985..b34d8af987c 100644
--- a/src/server/services/bot/platforms/slack/api.ts
+++ b/src/server/services/bot/platforms/slack/api.ts
@@ -41,6 +41,79 @@ export class SlackApi {
return { ts: data.ts };
}
+ /**
+ * Post a message with a single URL button rendered as an actions block.
+ * `text` is also sent as fallback for clients that can't render blocks
+ * (notifications, screen readers, etc.).
+ */
+ async postMessageWithUrlButton(
+ channel: string,
+ text: string,
+ button: { text: string; url: string },
+ ): Promise<{ ts: string }> {
+ log('postMessageWithUrlButton: channel=%s', channel);
+ const fallback = this.truncateText(text);
+ const data = await this.call('chat.postMessage', {
+ blocks: [
+ { text: { text: fallback, type: 'mrkdwn' }, type: 'section' },
+ {
+ elements: [
+ {
+ text: { emoji: true, text: button.text, type: 'plain_text' },
+ type: 'button',
+ url: button.url,
+ },
+ ],
+ type: 'actions',
+ },
+ ],
+ channel,
+ text: fallback,
+ });
+ return { ts: data.ts };
+ }
+
+ /**
+ * Post a message that combines a Block Kit URL button AND the same URL
+ * rendered as a plain inline link below it (邮件式 fallback). Mirrors how
+ * email templates render "Click [Verify] / Or copy this link: …" so users
+ * have a path through every Slack client (mobile, screen reader, copy-to-
+ * other-device, future Block Kit regressions).
+ *
+ * Posted via `chat.postMessage` (NOT `chat.postEphemeral`) so the message
+ * stays in DM history and the user can come back to it.
+ */
+ async postMessageWithButtonAndLink(
+ channel: string,
+ intro: string,
+ button: { text: string; url: string },
+ linkLabel: string,
+ ): Promise<{ ts: string }> {
+ log('postMessageWithButtonAndLink: channel=%s', channel);
+ const fallback = this.truncateText(intro);
+ const data = await this.call('chat.postMessage', {
+ blocks: [
+ { text: { text: fallback, type: 'mrkdwn' }, type: 'section' },
+ {
+ elements: [
+ {
+ text: { emoji: true, text: button.text, type: 'plain_text' },
+ type: 'button',
+ url: button.url,
+ },
+ ],
+ type: 'actions',
+ },
+ // mrkdwn auto-linkifies the URL when rendered; older clients that
+ // can't render the actions block above still see this section.
+ { text: { text: this.truncateText(linkLabel), type: 'mrkdwn' }, type: 'section' },
+ ],
+ channel,
+ text: fallback,
+ });
+ return { ts: data.ts };
+ }
+
async postMessageInThread(
channel: string,
threadTs: string,
@@ -55,11 +128,81 @@ export class SlackApi {
return { ts: data.ts };
}
+ /**
+ * Post a message with a grid of action buttons (Block Kit `actions` block).
+ * Each button carries an `action_id` (≤ 255 chars) which the bot receives
+ * back via the interactive webhook (`block_actions` payload) when tapped.
+ * `text` is also sent as fallback for clients that can't render blocks.
+ *
+ * Slack caps a single `actions` block at 25 elements; if the keyboard is
+ * larger we split across multiple actions blocks.
+ */
+ async postMessageWithButtonGrid(
+ channel: string,
+ text: string,
+ buttons: Array<{
+ actionId: string;
+ style?: 'primary' | 'danger';
+ text: string;
+ value?: string;
+ }>,
+ ): Promise<{ ts: string }> {
+ log('postMessageWithButtonGrid: channel=%s, buttons=%d', channel, buttons.length);
+ const fallback = this.truncateText(text);
+ const data = await this.call('chat.postMessage', {
+ blocks: this.buildButtonGridBlocks(fallback, buttons),
+ channel,
+ text: fallback,
+ });
+ return { ts: data.ts };
+ }
+
+ /**
+ * Replace an existing message's text + button grid in place. Used to
+ * re-render the picker after one of its options is selected so the new
+ * active marker is visible.
+ */
+ async updateMessageWithButtonGrid(
+ channel: string,
+ ts: string,
+ text: string,
+ buttons: Array<{
+ actionId: string;
+ style?: 'primary' | 'danger';
+ text: string;
+ value?: string;
+ }>,
+ ): Promise<void> {
+ log('updateMessageWithButtonGrid: channel=%s, ts=%s', channel, ts);
+ const fallback = this.truncateText(text);
+ await this.call('chat.update', {
+ blocks: this.buildButtonGridBlocks(fallback, buttons),
+ channel,
+ text: fallback,
+ ts,
+ });
+ }
+
async updateMessage(channel: string, ts: string, text: string): Promise<void> {
log('updateMessage: channel=%s, ts=%s', channel, ts);
await this.call('chat.update', { channel, text: this.truncateText(text), ts });
}
+ /**
+ * Post an ephemeral message visible only to `user` in `channel`. Slack has
+ * no native button-tap toast (unlike Telegram's `answerCallbackQuery`) so
+ * this is what we use to surface short feedback after an interactive
+ * action — e.g. "Switched to Foo." Requires the `chat:write` scope.
+ */
+ async postEphemeral(channel: string, user: string, text: string): Promise<void> {
+ log('postEphemeral: channel=%s, user=%s', channel, user);
+ await this.call('chat.postEphemeral', {
+ channel,
+ text: this.truncateText(text),
+ user,
+ });
+ }
+
async removeReaction(channel: string, timestamp: string, name: string): Promise<void> {
const slackName = normalizeSlackEmoji(name);
log('removeReaction: channel=%s, ts=%s, name=%s', channel, timestamp, slackName);
@@ -185,6 +328,29 @@ export class SlackApi {
return { messages: data.messages ?? [] };
}
+ /**
+ * Verify the bot token is still valid for this install. Used by the
+ * messenger settings page to reconcile stale local install rows when Slack
+ * app removal didn't reach our lifecycle webhook.
+ */
+ async authTest(): Promise<{
+ appId?: string;
+ botId?: string;
+ team?: string;
+ teamId?: string;
+ userId?: string;
+ }> {
+ log('authTest');
+ const data = await this.call('auth.test', {});
+ return {
+ appId: data.app_id,
+ botId: data.bot_id,
+ team: data.team,
+ teamId: data.team_id,
+ userId: data.user_id,
+ };
+ }
+
// ==================== File Download ====================
/**
@@ -231,6 +397,33 @@ export class SlackApi {
return text;
}
+ private buildButtonGridBlocks(
+ text: string,
+ buttons: Array<{
+ actionId: string;
+ style?: 'primary' | 'danger';
+ text: string;
+ value?: string;
+ }>,
+ ): unknown[] {
+ const elements = buttons.map((b) => ({
+ action_id: b.actionId,
+ text: { emoji: true, text: b.text, type: 'plain_text' },
+ type: 'button',
+ ...(b.style ? { style: b.style } : {}),
+ ...(b.value !== undefined ? { value: b.value } : {}),
+ }));
+
+ // Slack caps each `actions` block at 25 elements — chunk if larger.
+ const chunks: unknown[][] = [];
+ for (let i = 0; i < elements.length; i += 25) chunks.push(elements.slice(i, i + 25));
+
+ return [
+ { text: { text, type: 'mrkdwn' }, type: 'section' },
+ ...chunks.map((els) => ({ elements: els, type: 'actions' })),
+ ];
+ }
+
private async call(method: string, body: Record<string, unknown>): Promise<any> {
const url = `${SLACK_API_BASE}/${method}`;
diff --git a/src/server/services/bot/platforms/telegram/api.ts b/src/server/services/bot/platforms/telegram/api.ts
index 0e97557aceb..e2ab1274109 100644
--- a/src/server/services/bot/platforms/telegram/api.ts
+++ b/src/server/services/bot/platforms/telegram/api.ts
@@ -25,6 +25,28 @@ export class TelegramApi {
return { message_id: data.result.message_id };
}
+ /**
+ * Send a message with a single inline-keyboard URL button. Used by the
+ * Messenger link flow to surface a "Link Account" CTA that opens the
+ * verify-im page in the user's browser.
+ */
+ async sendMessageWithUrlButton(
+ chatId: string | number,
+ text: string,
+ button: { text: string; url: string },
+ ): Promise<{ message_id: number }> {
+ log('sendMessageWithUrlButton: chatId=%s', chatId);
+ const data = await this.call('sendMessage', {
+ chat_id: chatId,
+ parse_mode: 'HTML',
+ reply_markup: {
+ inline_keyboard: [[{ text: button.text, url: button.url }]],
+ },
+ text: this.truncateText(text),
+ });
+ return { message_id: data.result.message_id };
+ }
+
async editMessageText(chatId: string | number, messageId: number, text: string): Promise<void> {
log('editMessageText: chatId=%s, messageId=%s', chatId, messageId);
try {
@@ -41,6 +63,64 @@ export class TelegramApi {
}
}
+ /**
+ * Send a message with inline-keyboard callback buttons. Each button carries
+ * `callback_data` (≤ 64 bytes) which the bot receives back via webhook
+ * `callback_query` when the user taps it.
+ */
+ async sendMessageWithCallbackKeyboard(
+ chatId: string | number,
+ text: string,
+ keyboard: Array<Array<{ callback_data: string; text: string }>>,
+ ): Promise<{ message_id: number }> {
+ log('sendMessageWithCallbackKeyboard: chatId=%s', chatId);
+ const data = await this.call('sendMessage', {
+ chat_id: chatId,
+ parse_mode: 'HTML',
+ reply_markup: { inline_keyboard: keyboard },
+ text: this.truncateText(text),
+ });
+ return { message_id: data.result.message_id };
+ }
+
+ /**
+ * Replace an existing message's text + inline keyboard. Used to re-render a
+ * picker after one of its options is selected (e.g. agent switch).
+ */
+ async editMessageWithCallbackKeyboard(
+ chatId: string | number,
+ messageId: number,
+ text: string,
+ keyboard: Array<Array<{ callback_data: string; text: string }>>,
+ ): Promise<void> {
+ log('editMessageWithCallbackKeyboard: chatId=%s, messageId=%s', chatId, messageId);
+ try {
+ await this.call('editMessageText', {
+ chat_id: chatId,
+ message_id: messageId,
+ parse_mode: 'HTML',
+ reply_markup: { inline_keyboard: keyboard },
+ text: this.truncateText(text),
+ });
+ } catch (error: any) {
+ if (error?.message?.includes('message is not modified')) return;
+ throw error;
+ }
+ }
+
+ /**
+ * Acknowledge a callback_query update. Telegram requires this within 30s of
+ * the user tapping a button, otherwise the loading spinner on the button
+ * stays forever. Pass `text` to show a toast notification to the user.
+ */
+ async answerCallbackQuery(callbackQueryId: string, text?: string): Promise<void> {
+ log('answerCallbackQuery: id=%s', callbackQueryId);
+ await this.call('answerCallbackQuery', {
+ callback_query_id: callbackQueryId,
+ ...(text ? { text } : {}),
+ });
+ }
+
async sendChatAction(chatId: string | number, action = 'typing'): Promise<void> {
log('sendChatAction: chatId=%s, action=%s', chatId, action);
await this.call('sendChatAction', { action, chat_id: chatId });
diff --git a/src/server/services/bot/replyTemplate.ts b/src/server/services/bot/replyTemplate.ts
index 5295179eb8e..0fb27795c1a 100644
--- a/src/server/services/bot/replyTemplate.ts
+++ b/src/server/services/bot/replyTemplate.ts
@@ -222,7 +222,14 @@ type SystemStrings = {
dmRejectedAllowlist: string;
dmRejectedDisabled: string;
error: string;
- errorWithDetails: (details: string) => string;
+ errorExceededContextWindow: string;
+ errorInvalidProviderAPIKey: string;
+ errorLocationNotSupported: string;
+ errorModelNotFound: string;
+ errorNoAvailableProvider: string;
+ errorPermissionDenied: string;
+ errorQuotaLimitReached: string;
+ errorWithDetails: (details: string, operationId?: string) => string;
errorWithId: (operationId: string) => string;
groupRejectedAllowlist: string;
groupRejectedDisabled: string;
@@ -263,8 +270,24 @@ const SYSTEM_STRINGS: Partial<Record<BotReplyLocale, SystemStrings>> = {
dmRejectedDisabled:
"This bot isn't accepting direct messages. Please reach out by mentioning it in a shared channel or group instead.",
error: '**Agent Execution Failed**',
- errorWithDetails: (details) =>
- `**Agent Execution Failed**. Details:\n\`\`\`\n${details}\n\`\`\``,
+ errorExceededContextWindow:
+ "**Context window exceeded.**\nThe conversation is too long for this model. Send `/new` to start a fresh topic, or switch to a model with a larger context window in the agent's settings.",
+ errorInvalidProviderAPIKey:
+ "**Invalid or missing API key.**\nThe configured model provider rejected its API key. Please verify the key in the agent's provider settings (it may be expired, revoked, or mistyped) and try again.",
+ errorLocationNotSupported:
+ "**Region not supported.**\nThe configured model provider isn't available from this server's region. Please switch to a different provider or model in the agent's settings.",
+ errorModelNotFound:
+ "**Model not found.**\nThe configured model isn't available — it may have been removed or renamed. Please pick a different model in the agent's settings.",
+ errorNoAvailableProvider:
+ "**No model provider configured.**\nThis bot's agent has no available model provider — please add an API key and enable a provider in the agent's settings, then try again.",
+ errorPermissionDenied:
+ "**Permission denied by the model provider.**\nThe API key doesn't have access to the requested model or operation. Please check the key's permissions, or switch to a model your account is authorized to use.",
+ errorQuotaLimitReached:
+ "**Provider quota exhausted.**\nThe configured model provider is out of quota or rate-limited. Please wait a moment and try again, top up the account, or switch to a different provider in the agent's settings.",
+ errorWithDetails: (details, operationId) =>
+ operationId
+ ? `**Agent Execution Failed**\nOperation ID: \`${operationId}\`\nDetails:\n\`\`\`\n${details}\n\`\`\``
+ : `**Agent Execution Failed**. Details:\n\`\`\`\n${details}\n\`\`\``,
errorWithId: (operationId) => `**Agent Execution Failed**\nOperation ID: \`${operationId}\``,
groupRejectedAllowlist:
"This bot isn't enabled in this channel. Please contact the bot's owner if you need access.",
@@ -296,7 +319,24 @@ const SYSTEM_STRINGS: Partial<Record<BotReplyLocale, SystemStrings>> = {
dmRejectedAllowlist: '抱歉,您没有私信该机器人的权限。如需访问请联系机器人管理员。',
dmRejectedDisabled: '该机器人不接受私信。请在共享频道或群组里 @它来联系。',
error: '**Agent 执行失败**',
- errorWithDetails: (details) => `**Agent 执行失败**,详细信息:\n\`\`\`\n${details}\n\`\`\``,
+ errorExceededContextWindow:
+ '**上下文已超出模型上限**\n当前对话长度超过了该模型的上下文窗口。可以发送 `/new` 开启新话题,或在 Agent 设置中切换到上下文更大的模型后重试。',
+ errorInvalidProviderAPIKey:
+ '**API Key 无效或缺失**\n所配置的模型 Provider 拒绝了 API Key,可能已过期、被吊销或填写错误。请到 Agent 的 Provider 设置中检查并更新 API Key 后重试。',
+ errorLocationNotSupported:
+ '**当前区域不被支持**\n所配置的模型 Provider 不允许从该服务器所在区域访问。请在 Agent 设置中切换到其他 Provider 或模型。',
+ errorModelNotFound:
+ '**未找到对应模型**\n所配置的模型不可用,可能已下线或更名。请在 Agent 设置中选择其他模型后重试。',
+ errorNoAvailableProvider:
+ '**未配置可用的模型 Provider**\n该机器人的 Agent 当前没有可用的模型 Provider,请在 Agent 设置中添加 API Key 并启用一个 Provider 后重试。',
+ errorPermissionDenied:
+ '**模型 Provider 拒绝访问**\nAPI Key 没有访问该模型或操作的权限。请检查 Key 的权限范围,或在 Agent 设置中切换到当前账户已授权的模型。',
+ errorQuotaLimitReached:
+ '**Provider 配额已用尽**\n所配置的模型 Provider 已达到配额上限或被限流。请稍后重试、为账户充值,或在 Agent 设置中切换到其他 Provider。',
+ errorWithDetails: (details, operationId) =>
+ operationId
+ ? `**Agent 执行失败**\nOperation ID: \`${operationId}\`\n详细信息:\n\`\`\`\n${details}\n\`\`\``
+ : `**Agent 执行失败**,详细信息:\n\`\`\`\n${details}\n\`\`\``,
errorWithId: (operationId) => `**Agent 执行失败**\nOperation ID: \`${operationId}\``,
groupRejectedAllowlist: '该机器人未在此频道启用。如需访问请联系机器人管理员。',
groupRejectedDisabled: '该机器人不在群组或频道中响应。请通过私信联系。',
@@ -318,6 +358,55 @@ export function renderError(operationId?: string, lng?: BotReplyLocale): string
return operationId ? strings.errorWithId(operationId) : strings.error;
}
+/**
+ * Map known `AgentRuntimeError` codes to the `SystemStrings` field that
+ * carries the friendly, actionable copy for that failure mode. Codes not in
+ * this map fall back to the generic `Operation ID` template — opaque enough
+ * not to leak internal error strings, but still traceable in logs.
+ *
+ * When adding a new code: extend `SystemStrings`, drop the copy into both the
+ * `en-US` and `zh-CN` dictionaries, then add the mapping here.
+ */
+const FRIENDLY_ERROR_BY_TYPE: Record<string, keyof SystemStrings> = {
+ ExceededContextWindow: 'errorExceededContextWindow',
+ InsufficientQuota: 'errorQuotaLimitReached',
+ InvalidProviderAPIKey: 'errorInvalidProviderAPIKey',
+ LocationNotSupportError: 'errorLocationNotSupported',
+ ModelNotFound: 'errorModelNotFound',
+ NoAvailableProvider: 'errorNoAvailableProvider',
+ PermissionDenied: 'errorPermissionDenied',
+ QuotaLimitReached: 'errorQuotaLimitReached',
+};
+
+/**
+ * Render an agent-execution failure for the user. Switches on the stable
+ * `errorType` code (from `AgentRuntimeError.chat`) to surface a friendly,
+ * actionable message for known failure modes.
+ *
+ * For unknown error codes — or when `errorType` is missing — falls back to
+ * the legacy `Operation ID` template.
+ */
+export function renderAgentError(
+ errorType: string | undefined,
+ operationId: string | undefined,
+ lng?: BotReplyLocale,
+): string {
+ const strings = getSystemStrings(lng);
+
+ const stringKey = errorType ? FRIENDLY_ERROR_BY_TYPE[errorType] : undefined;
+ if (stringKey) {
+ const value = strings[stringKey];
+ if (typeof value === 'string') {
+ // Append the operationId as a traceable footer so operators can still
+ // grep logs for the failure even when the user-facing copy is a
+ // friendly, actionable message rather than the raw "Operation ID" line.
+ return operationId ? `${value}\nOperation ID: \`${operationId}\`` : value;
+ }
+ }
+
+ return operationId ? strings.errorWithId(operationId) : strings.error;
+}
+
export function renderStopped(message?: string, lng?: BotReplyLocale): string {
return message ?? getSystemStrings(lng).stoppedDefault;
}
@@ -327,8 +416,12 @@ export function renderStopped(message?: string, lng?: BotReplyLocale): string {
* message verbatim (typically for stale-topic or FK violations where the raw
* detail helps the operator diagnose the failure).
*/
-export function renderErrorWithDetails(details: string, lng?: BotReplyLocale): string {
- return getSystemStrings(lng).errorWithDetails(details);
+export function renderErrorWithDetails(
+ details: string,
+ lng?: BotReplyLocale,
+ operationId?: string,
+): string {
+ return getSystemStrings(lng).errorWithDetails(details, operationId);
}
/**
diff --git a/src/server/services/messenger/MessengerRouter.test.ts b/src/server/services/messenger/MessengerRouter.test.ts
new file mode 100644
index 00000000000..cbe128b6efe
--- /dev/null
+++ b/src/server/services/messenger/MessengerRouter.test.ts
@@ -0,0 +1,298 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { MessengerRouter } from './MessengerRouter';
+
+vi.mock('@/database/core/db-adaptor', () => ({
+ getServerDB: vi.fn().mockResolvedValue({}),
+}));
+
+vi.mock('@/server/modules/AgentRuntime/redis', () => ({
+ getAgentRuntimeRedisClient: vi.fn().mockReturnValue(null),
+}));
+
+const mockResolveByPayload = vi.fn();
+const mockResolveByKey = vi.fn();
+const mockMarkRevoked = vi.fn();
+
+vi.mock('./installations', () => ({
+ getInstallationStore: vi.fn(() => ({
+ markRevoked: mockMarkRevoked,
+ resolveByKey: mockResolveByKey,
+ resolveByPayload: mockResolveByPayload,
+ })),
+}));
+
+const mockVerifySignature = vi.fn();
+vi.mock('./oauth/slackOAuth', () => ({
+ verifySignature: (...args: any[]) => mockVerifySignature(...args),
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getEnabledMessengerPlatforms: vi.fn().mockReturnValue(['slack', 'telegram']),
+ getMessengerSlackConfig: vi.fn().mockReturnValue({
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+ }),
+ type: undefined,
+}));
+
+// chat-sdk's `Chat` is heavy + makes network calls. Intercept it so the
+// router's bot-load path doesn't actually spin one up.
+const mockWebhookHandler = vi.fn(async () => new Response('chat-sdk OK', { status: 200 }));
+const mockChatBot = {
+ initialize: vi.fn().mockResolvedValue(undefined),
+ onAction: vi.fn(),
+ onDirectMessage: vi.fn(),
+ onNewMention: vi.fn(),
+ onSlashCommand: vi.fn(),
+ onSubscribedMessage: vi.fn(),
+ webhooks: {
+ slack: mockWebhookHandler,
+ telegram: mockWebhookHandler,
+ },
+};
+vi.mock('chat', () => ({
+ Chat: vi.fn().mockImplementation(() => mockChatBot),
+ ConsoleLogger: vi.fn(),
+}));
+vi.mock('@chat-adapter/state-ioredis', () => ({
+ createIoRedisState: vi.fn(),
+}));
+
+// AgentBridgeService transitively pulls chat-adapter-feishu / others which
+// fail to transform in this test env; the router only needs its static
+// surface for the /stop command path (not exercised here).
+vi.mock('@/server/services/bot/AgentBridgeService', () => ({
+ AgentBridgeService: class {
+ static clearActiveThread = vi.fn();
+ static getActiveOperationId = vi.fn();
+ static isThreadActive = vi.fn();
+ static requestStop = vi.fn();
+ handleMention = vi.fn();
+ },
+}));
+vi.mock('@/server/services/aiAgent', () => ({
+ AiAgentService: class {},
+}));
+vi.mock('@/server/services/bot/replyTemplate', () => ({
+ renderInlineError: (msg: string) => msg,
+}));
+
+// Stub the binder classes (leaf modules) so the real platform definitions +
+// slackWebhookGate still load, but createClient returns a usable PlatformClient
+// without hitting any platform SDK.
+vi.mock('./platforms/slack/binder', () => ({
+ MessengerSlackBinder: vi.fn().mockImplementation(() => ({
+ createClient: () => ({
+ createAdapter: () => ({}),
+ extractChatId: (id: string) => id,
+ registerBotCommands: undefined,
+ }),
+ extractCallbackAction: undefined,
+ handleUnlinkedMessage: vi.fn(),
+ notifyLinkSuccess: vi.fn(),
+ registerWebhook: vi.fn(),
+ sendDmText: vi.fn(),
+ })),
+}));
+
+vi.mock('./platforms/telegram/binder', () => ({
+ MessengerTelegramBinder: vi.fn().mockImplementation(() => ({
+ createClient: () => ({
+ createAdapter: () => ({}),
+ extractChatId: (id: string) => id,
+ }),
+ handleUnlinkedMessage: vi.fn(),
+ notifyLinkSuccess: vi.fn(),
+ registerWebhook: vi.fn(),
+ sendDmText: vi.fn(),
+ })),
+}));
+
+const buildSlackRequest = (body: string, headers: Record<string, string> = {}): Request =>
+ new Request('https://app.example.com/api/agent/messenger/webhooks/slack', {
+ body,
+ headers: {
+ 'content-type': 'application/json',
+ 'x-slack-request-timestamp': String(Math.floor(Date.now() / 1000)),
+ 'x-slack-signature': 'v0=valid',
+ ...headers,
+ },
+ method: 'POST',
+ });
+
+const slackCreds = (tenantId: string) => ({
+ applicationId: 'A_APP',
+ botToken: `xoxb-${tenantId}`,
+ installationKey: `slack:${tenantId}`,
+ metadata: {},
+ platform: 'slack' as const,
+ signingSecret: 'sigsec',
+ tenantId,
+});
+
+beforeEach(() => {
+ mockVerifySignature.mockReturnValue(true);
+ mockChatBot.webhooks = {
+ slack: mockWebhookHandler,
+ telegram: mockWebhookHandler,
+ };
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('MessengerRouter.getWebhookHandler', () => {
+ it('rejects unknown platforms with 404', async () => {
+ const router = new MessengerRouter();
+ const handler = router.getWebhookHandler('discord');
+ const res = await handler(new Request('https://e.com/x', { method: 'POST', body: '{}' }));
+ expect(res.status).toBe(404);
+ });
+
+ it('returns 401 when Slack signature headers are missing', async () => {
+ const router = new MessengerRouter();
+ const handler = router.getWebhookHandler('slack');
+ const req = new Request('https://e.com/x', { body: '{}', method: 'POST' });
+ const res = await handler(req);
+ expect(res.status).toBe(401);
+ expect(mockVerifySignature).not.toHaveBeenCalled();
+ });
+
+ it('returns 401 when Slack signature is invalid', async () => {
+ mockVerifySignature.mockReturnValue(false);
+ const router = new MessengerRouter();
+ const res = await router.getWebhookHandler('slack')(buildSlackRequest('{}'));
+ expect(res.status).toBe(401);
+ expect(mockResolveByPayload).not.toHaveBeenCalled();
+ });
+
+ it('responds to Slack url_verification challenge with the challenge value', async () => {
+ const router = new MessengerRouter();
+ const body = JSON.stringify({ challenge: 'abc123', type: 'url_verification' });
+ const res = await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ expect(res.status).toBe(200);
+ expect(await res.text()).toBe('abc123');
+ expect(mockResolveByPayload).not.toHaveBeenCalled();
+ });
+
+ it('marks the install revoked on app_uninstalled and short-circuits with 200', async () => {
+ const router = new MessengerRouter();
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'app_uninstalled' },
+ type: 'event_callback',
+ });
+ const res = await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ expect(res.status).toBe(200);
+ expect(mockMarkRevoked).toHaveBeenCalledWith('slack:T_ACME');
+ expect(mockResolveByPayload).not.toHaveBeenCalled();
+ });
+
+ it('marks the install revoked on tokens_revoked too', async () => {
+ const router = new MessengerRouter();
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'tokens_revoked' },
+ type: 'event_callback',
+ });
+ await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ expect(mockMarkRevoked).toHaveBeenCalledWith('slack:T_ACME');
+ });
+
+ it('returns 404 when no install is resolved for the inbound payload', async () => {
+ mockResolveByPayload.mockResolvedValue(null);
+ const router = new MessengerRouter();
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_UNKNOWN' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+ const res = await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ expect(res.status).toBe(404);
+ });
+
+ it('caches one bot per installationKey across consecutive calls', async () => {
+ mockResolveByPayload.mockResolvedValue(slackCreds('T_ACME'));
+ const router = new MessengerRouter();
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+
+ // Two calls for the same workspace should reuse the same Chat SDK instance.
+ await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ await router.getWebhookHandler('slack')(buildSlackRequest(body));
+
+ const { Chat } = await import('chat');
+ expect(Chat).toHaveBeenCalledTimes(1);
+ });
+
+ it('keeps separate bots for different installs', async () => {
+ mockResolveByPayload.mockImplementation(async (_req, raw: string) => {
+ const parsed = JSON.parse(raw);
+ const teamId = parsed.authorizations?.[0]?.team_id;
+ return teamId ? slackCreds(teamId) : null;
+ });
+
+ const router = new MessengerRouter();
+ const acmeBody = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+ const betaBody = JSON.stringify({
+ authorizations: [{ team_id: 'T_BETA' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+
+ await router.getWebhookHandler('slack')(buildSlackRequest(acmeBody));
+ await router.getWebhookHandler('slack')(buildSlackRequest(betaBody));
+
+ const { Chat } = await import('chat');
+ // Two distinct workspaces → two Chat SDK instances.
+ expect(Chat).toHaveBeenCalledTimes(2);
+ });
+
+ it('forwards the (reconstructed) request to the chat-sdk webhook handler on a real message', async () => {
+ mockResolveByPayload.mockResolvedValue(slackCreds('T_ACME'));
+ const router = new MessengerRouter();
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+ const res = await router.getWebhookHandler('slack')(buildSlackRequest(body));
+ expect(res.status).toBe(200);
+ expect(mockWebhookHandler).toHaveBeenCalledTimes(1);
+ // Reconstructed request preserves the body (raw bytes are still readable).
+ const calls = mockWebhookHandler.mock.calls as unknown as Request[][];
+ const passedReq = calls[0][0];
+ expect(await passedReq.text()).toBe(body);
+ });
+
+ it('skips signature verification for telegram (no headers required)', async () => {
+ mockResolveByPayload.mockResolvedValue({
+ applicationId: 'telegram:singleton',
+ botToken: 'tg-token',
+ installationKey: 'telegram:singleton',
+ metadata: {},
+ platform: 'telegram',
+ tenantId: '',
+ });
+ const router = new MessengerRouter();
+ const req = new Request('https://e.com/api/agent/messenger/webhooks/telegram', {
+ body: JSON.stringify({ message: { text: 'hi' } }),
+ method: 'POST',
+ });
+ const res = await router.getWebhookHandler('telegram')(req);
+ expect(res.status).toBe(200);
+ expect(mockVerifySignature).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/MessengerRouter.ts b/src/server/services/messenger/MessengerRouter.ts
new file mode 100644
index 00000000000..564de85484d
--- /dev/null
+++ b/src/server/services/messenger/MessengerRouter.ts
@@ -0,0 +1,895 @@
+import { createIoRedisState } from '@chat-adapter/state-ioredis';
+import { INBOX_SESSION_ID } from '@lobechat/const';
+import {
+ Chat,
+ ConsoleLogger,
+ type Message,
+ type MessageContext,
+ type SlashCommandEvent,
+} from 'chat';
+import debug from 'debug';
+import { and, desc, eq, ne, or } from 'drizzle-orm';
+
+import type { MessengerPlatform } from '@/config/messenger';
+import { getServerDB } from '@/database/core/db-adaptor';
+import { MessengerAccountLinkModel } from '@/database/models/messengerAccountLink';
+import type { MessengerAccountLinkItem } from '@/database/schemas';
+import { agents } from '@/database/schemas';
+import type { LobeChatDatabase } from '@/database/type';
+import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';
+import { AiAgentService } from '@/server/services/aiAgent';
+import { AgentBridgeService } from '@/server/services/bot/AgentBridgeService';
+import type { PlatformClient } from '@/server/services/bot/platforms';
+import { renderInlineError } from '@/server/services/bot/replyTemplate';
+
+import { getInstallationStore } from './installations';
+import type { InstallationCredentials } from './installations/types';
+import { messengerPlatformRegistry } from './platforms';
+import type { AgentPickerEntry, InboundCallbackAction, MessengerPlatformBinder } from './types';
+
+const log = debug('lobe-server:messenger:router');
+
+interface RegisteredMessengerBot {
+ binder: MessengerPlatformBinder;
+ chatBot: Chat<any>;
+ client: PlatformClient;
+ /** Cached resolved credentials — null for global-bot platforms (Telegram). */
+ creds: InstallationCredentials;
+}
+
+interface CommandMatch {
+ args: string;
+ name: string;
+}
+
+interface AgentSummary {
+ id: string;
+ title: string;
+}
+
+/**
+ * Per-message context passed to every command handler. Mirrors
+ * `BotMessageRouter`'s `CommandContext`: handlers stay platform-agnostic and
+ * read whatever they need (`thread`, `link`, `binder`, …) off the context
+ * rather than threading parameters through every entry point.
+ *
+ * `source` discriminates the dispatch path: `'text'` carries a chat-sdk
+ * `thread` + `message` (commands like `/new` and `/stop` use these to drive
+ * the runtime); `'slash'` is a native slash-command event without a thread.
+ */
+interface MessengerCommandContext {
+ args: string;
+ authorUserId: string;
+ authorUserName?: string;
+ binder: MessengerPlatformBinder;
+ /** Conversation id for outbound replies. For slash invocations from a
+ * public channel this is the slash-invocation channel; for text it's the
+ * DM thread. */
+ chatId: string;
+ link: MessengerAccountLinkItem | undefined;
+ message?: Message;
+ platform: MessengerPlatform;
+ /** Platform-aware reply: ephemeral on Slack slash, DM on Discord slash,
+ * `binder.sendDmText` on text dispatch. */
+ reply: (text: string) => Promise<void>;
+ serverDB: LobeChatDatabase;
+ source: 'text' | 'slash';
+ tenantId: string;
+ thread?: any;
+}
+
+interface MessengerCommand {
+ description: string;
+ handler: (ctx: MessengerCommandContext) => Promise<void>;
+ name: string;
+}
+
+const HELP_TEXT = [
+ 'Commands:',
+ '• /start — bind (or rebind) your LobeHub account',
+ '• /agents — list your agents and switch the active one',
+ '• /new — start a new conversation',
+ '• /stop — stop the current execution',
+].join('\n');
+
+/** Parse a leading `/cmd` (with optional args) out of a message. Returns null
+ * when the message isn't a command. Strips a trailing `@BotName` so commands
+ * invoked from group chats also match (Telegram appends the bot username). */
+const parseCommand = (text: string | undefined): CommandMatch | null => {
+ if (!text) return null;
+ const trimmed = text.trim();
+ if (!trimmed.startsWith('/')) return null;
+ const match = trimmed.match(/^\/([a-z][\w-]*)(?:@\S+)?(?:\s(.*))?$/is);
+ if (!match) return null;
+ return { args: (match[2] ?? '').trim(), name: match[1].toLowerCase() };
+};
+
+/**
+ * Re-pack a request body that was already drained by `req.text()` so we can
+ * pass it on to chat-sdk / the binder. Original headers + URL preserved.
+ */
+const reconstructRequest = (req: Request, rawBody: string): Request =>
+ new Request(req.url, {
+ body: rawBody,
+ // `Request.duplex` is required when supplying a body to `new Request` in
+ // some runtimes; cast to avoid TS narrowing differences across DOM lib
+ // versions.
+ headers: req.headers,
+ method: req.method,
+ } as RequestInit);
+
+/**
+ * Routes inbound messages from the shared Messenger bots to the right
+ * LobeHub user + agent.
+ *
+ * **Multi-tenant routing (PR2)**: per-tenant platforms (Slack today) keep
+ * one Chat SDK instance per `installationKey` (e.g. `slack:T0123`). Global-
+ * bot platforms (Telegram, future Discord) collapse to a single bot per
+ * platform via the special `telegram:singleton` key.
+ *
+ * Account model: each `(LobeHub user, platform, tenant_id)` triple has at
+ * most one row in `messenger_account_links`, so a single LobeHub user can
+ * link into multiple Slack workspaces simultaneously without collisions.
+ *
+ * **Platform abstraction**: command logic and tap-action handling live in a
+ * single platform-agnostic registry. Per-platform differences (private
+ * interaction reply mechanism, webhook-time vs chat-sdk-delivered actions)
+ * are hidden behind optional `MessengerPlatformBinder` fields
+ * (`replyPrivately`, `extractActionFromEvent`, `acknowledgeCallback`).
+ * Adding a new platform is a binder-only change — the router does not
+ * branch on `platform === 'foo'`.
+ */
+export class MessengerRouter {
+ private bots = new Map<string, RegisteredMessengerBot>();
+ private loadingPromises = new Map<string, Promise<RegisteredMessengerBot | null>>();
+
+ /** Static command registry — reused across every install since command
+ * logic is platform-agnostic. Handlers reach platform-specific reply
+ * surfaces through `ctx.reply` and `ctx.binder`. */
+ private readonly commands: MessengerCommand[] = this.buildCommands();
+
+ /**
+ * Webhook handler for `/api/agent/messenger/webhooks/[platform]`. The flow:
+ *
+ * 1. Read the raw body (must happen before any parsing — Slack's signature
+ * is over the exact bytes Slack sent)
+ * 2. Slack: verify the signing secret, short-circuit `url_verification`
+ * and `app_uninstalled` / `tokens_revoked`
+ * 3. Resolve the install via the platform's `MessengerInstallationStore`
+ * (Slack: DB lookup by `team_id` / `enterprise_id`; Telegram: env
+ * singleton)
+ * 4. Lazy-load (and cache) a Chat SDK bot for that install
+ * 5. Run `binder.extractCallbackAction` to intercept tap-action callbacks
+ * that chat-sdk doesn't surface
+ * 6. Otherwise hand the (reconstructed) request to chat-sdk's webhook handler
+ */
+ getWebhookHandler(platform: string): (req: Request) => Promise<Response> {
+ return async (req: Request) => {
+ const definition = messengerPlatformRegistry.getPlatform(platform);
+ if (!definition) {
+ return new Response(`Unknown messenger platform: ${platform}`, { status: 404 });
+ }
+
+ const rawBody = await req.text();
+
+ // ----- Per-platform gate (signature verification, setup challenges,
+ // lifecycle events). Returning a Response short-circuits the
+ // shared flow; null means continue.
+ if (definition.webhookGate) {
+ const early = await definition.webhookGate.preprocess(req, rawBody, {
+ invalidateBot: (key) => this.bots.delete(key),
+ });
+ if (early) return early;
+ }
+
+ // ----- Resolve install + lazy-load bot -------------------------------
+ const store = getInstallationStore(definition.id);
+ if (!store) {
+ return new Response(`Messenger ${platform} has no installation store`, { status: 500 });
+ }
+
+ const creds = await store.resolveByPayload(reconstructRequest(req, rawBody), rawBody);
+ if (!creds) {
+ log('webhook: no install resolved for platform=%s', platform);
+ return new Response('install not found', { status: 404 });
+ }
+
+ const bot = await this.getOrCreateBot(creds);
+ if (!bot) {
+ return new Response(`Messenger ${platform} bot unavailable`, { status: 503 });
+ }
+
+ // ----- Tap-action callbacks (binder peeks raw body) -----------------
+ if (bot.binder.extractCallbackAction) {
+ try {
+ const action = await bot.binder.extractCallbackAction(reconstructRequest(req, rawBody));
+ if (action) {
+ await this.handleCallbackAction(bot.binder, creds, action);
+ return new Response('OK', { status: 200 });
+ }
+ } catch (error) {
+ log('extractCallbackAction failed for %s: %O', platform, error);
+ }
+ }
+
+ // ----- Normal message → chat-sdk handler ----------------------------
+ const handler = (bot.chatBot.webhooks as any)?.[platform];
+ if (!handler) {
+ return new Response(`Messenger ${platform} webhook unavailable`, { status: 500 });
+ }
+ return handler(reconstructRequest(req, rawBody));
+ };
+ }
+
+ // -------------------------------------------------------------------------
+
+ private async getOrCreateBot(
+ creds: InstallationCredentials,
+ ): Promise<RegisteredMessengerBot | null> {
+ const key = creds.installationKey;
+ const existing = this.bots.get(key);
+ if (existing) return existing;
+
+ const inflight = this.loadingPromises.get(key);
+ if (inflight) return inflight;
+
+ const promise = this.loadBot(creds);
+ this.loadingPromises.set(key, promise);
+
+ try {
+ return await promise;
+ } finally {
+ this.loadingPromises.delete(key);
+ }
+ }
+
+ private async loadBot(creds: InstallationCredentials): Promise<RegisteredMessengerBot | null> {
+ const binder = messengerPlatformRegistry.createBinder(creds);
+ if (!binder) {
+ log('loadBot: no binder available for %s', creds.installationKey);
+ return null;
+ }
+
+ const client = await binder.createClient();
+ if (!client) {
+ log('loadBot: binder %s returned no client', creds.installationKey);
+ return null;
+ }
+
+ const adapters = client.createAdapter();
+ const chatBot = this.createChatBot(adapters, creds);
+
+ // Apply platform-specific chat-sdk patches (Discord forwarded interaction
+ // ack, Discord thread recovery, etc.) so the messenger Chat handles
+ // gateway-forwarded events the same way the per-agent BotMessageRouter does.
+ client.applyChatPatches?.(chatBot);
+
+ const serverDB = await getServerDB();
+ this.registerHandlers(chatBot, serverDB, client, binder, creds);
+
+ await chatBot.initialize();
+
+ if (client.registerBotCommands) {
+ client
+ .registerBotCommands(
+ this.commands.map((cmd) => ({ command: cmd.name, description: cmd.description })),
+ )
+ .catch((error) =>
+ log('registerBotCommands failed for %s: %O', creds.installationKey, error),
+ );
+ }
+
+ const registered: RegisteredMessengerBot = { binder, chatBot, client, creds };
+ this.bots.set(creds.installationKey, registered);
+
+ log('loadBot: registered messenger %s bot', creds.installationKey);
+ return registered;
+ }
+
+ private createChatBot(adapters: Record<string, any>, creds: InstallationCredentials): Chat<any> {
+ const config: any = {
+ adapters,
+ concurrency: 'queue',
+ // Per-install Chat SDK identity so the queue / state / debounce keys
+ // never overlap across workspaces.
+ userName: `messenger-bot-${creds.installationKey}`,
+ };
+
+ const redisClient = getAgentRuntimeRedisClient();
+ if (redisClient) {
+ config.state = createIoRedisState({
+ client: redisClient,
+ // Per-install key prefix → Redis state isolation per workspace.
+ keyPrefix: `chat-sdk:messenger-${creds.installationKey}`,
+ logger: new ConsoleLogger(),
+ });
+ }
+
+ return new Chat(config);
+ }
+
+ private registerHandlers(
+ bot: Chat<any>,
+ serverDB: LobeChatDatabase,
+ client: PlatformClient,
+ binder: MessengerPlatformBinder,
+ creds: InstallationCredentials,
+ ): void {
+ const platform = creds.platform;
+ const tenantId = creds.tenantId;
+
+ const handle = async (thread: any, message: Message): Promise<void> => {
+ if (message.author.isBot === true) return;
+
+ const senderId = message.author.userId;
+ if (!senderId) {
+ log('handle: missing author.userId, dropping');
+ return;
+ }
+
+ const chatId = client.extractChatId(thread.id);
+ const link = await MessengerAccountLinkModel.findByPlatformUser(
+ serverDB,
+ platform,
+ senderId,
+ tenantId,
+ );
+
+ try {
+ const parsed = parseCommand(message.text);
+ if (parsed) {
+ const command = this.commands.find((c) => c.name === parsed.name);
+ if (command) {
+ await command.handler({
+ args: parsed.args,
+ authorUserId: senderId,
+ authorUserName: message.author.userName,
+ binder,
+ chatId,
+ link,
+ message,
+ platform,
+ reply: (text) => binder.sendDmText(chatId, text),
+ serverDB,
+ source: 'text',
+ tenantId,
+ thread,
+ });
+ return;
+ }
+ // Unknown slash text — pass through to the agent so legitimate
+ // "/foo" prompts the user typed still reach them.
+ }
+
+ // Unbound sender → trigger link flow
+ if (!link) {
+ await binder.handleUnlinkedMessage({
+ authorUserId: senderId,
+ authorUserName: message.author.userName,
+ chatId,
+ message,
+ });
+ return;
+ }
+
+ // Bound but no active agent → prompt the user to pick one via /agents
+ if (!link.activeAgentId) {
+ await binder.sendDmText(chatId, 'No active agent selected. Send /agents to pick one.');
+ return;
+ }
+
+ await this.dispatchToAgent(thread, message, client, link, link.activeAgentId, platform);
+ } catch (error) {
+ log('handle: handler error: %O', error);
+ try {
+ await thread.post(renderInlineError('Something went wrong'));
+ } catch {
+ /* ignore */
+ }
+ }
+ };
+
+ // Chat SDK routes 1:1 conversations to `onDirectMessage`. Follow-up messages
+ // in a subscribed thread go to `onSubscribedMessage`. Messenger is currently
+ // DM-only, so wire the same handler to both — and `thread.subscribe()` on
+ // first contact so future messages (which arrive as "subscribed" rather
+ // than "direct") still route here. `onNewMessage(/./)` does NOT match DMs;
+ // those fall through to `onNewMention` if `onDirectMessage` is unregistered.
+ bot.onDirectMessage(async (thread, message, _channel, _context?: MessageContext) => {
+ log('onDirectMessage: install=%s, msgId=%s', creds.installationKey, (message as any).id);
+ try {
+ await thread.subscribe();
+ } catch {
+ /* idempotent — first contact creates the subscription, later calls no-op */
+ }
+ await handle(thread, message);
+ });
+
+ bot.onSubscribedMessage(async (thread, message, _context?: MessageContext) => {
+ log('onSubscribedMessage: install=%s, msgId=%s', creds.installationKey, (message as any).id);
+ await handle(thread, message);
+ });
+
+ // First-touch @mention in a non-DM context (Slack channel, Discord guild
+ // channel). Without this, an unlinked user's first interaction would be
+ // dropped — chat-sdk routes channel mentions to `onNewMention`, not the
+ // DM/subscribed paths above. We treat the unlinked case as "DM the user
+ // a link button"; the runtime is DM-only today (see binder docstrings),
+ // so a linked user's channel mention is intentionally a no-op.
+ bot.onNewMention(async (thread, message, _context?: MessageContext) => {
+ if (message.author.isBot === true) return;
+ const senderId = message.author.userId;
+ if (!senderId) {
+ log('onNewMention: missing author.userId, dropping');
+ return;
+ }
+ log(
+ 'onNewMention: install=%s, msgId=%s, threadId=%s',
+ creds.installationKey,
+ (message as any).id,
+ thread.id,
+ );
+ try {
+ const link = await MessengerAccountLinkModel.findByPlatformUser(
+ serverDB,
+ platform,
+ senderId,
+ tenantId,
+ );
+ if (link) return;
+
+ // Route the link prompt to the user's DM, never the public channel —
+ // the verify-im URL carries a one-shot token. Slack's chat.postMessage
+ // auto-opens an IM when the channel argument is a user id; Discord's
+ // binder calls openDM(authorUserId) and ignores chatId; Telegram uses
+ // the user's chat id directly. So `authorUserId` is the correct
+ // private target across platforms.
+ await binder.handleUnlinkedMessage({
+ authorUserId: senderId,
+ authorUserName: message.author.userName,
+ chatId: senderId,
+ message,
+ });
+ } catch (error) {
+ log('onNewMention: handler error: %O', error);
+ }
+ });
+
+ // Native slash commands — wired only for platforms that opt in by
+ // exposing `replyPrivately` (Slack, Discord). The full set of command
+ // names comes from the shared registry so every native-slash platform
+ // surfaces the same menu.
+ if (binder.replyPrivately) {
+ const slashPaths = this.commands.map((cmd) => `/${cmd.name}`);
+ bot.onSlashCommand(slashPaths, async (event) => {
+ await this.handleSlashCommand({ binder, client, creds, event, serverDB });
+ });
+ }
+
+ // Tap-action callbacks delivered via chat-sdk (Discord). Slack and
+ // Telegram peek at the raw webhook body via `binder.extractCallbackAction`
+ // in `getWebhookHandler` instead because their wire formats let us
+ // short-circuit to a `200 OK` ack outside chat-sdk's request lifecycle.
+ if (binder.extractActionFromEvent) {
+ bot.onAction(async (event) => {
+ try {
+ const action = binder.extractActionFromEvent!(event, client);
+ if (!action) return;
+ await this.handleCallbackAction(binder, creds, action);
+ } catch (error) {
+ log('onAction handler error: %O', error);
+ }
+ });
+ }
+ }
+
+ // -------------------------------------------------------------------------
+ // Command registry
+ // -------------------------------------------------------------------------
+
+ /**
+ * Build the platform-agnostic command registry. Each entry is a single
+ * function that handles every dispatch path (DM text, native slash, future
+ * surfaces) — the `MessengerCommandContext` carries enough state for the
+ * handler to make platform decisions on its own.
+ *
+ * To add a new command: append an entry here. It's automatically wired on
+ * every platform whose binder declares it in `slashCommands.names` (or via
+ * the text path on platforms without native slash support).
+ */
+ private buildCommands(): MessengerCommand[] {
+ return [
+ {
+ description: 'Bind your account to LobeHub',
+ handler: async (ctx) => {
+ // For slash invocations the slash may have come from a public
+ // channel — route the link button privately to the user's DM so
+ // the one-shot link token isn't leaked. Slack accepts a user id
+ // as the `chatId` (`chat.postMessage` auto-opens the IM with
+ // `im:write` scope), so we pass `authorUserId`. Text invocations
+ // already arrive in a DM thread, so we use the inbound `chatId`.
+ const linkChatId = ctx.source === 'slash' ? ctx.authorUserId : ctx.chatId;
+ await ctx.binder.handleUnlinkedMessage({
+ authorUserId: ctx.authorUserId,
+ authorUserName: ctx.authorUserName,
+ chatId: linkChatId,
+ message: ctx.message,
+ });
+ if (ctx.source === 'slash') {
+ await ctx.reply('Check your DM with LobeHub for the link button.');
+ }
+ },
+ name: 'start',
+ },
+ {
+ description: 'List agents and switch the active one',
+ handler: async (ctx) => {
+ await this.runAgentsCommand(ctx);
+ },
+ name: 'agents',
+ },
+ {
+ description: 'Start a new conversation',
+ handler: async (ctx) => {
+ if (!ctx.link) {
+ await ctx.reply('You need to /start to bind your account first.');
+ return;
+ }
+ if (!ctx.thread) {
+ // Slash dispatch has no chat-sdk Thread; setState lives on the
+ // thread instance, so direct the user back to the DM where the
+ // text path can pick the command up.
+ await ctx.reply('Open your direct message with the LobeHub bot and send `/new` there.');
+ return;
+ }
+ // Drop the cached topicId so the next message starts a fresh topic.
+ // Mirrors `/new` in the bot router (BotMessageRouter.buildCommands).
+ try {
+ await ctx.thread.setState({ topicId: undefined }, { replace: true });
+ } catch (error) {
+ log('command /new: setState failed: %O', error);
+ }
+ await ctx.reply('Started a new conversation. Your next message begins a fresh topic.');
+ },
+ name: 'new',
+ },
+ {
+ description: 'Stop the current execution',
+ handler: async (ctx) => {
+ if (!ctx.link) {
+ await ctx.reply('You need to /start to bind your account first.');
+ return;
+ }
+ if (!ctx.thread) {
+ await ctx.reply(
+ 'Open your direct message with the LobeHub bot and send `/stop` there.',
+ );
+ return;
+ }
+ const isActive = AgentBridgeService.isThreadActive(ctx.thread.id);
+ if (!isActive) {
+ await ctx.reply('No active execution to stop.');
+ return;
+ }
+ const operationId = AgentBridgeService.getActiveOperationId(ctx.thread.id);
+ if (operationId) {
+ try {
+ const aiAgentService = new AiAgentService(ctx.serverDB, ctx.link.userId);
+ const result = await aiAgentService.interruptTask({ operationId });
+ if (!result.success) {
+ log('command /stop: runtime interrupt rejected for op=%s', operationId);
+ await ctx.reply('Unable to stop the current execution.');
+ return;
+ }
+ AgentBridgeService.clearActiveThread(ctx.thread.id);
+ log('command /stop: interrupted op=%s', operationId);
+ } catch (error) {
+ log('command /stop: interruptTask failed: %O', error);
+ await ctx.reply('Unable to stop the current execution.');
+ return;
+ }
+ } else {
+ // execAgent hasn't returned an operationId yet — queue the stop so
+ // it fires the moment startup completes.
+ AgentBridgeService.requestStop(ctx.thread.id);
+ log('command /stop: queued deferred stop for thread=%s', ctx.thread.id);
+ }
+ await ctx.reply('Stop requested.');
+ },
+ name: 'stop',
+ },
+ {
+ description: 'Show usage',
+ handler: async (ctx) => {
+ await ctx.reply(HELP_TEXT);
+ },
+ name: 'help',
+ },
+ ];
+ }
+
+ /**
+ * Native slash command dispatcher. Delegates to the shared command registry
+ * after wrapping the chat-sdk slash event in a `MessengerCommandContext`.
+ * Each binder supplies its own `reply` mechanism (ephemeral on Slack,
+ * regular DM message on Discord) so the handler stays platform-agnostic.
+ */
+ private async handleSlashCommand(params: {
+ binder: MessengerPlatformBinder;
+ client: PlatformClient;
+ creds: InstallationCredentials;
+ event: SlashCommandEvent;
+ serverDB: LobeChatDatabase;
+ }): Promise<void> {
+ const { binder, client, creds, event, serverDB } = params;
+ const senderId = event.user.userId;
+ if (!senderId) {
+ log('handleSlashCommand: missing user id, dropping');
+ return;
+ }
+
+ const replyPrivately = binder.replyPrivately;
+ if (!replyPrivately) {
+ log('handleSlashCommand: binder for %s has no replyPrivately', creds.platform);
+ return;
+ }
+
+ // `event.command` is the literal `/foo` the platform sent.
+ const cmdName = event.command.replace(/^\//, '').toLowerCase();
+ // chat-sdk wraps the raw channel id with the platform prefix
+ // (e.g. `slack:<channel>`, `discord:guild:channel:thread`); strip back to
+ // the bare id so direct platform API calls see what they expect.
+ const chatId = client.extractChatId((event.channel as any).id as string);
+ const args = event.text?.trim() ?? '';
+
+ const reply = (text: string) => replyPrivately.call(binder, event.channel, event.user, text);
+
+ const command = this.commands.find((c) => c.name === cmdName);
+ if (!command) {
+ await reply(`Unknown command: /${cmdName}`);
+ return;
+ }
+
+ const link = await MessengerAccountLinkModel.findByPlatformUser(
+ serverDB,
+ creds.platform,
+ senderId,
+ creds.tenantId,
+ );
+
+ try {
+ await command.handler({
+ args,
+ authorUserId: senderId,
+ authorUserName: event.user.userName,
+ binder,
+ chatId,
+ link,
+ platform: creds.platform,
+ reply,
+ serverDB,
+ source: 'slash',
+ tenantId: creds.tenantId,
+ });
+ } catch (error) {
+ log('handleSlashCommand: handler error for /%s: %O', cmdName, error);
+ try {
+ await reply('Something went wrong.');
+ } catch {
+ /* ignore */
+ }
+ }
+ }
+
+ /**
+ * `/agents` is the single command for both listing agents and switching the
+ * active one — on platforms that implement `sendAgentPicker` the bot replies
+ * with a tap-to-switch keyboard. Platforms without keyboard support fall
+ * back to a numbered text list + `/agents <n>` syntax for switching.
+ */
+ private async runAgentsCommand(ctx: MessengerCommandContext): Promise<void> {
+ const { binder, chatId, link, serverDB } = ctx;
+
+ if (!link) {
+ await ctx.reply('You need to /start to bind your account first.');
+ return;
+ }
+
+ const userAgents = await this.fetchUserAgents(serverDB, link.userId);
+ if (userAgents.length === 0) {
+ await ctx.reply('You have no agents yet. Create one in LobeHub, then come back to /agents.');
+ return;
+ }
+
+ // Text-fallback path: `/agents 2` switches without needing the keyboard,
+ // for platforms (or clients) where tap-buttons aren't available.
+ const args = ctx.args.trim();
+ if (args && !binder.sendAgentPicker) {
+ const index = Number.parseInt(args, 10);
+ if (!Number.isInteger(index) || index < 1 || index > userAgents.length) {
+ await ctx.reply(`Usage: /agents <n>, where n is between 1 and ${userAgents.length}.`);
+ return;
+ }
+ const target = userAgents[index - 1];
+ if (link.activeAgentId === target.id) {
+ await ctx.reply(`${target.title} is already the active agent.`);
+ return;
+ }
+ await MessengerAccountLinkModel.setActiveAgentById(serverDB, link.id, target.id);
+ await ctx.reply(
+ `Switched active agent to: ${target.title}. Your next message will go there.`,
+ );
+ return;
+ }
+
+ if (binder.sendAgentPicker) {
+ await binder.sendAgentPicker(chatId, {
+ entries: this.toPickerEntries(userAgents, link.activeAgentId),
+ text: 'Tap an agent to make it the active one:',
+ });
+ return;
+ }
+
+ // Final fallback: numbered list + usage hint for `/agents <n>`.
+ const lines = userAgents.map((agent, i) => {
+ const marker = link.activeAgentId === agent.id ? ' (active)' : '';
+ return `${i + 1}. ${agent.title}${marker}`;
+ });
+ await ctx.reply(
+ `Your agents:\n${lines.join('\n')}\n\nReply with /agents <n> to switch the active agent.`,
+ );
+ }
+
+ private toPickerEntries(
+ userAgents: AgentSummary[],
+ activeAgentId: string | null | undefined,
+ ): AgentPickerEntry[] {
+ return userAgents.map((agent) => ({
+ id: agent.id,
+ isActive: agent.id === activeAgentId,
+ title: agent.title,
+ }));
+ }
+
+ /**
+ * Run a tap-action surfaced by either the binder's webhook-time peek
+ * (Slack/Telegram) or chat-sdk's `onAction` event (Discord). Both paths
+ * normalize to the same `InboundCallbackAction` shape and delegate the
+ * outbound ack (toast + picker re-render) to `binder.acknowledgeCallback`.
+ * Today only `messenger:switch:<agentId>` is recognized; new actions can
+ * be added by extending the dispatch below.
+ */
+ private async handleCallbackAction(
+ binder: MessengerPlatformBinder,
+ creds: InstallationCredentials,
+ action: InboundCallbackAction,
+ ): Promise<void> {
+ if (!binder.acknowledgeCallback) return;
+
+ const ack = binder.acknowledgeCallback.bind(binder, action);
+
+ const switchMatch = action.data.match(/^messenger:switch:(.+)$/);
+ if (!switchMatch) {
+ await ack({ toast: 'Unknown action.' });
+ return;
+ }
+
+ const targetAgentId = switchMatch[1];
+ const serverDB = await getServerDB();
+ const link = await MessengerAccountLinkModel.findByPlatformUser(
+ serverDB,
+ creds.platform,
+ action.fromUserId,
+ creds.tenantId,
+ );
+ if (!link) {
+ await ack({ toast: 'Not linked. Send /start first.' });
+ return;
+ }
+
+ const userAgents = await this.fetchUserAgents(serverDB, link.userId);
+ const target = userAgents.find((agent) => agent.id === targetAgentId);
+ if (!target) {
+ await ack({ toast: 'Agent not found.' });
+ return;
+ }
+
+ if (link.activeAgentId === targetAgentId) {
+ await ack({ toast: `${target.title} is already active.` });
+ return;
+ }
+
+ await MessengerAccountLinkModel.setActiveAgentById(serverDB, link.id, targetAgentId);
+ await ack({
+ toast: `Switched to ${target.title}.`,
+ updatedPicker: {
+ entries: this.toPickerEntries(userAgents, targetAgentId),
+ text: 'Pick an agent to receive your messages:',
+ },
+ });
+ }
+
+ /**
+ * Fetch a user's agents for `/agents`. Mirrors the web
+ * verify-im picker (and the home sidebar):
+ * - excludes virtual agents but explicitly keeps the inbox/LobeAI agent
+ * - orders by `updatedAt DESC`
+ * - pins inbox/LobeAI to the top regardless of updatedAt
+ * - applies the LobeAI title fallback (slug='inbox') and a generic
+ * "Custom Agent" fallback for agents without a title
+ */
+ private async fetchUserAgents(
+ serverDB: LobeChatDatabase,
+ userId: string,
+ ): Promise<AgentSummary[]> {
+ const rows = await serverDB
+ .select({ id: agents.id, slug: agents.slug, title: agents.title })
+ .from(agents)
+ .where(
+ and(
+ eq(agents.userId, userId),
+ or(ne(agents.virtual, true), eq(agents.slug, INBOX_SESSION_ID)),
+ ),
+ )
+ .orderBy(desc(agents.updatedAt));
+
+ const mapped = rows
+ .filter((row) => row.id)
+ .map((row) => ({
+ id: row.id,
+ slug: row.slug,
+ title:
+ (row.title && row.title.trim()) ||
+ (row.slug === INBOX_SESSION_ID ? 'LobeAI' : 'Custom Agent'),
+ }));
+
+ const inboxIdx = mapped.findIndex((row) => row.slug === INBOX_SESSION_ID);
+ if (inboxIdx > 0) {
+ const [inbox] = mapped.splice(inboxIdx, 1);
+ mapped.unshift(inbox);
+ }
+ return mapped.map(({ slug: _slug, ...rest }) => rest);
+ }
+
+ private async dispatchToAgent(
+ thread: any,
+ message: Message,
+ client: PlatformClient,
+ link: MessengerAccountLinkItem,
+ agentId: string,
+ platform: MessengerPlatform,
+ ): Promise<void> {
+ log(
+ 'dispatchToAgent: platform=%s, tenant=%s, sender=%s, agent=%s, user=%s',
+ platform,
+ link.tenantId,
+ link.platformUserId,
+ agentId,
+ link.userId,
+ );
+
+ const serverDB = await getServerDB();
+ const bridge = new AgentBridgeService(serverDB, link.userId);
+
+ await bridge.handleMention(thread, message, {
+ agentId,
+ botContext: {
+ // Per-install applicationId so the agent runtime can distinguish
+ // workspaces in its own bookkeeping (logs, traces, dedupe).
+ applicationId: link.tenantId
+ ? `messenger-${platform}-${link.tenantId}`
+ : `messenger-${platform}`,
+ platform,
+ platformThreadId: thread.id,
+ },
+ client,
+ });
+ }
+}
+
+let singleton: MessengerRouter | undefined;
+
+export const getMessengerRouter = (): MessengerRouter => {
+ if (!singleton) singleton = new MessengerRouter();
+ return singleton;
+};
diff --git a/src/server/services/messenger/index.ts b/src/server/services/messenger/index.ts
new file mode 100644
index 00000000000..7ed8e3a3dee
--- /dev/null
+++ b/src/server/services/messenger/index.ts
@@ -0,0 +1,8 @@
+export type { LinkTokenPayload } from './linkTokenStore';
+export { consumeLinkToken, issueLinkToken, peekLinkToken } from './linkTokenStore';
+export { getMessengerRouter, MessengerRouter } from './MessengerRouter';
+export { messengerPlatformRegistry } from './platforms';
+export { MessengerDiscordBinder } from './platforms/discord';
+export { MessengerSlackBinder } from './platforms/slack';
+export { MessengerTelegramBinder } from './platforms/telegram';
+export type { MessengerPlatformBinder } from './types';
diff --git a/src/server/services/messenger/installations/discord.test.ts b/src/server/services/messenger/installations/discord.test.ts
new file mode 100644
index 00000000000..a65e13339af
--- /dev/null
+++ b/src/server/services/messenger/installations/discord.test.ts
@@ -0,0 +1,60 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { DISCORD_INSTALLATION_KEY, DiscordInstallationStore } from './discord';
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerDiscordConfig: vi.fn(),
+}));
+
+const { getMessengerDiscordConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ applicationId: 'app-1',
+ botToken: 'discord-bot-token',
+ publicKey: 'pk',
+};
+
+beforeEach(() => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValue(VALID_CONFIG as any);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('DiscordInstallationStore.resolveByPayload', () => {
+ it('returns env-backed credentials with the publicKey in metadata', async () => {
+ const store = new DiscordInstallationStore();
+ const creds = await store.resolveByPayload();
+ expect(creds).toMatchObject({
+ accountId: 'app-1',
+ applicationId: 'app-1',
+ botToken: 'discord-bot-token',
+ installationKey: DISCORD_INSTALLATION_KEY,
+ platform: 'discord',
+ tenantId: '',
+ });
+ expect(creds?.metadata).toEqual({ publicKey: 'pk' });
+ });
+
+ it('returns null when discord is not configured', async () => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValueOnce(null);
+ const store = new DiscordInstallationStore();
+ expect(await store.resolveByPayload()).toBeNull();
+ });
+});
+
+describe('DiscordInstallationStore.resolveByKey', () => {
+ it('returns credentials when the key matches the singleton', async () => {
+ const store = new DiscordInstallationStore();
+ const creds = await store.resolveByKey(DISCORD_INSTALLATION_KEY);
+ expect(creds?.botToken).toBe('discord-bot-token');
+ });
+
+ it('returns null for any other installation key', async () => {
+ const store = new DiscordInstallationStore();
+ expect(await store.resolveByKey('discord:other')).toBeNull();
+ expect(getMessengerDiscordConfig).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/installations/discord.ts b/src/server/services/messenger/installations/discord.ts
new file mode 100644
index 00000000000..a3dbb546a4e
--- /dev/null
+++ b/src/server/services/messenger/installations/discord.ts
@@ -0,0 +1,43 @@
+import debug from 'debug';
+
+import { getMessengerDiscordConfig } from '@/config/messenger';
+
+import type { InstallationCredentials, MessengerInstallationStore } from './types';
+
+const log = debug('lobe-server:messenger:install-store:discord');
+
+/**
+ * Discord uses a single App-level bot token that works across every guild
+ * the bot is installed into — there is no per-tenant token exchange like
+ * Slack's OAuth. So "tenant" is meaningless here, the same shape as Telegram.
+ */
+export const DISCORD_INSTALLATION_KEY = 'discord:singleton';
+
+const buildCreds = async (): Promise<InstallationCredentials | null> => {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return null;
+ return {
+ accountId: config.applicationId,
+ applicationId: config.applicationId,
+ botToken: config.botToken,
+ installationKey: DISCORD_INSTALLATION_KEY,
+ metadata: {
+ publicKey: config.publicKey,
+ },
+ platform: 'discord',
+ tenantId: '',
+ };
+};
+
+export class DiscordInstallationStore implements MessengerInstallationStore {
+ async resolveByPayload(): Promise<InstallationCredentials | null> {
+ const creds = await buildCreds();
+ if (!creds) log('resolveByPayload: discord credentials not configured in DB');
+ return creds;
+ }
+
+ async resolveByKey(installationKey: string): Promise<InstallationCredentials | null> {
+ if (installationKey !== DISCORD_INSTALLATION_KEY) return null;
+ return buildCreds();
+ }
+}
diff --git a/src/server/services/messenger/installations/index.test.ts b/src/server/services/messenger/installations/index.test.ts
new file mode 100644
index 00000000000..0c5692424c1
--- /dev/null
+++ b/src/server/services/messenger/installations/index.test.ts
@@ -0,0 +1,45 @@
+// @vitest-environment node
+import { describe, expect, it, vi } from 'vitest';
+
+import { getInstallationStore } from './index';
+
+vi.mock('./slack', () => ({
+ SlackInstallationStore: vi.fn().mockImplementation(() => ({ kind: 'slack' })),
+}));
+
+vi.mock('./telegram', () => ({
+ TELEGRAM_INSTALLATION_KEY: 'telegram:singleton',
+ TelegramInstallationStore: vi.fn().mockImplementation(() => ({ kind: 'telegram' })),
+}));
+
+vi.mock('./discord', () => ({
+ DISCORD_INSTALLATION_KEY: 'discord:singleton',
+ DiscordInstallationStore: vi.fn().mockImplementation(() => ({ kind: 'discord' })),
+}));
+
+describe('getInstallationStore', () => {
+ it('returns the slack store for platform=slack', () => {
+ const store = getInstallationStore('slack');
+ expect(store).toEqual({ kind: 'slack' });
+ });
+
+ it('returns the telegram store for platform=telegram', () => {
+ const store = getInstallationStore('telegram');
+ expect(store).toEqual({ kind: 'telegram' });
+ });
+
+ it('returns the discord store for platform=discord', () => {
+ const store = getInstallationStore('discord');
+ expect(store).toEqual({ kind: 'discord' });
+ });
+
+ it('memoizes the store across calls (one instance per process)', async () => {
+ const a = getInstallationStore('slack');
+ const b = getInstallationStore('slack');
+ expect(a).toBe(b);
+ });
+
+ it('returns null for an unknown platform', () => {
+ expect(getInstallationStore('unknown' as any)).toBeNull();
+ });
+});
diff --git a/src/server/services/messenger/installations/index.ts b/src/server/services/messenger/installations/index.ts
new file mode 100644
index 00000000000..9db05873612
--- /dev/null
+++ b/src/server/services/messenger/installations/index.ts
@@ -0,0 +1,46 @@
+import type { MessengerPlatform } from '@/config/messenger';
+
+import { DiscordInstallationStore } from './discord';
+import { SlackInstallationStore } from './slack';
+import { TelegramInstallationStore } from './telegram';
+import type { MessengerInstallationStore } from './types';
+
+/**
+ * One InstallationStore singleton per platform — they're stateless apart
+ * from the in-process refresh single-flight cache (Slack), so a single
+ * instance per process is correct.
+ */
+const stores: Partial<Record<MessengerPlatform, MessengerInstallationStore>> = {};
+
+const create = (platform: MessengerPlatform): MessengerInstallationStore | null => {
+ switch (platform) {
+ case 'slack': {
+ return new SlackInstallationStore();
+ }
+ case 'telegram': {
+ return new TelegramInstallationStore();
+ }
+ case 'discord': {
+ return new DiscordInstallationStore();
+ }
+ default: {
+ return null;
+ }
+ }
+};
+
+export const getInstallationStore = (
+ platform: MessengerPlatform,
+): MessengerInstallationStore | null => {
+ if (!stores[platform]) {
+ const store = create(platform);
+ if (!store) return null;
+ stores[platform] = store;
+ }
+ return stores[platform] ?? null;
+};
+
+export { DISCORD_INSTALLATION_KEY, DiscordInstallationStore } from './discord';
+export { SlackInstallationStore } from './slack';
+export { TELEGRAM_INSTALLATION_KEY, TelegramInstallationStore } from './telegram';
+export type { InstallationCredentials, MessengerInstallationStore } from './types';
diff --git a/src/server/services/messenger/installations/slack.test.ts b/src/server/services/messenger/installations/slack.test.ts
new file mode 100644
index 00000000000..623dae87954
--- /dev/null
+++ b/src/server/services/messenger/installations/slack.test.ts
@@ -0,0 +1,383 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { MessengerInstallationModel } from '@/database/models/messengerInstallation';
+import { refreshToken } from '@/server/services/messenger/oauth/slackOAuth';
+
+import { SlackInstallationStore } from './slack';
+
+vi.mock('@/database/core/db-adaptor', () => ({
+ getServerDB: vi.fn().mockResolvedValue({}),
+}));
+
+vi.mock('@/database/models/messengerInstallation', () => ({
+ MessengerInstallationModel: {
+ findByTenant: vi.fn(),
+ markRevoked: vi.fn(),
+ updateRotatedToken: vi.fn(),
+ },
+}));
+
+vi.mock('@/server/modules/KeyVaultsEncrypt', () => ({
+ KeyVaultsGateKeeper: {
+ initWithEnvKey: vi.fn().mockResolvedValue({}),
+ },
+}));
+
+vi.mock('@/server/services/messenger/oauth/slackOAuth', () => ({
+ refreshToken: vi.fn(),
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerSlackConfig: vi.fn(),
+}));
+
+const { getMessengerSlackConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+};
+
+const buildRow = (overrides: Partial<any> = {}) => ({
+ accessedAt: new Date(),
+ accountId: 'U_BOT',
+ applicationId: 'A_APP',
+ createdAt: new Date(),
+ credentials: { botToken: 'xoxb-real', refreshToken: 'r-current' },
+ id: 'install-id-1',
+ installedByPlatformUserId: null,
+ installedByUserId: 'lobe-user-1',
+ metadata: { tenantName: 'Acme' },
+ platform: 'slack',
+ revokedAt: null,
+ tenantId: 'T_ACME',
+ tokenExpiresAt: null,
+ updatedAt: new Date(),
+ ...overrides,
+});
+
+const eventsApiBody = (teamId: string, isEnterprise = false, enterpriseId?: string) =>
+ JSON.stringify({
+ api_app_id: 'A_APP',
+ authorizations: [
+ {
+ enterprise_id: enterpriseId ?? null,
+ is_enterprise_install: isEnterprise,
+ team_id: isEnterprise ? null : teamId,
+ },
+ ],
+ event: { type: 'message', user: 'U_X' },
+ type: 'event_callback',
+ });
+
+const interactivityBody = (teamId: string) =>
+ new URLSearchParams({
+ payload: JSON.stringify({
+ api_app_id: 'A_APP',
+ team: { id: teamId, name: 'Acme' },
+ type: 'block_actions',
+ user: { id: 'U_X' },
+ }),
+ }).toString();
+
+const slashCommandBody = (teamId: string) =>
+ new URLSearchParams({
+ api_app_id: 'A_APP',
+ command: '/lobehub',
+ team_id: teamId,
+ user_id: 'U_X',
+ }).toString();
+
+const buildReq = (contentType: string): Request =>
+ new Request('https://app.example.com/webhook', {
+ headers: { 'content-type': contentType },
+ method: 'POST',
+ });
+
+beforeEach(() => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(VALID_CONFIG);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('SlackInstallationStore.resolveByPayload', () => {
+ it('routes Events API JSON payloads by authorizations[0].team_id', async () => {
+ const acmeRow = buildRow({ id: 'r-acme', tenantId: 'T_ACME' });
+ const betaRow = buildRow({ id: 'r-beta', tenantId: 'T_BETA' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockImplementation(
+ async (_db, _platform, tenantId) => {
+ if (tenantId === 'T_ACME') return acmeRow;
+ if (tenantId === 'T_BETA') return betaRow;
+ return null;
+ },
+ );
+
+ const store = new SlackInstallationStore();
+ const acme = await store.resolveByPayload(
+ buildReq('application/json'),
+ eventsApiBody('T_ACME'),
+ );
+ const beta = await store.resolveByPayload(
+ buildReq('application/json'),
+ eventsApiBody('T_BETA'),
+ );
+
+ expect(acme?.installationKey).toBe('slack:T_ACME');
+ expect(beta?.installationKey).toBe('slack:T_BETA');
+ });
+
+ it('routes interactivity payloads by team.id', async () => {
+ const row = buildRow({ tenantId: 'T_ACME' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(row);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByPayload(
+ buildReq('application/x-www-form-urlencoded'),
+ interactivityBody('T_ACME'),
+ );
+
+ expect(creds?.tenantId).toBe('T_ACME');
+ expect(creds?.botToken).toBe('xoxb-real');
+ expect(creds?.signingSecret).toBe('sigsec');
+ });
+
+ it('routes slash command form payloads by team_id', async () => {
+ const row = buildRow({ tenantId: 'T_ACME' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(row);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByPayload(
+ buildReq('application/x-www-form-urlencoded'),
+ slashCommandBody('T_ACME'),
+ );
+
+ expect(creds?.tenantId).toBe('T_ACME');
+ });
+
+ it('routes Enterprise Grid org-install payloads by enterprise_id', async () => {
+ const row = buildRow({ tenantId: 'E_BIG' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(row);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByPayload(
+ buildReq('application/json'),
+ eventsApiBody('IGNORED', true, 'E_BIG'),
+ );
+
+ expect(creds?.tenantId).toBe('E_BIG');
+ expect(MessengerInstallationModel.findByTenant).toHaveBeenCalledWith(
+ expect.anything(),
+ 'slack',
+ 'E_BIG',
+ 'A_APP',
+ expect.anything(),
+ );
+ });
+
+ it('returns null for url_verification challenges (no install yet)', async () => {
+ const store = new SlackInstallationStore();
+ const result = await store.resolveByPayload(
+ buildReq('application/json'),
+ JSON.stringify({ challenge: 'xyz', token: 't', type: 'url_verification' }),
+ );
+ expect(result).toBeNull();
+ expect(MessengerInstallationModel.findByTenant).not.toHaveBeenCalled();
+ });
+
+ it('returns null when env not configured', async () => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(null);
+ const store = new SlackInstallationStore();
+ const result = await store.resolveByPayload(
+ buildReq('application/json'),
+ eventsApiBody('T_ACME'),
+ );
+ expect(result).toBeNull();
+ });
+
+ it('returns null when no install exists for the resolved tenant', async () => {
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(null);
+ const store = new SlackInstallationStore();
+ const result = await store.resolveByPayload(
+ buildReq('application/json'),
+ eventsApiBody('T_UNKNOWN'),
+ );
+ expect(result).toBeNull();
+ });
+
+ it('returns null when malformed JSON / form body', async () => {
+ const store = new SlackInstallationStore();
+ expect(await store.resolveByPayload(buildReq('application/json'), 'not json')).toBeNull();
+ });
+});
+
+describe('SlackInstallationStore.resolveByKey', () => {
+ it('parses the installation key and looks up the row', async () => {
+ const row = buildRow({ tenantId: 'T_ACME' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(row);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByKey('slack:T_ACME');
+ expect(creds?.tenantId).toBe('T_ACME');
+ expect(MessengerInstallationModel.findByTenant).toHaveBeenCalledWith(
+ expect.anything(),
+ 'slack',
+ 'T_ACME',
+ 'A_APP',
+ expect.anything(),
+ );
+ });
+
+ it("returns null for keys that don't belong to slack", async () => {
+ const store = new SlackInstallationStore();
+ expect(await store.resolveByKey('telegram:singleton')).toBeNull();
+ });
+});
+
+describe('SlackInstallationStore token rotation', () => {
+ it('refreshes when the token is within REFRESH_BUFFER_MS of expiry', async () => {
+ const expiringSoon = buildRow({
+ credentials: { botToken: 'xoxe.xoxb-old', refreshToken: 'r-old' },
+ tokenExpiresAt: new Date(Date.now() + 30_000), // 30s
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(expiringSoon);
+ vi.mocked(refreshToken).mockResolvedValue({
+ access_token: 'xoxe.xoxb-new',
+ expires_in: 43_200,
+ ok: true,
+ refresh_token: 'r-new',
+ });
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByKey('slack:T_ACME');
+
+ expect(refreshToken).toHaveBeenCalledTimes(1);
+ expect(MessengerInstallationModel.updateRotatedToken).toHaveBeenCalledWith(
+ expect.anything(),
+ expiringSoon.id,
+ expect.objectContaining({
+ credentials: { botToken: 'xoxe.xoxb-new', refreshToken: 'r-new' },
+ }),
+ expect.anything(),
+ );
+ expect(creds?.botToken).toBe('xoxe.xoxb-new');
+ });
+
+ it('does not refresh when the token has plenty of life left', async () => {
+ const fresh = buildRow({
+ credentials: { botToken: 'xoxe.xoxb-fresh', refreshToken: 'r-fresh' },
+ tokenExpiresAt: new Date(Date.now() + 6 * 60 * 60 * 1000), // 6h
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(fresh);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByKey('slack:T_ACME');
+
+ expect(refreshToken).not.toHaveBeenCalled();
+ expect(creds?.botToken).toBe('xoxe.xoxb-fresh');
+ });
+
+ it('does not refresh when no refresh_token (rotation off)', async () => {
+ const noRotation = buildRow({
+ credentials: { botToken: 'xoxb-legacy' },
+ tokenExpiresAt: new Date(Date.now() + 30_000),
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(noRotation);
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByKey('slack:T_ACME');
+
+ expect(refreshToken).not.toHaveBeenCalled();
+ // Returns the still-valid (about to expire) creds — caller will handle
+ // the eventual 401 via Slack's normal error path.
+ expect(creds?.botToken).toBe('xoxb-legacy');
+ });
+
+ it('single-flights concurrent refreshes per tenant', async () => {
+ const expiring = buildRow({
+ credentials: { botToken: 'xoxe.xoxb-old', refreshToken: 'r-old' },
+ tokenExpiresAt: new Date(Date.now() + 30_000),
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(expiring);
+
+ let resolveRefresh: (v: any) => void = () => {};
+ vi.mocked(refreshToken).mockImplementation(
+ () =>
+ new Promise((resolve) => {
+ resolveRefresh = resolve;
+ }),
+ );
+
+ const store = new SlackInstallationStore();
+ const p1 = store.resolveByKey('slack:T_ACME');
+ const p2 = store.resolveByKey('slack:T_ACME');
+ const p3 = store.resolveByKey('slack:T_ACME');
+
+ // Let all three promises walk through the awaited findByTenant /
+ // gateKeeper init and reach the refresh single-flight gate before we
+ // assert that only one refresh was triggered.
+ await new Promise((r) => setTimeout(r, 10));
+ expect(refreshToken).toHaveBeenCalledTimes(1);
+
+ resolveRefresh({
+ access_token: 'xoxe.xoxb-new',
+ expires_in: 43_200,
+ ok: true,
+ refresh_token: 'r-new',
+ });
+
+ const [c1, c2, c3] = await Promise.all([p1, p2, p3]);
+ expect(c1?.botToken).toBe('xoxe.xoxb-new');
+ expect(c2?.botToken).toBe('xoxe.xoxb-new');
+ expect(c3?.botToken).toBe('xoxe.xoxb-new');
+ // Still only one refresh call across all three concurrent lookups.
+ expect(refreshToken).toHaveBeenCalledTimes(1);
+ });
+
+ it('falls back to the original creds if refresh fails', async () => {
+ const expiring = buildRow({
+ credentials: { botToken: 'xoxe.xoxb-old', refreshToken: 'r-old' },
+ tokenExpiresAt: new Date(Date.now() + 30_000),
+ });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(expiring);
+ vi.mocked(refreshToken).mockRejectedValue(new Error('upstream 502'));
+
+ const store = new SlackInstallationStore();
+ const creds = await store.resolveByKey('slack:T_ACME');
+ // Refresh failed → return what we still have, so the caller's request can
+ // still try (and fail loudly if Slack rejects the stale token).
+ expect(creds?.botToken).toBe('xoxe.xoxb-old');
+ });
+});
+
+describe('SlackInstallationStore.markRevoked', () => {
+ it('looks up by tenant and marks the install row revoked', async () => {
+ const row = buildRow({ id: 'install-rev', tenantId: 'T_ACME' });
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(row);
+
+ const store = new SlackInstallationStore();
+ await store.markRevoked('slack:T_ACME');
+
+ expect(MessengerInstallationModel.markRevoked).toHaveBeenCalledWith(
+ expect.anything(),
+ 'install-rev',
+ );
+ });
+
+ it('no-ops when the key does not belong to slack', async () => {
+ const store = new SlackInstallationStore();
+ await store.markRevoked('telegram:singleton');
+ expect(MessengerInstallationModel.markRevoked).not.toHaveBeenCalled();
+ });
+
+ it('no-ops when there is no install for that tenant', async () => {
+ vi.mocked(MessengerInstallationModel.findByTenant).mockResolvedValue(null);
+ const store = new SlackInstallationStore();
+ await store.markRevoked('slack:T_GONE');
+ expect(MessengerInstallationModel.markRevoked).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/installations/slack.ts b/src/server/services/messenger/installations/slack.ts
new file mode 100644
index 00000000000..b5d761ea31d
--- /dev/null
+++ b/src/server/services/messenger/installations/slack.ts
@@ -0,0 +1,297 @@
+import debug from 'debug';
+
+import { getMessengerSlackConfig } from '@/config/messenger';
+import { getServerDB } from '@/database/core/db-adaptor';
+import {
+ type DecryptedMessengerInstallation,
+ MessengerInstallationModel,
+} from '@/database/models/messengerInstallation';
+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
+import { refreshToken as refreshSlackToken } from '@/server/services/messenger/oauth/slackOAuth';
+
+import type { InstallationCredentials, MessengerInstallationStore } from './types';
+
+const log = debug('lobe-server:messenger:install-store:slack');
+
+/** Refresh proactively when within this many ms of `tokenExpiresAt`. */
+const REFRESH_BUFFER_MS = 120_000;
+
+const installationKey = (tenantId: string): string => `slack:${tenantId}`;
+
+const parseInstallationKey = (key: string): string | null => {
+ if (!key.startsWith('slack:')) return null;
+ return key.slice('slack:'.length);
+};
+
+interface SlackCredentialsBlob {
+ botToken?: string;
+ refreshToken?: string;
+}
+
+const toCredentials = (
+ row: DecryptedMessengerInstallation,
+ signingSecret: string,
+): InstallationCredentials | null => {
+ const blob = row.credentials as SlackCredentialsBlob;
+ if (!blob.botToken) {
+ log('toCredentials: install row %s has no botToken', row.id);
+ return null;
+ }
+ return {
+ accountId: row.accountId ?? undefined,
+ applicationId: row.applicationId,
+ botToken: blob.botToken,
+ installationKey: installationKey(row.tenantId),
+ metadata: row.metadata ?? {},
+ platform: 'slack',
+ signingSecret,
+ tenantId: row.tenantId,
+ };
+};
+
+const isExpiringSoon = (row: DecryptedMessengerInstallation): boolean => {
+ if (!row.tokenExpiresAt) return false;
+ return row.tokenExpiresAt.getTime() - Date.now() <= REFRESH_BUFFER_MS;
+};
+
+/**
+ * Resolve a Slack tenant id out of an inbound webhook payload.
+ *
+ * Slack delivers events in three shapes; each carries the tenant id in a
+ * different place:
+ *
+ * - **Events API** (`application/json`): top-level `team_id`, plus
+ * `authorizations[0].{team_id, enterprise_id, is_enterprise_install}`.
+ * We prefer `authorizations[0]` because Slack Connect / shared channels
+ * have an event team that differs from the install team.
+ * - **Interactivity** (form-encoded `payload=<json>`): `team.id`,
+ * `enterprise.id`, `is_enterprise_install` at the JSON top level.
+ * - **Slash commands** (form-encoded fields): `team_id`, `enterprise_id`,
+ * `is_enterprise_install`.
+ *
+ * Returns null when the payload doesn't look like Slack or doesn't carry an
+ * identifiable tenant.
+ */
+const extractSlackTenant = (
+ contentType: string,
+ rawBody: string,
+): { applicationId?: string; tenantId: string } | null => {
+ // Events API → JSON
+ if (contentType.includes('application/json')) {
+ try {
+ const parsed = JSON.parse(rawBody);
+ // url_verification challenge — Slack pings the endpoint at setup time
+ // with no install yet; nothing to resolve.
+ if (parsed?.type === 'url_verification') return null;
+
+ const auth = Array.isArray(parsed.authorizations) ? parsed.authorizations[0] : null;
+ const isEnterprise =
+ auth?.is_enterprise_install === true || parsed.is_enterprise_install === true;
+ const tenantId = isEnterprise
+ ? (auth?.enterprise_id ?? parsed.enterprise_id)
+ : (auth?.team_id ?? parsed.team_id);
+ if (!tenantId) return null;
+ return { applicationId: parsed.api_app_id ?? undefined, tenantId: String(tenantId) };
+ } catch {
+ return null;
+ }
+ }
+
+ // Interactivity (block_actions / view_submission / shortcut) AND
+ // slash_commands both arrive form-encoded.
+ if (contentType.includes('application/x-www-form-urlencoded')) {
+ const params = new URLSearchParams(rawBody);
+ const payloadStr = params.get('payload');
+ if (payloadStr) {
+ // Interactivity payload
+ try {
+ const payload = JSON.parse(payloadStr);
+ const isEnterprise = payload?.is_enterprise_install === true;
+ const tenantId = isEnterprise ? payload?.enterprise?.id : payload?.team?.id;
+ if (!tenantId) return null;
+ return { applicationId: payload?.api_app_id ?? undefined, tenantId: String(tenantId) };
+ } catch {
+ return null;
+ }
+ }
+ // Slash command — top-level form fields
+ const isEnterprise = params.get('is_enterprise_install') === 'true';
+ const tenantId = isEnterprise ? params.get('enterprise_id') : params.get('team_id');
+ if (!tenantId) return null;
+ return { applicationId: params.get('api_app_id') ?? undefined, tenantId };
+ }
+
+ return null;
+};
+
+/**
+ * Slack-specific resolver. Reads from `messenger_installations`, decrypts
+ * credentials lazily, and proactively refreshes rotating tokens before they
+ * expire — single-flight per tenant so concurrent inbound webhooks for the
+ * same workspace don't stampede `oauth.v2.access`.
+ */
+export class SlackInstallationStore implements MessengerInstallationStore {
+ /**
+ * In-process single-flight lock. Each refresh creates a Promise here keyed
+ * by `tenantId`; concurrent callers await the same Promise instead of all
+ * triggering their own refresh. Cleared in the `finally` so a failed
+ * refresh doesn't poison the slot.
+ *
+ * This is per-process — for multi-replica deployments two replicas could
+ * still both refresh concurrently. Slack handles that gracefully (each
+ * refresh succeeds independently, the latest write wins) but burns an
+ * extra `oauth.v2.access` request. A Redis lock would harden this; deferred
+ * until we see the load.
+ */
+ private inflightRefresh = new Map<string, Promise<DecryptedMessengerInstallation | null>>();
+
+ async resolveByPayload(req: Request, rawBody: string): Promise<InstallationCredentials | null> {
+ const contentType = req.headers.get('content-type') ?? '';
+ const tenant = extractSlackTenant(contentType, rawBody);
+ if (!tenant) return null;
+ return this.lookup(tenant.tenantId, tenant.applicationId);
+ }
+
+ async resolveByKey(key: string): Promise<InstallationCredentials | null> {
+ const tenantId = parseInstallationKey(key);
+ if (!tenantId) return null;
+ return this.lookup(tenantId);
+ }
+
+ async markRevoked(key: string): Promise<void> {
+ const tenantId = parseInstallationKey(key);
+ if (!tenantId) return;
+
+ const config = await getMessengerSlackConfig();
+ const serverDB = await getServerDB();
+ const gateKeeper = await this.getGateKeeper();
+ const row = await MessengerInstallationModel.findByTenant(
+ serverDB,
+ 'slack',
+ tenantId,
+ config?.appId,
+ gateKeeper,
+ );
+ if (!row) {
+ log('markRevoked: no install for tenant=%s', tenantId);
+ return;
+ }
+ await MessengerInstallationModel.markRevoked(serverDB, row.id);
+ log('markRevoked: marked install id=%s tenant=%s', row.id, tenantId);
+ }
+
+ // ----------------------------------------------------------------------
+
+ private async lookup(
+ tenantId: string,
+ applicationId?: string,
+ ): Promise<InstallationCredentials | null> {
+ const config = await getMessengerSlackConfig();
+ if (!config) {
+ log('lookup: Slack OAuth env not configured');
+ return null;
+ }
+
+ const serverDB = await getServerDB();
+ const gateKeeper = await this.getGateKeeper();
+ const appId = applicationId ?? config.appId;
+
+ let row = await MessengerInstallationModel.findByTenant(
+ serverDB,
+ 'slack',
+ tenantId,
+ appId,
+ gateKeeper,
+ );
+ if (!row) {
+ log('lookup: no install for (slack, %s, %s)', tenantId, appId);
+ return null;
+ }
+
+ if (isExpiringSoon(row)) {
+ log('lookup: token for tenant=%s expires soon, refreshing', tenantId);
+ const refreshed = await this.refreshSingleFlight(tenantId, row);
+ if (refreshed) row = refreshed;
+ }
+
+ return toCredentials(row, config.signingSecret);
+ }
+
+ private async refreshSingleFlight(
+ tenantId: string,
+ row: DecryptedMessengerInstallation,
+ ): Promise<DecryptedMessengerInstallation | null> {
+ const existing = this.inflightRefresh.get(tenantId);
+ if (existing) return existing;
+
+ const promise = this.runRefresh(row).finally(() => {
+ this.inflightRefresh.delete(tenantId);
+ });
+ this.inflightRefresh.set(tenantId, promise);
+ return promise;
+ }
+
+ private async runRefresh(
+ row: DecryptedMessengerInstallation,
+ ): Promise<DecryptedMessengerInstallation | null> {
+ const config = await getMessengerSlackConfig();
+ if (!config) return null;
+
+ const blob = row.credentials as SlackCredentialsBlob;
+ if (!blob.refreshToken) {
+ log('runRefresh: install id=%s has no refresh_token (rotation off)', row.id);
+ return null;
+ }
+
+ let response;
+ try {
+ response = await refreshSlackToken({
+ clientId: config.clientId,
+ clientSecret: config.clientSecret,
+ refreshToken: blob.refreshToken,
+ });
+ } catch (error) {
+ log('runRefresh: oauth.v2.access (refresh) failed for id=%s: %O', row.id, error);
+ return null;
+ }
+
+ if (!response.access_token) {
+ log('runRefresh: refresh response missing access_token for id=%s', row.id);
+ return null;
+ }
+
+ const newCredentials: Record<string, unknown> = {
+ botToken: response.access_token,
+ refreshToken: response.refresh_token ?? blob.refreshToken,
+ };
+ const newExpiresAt =
+ typeof response.expires_in === 'number'
+ ? new Date(Date.now() + response.expires_in * 1000)
+ : null;
+
+ const serverDB = await getServerDB();
+ const gateKeeper = await this.getGateKeeper();
+ await MessengerInstallationModel.updateRotatedToken(
+ serverDB,
+ row.id,
+ { credentials: newCredentials, tokenExpiresAt: newExpiresAt },
+ gateKeeper,
+ );
+
+ return {
+ ...row,
+ credentials: newCredentials as Record<string, unknown>,
+ tokenExpiresAt: newExpiresAt,
+ };
+ }
+
+ private gateKeeperPromise?: Promise<KeyVaultsGateKeeper>;
+
+ /** Lazily init the encryptor — `KEY_VAULTS_SECRET` is constant per process. */
+ private getGateKeeper(): Promise<KeyVaultsGateKeeper> {
+ if (!this.gateKeeperPromise) {
+ this.gateKeeperPromise = KeyVaultsGateKeeper.initWithEnvKey();
+ }
+ return this.gateKeeperPromise;
+ }
+}
diff --git a/src/server/services/messenger/installations/telegram.test.ts b/src/server/services/messenger/installations/telegram.test.ts
new file mode 100644
index 00000000000..ff06a64b75e
--- /dev/null
+++ b/src/server/services/messenger/installations/telegram.test.ts
@@ -0,0 +1,71 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { TELEGRAM_INSTALLATION_KEY, TelegramInstallationStore } from './telegram';
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerTelegramConfig: vi.fn(),
+}));
+
+const { getMessengerTelegramConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ botToken: 'tg-bot-token',
+ botUsername: 'lobehub_bot',
+ webhookSecret: 'tg-secret',
+};
+
+beforeEach(() => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValue(VALID_CONFIG as any);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('TelegramInstallationStore.resolveByPayload', () => {
+ it('returns env-backed credentials regardless of payload', async () => {
+ const store = new TelegramInstallationStore();
+ const creds = await store.resolveByPayload();
+ expect(creds).toMatchObject({
+ applicationId: TELEGRAM_INSTALLATION_KEY,
+ botToken: 'tg-bot-token',
+ installationKey: TELEGRAM_INSTALLATION_KEY,
+ platform: 'telegram',
+ tenantId: '',
+ });
+ expect(creds?.metadata).toEqual({
+ botUsername: 'lobehub_bot',
+ webhookSecret: 'tg-secret',
+ });
+ });
+
+ it('returns null when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const store = new TelegramInstallationStore();
+ expect(await store.resolveByPayload()).toBeNull();
+ });
+
+ it('falls back to empty strings for optional metadata fields', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce({
+ botToken: 'tg',
+ } as any);
+ const store = new TelegramInstallationStore();
+ const creds = await store.resolveByPayload();
+ expect(creds?.metadata).toEqual({ botUsername: '', webhookSecret: '' });
+ });
+});
+
+describe('TelegramInstallationStore.resolveByKey', () => {
+ it('returns the env-backed credentials when the key matches the singleton', async () => {
+ const store = new TelegramInstallationStore();
+ const creds = await store.resolveByKey(TELEGRAM_INSTALLATION_KEY);
+ expect(creds?.botToken).toBe('tg-bot-token');
+ });
+
+ it('returns null for any other installation key', async () => {
+ const store = new TelegramInstallationStore();
+ expect(await store.resolveByKey('telegram:other')).toBeNull();
+ expect(getMessengerTelegramConfig).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/installations/telegram.ts b/src/server/services/messenger/installations/telegram.ts
new file mode 100644
index 00000000000..58bb66fe926
--- /dev/null
+++ b/src/server/services/messenger/installations/telegram.ts
@@ -0,0 +1,46 @@
+import debug from 'debug';
+
+import { getMessengerTelegramConfig } from '@/config/messenger';
+
+import type { InstallationCredentials, MessengerInstallationStore } from './types';
+
+const log = debug('lobe-server:messenger:install-store:telegram');
+
+/**
+ * Telegram bots are global — one bot token in env serves every chat — so
+ * "tenant" is meaningless. Returns a single env-backed credential bundle
+ * regardless of the inbound payload.
+ */
+export const TELEGRAM_INSTALLATION_KEY = 'telegram:singleton';
+
+const buildCreds = async (): Promise<InstallationCredentials | null> => {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return null;
+ return {
+ accountId: undefined,
+ // Telegram's "application id" is just the bot token's prefix; we use the
+ // installation key as a stable opaque identifier instead.
+ applicationId: TELEGRAM_INSTALLATION_KEY,
+ botToken: config.botToken,
+ installationKey: TELEGRAM_INSTALLATION_KEY,
+ metadata: {
+ botUsername: config.botUsername ?? '',
+ webhookSecret: config.webhookSecret ?? '',
+ },
+ platform: 'telegram',
+ tenantId: '',
+ };
+};
+
+export class TelegramInstallationStore implements MessengerInstallationStore {
+ async resolveByPayload(): Promise<InstallationCredentials | null> {
+ const creds = await buildCreds();
+ if (!creds) log('resolveByPayload: telegram credentials not configured in DB');
+ return creds;
+ }
+
+ async resolveByKey(installationKey: string): Promise<InstallationCredentials | null> {
+ if (installationKey !== TELEGRAM_INSTALLATION_KEY) return null;
+ return buildCreds();
+ }
+}
diff --git a/src/server/services/messenger/installations/types.ts b/src/server/services/messenger/installations/types.ts
new file mode 100644
index 00000000000..55bd36ba9e4
--- /dev/null
+++ b/src/server/services/messenger/installations/types.ts
@@ -0,0 +1,57 @@
+import type { MessengerPlatform } from '@/config/messenger';
+
+/**
+ * Resolved per-tenant credentials handed to the binder + Chat SDK adapter.
+ *
+ * `installationKey` is the cache key used by `MessengerRouter` to keep one
+ * Chat SDK instance per install (so a Slack workspace install A and B each
+ * get their own bot loop, message queue, etc.).
+ *
+ * `tenantId` is opaque per platform — Slack `team_id` (or `enterprise_id`
+ * for Grid org installs), Discord `guild_id`, Feishu `tenant_key`, MS Teams
+ * tenantId. Global-bot platforms (Telegram today) use the empty string.
+ */
+export interface InstallationCredentials {
+ /** Bot user id within the tenant — Slack `bot_user_id`, etc. */
+ accountId?: string;
+ /** Platform-side application/bot id (Slack `app_id`, …). */
+ applicationId: string;
+ /** The actual bot token used for outbound API calls. */
+ botToken: string;
+ /** Stable cache key, e.g. `'slack:T0123ABC'` or `'telegram:singleton'`. */
+ installationKey: string;
+ /** Platform-opaque metadata (tenantName, scope, enterpriseId, …). */
+ metadata: Record<string, unknown>;
+ platform: MessengerPlatform;
+ /** Slack uses this for inbound signature verification. */
+ signingSecret?: string;
+ /** Empty string for global-bot platforms. */
+ tenantId: string;
+}
+
+/**
+ * Per-platform credential resolver. Implementations encapsulate where the
+ * credentials live (env vs DB), how to decrypt them, and how to refresh
+ * rotating tokens — the router treats them all the same.
+ *
+ * The router calls `resolveByPayload` on every inbound webhook (it has the
+ * raw bytes from Slack / Telegram). Bot lifecycle helpers that already know
+ * the install (e.g. `MessengerRouter.getOrCreateBot('slack:T0123')`) call
+ * `resolveByKey` directly.
+ */
+export interface MessengerInstallationStore {
+ /**
+ * Mark an install as revoked. Called by the router when Slack delivers
+ * `app_uninstalled` / `tokens_revoked`. No-op for global-bot platforms.
+ */
+ markRevoked?: (installationKey: string) => Promise<void>;
+
+ /**
+ * Resolve from a previously-cached `installationKey`. Used by router
+ * cache-miss paths and by background jobs (e.g. token rotation cron).
+ */
+ resolveByKey: (installationKey: string) => Promise<InstallationCredentials | null>;
+
+ /** Resolve from a raw inbound webhook (Events API / interactivity / slash). */
+ resolveByPayload: (req: Request, rawBody: string) => Promise<InstallationCredentials | null>;
+}
diff --git a/src/server/services/messenger/linkTokenStore.test.ts b/src/server/services/messenger/linkTokenStore.test.ts
new file mode 100644
index 00000000000..509fbe4b833
--- /dev/null
+++ b/src/server/services/messenger/linkTokenStore.test.ts
@@ -0,0 +1,114 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { consumeLinkToken, issueLinkToken, peekLinkToken } from './linkTokenStore';
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerLinkTokenTtl: vi.fn().mockReturnValue(1800),
+}));
+
+const fakeRedis = (): {
+ client: any;
+ store: Map<string, string>;
+} => {
+ const store = new Map<string, string>();
+ return {
+ client: {
+ del: vi.fn(async (key: string) => {
+ store.delete(key);
+ return 1;
+ }),
+ get: vi.fn(async (key: string) => store.get(key) ?? null),
+ set: vi.fn(async (key: string, value: string) => {
+ store.set(key, value);
+ return 'OK';
+ }),
+ },
+ store,
+ };
+};
+
+let redisRef: ReturnType<typeof fakeRedis>;
+
+vi.mock('@/server/modules/AgentRuntime/redis', () => ({
+ getAgentRuntimeRedisClient: vi.fn(() => redisRef.client),
+}));
+
+beforeEach(() => {
+ redisRef = fakeRedis();
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('linkTokenStore', () => {
+ it('round-trips a Slack token with tenantId / tenantName', async () => {
+ const token = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: 'U_ALICE',
+ platformUsername: 'alice',
+ tenantId: 'T_ACME',
+ tenantName: 'Acme Inc',
+ });
+
+ const peeked = await peekLinkToken(token);
+ expect(peeked).toEqual(
+ expect.objectContaining({
+ platform: 'slack',
+ platformUserId: 'U_ALICE',
+ platformUsername: 'alice',
+ tenantId: 'T_ACME',
+ tenantName: 'Acme Inc',
+ }),
+ );
+ });
+
+ it('round-trips a Telegram token without tenant fields (global bot)', async () => {
+ const token = await issueLinkToken({
+ platform: 'telegram',
+ platformUserId: '12345',
+ platformUsername: '@alice',
+ });
+
+ const peeked = await peekLinkToken(token);
+ expect(peeked?.platform).toBe('telegram');
+ expect(peeked?.tenantId).toBeUndefined();
+ expect(peeked?.tenantName).toBeUndefined();
+ });
+
+ it('reuses an existing token for the same (platform, platformUserId)', async () => {
+ const a = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: 'U_ALICE',
+ tenantId: 'T_ACME',
+ });
+ const b = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: 'U_ALICE',
+ tenantId: 'T_ACME',
+ });
+ expect(b).toBe(a);
+ });
+
+ it('consumeLinkToken removes the token + reuse map', async () => {
+ const token = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: 'U_X',
+ tenantId: 'T_X',
+ });
+
+ const consumed = await consumeLinkToken(token);
+ expect(consumed?.platformUserId).toBe('U_X');
+
+ expect(await peekLinkToken(token)).toBeNull();
+ // A fresh issue for the same identity should NOT return the (now deleted)
+ // old token — since both keys are gone, it mints a new one.
+ const reissued = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: 'U_X',
+ tenantId: 'T_X',
+ });
+ expect(reissued).not.toBe(token);
+ });
+});
diff --git a/src/server/services/messenger/linkTokenStore.ts b/src/server/services/messenger/linkTokenStore.ts
new file mode 100644
index 00000000000..cccf12e04c4
--- /dev/null
+++ b/src/server/services/messenger/linkTokenStore.ts
@@ -0,0 +1,117 @@
+import { randomUUID } from 'node:crypto';
+
+import debug from 'debug';
+
+import { getMessengerLinkTokenTtl, type MessengerPlatform } from '@/config/messenger';
+import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';
+
+const log = debug('lobe-server:messenger:link-token');
+
+/** Lower-cased random token used as the URL `random_id` query param. */
+export type LinkToken = string;
+
+export interface LinkTokenPayload {
+ createdAt: number;
+ platform: MessengerPlatform;
+ platformUserId: string;
+ /** Best-effort display name shown on the verify-im confirm screen. */
+ platformUsername?: string;
+ /**
+ * Per-tenant install id this link belongs to. Slack `team_id` (or
+ * `enterprise_id` for Grid org installs) — written into
+ * `messenger_account_links.tenant_id` on confirm so the router knows which
+ * workspace's bot to dispatch to. Empty / undefined for global-bot
+ * platforms (Telegram).
+ */
+ tenantId?: string;
+ /**
+ * Human-readable workspace / tenant name (e.g. `"Acme Inc"`) so the
+ * verify-im page can render "Linking <user> in **Acme Inc** workspace"
+ * without a server-side `team.info` round-trip.
+ */
+ tenantName?: string;
+}
+
+const tokenKey = (token: LinkToken): string => `messenger:link-token:${token}`;
+
+/** Existing token reuse map — same `(platform, platformUserId)` shouldn't
+ * generate a fresh token each /start; reuse the live one if it hasn't expired
+ * so the user's previous "Link Account" button still works. */
+const reuseKey = (platform: MessengerPlatform, platformUserId: string): string =>
+ `messenger:link-token-reuse:${platform}:${platformUserId}`;
+
+/**
+ * Issue a one-shot link token bound to a platform user. If a live token already
+ * exists for the same `(platform, platformUserId)`, return it instead of
+ * minting a new one.
+ */
+export const issueLinkToken = async (
+ payload: Omit<LinkTokenPayload, 'createdAt'>,
+): Promise<LinkToken> => {
+ const redis = getAgentRuntimeRedisClient();
+ if (!redis) {
+ throw new Error('Redis is required for messenger link token storage');
+ }
+
+ const ttl = getMessengerLinkTokenTtl();
+ const existing = await redis.get(reuseKey(payload.platform, payload.platformUserId));
+ if (existing) {
+ const live = await redis.get(tokenKey(existing));
+ if (live) {
+ log(
+ 'issueLinkToken: reusing existing token for %s:%s',
+ payload.platform,
+ payload.platformUserId,
+ );
+ return existing;
+ }
+ }
+
+ const token = randomUUID().replaceAll('-', '');
+ const value: LinkTokenPayload = { ...payload, createdAt: Date.now() };
+
+ await redis.set(tokenKey(token), JSON.stringify(value), 'EX', ttl);
+ await redis.set(reuseKey(payload.platform, payload.platformUserId), token, 'EX', ttl);
+
+ log(
+ 'issueLinkToken: issued token for %s:%s ttl=%ds',
+ payload.platform,
+ payload.platformUserId,
+ ttl,
+ );
+ return token;
+};
+
+export const peekLinkToken = async (token: LinkToken): Promise<LinkTokenPayload | null> => {
+ const redis = getAgentRuntimeRedisClient();
+ if (!redis) return null;
+
+ const raw = await redis.get(tokenKey(token));
+ if (!raw) return null;
+
+ try {
+ return JSON.parse(raw) as LinkTokenPayload;
+ } catch {
+ return null;
+ }
+};
+
+export const consumeLinkToken = async (token: LinkToken): Promise<LinkTokenPayload | null> => {
+ const redis = getAgentRuntimeRedisClient();
+ if (!redis) return null;
+
+ const raw = await redis.get(tokenKey(token));
+ if (!raw) return null;
+
+ let payload: LinkTokenPayload;
+ try {
+ payload = JSON.parse(raw) as LinkTokenPayload;
+ } catch {
+ await redis.del(tokenKey(token));
+ return null;
+ }
+
+ await redis.del(tokenKey(token));
+ await redis.del(reuseKey(payload.platform, payload.platformUserId));
+ return payload;
+};
diff --git a/src/server/services/messenger/oauth/slackOAuth.test.ts b/src/server/services/messenger/oauth/slackOAuth.test.ts
new file mode 100644
index 00000000000..54b446f2fa0
--- /dev/null
+++ b/src/server/services/messenger/oauth/slackOAuth.test.ts
@@ -0,0 +1,259 @@
+import { createHmac } from 'node:crypto';
+
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { buildInstallUrl, exchangeCode, refreshToken, verifySignature } from './slackOAuth';
+
+const SIGNING_SECRET = 'test-signing-secret';
+
+const sign = (body: string, timestamp: string, secret = SIGNING_SECRET): string => {
+ const digest = createHmac('sha256', secret).update(`v0:${timestamp}:${body}`).digest('hex');
+ return `v0=${digest}`;
+};
+
+describe('buildInstallUrl', () => {
+ it('builds the canonical Slack authorize URL with required params', () => {
+ const url = buildInstallUrl({
+ clientId: '12345.6789',
+ redirectUri: 'https://app.example.com/callback',
+ scopes: ['chat:write', 'im:history'],
+ state: 'nonce-abc',
+ });
+
+ const parsed = new URL(url);
+ expect(parsed.origin + parsed.pathname).toBe('https://slack.com/oauth/v2/authorize');
+ expect(parsed.searchParams.get('client_id')).toBe('12345.6789');
+ expect(parsed.searchParams.get('redirect_uri')).toBe('https://app.example.com/callback');
+ expect(parsed.searchParams.get('state')).toBe('nonce-abc');
+ expect(parsed.searchParams.get('scope')).toBe('chat:write,im:history');
+ expect(parsed.searchParams.get('user_scope')).toBeNull();
+ });
+
+ it('omits user_scope when not provided or empty', () => {
+ const url = buildInstallUrl({
+ clientId: 'cid',
+ redirectUri: 'https://e.com/cb',
+ scopes: ['chat:write'],
+ state: 's',
+ userScopes: [],
+ });
+ expect(new URL(url).searchParams.get('user_scope')).toBeNull();
+ });
+
+ it('joins user_scope with commas when provided', () => {
+ const url = buildInstallUrl({
+ clientId: 'cid',
+ redirectUri: 'https://e.com/cb',
+ scopes: ['chat:write'],
+ state: 's',
+ userScopes: ['identity.basic', 'identity.email'],
+ });
+ expect(new URL(url).searchParams.get('user_scope')).toBe('identity.basic,identity.email');
+ });
+});
+
+describe('exchangeCode', () => {
+ beforeEach(() => {
+ vi.spyOn(globalThis, 'fetch');
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ it('posts form-encoded credentials and returns the parsed response', async () => {
+ const fetchSpy = vi.mocked(globalThis.fetch).mockResolvedValueOnce(
+ new Response(
+ JSON.stringify({
+ access_token: 'xoxb-real',
+ app_id: 'A123',
+ bot_user_id: 'U_BOT',
+ is_enterprise_install: false,
+ ok: true,
+ team: { id: 'T_ACME', name: 'Acme' },
+ }),
+ { headers: { 'Content-Type': 'application/json' }, status: 200 },
+ ),
+ );
+
+ const result = await exchangeCode({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ code: 'the-code',
+ redirectUri: 'https://e.com/cb',
+ });
+
+ expect(result.access_token).toBe('xoxb-real');
+ expect(result.team?.id).toBe('T_ACME');
+
+ const [, init] = fetchSpy.mock.calls[0];
+ const body = init?.body as URLSearchParams;
+ expect(body.get('client_id')).toBe('cid');
+ expect(body.get('client_secret')).toBe('csecret');
+ expect(body.get('code')).toBe('the-code');
+ expect(body.get('redirect_uri')).toBe('https://e.com/cb');
+ });
+
+ it('throws when the HTTP layer fails', async () => {
+ vi.mocked(globalThis.fetch).mockResolvedValueOnce(new Response('upstream', { status: 502 }));
+
+ await expect(
+ exchangeCode({ clientId: 'a', clientSecret: 'b', code: 'c', redirectUri: 'd' }),
+ ).rejects.toThrow(/HTTP 502/);
+ });
+
+ it('throws when Slack reports a logical error (ok: false)', async () => {
+ vi.mocked(globalThis.fetch).mockResolvedValueOnce(
+ new Response(JSON.stringify({ error: 'invalid_code', ok: false }), { status: 200 }),
+ );
+
+ await expect(
+ exchangeCode({ clientId: 'a', clientSecret: 'b', code: 'c', redirectUri: 'd' }),
+ ).rejects.toThrow(/invalid_code/);
+ });
+});
+
+describe('refreshToken', () => {
+ beforeEach(() => {
+ vi.spyOn(globalThis, 'fetch');
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ it('sends grant_type=refresh_token and returns the rotated pair', async () => {
+ const fetchSpy = vi.mocked(globalThis.fetch).mockResolvedValueOnce(
+ new Response(
+ JSON.stringify({
+ access_token: 'xoxe.xoxb-new',
+ expires_in: 43_200,
+ ok: true,
+ refresh_token: 'xoxe-1-new',
+ }),
+ { status: 200 },
+ ),
+ );
+
+ const result = await refreshToken({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ refreshToken: 'xoxe-1-old',
+ });
+
+ expect(result.access_token).toBe('xoxe.xoxb-new');
+ expect(result.refresh_token).toBe('xoxe-1-new');
+ expect(result.expires_in).toBe(43_200);
+
+ const body = fetchSpy.mock.calls[0][1]?.body as URLSearchParams;
+ expect(body.get('grant_type')).toBe('refresh_token');
+ expect(body.get('refresh_token')).toBe('xoxe-1-old');
+ });
+});
+
+describe('verifySignature', () => {
+ let nowSpy: ReturnType<typeof vi.spyOn>;
+ const fixedNowMs = 1_700_000_000_000;
+ const fixedTs = Math.floor(fixedNowMs / 1000).toString();
+
+ beforeEach(() => {
+ nowSpy = vi.spyOn(Date, 'now').mockReturnValue(fixedNowMs);
+ });
+
+ afterEach(() => {
+ nowSpy.mockRestore();
+ });
+
+ it('accepts a correctly-signed request within the tolerance window', () => {
+ const body = '{"type":"event_callback"}';
+ const ok = verifySignature({
+ rawBody: body,
+ signature: sign(body, fixedTs),
+ signingSecret: SIGNING_SECRET,
+ timestamp: fixedTs,
+ });
+ expect(ok).toBe(true);
+ });
+
+ it('rejects when the body is tampered', () => {
+ const body = '{"type":"event_callback"}';
+ const ok = verifySignature({
+ rawBody: '{"type":"event_callback","tampered":true}',
+ signature: sign(body, fixedTs),
+ signingSecret: SIGNING_SECRET,
+ timestamp: fixedTs,
+ });
+ expect(ok).toBe(false);
+ });
+
+ it('rejects when the signing secret differs', () => {
+ const body = '{}';
+ const ok = verifySignature({
+ rawBody: body,
+ signature: sign(body, fixedTs, 'other-secret'),
+ signingSecret: SIGNING_SECRET,
+ timestamp: fixedTs,
+ });
+ expect(ok).toBe(false);
+ });
+
+ it('rejects when the timestamp is older than the tolerance window', () => {
+ const body = '{}';
+ const oldTs = (Math.floor(fixedNowMs / 1000) - 600).toString();
+ const ok = verifySignature({
+ rawBody: body,
+ signature: sign(body, oldTs),
+ signingSecret: SIGNING_SECRET,
+ timestamp: oldTs,
+ });
+ expect(ok).toBe(false);
+ });
+
+ it('rejects when the timestamp is in the far future', () => {
+ const body = '{}';
+ const futureTs = (Math.floor(fixedNowMs / 1000) + 600).toString();
+ const ok = verifySignature({
+ rawBody: body,
+ signature: sign(body, futureTs),
+ signingSecret: SIGNING_SECRET,
+ timestamp: futureTs,
+ });
+ expect(ok).toBe(false);
+ });
+
+ it('rejects when the timestamp is non-numeric', () => {
+ const ok = verifySignature({
+ rawBody: 'x',
+ signature: 'v0=anything',
+ signingSecret: SIGNING_SECRET,
+ timestamp: 'not-a-number',
+ });
+ expect(ok).toBe(false);
+ });
+
+ it('honours a custom tolerance', () => {
+ const body = '{}';
+ const ts = (Math.floor(fixedNowMs / 1000) - 30).toString();
+ const sig = sign(body, ts);
+
+ expect(
+ verifySignature({
+ rawBody: body,
+ signature: sig,
+ signingSecret: SIGNING_SECRET,
+ timestamp: ts,
+ toleranceSeconds: 10,
+ }),
+ ).toBe(false);
+
+ expect(
+ verifySignature({
+ rawBody: body,
+ signature: sig,
+ signingSecret: SIGNING_SECRET,
+ timestamp: ts,
+ toleranceSeconds: 60,
+ }),
+ ).toBe(true);
+ });
+});
diff --git a/src/server/services/messenger/oauth/slackOAuth.ts b/src/server/services/messenger/oauth/slackOAuth.ts
new file mode 100644
index 00000000000..b548c52d0ac
--- /dev/null
+++ b/src/server/services/messenger/oauth/slackOAuth.ts
@@ -0,0 +1,199 @@
+import { createHmac, timingSafeEqual } from 'node:crypto';
+
+import { SLACK_API_BASE } from '@/server/services/bot/platforms/slack/api';
+
+const SLACK_AUTHORIZE_URL = 'https://slack.com/oauth/v2/authorize';
+const SLACK_OAUTH_ACCESS_URL = `${SLACK_API_BASE}/oauth.v2.access`;
+const SLACK_AUTH_REVOKE_URL = `${SLACK_API_BASE}/auth.revoke`;
+const SLACK_SIGNATURE_VERSION = 'v0';
+const DEFAULT_SIGNATURE_TOLERANCE_SECONDS = 300;
+
+export interface BuildInstallUrlParams {
+ clientId: string;
+ redirectUri: string;
+ /** Bot scopes — populates the `xoxb-` token. */
+ scopes: string[];
+ /** Opaque server-generated token; the caller persists the lookup row. */
+ state: string;
+ /** Optional user scopes — populates a separate `xoxp-` token. Empty by default. */
+ userScopes?: string[];
+}
+
+/**
+ * Build the Slack workspace-install authorize URL. The `state` parameter is
+ * passed through verbatim — the caller is responsible for binding it to a
+ * server-side record (LobeHub user id, nonce, ttl) so the callback handler
+ * can validate the request didn't come from elsewhere.
+ */
+export const buildInstallUrl = (params: BuildInstallUrlParams): string => {
+ const url = new URL(SLACK_AUTHORIZE_URL);
+ url.searchParams.set('client_id', params.clientId);
+ url.searchParams.set('redirect_uri', params.redirectUri);
+ url.searchParams.set('state', params.state);
+ url.searchParams.set('scope', params.scopes.join(','));
+ if (params.userScopes && params.userScopes.length > 0) {
+ url.searchParams.set('user_scope', params.userScopes.join(','));
+ }
+ return url.toString();
+};
+
+/**
+ * Slack `oauth.v2.access` response — fields are a superset of what we need
+ * today; PR2's installation store narrows the parts it cares about.
+ *
+ * `is_enterprise_install: true` means an org-level install — `team` may be
+ * null and the install must be keyed by `enterprise.id` instead. `expires_in`
+ * + `refresh_token` are present only when token rotation is enabled on the
+ * App config.
+ */
+export interface OAuthV2AccessResponse {
+ access_token?: string;
+ app_id?: string;
+ authed_user?: { access_token?: string; id: string; scope?: string; token_type?: string };
+ bot_user_id?: string;
+ enterprise?: { id: string; name: string } | null;
+ error?: string;
+ expires_in?: number;
+ is_enterprise_install?: boolean;
+ ok: boolean;
+ refresh_token?: string;
+ scope?: string;
+ team?: { id: string; name: string } | null;
+ token_type?: 'bot';
+}
+
+export interface ExchangeCodeParams {
+ clientId: string;
+ clientSecret: string;
+ code: string;
+ redirectUri: string;
+}
+
+/**
+ * Exchange the OAuth `code` returned by Slack's authorize redirect for a bot
+ * token. Slack accepts client credentials either as Basic auth header or as
+ * form fields; we use form fields because they're simpler to mock and the
+ * Slack docs use them in their canonical examples.
+ */
+export const exchangeCode = async (params: ExchangeCodeParams): Promise<OAuthV2AccessResponse> => {
+ const body = new URLSearchParams({
+ client_id: params.clientId,
+ client_secret: params.clientSecret,
+ code: params.code,
+ redirect_uri: params.redirectUri,
+ });
+
+ const response = await fetch(SLACK_OAUTH_ACCESS_URL, {
+ body,
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
+ method: 'POST',
+ });
+
+ if (!response.ok) {
+ throw new Error(`oauth.v2.access HTTP ${response.status}: ${await response.text()}`);
+ }
+
+ const data = (await response.json()) as OAuthV2AccessResponse;
+ if (!data.ok) {
+ throw new Error(`oauth.v2.access failed: ${data.error ?? 'unknown_error'}`);
+ }
+ return data;
+};
+
+/**
+ * Invalidate a Slack token via `auth.revoke`. Used when we reject a freshly
+ * minted token (e.g. another LobeHub user already owns this workspace's
+ * install) so the workspace doesn't end up with a dangling unused bot token.
+ */
+export const revokeToken = async (token: string): Promise<void> => {
+ const body = new URLSearchParams({ token });
+ const response = await fetch(SLACK_AUTH_REVOKE_URL, {
+ body,
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
+ method: 'POST',
+ });
+ if (!response.ok) {
+ throw new Error(`auth.revoke HTTP ${response.status}: ${await response.text()}`);
+ }
+ const data = (await response.json()) as { error?: string; ok: boolean };
+ if (!data.ok) {
+ throw new Error(`auth.revoke failed: ${data.error ?? 'unknown_error'}`);
+ }
+};
+
+export interface RefreshTokenParams {
+ clientId: string;
+ clientSecret: string;
+ refreshToken: string;
+}
+
+/**
+ * Refresh a rotating bot token. Slack returns a new access token AND a new
+ * refresh token in the same response — the old refresh token is invalidated
+ * the moment the new one is issued, so callers MUST persist both atomically
+ * (see `MessengerInstallationModel.updateRotatedToken`).
+ */
+export const refreshToken = async (params: RefreshTokenParams): Promise<OAuthV2AccessResponse> => {
+ const body = new URLSearchParams({
+ client_id: params.clientId,
+ client_secret: params.clientSecret,
+ grant_type: 'refresh_token',
+ refresh_token: params.refreshToken,
+ });
+
+ const response = await fetch(SLACK_OAUTH_ACCESS_URL, {
+ body,
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
+ method: 'POST',
+ });
+
+ if (!response.ok) {
+ throw new Error(`oauth.v2.access (refresh) HTTP ${response.status}: ${await response.text()}`);
+ }
+
+ const data = (await response.json()) as OAuthV2AccessResponse;
+ if (!data.ok) {
+ throw new Error(`oauth.v2.access (refresh) failed: ${data.error ?? 'unknown_error'}`);
+ }
+ return data;
+};
+
+export interface VerifySignatureParams {
+ /** Raw request body — must be the bytes Slack signed, before any JSON / form parsing. */
+ rawBody: string;
+ signature: string;
+ signingSecret: string;
+ timestamp: string;
+ /** Window in seconds — requests outside it are rejected as replays. Default 300 (5 min). */
+ toleranceSeconds?: number;
+}
+
+/**
+ * Verify a Slack inbound webhook signature.
+ *
+ * basestring = "v0:" + X-Slack-Request-Timestamp + ":" + raw_body
+ * sig = "v0=" + hex(hmac_sha256(signing_secret, basestring))
+ *
+ * Reject if the timestamp is outside the tolerance window — Slack's docs
+ * explicitly call out replay protection as the reason this check exists.
+ *
+ * Same HMAC pattern as `bot/platforms/slack/gateway.ts:303`, factored out so
+ * the messenger router can verify without coupling to socket-mode wiring.
+ */
+export const verifySignature = (params: VerifySignatureParams): boolean => {
+ const tolerance = params.toleranceSeconds ?? DEFAULT_SIGNATURE_TOLERANCE_SECONDS;
+ const ts = Number(params.timestamp);
+ if (!Number.isFinite(ts)) return false;
+ if (Math.abs(Date.now() / 1000 - ts) > tolerance) return false;
+
+ const baseString = `${SLACK_SIGNATURE_VERSION}:${params.timestamp}:${params.rawBody}`;
+ const expected = `${SLACK_SIGNATURE_VERSION}=${createHmac('sha256', params.signingSecret)
+ .update(baseString)
+ .digest('hex')}`;
+
+ // Hex strings — must be the same length before timingSafeEqual or it throws.
+ const expectedBuf = Buffer.from(expected, 'utf8');
+ const actualBuf = Buffer.from(params.signature, 'utf8');
+ if (expectedBuf.length !== actualBuf.length) return false;
+ return timingSafeEqual(expectedBuf, actualBuf);
+};
diff --git a/src/server/services/messenger/oauth/stateStore.test.ts b/src/server/services/messenger/oauth/stateStore.test.ts
new file mode 100644
index 00000000000..3953160942c
--- /dev/null
+++ b/src/server/services/messenger/oauth/stateStore.test.ts
@@ -0,0 +1,95 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { consumeOAuthState, issueOAuthState } from './stateStore';
+
+const fakeRedis = (): {
+ client: any;
+ store: Map<string, string>;
+} => {
+ const store = new Map<string, string>();
+ return {
+ client: {
+ del: vi.fn(async (key: string) => {
+ store.delete(key);
+ return 1;
+ }),
+ get: vi.fn(async (key: string) => store.get(key) ?? null),
+ set: vi.fn(async (key: string, value: string) => {
+ store.set(key, value);
+ return 'OK';
+ }),
+ },
+ store,
+ };
+};
+
+let redisRef: ReturnType<typeof fakeRedis>;
+
+vi.mock('@/server/modules/AgentRuntime/redis', () => ({
+ getAgentRuntimeRedisClient: vi.fn(() => redisRef.client),
+}));
+
+const { getAgentRuntimeRedisClient } = await import('@/server/modules/AgentRuntime/redis');
+
+beforeEach(() => {
+ redisRef = fakeRedis();
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('issueOAuthState', () => {
+ it('issues a hex-only state token with TTL and stores the payload as JSON', async () => {
+ const before = Date.now();
+ const state = await issueOAuthState({ lobeUserId: 'lobe-1', returnTo: '/settings' });
+ const after = Date.now();
+
+ expect(state).toMatch(/^[\da-f]+$/i);
+ // randomUUID is 32 hex chars after stripping dashes.
+ expect(state.length).toBe(32);
+
+ const setCall = redisRef.client.set.mock.calls[0];
+ expect(setCall[0]).toBe(`messenger:slack-oauth-state:${state}`);
+ expect(setCall[2]).toBe('EX');
+ expect(setCall[3]).toBe(600);
+
+ const stored = JSON.parse(setCall[1]);
+ expect(stored.lobeUserId).toBe('lobe-1');
+ expect(stored.returnTo).toBe('/settings');
+ expect(stored.ts).toBeGreaterThanOrEqual(before);
+ expect(stored.ts).toBeLessThanOrEqual(after);
+ });
+
+ it('throws when redis is unavailable', async () => {
+ vi.mocked(getAgentRuntimeRedisClient).mockReturnValueOnce(null as any);
+ await expect(issueOAuthState({ lobeUserId: 'lobe-1' })).rejects.toThrow('Redis is required');
+ });
+});
+
+describe('consumeOAuthState', () => {
+ it('round-trips the payload and atomically deletes the key', async () => {
+ const state = await issueOAuthState({ lobeUserId: 'lobe-1', returnTo: '/x' });
+ const payload = await consumeOAuthState(state);
+ expect(payload).toMatchObject({ lobeUserId: 'lobe-1', returnTo: '/x' });
+ // Replay must fail.
+ expect(await consumeOAuthState(state)).toBeNull();
+ });
+
+ it('returns null for an unknown state', async () => {
+ expect(await consumeOAuthState('does-not-exist')).toBeNull();
+ });
+
+ it('returns null when redis is unavailable', async () => {
+ vi.mocked(getAgentRuntimeRedisClient).mockReturnValueOnce(null as any);
+ expect(await consumeOAuthState('any')).toBeNull();
+ });
+
+ it('deletes the key and returns null when stored payload is corrupt JSON', async () => {
+ const state = 'corrupt-state';
+ redisRef.store.set(`messenger:slack-oauth-state:${state}`, '{not-json');
+ expect(await consumeOAuthState(state)).toBeNull();
+ expect(redisRef.store.has(`messenger:slack-oauth-state:${state}`)).toBe(false);
+ });
+});
diff --git a/src/server/services/messenger/oauth/stateStore.ts b/src/server/services/messenger/oauth/stateStore.ts
new file mode 100644
index 00000000000..4978645a8e6
--- /dev/null
+++ b/src/server/services/messenger/oauth/stateStore.ts
@@ -0,0 +1,67 @@
+import { randomUUID } from 'node:crypto';
+
+import debug from 'debug';
+
+import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';
+
+const log = debug('lobe-server:messenger:oauth-state');
+
+const STATE_TTL_SECONDS = 600; // 10 minutes — Slack OAuth flow is interactive but quick
+const KEY_PREFIX = 'messenger:slack-oauth-state:';
+
+const stateKey = (state: string): string => `${KEY_PREFIX}${state}`;
+
+export interface OAuthStatePayload {
+ /** LobeHub user who clicked "Connect Slack". Persisted on the install row. */
+ lobeUserId: string;
+ /** Where to send the user after the callback finishes (relative path). */
+ returnTo?: string;
+ /** Issuance timestamp (ms epoch) for diagnostics. */
+ ts: number;
+}
+
+/**
+ * Issue a single-use OAuth state token bound to the LobeHub user who
+ * initiated the install. Returns the opaque `state` string the caller passes
+ * to Slack's authorize URL — Slack echoes it back in the callback.
+ *
+ * Same Redis-backed single-use pattern as `linkTokenStore` so the security
+ * properties (TTL expiry, GETDEL on consume, no replay) are familiar.
+ */
+export const issueOAuthState = async (payload: Omit<OAuthStatePayload, 'ts'>): Promise<string> => {
+ const redis = getAgentRuntimeRedisClient();
+ if (!redis) throw new Error('Redis is required for messenger Slack OAuth state storage');
+
+ const state = randomUUID().replaceAll('-', '');
+ const value: OAuthStatePayload = { ...payload, ts: Date.now() };
+
+ await redis.set(stateKey(state), JSON.stringify(value), 'EX', STATE_TTL_SECONDS);
+ log('issueOAuthState: issued state for user=%s ttl=%ds', payload.lobeUserId, STATE_TTL_SECONDS);
+ return state;
+};
+
+/**
+ * Atomically read + delete the state. Replay is impossible after the first
+ * consume — the Redis key is gone. Returns null if the state is invalid /
+ * expired / already consumed.
+ */
+export const consumeOAuthState = async (state: string): Promise<OAuthStatePayload | null> => {
+ const redis = getAgentRuntimeRedisClient();
+ if (!redis) return null;
+
+ const raw = await redis.get(stateKey(state));
+ if (!raw) return null;
+
+ // Redis 7 supports GETDEL atomically; we do GET + DEL because the codebase
+ // already uses this two-step pattern (linkTokenStore.consumeLinkToken) and
+ // the worst-case race (two concurrent callbacks for the same state) just
+ // ends up doing the work twice — `MessengerInstallationModel.upsert` is
+ // idempotent.
+ await redis.del(stateKey(state));
+
+ try {
+ return JSON.parse(raw) as OAuthStatePayload;
+ } catch {
+ return null;
+ }
+};
diff --git a/src/server/services/messenger/platforms/discord/binder.test.ts b/src/server/services/messenger/platforms/discord/binder.test.ts
new file mode 100644
index 00000000000..2228a9c829f
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/binder.test.ts
@@ -0,0 +1,169 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { DiscordApi } from '@/server/services/bot/platforms/discord/api';
+
+import { issueLinkToken } from '../../linkTokenStore';
+import { buildDiscordSwitchButtons, MessengerDiscordBinder } from './binder';
+
+vi.mock('@/envs/app', () => ({
+ appEnv: { APP_URL: 'https://app.example.com' },
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerDiscordConfig: vi.fn(async () => ({
+ applicationId: 'discord-app-id',
+ botToken: 'discord-bot-token',
+ botUsername: 'lobehub-bot',
+ publicKey: 'discord-public-key',
+ })),
+}));
+
+vi.mock('../../linkTokenStore', () => ({
+ issueLinkToken: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/discord/api', () => ({
+ DiscordApi: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/discord/client', () => ({
+ DiscordClientFactory: vi.fn(),
+}));
+
+let createMessage: ReturnType<typeof vi.fn>;
+let createMessageWithButtons: ReturnType<typeof vi.fn>;
+let editMessageWithButtons: ReturnType<typeof vi.fn>;
+let createDMChannel: ReturnType<typeof vi.fn>;
+
+beforeEach(() => {
+ createMessage = vi.fn().mockResolvedValue({ id: 'msg_1' });
+ createMessageWithButtons = vi.fn().mockResolvedValue({ id: 'picker_1' });
+ editMessageWithButtons = vi.fn().mockResolvedValue(undefined);
+ createDMChannel = vi.fn().mockResolvedValue({ id: 'dm_channel_1' });
+
+ vi.mocked(DiscordApi).mockImplementation(
+ () =>
+ ({
+ createDMChannel,
+ createMessage,
+ createMessageWithButtons,
+ editMessageWithButtons,
+ }) as any,
+ );
+
+ vi.mocked(issueLinkToken).mockResolvedValue('rand_token');
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('buildDiscordSwitchButtons', () => {
+ it('marks the active entry as primary and prefixes a check', () => {
+ const buttons = buildDiscordSwitchButtons([
+ { id: 'agt_1', isActive: false, title: 'Default' },
+ { id: 'agt_2', isActive: true, title: 'Coding' },
+ ]);
+ expect(buttons).toEqual([
+ { customId: 'messenger:switch:agt_1', isPrimary: false, label: 'Default' },
+ { customId: 'messenger:switch:agt_2', isPrimary: true, label: '✓ Coding' },
+ ]);
+ });
+});
+
+describe('MessengerDiscordBinder', () => {
+ describe('handleUnlinkedMessage', () => {
+ it('opens the user DM via authorUserId and posts the verify-im markdown link there', async () => {
+ const binder = new MessengerDiscordBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'discord_user_42',
+ authorUserName: 'tester',
+ // Inbound chatId may be a public slash-invocation channel; the
+ // binder must ignore it and resolve a private DM via openDM.
+ chatId: 'public_channel_xyz',
+ message: undefined as any,
+ });
+
+ expect(createDMChannel).toHaveBeenCalledWith('discord_user_42');
+ expect(issueLinkToken).toHaveBeenCalledWith({
+ platform: 'discord',
+ platformUserId: 'discord_user_42',
+ platformUsername: 'tester',
+ });
+ expect(createMessage).toHaveBeenCalledTimes(1);
+ const [channel, body] = createMessage.mock.calls[0];
+ expect(channel).toBe('dm_channel_1');
+ expect(body).toContain('https://app.example.com/verify-im');
+ expect(body).toContain('im_type=discord');
+ expect(body).toContain('random_id=rand_token');
+ });
+ });
+
+ describe('notifyLinkSuccess', () => {
+ it('opens a DM channel for the recipient and posts the success message', async () => {
+ const binder = new MessengerDiscordBinder();
+ await binder.notifyLinkSuccess({
+ activeAgentName: 'Coding',
+ platformUserId: 'discord_user_42',
+ });
+
+ expect(createDMChannel).toHaveBeenCalledWith('discord_user_42');
+ expect(createMessage).toHaveBeenCalledWith(
+ 'dm_channel_1',
+ expect.stringContaining('Linked successfully'),
+ );
+ expect(createMessage.mock.calls[0][1]).toContain('**Coding**');
+ });
+
+ it('swallows errors when the user has DMs disabled', async () => {
+ createDMChannel.mockRejectedValueOnce(new Error('Cannot send messages to this user'));
+ const binder = new MessengerDiscordBinder();
+ await expect(
+ binder.notifyLinkSuccess({ platformUserId: 'discord_user_42' }),
+ ).resolves.toBeUndefined();
+ expect(createMessage).not.toHaveBeenCalled();
+ });
+ });
+
+ describe('sendAgentPicker', () => {
+ it('posts a message with switch buttons mapped from picker entries', async () => {
+ const binder = new MessengerDiscordBinder();
+ await binder.sendAgentPicker('dm_channel_xyz', {
+ entries: [
+ { id: 'agt_1', isActive: true, title: 'Inbox' },
+ { id: 'agt_2', isActive: false, title: 'Coding' },
+ ],
+ text: 'Pick an agent:',
+ });
+
+ expect(createMessageWithButtons).toHaveBeenCalledWith('dm_channel_xyz', 'Pick an agent:', [
+ { customId: 'messenger:switch:agt_1', isPrimary: true, label: '✓ Inbox' },
+ { customId: 'messenger:switch:agt_2', isPrimary: false, label: 'Coding' },
+ ]);
+ });
+ });
+
+ describe('updateAgentPicker', () => {
+ it('edits the previously-sent picker message in place', async () => {
+ const binder = new MessengerDiscordBinder();
+ await binder.updateAgentPicker('dm_channel_xyz', 'picker_1', {
+ entries: [
+ { id: 'agt_1', isActive: false, title: 'Inbox' },
+ { id: 'agt_2', isActive: true, title: 'Coding' },
+ ],
+ text: 'Pick an agent:',
+ });
+
+ expect(editMessageWithButtons).toHaveBeenCalledWith(
+ 'dm_channel_xyz',
+ 'picker_1',
+ 'Pick an agent:',
+ [
+ { customId: 'messenger:switch:agt_1', isPrimary: false, label: 'Inbox' },
+ { customId: 'messenger:switch:agt_2', isPrimary: true, label: '✓ Coding' },
+ ],
+ );
+ });
+ });
+});
diff --git a/src/server/services/messenger/platforms/discord/binder.ts b/src/server/services/messenger/platforms/discord/binder.ts
new file mode 100644
index 00000000000..ae5cc78a296
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/binder.ts
@@ -0,0 +1,322 @@
+import type { ActionEvent } from 'chat';
+import debug from 'debug';
+
+import { getMessengerDiscordConfig } from '@/config/messenger';
+import { appEnv } from '@/envs/app';
+import type { PlatformClient } from '@/server/services/bot/platforms';
+import { DiscordApi } from '@/server/services/bot/platforms/discord/api';
+import { DiscordClientFactory } from '@/server/services/bot/platforms/discord/client';
+
+import { issueLinkToken } from '../../linkTokenStore';
+import type {
+ AgentPickerEntry,
+ CallbackAcknowledgement,
+ InboundCallbackAction,
+ MessengerPlatformBinder,
+ UnlinkedMessageContext,
+} from '../../types';
+
+const log = debug('lobe-server:messenger:discord');
+
+/**
+ * Application prefix on Discord button `custom_id`s so we can distinguish
+ * OUR buttons from anything else the bot might emit later. Matches the
+ * Slack/Telegram convention so the action handler can reuse the same
+ * regex (`messenger:switch:<agentId>`).
+ */
+export const DISCORD_ACTION_PREFIX = 'messenger:';
+
+export const buildDiscordSwitchButtons = (
+ entries: AgentPickerEntry[],
+): Array<{ customId: string; isPrimary: boolean; label: string }> =>
+ entries.map((entry) => ({
+ customId: `${DISCORD_ACTION_PREFIX}switch:${entry.id}`,
+ isPrimary: entry.isActive,
+ // Prepend a check so the active option is recognizable on clients that
+ // ignore the primary-style highlight (most Discord clients do honor it,
+ // but the marker is a useful redundancy).
+ label: entry.isActive ? `✓ ${entry.title}` : entry.title,
+ }));
+
+const buildVerifyImUrl = (params: {
+ appUrl: string;
+ platformUserId: string;
+ randomId: string;
+}): string => {
+ const url = new URL('/verify-im', params.appUrl);
+ url.searchParams.set('im_type', 'discord');
+ url.searchParams.set('im_user_id', params.platformUserId);
+ url.searchParams.set('random_id', params.randomId);
+ url.searchParams.set('utm_source', 'messenger_discord');
+ return url.toString();
+};
+
+/**
+ * Open (or fetch the existing) DM channel between the bot and the user.
+ *
+ * Discord requires a channel id for `createMessage`; for outbound DMs we
+ * therefore have to create the DM channel first via `POST /users/@me/channels`
+ * (idempotent — re-calling for a user with an open DM returns the same id).
+ *
+ * Throws if the user has DMs disabled or doesn't share a guild with the
+ * bot. Callers swallow + log so a single bad recipient doesn't crash the
+ * link confirmation flow.
+ */
+const openDM = async (api: DiscordApi, recipientId: string): Promise<string | null> => {
+ try {
+ const dm = await api.createDMChannel(recipientId);
+ return dm.id;
+ } catch (error) {
+ log('openDM: failed for recipient=%s: %O', recipientId, error);
+ return null;
+ }
+};
+
+/**
+ * Discord messenger binder.
+ *
+ * Single global bot — there is no per-guild token exchange — so the binder
+ * reads credentials from `system_bot_providers` on every call (mirrors
+ * Telegram). The 30s in-memory cache in `getMessengerDiscordConfig` keeps
+ * the DB out of the hot webhook path.
+ *
+ * MVP scope is DM-only: agent picker / interactive components ARE wired up
+ * (see `sendAgentPicker` / `updateAgentPicker`), but the router defaults to
+ * the text-based `/agents <n>` flow until LOBE-8489 lands native slash
+ * registration.
+ */
+export class MessengerDiscordBinder implements MessengerPlatformBinder {
+ async createClient(): Promise<PlatformClient | null> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return null;
+
+ return new DiscordClientFactory().createClient(
+ {
+ applicationId: config.applicationId,
+ credentials: {
+ botToken: config.botToken,
+ publicKey: config.publicKey,
+ },
+ platform: 'discord',
+ settings: {},
+ },
+ { appUrl: appEnv.APP_URL },
+ );
+ }
+
+ async handleUnlinkedMessage(ctx: UnlinkedMessageContext): Promise<void> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return;
+
+ const appUrl = appEnv.APP_URL;
+ if (!appUrl) {
+ log('handleUnlinkedMessage: APP_URL not set, cannot build verify-im link');
+ return;
+ }
+
+ // Always resolve the user's DM channel via openDM(authorUserId): the
+ // link prompt carries a one-shot token and must land privately, but
+ // `chatId` may be a public slash-invocation channel when /start fires
+ // outside a DM. createDMChannel is idempotent (returns the existing DM
+ // if open), so the text path gets the same channel it would have
+ // received via `chatId` at the cost of one extra round-trip.
+ const api = new DiscordApi(config.botToken);
+ const dmChannelId = await openDM(api, ctx.authorUserId);
+ if (!dmChannelId) {
+ log('handleUnlinkedMessage: failed to open DM for user=%s', ctx.authorUserId);
+ return;
+ }
+
+ let randomId: string;
+ try {
+ randomId = await issueLinkToken({
+ platform: 'discord',
+ platformUserId: ctx.authorUserId,
+ platformUsername: ctx.authorUserName,
+ });
+ } catch (error) {
+ log('handleUnlinkedMessage: failed to issue link token: %O', error);
+ try {
+ await api.createMessage(
+ dmChannelId,
+ 'LobeHub is temporarily unavailable. Please try again in a moment.',
+ );
+ } catch (err) {
+ log('handleUnlinkedMessage: fallback createMessage failed: %O', err);
+ }
+ return;
+ }
+
+ const verifyUrl = buildVerifyImUrl({
+ appUrl,
+ platformUserId: ctx.authorUserId,
+ randomId,
+ });
+
+ // Discord DMs render plain markdown — `[label](url)` becomes a clickable
+ // link. Components (interactive buttons) require us to ack the original
+ // interaction within 3s, which is incompatible with the messenger flow
+ // where the unlinked message handler runs after the chat-sdk has already
+ // dispatched the message — so we stick to a markdown link for v1.
+ const text = [
+ "Hi, I'm LobeHub — your AI agent in Discord.",
+ 'To start, link your LobeHub account.',
+ '',
+ `🔗 [Link Account](${verifyUrl})`,
+ '',
+ `Or copy this link: ${verifyUrl}`,
+ ].join('\n');
+
+ try {
+ await api.createMessage(dmChannelId, text);
+ } catch (error) {
+ log('handleUnlinkedMessage: createMessage failed: %O', error);
+ }
+ }
+
+ async notifyLinkSuccess(params: {
+ activeAgentName?: string;
+ platformUserId: string;
+ /** Ignored — Discord is a global-token bot, no tenant scoping needed. */
+ tenantId?: string;
+ }): Promise<void> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return;
+
+ const api = new DiscordApi(config.botToken);
+ const dmChannelId = await openDM(api, params.platformUserId);
+ if (!dmChannelId) return;
+
+ const headline = '✅ Linked successfully! Your LobeHub account is now connected.';
+ const tail = params.activeAgentName
+ ? `\n\nActive agent: **${params.activeAgentName}**\n\nGo ahead and send your first message — send \`/agents\` any time to switch the active agent.`
+ : '\n\nSend `/agents` to list your agents and pick the active one.';
+
+ try {
+ await api.createMessage(dmChannelId, `${headline}${tail}`);
+ } catch (error) {
+ log('notifyLinkSuccess: failed to send to %s: %O', params.platformUserId, error);
+ }
+ }
+
+ async sendDmText(chatId: string, text: string): Promise<void> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return;
+ try {
+ await new DiscordApi(config.botToken).createMessage(chatId, text);
+ } catch (error) {
+ log('sendDmText: failed to send to chat=%s: %O', chatId, error);
+ }
+ }
+
+ /**
+ * Post the agent picker as a Discord message with an ActionRow grid of
+ * buttons (`messenger:switch:<agentId>` `custom_id`s). Click handling is
+ * wired in `MessengerRouter.registerHandlers` via `bot.onAction(...)`,
+ * which fires after `@chat-adapter/discord` ack's the interaction with
+ * `type: 6 DEFERRED_UPDATE_MESSAGE` (so we have ~15 minutes to do the
+ * actual update via REST without the user seeing a spinner).
+ */
+ async sendAgentPicker(
+ chatId: string,
+ params: { entries: AgentPickerEntry[]; text: string },
+ ): Promise<void> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) {
+ log('sendAgentPicker: no config, skipping');
+ return;
+ }
+ try {
+ const api = new DiscordApi(config.botToken);
+ await api.createMessageWithButtons(
+ chatId,
+ params.text,
+ buildDiscordSwitchButtons(params.entries),
+ );
+ } catch (error) {
+ log('sendAgentPicker: failed for chat=%s: %O', chatId, error);
+ }
+ }
+
+ /**
+ * Edit a previously-sent picker message in place — used by the
+ * `bot.onAction` handler to move the active marker to the newly-tapped
+ * agent. Idempotent: if the message no longer exists (user deleted it,
+ * Discord pruned), Discord returns 404 and we swallow the error.
+ */
+ async updateAgentPicker(
+ chatId: string,
+ messageId: string,
+ params: { entries: AgentPickerEntry[]; text: string },
+ ): Promise<void> {
+ const config = await getMessengerDiscordConfig();
+ if (!config) return;
+ try {
+ const api = new DiscordApi(config.botToken);
+ await api.editMessageWithButtons(
+ chatId,
+ messageId,
+ params.text,
+ buildDiscordSwitchButtons(params.entries),
+ );
+ } catch (error) {
+ log('updateAgentPicker: failed for chat=%s msg=%s: %O', chatId, messageId, error);
+ }
+ }
+
+ /**
+ * Discord ack: chat-adapter-discord already replied to the interaction
+ * with `DeferredUpdateMessage` (`type: 6`) by the time we run, so we have
+ * the full ~15-minute follow-up window. There's no native toast on Discord —
+ * we surface `toast` text as a regular DM message and re-render the picker
+ * in place.
+ */
+ async acknowledgeCallback(
+ action: InboundCallbackAction,
+ ack: CallbackAcknowledgement,
+ ): Promise<void> {
+ if (ack.updatedPicker && action.messageId !== undefined) {
+ await this.updateAgentPicker(action.chatId, String(action.messageId), ack.updatedPicker);
+ }
+ if (ack.toast) {
+ await this.sendDmText(action.chatId, ack.toast);
+ }
+ }
+
+ /**
+ * Map a chat-sdk `onAction` event to an `InboundCallbackAction` for the
+ * router's shared callback path. Returns null when the actionId isn't one
+ * of our `messenger:*` button ids so unrelated chat-sdk actions pass
+ * through quietly.
+ */
+ extractActionFromEvent(event: ActionEvent, client: PlatformClient): InboundCallbackAction | null {
+ const actionId = event.actionId ?? '';
+ if (!actionId.startsWith(DISCORD_ACTION_PREFIX)) return null;
+ const fromUserId = event.user?.userId;
+ if (!fromUserId) return null;
+ return {
+ // Discord doesn't separate ack id from the interaction; chat-adapter
+ // handles the initial 3-second ack on its own. The follow-up flow uses
+ // the channel id from `threadId`.
+ callbackId: '',
+ chatId: client.extractChatId(event.threadId),
+ data: actionId,
+ fromUserId,
+ messageId: event.messageId,
+ };
+ }
+
+ /**
+ * Discord DMs are private by definition — replies just go to the same
+ * channel the interaction was invoked from. (Public channel invocations
+ * stay public until chat-adapter-discord surfaces the `flags: 64`
+ * EPHEMERAL flag for interaction responses.)
+ */
+ async replyPrivately(channel: any, _user: any, text: string): Promise<void> {
+ try {
+ await channel.post(text);
+ } catch (error) {
+ log('replyPrivately: channel.post failed: %O', error);
+ }
+ }
+}
diff --git a/src/server/services/messenger/platforms/discord/definition.ts b/src/server/services/messenger/platforms/discord/definition.ts
new file mode 100644
index 00000000000..51c934a8ba2
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/definition.ts
@@ -0,0 +1,10 @@
+import type { MessengerPlatformDefinition } from '../types';
+import { MessengerDiscordBinder } from './binder';
+import { discordOAuthAdapter } from './oauth';
+
+export const discord: MessengerPlatformDefinition = {
+ createBinder: () => new MessengerDiscordBinder(),
+ id: 'discord',
+ name: 'Discord',
+ oauth: discordOAuthAdapter,
+};
diff --git a/src/server/services/messenger/platforms/discord/index.ts b/src/server/services/messenger/platforms/discord/index.ts
new file mode 100644
index 00000000000..867fd500260
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/index.ts
@@ -0,0 +1,2 @@
+export { buildDiscordSwitchButtons, MessengerDiscordBinder } from './binder';
+export { discord } from './definition';
diff --git a/src/server/services/messenger/platforms/discord/oauth.test.ts b/src/server/services/messenger/platforms/discord/oauth.test.ts
new file mode 100644
index 00000000000..fee4bfcbff4
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/oauth.test.ts
@@ -0,0 +1,261 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { discordOAuthAdapter } from './oauth';
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerDiscordConfig: vi.fn(),
+}));
+
+const { getMessengerDiscordConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ applicationId: 'app-id-1',
+ botToken: 'discord-bot-token',
+ clientSecret: 'client-secret-1',
+ publicKey: 'pk',
+};
+
+beforeEach(() => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValue(VALID_CONFIG as any);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('discordOAuthAdapter.getAppConfig', () => {
+ it('returns clientId/clientSecret when both are configured', async () => {
+ const cfg = await discordOAuthAdapter.getAppConfig();
+ expect(cfg).toEqual({ clientId: 'app-id-1', clientSecret: 'client-secret-1' });
+ });
+
+ it('returns null when discord is not configured', async () => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValueOnce(null);
+ expect(await discordOAuthAdapter.getAppConfig()).toBeNull();
+ });
+
+ it('returns null when clientSecret is missing — install endpoint must 503', async () => {
+ vi.mocked(getMessengerDiscordConfig).mockResolvedValueOnce({
+ applicationId: 'app-id-1',
+ botToken: 't',
+ } as any);
+ expect(await discordOAuthAdapter.getAppConfig()).toBeNull();
+ });
+});
+
+describe('discordOAuthAdapter.buildAuthorizeUrl', () => {
+ it('builds the canonical Discord authorize URL with bot scopes + permissions + state', () => {
+ const raw = discordOAuthAdapter.buildAuthorizeUrl({
+ clientId: 'app-id-1',
+ redirectUri: 'https://app.example.com/cb',
+ state: 'nonce-1',
+ });
+
+ const url = new URL(raw);
+ expect(url.origin + url.pathname).toBe('https://discord.com/api/oauth2/authorize');
+ expect(url.searchParams.get('client_id')).toBe('app-id-1');
+ expect(url.searchParams.get('redirect_uri')).toBe('https://app.example.com/cb');
+ expect(url.searchParams.get('response_type')).toBe('code');
+ expect(url.searchParams.get('scope')?.split(' ')).toEqual(
+ expect.arrayContaining(['bot', 'applications.commands', 'identify']),
+ );
+ expect(url.searchParams.get('state')).toBe('nonce-1');
+ // Permissions bitfield must include the documented bits — check two
+ // bookend bits (ADD_REACTIONS=64 and SEND_MESSAGES_IN_THREADS=2^38).
+ const perms = BigInt(url.searchParams.get('permissions') ?? '0');
+ expect(perms & (1n << 6n)).toBe(1n << 6n); // ADD_REACTIONS
+ expect(perms & (1n << 38n)).toBe(1n << 38n); // SEND_MESSAGES_IN_THREADS
+ });
+});
+
+describe('discordOAuthAdapter.exchangeCode', () => {
+ let fetchSpy: ReturnType<typeof vi.spyOn>;
+
+ beforeEach(() => {
+ fetchSpy = vi.spyOn(globalThis, 'fetch') as any;
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ const okTokenResponse = (overrides: Record<string, unknown> = {}) =>
+ new Response(
+ JSON.stringify({
+ access_token: 'access-token-1',
+ application: { id: 'app-id-1' },
+ expires_in: 3600,
+ guild: { icon: 'icon-hash', id: 'guild-1', name: 'My Guild' },
+ refresh_token: 'refresh-token-1',
+ scope: 'bot applications.commands identify',
+ token_type: 'Bearer',
+ ...overrides,
+ }),
+ { headers: { 'Content-Type': 'application/json' }, status: 200 },
+ );
+
+ const okUserResponse = (id = 'user-installer-1') =>
+ new Response(JSON.stringify({ id, username: 'tester' }), { status: 200 });
+
+ it('exchanges the code, fetches /users/@me, and normalizes the install', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse() as any);
+ fetchSpy.mockResolvedValueOnce(okUserResponse() as any);
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'the-code',
+ redirectUri: 'https://app.example.com/cb',
+ });
+
+ expect(result.tenantId).toBe('guild-1');
+ expect(result.tenantName).toBe('My Guild');
+ expect(result.applicationId).toBe('app-id-1');
+ expect(result.accountId).toBe('app-id-1');
+ expect(result.installedByPlatformUserId).toBe('user-installer-1');
+ expect(result.credentials).toEqual({
+ accessToken: 'access-token-1',
+ refreshToken: 'refresh-token-1',
+ });
+ expect(result.metadata).toEqual({
+ guildIcon: 'icon-hash',
+ scope: 'bot applications.commands identify',
+ tenantName: 'My Guild',
+ });
+ expect(result.tokenExpiresAt).toBeInstanceOf(Date);
+
+ // Token POST goes form-encoded with grant_type=authorization_code.
+ const [tokenUrl, tokenInit] = fetchSpy.mock.calls[0] as [string, any];
+ expect(tokenUrl).toBe('https://discord.com/api/oauth2/token');
+ expect(tokenInit?.method).toBe('POST');
+ const body = tokenInit?.body as URLSearchParams;
+ expect(body.get('grant_type')).toBe('authorization_code');
+ expect(body.get('code')).toBe('the-code');
+ expect(body.get('redirect_uri')).toBe('https://app.example.com/cb');
+
+ // /users/@me uses the freshly-minted access token.
+ const [userUrl, userInit] = fetchSpy.mock.calls[1] as [string, any];
+ expect(userUrl).toBe('https://discord.com/api/v10/users/@me');
+ expect((userInit?.headers as any).Authorization).toBe('Bearer access-token-1');
+ });
+
+ it('omits refreshToken when Discord did not return one', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse({ refresh_token: undefined }) as any);
+ fetchSpy.mockResolvedValueOnce(okUserResponse() as any);
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect((result.credentials as any).refreshToken).toBeUndefined();
+ });
+
+ it('falls back to params.clientId for applicationId when response omits application.id', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse({ application: undefined }) as any);
+ fetchSpy.mockResolvedValueOnce(okUserResponse() as any);
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect(result.applicationId).toBe('app-id-1');
+ });
+
+ it('sets tokenExpiresAt to null when expires_in is absent', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse({ expires_in: undefined }) as any);
+ fetchSpy.mockResolvedValueOnce(okUserResponse() as any);
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect(result.tokenExpiresAt).toBeNull();
+ });
+
+ it('falls back to installedByPlatformUserId=null when /users/@me fails', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse() as any);
+ fetchSpy.mockResolvedValueOnce(new Response('err', { status: 500 }) as any);
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect(result.installedByPlatformUserId).toBeNull();
+ });
+
+ it('swallows /users/@me network errors and persists with null installer', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse() as any);
+ fetchSpy.mockRejectedValueOnce(new Error('econnreset'));
+
+ const result = await discordOAuthAdapter.exchangeCode({
+ clientId: 'app-id-1',
+ clientSecret: 'client-secret-1',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect(result.installedByPlatformUserId).toBeNull();
+ });
+
+ it('throws when the token endpoint returns non-2xx', async () => {
+ fetchSpy.mockResolvedValueOnce(new Response('upstream', { status: 502 }) as any);
+ await expect(
+ discordOAuthAdapter.exchangeCode({
+ clientId: 'a',
+ clientSecret: 'b',
+ code: 'c',
+ redirectUri: 'd',
+ }),
+ ).rejects.toThrow(/HTTP 502/);
+ });
+
+ it('throws when the token response carries a logical error', async () => {
+ fetchSpy.mockResolvedValueOnce(
+ new Response(JSON.stringify({ error: 'invalid_grant', error_description: 'bad code' }), {
+ status: 200,
+ }) as any,
+ );
+ await expect(
+ discordOAuthAdapter.exchangeCode({
+ clientId: 'a',
+ clientSecret: 'b',
+ code: 'c',
+ redirectUri: 'd',
+ }),
+ ).rejects.toThrow(/bad code/);
+ });
+
+ it('throws missing_token when access_token is absent', async () => {
+ fetchSpy.mockResolvedValueOnce(
+ new Response(JSON.stringify({ guild: { id: 'g' } }), { status: 200 }) as any,
+ );
+ await expect(
+ discordOAuthAdapter.exchangeCode({
+ clientId: 'a',
+ clientSecret: 'b',
+ code: 'c',
+ redirectUri: 'd',
+ }),
+ ).rejects.toThrow('missing_token');
+ });
+
+ it('throws missing_tenant when guild.id is absent (e.g. user-only install)', async () => {
+ fetchSpy.mockResolvedValueOnce(okTokenResponse({ guild: undefined }) as any);
+ await expect(
+ discordOAuthAdapter.exchangeCode({
+ clientId: 'a',
+ clientSecret: 'b',
+ code: 'c',
+ redirectUri: 'd',
+ }),
+ ).rejects.toThrow('missing_tenant');
+ });
+});
diff --git a/src/server/services/messenger/platforms/discord/oauth.ts b/src/server/services/messenger/platforms/discord/oauth.ts
new file mode 100644
index 00000000000..9c19395da69
--- /dev/null
+++ b/src/server/services/messenger/platforms/discord/oauth.ts
@@ -0,0 +1,177 @@
+import { getMessengerDiscordConfig } from '@/config/messenger';
+
+import type {
+ MessengerPlatformOAuthAdapter,
+ NormalizedInstallation,
+ OAuthBuildAuthorizeUrlParams,
+ OAuthExchangeCodeParams,
+} from '../types';
+
+const DISCORD_AUTHORIZE_URL = 'https://discord.com/api/oauth2/authorize';
+const DISCORD_TOKEN_URL = 'https://discord.com/api/oauth2/token';
+const DISCORD_API_BASE = 'https://discord.com/api/v10';
+
+/**
+ * Scopes requested at install. Combines the bot install (`bot` +
+ * `applications.commands`, which trigger the "add to server" picker and
+ * register slash commands) with the user-scope `identify` so the callback
+ * can resolve who installed the app and persist it on the install row.
+ *
+ * `identify` is a low-friction scope on Discord — no app verification
+ * required, no email exposure, just the user's id / username / avatar.
+ * Adding more user-scope features later (e.g. `email`, `guilds`) requires
+ * Discord's verification process once the bot crosses 100 servers, so we
+ * keep the surface narrow until product asks for it.
+ */
+const DISCORD_BOT_SCOPES = ['bot', 'applications.commands', 'identify'];
+
+/**
+ * Bitfield permissions requested at install. Matches Slack v1's DM-only
+ * footprint where possible:
+ *
+ * - VIEW_CHANNEL (1 << 10) — see channels the bot is added to
+ * - SEND_MESSAGES (1 << 11) — outbound replies
+ * - SEND_MESSAGES_IN_THREADS (1 << 38)
+ * - CREATE_PUBLIC_THREADS (1 << 34) — start a thread on @mention
+ * - READ_MESSAGE_HISTORY (1 << 16) — fetch context for replies
+ * - ADD_REACTIONS (1 << 6) — 👀/✅ acks, mirrors Slack
+ * - USE_APPLICATION_COMMANDS (1 << 31)
+ *
+ * Discord exposes these as decimal in the authorize URL.
+ */
+const DISCORD_BOT_PERMISSIONS = (
+ (1n << 6n) |
+ (1n << 10n) |
+ (1n << 11n) |
+ (1n << 16n) |
+ (1n << 31n) |
+ (1n << 34n) |
+ (1n << 38n)
+).toString();
+
+interface DiscordTokenResponse {
+ access_token?: string;
+ application?: { id: string };
+ error?: string;
+ error_description?: string;
+ expires_in?: number;
+ guild?: { icon: string | null; id: string; name: string };
+ refresh_token?: string;
+ scope?: string;
+ token_type?: 'Bearer';
+}
+
+interface DiscordUserResponse {
+ avatar?: string | null;
+ global_name?: string | null;
+ id: string;
+ username?: string;
+}
+
+const getAppConfig = async (): Promise<{ clientId: string; clientSecret: string } | null> => {
+ const config = await getMessengerDiscordConfig();
+ // `clientSecret` is required for the `oauth2/token` exchange. Without it
+ // the install endpoint returns a 503 with operator-facing copy ("configure
+ // Discord client_secret in dc-center → Agent → System Bots"). Bot runtime
+ // still works without `clientSecret` because dispatch uses `botToken`, but
+ // the audit-trail / user-identity install flow needs the exchange.
+ if (!config?.clientSecret) return null;
+ return { clientId: config.applicationId, clientSecret: config.clientSecret };
+};
+
+const buildAuthorizeUrl = (params: OAuthBuildAuthorizeUrlParams): string => {
+ const url = new URL(DISCORD_AUTHORIZE_URL);
+ url.searchParams.set('client_id', params.clientId);
+ url.searchParams.set('redirect_uri', params.redirectUri);
+ url.searchParams.set('response_type', 'code');
+ url.searchParams.set('scope', DISCORD_BOT_SCOPES.join(' '));
+ url.searchParams.set('permissions', DISCORD_BOT_PERMISSIONS);
+ url.searchParams.set('state', params.state);
+ return url.toString();
+};
+
+/**
+ * Standard Discord OAuth2 code-grant: POST `oauth2/token`, parse the response
+ * (which carries `guild` for `bot`-scope installs and `access_token` for
+ * user-scope), then call `/users/@me` to capture the installer's identity.
+ *
+ * Throws on any required-field gap so the callback maps to a clean
+ * `?discord_error=...` redirect.
+ */
+const exchangeCode = async (params: OAuthExchangeCodeParams): Promise<NormalizedInstallation> => {
+ const body = new URLSearchParams({
+ client_id: params.clientId,
+ client_secret: params.clientSecret,
+ code: params.code,
+ grant_type: 'authorization_code',
+ redirect_uri: params.redirectUri,
+ });
+
+ const tokenResponse = await fetch(DISCORD_TOKEN_URL, {
+ body,
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ method: 'POST',
+ });
+ if (!tokenResponse.ok) {
+ throw new Error(`oauth2/token HTTP ${tokenResponse.status}: ${await tokenResponse.text()}`);
+ }
+ const data = (await tokenResponse.json()) as DiscordTokenResponse;
+ if (data.error) {
+ throw new Error(`oauth2/token failed: ${data.error_description ?? data.error}`);
+ }
+ if (!data.access_token) throw new Error('missing_token');
+
+ const tenantId = data.guild?.id;
+ if (!tenantId) throw new Error('missing_tenant');
+
+ // Identify the installer via `/users/@me` (gated behind the `identify`
+ // scope we just acquired). Best-effort — if Discord rejects the call we
+ // still persist the install with `installedByPlatformUserId: null`; the
+ // takeover guard in the callback then falls back to "owned by whoever's
+ // session minted the state".
+ let installedByPlatformUserId: string | null = null;
+ try {
+ const userResponse = await fetch(`${DISCORD_API_BASE}/users/@me`, {
+ headers: { Authorization: `Bearer ${data.access_token}` },
+ });
+ if (userResponse.ok) {
+ const user = (await userResponse.json()) as DiscordUserResponse;
+ installedByPlatformUserId = user.id ?? null;
+ }
+ } catch {
+ /* swallow — null is the documented fallback */
+ }
+
+ // Application id sits at the OAuth client level, not in `data.application`
+ // for every response — `params.clientId` is authoritative.
+ const applicationId = data.application?.id ?? params.clientId;
+
+ const credentials: Record<string, unknown> = { accessToken: data.access_token };
+ if (data.refresh_token) credentials.refreshToken = data.refresh_token;
+
+ return {
+ // Discord's bot user id == application id. The runtime continues to talk
+ // to Discord with the global `botToken` from `system_bot_providers`; the
+ // per-install user access token persisted here is reserved for messenger
+ // user-scope API calls (e.g. listing the installer's guilds).
+ accountId: applicationId,
+ applicationId,
+ credentials,
+ installedByPlatformUserId,
+ metadata: {
+ guildIcon: data.guild?.icon ?? null,
+ scope: data.scope ?? DISCORD_BOT_SCOPES.join(' '),
+ tenantName: data.guild?.name ?? '',
+ },
+ tenantId,
+ tenantName: data.guild?.name,
+ tokenExpiresAt:
+ typeof data.expires_in === 'number' ? new Date(Date.now() + data.expires_in * 1000) : null,
+ };
+};
+
+export const discordOAuthAdapter: MessengerPlatformOAuthAdapter = {
+ buildAuthorizeUrl,
+ exchangeCode,
+ getAppConfig,
+};
diff --git a/src/server/services/messenger/platforms/index.ts b/src/server/services/messenger/platforms/index.ts
new file mode 100644
index 00000000000..35902bb1ec2
--- /dev/null
+++ b/src/server/services/messenger/platforms/index.ts
@@ -0,0 +1,24 @@
+import { discord } from './discord';
+import { MessengerPlatformRegistry } from './registry';
+import { slack } from './slack';
+import { telegram } from './telegram';
+
+export { MessengerDiscordBinder } from './discord';
+export { MessengerPlatformRegistry } from './registry';
+export { MessengerSlackBinder, slackWebhookGate } from './slack';
+export { MessengerTelegramBinder } from './telegram';
+export type {
+ MessengerPlatformDefinition,
+ MessengerPlatformWebhookGate,
+ MessengerWebhookContext,
+ SerializedMessengerPlatformDefinition,
+} from './types';
+
+/**
+ * Singleton registry — one per process. Each platform definition lives
+ * alongside its binder + (optional) webhook gate, mirroring `bot/platforms/`.
+ */
+export const messengerPlatformRegistry = new MessengerPlatformRegistry()
+ .register(slack)
+ .register(telegram)
+ .register(discord);
diff --git a/src/server/services/messenger/platforms/registry.test.ts b/src/server/services/messenger/platforms/registry.test.ts
new file mode 100644
index 00000000000..1dafeb92079
--- /dev/null
+++ b/src/server/services/messenger/platforms/registry.test.ts
@@ -0,0 +1,83 @@
+// @vitest-environment node
+import { describe, expect, it, vi } from 'vitest';
+
+import { MessengerPlatformRegistry } from './registry';
+
+const buildDefinition = (overrides: Partial<any> = {}) => ({
+ createBinder: vi.fn(() => ({ id: 'binder' }) as any),
+ id: 'slack' as const,
+ name: 'Slack',
+ oauth: { exchangeCode: vi.fn() },
+ webhookGate: { preprocess: vi.fn() },
+ ...overrides,
+});
+
+describe('MessengerPlatformRegistry', () => {
+ it('register / getPlatform round-trips a definition', () => {
+ const reg = new MessengerPlatformRegistry();
+ const def = buildDefinition() as any;
+ expect(reg.register(def)).toBe(reg);
+ expect(reg.getPlatform('slack')).toBe(def);
+ });
+
+ it('throws when registering a duplicate platform id', () => {
+ const reg = new MessengerPlatformRegistry();
+ reg.register(buildDefinition() as any);
+ expect(() => reg.register(buildDefinition() as any)).toThrow(/already registered/);
+ });
+
+ it('listPlatforms returns every registered definition', () => {
+ const reg = new MessengerPlatformRegistry();
+ reg.register(buildDefinition({ id: 'slack', name: 'Slack' }) as any);
+ reg.register(buildDefinition({ id: 'telegram', name: 'Telegram' }) as any);
+ expect(reg.listPlatforms().map((d) => d.id)).toEqual(['slack', 'telegram']);
+ });
+
+ it('listSerializedPlatforms strips runtime-only fields (createBinder, oauth, webhookGate)', () => {
+ const reg = new MessengerPlatformRegistry();
+ reg.register(buildDefinition() as any);
+ const [serialized] = reg.listSerializedPlatforms();
+ expect(serialized).toEqual({ id: 'slack', name: 'Slack' });
+ expect((serialized as any).createBinder).toBeUndefined();
+ expect((serialized as any).oauth).toBeUndefined();
+ expect((serialized as any).webhookGate).toBeUndefined();
+ });
+
+ it('createBinder dispatches to the registered factory with the credentials', () => {
+ const reg = new MessengerPlatformRegistry();
+ const factory = vi.fn(() => ({ kind: 'binder' }) as any);
+ reg.register(buildDefinition({ createBinder: factory }) as any);
+ const creds = {
+ applicationId: 'A',
+ botToken: 'b',
+ installationKey: 'slack:T',
+ metadata: {},
+ platform: 'slack' as const,
+ tenantId: 'T',
+ };
+ const binder = reg.createBinder(creds);
+ expect(factory).toHaveBeenCalledWith(creds);
+ expect(binder).toEqual({ kind: 'binder' });
+ });
+
+ it('createBinder returns null for unknown platforms', () => {
+ const reg = new MessengerPlatformRegistry();
+ const binder = reg.createBinder({
+ applicationId: 'A',
+ botToken: 'b',
+ installationKey: 'unknown:x',
+ metadata: {},
+ platform: 'discord' as any,
+ tenantId: 'x',
+ });
+ expect(binder).toBeNull();
+ });
+});
+
+describe('messengerPlatformRegistry singleton', () => {
+ it('registers slack, telegram, and discord on import', async () => {
+ const { messengerPlatformRegistry } = await import('./index');
+ const ids = messengerPlatformRegistry.listPlatforms().map((d) => d.id);
+ expect(ids).toEqual(expect.arrayContaining(['slack', 'telegram', 'discord']));
+ });
+});
diff --git a/src/server/services/messenger/platforms/registry.ts b/src/server/services/messenger/platforms/registry.ts
new file mode 100644
index 00000000000..d61804dbc95
--- /dev/null
+++ b/src/server/services/messenger/platforms/registry.ts
@@ -0,0 +1,52 @@
+import type { InstallationCredentials } from '../installations/types';
+import type { MessengerPlatformBinder } from '../types';
+import type { MessengerPlatformDefinition, SerializedMessengerPlatformDefinition } from './types';
+
+/**
+ * Messenger platform registry — manages all platform definitions.
+ *
+ * Mirrors `bot/platforms/registry.PlatformRegistry`: each definition owns its
+ * binder factory and (optionally) the platform-specific webhook preprocessing
+ * gate, so adding a new platform is a one-file change here plus the platform's
+ * own binder + (optional) gate.
+ */
+export class MessengerPlatformRegistry {
+ private platforms = new Map<string, MessengerPlatformDefinition>();
+
+ /** Register a platform definition. Throws if the platform ID is already registered. */
+ register(definition: MessengerPlatformDefinition): this {
+ if (this.platforms.has(definition.id)) {
+ throw new Error(`Messenger platform "${definition.id}" is already registered`);
+ }
+ this.platforms.set(definition.id, definition);
+ return this;
+ }
+
+ /** Get a platform definition by ID. */
+ getPlatform(platform: string): MessengerPlatformDefinition | undefined {
+ return this.platforms.get(platform);
+ }
+
+ /** List all registered platform definitions. */
+ listPlatforms(): MessengerPlatformDefinition[] {
+ return [...this.platforms.values()];
+ }
+
+ /**
+ * List platform definitions serialized for the frontend — drops the
+ * factory and gate fields that aren't safe to ship over TRPC. Mirrors
+ * `bot/platforms` `PlatformRegistry.listSerializedPlatforms`.
+ */
+ listSerializedPlatforms(): SerializedMessengerPlatformDefinition[] {
+ return this.listPlatforms().map(({ createBinder, oauth, webhookGate, ...rest }) => rest);
+ }
+
+ /**
+ * Build the per-platform binder for a resolved install. Returns null if the
+ * platform isn't registered (so callers can `404` cleanly without throwing).
+ */
+ createBinder(creds: InstallationCredentials): MessengerPlatformBinder | null {
+ const definition = this.platforms.get(creds.platform);
+ return definition ? definition.createBinder(creds) : null;
+ }
+}
diff --git a/src/server/services/messenger/platforms/slack/binder.test.ts b/src/server/services/messenger/platforms/slack/binder.test.ts
new file mode 100644
index 00000000000..54fd72560fb
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/binder.test.ts
@@ -0,0 +1,191 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { SlackApi } from '@/server/services/bot/platforms/slack/api';
+
+import { issueLinkToken } from '../../linkTokenStore';
+import { MessengerSlackBinder } from './binder';
+
+vi.mock('@/envs/app', () => ({
+ appEnv: { APP_URL: 'https://app.example.com' },
+}));
+
+vi.mock('../../linkTokenStore', () => ({
+ issueLinkToken: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/slack/api', () => ({
+ SlackApi: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/slack/client', () => ({
+ SlackClientFactory: vi.fn(),
+}));
+
+vi.mock('../../installations', () => ({
+ getInstallationStore: vi.fn(),
+}));
+
+const slackCreds = (overrides: any = {}) => ({
+ applicationId: 'A_APP',
+ botToken: 'xoxb-acme',
+ installationKey: 'slack:T_ACME',
+ metadata: { tenantName: 'Acme Inc' },
+ platform: 'slack' as const,
+ signingSecret: 'sigsec',
+ tenantId: 'T_ACME',
+ ...overrides,
+});
+
+let postMessageWithButtonAndLink: ReturnType<typeof vi.fn>;
+let postMessage: ReturnType<typeof vi.fn>;
+let getUserInfo: ReturnType<typeof vi.fn>;
+
+beforeEach(() => {
+ postMessageWithButtonAndLink = vi.fn().mockResolvedValue({ ts: '1' });
+ postMessage = vi.fn().mockResolvedValue({ ts: '1' });
+ getUserInfo = vi.fn().mockResolvedValue({ profile: { email: '[email protected]' } });
+
+ vi.mocked(SlackApi).mockImplementation(
+ () =>
+ ({
+ getUserInfo,
+ postMessage,
+ postMessageWithButtonAndLink,
+ }) as any,
+ );
+
+ vi.mocked(issueLinkToken).mockResolvedValue('rand-token-1');
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('MessengerSlackBinder.handleUnlinkedMessage', () => {
+ it('issues a link token with tenant scope and posts the button+link DM', async () => {
+ const binder = new MessengerSlackBinder(slackCreds());
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'U_ALICE',
+ authorUserName: 'alice',
+ chatId: 'D_DM',
+ message: { id: 'm1', text: 'hi' } as any,
+ });
+
+ expect(issueLinkToken).toHaveBeenCalledWith({
+ platform: 'slack',
+ platformUserId: 'U_ALICE',
+ platformUsername: 'alice',
+ tenantId: 'T_ACME',
+ tenantName: 'Acme Inc',
+ });
+
+ expect(postMessageWithButtonAndLink).toHaveBeenCalledTimes(1);
+ const [channel, intro, button, linkLabel] = postMessageWithButtonAndLink.mock.calls[0];
+ expect(channel).toBe('D_DM');
+ expect(intro).toContain("I'm LobeHub");
+ expect(button.text).toContain('Link Account');
+ // Button URL and inline link URL must match exactly so the user can pick
+ // either path. Both carry the full Slack context as URL params.
+ expect(button.url).toBe(linkLabel.match(/<([^|>]+)\|/)?.[1]);
+ expect(button.url).toContain('im_type=slack');
+ expect(button.url).toContain('random_id=rand-token-1');
+ expect(button.url).toContain('slack_user_id=U_ALICE');
+ expect(button.url).toContain('slack_team_id=T_ACME');
+ expect(button.url).toContain('slack_user_email=alice%40acme.com');
+ expect(button.url).toContain('channel=D_DM');
+ });
+
+ it('uses chat.postMessage (NOT chat.postEphemeral) so the prompt stays in DM history', async () => {
+ const binder = new MessengerSlackBinder(slackCreds());
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'U_ALICE',
+ chatId: 'D_DM',
+ message: { id: 'm1' } as any,
+ });
+ // postEphemeral isn't called — only the button+link in-history post.
+ const apiInstance = vi.mocked(SlackApi).mock.results[0]?.value as any;
+ expect(apiInstance?.postEphemeral).toBeUndefined();
+ expect(postMessageWithButtonAndLink).toHaveBeenCalled();
+ });
+
+ it('falls back to empty email when getUserInfo fails (verify-im handles missing email)', async () => {
+ getUserInfo.mockRejectedValueOnce(new Error('insufficient_scope'));
+
+ const binder = new MessengerSlackBinder(slackCreds());
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'U_ALICE',
+ chatId: 'D_DM',
+ message: { id: 'm1' } as any,
+ });
+
+ const [, , button] = postMessageWithButtonAndLink.mock.calls[0];
+ expect(button.url).not.toContain('slack_user_email=');
+ });
+
+ it('apologises and bails when issueLinkToken throws (Redis down)', async () => {
+ vi.mocked(issueLinkToken).mockRejectedValueOnce(new Error('redis offline'));
+
+ const binder = new MessengerSlackBinder(slackCreds());
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'U_ALICE',
+ chatId: 'D_DM',
+ message: { id: 'm1' } as any,
+ });
+
+ expect(postMessage).toHaveBeenCalledWith(
+ 'D_DM',
+ expect.stringContaining('temporarily unavailable'),
+ );
+ expect(postMessageWithButtonAndLink).not.toHaveBeenCalled();
+ });
+
+ it('no-ops when constructed without creds (legacy fallback path)', async () => {
+ const binder = new MessengerSlackBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: 'U_ALICE',
+ chatId: 'D_DM',
+ message: { id: 'm1' } as any,
+ });
+ expect(issueLinkToken).not.toHaveBeenCalled();
+ expect(postMessageWithButtonAndLink).not.toHaveBeenCalled();
+ });
+});
+
+describe('MessengerSlackBinder.notifyLinkSuccess', () => {
+ it('uses injected creds to send the success DM', async () => {
+ const binder = new MessengerSlackBinder(slackCreds());
+ await binder.notifyLinkSuccess({
+ activeAgentName: 'My Assistant',
+ platformUserId: 'U_ALICE',
+ tenantId: 'T_ACME',
+ });
+ expect(postMessage).toHaveBeenCalledWith(
+ 'U_ALICE',
+ expect.stringContaining('Linked successfully'),
+ );
+ expect(postMessage.mock.calls[0][1]).toContain('My Assistant');
+ });
+
+ it('lazily resolves creds via the installation store when constructed without them', async () => {
+ const { getInstallationStore } = await import('../../installations');
+ const resolveByKey = vi.fn().mockResolvedValue(slackCreds());
+ vi.mocked(getInstallationStore).mockReturnValue({
+ markRevoked: vi.fn(),
+ resolveByKey,
+ resolveByPayload: vi.fn(),
+ });
+
+ const binder = new MessengerSlackBinder();
+ await binder.notifyLinkSuccess({ platformUserId: 'U_ALICE', tenantId: 'T_ACME' });
+
+ expect(resolveByKey).toHaveBeenCalledWith('slack:T_ACME');
+ expect(postMessage).toHaveBeenCalled();
+ });
+
+ it('skips when neither creds nor tenantId are available', async () => {
+ const binder = new MessengerSlackBinder();
+ await binder.notifyLinkSuccess({ platformUserId: 'U_ALICE' });
+ expect(postMessage).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/platforms/slack/binder.ts b/src/server/services/messenger/platforms/slack/binder.ts
new file mode 100644
index 00000000000..e19723ac586
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/binder.ts
@@ -0,0 +1,352 @@
+import debug from 'debug';
+
+import { appEnv } from '@/envs/app';
+import type { PlatformClient } from '@/server/services/bot/platforms';
+import { SlackApi } from '@/server/services/bot/platforms/slack/api';
+import { SlackClientFactory } from '@/server/services/bot/platforms/slack/client';
+
+import { getInstallationStore } from '../../installations';
+import type { InstallationCredentials } from '../../installations/types';
+import { issueLinkToken } from '../../linkTokenStore';
+import type {
+ AgentPickerEntry,
+ CallbackAcknowledgement,
+ InboundCallbackAction,
+ MessengerPlatformBinder,
+ UnlinkedMessageContext,
+} from '../../types';
+
+const log = debug('lobe-server:messenger:slack');
+
+/**
+ * Application prefix on Slack `action_id`s so we can distinguish OUR buttons
+ * from anything else the workspace might inject. Format:
+ * `messenger:<verb>:<arg>` — mirrors the Telegram binder's `callback_data`
+ * convention so the router can reuse the same matcher.
+ */
+const ACTION_PREFIX = 'messenger:';
+
+/** Build the verify-im URL with all Slack context Manus passes (so the
+ * consent page can render the email + workspace and the user has nothing
+ * more to type). */
+const buildVerifyImUrl = (params: {
+ appUrl: string;
+ channel: string;
+ randomId: string;
+ slackTeamId: string;
+ slackUserEmail: string;
+ slackUserId: string;
+ thread?: string;
+}): string => {
+ const url = new URL('/verify-im', params.appUrl);
+ url.searchParams.set('im_type', 'slack');
+ url.searchParams.set('random_id', params.randomId);
+ url.searchParams.set('slack_user_id', params.slackUserId);
+ url.searchParams.set('slack_team_id', params.slackTeamId);
+ if (params.slackUserEmail) {
+ url.searchParams.set('slack_user_email', params.slackUserEmail);
+ }
+ url.searchParams.set('channel', params.channel);
+ url.searchParams.set('thread', params.thread ?? '');
+ url.searchParams.set('utm_source', 'messenger_slack');
+ return url.toString();
+};
+
+const buildSwitchButtons = (
+ entries: AgentPickerEntry[],
+): Array<{ actionId: string; style?: 'primary'; text: string; value: string }> =>
+ entries.map((entry) => ({
+ actionId: `${ACTION_PREFIX}switch:${entry.id}`,
+ text: entry.isActive ? `✅ ${entry.title}` : entry.title,
+ value: entry.id,
+ ...(entry.isActive ? { style: 'primary' as const } : {}),
+ }));
+
+/**
+ * Per-Slack-workspace binder. Constructed by `MessengerRouter` from
+ * `InstallationCredentials` resolved out of the inbound webhook (or by
+ * `notifyLinkSuccess` from `installationStore.resolveByKey('slack:'+tenantId)`).
+ *
+ * All outbound calls use `this.creds.botToken` — env is no longer read.
+ * Constructed without creds, the binder no-ops every method (the legacy
+ * env-only call sites still exist during PR2 rollout).
+ */
+export class MessengerSlackBinder implements MessengerPlatformBinder {
+ protected readonly creds?: InstallationCredentials;
+
+ constructor(creds?: InstallationCredentials) {
+ this.creds = creds;
+ }
+
+ async createClient(): Promise<PlatformClient | null> {
+ if (!this.creds) {
+ log('createClient: no InstallationCredentials supplied');
+ return null;
+ }
+ return new SlackClientFactory().createClient(
+ {
+ // Per-install applicationId so chat-sdk's bookkeeping / dedupe / queue
+ // keys never collide across workspaces.
+ applicationId: this.creds.installationKey,
+ credentials: {
+ botToken: this.creds.botToken,
+ signingSecret: this.creds.signingSecret ?? '',
+ },
+ platform: 'slack',
+ settings: {},
+ },
+ { appUrl: appEnv.APP_URL },
+ );
+ }
+
+ /**
+ * First-touch: post the link prompt as a normal in-history DM with a
+ * Block Kit button AND the same URL as a plain inline link below it.
+ * Email-style fallback — the button is the primary CTA, the link is the
+ * fallback for mobile / copy-paste / weird Block Kit renders.
+ */
+ async handleUnlinkedMessage(ctx: UnlinkedMessageContext): Promise<void> {
+ if (!this.creds) {
+ log('handleUnlinkedMessage: no creds, skipping');
+ return;
+ }
+ const appUrl = appEnv.APP_URL;
+ if (!appUrl) {
+ log('handleUnlinkedMessage: APP_URL not set, cannot build verify-im link');
+ return;
+ }
+
+ const tenantName = String(this.creds.metadata?.tenantName ?? '');
+
+ let randomId: string;
+ try {
+ randomId = await issueLinkToken({
+ platform: 'slack',
+ platformUserId: ctx.authorUserId,
+ platformUsername: ctx.authorUserName,
+ tenantId: this.creds.tenantId,
+ tenantName,
+ });
+ } catch (error) {
+ log('handleUnlinkedMessage: failed to issue link token: %O', error);
+ const api = new SlackApi(this.creds.botToken);
+ await api.postMessage(
+ ctx.chatId,
+ 'LobeHub is temporarily unavailable. Please try again in a moment.',
+ );
+ return;
+ }
+
+ // Best-effort prefill of the user's email for the verify-im page. Falls
+ // back to '' if `users:read.email` scope wasn't granted or the API call
+ // fails — verify-im handles a missing email gracefully.
+ let email = '';
+ try {
+ const api = new SlackApi(this.creds.botToken);
+ const user = await api.getUserInfo(ctx.authorUserId);
+ email = user?.profile?.email ?? '';
+ } catch (error) {
+ log('handleUnlinkedMessage: getUserInfo failed: %O', error);
+ }
+
+ const verifyUrl = buildVerifyImUrl({
+ appUrl,
+ channel: ctx.chatId,
+ randomId,
+ slackTeamId: this.creds.tenantId,
+ slackUserEmail: email,
+ slackUserId: ctx.authorUserId,
+ thread: '',
+ });
+
+ const intro =
+ "Hi, I'm LobeHub — your AI agent in Slack.\n" + 'To start, link your LobeHub account.';
+ const linkLabel = `Or copy this link: <${verifyUrl}|${verifyUrl}>`;
+
+ const api = new SlackApi(this.creds.botToken);
+ try {
+ await api.postMessageWithButtonAndLink(
+ ctx.chatId,
+ intro,
+ { text: ':link: Link Account', url: verifyUrl },
+ linkLabel,
+ );
+ } catch (error) {
+ log('handleUnlinkedMessage: postMessageWithButtonAndLink failed: %O', error);
+ }
+ }
+
+ /**
+ * Confirmation back into the Slack DM after the user finishes verify-im.
+ *
+ * Lazily resolves install credentials by `tenantId` because this call
+ * originates from the TRPC lambda router (which constructs binders without
+ * creds). For per-tenant platforms the caller MUST supply `tenantId` so we
+ * can pick the right workspace's bot token.
+ */
+ async notifyLinkSuccess(params: {
+ activeAgentName?: string;
+ platformUserId: string;
+ tenantId?: string;
+ }): Promise<void> {
+ let creds = this.creds;
+ if (!creds) {
+ if (!params.tenantId) {
+ log('notifyLinkSuccess: missing tenantId for slack — cannot resolve install');
+ return;
+ }
+ const store = getInstallationStore('slack');
+ if (!store) return;
+ const resolved = await store.resolveByKey(`slack:${params.tenantId}`);
+ if (!resolved) {
+ log('notifyLinkSuccess: install not found for tenantId=%s', params.tenantId);
+ return;
+ }
+ creds = resolved;
+ }
+
+ const headline =
+ ':white_check_mark: Linked successfully! Your LobeHub account is now connected.';
+ const tail = params.activeAgentName
+ ? `\n\nActive agent: *${params.activeAgentName}*\n\nGo ahead and send your first message — send \`/agents\` any time to switch the active agent.`
+ : '\n\nSend `/agents` to list your agents and pick the active one.';
+
+ try {
+ // Slack accepts a user id as the `channel` arg and auto-opens the IM
+ // (requires `im:write` scope on the App).
+ const api = new SlackApi(creds.botToken);
+ await api.postMessage(params.platformUserId, `${headline}${tail}`);
+ } catch (error) {
+ log('notifyLinkSuccess: failed to send to %s: %O', params.platformUserId, error);
+ }
+ }
+
+ async sendDmText(chatId: string, text: string): Promise<void> {
+ if (!this.creds) {
+ log('sendDmText: no creds, skipping');
+ return;
+ }
+ try {
+ await new SlackApi(this.creds.botToken).postMessage(chatId, text);
+ } catch (error) {
+ log('sendDmText: failed to send to chat=%s: %O', chatId, error);
+ }
+ }
+
+ async sendAgentPicker(
+ chatId: string,
+ params: { entries: AgentPickerEntry[]; text: string },
+ ): Promise<void> {
+ if (!this.creds) {
+ log('sendAgentPicker: no creds, skipping');
+ return;
+ }
+ try {
+ const api = new SlackApi(this.creds.botToken);
+ await api.postMessageWithButtonGrid(chatId, params.text, buildSwitchButtons(params.entries));
+ } catch (error) {
+ log('sendAgentPicker: failed for chat=%s: %O', chatId, error);
+ }
+ }
+
+ /**
+ * Pull our `messenger:switch:<agentId>` action out of a Slack interactive
+ * webhook payload. Slack delivers `block_actions` as
+ * `application/x-www-form-urlencoded` with a single `payload` field whose
+ * value is JSON, so we parse here rather than rely on the router's JSON
+ * path. Returns null for any other update so the caller can hand off to
+ * chat-sdk.
+ */
+ async extractCallbackAction(req: Request): Promise<InboundCallbackAction | null> {
+ const contentType = req.headers.get('content-type') ?? '';
+ if (!contentType.includes('application/x-www-form-urlencoded')) return null;
+
+ let payload: any;
+ try {
+ const raw = await req.text();
+ const params = new URLSearchParams(raw);
+ const payloadStr = params.get('payload');
+ if (!payloadStr) return null;
+ payload = JSON.parse(payloadStr);
+ } catch {
+ return null;
+ }
+
+ if (!payload || payload.type !== 'block_actions') return null;
+ const action = payload.actions?.[0];
+ const actionId = action?.action_id ? String(action.action_id) : '';
+ if (!actionId.startsWith(ACTION_PREFIX)) return null;
+
+ const fromUserId = payload.user?.id ? String(payload.user.id) : '';
+ // For DMs the channel id is in `payload.channel.id`; for app-home or some
+ // surfaces it can be missing — we only support DM-channel pickers today.
+ const chatId = payload.channel?.id ? String(payload.channel.id) : '';
+ const messageTs = payload.message?.ts ? String(payload.message.ts) : undefined;
+ if (!fromUserId || !chatId) return null;
+
+ return {
+ // `response_url` is what we'd use to ack via response payload — Slack
+ // accepts up to 5 calls within 30 minutes per response_url. We use
+ // chat.update + chat.postEphemeral via `acknowledgeCallback` instead.
+ callbackId: payload.response_url ? String(payload.response_url) : '',
+ chatId,
+ data: actionId,
+ fromUserId,
+ messageId: messageTs,
+ };
+ }
+
+ async acknowledgeCallback(
+ action: InboundCallbackAction,
+ ack: CallbackAcknowledgement,
+ ): Promise<void> {
+ if (!this.creds) {
+ log('acknowledgeCallback: no creds, skipping');
+ return;
+ }
+ const api = new SlackApi(this.creds.botToken);
+
+ // Re-render the picker first so the new active marker shows up before any
+ // ephemeral feedback fires (and even if the ephemeral post fails).
+ if (ack.updatedPicker && action.messageId !== undefined) {
+ try {
+ await api.updateMessageWithButtonGrid(
+ action.chatId,
+ String(action.messageId),
+ ack.updatedPicker.text,
+ buildSwitchButtons(ack.updatedPicker.entries),
+ );
+ } catch (error) {
+ log('acknowledgeCallback: update picker failed: %O', error);
+ }
+ }
+
+ if (ack.toast) {
+ try {
+ // Slack has no native toast for button taps (unlike Telegram's
+ // `answerCallbackQuery`) — the closest UX is an ephemeral message
+ // visible only to the tapper.
+ await api.postEphemeral(action.chatId, action.fromUserId, ack.toast);
+ } catch (error) {
+ log('acknowledgeCallback: postEphemeral failed: %O', error);
+ }
+ }
+ }
+
+ /**
+ * Slash commands and other Slack interactions can fire from any channel —
+ * reply ephemerally so the response is private to the invoker regardless
+ * of where the trigger originated. `/start` in particular MUST be wired
+ * (Slack's input bar treats `/start` as a slash command and never
+ * delivers it to the regular DM message path; without a registered
+ * handler chat-sdk fails to ack within 3s and Slack surfaces
+ * `operation_timeout` to the user).
+ */
+ async replyPrivately(channel: any, user: any, text: string): Promise<void> {
+ try {
+ await channel.postEphemeral(user, text, { fallbackToDM: true });
+ } catch (error) {
+ log('replyPrivately: postEphemeral failed: %O', error);
+ }
+ }
+}
diff --git a/src/server/services/messenger/platforms/slack/definition.ts b/src/server/services/messenger/platforms/slack/definition.ts
new file mode 100644
index 00000000000..a269f4fe6ec
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/definition.ts
@@ -0,0 +1,12 @@
+import type { MessengerPlatformDefinition } from '../types';
+import { MessengerSlackBinder } from './binder';
+import { slackOAuthAdapter } from './oauth';
+import { slackWebhookGate } from './webhook';
+
+export const slack: MessengerPlatformDefinition = {
+ createBinder: (creds) => new MessengerSlackBinder(creds),
+ id: 'slack',
+ name: 'Slack',
+ oauth: slackOAuthAdapter,
+ webhookGate: slackWebhookGate,
+};
diff --git a/src/server/services/messenger/platforms/slack/index.ts b/src/server/services/messenger/platforms/slack/index.ts
new file mode 100644
index 00000000000..2e6c7becae9
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/index.ts
@@ -0,0 +1,3 @@
+export { MessengerSlackBinder } from './binder';
+export { slack } from './definition';
+export { slackWebhookGate } from './webhook';
diff --git a/src/server/services/messenger/platforms/slack/oauth.test.ts b/src/server/services/messenger/platforms/slack/oauth.test.ts
new file mode 100644
index 00000000000..e31c2eb3584
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/oauth.test.ts
@@ -0,0 +1,231 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import * as slackOAuth from '../../oauth/slackOAuth';
+import { slackOAuthAdapter } from './oauth';
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerSlackConfig: vi.fn(),
+}));
+
+const { getMessengerSlackConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+};
+
+beforeEach(() => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValue(VALID_CONFIG as any);
+});
+
+afterEach(() => {
+ vi.restoreAllMocks();
+});
+
+describe('slackOAuthAdapter.getAppConfig', () => {
+ it('returns clientId/clientSecret from messenger config', async () => {
+ expect(await slackOAuthAdapter.getAppConfig()).toEqual({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ });
+ });
+
+ it('returns null when slack is not configured', async () => {
+ vi.mocked(getMessengerSlackConfig).mockResolvedValueOnce(null);
+ expect(await slackOAuthAdapter.getAppConfig()).toBeNull();
+ });
+});
+
+describe('slackOAuthAdapter.buildAuthorizeUrl', () => {
+ it('delegates to slackOAuth.buildInstallUrl with the messenger bot scopes', () => {
+ const url = slackOAuthAdapter.buildAuthorizeUrl({
+ clientId: 'cid',
+ redirectUri: 'https://app.example.com/cb',
+ state: 'nonce-1',
+ });
+ const parsed = new URL(url);
+ const scope = parsed.searchParams.get('scope') ?? '';
+ // Spot-check the messenger v1 scope shape — DM-only, includes
+ // reactions:write but not :read.
+ expect(scope.split(',')).toEqual(
+ expect.arrayContaining([
+ 'chat:write',
+ 'im:history',
+ 'im:read',
+ 'im:write',
+ 'reactions:write',
+ 'users:read',
+ 'users:read.email',
+ ]),
+ );
+ expect(scope.split(',')).not.toContain('reactions:read');
+ expect(parsed.searchParams.get('state')).toBe('nonce-1');
+ });
+});
+
+describe('slackOAuthAdapter.exchangeCode', () => {
+ it('normalizes a workspace install', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ access_token: 'xoxb-acme',
+ app_id: 'A_APP',
+ authed_user: { id: 'U_INSTALLER' },
+ bot_user_id: 'U_BOT',
+ expires_in: 43_200,
+ is_enterprise_install: false,
+ ok: true,
+ refresh_token: 'r-1',
+ scope: 'chat:write,im:history',
+ team: { id: 'T_ACME', name: 'Acme' },
+ } as any);
+
+ const out = await slackOAuthAdapter.exchangeCode({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+
+ expect(out.tenantId).toBe('T_ACME');
+ expect(out.tenantName).toBe('Acme');
+ expect(out.applicationId).toBe('A_APP');
+ expect(out.accountId).toBe('U_BOT');
+ expect(out.installedByPlatformUserId).toBe('U_INSTALLER');
+ expect(out.credentials).toEqual({ botToken: 'xoxb-acme', refreshToken: 'r-1' });
+ expect(out.metadata).toEqual({
+ enterpriseId: null,
+ isEnterpriseInstall: false,
+ scope: 'chat:write,im:history',
+ tenantName: 'Acme',
+ });
+ expect(out.tokenExpiresAt).toBeInstanceOf(Date);
+ });
+
+ it('uses enterprise.id as tenantId for Enterprise Grid org installs', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ access_token: 'xoxb-org',
+ app_id: 'A_APP',
+ bot_user_id: 'U_BOT',
+ enterprise: { id: 'E_GRID', name: 'GridCorp' },
+ is_enterprise_install: true,
+ ok: true,
+ team: null,
+ } as any);
+
+ const out = await slackOAuthAdapter.exchangeCode({
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ code: 'c',
+ redirectUri: 'https://r',
+ });
+ expect(out.tenantId).toBe('E_GRID');
+ expect(out.tenantName).toBe('GridCorp');
+ expect((out.metadata as any).isEnterpriseInstall).toBe(true);
+ expect((out.metadata as any).enterpriseId).toBe('E_GRID');
+ });
+
+ it('omits refreshToken when slack does not return one (non-rotating token)', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ access_token: 'xoxb-static',
+ app_id: 'A_APP',
+ bot_user_id: 'U_BOT',
+ is_enterprise_install: false,
+ ok: true,
+ team: { id: 'T', name: 'T' },
+ } as any);
+
+ const out = await slackOAuthAdapter.exchangeCode({
+ clientId: 'c',
+ clientSecret: 's',
+ code: 'c',
+ redirectUri: 'r',
+ });
+ expect((out.credentials as any).refreshToken).toBeUndefined();
+ expect(out.tokenExpiresAt).toBeNull();
+ });
+
+ it('throws missing_tenant when neither team.id nor enterprise.id is present', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ access_token: 'xoxb-x',
+ app_id: 'A_APP',
+ is_enterprise_install: false,
+ ok: true,
+ team: null,
+ } as any);
+
+ await expect(
+ slackOAuthAdapter.exchangeCode({
+ clientId: 'c',
+ clientSecret: 's',
+ code: 'c',
+ redirectUri: 'r',
+ }),
+ ).rejects.toThrow('missing_tenant');
+ });
+
+ it('throws missing_token when access_token is absent', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ app_id: 'A_APP',
+ is_enterprise_install: false,
+ ok: true,
+ team: { id: 'T', name: 'T' },
+ } as any);
+
+ await expect(
+ slackOAuthAdapter.exchangeCode({
+ clientId: 'c',
+ clientSecret: 's',
+ code: 'c',
+ redirectUri: 'r',
+ }),
+ ).rejects.toThrow('missing_token');
+ });
+
+ it('throws missing_app_id when app_id is absent', async () => {
+ vi.spyOn(slackOAuth, 'exchangeCode').mockResolvedValueOnce({
+ access_token: 'xoxb',
+ is_enterprise_install: false,
+ ok: true,
+ team: { id: 'T', name: 'T' },
+ } as any);
+
+ await expect(
+ slackOAuthAdapter.exchangeCode({
+ clientId: 'c',
+ clientSecret: 's',
+ code: 'c',
+ redirectUri: 'r',
+ }),
+ ).rejects.toThrow('missing_app_id');
+ });
+});
+
+describe('slackOAuthAdapter.buildPostInstallRedirect', () => {
+ const baseInstall = {
+ accountId: 'U_BOT',
+ applicationId: 'A_APP',
+ credentials: {},
+ installedByPlatformUserId: 'U_INSTALLER',
+ metadata: { isEnterpriseInstall: false },
+ tenantId: 'T_ACME',
+ tenantName: 'Acme',
+ tokenExpiresAt: null,
+ };
+
+ it('builds a slack.com/app/open deep link for workspace installs', () => {
+ const url = slackOAuthAdapter.buildPostInstallRedirect!(baseInstall as any, 'origin')!;
+ expect(url.origin + url.pathname).toBe('https://slack.com/app/open');
+ expect(url.searchParams.get('team')).toBe('T_ACME');
+ expect(url.searchParams.get('id')).toBe('A_APP');
+ });
+
+ it('returns null for Enterprise Grid org installs (no single team to deep-link)', () => {
+ const url = slackOAuthAdapter.buildPostInstallRedirect!(
+ { ...baseInstall, metadata: { isEnterpriseInstall: true } } as any,
+ 'origin',
+ );
+ expect(url).toBeNull();
+ });
+});
diff --git a/src/server/services/messenger/platforms/slack/oauth.ts b/src/server/services/messenger/platforms/slack/oauth.ts
new file mode 100644
index 00000000000..4de7d312eb7
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/oauth.ts
@@ -0,0 +1,107 @@
+import { getMessengerSlackConfig } from '@/config/messenger';
+
+import { buildInstallUrl, exchangeCode as exchangeSlackCode } from '../../oauth/slackOAuth';
+import type {
+ MessengerPlatformOAuthAdapter,
+ NormalizedInstallation,
+ OAuthBuildAuthorizeUrlParams,
+ OAuthExchangeCodeParams,
+} from '../types';
+
+/**
+ * Bot scopes requested at install. Keep in sync with
+ * `docs/development/messenger/slack-app-manifest.yaml` — Slack rejects the
+ * install with `invalid_scope` if the App's manifest doesn't authorise
+ * everything we ask for.
+ *
+ * Deliberately narrower than the per-agent bot path documented at
+ * `docs/usage/channels/slack.zh-CN.mdx`. The two products are different:
+ *
+ * - per-agent bot = user installs their own Slack App for a single agent;
+ * wants @mention in channels, slash commands, channel/group history,
+ * reactions, Slack AI assistant — needs the full set
+ * - LobeHub messenger v1 = official LobeHub-distributed Marketplace App,
+ * DM-only, agent-as-coworker (Manus pattern). Channel @mention / slash
+ * commands / channel history land in PR3 (LOBE-8424); each addition
+ * triggers Marketplace re-review so we batch them
+ *
+ * `reactions:write` is included because `AgentBridgeService.handleMention`
+ * uses emoji reactions (👀 "processing" → ✅ "done") for inline feedback —
+ * this is core UX even in DM-only mode. `reactions:read` is NOT needed: we
+ * never react to users' own reactions in v1.
+ */
+const SLACK_BOT_SCOPES = [
+ 'chat:write',
+ 'im:history',
+ 'im:read',
+ 'im:write',
+ 'reactions:write',
+ 'users:read',
+ 'users:read.email',
+];
+
+const getAppConfig = async (): Promise<{ clientId: string; clientSecret: string } | null> => {
+ const config = await getMessengerSlackConfig();
+ if (!config) return null;
+ return { clientId: config.clientId, clientSecret: config.clientSecret };
+};
+
+const buildAuthorizeUrl = (params: OAuthBuildAuthorizeUrlParams): string =>
+ buildInstallUrl({
+ clientId: params.clientId,
+ redirectUri: params.redirectUri,
+ scopes: SLACK_BOT_SCOPES,
+ state: params.state,
+ });
+
+const exchangeCode = async (params: OAuthExchangeCodeParams): Promise<NormalizedInstallation> => {
+ const oauth = await exchangeSlackCode(params);
+
+ // Workspace install → team.id; Enterprise Grid org install → enterprise.id.
+ const isEnterpriseInstall = oauth.is_enterprise_install === true;
+ const tenantId = isEnterpriseInstall ? oauth.enterprise?.id : oauth.team?.id;
+ const tenantName = isEnterpriseInstall ? oauth.enterprise?.name : oauth.team?.name;
+
+ if (!tenantId) throw new Error('missing_tenant');
+ if (!oauth.access_token) throw new Error('missing_token');
+ if (!oauth.app_id) throw new Error('missing_app_id');
+
+ // Token rotation is opt-in per App; presence of `expires_in` + `refresh_token`
+ // is what tells us this install is rotating.
+ const credentials: Record<string, unknown> = { botToken: oauth.access_token };
+ if (oauth.refresh_token) credentials.refreshToken = oauth.refresh_token;
+
+ return {
+ accountId: oauth.bot_user_id ?? null,
+ applicationId: oauth.app_id,
+ credentials,
+ installedByPlatformUserId: oauth.authed_user?.id ?? null,
+ metadata: {
+ enterpriseId: oauth.enterprise?.id ?? null,
+ isEnterpriseInstall,
+ scope: oauth.scope ?? '',
+ tenantName: tenantName ?? '',
+ },
+ tenantId,
+ tenantName,
+ tokenExpiresAt:
+ typeof oauth.expires_in === 'number' ? new Date(Date.now() + oauth.expires_in * 1000) : null,
+ };
+};
+
+const buildPostInstallRedirect = (install: NormalizedInstallation): URL | null => {
+ // Enterprise Grid installs don't have a single team to deep-link to, so we
+ // fall back to the route's default settings redirect.
+ if (install.metadata.isEnterpriseInstall) return null;
+ const url = new URL('https://slack.com/app/open');
+ url.searchParams.set('team', install.tenantId);
+ url.searchParams.set('id', install.applicationId);
+ return url;
+};
+
+export const slackOAuthAdapter: MessengerPlatformOAuthAdapter = {
+ buildAuthorizeUrl,
+ buildPostInstallRedirect,
+ exchangeCode,
+ getAppConfig,
+};
diff --git a/src/server/services/messenger/platforms/slack/webhook.test.ts b/src/server/services/messenger/platforms/slack/webhook.test.ts
new file mode 100644
index 00000000000..1a84e579675
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/webhook.test.ts
@@ -0,0 +1,114 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { slackWebhookGate } from './webhook';
+
+const mockMarkRevoked = vi.fn();
+
+vi.mock('../../installations', () => ({
+ getInstallationStore: vi.fn(() => ({
+ markRevoked: mockMarkRevoked,
+ })),
+}));
+
+const mockVerifySignature = vi.fn();
+vi.mock('../../oauth/slackOAuth', () => ({
+ verifySignature: (...args: any[]) => mockVerifySignature(...args),
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerSlackConfig: vi.fn().mockReturnValue({
+ appId: 'A_APP',
+ clientId: 'cid',
+ clientSecret: 'csecret',
+ signingSecret: 'sigsec',
+ }),
+}));
+
+const buildSlackRequest = (body: string, headers: Record<string, string> = {}): Request =>
+ new Request('https://app.example.com/api/agent/messenger/webhooks/slack', {
+ body,
+ headers: {
+ 'content-type': 'application/json',
+ 'x-slack-request-timestamp': String(Math.floor(Date.now() / 1000)),
+ 'x-slack-signature': 'v0=valid',
+ ...headers,
+ },
+ method: 'POST',
+ });
+
+const ctx = () => ({ invalidateBot: vi.fn() });
+
+beforeEach(() => {
+ mockVerifySignature.mockReturnValue(true);
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('slackWebhookGate.preprocess', () => {
+ it('returns 401 when signature headers are missing', async () => {
+ const req = new Request('https://e.com/x', { body: '{}', method: 'POST' });
+ const res = await slackWebhookGate.preprocess(req, '{}', ctx());
+ expect(res?.status).toBe(401);
+ expect(mockVerifySignature).not.toHaveBeenCalled();
+ });
+
+ it('returns 401 when signature is invalid', async () => {
+ mockVerifySignature.mockReturnValue(false);
+ const res = await slackWebhookGate.preprocess(buildSlackRequest('{}'), '{}', ctx());
+ expect(res?.status).toBe(401);
+ });
+
+ it('replies to url_verification with the challenge value', async () => {
+ const body = JSON.stringify({ challenge: 'abc123', type: 'url_verification' });
+ const res = await slackWebhookGate.preprocess(buildSlackRequest(body), body, ctx());
+ expect(res?.status).toBe(200);
+ expect(await res!.text()).toBe('abc123');
+ });
+
+ it('marks the install revoked + invalidates cached bot on app_uninstalled', async () => {
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'app_uninstalled' },
+ type: 'event_callback',
+ });
+ const c = ctx();
+ const res = await slackWebhookGate.preprocess(buildSlackRequest(body), body, c);
+ expect(res?.status).toBe(200);
+ expect(mockMarkRevoked).toHaveBeenCalledWith('slack:T_ACME');
+ expect(c.invalidateBot).toHaveBeenCalledWith('slack:T_ACME');
+ });
+
+ it('marks the install revoked on tokens_revoked too', async () => {
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'tokens_revoked' },
+ type: 'event_callback',
+ });
+ await slackWebhookGate.preprocess(buildSlackRequest(body), body, ctx());
+ expect(mockMarkRevoked).toHaveBeenCalledWith('slack:T_ACME');
+ });
+
+ it('uses enterprise_id for grid org installs', async () => {
+ const body = JSON.stringify({
+ authorizations: [{ enterprise_id: 'E_GRID', is_enterprise_install: true }],
+ event: { type: 'app_uninstalled' },
+ type: 'event_callback',
+ });
+ await slackWebhookGate.preprocess(buildSlackRequest(body), body, ctx());
+ expect(mockMarkRevoked).toHaveBeenCalledWith('slack:E_GRID');
+ });
+
+ it('returns null when the inbound is a normal message (caller continues)', async () => {
+ const body = JSON.stringify({
+ authorizations: [{ team_id: 'T_ACME' }],
+ event: { type: 'message' },
+ type: 'event_callback',
+ });
+ const res = await slackWebhookGate.preprocess(buildSlackRequest(body), body, ctx());
+ expect(res).toBeNull();
+ expect(mockMarkRevoked).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/platforms/slack/webhook.ts b/src/server/services/messenger/platforms/slack/webhook.ts
new file mode 100644
index 00000000000..a1f599e0e8c
--- /dev/null
+++ b/src/server/services/messenger/platforms/slack/webhook.ts
@@ -0,0 +1,127 @@
+import debug from 'debug';
+
+import { getMessengerSlackConfig } from '@/config/messenger';
+
+import { getInstallationStore } from '../../installations';
+import { verifySignature as verifySlackSignature } from '../../oauth/slackOAuth';
+import type { MessengerPlatformWebhookGate } from '../types';
+
+const log = debug('lobe-server:messenger:slack:webhook-gate');
+
+/**
+ * Slack lifecycle events we treat specially before falling into normal
+ * routing. Both indicate the install is gone — flag the row revoked so
+ * subsequent webhooks short-circuit, and acknowledge with 200 (no retries).
+ */
+const SLACK_LIFECYCLE_EVENTS = new Set(['app_uninstalled', 'tokens_revoked']);
+
+const isSlackLifecycleEvent = (rawBody: string): { eventType: string } | null => {
+ try {
+ const parsed = JSON.parse(rawBody);
+ if (parsed?.type !== 'event_callback') return null;
+ const eventType = parsed?.event?.type;
+ if (typeof eventType === 'string' && SLACK_LIFECYCLE_EVENTS.has(eventType)) {
+ return { eventType };
+ }
+ } catch {
+ /* not JSON / not an Events API payload — fall through */
+ }
+ return null;
+};
+
+/** Slack `url_verification` is the once-only setup challenge; reply with the challenge value. */
+const handleSlackUrlVerification = (rawBody: string): Response | null => {
+ try {
+ const parsed = JSON.parse(rawBody);
+ if (parsed?.type === 'url_verification' && typeof parsed?.challenge === 'string') {
+ return new Response(parsed.challenge, {
+ headers: { 'Content-Type': 'text/plain' },
+ status: 200,
+ });
+ }
+ } catch {
+ /* ignore */
+ }
+ return null;
+};
+
+const handleSlackLifecycleEvent = async (
+ rawBody: string,
+ eventType: string,
+ invalidateBot: (installationKey: string) => void,
+): Promise<void> => {
+ try {
+ const parsed = JSON.parse(rawBody);
+ const auth = Array.isArray(parsed.authorizations) ? parsed.authorizations[0] : null;
+ const isEnterprise =
+ auth?.is_enterprise_install === true || parsed.is_enterprise_install === true;
+ const tenantId = isEnterprise
+ ? (auth?.enterprise_id ?? parsed.enterprise_id)
+ : (auth?.team_id ?? parsed.team_id);
+ if (!tenantId) {
+ log('lifecycle %s: missing tenant id, skipping', eventType);
+ return;
+ }
+ const installationKey = `slack:${tenantId}`;
+ const store = getInstallationStore('slack');
+ if (store?.markRevoked) {
+ await store.markRevoked(installationKey);
+ }
+ // Drop the cached bot so a re-install (which clears `revoked_at`) gets
+ // a fresh Chat SDK instance with the new token.
+ invalidateBot(installationKey);
+ log('lifecycle %s: revoked install %s', eventType, installationKey);
+ } catch (error) {
+ log('lifecycle %s: failed to process: %O', eventType, error);
+ }
+};
+
+/**
+ * Slack-specific webhook preprocessing. Runs before the router's shared
+ * install-resolution + chat-sdk dispatch path.
+ *
+ * 1. Require the configured signing secret (no config → 404)
+ * 2. Verify `x-slack-signature` over the raw body
+ * 3. Handle the once-only `url_verification` challenge
+ * 4. Short-circuit `app_uninstalled` / `tokens_revoked` lifecycle events
+ * by marking the install revoked and dropping the cached bot
+ *
+ * Returns a `Response` to short-circuit the router, or `null` to continue
+ * with normal install resolution + chat-sdk dispatch.
+ */
+export const slackWebhookGate: MessengerPlatformWebhookGate = {
+ preprocess: async (req, rawBody, ctx) => {
+ const config = await getMessengerSlackConfig();
+ if (!config) {
+ return new Response('Slack messenger not configured', { status: 404 });
+ }
+
+ const ts = req.headers.get('x-slack-request-timestamp');
+ const sig = req.headers.get('x-slack-signature');
+ if (!ts || !sig) {
+ log('webhook: missing Slack signature headers');
+ return new Response('missing signature', { status: 401 });
+ }
+ const ok = verifySlackSignature({
+ rawBody,
+ signature: sig,
+ signingSecret: config.signingSecret,
+ timestamp: ts,
+ });
+ if (!ok) {
+ log('webhook: invalid Slack signature');
+ return new Response('invalid signature', { status: 401 });
+ }
+
+ const verification = handleSlackUrlVerification(rawBody);
+ if (verification) return verification;
+
+ const lifecycle = isSlackLifecycleEvent(rawBody);
+ if (lifecycle) {
+ await handleSlackLifecycleEvent(rawBody, lifecycle.eventType, ctx.invalidateBot);
+ return new Response('OK', { status: 200 });
+ }
+
+ return null;
+ },
+};
diff --git a/src/server/services/messenger/platforms/telegram/binder.test.ts b/src/server/services/messenger/platforms/telegram/binder.test.ts
new file mode 100644
index 00000000000..4ff8dedca2c
--- /dev/null
+++ b/src/server/services/messenger/platforms/telegram/binder.test.ts
@@ -0,0 +1,443 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { TelegramApi } from '@/server/services/bot/platforms/telegram/api';
+import { TelegramClientFactory } from '@/server/services/bot/platforms/telegram/client';
+
+import { issueLinkToken } from '../../linkTokenStore';
+import { MessengerTelegramBinder } from './binder';
+
+vi.mock('@/envs/app', () => ({
+ appEnv: { APP_URL: 'https://app.example.com' },
+}));
+
+vi.mock('@/config/messenger', () => ({
+ getMessengerTelegramConfig: vi.fn(),
+}));
+
+vi.mock('../../linkTokenStore', () => ({
+ issueLinkToken: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/telegram/api', () => ({
+ TelegramApi: vi.fn(),
+}));
+
+vi.mock('@/server/services/bot/platforms/telegram/client', () => ({
+ TelegramClientFactory: vi.fn(),
+}));
+
+const { getMessengerTelegramConfig } = await import('@/config/messenger');
+
+const VALID_CONFIG = {
+ botToken: 'tg-bot-token',
+ botUsername: 'lobehub_bot',
+ webhookSecret: 'tg-secret',
+};
+
+let sendMessage: ReturnType<typeof vi.fn>;
+let sendMessageWithUrlButton: ReturnType<typeof vi.fn>;
+let sendMessageWithCallbackKeyboard: ReturnType<typeof vi.fn>;
+let editMessageWithCallbackKeyboard: ReturnType<typeof vi.fn>;
+let answerCallbackQuery: ReturnType<typeof vi.fn>;
+
+beforeEach(() => {
+ sendMessage = vi.fn().mockResolvedValue({ message_id: 1 });
+ sendMessageWithUrlButton = vi.fn().mockResolvedValue({ message_id: 2 });
+ sendMessageWithCallbackKeyboard = vi.fn().mockResolvedValue({ message_id: 3 });
+ editMessageWithCallbackKeyboard = vi.fn().mockResolvedValue(undefined);
+ answerCallbackQuery = vi.fn().mockResolvedValue(undefined);
+
+ vi.mocked(TelegramApi).mockImplementation(
+ () =>
+ ({
+ answerCallbackQuery,
+ editMessageWithCallbackKeyboard,
+ sendMessage,
+ sendMessageWithCallbackKeyboard,
+ sendMessageWithUrlButton,
+ }) as any,
+ );
+
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValue(VALID_CONFIG as any);
+ vi.mocked(issueLinkToken).mockResolvedValue('rand-tg-1');
+});
+
+afterEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('MessengerTelegramBinder.createClient', () => {
+ it('returns null when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ const client = await binder.createClient();
+ expect(client).toBeNull();
+ expect(TelegramClientFactory).not.toHaveBeenCalled();
+ });
+
+ it('builds a TelegramClient with the env-backed credentials', async () => {
+ const fakeClient = { id: 'client' };
+ const createClient = vi.fn().mockReturnValue(fakeClient);
+ vi.mocked(TelegramClientFactory).mockImplementation(() => ({ createClient }) as any);
+
+ const binder = new MessengerTelegramBinder();
+ const client = await binder.createClient();
+
+ expect(client).toBe(fakeClient);
+ expect(createClient).toHaveBeenCalledWith(
+ expect.objectContaining({
+ applicationId: 'messenger-telegram',
+ credentials: { botToken: 'tg-bot-token', secretToken: 'tg-secret' },
+ platform: 'telegram',
+ }),
+ { appUrl: 'https://app.example.com' },
+ );
+ });
+
+ it('falls back to empty webhook secret when not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce({
+ botToken: 'tg',
+ } as any);
+ const createClient = vi.fn();
+ vi.mocked(TelegramClientFactory).mockImplementation(() => ({ createClient }) as any);
+
+ await new MessengerTelegramBinder().createClient();
+ expect(createClient.mock.calls[0][0].credentials.secretToken).toBe('');
+ });
+});
+
+describe('MessengerTelegramBinder.handleUnlinkedMessage', () => {
+ it('issues a link token and posts the URL-button DM with the verify-im link', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: '12345',
+ authorUserName: 'alice',
+ chatId: 'C_DM',
+ message: { id: 'm1' } as any,
+ });
+
+ expect(issueLinkToken).toHaveBeenCalledWith({
+ platform: 'telegram',
+ platformUserId: '12345',
+ platformUsername: 'alice',
+ });
+ expect(sendMessageWithUrlButton).toHaveBeenCalledTimes(1);
+ const [chatId, text, button] = sendMessageWithUrlButton.mock.calls[0];
+ expect(chatId).toBe('C_DM');
+ expect(text).toContain('Welcome to LobeHub');
+ expect(button.text).toContain('Link Account');
+ expect(button.url).toContain('https://app.example.com/verify-im');
+ expect(button.url).toContain('im_type=telegram');
+ expect(button.url).toContain('im_user_id=12345');
+ expect(button.url).toContain('random_id=rand-tg-1');
+ expect(sendMessage).not.toHaveBeenCalled();
+ });
+
+ it('falls back to a plain text message with the link inline when APP_URL is localhost', async () => {
+ const appMod = await import('@/envs/app');
+ (appMod as any).appEnv.APP_URL = 'http://localhost:3010';
+
+ try {
+ const binder = new MessengerTelegramBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: '12345',
+ chatId: 'C_DM',
+ message: { id: 'm1' } as any,
+ });
+
+ expect(sendMessageWithUrlButton).not.toHaveBeenCalled();
+ expect(sendMessage).toHaveBeenCalledTimes(1);
+ const [, text] = sendMessage.mock.calls[0];
+ expect(text).toContain('http://localhost:3010/verify-im');
+ } finally {
+ (appMod as any).appEnv.APP_URL = 'https://app.example.com';
+ }
+ });
+
+ it('apologises and bails when issueLinkToken throws (Redis down)', async () => {
+ vi.mocked(issueLinkToken).mockRejectedValueOnce(new Error('redis offline'));
+
+ const binder = new MessengerTelegramBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: '12345',
+ chatId: 'C_DM',
+ message: { id: 'm1' } as any,
+ });
+
+ expect(sendMessage).toHaveBeenCalledWith(
+ 'C_DM',
+ expect.stringContaining('temporarily unavailable'),
+ );
+ expect(sendMessageWithUrlButton).not.toHaveBeenCalled();
+ });
+
+ it('no-ops when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: '12345',
+ chatId: 'C_DM',
+ message: { id: 'm1' } as any,
+ });
+ expect(issueLinkToken).not.toHaveBeenCalled();
+ expect(sendMessage).not.toHaveBeenCalled();
+ });
+
+ it('no-ops when APP_URL is missing', async () => {
+ const appMod = await import('@/envs/app');
+ const original = (appMod as any).appEnv.APP_URL;
+ (appMod as any).appEnv.APP_URL = '';
+
+ try {
+ const binder = new MessengerTelegramBinder();
+ await binder.handleUnlinkedMessage({
+ authorUserId: '12345',
+ chatId: 'C_DM',
+ message: { id: 'm1' } as any,
+ });
+ expect(issueLinkToken).not.toHaveBeenCalled();
+ expect(sendMessage).not.toHaveBeenCalled();
+ } finally {
+ (appMod as any).appEnv.APP_URL = original;
+ }
+ });
+});
+
+describe('MessengerTelegramBinder.notifyLinkSuccess', () => {
+ it('sends a plain success message when no agent is set', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.notifyLinkSuccess({ platformUserId: '12345' });
+
+ expect(sendMessage).toHaveBeenCalledWith(
+ '12345',
+ expect.stringContaining('Linked successfully'),
+ );
+ expect(sendMessage.mock.calls[0][1]).toContain('Send /agents');
+ });
+
+ it('includes the active agent name (HTML-escaped) when provided', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.notifyLinkSuccess({
+ activeAgentName: 'A & B <coding>',
+ platformUserId: '12345',
+ });
+
+ const text = sendMessage.mock.calls[0][1];
+ expect(text).toContain('<b>A &amp; B &lt;coding&gt;</b>');
+ });
+
+ it('swallows errors when sendMessage throws', async () => {
+ sendMessage.mockRejectedValueOnce(new Error('Forbidden: bot was blocked'));
+ const binder = new MessengerTelegramBinder();
+ await expect(binder.notifyLinkSuccess({ platformUserId: '12345' })).resolves.toBeUndefined();
+ });
+
+ it('no-ops when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ await binder.notifyLinkSuccess({ platformUserId: '12345' });
+ expect(sendMessage).not.toHaveBeenCalled();
+ });
+});
+
+describe('MessengerTelegramBinder.sendDmText', () => {
+ it('HTML-escapes the text before sending', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.sendDmText('C_DM', '/agents <1>');
+ expect(sendMessage).toHaveBeenCalledWith('C_DM', '/agents &lt;1&gt;');
+ });
+
+ it('swallows errors and stays silent', async () => {
+ sendMessage.mockRejectedValueOnce(new Error('boom'));
+ const binder = new MessengerTelegramBinder();
+ await expect(binder.sendDmText('C_DM', 'hi')).resolves.toBeUndefined();
+ });
+
+ it('no-ops when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ await binder.sendDmText('C_DM', 'hi');
+ expect(sendMessage).not.toHaveBeenCalled();
+ });
+});
+
+describe('MessengerTelegramBinder.sendAgentPicker', () => {
+ it('renders entries as a callback keyboard with the messenger:switch prefix', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.sendAgentPicker('C_DM', {
+ entries: [
+ { id: 'agt_1', isActive: true, title: 'Inbox' },
+ { id: 'agt_2', isActive: false, title: 'Coding' },
+ ],
+ text: 'Pick one',
+ });
+
+ expect(sendMessageWithCallbackKeyboard).toHaveBeenCalledWith('C_DM', 'Pick one', [
+ [{ callback_data: 'messenger:switch:agt_1', text: '✅ Inbox' }],
+ [{ callback_data: 'messenger:switch:agt_2', text: 'Coding' }],
+ ]);
+ });
+
+ it('swallows errors', async () => {
+ sendMessageWithCallbackKeyboard.mockRejectedValueOnce(new Error('boom'));
+ const binder = new MessengerTelegramBinder();
+ await expect(
+ binder.sendAgentPicker('C_DM', { entries: [], text: 'x' }),
+ ).resolves.toBeUndefined();
+ });
+
+ it('no-ops when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ await binder.sendAgentPicker('C_DM', { entries: [], text: 'x' });
+ expect(sendMessageWithCallbackKeyboard).not.toHaveBeenCalled();
+ });
+});
+
+describe('MessengerTelegramBinder.extractCallbackAction', () => {
+ const buildReq = (body: unknown): Request =>
+ ({
+ json: async () => body,
+ }) as any;
+
+ it('returns null when the body is not JSON', async () => {
+ const req = {
+ json: async () => {
+ throw new Error('bad json');
+ },
+ } as any as Request;
+ const binder = new MessengerTelegramBinder();
+ expect(await binder.extractCallbackAction(req)).toBeNull();
+ });
+
+ it('returns null when the body is not a callback_query', async () => {
+ const binder = new MessengerTelegramBinder();
+ expect(await binder.extractCallbackAction(buildReq({ message: {} }))).toBeNull();
+ });
+
+ it('returns null when callback_data does not start with the messenger prefix', async () => {
+ const binder = new MessengerTelegramBinder();
+ const req = buildReq({
+ callback_query: {
+ chat_instance: 'x',
+ data: 'other:noop',
+ from: { id: 1 },
+ id: 'cb1',
+ message: { chat: { id: 100 }, message_id: 9 },
+ },
+ });
+ expect(await binder.extractCallbackAction(req)).toBeNull();
+ });
+
+ it('returns the parsed action for our own messenger callbacks', async () => {
+ const binder = new MessengerTelegramBinder();
+ const req = buildReq({
+ callback_query: {
+ data: 'messenger:switch:agt_x',
+ from: { id: 12_345 },
+ id: 'cb1',
+ message: { chat: { id: 100 }, message_id: 9 },
+ },
+ });
+ expect(await binder.extractCallbackAction(req)).toEqual({
+ callbackId: 'cb1',
+ chatId: '100',
+ data: 'messenger:switch:agt_x',
+ fromUserId: '12345',
+ messageId: 9,
+ });
+ });
+
+ it('returns null when required fields are missing', async () => {
+ const binder = new MessengerTelegramBinder();
+ const req = buildReq({
+ callback_query: {
+ data: 'messenger:switch:agt_x',
+ from: {}, // no id
+ id: 'cb1',
+ message: { chat: { id: 100 } },
+ },
+ });
+ expect(await binder.extractCallbackAction(req)).toBeNull();
+ });
+
+ it('returns null when the body is not an object', async () => {
+ const binder = new MessengerTelegramBinder();
+ expect(await binder.extractCallbackAction(buildReq('string-body'))).toBeNull();
+ });
+});
+
+describe('MessengerTelegramBinder.acknowledgeCallback', () => {
+ it('edits the picker message and answers the callback', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.acknowledgeCallback(
+ {
+ callbackId: 'cb1',
+ chatId: '100',
+ data: 'messenger:switch:agt_1',
+ fromUserId: '12345',
+ messageId: 9,
+ },
+ {
+ toast: 'Switched',
+ updatedPicker: {
+ entries: [{ id: 'agt_1', isActive: true, title: 'Inbox' }],
+ text: 'Pick',
+ },
+ },
+ );
+
+ expect(editMessageWithCallbackKeyboard).toHaveBeenCalledWith('100', 9, 'Pick', [
+ [{ callback_data: 'messenger:switch:agt_1', text: '✅ Inbox' }],
+ ]);
+ expect(answerCallbackQuery).toHaveBeenCalledWith('cb1', 'Switched');
+ });
+
+ it('skips the picker edit when messageId is missing', async () => {
+ const binder = new MessengerTelegramBinder();
+ await binder.acknowledgeCallback(
+ { callbackId: 'cb1', chatId: '100', data: 'x', fromUserId: '12345' },
+ { toast: 'ok', updatedPicker: { entries: [], text: 't' } },
+ );
+ expect(editMessageWithCallbackKeyboard).not.toHaveBeenCalled();
+ expect(answerCallbackQuery).toHaveBeenCalled();
+ });
+
+ it('keeps going when the picker edit throws', async () => {
+ editMessageWithCallbackKeyboard.mockRejectedValueOnce(new Error('boom'));
+ const binder = new MessengerTelegramBinder();
+ await binder.acknowledgeCallback(
+ {
+ callbackId: 'cb1',
+ chatId: '100',
+ data: 'x',
+ fromUserId: '12345',
+ messageId: 9,
+ },
+ { toast: 'ok', updatedPicker: { entries: [], text: 't' } },
+ );
+ expect(answerCallbackQuery).toHaveBeenCalled();
+ });
+
+ it('swallows answerCallbackQuery errors', async () => {
+ answerCallbackQuery.mockRejectedValueOnce(new Error('expired'));
+ const binder = new MessengerTelegramBinder();
+ await expect(
+ binder.acknowledgeCallback(
+ { callbackId: 'cb1', chatId: '100', data: 'x', fromUserId: '12345' },
+ {},
+ ),
+ ).resolves.toBeUndefined();
+ });
+
+ it('no-ops when telegram is not configured', async () => {
+ vi.mocked(getMessengerTelegramConfig).mockResolvedValueOnce(null);
+ const binder = new MessengerTelegramBinder();
+ await binder.acknowledgeCallback(
+ { callbackId: 'cb1', chatId: '100', data: 'x', fromUserId: '12345' },
+ {},
+ );
+ expect(answerCallbackQuery).not.toHaveBeenCalled();
+ });
+});
diff --git a/src/server/services/messenger/platforms/telegram/binder.ts b/src/server/services/messenger/platforms/telegram/binder.ts
new file mode 100644
index 00000000000..0a154b9b6df
--- /dev/null
+++ b/src/server/services/messenger/platforms/telegram/binder.ts
@@ -0,0 +1,261 @@
+import debug from 'debug';
+
+import { getMessengerTelegramConfig } from '@/config/messenger';
+import { appEnv } from '@/envs/app';
+import type { PlatformClient } from '@/server/services/bot/platforms';
+import { TelegramApi } from '@/server/services/bot/platforms/telegram/api';
+import { TelegramClientFactory } from '@/server/services/bot/platforms/telegram/client';
+
+import { issueLinkToken } from '../../linkTokenStore';
+import type {
+ AgentPickerEntry,
+ CallbackAcknowledgement,
+ InboundCallbackAction,
+ MessengerPlatformBinder,
+ UnlinkedMessageContext,
+} from '../../types';
+
+/**
+ * Application prefix on Telegram callback_data so we can distinguish OUR
+ * buttons from anything else the user (or another bot in the same chat)
+ * might inject. Format: `messenger:<verb>:<arg>`.
+ */
+const CALLBACK_PREFIX = 'messenger:';
+
+const buildSwitchKeyboard = (
+ entries: AgentPickerEntry[],
+): Array<Array<{ callback_data: string; text: string }>> =>
+ entries.map((entry) => [
+ {
+ callback_data: `${CALLBACK_PREFIX}switch:${entry.id}`,
+ text: entry.isActive ? `✅ ${entry.title}` : entry.title,
+ },
+ ]);
+
+const log = debug('lobe-server:messenger:telegram');
+
+const buildVerifyImUrl = (params: {
+ appUrl: string;
+ platformUserId: string;
+ randomId: string;
+}): string => {
+ const url = new URL('/verify-im', params.appUrl);
+ url.searchParams.set('im_type', 'telegram');
+ url.searchParams.set('im_user_id', params.platformUserId);
+ url.searchParams.set('random_id', params.randomId);
+ url.searchParams.set('utm_source', 'messenger_tg');
+ return url.toString();
+};
+
+// Telegram rejects inline-keyboard URL buttons whose host is not publicly
+// resolvable (e.g. `localhost`, `127.0.0.1`) with `Bad Request: Wrong HTTP URL`.
+// In local dev we fall back to a plain text message so the flow is still
+// testable without a public tunnel.
+const isLocalhostUrl = (raw: string): boolean => {
+ try {
+ const { hostname } = new URL(raw);
+ return (
+ hostname === 'localhost' ||
+ hostname === '127.0.0.1' ||
+ hostname === '0.0.0.0' ||
+ hostname === '::1'
+ );
+ } catch {
+ return false;
+ }
+};
+
+const escapeHtml = (s: string): string =>
+ s.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');
+
+export class MessengerTelegramBinder implements MessengerPlatformBinder {
+ async createClient(): Promise<PlatformClient | null> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return null;
+
+ return new TelegramClientFactory().createClient(
+ {
+ applicationId: 'messenger-telegram',
+ credentials: {
+ botToken: config.botToken,
+ secretToken: config.webhookSecret ?? '',
+ },
+ platform: 'telegram',
+ settings: {},
+ },
+ { appUrl: appEnv.APP_URL },
+ );
+ }
+
+ async handleUnlinkedMessage(ctx: UnlinkedMessageContext): Promise<void> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return;
+
+ // The verify-im button takes the user back into LobeHub for the auth /
+ // session-bound binding flow, so it must use APP_URL — same as every other
+ // app-side redirect — not the webhook tunnel URL. (Tunnel URLs are only
+ // used for inbound platform → server webhooks.)
+ const appUrl = appEnv.APP_URL;
+ if (!appUrl) {
+ log('handleUnlinkedMessage: APP_URL not set, cannot build verify-im link');
+ return;
+ }
+
+ let randomId: string;
+ try {
+ randomId = await issueLinkToken({
+ platform: 'telegram',
+ platformUserId: ctx.authorUserId,
+ platformUsername: ctx.authorUserName,
+ });
+ } catch (error) {
+ log('handleUnlinkedMessage: failed to issue link token: %O', error);
+ const api = new TelegramApi(config.botToken);
+ await api.sendMessage(
+ ctx.chatId,
+ 'LobeHub is temporarily unavailable. Please try again in a moment.',
+ );
+ return;
+ }
+
+ const verifyUrl = buildVerifyImUrl({
+ appUrl,
+ platformUserId: ctx.authorUserId,
+ randomId,
+ });
+
+ const api = new TelegramApi(config.botToken);
+
+ if (isLocalhostUrl(verifyUrl)) {
+ log('handleUnlinkedMessage: APP_URL is localhost, falling back to plain text link');
+ const text = `Welcome to LobeHub! 🤖\n\nTo continue, link your Telegram account to LobeHub. The link expires in 30 minutes:\n\n${verifyUrl}\n\nAfter linking, send /agents anytime to list your agents and tap one to switch the active agent.`;
+ await api.sendMessage(ctx.chatId, text);
+ return;
+ }
+
+ const text =
+ 'Welcome to LobeHub! 🤖\n\nTo continue, link your Telegram account to LobeHub.\n\nTap the button below — the link expires in 30 minutes.\n\nAfter linking, send /agents anytime to list your agents and tap one to switch the active agent.';
+
+ await api.sendMessageWithUrlButton(ctx.chatId, text, {
+ text: '🔗 Link Account',
+ url: verifyUrl,
+ });
+ }
+
+ async notifyLinkSuccess(params: {
+ activeAgentName?: string;
+ platformUserId: string;
+ /** Ignored — Telegram is a global-token bot, no tenant scoping needed. */
+ tenantId?: string;
+ }): Promise<void> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return;
+
+ const api = new TelegramApi(config.botToken);
+ const headline = '✅ Linked successfully! Your LobeHub account is now connected.';
+ const tail = params.activeAgentName
+ ? `\n\nActive agent: <b>${escapeHtml(params.activeAgentName)}</b>\n\nGo ahead and send your first message — send /agents any time to switch the active agent.`
+ : '\n\nSend /agents to list your agents and tap one to set it as active.';
+
+ try {
+ await api.sendMessage(params.platformUserId, `${headline}${tail}`);
+ } catch (error) {
+ log('notifyLinkSuccess: failed to send message to %s: %O', params.platformUserId, error);
+ }
+ }
+
+ async sendDmText(chatId: string, text: string): Promise<void> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return;
+ try {
+ // TelegramApi.sendMessage uses parse_mode='HTML' under the hood.
+ // sendDmText is for plain text replies (command help, agent lists, etc.)
+ // so we escape `< > &` to prevent literal characters like "/agents <n>"
+ // from being interpreted as HTML tags.
+ await new TelegramApi(config.botToken).sendMessage(chatId, escapeHtml(text));
+ } catch (error) {
+ log('sendDmText: failed to send to chat=%s: %O', chatId, error);
+ }
+ }
+
+ async sendAgentPicker(
+ chatId: string,
+ params: { entries: AgentPickerEntry[]; text: string },
+ ): Promise<void> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return;
+ try {
+ const api = new TelegramApi(config.botToken);
+ await api.sendMessageWithCallbackKeyboard(
+ chatId,
+ escapeHtml(params.text),
+ buildSwitchKeyboard(params.entries),
+ );
+ } catch (error) {
+ log('sendAgentPicker: failed for chat=%s: %O', chatId, error);
+ }
+ }
+
+ /**
+ * Pull our `messenger:switch:<agentId>` action out of a Telegram webhook
+ * update. Returns null when the update is anything else (regular message,
+ * other bot's callback, malformed data) so the router can hand off to
+ * chat-sdk for normal processing.
+ */
+ async extractCallbackAction(req: Request): Promise<InboundCallbackAction | null> {
+ let rawBody: unknown;
+ try {
+ rawBody = await req.json();
+ } catch {
+ return null;
+ }
+ if (!rawBody || typeof rawBody !== 'object') return null;
+ const cb = (rawBody as any).callback_query;
+ if (!cb) return null;
+
+ const data = String(cb.data ?? '');
+ if (!data.startsWith(CALLBACK_PREFIX)) return null;
+
+ const fromUserId = cb.from?.id != null ? String(cb.from.id) : '';
+ const chatId = cb.message?.chat?.id != null ? String(cb.message.chat.id) : '';
+ const messageId = cb.message?.message_id;
+ const callbackId = String(cb.id ?? '');
+ if (!fromUserId || !chatId || !callbackId) return null;
+
+ return { callbackId, chatId, data, fromUserId, messageId };
+ }
+
+ async acknowledgeCallback(
+ action: InboundCallbackAction,
+ ack: CallbackAcknowledgement,
+ ): Promise<void> {
+ const config = await getMessengerTelegramConfig();
+ if (!config) return;
+ const api = new TelegramApi(config.botToken);
+
+ // Re-render the picker first so the user sees the new active marker
+ // before the toast fires (and even if the toast fails).
+ if (ack.updatedPicker && action.messageId !== undefined) {
+ const messageId =
+ typeof action.messageId === 'string' ? Number(action.messageId) : action.messageId;
+ if (Number.isFinite(messageId)) {
+ try {
+ await api.editMessageWithCallbackKeyboard(
+ action.chatId,
+ messageId as number,
+ escapeHtml(ack.updatedPicker.text),
+ buildSwitchKeyboard(ack.updatedPicker.entries),
+ );
+ } catch (error) {
+ log('acknowledgeCallback: edit picker failed: %O', error);
+ }
+ }
+ }
+
+ try {
+ await api.answerCallbackQuery(action.callbackId, ack.toast);
+ } catch (error) {
+ log('acknowledgeCallback: answerCallbackQuery failed: %O', error);
+ }
+ }
+}
diff --git a/src/server/services/messenger/platforms/telegram/definition.ts b/src/server/services/messenger/platforms/telegram/definition.ts
new file mode 100644
index 00000000000..0d9bee01cd0
--- /dev/null
+++ b/src/server/services/messenger/platforms/telegram/definition.ts
@@ -0,0 +1,8 @@
+import type { MessengerPlatformDefinition } from '../types';
+import { MessengerTelegramBinder } from './binder';
+
+export const telegram: MessengerPlatformDefinition = {
+ createBinder: () => new MessengerTelegramBinder(),
+ id: 'telegram',
+ name: 'Telegram',
+};
diff --git a/src/server/services/messenger/platforms/telegram/index.ts b/src/server/services/messenger/platforms/telegram/index.ts
new file mode 100644
index 00000000000..497c9d717de
--- /dev/null
+++ b/src/server/services/messenger/platforms/telegram/index.ts
@@ -0,0 +1,2 @@
+export { MessengerTelegramBinder } from './binder';
+export { telegram } from './definition';
diff --git a/src/server/services/messenger/platforms/types.ts b/src/server/services/messenger/platforms/types.ts
new file mode 100644
index 00000000000..c4a71f38caf
--- /dev/null
+++ b/src/server/services/messenger/platforms/types.ts
@@ -0,0 +1,143 @@
+import type { MessengerPlatform } from '@/config/messenger';
+
+import type { InstallationCredentials } from '../installations/types';
+import type { MessengerPlatformBinder } from '../types';
+
+/** Cross-cutting services the router exposes to platform webhook gates. */
+export interface MessengerWebhookContext {
+ /**
+ * Drop a cached Chat SDK bot for the given installationKey. Slack uses
+ * this on `app_uninstalled` / `tokens_revoked` so a re-install picks up
+ * the fresh token instead of reusing the dead one.
+ */
+ invalidateBot: (installationKey: string) => void;
+}
+
+/**
+ * Platform-specific webhook preprocessing — signature verification, setup
+ * challenges, lifecycle events. Implementations short-circuit by returning a
+ * `Response`; returning `null` lets the router fall through to the shared
+ * install-resolution + chat-sdk dispatch path.
+ *
+ * Telegram and Discord don't need any of this today (Telegram verifies via
+ * webhook secret at the `chat-adapter-telegram` layer, Discord verifies via
+ * Ed25519 inside `chat-adapter-discord`), so they don't expose a gate.
+ */
+export interface MessengerPlatformWebhookGate {
+ preprocess: (
+ req: Request,
+ rawBody: string,
+ ctx: MessengerWebhookContext,
+ ) => Promise<Response | null>;
+}
+
+/**
+ * Normalized result of an OAuth code exchange. Each platform's `exchangeCode`
+ * flattens its native response shape into this so the dynamic route layer
+ * can persist to `messenger_installations` without knowing about
+ * `team`/`enterprise` (Slack), `guild` (Discord), etc.
+ */
+export interface NormalizedInstallation {
+ /** Platform-side bot user id (Slack `bot_user_id`); null for platforms that don't expose one. */
+ accountId: string | null;
+ /** App-level identifier (Slack `app_id`, Discord application id). */
+ applicationId: string;
+ /** Plaintext credentials JSON — encrypted by `MessengerInstallationModel.upsert`. */
+ credentials: Record<string, unknown>;
+ /** Platform user id of whoever ran the install (Slack `authed_user.id`, Discord OAuth user). */
+ installedByPlatformUserId: string | null;
+ /** Free-form metadata persisted alongside the row (scope, tenant name, …). */
+ metadata: Record<string, unknown>;
+ /** Tenant identifier — Slack `team.id`/`enterprise.id`, Discord `guild.id`. */
+ tenantId: string;
+ /** Display label for the tenant — surfaced in error redirects (e.g. already_installed dialog). */
+ tenantName?: string;
+ /** Rotating-token expiry. `null` means the access token does not rotate. */
+ tokenExpiresAt: Date | null;
+}
+
+export interface OAuthBuildAuthorizeUrlParams {
+ clientId: string;
+ redirectUri: string;
+ state: string;
+}
+
+export interface OAuthExchangeCodeParams {
+ clientId: string;
+ clientSecret: string;
+ code: string;
+ redirectUri: string;
+}
+
+/**
+ * Per-platform OAuth install hooks consumed by the `[platform]/install` and
+ * `[platform]/oauth/callback` dynamic routes. Slack today; Discord next.
+ *
+ * The route layer owns shared concerns (session, state, encryption, takeover
+ * guard, persistence). Each adapter only owns the platform-specific shape:
+ * authorize URL, token exchange + normalization, and (optionally) the success
+ * redirect when the platform has a "open in app" deep link.
+ */
+export interface MessengerPlatformOAuthAdapter {
+ /**
+ * Build the platform's authorize URL. Caller has already validated config
+ * and minted state — this is a pure URL builder.
+ */
+ buildAuthorizeUrl: (params: OAuthBuildAuthorizeUrlParams) => string;
+ /**
+ * Final redirect after a successful install. Returning `null` falls back to
+ * the route's default `/settings/messenger?<platform>_installed=ok`.
+ * Slack uses this to deep-link `slack.com/app/open?team=...&id=...`.
+ */
+ buildPostInstallRedirect?: (install: NormalizedInstallation, origin: string) => URL | null;
+ /**
+ * Exchange the OAuth `code` for credentials and normalize into our schema.
+ * Throws on upstream / validation failure — the route maps that to
+ * `?<platform>_error=exchange_failed`.
+ */
+ exchangeCode: (params: OAuthExchangeCodeParams) => Promise<NormalizedInstallation>;
+ /**
+ * Resolve the per-deployment App config (clientId / clientSecret). Returns
+ * null when the platform isn't configured in dc-center, which the route
+ * surfaces as a 503.
+ */
+ getAppConfig: () => Promise<{ clientId: string; clientSecret: string } | null>;
+}
+
+/**
+ * Per-platform definition consumed by `MessengerRouter`. Mirrors the shape of
+ * `bot/platforms/<name>/definition.ts` so adding a new messenger platform is
+ * a one-file change rather than a router-wide refactor.
+ */
+export interface MessengerPlatformDefinition {
+ /**
+ * Build the per-platform binder used for outbound replies and link
+ * notifications. Per-tenant platforms (Slack today) accept the resolved
+ * credentials; global-bot platforms (Telegram, Discord) ignore them.
+ */
+ createBinder: (creds?: InstallationCredentials) => MessengerPlatformBinder;
+ id: MessengerPlatform;
+ /**
+ * Brand-name label shown in UI. Hard-coded per platform — these are
+ * trademarks, not user-facing copy, so they are NOT translated. Surfaced
+ * to the client through the `availablePlatforms` TRPC return.
+ */
+ name: string;
+ /**
+ * Per-tenant OAuth install flow. Present on platforms whose bot token is
+ * minted at install time (Slack workspace install, Discord guild install).
+ * Absent for global-bot platforms (Telegram).
+ */
+ oauth?: MessengerPlatformOAuthAdapter;
+ webhookGate?: MessengerPlatformWebhookGate;
+}
+
+/**
+ * Serialized definition for client consumption — strips the runtime-only
+ * `createBinder` factory and the webhook gate (which carries closures and
+ * Node-only deps). Mirrors `bot/platforms` `SerializedPlatformDefinition`.
+ */
+export type SerializedMessengerPlatformDefinition = Omit<
+ MessengerPlatformDefinition,
+ 'createBinder' | 'oauth' | 'webhookGate'
+>;
diff --git a/src/server/services/messenger/types.ts b/src/server/services/messenger/types.ts
new file mode 100644
index 00000000000..a20f003081f
--- /dev/null
+++ b/src/server/services/messenger/types.ts
@@ -0,0 +1,141 @@
+import type { ActionEvent, Message, SlashCommandEvent } from 'chat';
+
+import type { PlatformClient } from '@/server/services/bot/platforms';
+
+export interface UnlinkedMessageContext {
+ authorUserId: string;
+ authorUserName?: string;
+ chatId: string;
+ /** Original inbound chat-sdk message. Absent on slash-command paths
+ * (Slack `/start`) where there is no underlying Message instance. */
+ message?: Message;
+}
+
+export interface AgentPickerEntry {
+ id: string;
+ isActive: boolean;
+ title: string;
+}
+
+/** Raw inbound platform update used for actions chat-sdk doesn't surface. */
+export interface InboundCallbackAction {
+ /** Platform-specific raw id needed to acknowledge the action. */
+ callbackId: string;
+ /** Conversation id to send replies / edits to. */
+ chatId: string;
+ /** Application-defined key — e.g. `switch:agt_xxxx`. */
+ data: string;
+ /** ID of the user who tapped the button. */
+ fromUserId: string;
+ /** Platform message id of the picker (so the picker can be re-rendered). */
+ messageId?: string | number;
+}
+
+/** Result the router asks the binder to deliver after handling a callback. */
+export interface CallbackAcknowledgement {
+ /** Optional toast text shown above the user's keyboard. */
+ toast?: string;
+ /** When set, edit the picker message in place to reflect the new state. */
+ updatedPicker?: { entries: AgentPickerEntry[]; text: string };
+}
+
+/**
+ * Per-platform glue for the shared messenger bot. Wires env credentials into a
+ * `PlatformClient` (so the existing AgentBridgeService can drive it) plus
+ * thin platform-specific reply helpers used by the link / switch flows.
+ *
+ * The router composes plain text and asks the binder to deliver it; HTML
+ * escaping, parse modes, button rendering live behind the binder so the
+ * router stays platform-agnostic.
+ */
+export interface MessengerPlatformBinder {
+ /**
+ * Acknowledge a callback action: dismiss the loading spinner, optionally
+ * show a toast, and optionally re-render the picker keyboard.
+ */
+ acknowledgeCallback?: (
+ action: InboundCallbackAction,
+ ack: CallbackAcknowledgement,
+ ) => Promise<void>;
+
+ /** Construct the underlying platform client. Returns null if config is missing.
+ * Async because the credential lookup (`SystemBotProviderModel`) hits the DB. */
+ createClient: () => Promise<PlatformClient | null>;
+
+ /**
+ * Map a chat-sdk `onAction` event to an `InboundCallbackAction`. Used by
+ * platforms that deliver tap actions through chat-sdk rather than as a
+ * peek of the raw webhook body — Discord today (chat-adapter-discord acks
+ * the interaction with `DeferredUpdateMessage` before calling the
+ * router). Returns null when the event isn't one of our buttons. Slack /
+ * Telegram leave this unset because they handle actions at webhook time
+ * via `extractCallbackAction` instead.
+ */
+ extractActionFromEvent?: (
+ event: ActionEvent,
+ client: PlatformClient,
+ ) => InboundCallbackAction | null;
+
+ /**
+ * Try to extract a tap-action from a raw webhook request. Returns null when
+ * the update is a regular message (in which case the caller hands it off to
+ * chat-sdk). Platforms without tap callbacks return null unconditionally.
+ *
+ * The implementation owns body parsing because platforms disagree on the
+ * wire format — Telegram posts JSON, Slack posts `application/x-www-form-
+ * urlencoded` with a `payload` field. The router clones the request before
+ * calling so consumers downstream can still read the body.
+ */
+ extractCallbackAction?: (req: Request) => Promise<InboundCallbackAction | null>;
+
+ /** Called when an inbound message arrives from a sender that hasn't bound any account yet. */
+ handleUnlinkedMessage: (ctx: UnlinkedMessageContext) => Promise<void>;
+
+ /**
+ * Best-effort confirmation back to the IM thread once verify-im writes the
+ * link row. `activeAgentName` is included when the verify-im flow set an
+ * initial active agent so the user knows where their next message is going.
+ * `tenantId` is required for per-tenant platforms (Slack workspace) — the
+ * binder uses it to resolve which install's bot token to send with.
+ */
+ notifyLinkSuccess: (params: {
+ activeAgentName?: string;
+ platformUserId: string;
+ tenantId?: string;
+ }) => Promise<void>;
+
+ /**
+ * Send a private response back to the invoker of a chat-sdk interaction
+ * (slash command today; modal submit / action follow-up tomorrow). The
+ * binder picks the most-private channel the platform offers — Slack uses
+ * `chat.postEphemeral` (slash menu can fire from a public channel and we
+ * don't want to leak system text); Discord posts via the channel object
+ * (DMs are private by definition, public channels stay public until
+ * chat-adapter-discord exposes the interaction ephemeral flag).
+ *
+ * Defining this also opts the platform into native slash command wiring
+ * — the router registers every name from its shared command registry so
+ * the slash menu stays symmetric across platforms. Telegram leaves this
+ * unset because `/cmd` arrives as plain message text and is dispatched
+ * by `parseCommand` instead.
+ */
+ replyPrivately?: (
+ channel: SlashCommandEvent['channel'],
+ user: SlashCommandEvent['user'],
+ text: string,
+ ) => Promise<void>;
+
+ /**
+ * Send an interactive agent picker so the user can switch the active agent
+ * without typing a number. Optional — platforms that don't support
+ * tap-to-select keyboards (e.g. plain Slack DMs) can leave this unset and
+ * the router will fall back to the text-based `/agents <n>` flow.
+ */
+ sendAgentPicker?: (
+ chatId: string,
+ params: { entries: AgentPickerEntry[]; text: string },
+ ) => Promise<void>;
+
+ /** Plain DM reply (used by /agents and various command help texts). */
+ sendDmText: (chatId: string, text: string) => Promise<void>;
+}
diff --git a/src/services/messenger.test.ts b/src/services/messenger.test.ts
new file mode 100644
index 00000000000..c4b18018ff6
--- /dev/null
+++ b/src/services/messenger.test.ts
@@ -0,0 +1,121 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { lambdaClient } from '@/libs/trpc/client';
+
+import { messengerService } from './messenger';
+
+vi.mock('@/libs/trpc/client', () => ({
+ lambdaClient: {
+ messenger: {
+ availablePlatforms: { query: vi.fn() },
+ confirmLink: { mutate: vi.fn() },
+ getMyLink: { query: vi.fn() },
+ listAgentsForBinding: { query: vi.fn() },
+ listMyInstallations: { query: vi.fn() },
+ listMyLinks: { query: vi.fn() },
+ peekLinkToken: { query: vi.fn() },
+ setActiveAgent: { mutate: vi.fn() },
+ uninstallInstallation: { mutate: vi.fn() },
+ unlink: { mutate: vi.fn() },
+ },
+ },
+}));
+
+const messenger = (lambdaClient as any).messenger;
+
+beforeEach(() => {
+ vi.clearAllMocks();
+});
+
+describe('messengerService', () => {
+ it('availablePlatforms delegates to lambdaClient query', async () => {
+ messenger.availablePlatforms.query.mockResolvedValueOnce([{ id: 'slack' }]);
+ const result = await messengerService.availablePlatforms();
+ expect(result).toEqual([{ id: 'slack' }]);
+ expect(messenger.availablePlatforms.query).toHaveBeenCalledTimes(1);
+ });
+
+ it('peekLinkToken passes through the random id', async () => {
+ messenger.peekLinkToken.query.mockResolvedValueOnce({ platform: 'slack' });
+ await messengerService.peekLinkToken('rand-1');
+ expect(messenger.peekLinkToken.query).toHaveBeenCalledWith({ randomId: 'rand-1' });
+ });
+
+ it('listAgentsForBinding delegates to query', async () => {
+ messenger.listAgentsForBinding.query.mockResolvedValueOnce([]);
+ await messengerService.listAgentsForBinding();
+ expect(messenger.listAgentsForBinding.query).toHaveBeenCalledTimes(1);
+ });
+
+ it('confirmLink forwards mutate params verbatim', async () => {
+ messenger.confirmLink.mutate.mockResolvedValueOnce({ ok: true });
+ await messengerService.confirmLink({ initialAgentId: 'agt_1', randomId: 'rand-1' });
+ expect(messenger.confirmLink.mutate).toHaveBeenCalledWith({
+ initialAgentId: 'agt_1',
+ randomId: 'rand-1',
+ });
+ });
+
+ it('getMyLink forwards platform + tenantId', async () => {
+ await messengerService.getMyLink('slack', 'T_ACME');
+ expect(messenger.getMyLink.query).toHaveBeenCalledWith({
+ platform: 'slack',
+ tenantId: 'T_ACME',
+ });
+ });
+
+ it('getMyLink works without a tenantId (global-bot platforms)', async () => {
+ await messengerService.getMyLink('telegram');
+ expect(messenger.getMyLink.query).toHaveBeenCalledWith({
+ platform: 'telegram',
+ tenantId: undefined,
+ });
+ });
+
+ it('listMyLinks delegates to query', async () => {
+ await messengerService.listMyLinks();
+ expect(messenger.listMyLinks.query).toHaveBeenCalledTimes(1);
+ });
+
+ it('setActiveAgent forwards mutate params', async () => {
+ await messengerService.setActiveAgent({
+ agentId: 'agt_2',
+ platform: 'slack',
+ tenantId: 'T_ACME',
+ });
+ expect(messenger.setActiveAgent.mutate).toHaveBeenCalledWith({
+ agentId: 'agt_2',
+ platform: 'slack',
+ tenantId: 'T_ACME',
+ });
+ });
+
+ it('setActiveAgent supports clearing the active agent (agentId=null)', async () => {
+ await messengerService.setActiveAgent({ agentId: null, platform: 'discord' });
+ expect(messenger.setActiveAgent.mutate).toHaveBeenCalledWith({
+ agentId: null,
+ platform: 'discord',
+ tenantId: undefined,
+ });
+ });
+
+ it('unlink forwards mutate params', async () => {
+ await messengerService.unlink({ platform: 'slack', tenantId: 'T_ACME' });
+ expect(messenger.unlink.mutate).toHaveBeenCalledWith({
+ platform: 'slack',
+ tenantId: 'T_ACME',
+ });
+ });
+
+ it('listMyInstallations delegates to query', async () => {
+ await messengerService.listMyInstallations();
+ expect(messenger.listMyInstallations.query).toHaveBeenCalledTimes(1);
+ });
+
+ it('uninstallInstallation forwards installationId', async () => {
+ await messengerService.uninstallInstallation({ installationId: 'inst_1' });
+ expect(messenger.uninstallInstallation.mutate).toHaveBeenCalledWith({
+ installationId: 'inst_1',
+ });
+ });
+});
diff --git a/src/services/messenger.ts b/src/services/messenger.ts
new file mode 100644
index 00000000000..991ab33ba4d
--- /dev/null
+++ b/src/services/messenger.ts
@@ -0,0 +1,51 @@
+import { lambdaClient } from '@/libs/trpc/client';
+
+type MessengerPlatform = 'telegram' | 'slack' | 'discord';
+
+class MessengerService {
+ availablePlatforms = async () => {
+ return lambdaClient.messenger.availablePlatforms.query();
+ };
+
+ peekLinkToken = async (randomId: string) => {
+ return lambdaClient.messenger.peekLinkToken.query({ randomId });
+ };
+
+ listAgentsForBinding = async () => {
+ return lambdaClient.messenger.listAgentsForBinding.query();
+ };
+
+ confirmLink = async (params: { initialAgentId: string; randomId: string }) => {
+ return lambdaClient.messenger.confirmLink.mutate(params);
+ };
+
+ getMyLink = async (platform: MessengerPlatform, tenantId?: string) => {
+ return lambdaClient.messenger.getMyLink.query({ platform, tenantId });
+ };
+
+ listMyLinks = async () => {
+ return lambdaClient.messenger.listMyLinks.query();
+ };
+
+ setActiveAgent = async (params: {
+ agentId: string | null;
+ platform: MessengerPlatform;
+ tenantId?: string;
+ }) => {
+ return lambdaClient.messenger.setActiveAgent.mutate(params);
+ };
+
+ unlink = async (params: { platform: MessengerPlatform; tenantId?: string }) => {
+ return lambdaClient.messenger.unlink.mutate(params);
+ };
+
+ listMyInstallations = async () => {
+ return lambdaClient.messenger.listMyInstallations.query();
+ };
+
+ uninstallInstallation = async (params: { installationId: string }) => {
+ return lambdaClient.messenger.uninstallInstallation.mutate(params);
+ };
+}
+
+export const messengerService = new MessengerService();
diff --git a/src/spa/router/desktopRouter.config.desktop.tsx b/src/spa/router/desktopRouter.config.desktop.tsx
index 641cba6fea8..1d6cbc7fcc6 100644
--- a/src/spa/router/desktopRouter.config.desktop.tsx
+++ b/src/spa/router/desktopRouter.config.desktop.tsx
@@ -339,6 +339,12 @@ export const desktopRoutes: RouteObject[] = [
element: <SettingsTabPage />,
path: ':tab',
},
+ // Tabs that need a sub-segment (e.g. /settings/messenger/discord) reuse
+ // the same tab page; nested feature components read `:sub` via useParams.
+ {
+ element: <SettingsTabPage />,
+ path: ':tab/:sub',
+ },
],
element: <SettingsLayout />,
errorElement: <ErrorBoundary />,
diff --git a/src/spa/router/desktopRouter.config.tsx b/src/spa/router/desktopRouter.config.tsx
index 9f7db8d4a14..af10b9ef8e0 100644
--- a/src/spa/router/desktopRouter.config.tsx
+++ b/src/spa/router/desktopRouter.config.tsx
@@ -384,6 +384,15 @@ export const desktopRoutes: RouteObject[] = [
),
path: ':tab',
},
+ // Tabs that need a sub-segment (e.g. /settings/messenger/discord) reuse
+ // the same tab page; nested feature components read `:sub` via useParams.
+ {
+ element: dynamicElement(
+ () => import('@/routes/(main)/settings'),
+ 'Desktop > Settings > Tab > Sub',
+ ),
+ path: ':tab/:sub',
+ },
],
element: dynamicElement(
() => import('@/routes/(main)/settings/_layout'),
diff --git a/src/store/global/initialState.ts b/src/store/global/initialState.ts
index 0dbcf634b4c..18a09cbbd47 100644
--- a/src/store/global/initialState.ts
+++ b/src/store/global/initialState.ts
@@ -57,6 +57,7 @@ export enum SettingsTabs {
Image = 'image',
LLM = 'llm',
Memory = 'memory',
+ Messenger = 'messenger',
Notification = 'notification',
// business
Plans = 'plans',
diff --git a/src/store/user/slices/preference/selectors/labPrefer.ts b/src/store/user/slices/preference/selectors/labPrefer.ts
index c0870a1420b..1372e425f7e 100644
--- a/src/store/user/slices/preference/selectors/labPrefer.ts
+++ b/src/store/user/slices/preference/selectors/labPrefer.ts
@@ -8,4 +8,5 @@ export const labPreferSelectors = {
enableGatewayMode: (s: UserState): boolean => s.preference.lab?.enableGatewayMode ?? false,
enableInputMarkdown: (s: UserState): boolean =>
s.preference.lab?.enableInputMarkdown ?? DEFAULT_PREFERENCE.lab!.enableInputMarkdown!,
+ enableMessenger: (s: UserState): boolean => s.preference.lab?.enableMessenger ?? false,
};