🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix: resource permission controls, chat-input hints & wechat push (#17468)
Rdmclin2925ef8365c07
diff --git a/.agents/acceptance/probe-mock-patterns.md b/.agents/acceptance/probe-mock-patterns.mdindex 4a5d1b07590..f3bdfd9821f 100644--- a/.agents/acceptance/probe-mock-patterns.md+++ b/.agents/acceptance/probe-mock-patterns.md@@ -1291,3 +1291,18 @@ active: true, remoteServerUrl: 'http://localhost:<port>', storageMode: 'selfHost- **Works**: launch the long-lived dev server with sandboxing disabled for that one command(e.g. the harness's dangerously-disable-sandbox flag). Measured: the same command that diedat \~1–2 min three times survived 60s+ probes and the whole run once unsandboxed.++## Turbopack constant-folds null guards after `await fn()` when fn's tail return is a bare promise++- **Situation** (LOBE-12192 run): a service helper ended with `return otherAsyncFn(...)`+ (bare promise). Its caller did `const w = await helper(); if (!w) return ...` — the dev+ server 500'd with `Cannot read properties of null` because Turbopack's value analysis+ treats the bare-promise tail return as always-truthy, marks the `if (!w)` branch+ `TURBOPACK compile-time falsy`, and emits it as unreachable. Vitest/node run the same+ code correctly, so unit tests stay green while every Next route breaks.+- **Doesn't work**: renaming variables, restarting dev, clearing `.next` — the fold is+ deterministic from the source shape.+- **Works**: change the helper's tail return to `return await otherAsyncFn(...)` so the+ null return path is visible to the analyzer, then restart the dev server (HMR alone+ did not drop the folded chunk). Verify by grepping the compiled chunk under+ `.next/dev/server/chunks/` for `TURBOPACK compile-time falsy`.diff --git a/apps/server/src/routers/lambda/__tests__/agent.test.ts b/apps/server/src/routers/lambda/__tests__/agent.test.tsindex ab033fff29e..6ea240fe044 100644--- a/apps/server/src/routers/lambda/__tests__/agent.test.ts+++ b/apps/server/src/routers/lambda/__tests__/agent.test.ts@@ -118,6 +118,7 @@ describe('agentRouter', () => {createAgentKnowledgeBase: vi.fn(),deleteAgentFile: vi.fn(),deleteAgentKnowledgeBase: vi.fn(),+ duplicate: vi.fn(),findBySessionId: vi.fn(),getAgentAssignedKnowledge: vi.fn(),getAgentVisibility: vi.fn().mockResolvedValue(null),@@ -237,6 +238,9 @@ describe('agentRouter', () => {expect(result).toEqual({avatar: 'avatar.png',id: 'agent-1',+ // The model identity is part of the safe profile surface: use-only+ // members see (and under `member` policy, switch) the model in chat.+ model: 'private-model',openingMessage: 'Hello',title: 'Public title',userId: 'creator-1',@@ -245,7 +249,6 @@ describe('agentRouter', () => {});expect(result).not.toHaveProperty('systemRole');expect(result).not.toHaveProperty('plugins');- expect(result).not.toHaveProperty('model');});it('returns the full config to a member who can edit', async () => {@@ -465,6 +468,25 @@ describe('agentRouter', () => {});});+ describe('duplicateAgent', () => {+ it('allows a Workspace member to duplicate a public Agent without edit access', async () => {+ agentModelMock.duplicate.mockResolvedValue({ agentId: 'copied-agent' });++ const caller = agentRouter.createCaller({ ...mockCtx, workspaceId: 'ws-1' });+ const result = await caller.duplicateAgent({ agentId: 'public-agent' });++ expect(result).toEqual({ agentId: 'copied-agent' });+ expect(assertCanEditResource).not.toHaveBeenCalled();+ expect(agentModelMock.duplicate).toHaveBeenCalledWith('public-agent', undefined);+ expect(resourcePermissionModelMock.setAccessLevel).toHaveBeenCalledWith(+ 'agent',+ 'copied-agent',+ 'use',+ userId,+ );+ });+ });+describe('publishAgentToWorkspace', () => {const wsCtx = () => ({ ...mockCtx, workspaceId: 'ws-1' });diff --git a/apps/server/src/routers/lambda/__tests__/agentGroup.test.ts b/apps/server/src/routers/lambda/__tests__/agentGroup.test.tsindex ab3e9b2b4ac..ddc524fe5f3 100644--- a/apps/server/src/routers/lambda/__tests__/agentGroup.test.ts+++ b/apps/server/src/routers/lambda/__tests__/agentGroup.test.ts@@ -304,7 +304,7 @@ describe('agentGroupRouter', () => {const result = await caller.getGroupDetail({ id: 'group-1' });expect(result).toEqual({- agents: [{ id: 'agent-1', isSupervisor: true, title: 'Agent 1' }],+ agents: [{ id: 'agent-1', isSupervisor: true, model: 'private-model', title: 'Agent 1' }],config: { openingMessage: 'Welcome' },id: 'group-1',supervisorAgentId: 'agent-1',@@ -350,6 +350,7 @@ describe('agentGroupRouter', () => {agents: [{id: 'agent-1',+ model: 'private-model',title: 'Agent 1',userId: 'creator-1',visibility: 'public',diff --git a/apps/server/src/routers/lambda/__tests__/messenger.test.ts b/apps/server/src/routers/lambda/__tests__/messenger.test.tsindex 3ead7e28524..00175d5bd7a 100644--- a/apps/server/src/routers/lambda/__tests__/messenger.test.ts+++ b/apps/server/src/routers/lambda/__tests__/messenger.test.ts@@ -80,6 +80,7 @@ const {vi.mock('@lobechat/chat-adapter-wechat', () => ({fetchQrCode: vi.fn(),+ getWechatTextSendCount: (text: string) => Math.max(1, Math.ceil(text.length / 2000)),pollQrStatus: mockPollQrStatus,}));diff --git a/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.test.ts b/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.test.tsindex fc807751a6d..373d37fb3e1 100644--- a/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.test.ts+++ b/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.test.ts@@ -92,28 +92,61 @@ describe('getResourceConfigAccess', () => {describe('config redaction', () => {it('keeps only agent profile fields', () => {const result = redactAgentConfig({+ agencyConfig: {+ boundDeviceId: 'private-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ heterogeneousProvider: { env: { SECRET: 'value' }, type: 'codex' },+ modelSelectionPolicy: 'fixed',+ },avatar: 'avatar.png',- chatConfig: { runtimeEnv: { SECRET: 'value' } },+ chatConfig: { enableAgentMode: false, runtimeEnv: { SECRET: 'value' } },description: 'Public description',files: [{ id: 'file-1' }],id: 'agent-1',- model: 'private-model',+ model: 'shared-model',openingMessage: 'Hello',params: { temperature: 0.8 },plugins: ['private-tool'],+ provider: 'shared-provider',systemRole: 'private prompt',title: 'Public title',});expect(result).toEqual({+ agencyConfig: {+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ heterogeneousProvider: { type: 'codex' },+ modelSelectionPolicy: 'fixed',+ },avatar: 'avatar.png',+ chatConfig: { enableAgentMode: false },description: 'Public description',id: 'agent-1',+ model: 'shared-model',openingMessage: 'Hello',+ provider: 'shared-provider',title: 'Public title',});});+ it('keeps a type-only hetero summary without leaking provider env', () => {+ const result = redactAgentConfig({+ agencyConfig: {+ heterogeneousProvider: {+ args: ['--dangerously-skip-permissions'],+ env: { API_KEY: 'secret' },+ type: 'claude-code',+ },+ },+ id: 'agent-1',+ title: 'Hetero agent',+ });++ expect(result.agencyConfig).toEqual({ heterogeneousProvider: { type: 'claude-code' } });+ });+it('redacts group prompts and every member config', () => {const result = redactGroupConfig({agents: [diff --git a/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.ts b/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.tsindex ace8b17fed4..2ca3245944f 100644--- a/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.ts+++ b/apps/server/src/routers/lambda/_helpers/resourceConfigGuard.ts@@ -51,7 +51,7 @@ const getSingleResourceConfigAccess = async (/*** Full configuration is an edit-level capability. Members with only view/use* access still need public profile data to render shared conversations, but- * must not receive prompts, tools, model settings, or other editable config.+ * must not receive prompts, tools, model parameters, or other editable config.*/export const getResourceConfigAccess = async (ctx: ResourceConfigGuardCtx,@@ -107,8 +107,10 @@ const AGENT_PROFILE_KEYS = ['id','isSupervisor','marketIdentifier',+ 'model','openingMessage','openingQuestions',+ 'provider','slug','title','updatedAt',@@ -118,9 +120,38 @@ const AGENT_PROFILE_KEYS = ['workspaceId',] as const;-/** Return only identity/display fields; deliberately use a whitelist. */-export const redactAgentConfig = <T extends Record<string, any>>(agent: T): T =>- pick(agent, AGENT_PROFILE_KEYS);+/** Return only identity/display fields and a safe runtime summary; deliberately use a whitelist. */+export const redactAgentConfig = <T extends Record<string, any>>(agent: T): T => {+ const result = pick(agent, AGENT_PROFILE_KEYS) as Record<string, any>;+ const agencyConfig = agent.agencyConfig as Record<string, any> | null | undefined;++ // Selection policies are authorization metadata, not executable Agent+ // config. Use/view members need them so the chat controls cannot mistake a+ // redacted fixed Agent for the legacy `member` default. The execution target+ // is a safe semantic summary shown by use-only members; keep every other+ // agency field (device ids, provider args/env, working directories, etc.)+ // behind edit-level config access.+ if (agencyConfig) {+ const safeAgencySummary = pick(agencyConfig, [+ 'executionTarget',+ 'executionTargetSelectionPolicy',+ 'modelSelectionPolicy',+ ]);+ // The hetero marker is identity, not executable config: without it,+ // use/view members render an external-CLI agent as a plain runtime agent+ // (wrong model selector, wrong composer). Expose the type only — args,+ // env and device bindings stay behind edit-level access.+ const heteroType = agencyConfig.heterogeneousProvider?.type;+ if (heteroType) safeAgencySummary.heterogeneousProvider = { type: heteroType };+ if (Object.keys(safeAgencySummary).length > 0) result.agencyConfig = safeAgencySummary;+ }+ const chatConfig = agent.chatConfig as Record<string, any> | null | undefined;+ if (chatConfig?.enableAgentMode !== undefined) {+ result.chatConfig = { enableAgentMode: chatConfig.enableAgentMode };+ }++ return result as T;+};const GROUP_PROFILE_KEYS = ['avatar',diff --git a/apps/server/src/routers/lambda/agent.ts b/apps/server/src/routers/lambda/agent.tsindex d60de5fc851..763ad55538a 100644--- a/apps/server/src/routers/lambda/agent.ts+++ b/apps/server/src/routers/lambda/agent.ts@@ -26,7 +26,10 @@ import {assertCanPerformResourceAction,buildResourcePermissionState,} from '@/server/services/resourcePermission';-import { hasWorkspaceScopedPermission } from '@/server/services/workspacePermission';+import {+ hasWorkspaceScopedPermission,+ isWorkspacePrimaryOwner,+} from '@/server/services/workspacePermission';import { TransferErrorCode } from '@/types/transferError';import { isWorkspaceNonOwner } from './_helpers/assertWorkspaceRowManageable';@@ -466,17 +469,8 @@ export const agentRouter = router({}),).mutation(async ({ input, ctx }) => {- // Duplicating copies the full config (prompt/plugins/etc.), which a- // use-only member must not be able to inspect — same edit gate as- // `updateAgentConfig`, mirroring the UI's `canConfigure` guard.- await assertCanEditResource({- db: ctx.serverDB,- resourceId: input.agentId,- resourceType: 'agent',- userId: ctx.userId,- workspaceId: ctx.workspaceId ?? undefined,- });-+ // Forking creates a caller-owned Agent and is governed by `agent:fork`,+ // independently of the source Agent's collaborative-edit permission.const result = await ctx.agentModel.duplicate(input.agentId, input.newTitle);if (ctx.workspaceId && result) {await new ResourcePermissionModel(ctx.serverDB, ctx.workspaceId).setAccessLevel(@@ -810,17 +804,22 @@ export const agentRouter = router({});}- // 5. The transfer rehomes every linked topic/message/thread/task — a- // non-owner member must not move teammates' conversations along with- // their own agent.+ // 5. The transfer rehomes every linked topic/message/thread/task — only+ // the primary owner may move teammates' conversations along with an+ // agent; co-admins and members may not.if (- isWorkspaceNonOwner(ctx) &&+ ctx.workspaceId &&+ !(await isWorkspacePrimaryOwner({+ db: ctx.serverDB,+ userId: ctx.userId,+ workspaceId: ctx.workspaceId,+ })) &&(await ctx.agentModel.transferHasForeignRows(input.agentId))) {throw new TRPCError({cause: { data: { code: TransferErrorCode.OwnerOnly } },code: 'FORBIDDEN',- message: "Only workspace owners can transfer an agent carrying others' conversations",+ message: "Only the workspace owner can transfer an agent carrying others' conversations",});}@@ -852,6 +851,127 @@ export const agentRouter = router({return result;}),+ /**+ * Batch variant of `transferAgent`: one request + one DB transaction for all+ * selected agents, so a multi-select "Move Agent" is no longer N serial+ * round-trips (each with its own permission checks and large-table updates).+ */+ transferAgents: agentProcedure+ .use(withScopedPermission('agent:update'))+ .input(+ z.object({+ agentIds: z.array(z.string()).min(1).max(100),+ targetAccessLevel: z.enum(RESOURCE_ACCESS_LEVELS_BY_TYPE.agent).optional(),+ targetVisibility: z.enum(['private', 'public']).optional(),+ targetWorkspaceId: z.string().nullable(),+ }),+ )+ .mutation(async ({ input, ctx }) => {+ const agentIds = [...new Set(input.agentIds)];++ // 1. All agents must exist in the current scope+ const existences = await Promise.all(+ agentIds.map((agentId) => ctx.agentModel.existsById(agentId)),+ );+ if (existences.some((exists) => !exists)) {+ throw new TRPCError({+ cause: { data: { code: TransferErrorCode.ResourceNotFound } },+ code: 'NOT_FOUND',+ message: 'Agent not found',+ });+ }++ // 2. Transferring ownership/scope is always creator-only.+ if (ctx.workspaceId) {+ await Promise.all(+ agentIds.map((agentId) =>+ assertCanPerformResourceAction({+ action: 'transfer',+ db: ctx.serverDB,+ resourceId: agentId,+ resourceType: 'agent',+ userId: ctx.userId,+ workspaceId: ctx.workspaceId!,+ }),+ ),+ );+ }++ // 3. Validate target workspace access once (user must be member+)+ if (input.targetWorkspaceId) {+ const canWriteTarget = await hasWorkspaceScopedPermission({+ action: 'AGENT_CREATE',+ db: ctx.serverDB,+ userId: ctx.userId,+ workspaceId: input.targetWorkspaceId,+ });++ if (!canWriteTarget) {+ throw new TRPCError({+ cause: { data: { code: TransferErrorCode.TargetNoWriteAccess } },+ code: 'FORBIDDEN',+ message: 'No write access to target workspace',+ });+ }+ }++ // 4. Cannot transfer to the same workspace+ if (input.targetWorkspaceId === ctx.workspaceId) {+ throw new TRPCError({+ cause: { data: { code: TransferErrorCode.SameWorkspace } },+ code: 'BAD_REQUEST',+ message: 'Cannot transfer agent to the same workspace',+ });+ }++ // 5. The transfer rehomes every linked topic/message/thread/task — only+ // the primary owner may move teammates' conversations along with+ // agents. One batched check for the whole selection.+ if (+ ctx.workspaceId &&+ !(await isWorkspacePrimaryOwner({+ db: ctx.serverDB,+ userId: ctx.userId,+ workspaceId: ctx.workspaceId,+ })) &&+ (await ctx.agentModel.transferHasForeignRows(agentIds))+ ) {+ throw new TRPCError({+ cause: { data: { code: TransferErrorCode.OwnerOnly } },+ code: 'FORBIDDEN',+ message: "Only the workspace owner can transfer an agent carrying others' conversations",+ });+ }++ const results = await ctx.agentModel.transferAgents(+ agentIds,+ input.targetWorkspaceId,+ ctx.userId,+ input.targetVisibility,+ );++ if (ctx.workspaceId) {+ const sourcePermissionModel = new ResourcePermissionModel(ctx.serverDB, ctx.workspaceId);+ await Promise.all(+ agentIds.map((agentId) => sourcePermissionModel.removeAll('agent', agentId)),+ );+ }+ if (input.targetWorkspaceId && input.targetVisibility === 'public') {+ const targetAccessLevel = input.targetAccessLevel ?? DEFAULT_RESOURCE_ACCESS_LEVELS.agent;+ const targetPermissionModel = new ResourcePermissionModel(+ ctx.serverDB,+ input.targetWorkspaceId,+ );+ await Promise.all(+ agentIds.map((agentId) =>+ targetPermissionModel.setAccessLevel('agent', agentId, targetAccessLevel, ctx.userId),+ ),+ );+ }++ return results;+ }),+updateAgentConfig: agentProcedure.use(withScopedPermission('agent:update')).input(diff --git a/apps/server/src/routers/lambda/agentGroup.ts b/apps/server/src/routers/lambda/agentGroup.tsindex 7b4b5421bd7..6bc2a1d76a3 100644--- a/apps/server/src/routers/lambda/agentGroup.ts+++ b/apps/server/src/routers/lambda/agentGroup.ts@@ -21,7 +21,10 @@ import {assertCanPerformResourceAction,buildResourcePermissionState,} from '@/server/services/resourcePermission';-import { hasWorkspaceScopedPermission } from '@/server/services/workspacePermission';+import {+ hasWorkspaceScopedPermission,+ isWorkspacePrimaryOwner,+} from '@/server/services/workspacePermission';import { TransferErrorCode } from '@/types/transferError';import { isWorkspaceNonOwner } from './_helpers/assertWorkspaceRowManageable';@@ -634,16 +637,22 @@ export const agentGroupRouter = router({});}- // The transfer rehomes member agents and every group conversation — a- // non-owner member must not move teammates' rows along with their group.+ // The transfer rehomes member agents and every group conversation — only+ // the primary owner may move teammates' rows along with a group;+ // co-admins and members may not.if (- isWorkspaceNonOwner(ctx) &&+ ctx.workspaceId &&+ !(await isWorkspacePrimaryOwner({+ db: ctx.serverDB,+ userId: ctx.userId,+ workspaceId: ctx.workspaceId,+ })) &&(await ctx.agentGroupRepo.transferHasForeignRows(input.groupId))) {throw new TRPCError({cause: { data: { code: TransferErrorCode.OwnerOnly } },code: 'FORBIDDEN',- message: "Only workspace owners can transfer a group carrying others' content",+ message: "Only the workspace owner can transfer a group carrying others' content",});}diff --git a/apps/server/src/routers/lambda/messenger.ts b/apps/server/src/routers/lambda/messenger.tsindex c118eca9e4d..d04da8a9f6c 100644--- a/apps/server/src/routers/lambda/messenger.ts+++ b/apps/server/src/routers/lambda/messenger.ts@@ -36,6 +36,11 @@ import { getServerFeatureFlagsStateFromRuntimeConfig } from '@/server/featureFlaimport { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';import { SlackApi } from '@/server/services/bot/platforms/slack/api';+import {+ wechatLegacyTokenKey,+ wechatPendingPushKey,+ wechatWindowKey,+} from '@/server/services/bot/platforms/wechat/contextWindow';import { GatewayService } from '@/server/services/gateway';import { getBotRuntimeStatus } from '@/server/services/gateway/runtimeStatus';import {@@ -54,6 +59,11 @@ import {releaseWechatQrFinalizeLock,} from '@/server/services/messenger';import { wechatInstallationKey } from '@/server/services/messenger/installations';+import {+ getMessengerPushWindow,+ MESSENGER_PUSH_PLATFORMS,+ sendMessengerPush,+} from '@/server/services/messenger/push';const platformEnum = z.enum(['telegram',@@ -135,7 +145,11 @@ const disconnectWechatAccountLink = async (if (!link.applicationId) return;const redis = getAgentRuntimeRedisClient();if (redis) {- await redis.del(`wechat:ctx-token:${link.applicationId}:${link.tenantId}`);+ await redis.del(+ wechatLegacyTokenKey(link.applicationId, link.tenantId),+ wechatWindowKey(link.applicationId, link.tenantId),+ wechatPendingPushKey(link.applicationId, link.tenantId),+ );}};@@ -796,6 +810,45 @@ export const messengerRouter = router({return ctx.messengerLinkModel.list();}),+ /**+ * Proactive-push window status for the caller's link on a platform:+ * deliverability mode, remaining quota, expiry, and queued messages.+ * Read-only; used by the messenger settings UI.+ */+ getMessengerPushWindow: messengerProcedure+ .input(z.object({ platform: z.enum(MESSENGER_PUSH_PLATFORMS) }))+ .query(async ({ input, ctx }) => {+ return getMessengerPushWindow({+ platform: input.platform,+ serverDB: ctx.serverDB,+ userId: ctx.userId,+ });+ }),++ /**+ * Proactively push a message to the caller's linked messenger account.+ *+ * Platform-agnostic entry (see services/messenger/push): windowed platforms+ * like WeChat deliver inside the current send window and queue outside it —+ * the caller gets `queued`, never a silent drop. This is the low-level+ * capability the notification-channel integration will build on.+ */+ sendMessengerPush: messengerProcedure+ .input(+ z.object({+ content: z.string().trim().min(1).max(2000),+ platform: z.enum(MESSENGER_PUSH_PLATFORMS),+ }),+ )+ .mutation(async ({ input, ctx }) => {+ return sendMessengerPush({+ content: input.content,+ platform: input.platform,+ serverDB: ctx.serverDB,+ userId: ctx.userId,+ });+ }),+/*** 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"diff --git a/apps/server/src/services/agent/index.ts b/apps/server/src/services/agent/index.tsindex a43eee45db2..29f09ce9deb 100644--- a/apps/server/src/services/agent/index.ts+++ b/apps/server/src/services/agent/index.ts@@ -30,7 +30,8 @@ const log = debug('lobe-agent:service');* Agent config with required id field.* Used when returning agent config from database (id is always present).*/-export type AgentConfigWithId = LobeAgentConfig & { id: string; slug?: string | null };+export type AgentConfigWithId = LobeAgentConfig &+ Pick<AgentItem, 'id' | 'slug' | 'userId' | 'visibility' | 'workspaceId'>;interface AgentWelcomeData {openQuestions: string[];diff --git a/apps/server/src/services/aiAgent/__tests__/execAgent.modelOverride.test.ts b/apps/server/src/services/aiAgent/__tests__/execAgent.modelOverride.test.tsindex 69703bc9d35..bb112e2b6fe 100644--- a/apps/server/src/services/aiAgent/__tests__/execAgent.modelOverride.test.ts+++ b/apps/server/src/services/aiAgent/__tests__/execAgent.modelOverride.test.ts@@ -3,13 +3,23 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { AiAgentService } from '../index';-const { mockCreateOperation, mockGetAgentConfig, mockGetPreference, mockMessageCreate } =- vi.hoisted(() => ({- mockCreateOperation: vi.fn(),- mockGetAgentConfig: vi.fn(),- mockGetPreference: vi.fn(),- mockMessageCreate: vi.fn(),- }));+const {+ mockCanManageResourcePermission,+ mockCreateOperation,+ mockGetAgentConfig,+ mockGetPreference,+ mockMessageCreate,+} = vi.hoisted(() => ({+ mockCanManageResourcePermission: vi.fn(),+ mockCreateOperation: vi.fn(),+ mockGetAgentConfig: vi.fn(),+ mockGetPreference: vi.fn(),+ mockMessageCreate: vi.fn(),+}));++vi.mock('@/server/services/resourcePermission', () => ({+ canManageResourcePermission: mockCanManageResourcePermission,+}));vi.mock('@/libs/trusted-client', () => ({generateTrustedClientToken: vi.fn().mockReturnValue(undefined),@@ -150,6 +160,7 @@ describe('AiAgentService.execAgent - model/provider override', () => {success: true,});mockGetPreference.mockResolvedValue({});+ mockCanManageResourcePermission.mockResolvedValue(false);service = new AiAgentService(mockDb, userId);});@@ -217,12 +228,14 @@ describe('AiAgentService.execAgent - model/provider override', () => {mockGetAgentConfig.mockResolvedValue({...defaultAgentConfig,agencyConfig: { modelSelectionPolicy: 'member' },+ chatConfig: { enableAgentMode: true },visibility: 'public',});mockGetPreference.mockResolvedValue({agentModelOverrides: {'agent-1': { model: 'claude-sonnet-4-6', provider: 'anthropic' },},+ agentModeOverrides: { 'agent-1': false },});service = new AiAgentService(mockDb, userId, { workspaceId: 'workspace-1' });@@ -231,6 +244,72 @@ describe('AiAgentService.execAgent - model/provider override', () => {const callArgs = mockCreateOperation.mock.calls[0][0];expect(callArgs.agentConfig.model).toBe('claude-sonnet-4-6');expect(callArgs.agentConfig.provider).toBe('anthropic');+ expect(callArgs.agentConfig.chatConfig.enableAgentMode).toBe(false);+ });++ it('ignores member overrides for the Agent author and uses the shared model and target', async () => {+ mockGetAgentConfig.mockResolvedValue({+ ...defaultAgentConfig,+ agencyConfig: {+ executionTarget: 'sandbox',+ executionTargetSelectionPolicy: 'member',+ modelSelectionPolicy: 'member',+ },+ userId,+ chatConfig: { enableAgentMode: true },+ visibility: 'public',+ workspaceId: 'workspace-1',+ });+ mockGetPreference.mockResolvedValue({+ agentDeviceOverrides: {+ 'agent-1': { boundDeviceId: 'member-device', executionTarget: 'local' },+ },+ agentModelOverrides: {+ 'agent-1': { model: 'claude-sonnet-4-6', provider: 'anthropic' },+ },+ agentModeOverrides: { 'agent-1': false },+ });+ service = new AiAgentService(mockDb, userId, { workspaceId: 'workspace-1' });++ await service.execAgent({ agentId: 'agent-1', prompt: 'Hello' });++ const callArgs = mockCreateOperation.mock.calls[0][0];+ expect(callArgs.agentConfig).toMatchObject({+ agencyConfig: { executionTarget: 'sandbox' },+ chatConfig: { enableAgentMode: true },+ model: 'gpt-4',+ provider: 'openai',+ });+ expect(mockCanManageResourcePermission).not.toHaveBeenCalled();+ });++ it('ignores member model overrides for a Workspace admin', async () => {+ mockCanManageResourcePermission.mockResolvedValue(true);+ mockGetAgentConfig.mockResolvedValue({+ ...defaultAgentConfig,+ agencyConfig: { modelSelectionPolicy: 'member' },+ chatConfig: { enableAgentMode: true },+ userId: 'agent-author',+ visibility: 'public',+ workspaceId: 'workspace-1',+ });+ mockGetPreference.mockResolvedValue({+ agentModelOverrides: {+ 'agent-1': { model: 'claude-sonnet-4-6', provider: 'anthropic' },+ },+ agentModeOverrides: { 'agent-1': false },+ });+ service = new AiAgentService(mockDb, userId, { workspaceId: 'workspace-1' });++ await service.execAgent({ agentId: 'agent-1', prompt: 'Hello' });++ const callArgs = mockCreateOperation.mock.calls[0][0];+ expect(callArgs.agentConfig.model).toBe('gpt-4');+ expect(callArgs.agentConfig.provider).toBe('openai');+ expect(callArgs.agentConfig.chatConfig.enableAgentMode).toBe(true);+ expect(mockCanManageResourcePermission).toHaveBeenCalledWith(+ expect.objectContaining({ resourceId: 'agent-1', userId, workspaceId: 'workspace-1' }),+ );});it('ignores the caller model preference when the workspace Agent is private', async () => {@@ -253,8 +332,54 @@ describe('AiAgentService.execAgent - model/provider override', () => {expect(callArgs.agentConfig.provider).toBe('openai');});- it('ignores a retained caller preference when the workspace model policy is missing/fixed', async () => {- mockGetAgentConfig.mockResolvedValue({ ...defaultAgentConfig });+ it('ignores member device policy and overrides while the workspace Agent is private', async () => {+ mockGetAgentConfig.mockResolvedValue({+ ...defaultAgentConfig,+ agencyConfig: {+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ visibility: 'private',+ });+ mockGetPreference.mockResolvedValue({+ agentDeviceOverrides: {+ 'agent-1': { boundDeviceId: 'stale-member-device', executionTarget: 'local' },+ },+ });+ service = new AiAgentService(mockDb, userId, { workspaceId: 'workspace-1' });++ await service.execAgent({ agentId: 'agent-1', prompt: 'Hello' });++ const callArgs = mockCreateOperation.mock.calls[0][0];+ expect(callArgs.agentConfig.agencyConfig).toEqual({+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ });+ });++ it('uses a retained caller preference when a legacy workspace model policy is missing', async () => {+ mockGetAgentConfig.mockResolvedValue({ ...defaultAgentConfig, visibility: 'public' });+ mockGetPreference.mockResolvedValue({+ agentModelOverrides: {+ 'agent-1': { model: 'claude-sonnet-4-6', provider: 'anthropic' },+ },+ });+ service = new AiAgentService(mockDb, userId, { workspaceId: 'workspace-1' });++ await service.execAgent({ agentId: 'agent-1', prompt: 'Hello' });++ const callArgs = mockCreateOperation.mock.calls[0][0];+ expect(callArgs.agentConfig.model).toBe('claude-sonnet-4-6');+ expect(callArgs.agentConfig.provider).toBe('anthropic');+ });++ it('ignores a retained caller preference when the workspace model policy is fixed', async () => {+ mockGetAgentConfig.mockResolvedValue({+ ...defaultAgentConfig,+ agencyConfig: { modelSelectionPolicy: 'fixed' },+ visibility: 'public',+ });mockGetPreference.mockResolvedValue({agentModelOverrides: {'agent-1': { model: 'claude-sonnet-4-6', provider: 'anthropic' },diff --git a/apps/server/src/services/aiAgent/index.ts b/apps/server/src/services/aiAgent/index.tsindex 865152121da..cff01615b25 100644--- a/apps/server/src/services/aiAgent/index.ts+++ b/apps/server/src/services/aiAgent/index.ts@@ -69,7 +69,7 @@ import {getWorkingDirEffectivePath,ReasoningGraphSchema,RequestTrigger,- resolveAgencyConfig,+ resolveAgentAgencyConfig,resolveAgentModelConfig,ThreadStatus,ThreadType,@@ -156,6 +156,7 @@ import type { ConversationHistoryEntry } from '@/server/services/heterogeneousAgimport { buildCloudHeteroContext } from '@/server/services/heterogeneousAgent/cloudHeteroContext';import { buildRemoteDeviceHeteroContext } from '@/server/services/heterogeneousAgent/remoteDeviceHeteroContext';import { MarketService } from '@/server/services/market';+import { canManageResourcePermission } from '@/server/services/resourcePermission';import {buildConnectorOwnershipPrompt,collectBorrowedConnectors,@@ -1233,13 +1234,16 @@ export class AiAgentService {// Use actual agent ID from config for subsequent operationsconst resolvedAgentId = agentConfig.id;+ let memberDeviceOverride:+ Pick<LobeAgentAgencyConfig, 'boundDeviceId' | 'executionTarget'> | undefined;let memberModelOverride: AgentModelOverride | undefined;+ let memberModeOverride: boolean | undefined;// Layer this caller's workspace-scoped execution and model preferences over// the shared Agent row. Device selection keeps its existing fallback rules;- // model selection is applied only when the author explicitly allows member- // choice (an omitted policy is fixed). Both overrides live in the dedicated- // per-(workspace, user) settings row and never mutate shared Agent config.+ // public Workspace Agents allow member choice by default unless the author+ // explicitly fixes the model. Both overrides live in the dedicated per-+ // (workspace, user) settings row and never mutate shared Agent config.if (this.workspaceId) {try {const workspaceUserSettings = new WorkspaceUserSettingsModel(@@ -1248,17 +1252,56 @@ export class AiAgentService {this.workspaceId,);const preference = await workspaceUserSettings.getPreference();- const deviceOverride = preference.agentDeviceOverrides?.[resolvedAgentId];- agentConfig.agencyConfig = resolveAgencyConfig(agentConfig.agencyConfig, deviceOverride);-+ memberDeviceOverride = preference.agentDeviceOverrides?.[resolvedAgentId];memberModelOverride = preference.agentModelOverrides?.[resolvedAgentId];+ memberModeOverride = preference.agentModeOverrides?.[resolvedAgentId];} catch (error) {// Losing preferences is non-fatal: execution falls back to the shared- // Agent row, which is the safe fixed/default behavior.+ // Agent row.log('execAgent: failed to load caller workspace_user_settings preferences: %O', error);}}+ let canManageAgent = agentConfig.userId === this.userId;+ const agentWorkspaceId = agentConfig.workspaceId ?? this.workspaceId;+ const isPublicWorkspaceAgent = !!agentWorkspaceId && agentConfig.visibility !== 'private';+ if (isPublicWorkspaceAgent && !canManageAgent) {+ try {+ canManageAgent = await canManageResourcePermission({+ db: this.db,+ meta: {+ userId: agentConfig.userId,+ visibility: agentConfig.visibility ?? 'public',+ workspaceId: agentWorkspaceId,+ },+ resourceId: resolvedAgentId,+ resourceType: 'agent',+ userId: this.userId,+ workspaceId: agentWorkspaceId,+ });+ } catch (error) {+ // Permission lookup failure is fail-closed: applying member policy is+ // safer than accidentally granting shared-config semantics.+ log('execAgent: failed to resolve Agent management access: %O', error);+ }+ }++ agentConfig.agencyConfig = resolveAgentAgencyConfig(+ agentConfig.agencyConfig,+ memberDeviceOverride,+ {+ canManage: canManageAgent,+ visibility: agentConfig.visibility,+ workspaceId: agentWorkspaceId,+ },+ );+ if (!canManageAgent && memberModeOverride !== undefined) {+ agentConfig.chatConfig = {+ ...agentConfig.chatConfig,+ enableAgentMode: memberModeOverride,+ };+ }+// Persistence-attribution agent id. Background Agent Signal runs (memory /// skill / self-reflection) execute under a builtin slug, so `resolvedAgentId`// is the builtin agent — but the run's persisted messages, like its operation@@ -1272,10 +1315,14 @@ export class AiAgentService {// above the caller's personal workspace choice and the shared Agent default.// The callSubAgent spawn site resolves the sub-agent default and passes it// explicitly, so this path never has to special-case sub-agents.- const effectiveModel = resolveAgentModelConfig(agentConfig, memberModelOverride, {- ...(modelOverride ? { model: modelOverride } : {}),- ...(providerOverride ? { provider: providerOverride } : {}),- });+ const effectiveModel = resolveAgentModelConfig(+ { ...agentConfig, canManage: canManageAgent, workspaceId: agentWorkspaceId },+ memberModelOverride,+ {+ ...(modelOverride ? { model: modelOverride } : {}),+ ...(providerOverride ? { provider: providerOverride } : {}),+ },+ );agentConfig.model = effectiveModel.model;agentConfig.provider = effectiveModel.provider;diff --git a/apps/server/src/services/bot/BotMessageRouter.ts b/apps/server/src/services/bot/BotMessageRouter.tsindex e4ec3a7defa..a06ebff6cbf 100644--- a/apps/server/src/services/bot/BotMessageRouter.ts+++ b/apps/server/src/services/bot/BotMessageRouter.ts@@ -887,6 +887,25 @@ export class BotMessageRouter {replyLocale: BotReplyLocale,caller: string,): Promise<boolean> => {+ /**+ * Group-scope rejection notices land in the platform's reply thread+ * (on Discord, the auto-created thread under the @mention). The+ * rejected sender is never added to that thread — only the success+ * path (`AgentBridgeService.executeWithCallback`) calls+ * `ensureThreadMember` — so they get no notification and perceive+ * the rejection as the bot silently ignoring them. Pull them into+ * the thread before posting so the notice is actually seen.+ * DM threads deliver in place; platforms without the hook no-op.+ */+ const ensureRejectionVisible = async (): Promise<void> => {+ if (thread.isDM === true || !author.userId || !client.ensureThreadMember) return;+ try {+ await client.ensureThreadMember(thread.id, author.userId);+ } catch (error) {+ log('%s: ensureThreadMember for rejection notice failed: %O', caller, error);+ }+ };+const featureAccess = await getBotFeatureAccessState({action: 'runtime',applicationId,@@ -902,6 +921,7 @@ export class BotMessageRouter {const finishFeatureAccess = async (): Promise<boolean> => {if (!featureAccess.allowed) {try {+ await ensureRejectionVisible();await thread.post(featureAccess.blockedMessage ?? 'This bot channel is unavailable.');} catch (error) {log('%s: failed to post paid-feature notice: %O', caller, error);@@ -950,6 +970,7 @@ export class BotMessageRouter {thread.id,author.userName ?? author.userId,);+ await ensureRejectionVisible();await handleSenderRejected(thread, replyLocale);return false;}@@ -962,6 +983,7 @@ export class BotMessageRouter {thread.id,groupSettings.policy,);+ await ensureRejectionVisible();await notifyGroupRejected(thread, replyLocale);return false;}diff --git a/apps/server/src/services/bot/__tests__/BotMessageRouter.test.ts b/apps/server/src/services/bot/__tests__/BotMessageRouter.test.tsindex 32ed71cc5bb..2d7b0cbac68 100644--- a/apps/server/src/services/bot/__tests__/BotMessageRouter.test.ts+++ b/apps/server/src/services/bot/__tests__/BotMessageRouter.test.ts@@ -112,6 +112,10 @@ const mockAgentBridgeServiceCtor = vi.hoisted(() => vi.fn());// keep their pre-behaviour. Individual tests can replace this via// `.mockResolvedValueOnce(...)` to simulate Discord's auto-thread upgrade.const mockOpenThreadForChannelWake = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));+// Mirrors Discord's `ensureThreadMember`: pulls a platform user into the+// reply thread so they get notified. Optional on the PlatformClient+// contract — tests that care assert on it; others ignore the extra call.+const mockEnsureThreadMember = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));vi.mock('../AgentBridgeService', () => ({AgentBridgeService: mockAgentBridgeServiceCtor,@@ -171,6 +175,7 @@ const mockGetPlatform = vi.hoisted(() =>const parts = threadId.split(':');return parts.length === 4 && parts[2] ? [parts[2]] : [];},+ ensureThreadMember: mockEnsureThreadMember,getMessenger: () => ({createMessage: vi.fn(),editMessage: vi.fn(),@@ -1960,6 +1965,113 @@ describe('BotMessageRouter', () => {});});+ describe('rejection notice visibility (ensureThreadMember)', () => {+ /**+ * LOBE-12191: on Discord a channel @mention auto-creates a reply+ * thread and rejection notices are posted there — but the rejected+ * sender was never added to the thread, so they got no notification+ * and perceived the bot as silently ignoring them. Every group-scope+ * rejection must pull the sender into the thread before posting.+ */+ async function loadMention(settings: Record<string, unknown>) {+ mockFindEnabledByPlatform.mockResolvedValue([+ makeProvider({ applicationId: 'app-1', settings }),+ ]);+ const router = new BotMessageRouter();+ const webhookHandler = router.getWebhookHandler('discord', 'app-1');+ const req = new Request('https://example.com/webhook', { body: '{}', method: 'POST' });+ await webhookHandler(req);+ const mention = mockOnNewMention.mock.calls.at(-1);+ if (!mention) throw new Error('mention handler not registered');+ return mention[0] as (thread: any, message: any, ctx?: any) => Promise<void>;+ }++ const groupThread = () => ({+ channelId: 'channel-1',+ id: 'discord:guild-1:channel-1:thread-1',+ isDM: false,+ post: vi.fn().mockResolvedValue(undefined),+ });+ const strangerMessage = {+ author: { isBot: false, userId: 'lin-id', userName: 'lin' },+ isMention: true,+ text: '@bot hello',+ };++ it('pulls an allowFrom-rejected sender into the reply thread before posting the notice', async () => {+ const mention = await loadMention({+ allowFrom: 'alice-id',+ dmPolicy: 'open',+ groupPolicy: 'open',+ });+ const thread = groupThread();++ await mention(thread, strangerMessage);++ expect(mockEnsureThreadMember).toHaveBeenCalledWith(+ 'discord:guild-1:channel-1:thread-1',+ 'lin-id',+ );+ expect(thread.post).toHaveBeenCalledTimes(1);+ expect(thread.post.mock.calls[0][0]).toContain("aren't authorized");+ // Membership must be granted before the notice lands so the post+ // generates a notification for the sender.+ expect(mockEnsureThreadMember.mock.invocationCallOrder[0]).toBeLessThan(+ thread.post.mock.invocationCallOrder[0],+ );+ });++ it('pulls a group-policy-rejected sender into the reply thread', async () => {+ const mention = await loadMention({+ dmPolicy: 'open',+ groupAllowFrom: 'some-other-channel',+ groupPolicy: 'allowlist',+ });+ const thread = groupThread();++ await mention(thread, strangerMessage);++ expect(mockEnsureThreadMember).toHaveBeenCalledWith(+ 'discord:guild-1:channel-1:thread-1',+ 'lin-id',+ );+ expect(thread.post).toHaveBeenCalledTimes(1);+ });++ it('does not touch thread membership for DM rejections', async () => {+ const mention = await loadMention({+ allowFrom: 'alice-id',+ dmPolicy: 'open',+ groupPolicy: 'open',+ });+ const thread = {+ id: 'discord:@me:dm-1',+ isDM: true,+ post: vi.fn().mockResolvedValue(undefined),+ };++ await mention(thread, strangerMessage);++ expect(mockEnsureThreadMember).not.toHaveBeenCalled();+ expect(thread.post).toHaveBeenCalledTimes(1);+ });++ it('still posts the rejection notice when ensureThreadMember fails', async () => {+ mockEnsureThreadMember.mockRejectedValueOnce(new Error('missing permission'));+ const mention = await loadMention({+ allowFrom: 'alice-id',+ dmPolicy: 'open',+ groupPolicy: 'open',+ });+ const thread = groupThread();++ await mention(thread, strangerMessage);++ expect(thread.post).toHaveBeenCalledTimes(1);+ expect(thread.post.mock.calls[0][0]).toContain("aren't authorized");+ });+ });+describe('global allowFrom (user-level identity gate)', () => {/*** Real-world bug report: DM Policy=Allowlist, allowFrom=[me], Groupdiff --git a/apps/server/src/services/bot/platforms/wechat/client.test.ts b/apps/server/src/services/bot/platforms/wechat/client.test.tsindex eb89d5467ae..8763eb4d4ba 100644--- a/apps/server/src/services/bot/platforms/wechat/client.test.ts+++ b/apps/server/src/services/bot/platforms/wechat/client.test.ts@@ -32,6 +32,7 @@ const WechatUploadMediaType = vi.hoisted(() => ({vi.mock('@lobechat/chat-adapter-wechat', () => ({createWechatAdapter: mockCreateWechatAdapter,downloadMediaFromRawMessage: mockDownloadMediaFromRawMessage,+ getWechatTextSendCount: (text: string) => Math.max(1, Math.ceil(text.length / 2000)),MessageItemType,MessageState,MessageType,@@ -50,7 +51,12 @@ const { WechatClientFactory } = await import('./client');describe('WechatGatewayClient', () => {const runtimeRedis = {del: vi.fn(),+ expire: vi.fn(),get: vi.fn(),+ hgetall: vi.fn(),+ hincrby: vi.fn(),+ hset: vi.fn(),+ pttl: vi.fn(),set: vi.fn(),};@@ -60,6 +66,11 @@ describe('WechatGatewayClient', () => {runtimeRedis.get.mockResolvedValue(null);runtimeRedis.set.mockResolvedValue('OK');runtimeRedis.del.mockResolvedValue(1);+ runtimeRedis.expire.mockResolvedValue(1);+ runtimeRedis.hgetall.mockResolvedValue({});+ runtimeRedis.hincrby.mockResolvedValue(9);+ runtimeRedis.hset.mockResolvedValue(1);+ runtimeRedis.pttl.mockResolvedValue(-1);});it('waits for the initial readiness probe before resolving start', async () => {@@ -184,6 +195,9 @@ describe('WechatGatewayClient', () => {method: 'POST',}),);+ expect(runtimeRedis.hset.mock.invocationCallOrder[0]).toBeLessThan(+ fetchMock.mock.invocationCallOrder[0],+ );await client.stop();resolveLoop?.({ get_updates_buf: 'cursor-1', msgs: [], ret: 0 });@@ -204,6 +218,33 @@ describe('WechatGatewayClient', () => {).toThrowError('Bot Token is required');});+ it('tracks messages sent directly by the Chat SDK adapter', async () => {+ const client = new WechatClientFactory().createClient(+ {+ applicationId: 'wechat-app',+ credentials: { botId: 'bot-id', botToken: 'bot-token' },+ platform: 'wechat',+ settings: {},+ },+ { appUrl: 'https://example.com', redisClient: runtimeRedis as any },+ );++ client.createAdapter();+ const adapterConfig = mockCreateWechatAdapter.mock.calls[0][0];+ runtimeRedis.hgetall.mockResolvedValueOnce({+ refreshedAt: '1',+ remaining: '10',+ token: 'ctx-1',+ });+ await adapterConfig.onBeforeSendMessage({ count: 1, toUserId: '[email protected]' });++ expect(runtimeRedis.hincrby).toHaveBeenCalledWith(+ 'wechat:ctx-window:wechat-app:[email protected]',+ 'remaining',+ -1,+ );+ });+describe('extractFiles', () => {// Verifies the post-Redis re-download path: when WeChat messages// round-trip through the chat-sdk debounce/queue, `Message.toJSON`@@ -506,5 +547,31 @@ describe('WechatGatewayClient', () => {expect(mockUploadCdnMedia).not.toHaveBeenCalled();expect(mockSendItem).not.toHaveBeenCalled();});++ it('tracks every long-text chunk against the send-window quota', async () => {+ const client = createClient();+ const messenger = client.getMessenger('wechat:p2p:[email protected]');++ runtimeRedis.get.mockResolvedValueOnce('ctx-5');+ runtimeRedis.hgetall.mockResolvedValueOnce({+ refreshedAt: '1',+ remaining: '10',+ token: 'ctx-5',+ });+ runtimeRedis.hincrby.mockResolvedValueOnce(7);++ await messenger.createMessage('a'.repeat(4500));++ await vi.waitFor(() => {+ expect(runtimeRedis.hincrby).toHaveBeenCalledWith(+ 'wechat:ctx-window:wechat-app:[email protected]',+ 'remaining',+ -3,+ );+ });+ expect(runtimeRedis.hincrby.mock.invocationCallOrder[0]).toBeLessThan(+ mockSendMessage.mock.invocationCallOrder[0],+ );+ });});});diff --git a/apps/server/src/services/bot/platforms/wechat/client.ts b/apps/server/src/services/bot/platforms/wechat/client.tsindex d509654f254..9cad8cd3b49 100644--- a/apps/server/src/services/bot/platforms/wechat/client.ts+++ b/apps/server/src/services/bot/platforms/wechat/client.ts@@ -2,6 +2,7 @@ import type { WechatRawMessage } from '@lobechat/chat-adapter-wechat';import {createWechatAdapter,downloadMediaFromRawMessage,+ getWechatTextSendCount,MessageItemType,MessageState,MessageType,@@ -30,6 +31,7 @@ import {type ValidationResult,} from '../types';import { formatUsageStats } from '../utils';+import { consumeSendCredits, recordInboundToken, type WechatWindowRedis } from './contextWindow';import { sendWechatAttachments } from './sendAttachments';const log = debug('bot-platform:wechat:bot');@@ -267,7 +269,7 @@ class WechatGatewayClient implements PlatformClient {// Cache context token in memory and persist to Redis for queue-mode callbacksthis.contextTokens.set(msg.from_user_id, msg.context_token);- this.persistContextToken(msg.from_user_id, msg.context_token);+ await this.persistContextToken(msg.from_user_id, msg.context_token);// Forward to webhookawait this.forwardToWebhook(webhookUrl, msg);@@ -302,15 +304,41 @@ class WechatGatewayClient implements PlatformClient {return `wechat:ctx-token:${this.applicationId}:${userId}`;}- private persistContextToken(userId: string, token: string): void {+ private async persistContextToken(userId: string, token: string): Promise<void> {if (!this.context.redisClient) return;- const key = this.contextTokenRedisKey(userId);- // 24h TTL — tokens are refreshed on every inbound message.- // The redisClient is a raw ioredis instance (cast via `as any`), so use- // positional args instead of the { ex } object form.- (this.context.redisClient as any).set(key, token, 'EX', 86_400).catch((err: any) => {+ // Refresh the send window (token + outbound quota + 24h TTL); also mirrors+ // the legacy `wechat:ctx-token:*` key for older readers.+ try {+ await recordInboundToken(+ this.context.redisClient as unknown as WechatWindowRedis,+ this.applicationId,+ userId,+ token,+ );+ } catch (err) {log('WechatBot appId=%s failed to persist context token: %s', this.applicationId, err);- });+ }+ }++ /**+ * Best-effort quota bookkeeping for reply-path sends (overdraft allowed —+ * we never refuse to answer a user who just messaged us). Keeping the+ * counter honest here is what lets the proactive-push path know how much of+ * the 10-send window is actually left.+ */+ private async trackOutboundSends(userId: string, count: number): Promise<void> {+ if (!this.context.redisClient || count <= 0) return;+ try {+ await consumeSendCredits(+ this.context.redisClient as unknown as WechatWindowRedis,+ this.applicationId,+ userId,+ count,+ { allowOverdraft: true },+ );+ } catch (err) {+ log('WechatBot appId=%s failed to track outbound sends: %s', this.applicationId, err);+ }}private sleep(ms: number): Promise<void> {@@ -331,6 +359,9 @@ class WechatGatewayClient implements PlatformClient {baseUrl: this.config.credentials.baseUrl,botId: this.config.credentials.botId,botToken: this.config.credentials.botToken,+ onBeforeSendMessage: async ({ count, toUserId }) => {+ await this.trackOutboundSends(toUserId, count);+ },}),};}@@ -439,6 +470,10 @@ class WechatGatewayClient implements PlatformClient {const text = messengerContentText(input);const attachments = typeof input === 'string' ? undefined : input.attachments;const token = await resolveToken();+ await this.trackOutboundSends(+ targetId,+ (text.trim() ? getWechatTextSendCount(text) : 0) + (attachments?.length ?? 0),+ );if (text.trim()) {await this.api.sendMessage(targetId, text, token);}diff --git a/apps/server/src/services/bot/platforms/wechat/contextWindow.test.ts b/apps/server/src/services/bot/platforms/wechat/contextWindow.test.tsnew file mode 100644index 00000000000..39ad630be8c--- /dev/null+++ b/apps/server/src/services/bot/platforms/wechat/contextWindow.test.ts@@ -0,0 +1,269 @@+// @vitest-environment node+import { describe, expect, it } from 'vitest';++import {+ consumeSendCredits,+ drainPendingPushes,+ enqueuePendingPush,+ peekWindow,+ pendingPushSendCount,+ recordInboundToken,+ WECHAT_WINDOW_MAX_SENDS,+ wechatLegacyTokenKey,+ type WechatPendingPush,+ wechatPendingPushKey,+ wechatWindowKey,+ type WechatWindowRedis,+} from './contextWindow';++/** Minimal in-memory Redis covering the commands the window store uses. */+class FakeRedis implements WechatWindowRedis {+ hashes = new Map<string, Record<string, string>>();+ lists = new Map<string, string[]>();+ strings = new Map<string, string>();+ ttls = new Map<string, number>();++ async del(...keys: string[]) {+ for (const key of keys) {+ this.hashes.delete(key);+ this.lists.delete(key);+ this.strings.delete(key);+ this.ttls.delete(key);+ }+ return keys.length;+ }++ async expire(key: string, seconds: number) {+ this.ttls.set(key, seconds * 1000);+ return 1;+ }++ async get(key: string) {+ return this.strings.get(key) ?? null;+ }++ async hgetall(key: string) {+ return this.hashes.get(key) ?? {};+ }++ async hincrby(key: string, field: string, increment: number) {+ const hash = this.hashes.get(key) ?? {};+ const next = (Number(hash[field]) || 0) + increment;+ hash[field] = String(next);+ this.hashes.set(key, hash);+ return next;+ }++ async hset(key: string, data: Record<string, string | number>) {+ const hash = this.hashes.get(key) ?? {};+ for (const [field, value] of Object.entries(data)) hash[field] = String(value);+ this.hashes.set(key, hash);+ return Object.keys(data).length;+ }++ async llen(key: string) {+ return this.lists.get(key)?.length ?? 0;+ }++ async lpop(key: string) {+ return this.lists.get(key)?.shift() ?? null;+ }++ async lpush(key: string, value: string) {+ const list = this.lists.get(key) ?? [];+ list.unshift(value);+ this.lists.set(key, list);+ return list.length;+ }++ async ltrim(key: string, start: number, stop: number) {+ const list = this.lists.get(key) ?? [];+ const normalizedStop = stop < 0 ? list.length + stop : stop;+ this.lists.set(key, list.slice(start, normalizedStop + 1));+ return 'OK';+ }++ async pttl(key: string) {+ return this.ttls.get(key) ?? -1;+ }++ async rpush(key: string, value: string) {+ const list = this.lists.get(key) ?? [];+ list.push(value);+ this.lists.set(key, list);+ return list.length;+ }++ async set(key: string, value: string, ...args: (string | number)[]) {+ const nx = args.includes('NX');+ if (nx && this.strings.has(key)) return null;+ this.strings.set(key, value);+ const exIndex = args.indexOf('EX');+ if (exIndex !== -1) this.ttls.set(key, Number(args[exIndex + 1]) * 1000);+ return 'OK';+ }++ async ttl(key: string) {+ const ms = this.ttls.get(key);+ return ms === undefined ? -1 : Math.ceil(ms / 1000);+ }+}++const APP = '[email protected]';+const USER = '[email protected]';++describe('recordInboundToken', () => {+ it('resets the window with a full quota and mirrors the legacy key', async () => {+ const redis = new FakeRedis();+ await redis.hset(wechatWindowKey(APP, USER), { remaining: 1, token: 'old' });++ await recordInboundToken(redis, APP, USER, 'fresh-token');++ const sendWindow = await peekWindow(redis, APP, USER);+ expect(sendWindow).toMatchObject({ remaining: WECHAT_WINDOW_MAX_SENDS, token: 'fresh-token' });+ expect(await redis.get(wechatLegacyTokenKey(APP, USER))).toBe('fresh-token');+ });+});++describe('peekWindow', () => {+ it('returns null when neither window nor legacy token exists', async () => {+ expect(await peekWindow(new FakeRedis(), APP, USER)).toBeNull();+ });++ it('seeds the window from the legacy token key with a full quota', async () => {+ const redis = new FakeRedis();+ await redis.set(wechatLegacyTokenKey(APP, USER), 'legacy-token', 'EX', 3600);++ const sendWindow = await peekWindow(redis, APP, USER);++ expect(sendWindow).toMatchObject({ remaining: WECHAT_WINDOW_MAX_SENDS, token: 'legacy-token' });+ // Seeded window must not outlive the legacy token.+ expect(await redis.pttl(wechatWindowKey(APP, USER))).toBe(3600 * 1000);+ });+});++describe('consumeSendCredits', () => {+ it('decrements the quota and returns the token', async () => {+ const redis = new FakeRedis();+ await recordInboundToken(redis, APP, USER, 'token-1');++ const result = await consumeSendCredits(redis, APP, USER, 3);++ expect(result).toEqual({+ remaining: WECHAT_WINDOW_MAX_SENDS - 3,+ status: 'ok',+ token: 'token-1',+ });+ });++ it('reports missing when there is no window at all', async () => {+ expect(await consumeSendCredits(new FakeRedis(), APP, USER, 1)).toEqual({ status: 'missing' });+ });++ it('refuses to overdraw in strict mode and leaves the counter untouched', async () => {+ const redis = new FakeRedis();+ await recordInboundToken(redis, APP, USER, 'token-1');+ await consumeSendCredits(redis, APP, USER, WECHAT_WINDOW_MAX_SENDS);++ const result = await consumeSendCredits(redis, APP, USER, 1);++ expect(result).toEqual({ remaining: 0, status: 'exhausted', token: 'token-1' });+ expect((await peekWindow(redis, APP, USER))?.remaining).toBe(0);+ });++ it('allows the counter to go negative with allowOverdraft', async () => {+ const redis = new FakeRedis();+ await recordInboundToken(redis, APP, USER, 'token-1');+ await consumeSendCredits(redis, APP, USER, WECHAT_WINDOW_MAX_SENDS);++ const result = await consumeSendCredits(redis, APP, USER, 2, { allowOverdraft: true });++ expect(result).toEqual({ remaining: -2, status: 'ok', token: 'token-1' });+ });+});++describe('pendingPushSendCount', () => {+ it('counts text and attachments as separate sendmessage calls', () => {+ expect(pendingPushSendCount({ content: 'hi' })).toBe(1);+ expect(pendingPushSendCount({ content: 'a'.repeat(4500) })).toBe(3);+ expect(pendingPushSendCount({ attachments: [{ type: 'image' }, { type: 'file' }] })).toBe(2);+ expect(pendingPushSendCount({ attachments: [{ type: 'image' }], content: 'hi' })).toBe(2);+ // A degenerate empty payload still costs one call.+ expect(pendingPushSendCount({ content: ' ' })).toBe(1);+ });+});++describe('pending push queue', () => {+ const payload = (content: string): WechatPendingPush => ({ content, enqueuedAt: 1 });++ it('enqueues FIFO and drains in order', async () => {+ const redis = new FakeRedis();+ await enqueuePendingPush(redis, APP, USER, payload('first'));+ await enqueuePendingPush(redis, APP, USER, payload('second'));++ const drained: string[] = [];+ const sent = await drainPendingPushes(redis, APP, USER, async (p) => {+ drained.push(p.content!);+ return 'sent';+ });++ expect(sent).toBe(2);+ expect(drained).toEqual(['first', 'second']);+ expect(redis.lists.get(wechatPendingPushKey(APP, USER))).toEqual([]);+ });++ it('pushes a stopped payload back to the queue head', async () => {+ const redis = new FakeRedis();+ await enqueuePendingPush(redis, APP, USER, payload('first'));+ await enqueuePendingPush(redis, APP, USER, payload('second'));++ let calls = 0;+ const sent = await drainPendingPushes(redis, APP, USER, async () => {+ calls++;+ return calls === 1 ? 'sent' : 'stop';+ });++ expect(sent).toBe(1);+ const remaining = redis.lists.get(wechatPendingPushKey(APP, USER))!;+ expect(remaining).toHaveLength(1);+ expect(JSON.parse(remaining[0]).content).toBe('second');+ });++ it('skips draining while another flush holds the lock', async () => {+ const redis = new FakeRedis();+ await enqueuePendingPush(redis, APP, USER, payload('first'));+ await redis.set(`wechat:pending-flush:${APP}:${USER}`, '1', 'EX', 30);++ const sent = await drainPendingPushes(redis, APP, USER, async () => 'sent');++ expect(sent).toBe(0);+ expect(redis.lists.get(wechatPendingPushKey(APP, USER))).toHaveLength(1);+ });++ it('drops malformed payloads instead of blocking the queue', async () => {+ const redis = new FakeRedis();+ await redis.rpush(wechatPendingPushKey(APP, USER), 'not-json');+ await enqueuePendingPush(redis, APP, USER, payload('valid'));++ const drained: string[] = [];+ const sent = await drainPendingPushes(redis, APP, USER, async (p) => {+ drained.push(p.content!);+ return 'sent';+ });++ expect(sent).toBe(1);+ expect(drained).toEqual(['valid']);+ });++ it('caps the queue by dropping the oldest entries', async () => {+ const redis = new FakeRedis();+ for (let i = 0; i < 25; i++) {+ await enqueuePendingPush(redis, APP, USER, payload(`msg-${i}`));+ }++ const list = redis.lists.get(wechatPendingPushKey(APP, USER))!;+ expect(list).toHaveLength(20);+ expect(JSON.parse(list[0]).content).toBe('msg-5');+ expect(JSON.parse(list.at(-1)!).content).toBe('msg-24');+ });+});diff --git a/apps/server/src/services/bot/platforms/wechat/contextWindow.ts b/apps/server/src/services/bot/platforms/wechat/contextWindow.tsnew file mode 100644index 00000000000..9b93565ca52--- /dev/null+++ b/apps/server/src/services/bot/platforms/wechat/contextWindow.ts@@ -0,0 +1,273 @@+import { getWechatTextSendCount } from '@lobechat/chat-adapter-wechat';+import debug from 'debug';++import type { WechatOutboundAttachment } from './sendAttachments';++const log = debug('bot-platform:wechat:context-window');++/**+ * WeChat iLink send-window bookkeeping.+ *+ * The protocol gives no way to open a conversation from the bot side: every+ * outbound `sendmessage` must carry the `context_token` of a recent inbound+ * message, the token dies after ~24h, and every 10 outbound sends+ * require a fresh user-initiated message (see protocol-spec §5.10). This+ * module keeps that window explicit in Redis so callers can tell whether a+ * proactive push can be delivered now or must wait for the next inbound+ * message:+ *+ * - `wechat:ctx-window:{applicationId}:{userId}` — hash `token` / `remaining`+ * / `refreshedAt`, TTL 24h, quota reset on every inbound message.+ * - `wechat:ctx-token:{applicationId}:{userId}` — legacy plain-token key,+ * still written for older readers and consumed as a seed when the hash is+ * missing (rolling deploy compatibility).+ * - `wechat:pending-push:{applicationId}:{userId}` — proactive messages that+ * arrived while the window was closed, replayed on the next inbound message.+ *+ * The quota is best-effort bookkeeping — WeChat enforces the real limit — so+ * plain HINCRBY atomicity is enough; small races only shift when we start+ * queueing instead of sending.+ */++export const WECHAT_WINDOW_MAX_SENDS = 10;+export const WECHAT_WINDOW_TTL_SECONDS = 24 * 60 * 60;++const PENDING_QUEUE_MAX = 20;+const PENDING_QUEUE_TTL_SECONDS = 72 * 60 * 60;+const FLUSH_LOCK_TTL_SECONDS = 30;++/**+ * Minimal structural Redis contract — the runtime client is a raw ioredis+ * instance reaching us through loosely-typed contexts (see WechatGatewayClient),+ * so depend on the commands we use rather than the ioredis types.+ */+export interface WechatWindowRedis {+ del: (...keys: string[]) => Promise<unknown>;+ expire: (key: string, seconds: number) => Promise<unknown>;+ get: (key: string) => Promise<string | null>;+ hgetall: (key: string) => Promise<Record<string, string> | null>;+ hincrby: (key: string, field: string, increment: number) => Promise<number>;+ hset: (key: string, data: Record<string, string | number>) => Promise<unknown>;+ llen: (key: string) => Promise<number>;+ lpop: (key: string) => Promise<string | null>;+ lpush: (key: string, value: string) => Promise<unknown>;+ ltrim: (key: string, start: number, stop: number) => Promise<unknown>;+ pttl: (key: string) => Promise<number>;+ rpush: (key: string, value: string) => Promise<number>;+ set: (key: string, value: string, ...args: (string | number)[]) => Promise<unknown>;+ ttl: (key: string) => Promise<number>;+}++export const wechatLegacyTokenKey = (applicationId: string, userId: string): string =>+ `wechat:ctx-token:${applicationId}:${userId}`;++export const wechatWindowKey = (applicationId: string, userId: string): string =>+ `wechat:ctx-window:${applicationId}:${userId}`;++export const wechatPendingPushKey = (applicationId: string, userId: string): string =>+ `wechat:pending-push:${applicationId}:${userId}`;++const flushLockKey = (applicationId: string, userId: string): string =>+ `wechat:pending-flush:${applicationId}:${userId}`;++export interface WechatSendWindow {+ refreshedAt: number;+ remaining: number;+ token: string;+}++/**+ * Record the `context_token` of an inbound message: refresh the token, reset+ * the outbound quota, and restart the 24h clock. Also mirrors the legacy+ * plain-token key so pre-window readers keep working during rollout.+ */+export const recordInboundToken = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+ token: string,+): Promise<void> => {+ const windowKey = wechatWindowKey(applicationId, userId);+ await Promise.all([+ redis+ .hset(windowKey, {+ refreshedAt: Date.now(),+ remaining: WECHAT_WINDOW_MAX_SENDS,+ token,+ })+ .then(() => redis.expire(windowKey, WECHAT_WINDOW_TTL_SECONDS)),+ redis.set(wechatLegacyTokenKey(applicationId, userId), token, 'EX', WECHAT_WINDOW_TTL_SECONDS),+ ]);+};++/**+ * Seed a window hash from the legacy plain-token key (written by deploys that+ * predate quota tracking). The seeded window inherits the legacy TTL so it+ * never outlives the token, and starts with a full quota — optimistic, but the+ * legacy key carries no send count to recover.+ */+const seedFromLegacyToken = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+): Promise<WechatSendWindow | null> => {+ const token = await redis.get(wechatLegacyTokenKey(applicationId, userId));+ if (!token) return null;++ const windowKey = wechatWindowKey(applicationId, userId);+ // NOTE: never name these locals `window` — bundlers substitute the global+ // `window` at compile time and silently break the null checks.+ const seeded: WechatSendWindow = {+ refreshedAt: Date.now(),+ remaining: WECHAT_WINDOW_MAX_SENDS,+ token,+ };+ await redis.hset(windowKey, seeded as unknown as Record<string, string | number>);++ const legacyPttl = await redis.pttl(wechatLegacyTokenKey(applicationId, userId));+ await redis.expire(+ windowKey,+ legacyPttl > 0 ? Math.ceil(legacyPttl / 1000) : WECHAT_WINDOW_TTL_SECONDS,+ );+ return seeded;+};++/** Read the current send window without consuming quota. */+export const peekWindow = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+): Promise<WechatSendWindow | null> => {+ const raw = await redis.hgetall(wechatWindowKey(applicationId, userId));+ if (raw?.token) {+ return {+ refreshedAt: Number(raw.refreshedAt) || 0,+ remaining: Number.isFinite(Number(raw.remaining)) ? Number(raw.remaining) : 0,+ token: raw.token,+ };+ }+ // `return await` is load-bearing: returning the bare promise makes+ // Turbopack's value analysis treat this function's result as always-truthy+ // and constant-fold callers' `if (!window)` guards into dead code.+ return await seedFromLegacyToken(redis, applicationId, userId);+};++export type ConsumeSendCreditsResult =+ | { remaining: number; status: 'ok'; token: string }+ | { remaining: number; status: 'exhausted'; token: string }+ | { status: 'missing' };++/**+ * Consume `count` outbound sends from the window.+ *+ * - Strict mode (default): refuses to go below zero and reports `exhausted`+ * without touching the counter — the proactive-push path uses this to decide+ * between sending and queueing.+ * - `allowOverdraft`: always returns the token and lets the counter go+ * negative — reply paths use this for pure bookkeeping, because refusing to+ * answer a user who just messaged us would be worse than a failed send.+ */+export const consumeSendCredits = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+ count: number,+ options?: { allowOverdraft?: boolean },+): Promise<ConsumeSendCreditsResult> => {+ const sendWindow = await peekWindow(redis, applicationId, userId);+ if (!sendWindow) return { status: 'missing' };++ const windowKey = wechatWindowKey(applicationId, userId);+ const remaining = await redis.hincrby(windowKey, 'remaining', -count);++ if (remaining < 0 && !options?.allowOverdraft) {+ await redis.hincrby(windowKey, 'remaining', count);+ return { remaining: remaining + count, status: 'exhausted', token: sendWindow.token };+ }++ return { remaining, status: 'ok', token: sendWindow.token };+};++/** A proactive push that arrived while the send window was closed. */+export interface WechatPendingPush {+ attachments?: WechatOutboundAttachment[];+ content?: string;+ enqueuedAt: number;+}++/** Number of `sendmessage` calls a payload will consume. */+export const pendingPushSendCount = (payload: Pick<WechatPendingPush, 'attachments' | 'content'>) =>+ Math.max(+ 1,+ (payload.content?.trim() ? getWechatTextSendCount(payload.content) : 0) ++ (payload.attachments?.length ?? 0),+ );++/**+ * Queue a proactive push for replay on the next inbound message. The queue is+ * capped (oldest dropped first) and expires after 72h — a user who has not+ * messaged for three days should not get a burst of stale notifications.+ */+export const enqueuePendingPush = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+ payload: WechatPendingPush,+): Promise<number> => {+ const key = wechatPendingPushKey(applicationId, userId);+ const length = await redis.rpush(key, JSON.stringify(payload));+ if (length > PENDING_QUEUE_MAX) {+ await redis.ltrim(key, length - PENDING_QUEUE_MAX, -1);+ log(+ 'enqueuePendingPush: queue for %s:%s trimmed to %d',+ applicationId,+ userId,+ PENDING_QUEUE_MAX,+ );+ }+ await redis.expire(key, PENDING_QUEUE_TTL_SECONDS);+ return Math.min(length, PENDING_QUEUE_MAX);+};++/**+ * Replay queued pushes in FIFO order under a short NX lock (concurrent inbound+ * messages must not double-send). The handler returns `sent` to continue or+ * `stop` to halt — a stopped payload is pushed back to the queue head.+ */+export const drainPendingPushes = async (+ redis: WechatWindowRedis,+ applicationId: string,+ userId: string,+ send: (payload: WechatPendingPush) => Promise<'sent' | 'stop'>,+): Promise<number> => {+ const lockKey = flushLockKey(applicationId, userId);+ const locked = await redis.set(lockKey, '1', 'EX', FLUSH_LOCK_TTL_SECONDS, 'NX');+ if (locked !== 'OK') return 0;++ let sent = 0;+ try {+ const pendingKey = wechatPendingPushKey(applicationId, userId);+ while (true) {+ const raw = await redis.lpop(pendingKey);+ if (!raw) break;++ let payload: WechatPendingPush;+ try {+ payload = JSON.parse(raw) as WechatPendingPush;+ } catch {+ log('drainPendingPushes: dropping malformed payload for %s:%s', applicationId, userId);+ continue;+ }++ const result = await send(payload);+ if (result === 'stop') {+ await redis.lpush(pendingKey, raw);+ break;+ }+ sent++;+ }+ } finally {+ await redis.del(lockKey);+ }+ return sent;+};diff --git a/apps/server/src/services/bot/platforms/wechat/service.test.ts b/apps/server/src/services/bot/platforms/wechat/service.test.tsindex b122cf3cbf8..b7950ea4684 100644--- a/apps/server/src/services/bot/platforms/wechat/service.test.ts+++ b/apps/server/src/services/bot/platforms/wechat/service.test.ts@@ -16,13 +16,22 @@ const WechatUploadMediaType = vi.hoisted(() => ({}));vi.mock('@lobechat/chat-adapter-wechat', () => ({+ getWechatTextSendCount: (text: string) => Math.max(1, Math.ceil(text.length / 2000)),MessageItemType,WechatUploadMediaType,}));const mockRedisGet = vi.hoisted(() => vi.fn().mockResolvedValue(null));+// Window bookkeeping commands used by contextWindow (legacy-token seeding path).+const mockWindowRedis = vi.hoisted(() => ({+ expire: vi.fn().mockResolvedValue(1),+ hgetall: vi.fn().mockResolvedValue({}),+ hincrby: vi.fn().mockResolvedValue(9),+ hset: vi.fn().mockResolvedValue(1),+ pttl: vi.fn().mockResolvedValue(-1),+}));vi.mock('@/server/modules/AgentRuntime/redis', () => ({- getAgentRuntimeRedisClient: () => ({ get: mockRedisGet }),+ getAgentRuntimeRedisClient: () => ({ get: mockRedisGet, ...mockWindowRedis }),}));const { WechatMessageService } = await import('./service');@@ -59,6 +68,29 @@ describe('WechatMessageService.sendMessage', () => {expect(api.sendItem).not.toHaveBeenCalled();});+ it('consumes one send-window credit per long-text chunk', async () => {+ const api = makeApi();+ const service = new WechatMessageService(api as any, 'app-1');+ mockWindowRedis.hgetall.mockResolvedValueOnce({+ refreshedAt: '1',+ remaining: '10',+ token: 'ctx-1',+ });+ mockWindowRedis.hincrby.mockResolvedValueOnce(7);++ await service.sendMessage({+ channelId: '[email protected]',+ content: 'a'.repeat(4500),+ platform: 'wechat',+ });++ expect(mockWindowRedis.hincrby).toHaveBeenCalledWith(+ 'wechat:ctx-window:app-1:[email protected]',+ 'remaining',+ -3,+ );+ });+it('uploads + sends attachments as separate iLink items (text + image)', async () => {const api = makeApi();mockRedisGet.mockResolvedValueOnce('ctx-1');diff --git a/apps/server/src/services/bot/platforms/wechat/service.ts b/apps/server/src/services/bot/platforms/wechat/service.tsindex 2c6ed2ff6b0..c39ab7c93b3 100644--- a/apps/server/src/services/bot/platforms/wechat/service.ts+++ b/apps/server/src/services/bot/platforms/wechat/service.ts@@ -35,11 +35,13 @@ import type {UnpinMessageState,} from '@lobechat/builtin-tool-message/executionRuntime';import type { WechatApiClient } from '@lobechat/chat-adapter-wechat';+import { getWechatTextSendCount } from '@lobechat/chat-adapter-wechat';import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';import type { MessageRuntimeService } from '@/server/services/toolExecution/serverRuntimes/message/adapters/types';import { PlatformUnsupportedError } from '@/server/services/toolExecution/serverRuntimes/message/PlatformUnsupportedError';+import { consumeSendCredits, type WechatWindowRedis } from './contextWindow';import { sendWechatAttachments } from './sendAttachments';/**@@ -62,19 +64,24 @@ export class WechatMessageService implements MessageRuntimeService {}/**- * Resolve the context token for a target user from Redis.- * The gateway client stores it at `wechat:ctx-token:${applicationId}:${userId}`.+ * Resolve the context token for a target user from the Redis send window+ * (with legacy `wechat:ctx-token:*` fallback), consuming quota bookkeeping+ * for the sends about to happen.+ *+ * Best-effort: falls back to empty string. Testing shows sendMessage works+ * even without a context_token in some sessions, but providing one ensures+ * reliable delivery to the correct conversation.*/- private async resolveContextToken(userId: string): Promise<string> {- // Best-effort: try Redis first, fall back to empty string.- // Testing shows sendMessage works even without a context_token in some sessions,- // but providing one ensures reliable message delivery to the correct conversation.+ private async resolveContextToken(userId: string, sendCount: number): Promise<string> {try {- const redis = getAgentRuntimeRedisClient();+ const redis = getAgentRuntimeRedisClient() as WechatWindowRedis | null;if (redis) {- const key = `wechat:ctx-token:${this.applicationId}:${userId}`;- const token = await redis.get(key);- if (token) return token;+ // Overdraft allowed — this is a user-facing tool call, not a silent+ // proactive push; the counter just has to stay honest.+ const credit = await consumeSendCredits(redis, this.applicationId, userId, sendCount, {+ allowOverdraft: true,+ });+ if (credit.status === 'ok') return credit.token;}} catch {// Redis unavailable — fall through@@ -85,7 +92,10 @@ export class WechatMessageService implements MessageRuntimeService {// ==================== Core Message Operations ====================sendMessage = async (params: SendMessageParams): Promise<SendMessageState> => {- const contextToken = await this.resolveContextToken(params.channelId);+ const sendCount =+ (params.content ? getWechatTextSendCount(params.content) : 0) ++ (params.attachments?.length ?? 0);+ const contextToken = await this.resolveContextToken(params.channelId, Math.max(1, sendCount));if (params.content) {await this.api.sendMessage(params.channelId, params.content, contextToken);}diff --git a/apps/server/src/services/messenger/installations/wechat.test.ts b/apps/server/src/services/messenger/installations/wechat.test.tsindex 9710edcc277..bb15ab94f86 100644--- a/apps/server/src/services/messenger/installations/wechat.test.ts+++ b/apps/server/src/services/messenger/installations/wechat.test.ts@@ -1,14 +1,25 @@// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';+import { WECHAT_WINDOW_MAX_SENDS } from '@/server/services/bot/platforms/wechat/contextWindow';+import { wechatInstallationKey, WechatInstallationStore } from './wechat';-const { mockFindByPlatformUserWithCredentials, mockGetMessengerWechatConfig, mockRedisSet } =- vi.hoisted(() => ({- mockFindByPlatformUserWithCredentials: vi.fn(),- mockGetMessengerWechatConfig: vi.fn(),- mockRedisSet: vi.fn(),- }));+const {+ mockFindByPlatformUserWithCredentials,+ mockFlushPendingWechatPushes,+ mockGetMessengerWechatConfig,+ mockRedisExpire,+ mockRedisHset,+ mockRedisSet,+} = vi.hoisted(() => ({+ mockFindByPlatformUserWithCredentials: vi.fn(),+ mockFlushPendingWechatPushes: vi.fn(),+ mockGetMessengerWechatConfig: vi.fn(),+ mockRedisExpire: vi.fn(),+ mockRedisHset: vi.fn(),+ mockRedisSet: vi.fn(),+}));vi.mock('@/config/messenger', () => ({getMessengerWechatConfig: mockGetMessengerWechatConfig,@@ -25,13 +36,21 @@ vi.mock('@/database/models/messengerAccountLink', () => ({}));vi.mock('@/server/modules/AgentRuntime/redis', () => ({- getAgentRuntimeRedisClient: () => ({ set: mockRedisSet }),+ getAgentRuntimeRedisClient: () => ({+ expire: mockRedisExpire,+ hset: mockRedisHset,+ set: mockRedisSet,+ }),}));vi.mock('@/server/modules/KeyVaultsEncrypt', () => ({KeyVaultsGateKeeper: { initWithEnvKey: vi.fn().mockResolvedValue({ kind: 'gatekeeper' }) },}));+vi.mock('@/server/services/messenger/wechatPush', () => ({+ flushPendingWechatPushes: mockFlushPendingWechatPushes,+}));+const accountLink = {accessedAt: new Date(),activeAgentId: 'agent-1',@@ -57,6 +76,9 @@ beforeEach(() => {mockGetMessengerWechatConfig.mockResolvedValue({ enabled: true });mockFindByPlatformUserWithCredentials.mockResolvedValue(accountLink);mockRedisSet.mockResolvedValue('OK');+ mockRedisHset.mockResolvedValue(1);+ mockRedisExpire.mockResolvedValue(1);+ mockFlushPendingWechatPushes.mockResolvedValue(0);});describe('WechatInstallationStore', () => {@@ -89,12 +111,26 @@ describe('WechatInstallationStore', () => {platform: 'wechat',tenantId: '[email protected]',});+ // Legacy plain-token key stays mirrored for older readers…expect(mockRedisSet).toHaveBeenCalledWith('wechat:ctx-token:[email protected]:[email protected]','context-1','EX',86_400,);+ // …while the send window resets with a fresh quota.+ expect(mockRedisHset).toHaveBeenCalledWith(+ 'wechat:ctx-window:[email protected]:[email protected]',+ expect.objectContaining({ remaining: WECHAT_WINDOW_MAX_SENDS, token: 'context-1' }),+ );+ // The reopened window triggers a pending-push replay.+ expect(mockFlushPendingWechatPushes).toHaveBeenCalledWith(+ expect.objectContaining({+ applicationId: '[email protected]',+ botToken: 'secret-token',+ platformUserId: '[email protected]',+ }),+ );});it('fails closed for an unknown sender without persisting its context token', async () => {diff --git a/apps/server/src/services/messenger/installations/wechat.ts b/apps/server/src/services/messenger/installations/wechat.tsindex d46bc6b4255..c241c834450 100644--- a/apps/server/src/services/messenger/installations/wechat.ts+++ b/apps/server/src/services/messenger/installations/wechat.ts@@ -7,11 +7,13 @@ import type { DecryptedMessengerAccountLink } from '@/database/models/messengerAimport { MessengerAccountLinkModel } from '@/database/models/messengerAccountLink';import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';+import type { WechatWindowRedis } from '@/server/services/bot/platforms/wechat/contextWindow';+import { recordInboundToken } from '@/server/services/bot/platforms/wechat/contextWindow';+import { flushPendingWechatPushes } from '@/server/services/messenger/wechatPush';import type { InstallationCredentials, MessengerInstallationStore } from './types';const log = debug('lobe-server:messenger:install-store:wechat');-const CONTEXT_TOKEN_TTL_SECONDS = 24 * 60 * 60;interface WechatCredentialsBlob {baseUrl?: string;@@ -73,10 +75,29 @@ export class WechatInstallationStore implements MessengerInstallationStore {if (!credentials) return null;if (payload.context_token) {- const redis = getAgentRuntimeRedisClient();+ const redis = getAgentRuntimeRedisClient() as WechatWindowRedis | null;if (redis) {- const key = `wechat:ctx-token:${credentials.applicationId}:${payload.from_user_id}`;- await redis.set(key, payload.context_token, 'EX', CONTEXT_TOKEN_TTL_SECONDS);+ await recordInboundToken(+ redis,+ credentials.applicationId,+ payload.from_user_id,+ payload.context_token,+ );++ // The window just reopened — replay proactive pushes queued while it+ // was closed. Fire-and-forget: the inbound message still has to reach+ // the router and start the agent run, which keeps the process alive+ // long enough for the bounded flush to finish.+ void flushPendingWechatPushes({+ applicationId: credentials.applicationId,+ baseUrl: credentials.baseUrl,+ botId: credentials.botId,+ botToken: credentials.botToken,+ platformUserId: payload.from_user_id,+ redis,+ }).catch((error) => {+ log('resolveByPayload: pending push flush failed: %O', error);+ });}}diff --git a/apps/server/src/services/messenger/push/index.ts b/apps/server/src/services/messenger/push/index.tsnew file mode 100644index 00000000000..1beab00b889--- /dev/null+++ b/apps/server/src/services/messenger/push/index.ts@@ -0,0 +1,65 @@+import type { LobeChatDatabase } from '@/database/type';+import type { WechatOutboundAttachment } from '@/server/services/bot/platforms/wechat/sendAttachments';+import {+ getWechatPushWindowStatus,+ sendProactiveWechatMessage,+ type WechatPushResult,+ type WechatPushWindowStatus,+} from '@/server/services/messenger/wechatPush';++/**+ * Platform-agnostic proactive push for messenger channels.+ *+ * This is the single entry the notification-channel integration and the+ * settings UI build on. Delivery semantics differ per platform:+ *+ * - `windowed` platforms (WeChat iLink) can only deliver inside a send window+ * opened by the user's inbound message; outside it the message is queued and+ * replayed on the next inbound message.+ * - `always` platforms (Telegram / Slack / Discord bots) can DM the linked+ * user at any time — their adapters report an always-open window.+ *+ * To add a platform: implement its send + window status against the user's+ * `messenger_account_links` row, then extend `MESSENGER_PUSH_PLATFORMS` and+ * the two switches below. Keep the result contract identical so callers stay+ * platform-blind.+ */++export const MESSENGER_PUSH_PLATFORMS = ['wechat'] as const;++export type MessengerPushPlatform = (typeof MESSENGER_PUSH_PLATFORMS)[number];++export type MessengerPushResult = WechatPushResult;++export interface MessengerPushWindowStatus extends WechatPushWindowStatus {+ /** How the platform delivers proactive messages. */+ deliverability: 'windowed' | 'always';+}++export const sendMessengerPush = async (params: {+ attachments?: WechatOutboundAttachment[];+ content?: string;+ platform: MessengerPushPlatform;+ serverDB: LobeChatDatabase;+ userId: string;+}): Promise<MessengerPushResult> => {+ const { platform, ...rest } = params;+ switch (platform) {+ case 'wechat': {+ return sendProactiveWechatMessage(rest);+ }+ }+};++export const getMessengerPushWindow = async (params: {+ platform: MessengerPushPlatform;+ serverDB: LobeChatDatabase;+ userId: string;+}): Promise<MessengerPushWindowStatus> => {+ const { platform, ...rest } = params;+ switch (platform) {+ case 'wechat': {+ return { ...(await getWechatPushWindowStatus(rest)), deliverability: 'windowed' };+ }+ }+};diff --git a/apps/server/src/services/messenger/wechatPush.test.ts b/apps/server/src/services/messenger/wechatPush.test.tsnew file mode 100644index 00000000000..27ae156d213--- /dev/null+++ b/apps/server/src/services/messenger/wechatPush.test.ts@@ -0,0 +1,360 @@+// @vitest-environment node+import { beforeEach, describe, expect, it, vi } from 'vitest';++import type { LobeChatDatabase } from '@/database/type';+import {+ consumeSendCredits,+ enqueuePendingPush,+ peekWindow,+ recordInboundToken,+ WECHAT_WINDOW_MAX_SENDS,+ wechatPendingPushKey,+ type WechatWindowRedis,+} from '@/server/services/bot/platforms/wechat/contextWindow';++import {+ flushPendingWechatPushes,+ getWechatPushWindowStatus,+ sendProactiveWechatMessage,+} from './wechatPush';++const { mockFindByPlatform, mockFindByIdWithCredentials, mockSendMessage, redisHolder } =+ vi.hoisted(() => ({+ mockFindByIdWithCredentials: vi.fn(),+ mockFindByPlatform: vi.fn(),+ mockSendMessage: vi.fn(),+ redisHolder: { current: null as unknown },+ }));++vi.mock('@lobechat/chat-adapter-wechat', () => ({+ getWechatTextSendCount: (text: string) => Math.max(1, Math.ceil(text.length / 2000)),+ WechatApiClient: class {+ sendMessage = mockSendMessage;+ },+}));++vi.mock('@/database/models/messengerAccountLink', () => ({+ MessengerAccountLinkModel: class {+ findByIdWithCredentials = mockFindByIdWithCredentials;+ findByPlatform = mockFindByPlatform;+ },+}));++vi.mock('@/server/modules/AgentRuntime/redis', () => ({+ getAgentRuntimeRedisClient: () => redisHolder.current,+}));++vi.mock('@/server/modules/KeyVaultsEncrypt', () => ({+ KeyVaultsGateKeeper: { initWithEnvKey: vi.fn().mockResolvedValue({ kind: 'gatekeeper' }) },+}));++/** Minimal in-memory Redis covering the commands the window store uses. */+class FakeRedis implements WechatWindowRedis {+ hashes = new Map<string, Record<string, string>>();+ lists = new Map<string, string[]>();+ strings = new Map<string, string>();+ ttls = new Map<string, number>();++ async del(...keys: string[]) {+ for (const key of keys) {+ this.hashes.delete(key);+ this.lists.delete(key);+ this.strings.delete(key);+ }+ return keys.length;+ }++ async expire(key: string, seconds: number) {+ this.ttls.set(key, seconds * 1000);+ return 1;+ }++ async get(key: string) {+ return this.strings.get(key) ?? null;+ }++ async hgetall(key: string) {+ return this.hashes.get(key) ?? {};+ }++ async hincrby(key: string, field: string, increment: number) {+ const hash = this.hashes.get(key) ?? {};+ const next = (Number(hash[field]) || 0) + increment;+ hash[field] = String(next);+ this.hashes.set(key, hash);+ return next;+ }++ async hset(key: string, data: Record<string, string | number>) {+ const hash = this.hashes.get(key) ?? {};+ for (const [field, value] of Object.entries(data)) hash[field] = String(value);+ this.hashes.set(key, hash);+ return Object.keys(data).length;+ }++ async llen(key: string) {+ return this.lists.get(key)?.length ?? 0;+ }++ async lpop(key: string) {+ return this.lists.get(key)?.shift() ?? null;+ }++ async lpush(key: string, value: string) {+ const list = this.lists.get(key) ?? [];+ list.unshift(value);+ this.lists.set(key, list);+ return list.length;+ }++ async ltrim(key: string, start: number, stop: number) {+ const list = this.lists.get(key) ?? [];+ const normalizedStop = stop < 0 ? list.length + stop : stop;+ this.lists.set(key, list.slice(start, normalizedStop + 1));+ return 'OK';+ }++ async pttl(key: string) {+ return this.ttls.get(key) ?? -1;+ }++ async rpush(key: string, value: string) {+ const list = this.lists.get(key) ?? [];+ list.push(value);+ this.lists.set(key, list);+ return list.length;+ }++ async set(key: string, value: string, ...args: (string | number)[]) {+ if (args.includes('NX') && this.strings.has(key)) return null;+ this.strings.set(key, value);+ const exIndex = args.indexOf('EX');+ if (exIndex !== -1) this.ttls.set(key, Number(args[exIndex + 1]) * 1000);+ return 'OK';+ }++ async ttl(key: string) {+ const ms = this.ttls.get(key);+ return ms === undefined ? -1 : Math.ceil(ms / 1000);+ }+}++const APP = '[email protected]';+const WECHAT_USER = '[email protected]';+const LOBE_USER = 'user-1';+const serverDB = { kind: 'db' } as unknown as LobeChatDatabase;++const safeLink = { applicationId: APP, id: 'link-1' };+const decryptedLink = {+ applicationId: APP,+ credentials: { baseUrl: 'https://ilink.example.com', botId: APP, botToken: 'secret' },+ id: 'link-1',+ platformUserId: WECHAT_USER,+};++let redis: FakeRedis;++beforeEach(() => {+ vi.clearAllMocks();+ redis = new FakeRedis();+ redisHolder.current = redis;+ mockFindByPlatform.mockResolvedValue(safeLink);+ mockFindByIdWithCredentials.mockResolvedValue(decryptedLink);+ mockSendMessage.mockResolvedValue({ ret: 0 });+});++describe('sendProactiveWechatMessage', () => {+ it('delivers inside an open send window and consumes quota', async () => {+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-1');++ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ remaining: WECHAT_WINDOW_MAX_SENDS - 1, status: 'sent' });+ expect(mockSendMessage).toHaveBeenCalledWith(WECHAT_USER, 'hello', 'token-1');+ });++ it('delivers the displayed final send before queueing the next message', async () => {+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-1');+ await consumeSendCredits(redis, APP, WECHAT_USER, WECHAT_WINDOW_MAX_SENDS - 1);++ const finalSend = await sendProactiveWechatMessage({+ content: 'final available send',+ serverDB,+ userId: LOBE_USER,+ });+ const queued = await sendProactiveWechatMessage({+ content: 'wait for next window',+ serverDB,+ userId: LOBE_USER,+ });++ expect(finalSend).toEqual({ remaining: 0, status: 'sent' });+ expect(queued).toEqual({ status: 'queued' });+ expect(mockSendMessage).toHaveBeenCalledTimes(1);+ });++ it('queues when there is no send window', async () => {+ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ status: 'queued' });+ expect(mockSendMessage).not.toHaveBeenCalled();+ expect(redis.lists.get(wechatPendingPushKey(APP, WECHAT_USER))).toHaveLength(1);+ });++ it('queues when the window quota is exhausted', async () => {+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-1');+ await consumeSendCredits(redis, APP, WECHAT_USER, WECHAT_WINDOW_MAX_SENDS);++ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ status: 'queued' });+ expect(mockSendMessage).not.toHaveBeenCalled();+ });++ it('queues for replay when the send itself fails', async () => {+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-1');+ mockSendMessage.mockRejectedValueOnce(new Error('stale token'));++ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ status: 'queued' });+ expect(redis.lists.get(wechatPendingPushKey(APP, WECHAT_USER))).toHaveLength(1);+ });++ it('reports unlinked when the user has no WeChat account link', async () => {+ mockFindByPlatform.mockResolvedValueOnce(undefined);++ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ status: 'unlinked' });+ });++ it('reports unavailable when redis is down', async () => {+ redisHolder.current = null;++ const result = await sendProactiveWechatMessage({+ content: 'hello',+ serverDB,+ userId: LOBE_USER,+ });++ expect(result).toEqual({ status: 'unavailable' });+ });+});++describe('getWechatPushWindowStatus', () => {+ it('reports unlinked users with a closed window', async () => {+ mockFindByPlatform.mockResolvedValueOnce(undefined);++ const status = await getWechatPushWindowStatus({ serverDB, userId: LOBE_USER });++ expect(status).toMatchObject({ linked: false, queued: 0, remaining: 0, windowOpen: false });+ });++ it('reports a closed window when no token was ever recorded', async () => {+ mockFindByPlatform.mockResolvedValueOnce({+ ...safeLink,+ platformUserId: WECHAT_USER,+ });++ const status = await getWechatPushWindowStatus({ serverDB, userId: LOBE_USER });++ expect(status).toMatchObject({+ expiresInSeconds: null,+ linked: true,+ remaining: 0,+ windowOpen: false,+ });+ });++ it('reports the open window with remaining quota, expiry and queued backlog', async () => {+ mockFindByPlatform.mockResolvedValueOnce({+ ...safeLink,+ platformUserId: WECHAT_USER,+ });+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-1');+ await consumeSendCredits(redis, APP, WECHAT_USER, 3);+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'later', enqueuedAt: 1 });++ const status = await getWechatPushWindowStatus({ serverDB, userId: LOBE_USER });++ expect(status).toMatchObject({+ expiresInSeconds: 86_400,+ linked: true,+ maxSends: WECHAT_WINDOW_MAX_SENDS,+ queued: 1,+ remaining: WECHAT_WINDOW_MAX_SENDS - 3,+ windowOpen: true,+ });+ });+});++describe('flushPendingWechatPushes', () => {+ const flushParams = {+ applicationId: APP,+ baseUrl: 'https://ilink.example.com',+ botId: APP,+ botToken: 'secret',+ platformUserId: WECHAT_USER,+ };++ it('replays queued pushes in order once the window reopens', async () => {+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'first', enqueuedAt: 1 });+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'second', enqueuedAt: 2 });+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-2');++ const sent = await flushPendingWechatPushes({ ...flushParams, redis });++ expect(sent).toBe(2);+ expect(mockSendMessage).toHaveBeenNthCalledWith(1, WECHAT_USER, 'first', 'token-2');+ expect(mockSendMessage).toHaveBeenNthCalledWith(2, WECHAT_USER, 'second', 'token-2');+ expect((await peekWindow(redis, APP, WECHAT_USER))?.remaining).toBe(+ WECHAT_WINDOW_MAX_SENDS - 2,+ );+ });++ it('keeps credits in reserve for the live reply', async () => {+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'first', enqueuedAt: 1 });+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'second', enqueuedAt: 2 });+ await recordInboundToken(redis, APP, WECHAT_USER, 'token-2');+ // Only 3 credits left: one replay is allowed (3-1 >= 2), the second would+ // dip into the reserved reply budget and must stay queued.+ await consumeSendCredits(redis, APP, WECHAT_USER, WECHAT_WINDOW_MAX_SENDS - 3);++ const sent = await flushPendingWechatPushes({ ...flushParams, redis });++ expect(sent).toBe(1);+ expect(mockSendMessage).toHaveBeenCalledTimes(1);+ expect(redis.lists.get(wechatPendingPushKey(APP, WECHAT_USER))).toHaveLength(1);+ });++ it('does nothing when the window never reopened', async () => {+ await enqueuePendingPush(redis, APP, WECHAT_USER, { content: 'first', enqueuedAt: 1 });++ const sent = await flushPendingWechatPushes({ ...flushParams, redis });++ expect(sent).toBe(0);+ expect(mockSendMessage).not.toHaveBeenCalled();+ expect(redis.lists.get(wechatPendingPushKey(APP, WECHAT_USER))).toHaveLength(1);+ });+});diff --git a/apps/server/src/services/messenger/wechatPush.ts b/apps/server/src/services/messenger/wechatPush.tsnew file mode 100644index 00000000000..88fe1259a35--- /dev/null+++ b/apps/server/src/services/messenger/wechatPush.ts@@ -0,0 +1,247 @@+import { WechatApiClient } from '@lobechat/chat-adapter-wechat';+import debug from 'debug';++import { MessengerAccountLinkModel } from '@/database/models/messengerAccountLink';+import type { LobeChatDatabase } from '@/database/type';+import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';+import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';+import type {+ WechatPendingPush,+ WechatWindowRedis,+} from '@/server/services/bot/platforms/wechat/contextWindow';+import {+ consumeSendCredits,+ drainPendingPushes,+ enqueuePendingPush,+ peekWindow,+ pendingPushSendCount,+ WECHAT_WINDOW_MAX_SENDS,+ wechatPendingPushKey,+ wechatWindowKey,+} from '@/server/services/bot/platforms/wechat/contextWindow';+import type { WechatOutboundAttachment } from '@/server/services/bot/platforms/wechat/sendAttachments';+import { sendWechatAttachments } from '@/server/services/bot/platforms/wechat/sendAttachments';++const log = debug('lobe-server:messenger:wechat-push');++/**+ * Credits kept in reserve when replaying queued pushes on an inbound message:+ * the user just messaged us expecting a reply, and the reply path itself+ * consumes window quota — never let the backlog starve the live conversation.+ */+const RESERVED_REPLY_CREDITS = 2;++export type WechatPushStatus =+ /** Delivered inside the current send window. */+ | 'sent'+ /** Window closed or quota exhausted — queued for the next inbound message. */+ | 'queued'+ /** The user has no usable WeChat account link. */+ | 'unlinked'+ /** Redis (window state) is unavailable — cannot deliver or queue. */+ | 'unavailable';++export interface WechatPushResult {+ /** Remaining locally tracked sends after delivery (only for `sent`). */+ remaining?: number;+ status: WechatPushStatus;+}++interface WechatCredentialsBlob {+ baseUrl?: string;+ botId?: string;+ botToken?: string;+}++interface ResolvedWechatTarget {+ api: WechatApiClient;+ applicationId: string;+ platformUserId: string;+}++const resolveWechatTarget = async (+ serverDB: LobeChatDatabase,+ userId: string,+): Promise<ResolvedWechatTarget | null> => {+ const linkModel = new MessengerAccountLinkModel(serverDB, userId);+ const safeLink = await linkModel.findByPlatform('wechat');+ if (!safeLink?.applicationId) return null;++ const gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey();+ const link = await linkModel.findByIdWithCredentials(safeLink.id, 'wechat', gateKeeper);+ if (!link) return null;++ const blob = link.credentials as WechatCredentialsBlob;+ if (!blob?.botToken) {+ log('resolveWechatTarget: link %s has incomplete credentials', link.id);+ return null;+ }++ return {+ api: new WechatApiClient(blob.botToken, blob.botId, blob.baseUrl),+ applicationId: link.applicationId!,+ platformUserId: link.platformUserId,+ };+};++const deliver = async (+ api: WechatApiClient,+ platformUserId: string,+ token: string,+ payload: Pick<WechatPendingPush, 'attachments' | 'content'>,+): Promise<void> => {+ if (payload.content?.trim()) {+ await api.sendMessage(platformUserId, payload.content, token);+ }+ if (payload.attachments?.length) {+ await sendWechatAttachments(api, platformUserId, payload.attachments, token);+ }+};++export interface WechatPushWindowStatus {+ /** Seconds until the current window expires; null when no window is open. */+ expiresInSeconds: number | null;+ linked: boolean;+ maxSends: number;+ /** Proactive messages waiting for the next inbound message. */+ queued: number;+ remaining: number;+ windowOpen: boolean;+}++const CLOSED_WINDOW: Omit<WechatPushWindowStatus, 'linked' | 'queued'> = {+ expiresInSeconds: null,+ maxSends: WECHAT_WINDOW_MAX_SENDS,+ remaining: 0,+ windowOpen: false,+};++/**+ * Read-only send-window status for the current user's WeChat link — powers the+ * messenger settings UI (remaining quota, expiry, queued backlog). Uses the+ * safe link projection only; no credential decryption happens here.+ */+export const getWechatPushWindowStatus = async (params: {+ serverDB: LobeChatDatabase;+ userId: string;+}): Promise<WechatPushWindowStatus> => {+ const linkModel = new MessengerAccountLinkModel(params.serverDB, params.userId);+ const link = await linkModel.findByPlatform('wechat');+ if (!link?.applicationId) return { ...CLOSED_WINDOW, linked: false, queued: 0 };++ const redis = getAgentRuntimeRedisClient() as WechatWindowRedis | null;+ if (!redis) return { ...CLOSED_WINDOW, linked: true, queued: 0 };++ const applicationId = link.applicationId;+ const platformUserId = link.platformUserId;++ const sendWindow = await peekWindow(redis, applicationId, platformUserId);+ const [queued, ttl] = await Promise.all([+ redis.llen(wechatPendingPushKey(applicationId, platformUserId)),+ sendWindow ? redis.ttl(wechatWindowKey(applicationId, platformUserId)) : Promise.resolve(-1),+ ]);++ if (!sendWindow) return { ...CLOSED_WINDOW, linked: true, queued };++ return {+ expiresInSeconds: ttl > 0 ? ttl : null,+ linked: true,+ maxSends: WECHAT_WINDOW_MAX_SENDS,+ queued,+ remaining: Math.max(0, sendWindow.remaining),+ windowOpen: sendWindow.remaining > 0,+ };+};++/**+ * Proactively push a message to a LobeHub user's linked WeChat account.+ *+ * WeChat iLink offers no bot-initiated conversation API, so delivery is only+ * possible inside the current send window (a `context_token` from a recent+ * inbound message with quota left). Outside the window the message is queued+ * and replayed automatically the next time the user messages the bot — the+ * caller gets an honest `queued` instead of a silent failure.+ */+export const sendProactiveWechatMessage = async (params: {+ attachments?: WechatOutboundAttachment[];+ content?: string;+ serverDB: LobeChatDatabase;+ userId: string;+}): Promise<WechatPushResult> => {+ const { serverDB, userId, content, attachments } = params;+ if (!content?.trim() && !attachments?.length) return { status: 'unavailable' };++ const target = await resolveWechatTarget(serverDB, userId);+ if (!target) return { status: 'unlinked' };++ const redis = getAgentRuntimeRedisClient() as WechatWindowRedis | null;+ if (!redis) {+ log('sendProactiveWechatMessage: redis unavailable, cannot resolve send window');+ return { status: 'unavailable' };+ }++ const payload: WechatPendingPush = { attachments, content, enqueuedAt: Date.now() };+ const count = pendingPushSendCount(payload);+ const credit = await consumeSendCredits(+ redis,+ target.applicationId,+ target.platformUserId,+ count,+ );++ if (credit.status !== 'ok') {+ await enqueuePendingPush(redis, target.applicationId, target.platformUserId, payload);+ log(+ 'sendProactiveWechatMessage: window %s for user %s — queued',+ credit.status,+ target.platformUserId,+ );+ return { status: 'queued' };+ }++ try {+ await deliver(target.api, target.platformUserId, credit.token, payload);+ return { remaining: credit.remaining, status: 'sent' };+ } catch (error) {+ // The consumed credit is intentionally not refunded — a rejected send+ // usually means the token is stale, so undercounting is the safe side.+ log('sendProactiveWechatMessage: send failed, queueing for replay: %O', error);+ await enqueuePendingPush(redis, target.applicationId, target.platformUserId, payload);+ return { status: 'queued' };+ }+};++/**+ * Replay pushes queued while the window was closed. Called after an inbound+ * message refreshes the window (see WechatInstallationStore.resolveByPayload).+ * Stops early when the backlog would eat into the credits reserved for the+ * live reply.+ */+export const flushPendingWechatPushes = async (params: {+ applicationId: string;+ baseUrl?: string;+ botId?: string;+ botToken: string;+ platformUserId: string;+ redis: WechatWindowRedis;+}): Promise<number> => {+ const { redis, applicationId, platformUserId } = params;+ const api = new WechatApiClient(params.botToken, params.botId, params.baseUrl);++ return drainPendingPushes(redis, applicationId, platformUserId, async (payload) => {+ const count = pendingPushSendCount(payload);+ const sendWindow = await peekWindow(redis, applicationId, platformUserId);+ if (!sendWindow || sendWindow.remaining - count < RESERVED_REPLY_CREDITS) return 'stop';++ const credit = await consumeSendCredits(redis, applicationId, platformUserId, count);+ if (credit.status !== 'ok') return 'stop';++ try {+ await deliver(api, platformUserId, credit.token, payload);+ return 'sent';+ } catch (error) {+ log('flushPendingWechatPushes: replay failed for %s: %O', platformUserId, error);+ return 'stop';+ }+ });+};diff --git a/apps/server/src/services/resourcePermission/index.test.ts b/apps/server/src/services/resourcePermission/index.test.tsindex 97b0454e302..97b753139ce 100644--- a/apps/server/src/services/resourcePermission/index.test.ts+++ b/apps/server/src/services/resourcePermission/index.test.ts@@ -2,7 +2,10 @@import { beforeEach, describe, expect, it, vi } from 'vitest';import type { LobeChatDatabase } from '@/database/type';-import { getWorkspaceScopedPermissionMatches } from '@/server/services/workspacePermission';+import {+ getWorkspaceScopedPermissionMatches,+ isWorkspacePrimaryOwner,+} from '@/server/services/workspacePermission';import { canPerformResourceAction } from './index';@@ -16,9 +19,11 @@ vi.mock('@/database/models/resourcePermission', () => ({vi.mock('@/server/services/workspacePermission', () => ({getWorkspaceScopedPermissionMatches: vi.fn(),+ isWorkspacePrimaryOwner: vi.fn(),}));const permissionMatchesMock = vi.mocked(getWorkspaceScopedPermissionMatches);+const primaryOwnerMock = vi.mocked(isWorkspacePrimaryOwner);const db = {} as LobeChatDatabase;const meta = { userId: 'creator', visibility: 'public', workspaceId: 'ws-1' };@@ -27,7 +32,7 @@ describe('canPerformResourceAction', () => {vi.clearAllMocks();});- it('lets an action-specific all-scope grant override a view-only resource', async () => {+ it('lets a Workspace admin bypass view-only Member Permissions', async () => {permissionMatchesMock.mockResolvedValue({ hasAllScope: true, hasOwnerScope: false });effectiveAccessMock.mockResolvedValue('view');@@ -38,13 +43,117 @@ describe('canPerformResourceAction', () => {meta,resourceId: 'agent-1',resourceType: 'agent',- userId: 'workspace-owner',+ userId: 'workspace-admin',workspaceId: 'ws-1',}),).resolves.toBe(true);expect(effectiveAccessMock).not.toHaveBeenCalled();});+ it('lets the Agent author bypass view-only Member Permissions', async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: false, hasOwnerScope: true });+ effectiveAccessMock.mockResolvedValue('view');++ await expect(+ canPerformResourceAction({+ action: 'edit',+ db,+ meta,+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'creator',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(true);+ expect(effectiveAccessMock).not.toHaveBeenCalled();+ });++ it('lets the creator transfer their own agent', async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: false, hasOwnerScope: true });++ await expect(+ canPerformResourceAction({+ action: 'transfer',+ db,+ meta,+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'creator',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(true);+ expect(primaryOwnerMock).not.toHaveBeenCalled();+ });++ it('lets the primary owner transfer a shared agent created by someone else', async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: true, hasOwnerScope: false });+ primaryOwnerMock.mockResolvedValue(true);++ await expect(+ canPerformResourceAction({+ action: 'transfer',+ db,+ meta,+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'primary-owner',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(true);+ });++ it("rejects a co-admin transferring another member's shared agent", async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: true, hasOwnerScope: false });+ primaryOwnerMock.mockResolvedValue(false);++ await expect(+ canPerformResourceAction({+ action: 'transfer',+ db,+ meta,+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'workspace-admin',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(false);+ });++ it("rejects the primary owner transferring another member's private agent", async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: true, hasOwnerScope: false });+ primaryOwnerMock.mockResolvedValue(true);++ await expect(+ canPerformResourceAction({+ action: 'transfer',+ db,+ meta: { ...meta, visibility: 'private' },+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'primary-owner',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(false);+ expect(primaryOwnerMock).not.toHaveBeenCalled();+ });++ it('keeps changeVisibility creator-only even for the primary owner', async () => {+ permissionMatchesMock.mockResolvedValue({ hasAllScope: true, hasOwnerScope: false });+ primaryOwnerMock.mockResolvedValue(true);++ await expect(+ canPerformResourceAction({+ action: 'changeVisibility',+ db,+ meta,+ resourceId: 'agent-1',+ resourceType: 'agent',+ userId: 'primary-owner',+ workspaceId: 'ws-1',+ }),+ ).resolves.toBe(false);+ });+it('still applies the resource level to an ordinary member', async () => {permissionMatchesMock.mockResolvedValue({ hasAllScope: false, hasOwnerScope: true });effectiveAccessMock.mockResolvedValue('view');diff --git a/apps/server/src/services/resourcePermission/index.ts b/apps/server/src/services/resourcePermission/index.tsindex a8f9b8f652c..8212395970e 100644--- a/apps/server/src/services/resourcePermission/index.ts+++ b/apps/server/src/services/resourcePermission/index.ts@@ -6,7 +6,10 @@ import { ResourcePermissionModel } from '@/database/models/resourcePermission';import type { PermissionResourceType, ResourceAccessLevel } from '@/database/schemas';import { agents, chatGroups, documents, isResourceAccessLevelAllowed } from '@/database/schemas';import type { LobeChatDatabase } from '@/database/type';-import { getWorkspaceScopedPermissionMatches } from '@/server/services/workspacePermission';+import {+ getWorkspaceScopedPermissionMatches,+ isWorkspacePrimaryOwner,+} from '@/server/services/workspacePermission';export interface ResourceMeta {userId: string;@@ -98,8 +101,9 @@ const getRequiredAccessLevel = (action: ResourceAccessAction): ResourceAccessLev/*** Merge Workspace RBAC (the capability ceiling) with one public resource's- * Workspace access level. Creator and `:all` overrides never bypass the RBAC- * ceiling; private resources remain creator-only.+ * Workspace access level. The creator and Workspace admins (`:all`) bypass+ * Member Permissions for public resources, but never bypass the RBAC ceiling;+ * private resources remain creator-only.*/export const canPerformResourceAction = async (params: {action: ResourceAccessAction;@@ -129,11 +133,20 @@ export const canPerformResourceAction = async (params: {});const hasCapability = hasAllScope || hasOwnerScope;if (!hasCapability) return false;- if (action === 'changeVisibility' || action === 'transfer') return isCreator;+ if (action === 'changeVisibility') return isCreator;+ // Transfer rehomes the resource itself: allowed for the creator, or for the+ // workspace primary owner on shared resources (private ones were already+ // rejected above). Co-admins hold the same RBAC role as the primary owner+ // but must not take over other members' resources.+ if (action === 'transfer') {+ if (isCreator) return true;+ return isWorkspacePrimaryOwner({ db, userId, workspaceId });+ }if (action === 'manage') return isCreator || (!isPrivate && hasAllScope);if (action === 'delete') return isCreator || (!isPrivate && hasAllScope);- if (isCreator || (!isPrivate && hasAllScope)) return true;+ const bypassesMemberAccessLevel = isCreator || (!isPrivate && hasAllScope);+ if (bypassesMemberAccessLevel) return true;if (isPrivate) return false;const accessLevel = await new ResourcePermissionModel(db, workspaceId).getEffectiveAccessLevel(diff --git a/apps/server/src/services/toolExecution/serverRuntimes/message/index.ts b/apps/server/src/services/toolExecution/serverRuntimes/message/index.tsindex 48e8a0e0afa..2ba70df12a3 100644--- a/apps/server/src/services/toolExecution/serverRuntimes/message/index.ts+++ b/apps/server/src/services/toolExecution/serverRuntimes/message/index.ts@@ -38,6 +38,11 @@ import { SlackApi } from '@/server/services/bot/platforms/slack/api';import { SlackMessageService } from '@/server/services/bot/platforms/slack/service';import { TelegramApi } from '@/server/services/bot/platforms/telegram/api';import { TelegramMessageService } from '@/server/services/bot/platforms/telegram/service';+import {+ wechatLegacyTokenKey,+ wechatPendingPushKey,+ wechatWindowKey,+} from '@/server/services/bot/platforms/wechat/contextWindow';import { WechatMessageService } from '@/server/services/bot/platforms/wechat/service';import { GatewayService } from '@/server/services/gateway';import { getBotRuntimeStatus } from '@/server/services/gateway/runtimeStatus';@@ -143,7 +148,12 @@ const disconnectWechatAccountLink = async (if (!link.applicationId) return;const redis = getAgentRuntimeRedisClient();- if (redis) await redis.del(`wechat:ctx-token:${link.applicationId}:${link.tenantId}`);+ if (redis)+ await redis.del(+ wechatLegacyTokenKey(link.applicationId, link.tenantId),+ wechatWindowKey(link.applicationId, link.tenantId),+ wechatPendingPushKey(link.applicationId, link.tenantId),+ );};/**diff --git a/apps/server/src/services/workspacePermission/index.ts b/apps/server/src/services/workspacePermission/index.tsindex 472fdf337d2..f36084489e2 100644--- a/apps/server/src/services/workspacePermission/index.ts+++ b/apps/server/src/services/workspacePermission/index.ts@@ -2,10 +2,34 @@ import type { PERMISSION_ACTIONS, PermissionScope } from '@lobechat/const/rbac';import { and, eq, isNull } from 'drizzle-orm';import { RbacModel } from '@/database/models/rbac';-import { workspaceMembers } from '@/database/schemas';+import { workspaceMembers, workspaces } from '@/database/schemas';import type { LobeChatDatabase } from '@/database/type';import { getScopePermissions } from '@/utils/rbac';+/**+ * Whether the user is the workspace's primary owner. Both the primary owner+ * and co-admins hold the same `workspace_owner` RBAC role, so permission codes+ * cannot tell them apart — governance actions that must exclude admins (e.g.+ * transferring other members' resources) check `workspaces.primaryOwnerId`.+ */+export const isWorkspacePrimaryOwner = async ({+ db,+ userId,+ workspaceId,+}: {+ db: LobeChatDatabase;+ userId: string;+ workspaceId: string;+}): Promise<boolean> => {+ const [workspace] = await db+ .select({ primaryOwnerId: workspaces.primaryOwnerId })+ .from(workspaces)+ .where(eq(workspaces.id, workspaceId))+ .limit(1);++ return workspace?.primaryOwnerId === userId;+};+export interface WorkspaceScopedPermissionOptions {action: keyof typeof PERMISSION_ACTIONS;db: LobeChatDatabase;diff --git a/locales/ar/chat.json b/locales/ar/chat.jsonindex 397660a22fb..d4a7782f8e8 100644--- a/locales/ar/chat.json+++ b/locales/ar/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "اضغط <key/> للإرسال","input.sendWithEnter": "اضغط <key/> للإرسال","input.stop": "إيقاف",- "input.viewOnlyAgent": "لديك وصول للعرض فقط إلى هذا الوكيل، لذا لا يمكن إرسال الرسائل. اطلب من المنشئ أو مالك مساحة العمل الحصول على الوصول.",- "input.viewOnlyGroup": "لديك وصول للعرض فقط إلى هذه المجموعة، لذا لا يمكن إرسال الرسائل. اطلب من المنشئ أو مالك مساحة العمل الحصول على الوصول.",+ "input.useOnlyAgent": "يمكنك استخدام هذا الوكيل فقط",+ "input.useOnlyGroup": "يمكنك استخدام هذه المجموعة فقط",+ "input.viewOnlyAgent": "يمكنك فقط عرض هذا الوكيل",+ "input.viewOnlyGroup": "يمكنك فقط عرض هذه المجموعة","input.warp": "سطر جديد","input.warpWithKey": "اضغط <key/> لإدراج فاصل أسطر","inputQueue.delete": "حذف",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "معاينة","workingPanel.localFile.preview.source": "المصدر","workingPanel.localFile.truncated": "تم تقليص معاينة الملف إلى {{limit}} حرفًا",+ "workingPanel.openMenu.configuration": "الإعدادات",+ "workingPanel.openMenu.terminal": "فتح الطرفية",+ "workingPanel.openMenu.title": "فتح لوحة مساحة العمل",+ "workingPanel.openMenu.tools": "الأدوات",+ "workingPanel.openMenu.workspace": "مساحة العمل",+ "workingPanel.overview.branch": "الفرع",+ "workingPanel.overview.branch.detached": "رأس منفصل",+ "workingPanel.overview.changes": "التغييرات",+ "workingPanel.overview.changes.clean": "لا توجد تغييرات في شجرة العمل",+ "workingPanel.overview.changes.files_one": "{{count}} ملف معدل",+ "workingPanel.overview.changes.files_other": "{{count}} ملفات معدلة",+ "workingPanel.overview.documents.desc": "المستندات المتاحة لهذا الوكيل",+ "workingPanel.overview.empty": "ستظهر أنشطة ومسارات مساحة العمل هنا أثناء عمل الوكيل.",+ "workingPanel.overview.emptyTitle": "جاهز للعمل",+ "workingPanel.overview.environment": "البيئة",+ "workingPanel.overview.environmentError": "تعذر تحميل حالة المستودع",+ "workingPanel.overview.execution.device": "الجهاز المتصل",+ "workingPanel.overview.execution.local": "هذا الجهاز",+ "workingPanel.overview.outputs": "المخرجات",+ "workingPanel.overview.resources": "الموارد",+ "workingPanel.overview.skills.desc": "المهارات المتاحة لهذا الوكيل",+ "workingPanel.overview.title": "نظرة عامة",+ "workingPanel.overview.viewAll": "عرض الكل",+ "workingPanel.overview.workspace.empty": "لم يتم اختيار مساحة عمل",+ "workingPanel.overview.workspace.emptyDesc": "اختر دليل العمل من شريط وقت التشغيل","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "مهارات المستخدم","workingPanel.skills.title": "المهارات","workingPanel.space": "مسافة",+ "workingPanel.tabs.close": "إغلاق التبويب",+ "workingPanel.tabs.closeLeft": "إغلاق التبويبات على اليسار",+ "workingPanel.tabs.closeOthers": "إغلاق التبويبات الأخرى",+ "workingPanel.tabs.closeRight": "إغلاق التبويبات على اليمين",+ "workingPanel.tabs.pin": "تثبيت التبويب",+ "workingPanel.tabs.pinned": "تبويب مثبت",+ "workingPanel.tabs.unpin": "إلغاء تثبيت التبويب","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "تم الإنشاء","workingPanel.works.changeType.updated": "تم التحديث",diff --git a/locales/ar/labs.json b/locales/ar/labs.jsonindex d37c4e9621f..93e83b26e81 100644--- a/locales/ar/labs.json+++ b/locales/ar/labs.json@@ -1,4 +1,5 @@{+ "description": "هذه الميزات تجريبية. قد نقوم بإزالتها، وقد تحتوي على أخطاء. يسعدنا تلقي ملاحظاتك أثناء استخدامها.","features.agentGraphConfig.desc": "عرض تكوين وقت تشغيل الرسم البياني في إعدادات متقدمة لملف تعريف الوكيل.","features.agentGraphConfig.title": "تكوين وقت تشغيل الرسم البياني للوكيل","features.agentSelfIteration.desc": "السماح للمساعد بالتفكير الذاتي، وبناء الوعي الذاتي، والاستمرار في التطوير عبر المحاولات والتفاعلات المتواصلة.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "وقت تشغيل Claude Code SDK","features.groupChat.desc": "تمكين تنسيق الدردشة الجماعية متعددة الوكلاء.","features.groupChat.title": "دردشة جماعية (متعددة الوكلاء)",+ "features.heteroSessionImport.desc": "إضافة خيار \"استيراد جلسات الوكيل المحلي\" إلى قائمة مواضيع القائمة: قم بمسح نصوص Claude Code / Codex CLI المحلية واستيرادها كمواضيع، مع مزامنة تدريجية عند إعادة الاستيراد.",+ "features.heteroSessionImport.title": "استيراد جلسات الوكيل المحلي","features.imessage.desc": "ربط الوكلاء بـ iMessage من خلال جسر BlueBubbles المحلي لتطبيق LobeHub Desktop.","features.imessage.title": "قناة iMessage","features.inAppBrowser.desc": "عرض علامة تبويب المتصفح في لوحة الجانب للمحادثة: متصفح مدمج يفتح نتائج البحث في المكان ويتيح للوكلاء التصفح بشكل مرئي.",diff --git a/locales/ar/messenger.json b/locales/ar/messenger.jsonindex a1e1739779b..b4fa39e5186 100644--- a/locales/ar/messenger.json+++ b/locales/ar/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "افصل الحساب الحالي في WeChat قبل الاتصال بحساب آخر.","messenger.wechat.paidDescription": "روبوت نظام WeChat متاح في الخطط الشخصية المدفوعة. قم بالترقية للاتصال وتشغيله.","messenger.wechat.paidTitle": "قم بالترقية للاتصال بـ WeChat",+ "messenger.wechat.push.description": "يسمح WeChat للروبوت بإرسال الرسائل فقط داخل نافذة الإرسال — قم بالرد بأي شيء على الروبوت في WeChat لإعادة تعيينها إلى {{max}} إرسال / 24 ساعة.",+ "messenger.wechat.push.expiresIn": "ينتهي خلال {{value}}",+ "messenger.wechat.push.loadFailed": "تعذر تحميل حالة نافذة الإرسال.",+ "messenger.wechat.push.placeholder": "اكتب رسالة لإرسالها إلى WeChat...",+ "messenger.wechat.push.queued": "{{count}} رسالة (رسائل) في قائمة الانتظار سيتم إرسالها تلقائيًا بعد أن ترسل رسالة إلى الروبوت في WeChat.",+ "messenger.wechat.push.queuedToast": "نافذة الإرسال مغلقة — رسالتك في قائمة الانتظار. قل أي شيء للروبوت في WeChat لتلقيها.",+ "messenger.wechat.push.sectionTitle": "إرسال الرسائل",+ "messenger.wechat.push.send": "إرسال إلى WeChat",+ "messenger.wechat.push.sentToast": "تم الإرسال إلى WeChat ({{remaining}} إرسال متبقي في هذه النافذة).",+ "messenger.wechat.push.title": "الإرسال الاستباقي",+ "messenger.wechat.push.unavailableToast": "الإرسال غير متاح مؤقتًا. يرجى المحاولة مرة أخرى لاحقًا.",+ "messenger.wechat.push.unlinkedToast": "رابط WeChat الخاص بك غير متاح — أعد مسح رمز QR لإعادة الاتصال.",+ "messenger.wechat.push.windowClosed": "نافذة الإرسال مغلقة",+ "messenger.wechat.push.windowClosedHint": "أرسل أي رسالة إلى الروبوت في WeChat لفتحها.",+ "messenger.wechat.push.windowOpen": "نافذة الإرسال مفتوحة","messenger.wechat.qr.expired": "انتهت صلاحية رمز QR هذا. قم بإنشاء رمز جديد للمتابعة.","messenger.wechat.qr.scanned": "تم المسح. قم بتأكيد الاتصال في WeChat.","messenger.wechat.qr.tip": "افتح WeChat على هاتفك، امسح هذا الرمز، وقم بالتأكيد. هذا الرمز للاستخدام مرة واحدة وينتهي خلال 5 دقائق.",diff --git a/locales/ar/modelRuntime.json b/locales/ar/modelRuntime.jsonindex 95aa9e82da4..72099b39a3b 100644--- a/locales/ar/modelRuntime.json+++ b/locales/ar/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "فشل التحقق من صحة Vertex. يرجى التحقق من بيانات الاعتماد وإعادة المحاولة.","LocationNotSupportError": "نأسف، موقعك الحالي لا يدعم خدمة هذا النموذج. قد يكون ذلك بسبب قيود إقليمية أو عدم توفر الخدمة. يرجى التأكد مما إذا كان الموقع الحالي يدعم استخدام هذه الخدمة، أو حاول استخدام موقع مختلف.","ModelEmptyCompletion": "أعاد مزود النموذج استجابة فارغة. حتى بدون محتوى مرئي، قد تترتب تكاليف على هذا الطلب. يمكنك المحاولة مرة أخرى أو تغيير النموذج والمحاولة مجددًا.",+ "ModelEmptyCompletionWithCost": "قام مزود النموذج بإرجاع استجابة فارغة. كلف هذا الطلب {{credits}} من الرصيد. قد يؤدي إعادة المحاولة إلى تكلفة مماثلة، أو يمكنك تغيير النموذج.","ModelNotFound": "عذرًا، لم يتم العثور على النموذج المطلوب. قد لا يكون موجودًا أو قد لا تكون لديك الأذونات اللازمة للوصول إليه. يرجى إعادة المحاولة بعد تغيير مفتاح API أو تعديل أذونات الوصول.","NoAvailableChannel": "عذرًا، لا يحتوي الوكيل أو الموجه على قناة متاحة للنموذج المطلوب. يرجى تبديل إعدادات القناة/المفتاح أو إعادة المحاولة لاحقًا.","OllamaBizError": "حدث خطأ أثناء طلب خدمة Ollama، يرجى استكشاف الأخطاء وإصلاحها أو إعادة المحاولة بناءً على المعلومات التالية.",diff --git a/locales/ar/plugin.json b/locales/ar/plugin.jsonindex a222444a9a6..164c1ec2783 100644--- a/locales/ar/plugin.json+++ b/locales/ar/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "تحديث العقدة","builtins.lobe-page-agent.apiName.wrapNodes": "تغليف العقد","builtins.lobe-page-agent.title": "الصفحة",+ "builtins.lobe-remote-device.apiName.activateDevice": "اتصال الجهاز",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "تحقق من الأجهزة المتصلة",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} متصل",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} متصل",+ "builtins.lobe-remote-device.render.activated": "متصل",+ "builtins.lobe-remote-device.render.activationFailed": "تعذر الاتصال",+ "builtins.lobe-remote-device.render.noOnlineDevices": "لا توجد أجهزة متصلة",+ "builtins.lobe-remote-device.render.offline": "غير متصل",+ "builtins.lobe-remote-device.render.online": "متصل",+ "builtins.lobe-remote-device.render.scope.personal": "شخصي",+ "builtins.lobe-remote-device.render.scope.workspace": "مساحة العمل",+ "builtins.lobe-remote-device.title": "الجهاز البعيد","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "تسجيل فكرة تحسين","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "اقتراح تحسين","builtins.lobe-self-feedback-intent.inspector.memory.write": "تسجيل التفضيل",diff --git a/locales/ar/subscription.json b/locales/ar/subscription.jsonindex 0e1172076af..c6877020517 100644--- a/locales/ar/subscription.json+++ b/locales/ar/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "تم إنشاء هذه الفاتورة كمسودة بواسطة اشتراك جديد وسيتم خصمها تلقائيًا قريبًا","billing.empty": "لا يوجد سجل فواتير","billing.endDate": "تاريخ الانتهاء",+ "billing.existingSubscription.description": "لم يتم إنشاء اشتراك جديد. يمكنك إدارة أو إلغاء اشتراكك الحالي أدناه.",+ "billing.existingSubscription.title": "لديك اشتراك بالفعل","billing.history": "سجل الفواتير","billing.manage.openFailed": "فشل في فتح صفحة إدارة الدفع","billing.manage.title": "إدارة المدفوعات",diff --git a/locales/ar/topic.json b/locales/ar/topic.jsonindex d60a904f168..d5f20f8539a 100644--- a/locales/ar/topic.json+++ b/locales/ar/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "أمس","guide.desc": "انقر على الزر في اليسار لحفظ المحادثة الحالية كموضوع محفوظ وبدء محادثة جديدة.","guide.title": "قائمة المواضيع",+ "heteroImport.action.ignore": "تجاهل: إخفاء هذا الدليل من القائمة؛ استعادته من المجموعة المُتجاهلة أدناه",+ "heteroImport.action.restore": "استعادة هذا الدليل",+ "heteroImport.action.unwatch": "إلغاء المراقبة وإعادته إلى مجموعته الأصلية",+ "heteroImport.action.watch": "مراقبة: تثبيت في المجموعة المراقبة في الأعلى؛ يمكن للمحادثات الجديدة المزامنة تلقائيًا",+ "heteroImport.allSessions": "جميع الجلسات",+ "heteroImport.badge.imported": "تم الاستيراد",+ "heteroImport.badge.linked": "من LobeHub",+ "heteroImport.badge.linkedTip": "تم بدء هذه الجلسة من LobeHub وهي موجودة بالفعل في قائمة المواضيع الخاصة بك",+ "heteroImport.badge.syncable": "رسائل جديدة",+ "heteroImport.badge.syncableTip": "تم استيراده مسبقًا، ونما النص المحلي منذ ذلك الحين — سيضيف الاستيراد مرة أخرى الجزء الجديد فقط",+ "heteroImport.done.cta": "تم",+ "heteroImport.done.failed": "، {{count}} فشل (قابل لإعادة المحاولة)",+ "heteroImport.done.summary": "تم استيراد {{sessions}} جلسات · {{messages}} رسائل",+ "heteroImport.empty.desc": "لم يتم العثور على نصوص Claude Code (~/.claude/projects) أو Codex (~/.codex/sessions). استخدمها أولاً في الطرفية، ثم حاول مرة أخرى.",+ "heteroImport.empty.title": "لم يتم العثور على جلسات وكيل محلية",+ "heteroImport.entry": "استيراد جلسات الوكيل المحلية",+ "heteroImport.error.desc": "تعذر قراءة الجلسات المحلية. تحقق من أن LobeHub يمكنه الوصول إلى النصوص الخاصة بك، ثم حاول مرة أخرى.",+ "heteroImport.error.title": "فشل الفحص",+ "heteroImport.footer.hint": "اختر الجلسات للاستيراد — عمليات الاستيراد المتكررة تتخطى المحتوى الموجود تلقائيًا",+ "heteroImport.footer.import": "استيراد {{count}} جلسات",+ "heteroImport.footer.importEmpty": "استيراد",+ "heteroImport.footer.rescan": "إعادة الفحص",+ "heteroImport.footer.selected": "تم اختيار {{sessions}} جلسات · ~{{messages}} رسائل · {{tokens}} رموز",+ "heteroImport.hideImported": "إخفاء المستورد",+ "heteroImport.ignoredGroup": "تم تجاهل {{count}} أدلة",+ "heteroImport.meta.messages": "{{count}} رسائل",+ "heteroImport.meta.tokens": "{{tokens}} رموز",+ "heteroImport.progress": "جارٍ استيراد {{done}}/{{total}} جلسات…",+ "heteroImport.retry": "إعادة المحاولة",+ "heteroImport.scanning": "جارٍ فحص جلسات الوكيل المحلية…",+ "heteroImport.searchEmpty": "لا توجد جلسات مطابقة",+ "heteroImport.searchPlaceholder": "بحث عن جلسات…",+ "heteroImport.selectAll": "اختيار الكل",+ "heteroImport.state.failed": "فشل",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "في الانتظار",+ "heteroImport.state.running": "جارٍ الاستيراد",+ "heteroImport.title": "استيراد جلسات الوكيل المحلية",+ "heteroImport.watchedGroup": "المجموعة المراقبة","importError": "فشل في الاستيراد","importInvalidFormat": "تنسيق الملف غير صالح. يرجى التأكد من أنه ملف JSON صالح.","importLoading": "جارٍ استيراد المحادثة...",diff --git a/locales/ar/verify.json b/locales/ar/verify.jsonindex 169a8d582a2..8b4450d4aed 100644--- a/locales/ar/verify.json+++ b/locales/ar/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "بحاجة إلى إصلاح {{count}}","acceptance.filter.pending": "للمراجعة {{count}}","acceptance.filter.roundAll": "جميع الجولات",+ "acceptance.goalCollapse": "طي هدف القبول","acceptance.goalEdit": "تعديل هدف القبول",+ "acceptance.goalExpand": "توسيع هدف القبول","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} تم قبولها","acceptance.group.allVerified": "{{passed}}/{{total}} تم التحقق منها وقبولها","acceptance.group.collapse": "طي {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "تم حذف القبول","acceptance.workspace.emptyDetail.description": "اختر قبولًا على اليسار لمراجعة فحوصاته وجولاته وأدلته.","acceptance.workspace.emptyDetail.title": "حدد قبولًا",+ "acceptance.workspace.filters.active": "قيد التنفيذ",+ "acceptance.workspace.filters.all": "جميع القبولات",+ "acceptance.workspace.filters.completed": "مكتمل",+ "acceptance.workspace.filters.empty.active": "لا توجد قبولات قيد التنفيذ.",+ "acceptance.workspace.filters.empty.completed": "لا توجد قبولات مكتملة.",+ "acceptance.workspace.filters.noSearchResults": "لا توجد قبولات تطابق “{{query}}”.",+ "acceptance.workspace.filters.showAll": "عرض جميع القبولات",+ "acceptance.workspace.filters.title": "تصفية القبولات","acceptance.workspace.listEmpty": "قم بإدخال تقرير تحقق باستخدام CLI وسيظهر قبوله هنا.","acceptance.workspace.listEmptyTitle": "لا توجد قبولات حتى الآن","acceptance.workspace.renameEmpty": "لا يمكن أن يكون العنوان فارغًا",diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.jsonindex 0cf2b0f3ea1..88652b21498 100644--- a/locales/bg-BG/chat.json+++ b/locales/bg-BG/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Натиснете <key/>, за да изпратите","input.sendWithEnter": "Натиснете <key/>, за да изпратите","input.stop": "Спри",- "input.viewOnlyAgent": "Имате само достъп за преглед до този агент, така че съобщения не могат да бъдат изпращани. Помолете създателя или собственик на работното пространство за достъп.",- "input.viewOnlyGroup": "Имате само достъп за преглед до тази група, така че съобщения не могат да бъдат изпращани. Помолете създателя или собственик на работното пространство за достъп.",+ "input.useOnlyAgent": "Можете да използвате само този агент",+ "input.useOnlyGroup": "Можете да използвате само тази група",+ "input.viewOnlyAgent": "Можете само да преглеждате този агент",+ "input.viewOnlyGroup": "Можете само да преглеждате тази група","input.warp": "Нов ред","input.warpWithKey": "Натиснете <key/>, за да вмъкнете нов ред","inputQueue.delete": "Изтрий",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Преглед","workingPanel.localFile.preview.source": "Източник","workingPanel.localFile.truncated": "Прегледът на файла е съкратен до {{limit}} символа",+ "workingPanel.openMenu.configuration": "Конфигурация",+ "workingPanel.openMenu.terminal": "Отвори терминал",+ "workingPanel.openMenu.title": "Отвори панела на работното пространство",+ "workingPanel.openMenu.tools": "Инструменти",+ "workingPanel.openMenu.workspace": "Работно пространство",+ "workingPanel.overview.branch": "Клон",+ "workingPanel.overview.branch.detached": "Отделен HEAD",+ "workingPanel.overview.changes": "Промени",+ "workingPanel.overview.changes.clean": "Няма промени в работното дърво",+ "workingPanel.overview.changes.files_one": "{{count}} файл променен",+ "workingPanel.overview.changes.files_other": "{{count}} файла променени",+ "workingPanel.overview.documents.desc": "Документи, достъпни за този агент",+ "workingPanel.overview.empty": "Дейностите и резултатите от работното пространство ще се появят тук, докато агентът работи.",+ "workingPanel.overview.emptyTitle": "Готов за работа",+ "workingPanel.overview.environment": "Среда",+ "workingPanel.overview.environmentError": "Неуспешно зареждане на статуса на хранилището",+ "workingPanel.overview.execution.device": "Свързано устройство",+ "workingPanel.overview.execution.local": "Това устройство",+ "workingPanel.overview.outputs": "Резултати",+ "workingPanel.overview.resources": "Ресурси",+ "workingPanel.overview.skills.desc": "Умения, достъпни за този агент",+ "workingPanel.overview.title": "Преглед",+ "workingPanel.overview.viewAll": "Виж всички",+ "workingPanel.overview.workspace.empty": "Няма избрано работно пространство",+ "workingPanel.overview.workspace.emptyDesc": "Изберете работна директория от лентата за изпълнение","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Умения на потребителя","workingPanel.skills.title": "Умения","workingPanel.space": "Пространство",+ "workingPanel.tabs.close": "Затвори таб",+ "workingPanel.tabs.closeLeft": "Затвори табовете отляво",+ "workingPanel.tabs.closeOthers": "Затвори другите табове",+ "workingPanel.tabs.closeRight": "Затвори табовете отдясно",+ "workingPanel.tabs.pin": "Закачи таб",+ "workingPanel.tabs.pinned": "Закачен таб",+ "workingPanel.tabs.unpin": "Откачи таб","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Създадено","workingPanel.works.changeType.updated": "Актуализирано",diff --git a/locales/bg-BG/labs.json b/locales/bg-BG/labs.jsonindex 16f2a5bad02..543b0b6ed39 100644--- a/locales/bg-BG/labs.json+++ b/locales/bg-BG/labs.json@@ -1,4 +1,5 @@{+ "description": "Тези функции са експериментални. Възможно е да ги премахнем и те може да имат грешки. Ще се радваме на вашата обратна връзка, докато ги използвате.","features.agentGraphConfig.desc": "Показване на конфигурацията на графика за изпълнение в разширените настройки на профила на агент.","features.agentGraphConfig.title": "Конфигурация на графика за изпълнение на агент","features.agentSelfIteration.desc": "Позволява на асистента да разсъждава, да изгражда самосъзнание и да извършва непрекъснати подобрения чрез последователни опити и взаимодействия.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK Runtime","features.groupChat.desc": "Активиране на координация в групов чат с множество агенти.","features.groupChat.title": "Групов чат (многоагентен)",+ "features.heteroSessionImport.desc": "Добавете запис „Импортиране на локални сесии на агент“ в менюто на списъка с теми: сканирайте локални транскрипции на Claude Code / Codex CLI и ги импортирайте като теми, с инкрементална синхронизация при повторно импортиране.",+ "features.heteroSessionImport.title": "Импортиране на локални сесии на агент","features.imessage.desc": "Свързване на агентите с iMessage чрез локалния LobeHub Desktop BlueBubbles мост.","features.imessage.title": "Канал iMessage","features.inAppBrowser.desc": "Показване на раздела Браузър в страничния панел на разговора: вграден браузър, който отваря резултати от търсене на място и позволява на агентите да разглеждат видимо.",diff --git a/locales/bg-BG/messenger.json b/locales/bg-BG/messenger.jsonindex 838569b4fa5..24072bf39c7 100644--- a/locales/bg-BG/messenger.json+++ b/locales/bg-BG/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Прекъснете връзката с текущия WeChat акаунт, преди да свържете друг.","messenger.wechat.paidDescription": "Системният бот на WeChat е наличен в платените лични планове. Надградете, за да го свържете и използвате.","messenger.wechat.paidTitle": "Надградете, за да свържете WeChat",+ "messenger.wechat.push.description": "WeChat позволява на бота да ви изпраща съобщения само в рамките на прозорец за изпращане — отговорете с каквото и да е на бота в WeChat, за да го нулирате до {{max}} изпращания / 24 часа.",+ "messenger.wechat.push.expiresIn": "изтича след {{value}}",+ "messenger.wechat.push.loadFailed": "Не можа да се зареди статусът на прозореца за изпращане.",+ "messenger.wechat.push.placeholder": "Напишете съобщение, което да изпратите до вашия WeChat…",+ "messenger.wechat.push.queued": "{{count}} съобщение(я) в опашката ще бъдат доставени автоматично, след като изпратите съобщение на бота в WeChat.",+ "messenger.wechat.push.queuedToast": "Прозорецът за изпращане е затворен — вашето съобщение е в опашката. Кажете нещо на бота в WeChat, за да го получите.",+ "messenger.wechat.push.sectionTitle": "Изпращане на съобщения",+ "messenger.wechat.push.send": "Изпрати до WeChat",+ "messenger.wechat.push.sentToast": "Изпратено до WeChat ({{remaining}} оставащи изпращания в този прозорец).",+ "messenger.wechat.push.title": "Проактивно изпращане",+ "messenger.wechat.push.unavailableToast": "Изпращането временно не е налично. Моля, опитайте отново по-късно.",+ "messenger.wechat.push.unlinkedToast": "Вашата връзка с WeChat не е налична — сканирайте отново QR кода, за да се свържете отново.",+ "messenger.wechat.push.windowClosed": "Прозорецът за изпращане е затворен",+ "messenger.wechat.push.windowClosedHint": "Изпратете каквото и да е съобщение на бота в WeChat, за да го отворите.",+ "messenger.wechat.push.windowOpen": "Прозорецът за изпращане е отворен","messenger.wechat.qr.expired": "Този QR код е изтекъл. Генерирайте нов, за да продължите.","messenger.wechat.qr.scanned": "Сканирано. Потвърдете връзката в WeChat.","messenger.wechat.qr.tip": "Отворете WeChat на телефона си, сканирайте този код и потвърдете. Този код е за еднократна употреба и изтича след 5 минути.",diff --git a/locales/bg-BG/modelRuntime.json b/locales/bg-BG/modelRuntime.jsonindex 007fac3eb36..b52af334866 100644--- a/locales/bg-BG/modelRuntime.json+++ b/locales/bg-BG/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Неуспешно удостоверяване във Vertex. Моля, проверете вашите идентификационни данни и опитайте отново.","LocationNotSupportError": "Съжаляваме, вашето текущо местоположение не поддържа тази услуга на модела. Това може да се дължи на регионални ограничения или липса на наличност на услугата. Моля, потвърдете дали текущото местоположение поддържа използването на тази услуга или опитайте от друго местоположение.","ModelEmptyCompletion": "Доставчикът на модела върна празен отговор. Дори без видимо съдържание, тази заявка може да доведе до разходи. Можете да опитате отново или да смените модела и да опитате пак.",+ "ModelEmptyCompletionWithCost": "Доставчикът на модела върна празен отговор. Тази заявка струва {{credits}} кредита. Повторното опитване може да доведе до подобна цена, или можете да смените модела.","ModelNotFound": "Съжаляваме, заявеният модел не може да бъде намерен. Той може да не съществува или да нямате необходимите права за достъп. Моля, опитайте отново след промяна на API ключа или коригиране на правата за достъп.","NoAvailableChannel": "Съжаляваме, проксито или маршрутизаторът няма наличен канал за заявения модел. Моля, сменете конфигурацията на канала/ключа или опитайте отново по-късно.","OllamaBizError": "Грешка при заявка към услугата Ollama, моля, отстранете проблема или опитайте отново въз основа на следната информация.",diff --git a/locales/bg-BG/plugin.json b/locales/bg-BG/plugin.jsonindex 1c84b84ea25..f57d3ac4b70 100644--- a/locales/bg-BG/plugin.json+++ b/locales/bg-BG/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Актуализиране на възел","builtins.lobe-page-agent.apiName.wrapNodes": "Обвиване на възли","builtins.lobe-page-agent.title": "Страница",+ "builtins.lobe-remote-device.apiName.activateDevice": "Свържете устройството",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Проверете онлайн устройствата",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} онлайн",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} онлайн",+ "builtins.lobe-remote-device.render.activated": "Свързано",+ "builtins.lobe-remote-device.render.activationFailed": "Неуспешно свързване",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Няма онлайн устройства",+ "builtins.lobe-remote-device.render.offline": "Офлайн",+ "builtins.lobe-remote-device.render.online": "Онлайн",+ "builtins.lobe-remote-device.render.scope.personal": "Лично",+ "builtins.lobe-remote-device.render.scope.workspace": "Работно пространство",+ "builtins.lobe-remote-device.title": "Дистанционно устройство","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Запишете идея за подобрение","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Предложете подобрение","builtins.lobe-self-feedback-intent.inspector.memory.write": "Запишете предпочитание",diff --git a/locales/bg-BG/subscription.json b/locales/bg-BG/subscription.jsonindex 1231673f1a2..43df94adbec 100644--- a/locales/bg-BG/subscription.json+++ b/locales/bg-BG/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Тази чернова на фактура е генерирана от нов абонамент и скоро ще бъде автоматично таксувана","billing.empty": "Няма история на плащанията","billing.endDate": "Крайна дата",+ "billing.existingSubscription.description": "Не е създаден нов абонамент. Можете да управлявате или отмените текущия си абонамент по-долу.",+ "billing.existingSubscription.title": "Вече имате абонамент","billing.history": "История на плащанията","billing.manage.openFailed": "Неуспешно отваряне на страницата за управление на плащанията","billing.manage.title": "Управление на плащанията",diff --git a/locales/bg-BG/topic.json b/locales/bg-BG/topic.jsonindex 22628d99398..58aa47d47b8 100644--- a/locales/bg-BG/topic.json+++ b/locales/bg-BG/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Вчера","guide.desc": "Кликнете бутона отляво, за да запазите текущия разговор като историческа тема и да започнете нов разговор.","guide.title": "Списък с теми",+ "heteroImport.action.ignore": "Игнорирай: скрий тази директория от списъка; възстанови я от групата Игнорирани по-долу",+ "heteroImport.action.restore": "Възстанови тази директория",+ "heteroImport.action.unwatch": "Спри наблюдението и върни обратно в изходната група",+ "heteroImport.action.watch": "Наблюдавай: закачи в групата Наблюдавани отгоре; новите сесии могат да се синхронизират автоматично",+ "heteroImport.allSessions": "Всички сесии",+ "heteroImport.badge.imported": "Импортирано",+ "heteroImport.badge.linked": "От LobeHub",+ "heteroImport.badge.linkedTip": "Тази сесия е стартирана от LobeHub и вече е в списъка с вашите теми",+ "heteroImport.badge.syncable": "Нови съобщения",+ "heteroImport.badge.syncableTip": "Импортирано преди, и локалният транскрипт е нараснал оттогава — повторното импортиране добавя само новата част",+ "heteroImport.done.cta": "Готово",+ "heteroImport.done.failed": ", {{count}} неуспешни (може да се опитат отново)",+ "heteroImport.done.summary": "Импортирани {{sessions}} сесии · {{messages}} съобщения",+ "heteroImport.empty.desc": "Не са намерени транскрипти на Claude Code (~/.claude/projects) или Codex (~/.codex/sessions). Използвайте ги първо в терминал, след което опитайте отново.",+ "heteroImport.empty.title": "Не са намерени локални сесии на агент",+ "heteroImport.entry": "Импортиране на локални сесии на агент",+ "heteroImport.error.desc": "Не може да се прочетат локалните сесии. Проверете дали LobeHub има достъп до вашите транскрипти, след което опитайте отново.",+ "heteroImport.error.title": "Сканирането неуспешно",+ "heteroImport.footer.hint": "Изберете сесии за импортиране — повторното импортиране автоматично пропуска съществуващото съдържание",+ "heteroImport.footer.import": "Импортиране на {{count}} сесии",+ "heteroImport.footer.importEmpty": "Импортиране",+ "heteroImport.footer.rescan": "Повторно сканиране",+ "heteroImport.footer.selected": "Избрани {{sessions}} сесии · ~{{messages}} съобщения · {{tokens}} токени",+ "heteroImport.hideImported": "Скрий импортираните",+ "heteroImport.ignoredGroup": "Игнорирани {{count}} директории",+ "heteroImport.meta.messages": "{{count}} съобщения",+ "heteroImport.meta.tokens": "{{tokens}} токени",+ "heteroImport.progress": "Импортиране на {{done}}/{{total}} сесии…",+ "heteroImport.retry": "Опитай отново",+ "heteroImport.scanning": "Сканиране на локални сесии на агент…",+ "heteroImport.searchEmpty": "Няма съвпадащи сесии",+ "heteroImport.searchPlaceholder": "Търсене на сесии…",+ "heteroImport.selectAll": "Избери всички",+ "heteroImport.state.failed": "Неуспешно",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Изчакване",+ "heteroImport.state.running": "Импортиране",+ "heteroImport.title": "Импортиране на локални сесии на агент",+ "heteroImport.watchedGroup": "Наблюдавани","importError": "Импортирането не бе успешно","importInvalidFormat": "Невалиден файлов формат. Моля, уверете се, че файлът е валиден JSON.","importLoading": "Импортиране на разговор...",diff --git a/locales/bg-BG/verify.json b/locales/bg-BG/verify.jsonindex 92ab7cc33fe..e6471603a61 100644--- a/locales/bg-BG/verify.json+++ b/locales/bg-BG/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Нуждае се от корекция {{count}}","acceptance.filter.pending": "За преглед {{count}}","acceptance.filter.roundAll": "Всички кръгове",+ "acceptance.goalCollapse": "Свий целта за приемане","acceptance.goalEdit": "Редактиране на целта за приемане",+ "acceptance.goalExpand": "Разшири целта за приемане","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} приети","acceptance.group.allVerified": "{{passed}}/{{total}} всички проверени и приети","acceptance.group.collapse": "Сгънете {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Приемането е изтрито","acceptance.workspace.emptyDetail.description": "Изберете приемане отляво, за да прегледате неговите проверки, кръгове и доказателства.","acceptance.workspace.emptyDetail.title": "Изберете приемане",+ "acceptance.workspace.filters.active": "В процес на изпълнение",+ "acceptance.workspace.filters.all": "Всички приемания",+ "acceptance.workspace.filters.completed": "Завършени",+ "acceptance.workspace.filters.empty.active": "Няма приемания в процес на изпълнение.",+ "acceptance.workspace.filters.empty.completed": "Няма завършени приемания.",+ "acceptance.workspace.filters.noSearchResults": "Няма приемания, които съответстват на „{{query}}“.",+ "acceptance.workspace.filters.showAll": "Покажи всички приемания",+ "acceptance.workspace.filters.title": "Филтрирай приеманията","acceptance.workspace.listEmpty": "Въведете доклад за проверка с CLI и неговото приемане ще се появи тук.","acceptance.workspace.listEmptyTitle": "Все още няма приемания","acceptance.workspace.renameEmpty": "Заглавието не може да бъде празно",diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.jsonindex 1a268972758..7067eb88ee9 100644--- a/locales/de-DE/chat.json+++ b/locales/de-DE/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Drücken Sie <key/>, um zu senden","input.sendWithEnter": "Drücken Sie <key/>, um zu senden","input.stop": "Stopp",- "input.viewOnlyAgent": "Sie haben nur Lesezugriff auf diesen Agenten, daher können keine Nachrichten gesendet werden. Bitten Sie den Ersteller oder einen Arbeitsbereichsbesitzer um Zugriff.",- "input.viewOnlyGroup": "Sie haben nur Lesezugriff auf diese Gruppe, daher können keine Nachrichten gesendet werden. Bitten Sie den Ersteller oder einen Arbeitsbereichsbesitzer um Zugriff.",+ "input.useOnlyAgent": "Sie können nur diesen Agenten verwenden",+ "input.useOnlyGroup": "Sie können nur diese Gruppe verwenden",+ "input.viewOnlyAgent": "Sie können diesen Agenten nur ansehen",+ "input.viewOnlyGroup": "Sie können diese Gruppe nur ansehen","input.warp": "Neue Zeile","input.warpWithKey": "Drücken Sie <key/>, um einen Zeilenumbruch einzufügen","inputQueue.delete": "Löschen",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Vorschau","workingPanel.localFile.preview.source": "Quelle","workingPanel.localFile.truncated": "Dateivorschau auf {{limit}} Zeichen gekürzt",+ "workingPanel.openMenu.configuration": "Konfiguration",+ "workingPanel.openMenu.terminal": "Terminal öffnen",+ "workingPanel.openMenu.title": "Arbeitsbereichs-Panel öffnen",+ "workingPanel.openMenu.tools": "Werkzeuge",+ "workingPanel.openMenu.workspace": "Arbeitsbereich",+ "workingPanel.overview.branch": "Branch",+ "workingPanel.overview.branch.detached": "Losgelöster HEAD",+ "workingPanel.overview.changes": "Änderungen",+ "workingPanel.overview.changes.clean": "Keine Änderungen im Arbeitsbaum",+ "workingPanel.overview.changes.files_one": "{{count}} Datei geändert",+ "workingPanel.overview.changes.files_other": "{{count}} Dateien geändert",+ "workingPanel.overview.documents.desc": "Dokumente, die diesem Agenten zur Verfügung stehen",+ "workingPanel.overview.empty": "Arbeitsbereichsaktivitäten und Ausgaben werden hier angezeigt, während der Agent arbeitet.",+ "workingPanel.overview.emptyTitle": "Bereit zum Arbeiten",+ "workingPanel.overview.environment": "Umgebung",+ "workingPanel.overview.environmentError": "Repository-Status konnte nicht geladen werden",+ "workingPanel.overview.execution.device": "Verbundenes Gerät",+ "workingPanel.overview.execution.local": "Dieses Gerät",+ "workingPanel.overview.outputs": "Ausgaben",+ "workingPanel.overview.resources": "Ressourcen",+ "workingPanel.overview.skills.desc": "Fähigkeiten, die diesem Agenten zur Verfügung stehen",+ "workingPanel.overview.title": "Übersicht",+ "workingPanel.overview.viewAll": "Alle anzeigen",+ "workingPanel.overview.workspace.empty": "Kein Arbeitsbereich ausgewählt",+ "workingPanel.overview.workspace.emptyDesc": "Wählen Sie ein Arbeitsverzeichnis aus der Laufzeitleiste","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Benutzerfähigkeiten","workingPanel.skills.title": "Fähigkeiten","workingPanel.space": "Leerzeichen",+ "workingPanel.tabs.close": "Tab schließen",+ "workingPanel.tabs.closeLeft": "Tabs links schließen",+ "workingPanel.tabs.closeOthers": "Andere Tabs schließen",+ "workingPanel.tabs.closeRight": "Tabs rechts schließen",+ "workingPanel.tabs.pin": "Tab anheften",+ "workingPanel.tabs.pinned": "Angehefteter Tab",+ "workingPanel.tabs.unpin": "Tab lösen","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Erstellt","workingPanel.works.changeType.updated": "Aktualisiert",diff --git a/locales/de-DE/labs.json b/locales/de-DE/labs.jsonindex 7149cb4d317..323e6bd78ac 100644--- a/locales/de-DE/labs.json+++ b/locales/de-DE/labs.json@@ -1,4 +1,5 @@{+ "description": "Diese Funktionen sind experimentell. Wir könnten sie entfernen, und sie könnten Fehler enthalten. Wir freuen uns über Ihr Feedback, während Sie sie verwenden.","features.agentGraphConfig.desc": "Zeigt die Laufzeitkonfiguration des Graphen in den erweiterten Einstellungen eines Agentenprofils an.","features.agentGraphConfig.title": "Laufzeitkonfiguration des Agenten-Graphen","features.agentSelfIteration.desc": "Ermöglicht dem Assistenten, zu reflektieren, Selbstwahrnehmung aufzubauen und sich durch fortlaufende Versuche und Interaktionen kontinuierlich weiterzuentwickeln.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK-Laufzeit","features.groupChat.desc": "Koordination von Gruppenchats mit mehreren Agenten aktivieren.","features.groupChat.title": "Gruppenchat (Multi-Agenten)",+ "features.heteroSessionImport.desc": "Fügen Sie einen Eintrag \"Lokale Agentensitzungen importieren\" zum Themenlistenmenü hinzu: Scannen Sie lokale Claude Code / Codex CLI-Transkripte und importieren Sie diese als Themen, mit inkrementeller Synchronisierung beim erneuten Import.",+ "features.heteroSessionImport.title": "Import von lokalen Agentensitzungen","features.imessage.desc": "Verbinden Sie Agenten mit iMessage über die lokale LobeHub Desktop BlueBubbles-Bridge.","features.imessage.title": "iMessage-Kanal","features.inAppBrowser.desc": "Zeigen Sie die Browser-Registerkarte im Gesprächs-Seitenpanel an: ein eingebetteter Browser, der Suchergebnisse direkt anzeigt und es Agenten ermöglicht, sichtbar zu surfen.",diff --git a/locales/de-DE/messenger.json b/locales/de-DE/messenger.jsonindex 8b05dc0126d..cd4ec7ea17c 100644--- a/locales/de-DE/messenger.json+++ b/locales/de-DE/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Trennen Sie das aktuelle WeChat-Konto, bevor Sie ein anderes verbinden.","messenger.wechat.paidDescription": "Das WeChat-System-Bot ist in kostenpflichtigen persönlichen Plänen verfügbar. Aktualisieren Sie, um es zu verbinden und auszuführen.","messenger.wechat.paidTitle": "Aktualisieren, um WeChat zu verbinden",+ "messenger.wechat.push.description": "WeChat erlaubt dem Bot nur, Ihnen innerhalb eines Sendezeitfensters Nachrichten zu senden – antworten Sie dem Bot in WeChat mit irgendetwas, um es auf {{max}} Sendungen / 24 Stunden zurückzusetzen.",+ "messenger.wechat.push.expiresIn": "läuft ab in {{value}}",+ "messenger.wechat.push.loadFailed": "Der Status des Sendezeitfensters konnte nicht geladen werden.",+ "messenger.wechat.push.placeholder": "Schreiben Sie eine Nachricht, um sie an Ihr WeChat zu senden…",+ "messenger.wechat.push.queued": "{{count}} Nachrichten in der Warteschlange werden automatisch zugestellt, nachdem Sie dem Bot in WeChat eine Nachricht senden.",+ "messenger.wechat.push.queuedToast": "Das Sendezeitfenster ist geschlossen – Ihre Nachricht ist in der Warteschlange. Sagen Sie dem Bot in WeChat irgendetwas, um sie zu erhalten.",+ "messenger.wechat.push.sectionTitle": "Nachrichten-Push",+ "messenger.wechat.push.send": "An WeChat senden",+ "messenger.wechat.push.sentToast": "An WeChat gesendet ({{remaining}} Sendungen verbleiben in diesem Fenster).",+ "messenger.wechat.push.title": "Proaktiver Push",+ "messenger.wechat.push.unavailableToast": "Push ist vorübergehend nicht verfügbar. Bitte versuchen Sie es später erneut.",+ "messenger.wechat.push.unlinkedToast": "Ihre WeChat-Verknüpfung ist nicht verfügbar – scannen Sie den QR-Code erneut, um die Verbindung wiederherzustellen.",+ "messenger.wechat.push.windowClosed": "Sendezeitfenster geschlossen",+ "messenger.wechat.push.windowClosedHint": "Senden Sie dem Bot in WeChat eine beliebige Nachricht, um es zu öffnen.",+ "messenger.wechat.push.windowOpen": "Sendezeitfenster geöffnet","messenger.wechat.qr.expired": "Dieser QR-Code ist abgelaufen. Generieren Sie einen neuen, um fortzufahren.","messenger.wechat.qr.scanned": "Gescannt. Bestätigen Sie die Verbindung in WeChat.","messenger.wechat.qr.tip": "Öffnen Sie WeChat auf Ihrem Telefon, scannen Sie diesen Code und bestätigen Sie. Dieser Code ist einmalig und läuft in 5 Minuten ab.",diff --git a/locales/de-DE/modelRuntime.json b/locales/de-DE/modelRuntime.jsonindex 6d9193d113d..5266f42b633 100644--- a/locales/de-DE/modelRuntime.json+++ b/locales/de-DE/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex-Authentifizierung fehlgeschlagen. Bitte überprüfen Sie Ihre Anmeldedaten und versuchen Sie es erneut.","LocationNotSupportError": "Entschuldigung, Ihr aktueller Standort unterstützt diesen Modelldienst nicht. Dies kann auf regionale Einschränkungen oder die Nichtverfügbarkeit des Dienstes zurückzuführen sein. Bitte überprüfen Sie, ob der aktuelle Standort die Nutzung dieses Dienstes unterstützt, oder versuchen Sie es von einem anderen Standort aus.","ModelEmptyCompletion": "Der Modellanbieter hat eine leere Antwort zurückgegeben. Auch ohne sichtbaren Inhalt können für diese Anfrage Kosten anfallen. Sie können es erneut versuchen oder das Modell wechseln und es erneut versuchen.",+ "ModelEmptyCompletionWithCost": "Der Modellanbieter hat eine leere Antwort zurückgegeben. Diese Anfrage hat {{credits}} Credits gekostet. Ein erneuter Versuch könnte ähnliche Kosten verursachen, oder Sie können das Modell wechseln.","ModelNotFound": "Entschuldigung, das angeforderte Modell konnte nicht gefunden werden. Es existiert möglicherweise nicht oder Sie haben nicht die erforderlichen Zugriffsberechtigungen. Bitte versuchen Sie es erneut, nachdem Sie den API-Schlüssel geändert oder Ihre Zugriffsberechtigungen angepasst haben.","NoAvailableChannel": "Entschuldigung, der Proxy oder Router hat keinen verfügbaren Kanal für das angeforderte Modell. Bitte wechseln Sie die Kanal-/Schlüsselkonfiguration oder versuchen Sie es später erneut.","OllamaBizError": "Fehler bei der Anforderung des Ollama-Dienstes. Bitte beheben Sie das Problem oder versuchen Sie es erneut basierend auf den folgenden Informationen.",diff --git a/locales/de-DE/plugin.json b/locales/de-DE/plugin.jsonindex 7283edb3980..0878c7ad3e6 100644--- a/locales/de-DE/plugin.json+++ b/locales/de-DE/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Knoten aktualisieren","builtins.lobe-page-agent.apiName.wrapNodes": "Knoten umschließen","builtins.lobe-page-agent.title": "Seite",+ "builtins.lobe-remote-device.apiName.activateDevice": "Gerät verbinden",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Online-Geräte überprüfen",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} online",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} online",+ "builtins.lobe-remote-device.render.activated": "Verbunden",+ "builtins.lobe-remote-device.render.activationFailed": "Verbindung fehlgeschlagen",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Keine Geräte sind online",+ "builtins.lobe-remote-device.render.offline": "Offline",+ "builtins.lobe-remote-device.render.online": "Online",+ "builtins.lobe-remote-device.render.scope.personal": "Persönlich",+ "builtins.lobe-remote-device.render.scope.workspace": "Arbeitsbereich",+ "builtins.lobe-remote-device.title": "Fernzugriffsgerät","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Verbesserungsidee aufzeichnen","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Verbesserung vorschlagen","builtins.lobe-self-feedback-intent.inspector.memory.write": "Präferenz aufzeichnen",diff --git a/locales/de-DE/subscription.json b/locales/de-DE/subscription.jsonindex 951d951f91e..82e000f9aa0 100644--- a/locales/de-DE/subscription.json+++ b/locales/de-DE/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Diese Entwurfsrechnung wurde durch ein neues Abonnement erstellt und wird in Kürze automatisch abgerechnet","billing.empty": "Keine Abrechnungsverläufe","billing.endDate": "Enddatum",+ "billing.existingSubscription.description": "Es wurde kein neues Abonnement erstellt. Sie können Ihr aktuelles Abonnement unten verwalten oder kündigen.",+ "billing.existingSubscription.title": "Sie haben bereits ein Abonnement","billing.history": "Abrechnungsverlauf","billing.manage.openFailed": "Die Zahlungsverwaltungsseite konnte nicht geöffnet werden","billing.manage.title": "Zahlungen verwalten",diff --git a/locales/de-DE/topic.json b/locales/de-DE/topic.jsonindex b15e2eb0e02..19f7dc027d3 100644--- a/locales/de-DE/topic.json+++ b/locales/de-DE/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Gestern","guide.desc": "Klicken Sie auf die Schaltfläche links, um die aktuelle Konversation als historisches Thema zu speichern und eine neue Konversation zu starten.","guide.title": "Themenliste",+ "heteroImport.action.ignore": "Ignorieren: Dieses Verzeichnis aus der Liste ausblenden; aus der unten stehenden Ignorierten-Gruppe wiederherstellen",+ "heteroImport.action.restore": "Dieses Verzeichnis wiederherstellen",+ "heteroImport.action.unwatch": "Nicht mehr beobachten und zurück in die ursprüngliche Gruppe verschieben",+ "heteroImport.action.watch": "Beobachten: Zur Gruppe „Beobachtet“ oben anheften; neue Sitzungen können automatisch synchronisiert werden",+ "heteroImport.allSessions": "Alle Sitzungen",+ "heteroImport.badge.imported": "Importiert",+ "heteroImport.badge.linked": "Von LobeHub",+ "heteroImport.badge.linkedTip": "Diese Sitzung wurde von LobeHub gestartet und befindet sich bereits in Ihrer Themenliste",+ "heteroImport.badge.syncable": "Neue Nachrichten",+ "heteroImport.badge.syncableTip": "Bereits importiert, und das lokale Transkript wurde seitdem erweitert — erneutes Importieren fügt nur den neuen Teil hinzu",+ "heteroImport.done.cta": "Fertig",+ "heteroImport.done.failed": ", {{count}} fehlgeschlagen (wiederholbar)",+ "heteroImport.done.summary": "{{sessions}} Sitzungen · {{messages}} Nachrichten importiert",+ "heteroImport.empty.desc": "Keine Claude-Code (~/.claude/projects) oder Codex (~/.codex/sessions) Transkripte gefunden. Verwenden Sie diese zuerst in einem Terminal und versuchen Sie es dann erneut.",+ "heteroImport.empty.title": "Keine lokalen Agentensitzungen gefunden",+ "heteroImport.entry": "Lokale Agentensitzungen importieren",+ "heteroImport.error.desc": "Die lokalen Sitzungen konnten nicht gelesen werden. Überprüfen Sie, ob LobeHub auf Ihre Transkripte zugreifen kann, und versuchen Sie es erneut.",+ "heteroImport.error.title": "Scan fehlgeschlagen",+ "heteroImport.footer.hint": "Wählen Sie Sitzungen zum Importieren aus — erneute Importe überspringen automatisch vorhandene Inhalte",+ "heteroImport.footer.import": "{{count}} Sitzungen importieren",+ "heteroImport.footer.importEmpty": "Importieren",+ "heteroImport.footer.rescan": "Erneut scannen",+ "heteroImport.footer.selected": "{{sessions}} Sitzungen ausgewählt · ~{{messages}} Nachrichten · {{tokens}} Tokens",+ "heteroImport.hideImported": "Importierte ausblenden",+ "heteroImport.ignoredGroup": "{{count}} ignorierte Verzeichnisse",+ "heteroImport.meta.messages": "{{count}} Nachrichten",+ "heteroImport.meta.tokens": "{{tokens}} Tokens",+ "heteroImport.progress": "{{done}}/{{total}} Sitzungen werden importiert…",+ "heteroImport.retry": "Erneut versuchen",+ "heteroImport.scanning": "Lokale Agentensitzungen werden gescannt…",+ "heteroImport.searchEmpty": "Keine passenden Sitzungen gefunden",+ "heteroImport.searchPlaceholder": "Sitzungen suchen…",+ "heteroImport.selectAll": "Alle auswählen",+ "heteroImport.state.failed": "Fehlgeschlagen",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Wartend",+ "heteroImport.state.running": "Wird importiert",+ "heteroImport.title": "Lokale Agentensitzungen importieren",+ "heteroImport.watchedGroup": "Beobachtet","importError": "Import fehlgeschlagen","importInvalidFormat": "Ungültiges Dateiformat. Bitte stellen Sie sicher, dass es sich um eine gültige JSON-Datei handelt.","importLoading": "Konversation wird importiert...",diff --git a/locales/de-DE/verify.json b/locales/de-DE/verify.jsonindex 6c8134fed29..1c75d8b7e2a 100644--- a/locales/de-DE/verify.json+++ b/locales/de-DE/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Behebung erforderlich {{count}}","acceptance.filter.pending": "Zu überprüfen {{count}}","acceptance.filter.roundAll": "Alle Runden",+ "acceptance.goalCollapse": "Akzeptanzziel einklappen","acceptance.goalEdit": "Akzeptanzziel bearbeiten",+ "acceptance.goalExpand": "Akzeptanzziel ausklappen","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} akzeptiert","acceptance.group.allVerified": "{{passed}}/{{total}} alle überprüft & akzeptiert","acceptance.group.collapse": "{{label}} einklappen",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Akzeptanz gelöscht","acceptance.workspace.emptyDetail.description": "Wählen Sie eine Akzeptanz auf der linken Seite aus, um ihre Überprüfungen, Runden und Beweise zu überprüfen.","acceptance.workspace.emptyDetail.title": "Wählen Sie eine Akzeptanz aus",+ "acceptance.workspace.filters.active": "In Bearbeitung",+ "acceptance.workspace.filters.all": "Alle Akzeptanzen",+ "acceptance.workspace.filters.completed": "Abgeschlossen",+ "acceptance.workspace.filters.empty.active": "Keine Akzeptanzen in Bearbeitung.",+ "acceptance.workspace.filters.empty.completed": "Keine abgeschlossenen Akzeptanzen.",+ "acceptance.workspace.filters.noSearchResults": "Keine Akzeptanzen entsprechen „{{query}}“.",+ "acceptance.workspace.filters.showAll": "Alle Akzeptanzen anzeigen",+ "acceptance.workspace.filters.title": "Akzeptanzen filtern","acceptance.workspace.listEmpty": "Importieren Sie einen Überprüfungsbericht mit der CLI, und dessen Akzeptanz wird hier angezeigt.","acceptance.workspace.listEmptyTitle": "Noch keine Akzeptanzen","acceptance.workspace.renameEmpty": "Der Titel darf nicht leer sein",diff --git a/locales/en-US/chat.json b/locales/en-US/chat.jsonindex cb84b968986..3964b00d19d 100644--- a/locales/en-US/chat.json+++ b/locales/en-US/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Press <key/> to send","input.sendWithEnter": "Press <key/> to send","input.stop": "Stop",- "input.viewOnlyAgent": "You have view-only access to this agent, so messages cannot be sent. Ask the creator or a workspace owner for access.",- "input.viewOnlyGroup": "You have view-only access to this group, so messages cannot be sent. Ask the creator or a workspace owner for access.",+ "input.useOnlyAgent": "You can only use this agent",+ "input.useOnlyGroup": "You can only use this group",+ "input.viewOnlyAgent": "You can only view this agent",+ "input.viewOnlyGroup": "You can only view this group","input.warp": "New Line","input.warpWithKey": "Press <key/> to insert a line break","inputQueue.delete": "Delete",diff --git a/locales/en-US/messenger.json b/locales/en-US/messenger.jsonindex d32626a8216..6c3cf7fd31a 100644--- a/locales/en-US/messenger.json+++ b/locales/en-US/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Disconnect the current WeChat account before connecting another one.","messenger.wechat.paidDescription": "WeChat System Bot is available on paid personal plans. Upgrade to connect and run it.","messenger.wechat.paidTitle": "Upgrade to connect WeChat",+ "messenger.wechat.push.description": "WeChat only lets the bot message you inside a send window — reply anything to the bot in WeChat to reset it to {{max}} sends / 24 hours.",+ "messenger.wechat.push.expiresIn": "expires in {{value}}",+ "messenger.wechat.push.loadFailed": "Could not load the send window status.",+ "messenger.wechat.push.placeholder": "Write a message to push to your WeChat…",+ "messenger.wechat.push.queued": "{{count}} queued message(s) will be delivered automatically after you message the bot in WeChat.",+ "messenger.wechat.push.queuedToast": "The send window is closed — your message is queued. Say anything to the bot in WeChat to receive it.",+ "messenger.wechat.push.sectionTitle": "Message Push",+ "messenger.wechat.push.send": "Send to WeChat",+ "messenger.wechat.push.sentToast": "Pushed to WeChat ({{remaining}} sends left in this window).",+ "messenger.wechat.push.title": "Proactive push",+ "messenger.wechat.push.unavailableToast": "Push is temporarily unavailable. Please try again later.",+ "messenger.wechat.push.unlinkedToast": "Your WeChat link is unavailable — rescan the QR code to reconnect.",+ "messenger.wechat.push.windowClosed": "Send window closed",+ "messenger.wechat.push.windowClosedHint": "Send any message to the bot in WeChat to open it.",+ "messenger.wechat.push.windowOpen": "Send window open","messenger.wechat.qr.expired": "This QR code expired. Generate a new one to continue.","messenger.wechat.qr.scanned": "Scanned. Confirm the connection in WeChat.","messenger.wechat.qr.tip": "Open WeChat on your phone, scan this code, and confirm. This code is single-use and expires in 5 minutes.",diff --git a/locales/es-ES/chat.json b/locales/es-ES/chat.jsonindex b19986fdfc0..866ed5e3915 100644--- a/locales/es-ES/chat.json+++ b/locales/es-ES/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Presiona <key/> para enviar","input.sendWithEnter": "Presiona <key/> para enviar","input.stop": "Detener",- "input.viewOnlyAgent": "Tienes acceso de solo lectura a este agente, por lo que no se pueden enviar mensajes. Pide acceso al creador o a un propietario del espacio de trabajo.",- "input.viewOnlyGroup": "Tienes acceso de solo lectura a este grupo, por lo que no se pueden enviar mensajes. Pide acceso al creador o a un propietario del espacio de trabajo.",+ "input.useOnlyAgent": "Solo puedes usar este agente",+ "input.useOnlyGroup": "Solo puedes usar este grupo",+ "input.viewOnlyAgent": "Solo puedes ver este agente",+ "input.viewOnlyGroup": "Solo puedes ver este grupo","input.warp": "Nueva línea","input.warpWithKey": "Presiona <key/> para insertar un salto de línea","inputQueue.delete": "Eliminar",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Vista previa","workingPanel.localFile.preview.source": "Fuente","workingPanel.localFile.truncated": "Vista previa del archivo truncada a {{limit}} caracteres",+ "workingPanel.openMenu.configuration": "Configuración",+ "workingPanel.openMenu.terminal": "Abrir terminal",+ "workingPanel.openMenu.title": "Abrir panel de espacio de trabajo",+ "workingPanel.openMenu.tools": "Herramientas",+ "workingPanel.openMenu.workspace": "Espacio de trabajo",+ "workingPanel.overview.branch": "Rama",+ "workingPanel.overview.branch.detached": "HEAD separado",+ "workingPanel.overview.changes": "Cambios",+ "workingPanel.overview.changes.clean": "No hay cambios en el árbol de trabajo",+ "workingPanel.overview.changes.files_one": "{{count}} archivo modificado",+ "workingPanel.overview.changes.files_other": "{{count}} archivos modificados",+ "workingPanel.overview.documents.desc": "Documentos disponibles para este agente",+ "workingPanel.overview.empty": "La actividad y los resultados del espacio de trabajo aparecerán aquí mientras el agente trabaja.",+ "workingPanel.overview.emptyTitle": "Listo para trabajar",+ "workingPanel.overview.environment": "Entorno",+ "workingPanel.overview.environmentError": "No se pudo cargar el estado del repositorio",+ "workingPanel.overview.execution.device": "Dispositivo conectado",+ "workingPanel.overview.execution.local": "Este dispositivo",+ "workingPanel.overview.outputs": "Resultados",+ "workingPanel.overview.resources": "Recursos",+ "workingPanel.overview.skills.desc": "Habilidades disponibles para este agente",+ "workingPanel.overview.title": "Resumen",+ "workingPanel.overview.viewAll": "Ver todo",+ "workingPanel.overview.workspace.empty": "No se ha seleccionado ningún espacio de trabajo",+ "workingPanel.overview.workspace.emptyDesc": "Elige un directorio de trabajo desde la barra de ejecución","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Habilidades del usuario","workingPanel.skills.title": "Habilidades","workingPanel.space": "Espacio",+ "workingPanel.tabs.close": "Cerrar pestaña",+ "workingPanel.tabs.closeLeft": "Cerrar pestañas a la izquierda",+ "workingPanel.tabs.closeOthers": "Cerrar otras pestañas",+ "workingPanel.tabs.closeRight": "Cerrar pestañas a la derecha",+ "workingPanel.tabs.pin": "Fijar pestaña",+ "workingPanel.tabs.pinned": "Pestaña fijada",+ "workingPanel.tabs.unpin": "Desfijar pestaña","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Creado","workingPanel.works.changeType.updated": "Actualizado",diff --git a/locales/es-ES/labs.json b/locales/es-ES/labs.jsonindex da51e076a97..03e627d8606 100644--- a/locales/es-ES/labs.json+++ b/locales/es-ES/labs.json@@ -1,4 +1,5 @@{+ "description": "Estas funciones son experimentales. Podríamos eliminarlas y podrían tener errores. Nos encantaría recibir tus comentarios mientras las usas.","features.agentGraphConfig.desc": "Mostrar la configuración de tiempo de ejecución del gráfico en la configuración avanzada del perfil del agente.","features.agentGraphConfig.title": "Configuración de Tiempo de Ejecución del Gráfico del Agente","features.agentSelfIteration.desc": "Permite que el asistente reflexione, desarrolle autoconsciencia y realice iteraciones continuas a lo largo de intentos e interacciones.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Entorno de Ejecución del SDK de Claude Code","features.groupChat.desc": "Activa la coordinación de chat grupal con múltiples agentes.","features.groupChat.title": "Chat Grupal (Multiagente)",+ "features.heteroSessionImport.desc": "Agrega una entrada \"Importar sesiones de agentes locales\" al menú de la lista de temas: escanea las transcripciones locales de Claude Code / Codex CLI y las importa como temas, con sincronización incremental al volver a importar.",+ "features.heteroSessionImport.title": "Importación de sesiones de agentes locales","features.imessage.desc": "Conectar agentes a iMessage a través del puente local LobeHub Desktop BlueBubbles.","features.imessage.title": "Canal de iMessage","features.inAppBrowser.desc": "Mostrar la pestaña del navegador en el panel lateral de la conversación: un navegador integrado que abre los resultados de búsqueda en el lugar y permite a los agentes navegar de forma visible.",diff --git a/locales/es-ES/messenger.json b/locales/es-ES/messenger.jsonindex 1bbb1d20e60..74b83993014 100644--- a/locales/es-ES/messenger.json+++ b/locales/es-ES/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Desconecta la cuenta de WeChat actual antes de conectar otra.","messenger.wechat.paidDescription": "El Bot del Sistema de WeChat está disponible en planes personales de pago. Mejora tu plan para conectarlo y usarlo.","messenger.wechat.paidTitle": "Mejora tu plan para conectar WeChat",+ "messenger.wechat.push.description": "WeChat solo permite que el bot te envíe mensajes dentro de una ventana de envío — responde cualquier cosa al bot en WeChat para restablecerlo a {{max}} envíos / 24 horas.",+ "messenger.wechat.push.expiresIn": "expira en {{value}}",+ "messenger.wechat.push.loadFailed": "No se pudo cargar el estado de la ventana de envío.",+ "messenger.wechat.push.placeholder": "Escribe un mensaje para enviar a tu WeChat…",+ "messenger.wechat.push.queued": "{{count}} mensaje(s) en cola se entregarán automáticamente después de que envíes un mensaje al bot en WeChat.",+ "messenger.wechat.push.queuedToast": "La ventana de envío está cerrada — tu mensaje está en cola. Di cualquier cosa al bot en WeChat para recibirlo.",+ "messenger.wechat.push.sectionTitle": "Envío de mensajes",+ "messenger.wechat.push.send": "Enviar a WeChat",+ "messenger.wechat.push.sentToast": "Enviado a WeChat ({{remaining}} envíos restantes en esta ventana).",+ "messenger.wechat.push.title": "Envío proactivo",+ "messenger.wechat.push.unavailableToast": "El envío está temporalmente no disponible. Por favor, inténtalo de nuevo más tarde.",+ "messenger.wechat.push.unlinkedToast": "Tu enlace de WeChat no está disponible — vuelve a escanear el código QR para reconectar.",+ "messenger.wechat.push.windowClosed": "Ventana de envío cerrada",+ "messenger.wechat.push.windowClosedHint": "Envía cualquier mensaje al bot en WeChat para abrirla.",+ "messenger.wechat.push.windowOpen": "Ventana de envío abierta","messenger.wechat.qr.expired": "Este código QR ha expirado. Genera uno nuevo para continuar.","messenger.wechat.qr.scanned": "Escaneado. Confirma la conexión en WeChat.","messenger.wechat.qr.tip": "Abre WeChat en tu teléfono, escanea este código y confirma. Este código es de un solo uso y expira en 5 minutos.",diff --git a/locales/es-ES/modelRuntime.json b/locales/es-ES/modelRuntime.jsonindex f062a5db88e..99db2bca15e 100644--- a/locales/es-ES/modelRuntime.json+++ b/locales/es-ES/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "La autenticación de Vertex falló. Por favor, verifica tus credenciales y vuelve a intentarlo.","LocationNotSupportError": "Lo sentimos, tu ubicación actual no admite este servicio de modelo. Esto puede deberse a restricciones regionales o a que el servicio no está disponible. Por favor, confirma si la ubicación actual admite el uso de este servicio, o intenta usar una ubicación diferente.","ModelEmptyCompletion": "El proveedor del modelo devolvió una respuesta vacía. Incluso sin contenido visible, esta solicitud puede generar costos. Puedes intentarlo nuevamente o cambiar de modelo y probar otra vez.",+ "ModelEmptyCompletionWithCost": "El proveedor del modelo devolvió una respuesta vacía. Esta solicitud costó {{credits}} créditos. Reintentar puede implicar un costo similar, o puedes cambiar de modelo.","ModelNotFound": "Lo sentimos, no se pudo encontrar el modelo solicitado. Puede que no exista o que no tengas los permisos de acceso necesarios. Por favor, vuelve a intentarlo después de cambiar la clave API o ajustar tus permisos de acceso.","NoAvailableChannel": "Lo sentimos, el proxy o enrutador no tiene un canal disponible para el modelo solicitado. Por favor, cambia la configuración del canal/clave o vuelve a intentarlo más tarde.","OllamaBizError": "Error al solicitar el servicio Ollama, por favor soluciona el problema o vuelve a intentarlo basándote en la información siguiente.",diff --git a/locales/es-ES/plugin.json b/locales/es-ES/plugin.jsonindex 8ace85ddb69..a458091e056 100644--- a/locales/es-ES/plugin.json+++ b/locales/es-ES/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Actualizar nodo","builtins.lobe-page-agent.apiName.wrapNodes": "Envolver nodos","builtins.lobe-page-agent.title": "Página",+ "builtins.lobe-remote-device.apiName.activateDevice": "Conectar dispositivo",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Verificar dispositivos en línea",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} en línea",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} en línea",+ "builtins.lobe-remote-device.render.activated": "Conectado",+ "builtins.lobe-remote-device.render.activationFailed": "No se pudo conectar",+ "builtins.lobe-remote-device.render.noOnlineDevices": "No hay dispositivos en línea",+ "builtins.lobe-remote-device.render.offline": "Desconectado",+ "builtins.lobe-remote-device.render.online": "Conectado",+ "builtins.lobe-remote-device.render.scope.personal": "Personal",+ "builtins.lobe-remote-device.render.scope.workspace": "Espacio de trabajo",+ "builtins.lobe-remote-device.title": "Dispositivo remoto","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Registrar idea de mejora","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Sugerir mejora","builtins.lobe-self-feedback-intent.inspector.memory.write": "Registrar preferencia",diff --git a/locales/es-ES/subscription.json b/locales/es-ES/subscription.jsonindex c98bfdf897e..30e8729c7b1 100644--- a/locales/es-ES/subscription.json+++ b/locales/es-ES/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Esta factura en borrador fue generada por una nueva suscripción y se cobrará automáticamente pronto","billing.empty": "Sin historial de facturación","billing.endDate": "Fecha de Finalización",+ "billing.existingSubscription.description": "No se ha creado una nueva suscripción. Puedes gestionar o cancelar tu suscripción actual a continuación.",+ "billing.existingSubscription.title": "Ya tienes una suscripción","billing.history": "Historial de Facturación","billing.manage.openFailed": "No se pudo abrir la página de gestión de pagos","billing.manage.title": "Gestionar pagos",diff --git a/locales/es-ES/topic.json b/locales/es-ES/topic.jsonindex fec6defa978..d2156b1f0c3 100644--- a/locales/es-ES/topic.json+++ b/locales/es-ES/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Ayer","guide.desc": "Haz clic en el botón de la izquierda para guardar la conversación actual como un tema histórico y comenzar una nueva conversación.","guide.title": "Lista de temas",+ "heteroImport.action.ignore": "Ignorar: ocultar este directorio de la lista; restaurarlo desde el grupo Ignorados a continuación",+ "heteroImport.action.restore": "Restaurar este directorio",+ "heteroImport.action.unwatch": "Dejar de observar y mover de nuevo a su grupo de origen",+ "heteroImport.action.watch": "Observar: fijar en el grupo Observados en la parte superior; las nuevas sesiones pueden sincronizarse automáticamente",+ "heteroImport.allSessions": "Todas las sesiones",+ "heteroImport.badge.imported": "Importado",+ "heteroImport.badge.linked": "Desde LobeHub",+ "heteroImport.badge.linkedTip": "Esta sesión se inició desde LobeHub y ya está en tu lista de temas",+ "heteroImport.badge.syncable": "Nuevos mensajes",+ "heteroImport.badge.syncableTip": "Importado anteriormente, y la transcripción local ha crecido desde entonces — importar de nuevo solo agrega la parte nueva",+ "heteroImport.done.cta": "Hecho",+ "heteroImport.done.failed": ", {{count}} fallidos (reintentables)",+ "heteroImport.done.summary": "Importadas {{sessions}} sesiones · {{messages}} mensajes",+ "heteroImport.empty.desc": "No se encontraron transcripciones de Claude Code (~/.claude/projects) o Codex (~/.codex/sessions). Úsalos en una terminal primero, luego inténtalo de nuevo.",+ "heteroImport.empty.title": "No se encontraron sesiones de agentes locales",+ "heteroImport.entry": "Importar sesiones de agentes locales",+ "heteroImport.error.desc": "No se pudieron leer las sesiones locales. Verifica que LobeHub pueda acceder a tus transcripciones, luego reintenta.",+ "heteroImport.error.title": "Error al escanear",+ "heteroImport.footer.hint": "Selecciona sesiones para importar — las reimportaciones omiten automáticamente el contenido existente",+ "heteroImport.footer.import": "Importar {{count}} sesiones",+ "heteroImport.footer.importEmpty": "Importar",+ "heteroImport.footer.rescan": "Volver a escanear",+ "heteroImport.footer.selected": "Seleccionadas {{sessions}} sesiones · ~{{messages}} mensajes · {{tokens}} tokens",+ "heteroImport.hideImported": "Ocultar importados",+ "heteroImport.ignoredGroup": "{{count}} directorios ignorados",+ "heteroImport.meta.messages": "{{count}} mensajes",+ "heteroImport.meta.tokens": "{{tokens}} tokens",+ "heteroImport.progress": "Importando {{done}}/{{total}} sesiones…",+ "heteroImport.retry": "Reintentar",+ "heteroImport.scanning": "Escaneando sesiones de agentes locales…",+ "heteroImport.searchEmpty": "No hay sesiones coincidentes",+ "heteroImport.searchPlaceholder": "Buscar sesiones…",+ "heteroImport.selectAll": "Seleccionar todo",+ "heteroImport.state.failed": "Fallido",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "En espera",+ "heteroImport.state.running": "Importando",+ "heteroImport.title": "Importar sesiones de agentes locales",+ "heteroImport.watchedGroup": "Observados","importError": "Error al importar","importInvalidFormat": "Formato de archivo no válido. Asegúrate de que sea un archivo JSON válido.","importLoading": "Importando conversación...",diff --git a/locales/es-ES/verify.json b/locales/es-ES/verify.jsonindex 6840967280d..83f28fcc404 100644--- a/locales/es-ES/verify.json+++ b/locales/es-ES/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Necesita corrección {{count}}","acceptance.filter.pending": "Por revisar {{count}}","acceptance.filter.roundAll": "Todas las rondas",+ "acceptance.goalCollapse": "Colapsar el objetivo de aceptación","acceptance.goalEdit": "Editar el objetivo de aceptación",+ "acceptance.goalExpand": "Expandir el objetivo de aceptación","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} aceptados","acceptance.group.allVerified": "{{passed}}/{{total}} todos verificados y aceptados","acceptance.group.collapse": "Colapsar {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Aceptación eliminada","acceptance.workspace.emptyDetail.description": "Selecciona una aceptación a la izquierda para revisar sus verificaciones, rondas y evidencias.","acceptance.workspace.emptyDetail.title": "Selecciona una aceptación",+ "acceptance.workspace.filters.active": "En progreso",+ "acceptance.workspace.filters.all": "Todas las aceptaciones",+ "acceptance.workspace.filters.completed": "Completadas",+ "acceptance.workspace.filters.empty.active": "No hay aceptaciones en progreso.",+ "acceptance.workspace.filters.empty.completed": "No hay aceptaciones completadas.",+ "acceptance.workspace.filters.noSearchResults": "No hay aceptaciones que coincidan con “{{query}}”.",+ "acceptance.workspace.filters.showAll": "Mostrar todas las aceptaciones",+ "acceptance.workspace.filters.title": "Filtrar aceptaciones","acceptance.workspace.listEmpty": "Ingresa un informe de verificación con la CLI y su aceptación aparecerá aquí.","acceptance.workspace.listEmptyTitle": "Aún no hay aceptaciones","acceptance.workspace.renameEmpty": "El título no puede estar vacío",diff --git a/locales/fa-IR/chat.json b/locales/fa-IR/chat.jsonindex 38cd6383923..0197cd076db 100644--- a/locales/fa-IR/chat.json+++ b/locales/fa-IR/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "برای ارسال <key/> را فشار دهید","input.sendWithEnter": "برای ارسال <key/> را فشار دهید","input.stop": "توقف",- "input.viewOnlyAgent": "شما فقط دسترسی مشاهده به این عامل دارید، بنابراین نمیتوانید پیام ارسال کنید. از سازنده یا مالک فضای کاری درخواست دسترسی کنید.",- "input.viewOnlyGroup": "شما فقط دسترسی مشاهده به این گروه دارید، بنابراین نمیتوانید پیام ارسال کنید. از سازنده یا مالک فضای کاری درخواست دسترسی کنید.",+ "input.useOnlyAgent": "شما فقط میتوانید از این عامل استفاده کنید",+ "input.useOnlyGroup": "شما فقط میتوانید از این گروه استفاده کنید",+ "input.viewOnlyAgent": "شما فقط میتوانید این عامل را مشاهده کنید",+ "input.viewOnlyGroup": "شما فقط میتوانید این گروه را مشاهده کنید","input.warp": "خط جدید","input.warpWithKey": "برای افزودن خط جدید <key/> را فشار دهید","inputQueue.delete": "حذف",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "پیشنمایش","workingPanel.localFile.preview.source": "منبع","workingPanel.localFile.truncated": "پیشنمایش فایل به {{limit}} کاراکتر محدود شده است",+ "workingPanel.openMenu.configuration": "پیکربندی",+ "workingPanel.openMenu.terminal": "باز کردن ترمینال",+ "workingPanel.openMenu.title": "باز کردن پانل فضای کاری",+ "workingPanel.openMenu.tools": "ابزارها",+ "workingPanel.openMenu.workspace": "فضای کاری",+ "workingPanel.overview.branch": "شاخه",+ "workingPanel.overview.branch.detached": "HEAD جدا شده",+ "workingPanel.overview.changes": "تغییرات",+ "workingPanel.overview.changes.clean": "هیچ تغییری در درخت کاری وجود ندارد",+ "workingPanel.overview.changes.files_one": "{{count}} فایل تغییر کرده است",+ "workingPanel.overview.changes.files_other": "{{count}} فایل تغییر کردهاند",+ "workingPanel.overview.documents.desc": "اسناد موجود برای این عامل",+ "workingPanel.overview.empty": "فعالیتها و خروجیهای فضای کاری در اینجا نمایش داده میشوند هنگامی که عامل کار میکند.",+ "workingPanel.overview.emptyTitle": "آماده به کار",+ "workingPanel.overview.environment": "محیط",+ "workingPanel.overview.environmentError": "وضعیت مخزن بارگذاری نشد",+ "workingPanel.overview.execution.device": "دستگاه متصل",+ "workingPanel.overview.execution.local": "این دستگاه",+ "workingPanel.overview.outputs": "خروجیها",+ "workingPanel.overview.resources": "منابع",+ "workingPanel.overview.skills.desc": "مهارتهای موجود برای این عامل",+ "workingPanel.overview.title": "نمای کلی",+ "workingPanel.overview.viewAll": "مشاهده همه",+ "workingPanel.overview.workspace.empty": "هیچ فضای کاری انتخاب نشده است",+ "workingPanel.overview.workspace.emptyDesc": "یک دایرکتوری کاری از نوار زمان اجرا انتخاب کنید","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "مهارتهای کاربر","workingPanel.skills.title": "مهارتها","workingPanel.space": "فضا",+ "workingPanel.tabs.close": "بستن تب",+ "workingPanel.tabs.closeLeft": "بستن تبهای سمت چپ",+ "workingPanel.tabs.closeOthers": "بستن تبهای دیگر",+ "workingPanel.tabs.closeRight": "بستن تبهای سمت راست",+ "workingPanel.tabs.pin": "سنجاق کردن تب",+ "workingPanel.tabs.pinned": "تب سنجاق شده",+ "workingPanel.tabs.unpin": "برداشتن سنجاق تب","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "ایجاد شده","workingPanel.works.changeType.updated": "بهروزرسانی شده",diff --git a/locales/fa-IR/labs.json b/locales/fa-IR/labs.jsonindex b3aea5bbc58..a7b7052cec5 100644--- a/locales/fa-IR/labs.json+++ b/locales/fa-IR/labs.json@@ -1,4 +1,5 @@{+ "description": "این ویژگیها آزمایشی هستند. ممکن است آنها را حذف کنیم و ممکن است دارای اشکالاتی باشند. خوشحال میشویم نظرات شما را هنگام استفاده از آنها دریافت کنیم.","features.agentGraphConfig.desc": "نمایش تنظیمات زمان اجرای نمودار در تنظیمات پیشرفته پروفایل عامل.","features.agentGraphConfig.title": "پیکربندی زمان اجرای نمودار عامل","features.agentSelfIteration.desc": "به دستیار امکان میدهد درباره عملکرد خود تأمل کند، خودآگاهی ایجاد کند و از طریق تلاشها و تعاملات مداوم به طور پیوسته بهبود یابد.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "محیط اجرایی Claude Code SDK","features.groupChat.desc": "فعالسازی هماهنگی گفتوگوی گروهی چندعاملی.","features.groupChat.title": "گفتوگوی گروهی (چندعاملی)",+ "features.heteroSessionImport.desc": "افزودن گزینه \"وارد کردن جلسات عامل محلی\" به منوی لیست موضوعات: اسکن متنهای Claude Code / Codex CLI محلی و وارد کردن آنها به عنوان موضوعات، با همگامسازی افزایشی در وارد کردن مجدد.",+ "features.heteroSessionImport.title": "وارد کردن جلسات عامل محلی","features.imessage.desc": "اتصال نمایندگان به iMessage از طریق پل BlueBubbles دسکتاپ LobeHub محلی.","features.imessage.title": "کانال iMessage","features.inAppBrowser.desc": "نمایش تب مرورگر در پانل کناری مکالمه: یک مرورگر داخلی که نتایج جستجو را در همانجا باز میکند و به نمایندگان اجازه میدهد به صورت قابل مشاهده مرور کنند.",diff --git a/locales/fa-IR/messenger.json b/locales/fa-IR/messenger.jsonindex 14ddf004eb2..8c7c38398d8 100644--- a/locales/fa-IR/messenger.json+++ b/locales/fa-IR/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "حساب ویچت فعلی را قطع کنید قبل از اینکه حساب دیگری را متصل کنید.","messenger.wechat.paidDescription": "ربات سیستم ویچت در طرحهای شخصی پولی در دسترس است. برای اتصال و اجرای آن ارتقا دهید.","messenger.wechat.paidTitle": "برای اتصال ویچت ارتقا دهید",+ "messenger.wechat.push.description": "ویچت فقط اجازه میدهد که ربات در یک پنجره ارسال پیام به شما پیام دهد — هر چیزی را به ربات در ویچت پاسخ دهید تا آن را به {{max}} ارسال / ۲۴ ساعت بازنشانی کنید.",+ "messenger.wechat.push.expiresIn": "منقضی میشود در {{value}}",+ "messenger.wechat.push.loadFailed": "وضعیت پنجره ارسال بارگذاری نشد.",+ "messenger.wechat.push.placeholder": "یک پیام بنویسید تا به ویچت ارسال شود...",+ "messenger.wechat.push.queued": "{{count}} پیام در صف به طور خودکار پس از پیام دادن به ربات در ویچت ارسال خواهد شد.",+ "messenger.wechat.push.queuedToast": "پنجره ارسال بسته است — پیام شما در صف قرار گرفت. هر چیزی به ربات در ویچت بگویید تا آن را دریافت کنید.",+ "messenger.wechat.push.sectionTitle": "ارسال پیام",+ "messenger.wechat.push.send": "ارسال به ویچت",+ "messenger.wechat.push.sentToast": "به ویچت ارسال شد ({{remaining}} ارسال باقیمانده در این پنجره).",+ "messenger.wechat.push.title": "ارسال فعال",+ "messenger.wechat.push.unavailableToast": "ارسال موقتاً در دسترس نیست. لطفاً بعداً دوباره تلاش کنید.",+ "messenger.wechat.push.unlinkedToast": "لینک ویچت شما در دسترس نیست — کد QR را دوباره اسکن کنید تا دوباره متصل شوید.",+ "messenger.wechat.push.windowClosed": "پنجره ارسال بسته شد",+ "messenger.wechat.push.windowClosedHint": "هر پیامی به ربات در ویچت ارسال کنید تا آن را باز کنید.",+ "messenger.wechat.push.windowOpen": "پنجره ارسال باز است","messenger.wechat.qr.expired": "این کد QR منقضی شده است. یک کد جدید تولید کنید تا ادامه دهید.","messenger.wechat.qr.scanned": "اسکن شد. اتصال را در ویچت تأیید کنید.","messenger.wechat.qr.tip": "ویچت را در تلفن خود باز کنید، این کد را اسکن کنید و تأیید کنید. این کد یکبار مصرف است و در ۵ دقیقه منقضی میشود.",diff --git a/locales/fa-IR/modelRuntime.json b/locales/fa-IR/modelRuntime.jsonindex e12ecb6b85c..a5f9d68b552 100644--- a/locales/fa-IR/modelRuntime.json+++ b/locales/fa-IR/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "احراز هویت Vertex ناموفق بود. لطفاً اطلاعات ورود خود را بررسی کرده و دوباره تلاش کنید.","LocationNotSupportError": "متأسفیم، مکان فعلی شما از این سرویس مدل پشتیبانی نمیکند. این ممکن است به دلیل محدودیتهای منطقهای یا عدم دسترسی سرویس باشد. لطفاً تأیید کنید که مکان فعلی از استفاده از این سرویس پشتیبانی میکند یا از مکان دیگری استفاده کنید.","ModelEmptyCompletion": "ارائهدهنده مدل پاسخی خالی بازگرداند. حتی بدون محتوای قابل مشاهده، این درخواست ممکن است هزینههایی داشته باشد. میتوانید دوباره تلاش کنید یا مدل را تغییر داده و دوباره امتحان کنید.",+ "ModelEmptyCompletionWithCost": "ارائهدهنده مدل پاسخی خالی بازگرداند. این درخواست {{credits}} اعتبار هزینه داشت. تلاش مجدد ممکن است هزینه مشابهی داشته باشد، یا میتوانید مدلها را تغییر دهید.","ModelNotFound": "متأسفیم، مدل درخواست شده یافت نشد. ممکن است وجود نداشته باشد یا شما دسترسی لازم را نداشته باشید. لطفاً پس از تغییر کلید API یا تنظیم دسترسی خود دوباره تلاش کنید.","NoAvailableChannel": "متأسفیم، پراکسی یا روتر هیچ کانال موجودی برای مدل درخواست شده ندارد. لطفاً پیکربندی کانال/کلید را تغییر دهید یا بعداً دوباره تلاش کنید.","OllamaBizError": "خطا در درخواست سرویس Ollama، لطفاً مشکل را برطرف کنید یا دوباره تلاش کنید.",diff --git a/locales/fa-IR/plugin.json b/locales/fa-IR/plugin.jsonindex 1218f7652a1..88ca8a13fcd 100644--- a/locales/fa-IR/plugin.json+++ b/locales/fa-IR/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "بهروزرسانی گره","builtins.lobe-page-agent.apiName.wrapNodes": "بستهبندی گرهها","builtins.lobe-page-agent.title": "صفحه",+ "builtins.lobe-remote-device.apiName.activateDevice": "اتصال دستگاه",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "بررسی دستگاههای آنلاین",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} آنلاین",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} آنلاین",+ "builtins.lobe-remote-device.render.activated": "متصل شد",+ "builtins.lobe-remote-device.render.activationFailed": "اتصال ناموفق بود",+ "builtins.lobe-remote-device.render.noOnlineDevices": "هیچ دستگاهی آنلاین نیست",+ "builtins.lobe-remote-device.render.offline": "آفلاین",+ "builtins.lobe-remote-device.render.online": "آنلاین",+ "builtins.lobe-remote-device.render.scope.personal": "شخصی",+ "builtins.lobe-remote-device.render.scope.workspace": "محیط کاری",+ "builtins.lobe-remote-device.title": "دستگاه از راه دور","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "ثبت ایده بهبود","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "پیشنهاد بهبود","builtins.lobe-self-feedback-intent.inspector.memory.write": "ثبت ترجیح",diff --git a/locales/fa-IR/subscription.json b/locales/fa-IR/subscription.jsonindex da892f52df4..f0332209de7 100644--- a/locales/fa-IR/subscription.json+++ b/locales/fa-IR/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "این پیشفاکتور توسط اشتراک جدید ایجاد شده و بهزودی بهصورت خودکار پرداخت خواهد شد","billing.empty": "تاریخچه پرداختی وجود ندارد","billing.endDate": "تاریخ پایان",+ "billing.existingSubscription.description": "هیچ اشتراک جدیدی ایجاد نشد. شما میتوانید اشتراک فعلی خود را در زیر مدیریت یا لغو کنید.",+ "billing.existingSubscription.title": "شما قبلاً یک اشتراک دارید","billing.history": "تاریخچه پرداخت","billing.manage.openFailed": "باز کردن صفحه مدیریت پرداختها ناموفق بود","billing.manage.title": "مدیریت پرداختها",diff --git a/locales/fa-IR/topic.json b/locales/fa-IR/topic.jsonindex e6338e26acf..9af822477c8 100644--- a/locales/fa-IR/topic.json+++ b/locales/fa-IR/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "دیروز","guide.desc": "برای ذخیره گفتوگوی فعلی بهعنوان یک موضوع تاریخی و شروع گفتوگوی جدید، روی دکمه سمت چپ کلیک کنید.","guide.title": "فهرست گفتوگوها",+ "heteroImport.action.ignore": "نادیده گرفتن: این پوشه را از لیست پنهان کنید؛ آن را از گروه نادیده گرفته شده در زیر بازیابی کنید",+ "heteroImport.action.restore": "این پوشه را بازیابی کنید",+ "heteroImport.action.unwatch": "مشاهده را متوقف کنید و به گروه منبع آن بازگردید",+ "heteroImport.action.watch": "مشاهده: به گروه مشاهدهشده در بالا سنجاق کنید؛ جلسات جدید میتوانند بهطور خودکار همگامسازی شوند",+ "heteroImport.allSessions": "همه جلسات",+ "heteroImport.badge.imported": "وارد شده",+ "heteroImport.badge.linked": "از LobeHub",+ "heteroImport.badge.linkedTip": "این جلسه از LobeHub شروع شده و قبلاً در لیست موضوعات شما وجود دارد",+ "heteroImport.badge.syncable": "پیامهای جدید",+ "heteroImport.badge.syncableTip": "قبلاً وارد شده و متن محلی رشد کرده است — وارد کردن دوباره فقط بخش جدید را اضافه میکند",+ "heteroImport.done.cta": "تمام شد",+ "heteroImport.done.failed": "{{count}} مورد شکست خورد (قابل تلاش مجدد)",+ "heteroImport.done.summary": "{{sessions}} جلسه وارد شد · {{messages}} پیام",+ "heteroImport.empty.desc": "هیچ متن Claude Code (~/.claude/projects) یا Codex (~/.codex/sessions) یافت نشد. ابتدا از آنها در یک ترمینال استفاده کنید، سپس دوباره تلاش کنید.",+ "heteroImport.empty.title": "هیچ جلسه عامل محلی یافت نشد",+ "heteroImport.entry": "وارد کردن جلسات عامل محلی",+ "heteroImport.error.desc": "نمیتوان جلسات محلی را خواند. بررسی کنید که LobeHub به متون شما دسترسی دارد، سپس دوباره تلاش کنید.",+ "heteroImport.error.title": "اسکن ناموفق بود",+ "heteroImport.footer.hint": "جلساتی را برای وارد کردن انتخاب کنید — واردات مجدد بهطور خودکار محتوای موجود را نادیده میگیرد",+ "heteroImport.footer.import": "وارد کردن {{count}} جلسه",+ "heteroImport.footer.importEmpty": "وارد کردن",+ "heteroImport.footer.rescan": "اسکن مجدد",+ "heteroImport.footer.selected": "{{sessions}} جلسه انتخاب شده · ~{{messages}} پیام · {{tokens}} توکن",+ "heteroImport.hideImported": "پنهان کردن وارد شدهها",+ "heteroImport.ignoredGroup": "{{count}} پوشه نادیده گرفته شده",+ "heteroImport.meta.messages": "{{count}} پیام",+ "heteroImport.meta.tokens": "{{tokens}} توکن",+ "heteroImport.progress": "در حال وارد کردن {{done}}/{{total}} جلسه…",+ "heteroImport.retry": "تلاش مجدد",+ "heteroImport.scanning": "در حال اسکن جلسات عامل محلی…",+ "heteroImport.searchEmpty": "هیچ جلسهای مطابق یافت نشد",+ "heteroImport.searchPlaceholder": "جستجوی جلسات…",+ "heteroImport.selectAll": "انتخاب همه",+ "heteroImport.state.failed": "ناموفق",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "در انتظار",+ "heteroImport.state.running": "در حال وارد کردن",+ "heteroImport.title": "وارد کردن جلسات عامل محلی",+ "heteroImport.watchedGroup": "مشاهدهشده","importError": "وارد کردن ناموفق بود","importInvalidFormat": "فرمت فایل نامعتبر است. لطفاً مطمئن شوید که فایل JSON معتبر است.","importLoading": "در حال وارد کردن گفتوگو...",diff --git a/locales/fa-IR/verify.json b/locales/fa-IR/verify.jsonindex 926536716b5..0cadc0f0cb5 100644--- a/locales/fa-IR/verify.json+++ b/locales/fa-IR/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "نیاز به اصلاح {{count}}","acceptance.filter.pending": "برای بازبینی {{count}}","acceptance.filter.roundAll": "همه دورها",+ "acceptance.goalCollapse": "بستن هدف پذیرش","acceptance.goalEdit": "ویرایش هدف پذیرش",+ "acceptance.goalExpand": "باز کردن هدف پذیرش","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} پذیرفتهشده","acceptance.group.allVerified": "{{passed}}/{{total}} همه تأیید و پذیرفتهشده","acceptance.group.collapse": "جمع کردن {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "پذیرش حذف شد","acceptance.workspace.emptyDetail.description": "یک پذیرش را در سمت چپ انتخاب کنید تا بررسیها، دورها و شواهد آن را مرور کنید.","acceptance.workspace.emptyDetail.title": "یک پذیرش انتخاب کنید",+ "acceptance.workspace.filters.active": "در حال انجام",+ "acceptance.workspace.filters.all": "همه پذیرشها",+ "acceptance.workspace.filters.completed": "تکمیل شده",+ "acceptance.workspace.filters.empty.active": "هیچ پذیرشی در حال انجام نیست.",+ "acceptance.workspace.filters.empty.completed": "هیچ پذیرش تکمیلشدهای وجود ندارد.",+ "acceptance.workspace.filters.noSearchResults": "هیچ پذیرشی با «{{query}}» مطابقت ندارد.",+ "acceptance.workspace.filters.showAll": "نمایش همه پذیرشها",+ "acceptance.workspace.filters.title": "فیلتر پذیرشها","acceptance.workspace.listEmpty": "یک گزارش تأیید را با CLI وارد کنید و پذیرش آن اینجا نمایش داده خواهد شد.","acceptance.workspace.listEmptyTitle": "هنوز هیچ پذیرشی وجود ندارد","acceptance.workspace.renameEmpty": "عنوان نمیتواند خالی باشد",diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.jsonindex b8533f31eaf..16cbd125001 100644--- a/locales/fr-FR/chat.json+++ b/locales/fr-FR/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Appuyez sur <key/> pour envoyer","input.sendWithEnter": "Appuyez sur <key/> pour envoyer","input.stop": "Arrêter",- "input.viewOnlyAgent": "Vous avez un accès en lecture seule à cet agent, donc les messages ne peuvent pas être envoyés. Demandez au créateur ou à un propriétaire de l'espace de travail un accès.",- "input.viewOnlyGroup": "Vous avez un accès en lecture seule à ce groupe, donc les messages ne peuvent pas être envoyés. Demandez au créateur ou à un propriétaire de l'espace de travail un accès.",+ "input.useOnlyAgent": "Vous ne pouvez utiliser que cet agent",+ "input.useOnlyGroup": "Vous ne pouvez utiliser que ce groupe",+ "input.viewOnlyAgent": "Vous pouvez uniquement consulter cet agent",+ "input.viewOnlyGroup": "Vous pouvez uniquement consulter ce groupe","input.warp": "Nouvelle ligne","input.warpWithKey": "Appuyez sur <key/> pour insérer un saut de ligne","inputQueue.delete": "Supprimer",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Aperçu","workingPanel.localFile.preview.source": "Source","workingPanel.localFile.truncated": "Aperçu du fichier tronqué à {{limit}} caractères",+ "workingPanel.openMenu.configuration": "Configuration",+ "workingPanel.openMenu.terminal": "Ouvrir le terminal",+ "workingPanel.openMenu.title": "Ouvrir le panneau de l'espace de travail",+ "workingPanel.openMenu.tools": "Outils",+ "workingPanel.openMenu.workspace": "Espace de travail",+ "workingPanel.overview.branch": "Branche",+ "workingPanel.overview.branch.detached": "HEAD détaché",+ "workingPanel.overview.changes": "Modifications",+ "workingPanel.overview.changes.clean": "Aucune modification dans l'arborescence de travail",+ "workingPanel.overview.changes.files_one": "{{count}} fichier modifié",+ "workingPanel.overview.changes.files_other": "{{count}} fichiers modifiés",+ "workingPanel.overview.documents.desc": "Documents disponibles pour cet agent",+ "workingPanel.overview.empty": "L'activité et les résultats de l'espace de travail apparaîtront ici au fur et à mesure que l'agent travaille.",+ "workingPanel.overview.emptyTitle": "Prêt à travailler",+ "workingPanel.overview.environment": "Environnement",+ "workingPanel.overview.environmentError": "Impossible de charger l'état du dépôt",+ "workingPanel.overview.execution.device": "Appareil connecté",+ "workingPanel.overview.execution.local": "Cet appareil",+ "workingPanel.overview.outputs": "Résultats",+ "workingPanel.overview.resources": "Ressources",+ "workingPanel.overview.skills.desc": "Compétences disponibles pour cet agent",+ "workingPanel.overview.title": "Aperçu",+ "workingPanel.overview.viewAll": "Voir tout",+ "workingPanel.overview.workspace.empty": "Aucun espace de travail sélectionné",+ "workingPanel.overview.workspace.emptyDesc": "Choisissez un répertoire de travail dans la barre d'exécution","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Compétences de l'utilisateur","workingPanel.skills.title": "Compétences","workingPanel.space": "Espace",+ "workingPanel.tabs.close": "Fermer l'onglet",+ "workingPanel.tabs.closeLeft": "Fermer les onglets à gauche",+ "workingPanel.tabs.closeOthers": "Fermer les autres onglets",+ "workingPanel.tabs.closeRight": "Fermer les onglets à droite",+ "workingPanel.tabs.pin": "Épingler l'onglet",+ "workingPanel.tabs.pinned": "Onglet épinglé",+ "workingPanel.tabs.unpin": "Désépingler l'onglet","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Créé","workingPanel.works.changeType.updated": "Mis à jour",diff --git a/locales/fr-FR/labs.json b/locales/fr-FR/labs.jsonindex 30ce1a2113b..ea26858e65e 100644--- a/locales/fr-FR/labs.json+++ b/locales/fr-FR/labs.json@@ -1,4 +1,5 @@{+ "description": "Ces fonctionnalités sont expérimentales. Nous pourrions les supprimer, et elles pourraient contenir des bugs. Nous serions ravis de recevoir vos commentaires lors de leur utilisation.","features.agentGraphConfig.desc": "Afficher la configuration d'exécution du graphe dans les paramètres avancés du profil de l'agent.","features.agentGraphConfig.title": "Configuration d'exécution du graphe de l'agent","features.agentSelfIteration.desc": "Permet à l’assistant de réfléchir, de développer une conscience de soi et d’itérer en continu à travers des tentatives et des interactions successives.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Runtime SDK Claude Code","features.groupChat.desc": "Activez la coordination de discussions de groupe multi-agents.","features.groupChat.title": "Discussion de groupe (multi-agents)",+ "features.heteroSessionImport.desc": "Ajoutez une entrée \"Importer les sessions d'agent local\" au menu de la liste des sujets : analysez les transcriptions locales de Claude Code / Codex CLI et importez-les comme sujets, avec une synchronisation incrémentielle lors de la réimportation.",+ "features.heteroSessionImport.title": "Importation de sessions d'agent local","features.imessage.desc": "Connecter les agents à iMessage via le pont local LobeHub Desktop BlueBubbles.","features.imessage.title": "Canal iMessage","features.inAppBrowser.desc": "Afficher l'onglet Navigateur dans le panneau latéral de la conversation : un navigateur intégré qui ouvre les résultats de recherche sur place et permet aux agents de naviguer de manière visible.",diff --git a/locales/fr-FR/messenger.json b/locales/fr-FR/messenger.jsonindex 7f2f52819b9..328d6d2b00e 100644--- a/locales/fr-FR/messenger.json+++ b/locales/fr-FR/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Déconnectez le compte WeChat actuel avant d'en connecter un autre.","messenger.wechat.paidDescription": "Le bot système WeChat est disponible avec les plans personnels payants. Mettez à niveau pour le connecter et l'utiliser.","messenger.wechat.paidTitle": "Mettez à niveau pour connecter WeChat",+ "messenger.wechat.push.description": "WeChat vous permet uniquement d'envoyer des messages au bot dans une fenêtre d'envoi — répondez n'importe quoi au bot sur WeChat pour le réinitialiser à {{max}} envois / 24 heures.",+ "messenger.wechat.push.expiresIn": "expire dans {{value}}",+ "messenger.wechat.push.loadFailed": "Impossible de charger le statut de la fenêtre d'envoi.",+ "messenger.wechat.push.placeholder": "Écrivez un message à envoyer sur votre WeChat…",+ "messenger.wechat.push.queued": "{{count}} message(s) en file d'attente seront automatiquement délivrés après que vous aurez envoyé un message au bot sur WeChat.",+ "messenger.wechat.push.queuedToast": "La fenêtre d'envoi est fermée — votre message est en file d'attente. Dites n'importe quoi au bot sur WeChat pour le recevoir.",+ "messenger.wechat.push.sectionTitle": "Envoi de messages",+ "messenger.wechat.push.send": "Envoyer à WeChat",+ "messenger.wechat.push.sentToast": "Envoyé sur WeChat ({{remaining}} envois restants dans cette fenêtre).",+ "messenger.wechat.push.title": "Envoi proactif",+ "messenger.wechat.push.unavailableToast": "L'envoi est temporairement indisponible. Veuillez réessayer plus tard.",+ "messenger.wechat.push.unlinkedToast": "Votre lien WeChat est indisponible — rescannez le code QR pour vous reconnecter.",+ "messenger.wechat.push.windowClosed": "Fenêtre d'envoi fermée",+ "messenger.wechat.push.windowClosedHint": "Envoyez n'importe quel message au bot sur WeChat pour l'ouvrir.",+ "messenger.wechat.push.windowOpen": "Fenêtre d'envoi ouverte","messenger.wechat.qr.expired": "Ce code QR a expiré. Générez-en un nouveau pour continuer.","messenger.wechat.qr.scanned": "Scanné. Confirmez la connexion dans WeChat.","messenger.wechat.qr.tip": "Ouvrez WeChat sur votre téléphone, scannez ce code et confirmez. Ce code est à usage unique et expire dans 5 minutes.",diff --git a/locales/fr-FR/modelRuntime.json b/locales/fr-FR/modelRuntime.jsonindex 8224912b965..92bca13b13d 100644--- a/locales/fr-FR/modelRuntime.json+++ b/locales/fr-FR/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Échec de l'authentification Vertex. Veuillez vérifier vos identifiants et réessayer.","LocationNotSupportError": "Nous sommes désolés, votre emplacement actuel ne prend pas en charge ce service de modèle. Cela peut être dû à des restrictions régionales ou à l'indisponibilité du service. Veuillez vérifier si l'emplacement actuel permet d'utiliser ce service ou essayez un autre emplacement.","ModelEmptyCompletion": "Le fournisseur de modèle a renvoyé une réponse vide. Même sans contenu visible, cette requête peut tout de même entraîner des frais. Vous pouvez réessayer ou changer de modèle et essayer à nouveau.",+ "ModelEmptyCompletionWithCost": "Le fournisseur de modèle a renvoyé une réponse vide. Cette requête a coûté {{credits}} crédits. Réessayer peut entraîner un coût similaire, ou vous pouvez changer de modèle.","ModelNotFound": "Désolé, le modèle demandé n'a pas pu être trouvé. Il peut ne pas exister ou vous pourriez ne pas avoir les autorisations d'accès nécessaires. Veuillez réessayer après avoir modifié la clé API ou ajusté vos autorisations d'accès.","NoAvailableChannel": "Désolé, le proxy ou le routeur n'a aucun canal disponible pour le modèle demandé. Veuillez changer la configuration du canal/de la clé ou réessayer plus tard.","OllamaBizError": "Erreur lors de la demande au service Ollama, veuillez résoudre le problème ou réessayer en fonction des informations suivantes.",diff --git a/locales/fr-FR/plugin.json b/locales/fr-FR/plugin.jsonindex 41a327159a1..4e9940d7c1f 100644--- a/locales/fr-FR/plugin.json+++ b/locales/fr-FR/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Mettre à jour le nœud","builtins.lobe-page-agent.apiName.wrapNodes": "Associer les nœuds","builtins.lobe-page-agent.title": "Page",+ "builtins.lobe-remote-device.apiName.activateDevice": "Connecter l'appareil",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Vérifier les appareils en ligne",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} en ligne",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} en ligne",+ "builtins.lobe-remote-device.render.activated": "Connecté",+ "builtins.lobe-remote-device.render.activationFailed": "Impossible de se connecter",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Aucun appareil en ligne",+ "builtins.lobe-remote-device.render.offline": "Hors ligne",+ "builtins.lobe-remote-device.render.online": "En ligne",+ "builtins.lobe-remote-device.render.scope.personal": "Personnel",+ "builtins.lobe-remote-device.render.scope.workspace": "Espace de travail",+ "builtins.lobe-remote-device.title": "Appareil à distance","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Enregistrer une idée d'amélioration","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Suggérer une amélioration","builtins.lobe-self-feedback-intent.inspector.memory.write": "Enregistrer une préférence",diff --git a/locales/fr-FR/subscription.json b/locales/fr-FR/subscription.jsonindex b810e9309cb..c647a1de436 100644--- a/locales/fr-FR/subscription.json+++ b/locales/fr-FR/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Cette facture brouillon a été générée par un nouvel abonnement et sera bientôt débitée automatiquement","billing.empty": "Aucun historique de facturation","billing.endDate": "Date de fin",+ "billing.existingSubscription.description": "Aucun nouvel abonnement n'a été créé. Vous pouvez gérer ou annuler votre abonnement actuel ci-dessous.",+ "billing.existingSubscription.title": "Vous avez déjà un abonnement","billing.history": "Historique de facturation","billing.manage.openFailed": "Échec de l'ouverture de la page de gestion des paiements","billing.manage.title": "Gérer les paiements",diff --git a/locales/fr-FR/topic.json b/locales/fr-FR/topic.jsonindex 64ff960e234..719cd38a187 100644--- a/locales/fr-FR/topic.json+++ b/locales/fr-FR/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Hier","guide.desc": "Cliquez sur le bouton à gauche pour enregistrer la conversation actuelle comme sujet historique et démarrer une nouvelle conversation.","guide.title": "Liste des sujets",+ "heteroImport.action.ignore": "Ignorer : masquer ce répertoire de la liste ; le restaurer depuis le groupe Ignorés ci-dessous",+ "heteroImport.action.restore": "Restaurer ce répertoire",+ "heteroImport.action.unwatch": "Ne plus surveiller et le déplacer vers son groupe source",+ "heteroImport.action.watch": "Surveiller : épingler dans le groupe Surveillés en haut ; les nouvelles sessions peuvent se synchroniser automatiquement",+ "heteroImport.allSessions": "Toutes les sessions",+ "heteroImport.badge.imported": "Importé",+ "heteroImport.badge.linked": "Depuis LobeHub",+ "heteroImport.badge.linkedTip": "Cette session a été démarrée depuis LobeHub et figure déjà dans votre liste de sujets",+ "heteroImport.badge.syncable": "Nouveaux messages",+ "heteroImport.badge.syncableTip": "Déjà importé, et la transcription locale s'est agrandie depuis — réimporter n'ajoute que la nouvelle partie",+ "heteroImport.done.cta": "Terminé",+ "heteroImport.done.failed": ", {{count}} échecs (réessayables)",+ "heteroImport.done.summary": "{{sessions}} sessions importées · {{messages}} messages",+ "heteroImport.empty.desc": "Aucune transcription Claude Code (~/.claude/projects) ou Codex (~/.codex/sessions) n'a été trouvée. Utilisez-les d'abord dans un terminal, puis réessayez.",+ "heteroImport.empty.title": "Aucune session d'agent local trouvée",+ "heteroImport.entry": "Importer des sessions d'agent local",+ "heteroImport.error.desc": "Impossible de lire les sessions locales. Vérifiez que LobeHub peut accéder à vos transcriptions, puis réessayez.",+ "heteroImport.error.title": "Échec de l'analyse",+ "heteroImport.footer.hint": "Choisissez les sessions à importer — les réimportations ignorent automatiquement le contenu existant",+ "heteroImport.footer.import": "Importer {{count}} sessions",+ "heteroImport.footer.importEmpty": "Importer",+ "heteroImport.footer.rescan": "Analyser à nouveau",+ "heteroImport.footer.selected": "{{sessions}} sessions sélectionnées · ~{{messages}} messages · {{tokens}} jetons",+ "heteroImport.hideImported": "Masquer les importés",+ "heteroImport.ignoredGroup": "{{count}} répertoires ignorés",+ "heteroImport.meta.messages": "{{count}} messages",+ "heteroImport.meta.tokens": "{{tokens}} jetons",+ "heteroImport.progress": "Importation de {{done}}/{{total}} sessions…",+ "heteroImport.retry": "Réessayer",+ "heteroImport.scanning": "Analyse des sessions d'agent local…",+ "heteroImport.searchEmpty": "Aucune session correspondante",+ "heteroImport.searchPlaceholder": "Rechercher des sessions…",+ "heteroImport.selectAll": "Tout sélectionner",+ "heteroImport.state.failed": "Échec",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "En attente",+ "heteroImport.state.running": "Importation en cours",+ "heteroImport.title": "Importer des sessions d'agent local",+ "heteroImport.watchedGroup": "Surveillés","importError": "Échec de l'importation","importInvalidFormat": "Format de fichier invalide. Veuillez vous assurer qu'il s'agit d'un fichier JSON valide.","importLoading": "Importation de la conversation en cours...",diff --git a/locales/fr-FR/verify.json b/locales/fr-FR/verify.jsonindex 3079699c70a..ba1aca6ff5e 100644--- a/locales/fr-FR/verify.json+++ b/locales/fr-FR/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "À corriger {{count}}","acceptance.filter.pending": "À examiner {{count}}","acceptance.filter.roundAll": "Tous les cycles",+ "acceptance.goalCollapse": "Réduire l'objectif d'acceptation","acceptance.goalEdit": "Modifier l'objectif d'acceptation",+ "acceptance.goalExpand": "Développer l'objectif d'acceptation","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} acceptés","acceptance.group.allVerified": "{{passed}}/{{total}} tous vérifiés & acceptés","acceptance.group.collapse": "Réduire {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Acceptation supprimée","acceptance.workspace.emptyDetail.description": "Choisissez une acceptation à gauche pour examiner ses vérifications, cycles et preuves.","acceptance.workspace.emptyDetail.title": "Sélectionnez une acceptation",+ "acceptance.workspace.filters.active": "En cours",+ "acceptance.workspace.filters.all": "Toutes les acceptations",+ "acceptance.workspace.filters.completed": "Terminées",+ "acceptance.workspace.filters.empty.active": "Aucune acceptation en cours.",+ "acceptance.workspace.filters.empty.completed": "Aucune acceptation terminée.",+ "acceptance.workspace.filters.noSearchResults": "Aucune acceptation ne correspond à « {{query}} ».",+ "acceptance.workspace.filters.showAll": "Afficher toutes les acceptations",+ "acceptance.workspace.filters.title": "Filtrer les acceptations","acceptance.workspace.listEmpty": "Importez un rapport de vérification avec le CLI et son acceptation apparaîtra ici.","acceptance.workspace.listEmptyTitle": "Aucune acceptation pour le moment","acceptance.workspace.renameEmpty": "Le titre ne peut pas être vide",diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.jsonindex 023ccad01da..9cc2cae29a3 100644--- a/locales/it-IT/chat.json+++ b/locales/it-IT/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Premi <key/> per inviare","input.sendWithEnter": "Premi <key/> per inviare","input.stop": "Ferma",- "input.viewOnlyAgent": "Hai accesso in sola lettura a questo agente, quindi non è possibile inviare messaggi. Chiedi al creatore o a un proprietario dello spazio di lavoro l'accesso.",- "input.viewOnlyGroup": "Hai accesso in sola lettura a questo gruppo, quindi non è possibile inviare messaggi. Chiedi al creatore o a un proprietario dello spazio di lavoro l'accesso.",+ "input.useOnlyAgent": "Puoi utilizzare solo questo agente",+ "input.useOnlyGroup": "Puoi utilizzare solo questo gruppo",+ "input.viewOnlyAgent": "Puoi solo visualizzare questo agente",+ "input.viewOnlyGroup": "Puoi solo visualizzare questo gruppo","input.warp": "Nuova Riga","input.warpWithKey": "Premi <key/> per inserire un'interruzione di riga","inputQueue.delete": "Elimina",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Anteprima","workingPanel.localFile.preview.source": "Fonte","workingPanel.localFile.truncated": "Anteprima del file troncata a {{limit}} caratteri",+ "workingPanel.openMenu.configuration": "Configurazione",+ "workingPanel.openMenu.terminal": "Apri Terminale",+ "workingPanel.openMenu.title": "Apri pannello di lavoro",+ "workingPanel.openMenu.tools": "Strumenti",+ "workingPanel.openMenu.workspace": "Spazio di lavoro",+ "workingPanel.overview.branch": "Branch",+ "workingPanel.overview.branch.detached": "HEAD scollegato",+ "workingPanel.overview.changes": "Modifiche",+ "workingPanel.overview.changes.clean": "Nessuna modifica nell'albero di lavoro",+ "workingPanel.overview.changes.files_one": "{{count}} file modificato",+ "workingPanel.overview.changes.files_other": "{{count}} file modificati",+ "workingPanel.overview.documents.desc": "Documenti disponibili per questo agente",+ "workingPanel.overview.empty": "L'attività e i risultati dello spazio di lavoro appariranno qui mentre l'agente lavora.",+ "workingPanel.overview.emptyTitle": "Pronto per lavorare",+ "workingPanel.overview.environment": "Ambiente",+ "workingPanel.overview.environmentError": "Impossibile caricare lo stato del repository",+ "workingPanel.overview.execution.device": "Dispositivo connesso",+ "workingPanel.overview.execution.local": "Questo dispositivo",+ "workingPanel.overview.outputs": "Risultati",+ "workingPanel.overview.resources": "Risorse",+ "workingPanel.overview.skills.desc": "Competenze disponibili per questo agente",+ "workingPanel.overview.title": "Panoramica",+ "workingPanel.overview.viewAll": "Visualizza tutto",+ "workingPanel.overview.workspace.empty": "Nessuno spazio di lavoro selezionato",+ "workingPanel.overview.workspace.emptyDesc": "Scegli una directory di lavoro dalla barra runtime","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Competenze dell'utente","workingPanel.skills.title": "Competenze","workingPanel.space": "Spazio",+ "workingPanel.tabs.close": "Chiudi scheda",+ "workingPanel.tabs.closeLeft": "Chiudi schede a sinistra",+ "workingPanel.tabs.closeOthers": "Chiudi altre schede",+ "workingPanel.tabs.closeRight": "Chiudi schede a destra",+ "workingPanel.tabs.pin": "Fissa scheda",+ "workingPanel.tabs.pinned": "Scheda fissata",+ "workingPanel.tabs.unpin": "Rimuovi fissaggio scheda","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Creato","workingPanel.works.changeType.updated": "Aggiornato",diff --git a/locales/it-IT/labs.json b/locales/it-IT/labs.jsonindex 83d5bf60e15..6fa1dbf587b 100644--- a/locales/it-IT/labs.json+++ b/locales/it-IT/labs.json@@ -1,4 +1,5 @@{+ "description": "Queste funzionalità sono sperimentali. Potremmo rimuoverle e potrebbero contenere bug. Ci piacerebbe ricevere il tuo feedback mentre le utilizzi.","features.agentGraphConfig.desc": "Mostra la configurazione runtime del grafico nelle impostazioni avanzate del profilo agente.","features.agentGraphConfig.title": "Configurazione Runtime Grafico Agente","features.agentSelfIteration.desc": "Consenti all'assistente di riflettere, sviluppare autoconsapevolezza e iterare continuamente attraverso tentativi e interazioni continui.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Runtime SDK di Claude Code","features.groupChat.desc": "Abilita il coordinamento della chat di gruppo con più agenti.","features.groupChat.title": "Chat di Gruppo (Multi-Agente)",+ "features.heteroSessionImport.desc": "Aggiungi una voce \"Importa sessioni agente locali\" al menu dell'elenco degli argomenti: analizza le trascrizioni locali di Claude Code / Codex CLI e importale come argomenti, con sincronizzazione incrementale al momento della reimportazione.",+ "features.heteroSessionImport.title": "Importazione sessioni agente locali","features.imessage.desc": "Collega gli agenti a iMessage tramite il bridge locale LobeHub Desktop BlueBubbles.","features.imessage.title": "Canale iMessage","features.inAppBrowser.desc": "Mostra la scheda Browser nel pannello laterale della conversazione: un browser integrato che apre i risultati di ricerca sul posto e consente agli agenti di navigare visibilmente.",diff --git a/locales/it-IT/messenger.json b/locales/it-IT/messenger.jsonindex 8ced8f8a69f..393533ee78f 100644--- a/locales/it-IT/messenger.json+++ b/locales/it-IT/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Disconnetti l'account WeChat corrente prima di connetterne un altro.","messenger.wechat.paidDescription": "Il Bot di Sistema WeChat è disponibile nei piani personali a pagamento. Effettua l'upgrade per connetterlo e utilizzarlo.","messenger.wechat.paidTitle": "Effettua l'upgrade per connettere WeChat",+ "messenger.wechat.push.description": "WeChat consente al bot di inviarti messaggi solo all'interno di una finestra di invio — rispondi al bot su WeChat con qualsiasi messaggio per reimpostarla a {{max}} invii / 24 ore.",+ "messenger.wechat.push.expiresIn": "scade tra {{value}}",+ "messenger.wechat.push.loadFailed": "Impossibile caricare lo stato della finestra di invio.",+ "messenger.wechat.push.placeholder": "Scrivi un messaggio da inviare al tuo WeChat…",+ "messenger.wechat.push.queued": "{{count}} messaggio/i in coda verrà/anno consegnato/i automaticamente dopo che avrai inviato un messaggio al bot su WeChat.",+ "messenger.wechat.push.queuedToast": "La finestra di invio è chiusa — il tuo messaggio è in coda. Invia qualsiasi messaggio al bot su WeChat per riceverlo.",+ "messenger.wechat.push.sectionTitle": "Invio messaggi",+ "messenger.wechat.push.send": "Invia a WeChat",+ "messenger.wechat.push.sentToast": "Inviato a WeChat ({{remaining}} invii rimasti in questa finestra).",+ "messenger.wechat.push.title": "Invio proattivo",+ "messenger.wechat.push.unavailableToast": "L'invio è temporaneamente non disponibile. Riprova più tardi.",+ "messenger.wechat.push.unlinkedToast": "Il collegamento con WeChat non è disponibile — scansiona nuovamente il codice QR per riconnetterti.",+ "messenger.wechat.push.windowClosed": "Finestra di invio chiusa",+ "messenger.wechat.push.windowClosedHint": "Invia qualsiasi messaggio al bot su WeChat per aprirla.",+ "messenger.wechat.push.windowOpen": "Finestra di invio aperta","messenger.wechat.qr.expired": "Questo codice QR è scaduto. Genera un nuovo codice per continuare.","messenger.wechat.qr.scanned": "Scansionato. Conferma la connessione in WeChat.","messenger.wechat.qr.tip": "Apri WeChat sul tuo telefono, scansiona questo codice e conferma. Questo codice è monouso e scade in 5 minuti.",diff --git a/locales/it-IT/modelRuntime.json b/locales/it-IT/modelRuntime.jsonindex 917acacd0f3..fbfd6f10b53 100644--- a/locales/it-IT/modelRuntime.json+++ b/locales/it-IT/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Autenticazione Vertex fallita. Controlla le tue credenziali e riprova.","LocationNotSupportError": "Spiacenti, la tua posizione attuale non supporta questo servizio modello. Questo potrebbe essere dovuto a restrizioni regionali o al fatto che il servizio non è disponibile. Conferma se la posizione attuale supporta l'uso di questo servizio o prova a utilizzare una posizione diversa.","ModelEmptyCompletion": "Il provider del modello ha restituito una risposta vuota. Anche senza contenuto visibile, questa richiesta potrebbe comunque comportare costi. Puoi riprovare o cambiare modello e tentare di nuovo.",+ "ModelEmptyCompletionWithCost": "Il provider del modello ha restituito una risposta vuota. Questa richiesta è costata {{credits}} crediti. Riprovare potrebbe comportare un costo simile, oppure puoi cambiare modello.","ModelNotFound": "Spiacenti, il modello richiesto non è stato trovato. Potrebbe non esistere o potresti non avere i permessi di accesso necessari. Riprova dopo aver modificato la chiave API o regolato i permessi di accesso.","NoAvailableChannel": "Spiacenti, il proxy o il router non ha canali disponibili per il modello richiesto. Cambia la configurazione del canale/chiave o riprova più tardi.","OllamaBizError": "Errore durante la richiesta al servizio Ollama, risolvi il problema o riprova basandoti sulle informazioni seguenti.",diff --git a/locales/it-IT/plugin.json b/locales/it-IT/plugin.jsonindex 360ab0c9d50..a928d006d72 100644--- a/locales/it-IT/plugin.json+++ b/locales/it-IT/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Aggiorna nodo","builtins.lobe-page-agent.apiName.wrapNodes": "Raggruppa nodi","builtins.lobe-page-agent.title": "Pagina",+ "builtins.lobe-remote-device.apiName.activateDevice": "Connetti dispositivo",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Verifica dispositivi online",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} online",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} online",+ "builtins.lobe-remote-device.render.activated": "Connesso",+ "builtins.lobe-remote-device.render.activationFailed": "Impossibile connettersi",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Nessun dispositivo è online",+ "builtins.lobe-remote-device.render.offline": "Offline",+ "builtins.lobe-remote-device.render.online": "Online",+ "builtins.lobe-remote-device.render.scope.personal": "Personale",+ "builtins.lobe-remote-device.render.scope.workspace": "Spazio di lavoro",+ "builtins.lobe-remote-device.title": "Dispositivo remoto","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Registra idea di miglioramento","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Suggerisci miglioramento","builtins.lobe-self-feedback-intent.inspector.memory.write": "Registra preferenza",diff --git a/locales/it-IT/subscription.json b/locales/it-IT/subscription.jsonindex f7e23bc3a91..82ccbf69963 100644--- a/locales/it-IT/subscription.json+++ b/locales/it-IT/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Questa fattura in bozza è stata generata da un nuovo abbonamento e verrà addebitata automaticamente a breve","billing.empty": "Nessuna cronologia di fatturazione","billing.endDate": "Data di Fine",+ "billing.existingSubscription.description": "Non è stato creato alcun nuovo abbonamento. Puoi gestire o annullare il tuo abbonamento attuale qui sotto.",+ "billing.existingSubscription.title": "Hai già un abbonamento","billing.history": "Storico Fatturazione","billing.manage.openFailed": "Impossibile aprire la pagina di gestione dei pagamenti","billing.manage.title": "Gestisci Pagamenti",diff --git a/locales/it-IT/topic.json b/locales/it-IT/topic.jsonindex f8a9b16947b..4e330b93c6a 100644--- a/locales/it-IT/topic.json+++ b/locales/it-IT/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Ieri","guide.desc": "Fai clic sul pulsante a sinistra per salvare la conversazione corrente come argomento storico e iniziare una nuova conversazione.","guide.title": "Elenco Argomenti",+ "heteroImport.action.ignore": "Ignora: nascondi questa directory dall'elenco; ripristinala dal gruppo Ignorati qui sotto",+ "heteroImport.action.restore": "Ripristina questa directory",+ "heteroImport.action.unwatch": "Smetti di osservare e sposta di nuovo nel gruppo di origine",+ "heteroImport.action.watch": "Osserva: aggiungi al gruppo Osservati in alto; le nuove sessioni possono sincronizzarsi automaticamente",+ "heteroImport.allSessions": "Tutte le sessioni",+ "heteroImport.badge.imported": "Importato",+ "heteroImport.badge.linked": "Da LobeHub",+ "heteroImport.badge.linkedTip": "Questa sessione è stata avviata da LobeHub ed è già presente nella tua lista di argomenti",+ "heteroImport.badge.syncable": "Nuovi messaggi",+ "heteroImport.badge.syncableTip": "Importato in precedenza, e la trascrizione locale è cresciuta da allora — importare di nuovo aggiunge solo la parte nuova",+ "heteroImport.done.cta": "Fatto",+ "heteroImport.done.failed": ", {{count}} non riusciti (ripetibili)",+ "heteroImport.done.summary": "Importate {{sessions}} sessioni · {{messages}} messaggi",+ "heteroImport.empty.desc": "Non sono state trovate trascrizioni di Claude Code (~/.claude/projects) o Codex (~/.codex/sessions). Usale prima in un terminale, poi riprova.",+ "heteroImport.empty.title": "Nessuna sessione agente locale trovata",+ "heteroImport.entry": "Importa sessioni agente locale",+ "heteroImport.error.desc": "Impossibile leggere le sessioni locali. Controlla che LobeHub possa accedere alle tue trascrizioni, poi riprova.",+ "heteroImport.error.title": "Scansione fallita",+ "heteroImport.footer.hint": "Seleziona le sessioni da importare — le reimportazioni saltano automaticamente i contenuti esistenti",+ "heteroImport.footer.import": "Importa {{count}} sessioni",+ "heteroImport.footer.importEmpty": "Importa",+ "heteroImport.footer.rescan": "Riscansiona",+ "heteroImport.footer.selected": "Selezionate {{sessions}} sessioni · ~{{messages}} messaggi · {{tokens}} token",+ "heteroImport.hideImported": "Nascondi importati",+ "heteroImport.ignoredGroup": "{{count}} directory ignorate",+ "heteroImport.meta.messages": "{{count}} messaggi",+ "heteroImport.meta.tokens": "{{tokens}} token",+ "heteroImport.progress": "Importazione di {{done}}/{{total}} sessioni…",+ "heteroImport.retry": "Riprova",+ "heteroImport.scanning": "Scansione delle sessioni agente locale…",+ "heteroImport.searchEmpty": "Nessuna sessione corrispondente",+ "heteroImport.searchPlaceholder": "Cerca sessioni…",+ "heteroImport.selectAll": "Seleziona tutto",+ "heteroImport.state.failed": "Fallito",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "In attesa",+ "heteroImport.state.running": "Importazione in corso",+ "heteroImport.title": "Importa sessioni agente locale",+ "heteroImport.watchedGroup": "Osservati","importError": "Importazione Fallita","importInvalidFormat": "Formato file non valido. Assicurati che sia un file JSON valido.","importLoading": "Importazione della conversazione in corso...",diff --git a/locales/it-IT/verify.json b/locales/it-IT/verify.jsonindex def38082c44..e700c0fc440 100644--- a/locales/it-IT/verify.json+++ b/locales/it-IT/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Da correggere {{count}}","acceptance.filter.pending": "Da revisionare {{count}}","acceptance.filter.roundAll": "Tutti i cicli",+ "acceptance.goalCollapse": "Comprimi l'obiettivo di accettazione","acceptance.goalEdit": "Modifica l'obiettivo di accettazione",+ "acceptance.goalExpand": "Espandi l'obiettivo di accettazione","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} accettati","acceptance.group.allVerified": "{{passed}}/{{total}} tutti verificati e accettati","acceptance.group.collapse": "Comprimi {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Accettazione eliminata","acceptance.workspace.emptyDetail.description": "Seleziona un'accettazione a sinistra per esaminare i suoi controlli, cicli e prove.","acceptance.workspace.emptyDetail.title": "Seleziona un'accettazione",+ "acceptance.workspace.filters.active": "In corso",+ "acceptance.workspace.filters.all": "Tutte le accettazioni",+ "acceptance.workspace.filters.completed": "Completate",+ "acceptance.workspace.filters.empty.active": "Nessuna accettazione in corso.",+ "acceptance.workspace.filters.empty.completed": "Nessuna accettazione completata.",+ "acceptance.workspace.filters.noSearchResults": "Nessuna accettazione corrisponde a “{{query}}”.",+ "acceptance.workspace.filters.showAll": "Mostra tutte le accettazioni",+ "acceptance.workspace.filters.title": "Filtra accettazioni","acceptance.workspace.listEmpty": "Inserisci un rapporto di verifica con il CLI e la sua accettazione apparirà qui.","acceptance.workspace.listEmptyTitle": "Nessuna accettazione ancora","acceptance.workspace.renameEmpty": "Il titolo non può essere vuoto",diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.jsonindex c0aa869eced..aadd2d41bce 100644--- a/locales/ja-JP/chat.json+++ b/locales/ja-JP/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "<key/> を押して送信","input.sendWithEnter": "<key/> を押して送信","input.stop": "停止",- "input.viewOnlyAgent": "このエージェントには閲覧専用アクセス権しかありませんので、メッセージを送信することはできません。作成者またはワークスペースの所有者にアクセスを依頼してください。",- "input.viewOnlyGroup": "このグループには閲覧専用アクセス権しかありませんので、メッセージを送信することはできません。作成者またはワークスペースの所有者にアクセスを依頼してください。",+ "input.useOnlyAgent": "このエージェントのみ使用できます",+ "input.useOnlyGroup": "このグループのみ使用できます",+ "input.viewOnlyAgent": "このエージェントを閲覧することしかできません",+ "input.viewOnlyGroup": "このグループを閲覧することしかできません","input.warp": "改行","input.warpWithKey": "<key/> を押して改行","inputQueue.delete": "削除",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "プレビュー","workingPanel.localFile.preview.source": "ソース","workingPanel.localFile.truncated": "ファイルプレビューは{{limit}}文字に切り詰められています",+ "workingPanel.openMenu.configuration": "設定",+ "workingPanel.openMenu.terminal": "ターミナルを開く",+ "workingPanel.openMenu.title": "ワークスペースパネルを開く",+ "workingPanel.openMenu.tools": "ツール",+ "workingPanel.openMenu.workspace": "ワークスペース",+ "workingPanel.overview.branch": "ブランチ",+ "workingPanel.overview.branch.detached": "分離されたHEAD",+ "workingPanel.overview.changes": "変更",+ "workingPanel.overview.changes.clean": "作業ツリーに変更はありません",+ "workingPanel.overview.changes.files_one": "{{count}} ファイルが変更されました",+ "workingPanel.overview.changes.files_other": "{{count}} ファイルが変更されました",+ "workingPanel.overview.documents.desc": "このエージェントが利用可能なドキュメント",+ "workingPanel.overview.empty": "エージェントが作業を進めると、ワークスペースの活動と出力がここに表示されます。",+ "workingPanel.overview.emptyTitle": "作業の準備が整いました",+ "workingPanel.overview.environment": "環境",+ "workingPanel.overview.environmentError": "リポジトリのステータスを読み込めませんでした",+ "workingPanel.overview.execution.device": "接続されたデバイス",+ "workingPanel.overview.execution.local": "このデバイス",+ "workingPanel.overview.outputs": "出力",+ "workingPanel.overview.resources": "リソース",+ "workingPanel.overview.skills.desc": "このエージェントが利用可能なスキル",+ "workingPanel.overview.title": "概要",+ "workingPanel.overview.viewAll": "すべて表示",+ "workingPanel.overview.workspace.empty": "選択されたワークスペースはありません",+ "workingPanel.overview.workspace.emptyDesc": "ランタイムバーから作業ディレクトリを選択してください","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "ユーザースキル","workingPanel.skills.title": "スキル","workingPanel.space": "スペース",+ "workingPanel.tabs.close": "タブを閉じる",+ "workingPanel.tabs.closeLeft": "左側のタブを閉じる",+ "workingPanel.tabs.closeOthers": "他のタブを閉じる",+ "workingPanel.tabs.closeRight": "右側のタブを閉じる",+ "workingPanel.tabs.pin": "タブを固定",+ "workingPanel.tabs.pinned": "固定されたタブ",+ "workingPanel.tabs.unpin": "タブの固定を解除","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "作成済み","workingPanel.works.changeType.updated": "更新済み",diff --git a/locales/ja-JP/labs.json b/locales/ja-JP/labs.jsonindex 67a71260c4c..92a041753e0 100644--- a/locales/ja-JP/labs.json+++ b/locales/ja-JP/labs.json@@ -1,4 +1,5 @@{+ "description": "これらの機能は実験的なものです。削除される可能性があり、バグが含まれている場合があります。ご利用中のフィードバックをぜひお寄せください。","features.agentGraphConfig.desc": "エージェントプロファイルの詳細設定でグラフの実行時設定を表示します。","features.agentGraphConfig.title": "エージェントグラフ実行時設定","features.agentSelfIteration.desc": "アシスタントが振り返りを行い、自己認識を深め、継続的な試行と対話を通じて自律的に改善を重ねられるようにします。",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDKランタイム","features.groupChat.desc": "複数のAIアシスタントによるグループチャット機能を有効にします。","features.groupChat.title": "グループチャット(マルチアシスタント)",+ "features.heteroSessionImport.desc": "トピックリストメニューに「ローカルエージェントセッションのインポート」エントリを追加します: ローカルのClaude Code / Codex CLIトランスクリプトをスキャンしてトピックとしてインポートし、再インポート時には増分同期を行います。",+ "features.heteroSessionImport.title": "ローカルエージェントセッションのインポート","features.imessage.desc": "LobeHub Desktop BlueBubblesブリッジを介してエージェントをiMessageに接続します。","features.imessage.title": "iMessageチャンネル","features.inAppBrowser.desc": "会話サイドパネルにブラウザータブを表示します: 検索結果をその場で開き、エージェントが目に見える形でブラウズできる埋め込みブラウザー。",diff --git a/locales/ja-JP/messenger.json b/locales/ja-JP/messenger.jsonindex 174028538ac..25dfb7fcfda 100644--- a/locales/ja-JP/messenger.json+++ b/locales/ja-JP/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "別のアカウントを接続する前に現在のWeChatアカウントを切断してください。","messenger.wechat.paidDescription": "WeChatシステムボットは有料の個人プランで利用可能です。接続して実行するにはアップグレードしてください。","messenger.wechat.paidTitle": "WeChatを接続するにはアップグレード",+ "messenger.wechat.push.description": "WeChatでは、ボットが送信ウィンドウ内でのみメッセージを送信できます — WeChatでボットに何か返信すると、{{max}}回/24時間の送信にリセットされます。",+ "messenger.wechat.push.expiresIn": "{{value}}で期限切れ",+ "messenger.wechat.push.loadFailed": "送信ウィンドウのステータスを読み込めませんでした。",+ "messenger.wechat.push.placeholder": "WeChatに送信するメッセージを入力してください…",+ "messenger.wechat.push.queued": "{{count}}件のキューに入ったメッセージは、WeChatでボットにメッセージを送信した後に自動的に配信されます。",+ "messenger.wechat.push.queuedToast": "送信ウィンドウが閉じています — メッセージはキューに入れられました。WeChatでボットに何か話しかけると受信できます。",+ "messenger.wechat.push.sectionTitle": "メッセージプッシュ",+ "messenger.wechat.push.send": "WeChatに送信",+ "messenger.wechat.push.sentToast": "WeChatにプッシュしました(このウィンドウで残り{{remaining}}回送信可能)。",+ "messenger.wechat.push.title": "能動的プッシュ",+ "messenger.wechat.push.unavailableToast": "プッシュは一時的に利用できません。後でもう一度お試しください。",+ "messenger.wechat.push.unlinkedToast": "WeChatリンクが利用できません — QRコードを再スキャンして再接続してください。",+ "messenger.wechat.push.windowClosed": "送信ウィンドウが閉じています",+ "messenger.wechat.push.windowClosedHint": "WeChatでボットにメッセージを送信すると開きます。",+ "messenger.wechat.push.windowOpen": "送信ウィンドウが開いています","messenger.wechat.qr.expired": "このQRコードの有効期限が切れました。続行するには新しいコードを生成してください。","messenger.wechat.qr.scanned": "スキャンされました。WeChatで接続を確認してください。","messenger.wechat.qr.tip": "スマートフォンでWeChatを開き、このコードをスキャンして確認してください。このコードは一度限り使用可能で、5分で期限切れになります。",diff --git a/locales/ja-JP/modelRuntime.json b/locales/ja-JP/modelRuntime.jsonindex 78e4ff43848..43803782ce5 100644--- a/locales/ja-JP/modelRuntime.json+++ b/locales/ja-JP/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex認証に失敗しました。認証情報を確認して再試行してください。","LocationNotSupportError": "申し訳ありませんが、現在の場所ではこのモデルサービスを利用できません。地域制限やサービスの未提供が原因の可能性があります。現在の場所でこのサービスが利用可能か確認するか、別の場所を試してください。","ModelEmptyCompletion": "モデルプロバイダーから空の応答が返されました。内容が表示されなくても、このリクエストには料金が発生する可能性があります。再試行するか、モデルを切り替えて再度試してください。",+ "ModelEmptyCompletionWithCost": "モデルプロバイダーから空の応答が返されました。このリクエストには{{credits}}クレジットがかかりました。再試行すると同様のコストが発生する可能性がありますが、モデルを切り替えることもできます。","ModelNotFound": "申し訳ありませんが、リクエストされたモデルが見つかりませんでした。存在しないか、必要なアクセス権がない可能性があります。APIキーを変更するか、アクセス権を調整して再試行してください。","NoAvailableChannel": "申し訳ありませんが、プロキシまたはルーターにリクエストされたモデルの利用可能なチャネルがありません。チャネル/キーの設定を切り替えるか、後で再試行してください。","OllamaBizError": "Ollamaサービスのリクエスト中にエラーが発生しました。以下の情報を基にトラブルシューティングを行うか、再試行してください。",diff --git a/locales/ja-JP/plugin.json b/locales/ja-JP/plugin.jsonindex 4e3a5cbb2f1..282a0d7cf66 100644--- a/locales/ja-JP/plugin.json+++ b/locales/ja-JP/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "ノードを更新","builtins.lobe-page-agent.apiName.wrapNodes": "ノードをラップ","builtins.lobe-page-agent.title": "ドキュメント",+ "builtins.lobe-remote-device.apiName.activateDevice": "デバイスを接続",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "オンラインデバイスを確認",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} 台がオンライン",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} 台がオンライン",+ "builtins.lobe-remote-device.render.activated": "接続済み",+ "builtins.lobe-remote-device.render.activationFailed": "接続できません",+ "builtins.lobe-remote-device.render.noOnlineDevices": "オンラインのデバイスはありません",+ "builtins.lobe-remote-device.render.offline": "オフライン",+ "builtins.lobe-remote-device.render.online": "オンライン",+ "builtins.lobe-remote-device.render.scope.personal": "個人用",+ "builtins.lobe-remote-device.render.scope.workspace": "ワークスペース",+ "builtins.lobe-remote-device.title": "リモートデバイス","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "改善案を記録する","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "改善を提案する","builtins.lobe-self-feedback-intent.inspector.memory.write": "好みを記録する",diff --git a/locales/ja-JP/subscription.json b/locales/ja-JP/subscription.jsonindex 4e684d090d5..d773d4fd627 100644--- a/locales/ja-JP/subscription.json+++ b/locales/ja-JP/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "この請求書は新しいサブスクリプションにより生成され、まもなく自動的に請求されます","billing.empty": "請求履歴がありません","billing.endDate": "終了日",+ "billing.existingSubscription.description": "新しいサブスクリプションは作成されませんでした。現在のサブスクリプションの管理やキャンセルは以下で行えます。",+ "billing.existingSubscription.title": "既にサブスクリプションがあります","billing.history": "請求履歴","billing.manage.openFailed": "支払い管理ページを開くことができませんでした","billing.manage.title": "支払いを管理する",diff --git a/locales/ja-JP/topic.json b/locales/ja-JP/topic.jsonindex 531209dcfef..2469c5eb10a 100644--- a/locales/ja-JP/topic.json+++ b/locales/ja-JP/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "昨日","guide.desc": "左側の送信ボタンをクリックすると、現在の会話を履歴トピックとして保存し、新しい会話を開始します。","guide.title": "トピックリスト",+ "heteroImport.action.ignore": "無視: このディレクトリをリストから非表示にします。以下の無視されたグループから復元できます",+ "heteroImport.action.restore": "このディレクトリを復元",+ "heteroImport.action.unwatch": "ウォッチを解除して元のグループに戻す",+ "heteroImport.action.watch": "ウォッチ: 上部のウォッチ済みグループに固定します。新しいセッションは自動同期可能です",+ "heteroImport.allSessions": "すべてのセッション",+ "heteroImport.badge.imported": "インポート済み",+ "heteroImport.badge.linked": "LobeHubから",+ "heteroImport.badge.linkedTip": "このセッションはLobeHubから開始され、すでにトピックリストに存在します",+ "heteroImport.badge.syncable": "新しいメッセージ",+ "heteroImport.badge.syncableTip": "以前にインポートされており、ローカルのトランスクリプトが増加しています。再インポートすると新しい部分のみが追加されます",+ "heteroImport.done.cta": "完了",+ "heteroImport.done.failed": "、{{count}}件が失敗しました(再試行可能)",+ "heteroImport.done.summary": "{{sessions}}セッション · {{messages}}メッセージをインポートしました",+ "heteroImport.empty.desc": "Claude Code (~/.claude/projects) または Codex (~/.codex/sessions) のトランスクリプトが見つかりませんでした。まずターミナルで使用してから、再試行してください。",+ "heteroImport.empty.title": "ローカルエージェントセッションが見つかりません",+ "heteroImport.entry": "ローカルエージェントセッションをインポート",+ "heteroImport.error.desc": "ローカルセッションを読み取れませんでした。LobeHubがトランスクリプトにアクセスできることを確認し、再試行してください。",+ "heteroImport.error.title": "スキャンに失敗しました",+ "heteroImport.footer.hint": "インポートするセッションを選択してください。再インポートでは既存のコンテンツは自動的にスキップされます",+ "heteroImport.footer.import": "{{count}}セッションをインポート",+ "heteroImport.footer.importEmpty": "インポート",+ "heteroImport.footer.rescan": "再スキャン",+ "heteroImport.footer.selected": "選択されたセッション: {{sessions}}件 · ~{{messages}}メッセージ · {{tokens}}トークン",+ "heteroImport.hideImported": "インポート済みを非表示",+ "heteroImport.ignoredGroup": "無視されたディレクトリ: {{count}}件",+ "heteroImport.meta.messages": "{{count}}メッセージ",+ "heteroImport.meta.tokens": "{{tokens}}トークン",+ "heteroImport.progress": "{{done}}/{{total}}セッションをインポート中…",+ "heteroImport.retry": "再試行",+ "heteroImport.scanning": "ローカルエージェントセッションをスキャン中…",+ "heteroImport.searchEmpty": "一致するセッションがありません",+ "heteroImport.searchPlaceholder": "セッションを検索…",+ "heteroImport.selectAll": "すべて選択",+ "heteroImport.state.failed": "失敗",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "待機中",+ "heteroImport.state.running": "インポート中",+ "heteroImport.title": "ローカルエージェントセッションをインポート",+ "heteroImport.watchedGroup": "ウォッチ済み","importError": "インポートに失敗しました","importInvalidFormat": "ファイル形式が無効です。有効な JSON ファイルであることを確認してください","importLoading": "会話をインポート中...",diff --git a/locales/ja-JP/verify.json b/locales/ja-JP/verify.jsonindex 57b724d9578..b1e6eb3ca33 100644--- a/locales/ja-JP/verify.json+++ b/locales/ja-JP/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "修正が必要 {{count}}","acceptance.filter.pending": "レビュー待ち {{count}}","acceptance.filter.roundAll": "すべてのラウンド",+ "acceptance.goalCollapse": "受け入れ目標を折りたたむ","acceptance.goalEdit": "受け入れ目標を編集",+ "acceptance.goalExpand": "受け入れ目標を展開する","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 承認済み","acceptance.group.allVerified": "{{passed}}/{{total}} すべて検証済み & 承認済み","acceptance.group.collapse": "{{label}} を折りたたむ",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "承認が削除されました","acceptance.workspace.emptyDetail.description": "左側で受け入れを選択し、そのチェック、ラウンド、証拠を確認してください。","acceptance.workspace.emptyDetail.title": "受け入れを選択してください",+ "acceptance.workspace.filters.active": "進行中",+ "acceptance.workspace.filters.all": "すべての受け入れ",+ "acceptance.workspace.filters.completed": "完了",+ "acceptance.workspace.filters.empty.active": "進行中の受け入れはありません。",+ "acceptance.workspace.filters.empty.completed": "完了した受け入れはありません。",+ "acceptance.workspace.filters.noSearchResults": "「{{query}}」に一致する受け入れはありません。",+ "acceptance.workspace.filters.showAll": "すべての受け入れを表示",+ "acceptance.workspace.filters.title": "受け入れをフィルタリング","acceptance.workspace.listEmpty": "CLIで検証レポートを取り込むと、その受け入れがここに表示されます。","acceptance.workspace.listEmptyTitle": "まだ受け入れがありません","acceptance.workspace.renameEmpty": "タイトルは空にできません",diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.jsonindex 864a51f6707..a2a87fff419 100644--- a/locales/ko-KR/chat.json+++ b/locales/ko-KR/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "<key/> 키를 눌러 전송","input.sendWithEnter": "<key/> 키를 눌러 전송","input.stop": "중지",- "input.viewOnlyAgent": "이 에이전트에 대한 보기 전용 액세스 권한만 있으므로 메시지를 보낼 수 없습니다. 생성자나 워크스페이스 소유자에게 액세스를 요청하세요.",- "input.viewOnlyGroup": "이 그룹에 대한 보기 전용 액세스 권한만 있으므로 메시지를 보낼 수 없습니다. 생성자나 워크스페이스 소유자에게 액세스를 요청하세요.",+ "input.useOnlyAgent": "이 에이전트만 사용할 수 있습니다",+ "input.useOnlyGroup": "이 그룹만 사용할 수 있습니다",+ "input.viewOnlyAgent": "이 에이전트를 보기만 할 수 있습니다",+ "input.viewOnlyGroup": "이 그룹을 보기만 할 수 있습니다","input.warp": "줄바꿈","input.warpWithKey": "<key/> 키를 눌러 줄 바꿈","inputQueue.delete": "삭제",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "미리보기","workingPanel.localFile.preview.source": "소스","workingPanel.localFile.truncated": "파일 미리보기가 {{limit}}자로 잘렸습니다",+ "workingPanel.openMenu.configuration": "구성",+ "workingPanel.openMenu.terminal": "터미널 열기",+ "workingPanel.openMenu.title": "작업 공간 패널 열기",+ "workingPanel.openMenu.tools": "도구",+ "workingPanel.openMenu.workspace": "작업 공간",+ "workingPanel.overview.branch": "브랜치",+ "workingPanel.overview.branch.detached": "분리된 HEAD",+ "workingPanel.overview.changes": "변경 사항",+ "workingPanel.overview.changes.clean": "작업 트리 변경 사항 없음",+ "workingPanel.overview.changes.files_one": "{{count}}개의 파일 수정됨",+ "workingPanel.overview.changes.files_other": "{{count}}개의 파일 수정됨",+ "workingPanel.overview.documents.desc": "이 에이전트가 사용할 수 있는 문서",+ "workingPanel.overview.empty": "에이전트가 작업을 수행하면 작업 공간 활동 및 출력이 여기에 표시됩니다.",+ "workingPanel.overview.emptyTitle": "작업 준비 완료",+ "workingPanel.overview.environment": "환경",+ "workingPanel.overview.environmentError": "저장소 상태를 로드할 수 없습니다",+ "workingPanel.overview.execution.device": "연결된 장치",+ "workingPanel.overview.execution.local": "이 장치",+ "workingPanel.overview.outputs": "출력",+ "workingPanel.overview.resources": "자원",+ "workingPanel.overview.skills.desc": "이 에이전트가 사용할 수 있는 기술",+ "workingPanel.overview.title": "개요",+ "workingPanel.overview.viewAll": "모두 보기",+ "workingPanel.overview.workspace.empty": "선택된 작업 공간 없음",+ "workingPanel.overview.workspace.emptyDesc": "실행 바에서 작업 디렉토리를 선택하세요","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "사용자 스킬","workingPanel.skills.title": "스킬","workingPanel.space": "공간",+ "workingPanel.tabs.close": "탭 닫기",+ "workingPanel.tabs.closeLeft": "왼쪽 탭 닫기",+ "workingPanel.tabs.closeOthers": "다른 탭 닫기",+ "workingPanel.tabs.closeRight": "오른쪽 탭 닫기",+ "workingPanel.tabs.pin": "탭 고정",+ "workingPanel.tabs.pinned": "고정된 탭",+ "workingPanel.tabs.unpin": "탭 고정 해제","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "생성됨","workingPanel.works.changeType.updated": "업데이트됨",diff --git a/locales/ko-KR/labs.json b/locales/ko-KR/labs.jsonindex b51bfffb9dd..da84e5245c4 100644--- a/locales/ko-KR/labs.json+++ b/locales/ko-KR/labs.json@@ -1,4 +1,5 @@{+ "description": "이 기능들은 실험적입니다. 제거될 수 있으며, 버그가 있을 수 있습니다. 사용 중에 의견을 보내주시면 감사하겠습니다.","features.agentGraphConfig.desc": "에이전트 프로필 고급 설정에서 그래프 런타임 구성을 표시합니다.","features.agentGraphConfig.title": "에이전트 그래프 런타임 구성","features.agentSelfIteration.desc": "어시스턴트가 스스로를 성찰하고 자기 인식을 구축하며, 지속적인 시도와 상호작용을 통해 계속해서 발전할 수 있도록 합니다.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK 런타임","features.groupChat.desc": "다중 도우미 그룹 채팅 조정 기능을 활성화합니다.","features.groupChat.title": "그룹 채팅 (다중 도우미)",+ "features.heteroSessionImport.desc": "주제 목록 메뉴에 \"로컬 에이전트 세션 가져오기\" 항목 추가: 로컬 Claude Code / Codex CLI 대화 기록을 스캔하여 주제로 가져오고, 다시 가져올 때 점진적으로 동기화합니다.",+ "features.heteroSessionImport.title": "로컬 에이전트 세션 가져오기","features.imessage.desc": "로컬 LobeHub Desktop BlueBubbles 브리지를 통해 에이전트를 iMessage에 연결합니다.","features.imessage.title": "iMessage 채널","features.inAppBrowser.desc": "대화 사이드 패널에 브라우저 탭을 표시합니다: 검색 결과를 해당 위치에서 열고 상담원이 눈에 보이게 탐색할 수 있는 내장 브라우저입니다.",diff --git a/locales/ko-KR/messenger.json b/locales/ko-KR/messenger.jsonindex 0b4d6fb8f5d..750fd3934d4 100644--- a/locales/ko-KR/messenger.json+++ b/locales/ko-KR/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "다른 계정을 연결하기 전에 현재 WeChat 계정을 연결 해제하세요.","messenger.wechat.paidDescription": "WeChat 시스템 봇은 유료 개인 플랜에서 사용할 수 있습니다. 업그레이드하여 연결하고 실행하세요.","messenger.wechat.paidTitle": "WeChat 연결을 위해 업그레이드",+ "messenger.wechat.push.description": "WeChat은 봇이 전송 창 내에서만 메시지를 보낼 수 있습니다 — WeChat에서 봇에게 아무 메시지나 답장하면 {{max}}회/24시간으로 초기화됩니다.",+ "messenger.wechat.push.expiresIn": "{{value}} 후 만료",+ "messenger.wechat.push.loadFailed": "전송 창 상태를 불러올 수 없습니다.",+ "messenger.wechat.push.placeholder": "WeChat으로 보낼 메시지를 작성하세요…",+ "messenger.wechat.push.queued": "{{count}}개의 대기 중인 메시지가 WeChat에서 봇에게 메시지를 보낸 후 자동으로 전달됩니다.",+ "messenger.wechat.push.queuedToast": "전송 창이 닫혀 있습니다 — 메시지가 대기 중입니다. WeChat에서 봇에게 아무 메시지나 보내면 받을 수 있습니다.",+ "messenger.wechat.push.sectionTitle": "메시지 푸시",+ "messenger.wechat.push.send": "WeChat으로 보내기",+ "messenger.wechat.push.sentToast": "WeChat으로 푸시됨 (이 창에서 {{remaining}}회 전송 가능).",+ "messenger.wechat.push.title": "능동적 푸시",+ "messenger.wechat.push.unavailableToast": "푸시가 일시적으로 사용할 수 없습니다. 나중에 다시 시도하세요.",+ "messenger.wechat.push.unlinkedToast": "WeChat 연결이 해제되었습니다 — QR 코드를 다시 스캔하여 재연결하세요.",+ "messenger.wechat.push.windowClosed": "전송 창 닫힘",+ "messenger.wechat.push.windowClosedHint": "WeChat에서 봇에게 아무 메시지나 보내면 열립니다.",+ "messenger.wechat.push.windowOpen": "전송 창 열림","messenger.wechat.qr.expired": "이 QR 코드는 만료되었습니다. 계속하려면 새 코드를 생성하세요.","messenger.wechat.qr.scanned": "스캔 완료. WeChat에서 연결을 확인하세요.","messenger.wechat.qr.tip": "휴대폰에서 WeChat을 열고 이 코드를 스캔한 후 확인하세요. 이 코드는 1회용이며 5분 후에 만료됩니다.",diff --git a/locales/ko-KR/modelRuntime.json b/locales/ko-KR/modelRuntime.jsonindex 0bc361d3fe0..60d0e8892d0 100644--- a/locales/ko-KR/modelRuntime.json+++ b/locales/ko-KR/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex 인증에 실패했습니다. 자격 증명을 확인하고 다시 시도하세요.","LocationNotSupportError": "죄송합니다. 현재 위치에서는 이 모델 서비스를 지원하지 않습니다. 이는 지역 제한 또는 서비스 미제공 때문일 수 있습니다. 현재 위치에서 이 서비스를 사용할 수 있는지 확인하거나 다른 위치를 시도하세요.","ModelEmptyCompletion": "모델 제공자가 빈 응답을 반환했습니다. 콘텐츠가 보이지 않더라도 이 요청은 비용이 발생할 수 있습니다. 다시 시도하거나 모델을 변경하여 다시 시도해 보세요.",+ "ModelEmptyCompletionWithCost": "모델 제공자가 빈 응답을 반환했습니다. 이 요청은 {{credits}} 크레딧이 소모되었습니다. 다시 시도하면 비슷한 비용이 발생할 수 있으며, 모델을 변경할 수도 있습니다.","ModelNotFound": "죄송합니다. 요청한 모델을 찾을 수 없습니다. 모델이 존재하지 않거나 필요한 액세스 권한이 없을 수 있습니다. API 키를 변경하거나 액세스 권한을 조정한 후 다시 시도하세요.","NoAvailableChannel": "죄송합니다. 프록시 또는 라우터에 요청한 모델에 사용할 수 있는 채널이 없습니다. 채널/키 구성을 변경하거나 나중에 다시 시도하세요.","OllamaBizError": "Ollama 서비스 요청 중 오류가 발생했습니다. 아래 정보를 바탕으로 문제를 해결하거나 다시 시도하세요.",diff --git a/locales/ko-KR/plugin.json b/locales/ko-KR/plugin.jsonindex ecbf136f8b6..26927168ed3 100644--- a/locales/ko-KR/plugin.json+++ b/locales/ko-KR/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "노드 업데이트","builtins.lobe-page-agent.apiName.wrapNodes": "노드 감싸기","builtins.lobe-page-agent.title": "문서",+ "builtins.lobe-remote-device.apiName.activateDevice": "장치 연결",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "온라인 장치 확인",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}}개 온라인",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}}개 온라인",+ "builtins.lobe-remote-device.render.activated": "연결됨",+ "builtins.lobe-remote-device.render.activationFailed": "연결할 수 없음",+ "builtins.lobe-remote-device.render.noOnlineDevices": "온라인 상태의 장치가 없습니다",+ "builtins.lobe-remote-device.render.offline": "오프라인",+ "builtins.lobe-remote-device.render.online": "온라인",+ "builtins.lobe-remote-device.render.scope.personal": "개인",+ "builtins.lobe-remote-device.render.scope.workspace": "작업 공간",+ "builtins.lobe-remote-device.title": "원격 장치","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "개선 아이디어 기록","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "개선 제안","builtins.lobe-self-feedback-intent.inspector.memory.write": "선호도 기록",diff --git a/locales/ko-KR/subscription.json b/locales/ko-KR/subscription.jsonindex 185e15fd6af..d9930efba54 100644--- a/locales/ko-KR/subscription.json+++ b/locales/ko-KR/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "이 청구서 초안은 새 구독으로 생성되었으며 곧 자동으로 결제됩니다","billing.empty": "청구 내역이 없습니다","billing.endDate": "종료일",+ "billing.existingSubscription.description": "새로운 구독이 생성되지 않았습니다. 아래에서 현재 구독을 관리하거나 취소할 수 있습니다.",+ "billing.existingSubscription.title": "이미 구독 중입니다","billing.history": "청구 내역","billing.manage.openFailed": "결제 관리 페이지를 열지 못했습니다","billing.manage.title": "결제 관리",diff --git a/locales/ko-KR/topic.json b/locales/ko-KR/topic.jsonindex 6394025815a..4f4009f0cba 100644--- a/locales/ko-KR/topic.json+++ b/locales/ko-KR/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "어제","guide.desc": "왼쪽 버튼을 클릭하여 현재 대화를 역사 주제로 저장하고 새로운 대화를 시작하세요.","guide.title": "주제 목록",+ "heteroImport.action.ignore": "무시: 이 디렉토리를 목록에서 숨깁니다. 아래의 무시된 그룹에서 복원할 수 있습니다.",+ "heteroImport.action.restore": "이 디렉토리를 복원합니다.",+ "heteroImport.action.unwatch": "감시를 중지하고 원래 그룹으로 되돌립니다.",+ "heteroImport.action.watch": "감시: 상단의 감시 그룹에 고정합니다. 새로운 세션은 자동 동기화될 수 있습니다.",+ "heteroImport.allSessions": "모든 세션",+ "heteroImport.badge.imported": "가져옴",+ "heteroImport.badge.linked": "LobeHub에서 가져옴",+ "heteroImport.badge.linkedTip": "이 세션은 LobeHub에서 시작되었으며 이미 주제 목록에 포함되어 있습니다.",+ "heteroImport.badge.syncable": "새 메시지",+ "heteroImport.badge.syncableTip": "이전에 가져왔으며 로컬 대화록이 이후에 확장되었습니다 — 다시 가져오면 새 부분만 추가됩니다.",+ "heteroImport.done.cta": "완료",+ "heteroImport.done.failed": ", {{count}}개 실패 (재시도 가능)",+ "heteroImport.done.summary": "{{sessions}}개의 세션 · {{messages}}개의 메시지를 가져왔습니다.",+ "heteroImport.empty.desc": "Claude Code (~/.claude/projects) 또는 Codex (~/.codex/sessions) 대화록을 찾을 수 없습니다. 먼저 터미널에서 사용한 후 다시 시도하세요.",+ "heteroImport.empty.title": "로컬 에이전트 세션을 찾을 수 없습니다.",+ "heteroImport.entry": "로컬 에이전트 세션 가져오기",+ "heteroImport.error.desc": "로컬 세션을 읽을 수 없습니다. LobeHub가 대화록에 접근할 수 있는지 확인한 후 다시 시도하세요.",+ "heteroImport.error.title": "스캔 실패",+ "heteroImport.footer.hint": "가져올 세션을 선택하세요 — 재가져오기는 기존 콘텐츠를 자동으로 건너뜁니다.",+ "heteroImport.footer.import": "{{count}}개의 세션 가져오기",+ "heteroImport.footer.importEmpty": "가져오기",+ "heteroImport.footer.rescan": "다시 스캔",+ "heteroImport.footer.selected": "선택된 {{sessions}}개의 세션 · 약 {{messages}}개의 메시지 · {{tokens}}개의 토큰",+ "heteroImport.hideImported": "가져온 항목 숨기기",+ "heteroImport.ignoredGroup": "무시된 {{count}}개의 디렉토리",+ "heteroImport.meta.messages": "{{count}}개의 메시지",+ "heteroImport.meta.tokens": "{{tokens}}개의 토큰",+ "heteroImport.progress": "{{done}}/{{total}}개의 세션 가져오는 중…",+ "heteroImport.retry": "재시도",+ "heteroImport.scanning": "로컬 에이전트 세션 스캔 중…",+ "heteroImport.searchEmpty": "일치하는 세션이 없습니다.",+ "heteroImport.searchPlaceholder": "세션 검색…",+ "heteroImport.selectAll": "모두 선택",+ "heteroImport.state.failed": "실패",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "대기 중",+ "heteroImport.state.running": "가져오는 중",+ "heteroImport.title": "로컬 에이전트 세션 가져오기",+ "heteroImport.watchedGroup": "감시 중","importError": "가져오기 실패","importInvalidFormat": "파일 형식이 올바르지 않습니다. 유효한 JSON 파일인지 확인하세요.","importLoading": "대화를 가져오는 중...",diff --git a/locales/ko-KR/verify.json b/locales/ko-KR/verify.jsonindex 7f8e93b69b9..e66b242bd4c 100644--- a/locales/ko-KR/verify.json+++ b/locales/ko-KR/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "수정 필요 {{count}}","acceptance.filter.pending": "검토 대기 중 {{count}}","acceptance.filter.roundAll": "모든 라운드",+ "acceptance.goalCollapse": "수락 목표 축소","acceptance.goalEdit": "수락 목표 편집",+ "acceptance.goalExpand": "수락 목표 확장","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 승인됨","acceptance.group.allVerified": "{{passed}}/{{total}} 모두 검증 및 승인됨","acceptance.group.collapse": "{{label}} 축소",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "승인 삭제됨","acceptance.workspace.emptyDetail.description": "왼쪽에서 수락을 선택하여 검사, 라운드 및 증거를 검토하세요.","acceptance.workspace.emptyDetail.title": "수락 선택",+ "acceptance.workspace.filters.active": "진행 중",+ "acceptance.workspace.filters.all": "모든 수락",+ "acceptance.workspace.filters.completed": "완료됨",+ "acceptance.workspace.filters.empty.active": "진행 중인 수락이 없습니다.",+ "acceptance.workspace.filters.empty.completed": "완료된 수락이 없습니다.",+ "acceptance.workspace.filters.noSearchResults": "“{{query}}”와 일치하는 수락이 없습니다.",+ "acceptance.workspace.filters.showAll": "모든 수락 보기",+ "acceptance.workspace.filters.title": "수락 필터","acceptance.workspace.listEmpty": "CLI를 사용하여 검증 보고서를 가져오면 해당 수락이 여기에 표시됩니다.","acceptance.workspace.listEmptyTitle": "아직 수락이 없습니다","acceptance.workspace.renameEmpty": "제목은 비워둘 수 없습니다",diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.jsonindex 3a16e3441a1..c9505a4df6e 100644--- a/locales/nl-NL/chat.json+++ b/locales/nl-NL/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Druk op <key/> om te verzenden","input.sendWithEnter": "Druk op <key/> om te verzenden","input.stop": "Stoppen",- "input.viewOnlyAgent": "U heeft alleen-lezen toegang tot deze agent, dus berichten kunnen niet worden verzonden. Vraag de maker of een eigenaar van de werkruimte om toegang.",- "input.viewOnlyGroup": "U heeft alleen-lezen toegang tot deze groep, dus berichten kunnen niet worden verzonden. Vraag de maker of een eigenaar van de werkruimte om toegang.",+ "input.useOnlyAgent": "Je kunt alleen deze agent gebruiken",+ "input.useOnlyGroup": "Je kunt alleen deze groep gebruiken",+ "input.viewOnlyAgent": "Je kunt deze agent alleen bekijken",+ "input.viewOnlyGroup": "Je kunt deze groep alleen bekijken","input.warp": "Nieuwe regel","input.warpWithKey": "Druk op <key/> om een regeleinde in te voegen","inputQueue.delete": "Verwijderen",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Voorbeeld","workingPanel.localFile.preview.source": "Bron","workingPanel.localFile.truncated": "Bestandsvoorbeeld ingekort tot {{limit}} tekens",+ "workingPanel.openMenu.configuration": "Configuratie",+ "workingPanel.openMenu.terminal": "Terminal openen",+ "workingPanel.openMenu.title": "Werkruimtepaneel openen",+ "workingPanel.openMenu.tools": "Hulpmiddelen",+ "workingPanel.openMenu.workspace": "Werkruimte",+ "workingPanel.overview.branch": "Branch",+ "workingPanel.overview.branch.detached": "Losgekoppelde HEAD",+ "workingPanel.overview.changes": "Wijzigingen",+ "workingPanel.overview.changes.clean": "Geen wijzigingen in de werkboom",+ "workingPanel.overview.changes.files_one": "{{count}} bestand gewijzigd",+ "workingPanel.overview.changes.files_other": "{{count}} bestanden gewijzigd",+ "workingPanel.overview.documents.desc": "Documenten beschikbaar voor deze agent",+ "workingPanel.overview.empty": "Werkruimte-activiteit en uitvoer verschijnen hier terwijl de agent werkt.",+ "workingPanel.overview.emptyTitle": "Klaar om te werken",+ "workingPanel.overview.environment": "Omgeving",+ "workingPanel.overview.environmentError": "Kon de status van de repository niet laden",+ "workingPanel.overview.execution.device": "Verbonden apparaat",+ "workingPanel.overview.execution.local": "Dit apparaat",+ "workingPanel.overview.outputs": "Uitvoeren",+ "workingPanel.overview.resources": "Middelen",+ "workingPanel.overview.skills.desc": "Vaardigheden beschikbaar voor deze agent",+ "workingPanel.overview.title": "Overzicht",+ "workingPanel.overview.viewAll": "Alles bekijken",+ "workingPanel.overview.workspace.empty": "Geen werkruimte geselecteerd",+ "workingPanel.overview.workspace.emptyDesc": "Kies een werkmap vanuit de runtimebalk","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Gebruikersvaardigheden","workingPanel.skills.title": "Vaardigheden","workingPanel.space": "Ruimte",+ "workingPanel.tabs.close": "Tabblad sluiten",+ "workingPanel.tabs.closeLeft": "Tabbladen links sluiten",+ "workingPanel.tabs.closeOthers": "Andere tabbladen sluiten",+ "workingPanel.tabs.closeRight": "Tabbladen rechts sluiten",+ "workingPanel.tabs.pin": "Tabblad vastzetten",+ "workingPanel.tabs.pinned": "Vastgezet tabblad",+ "workingPanel.tabs.unpin": "Tabblad losmaken","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Aangemaakt","workingPanel.works.changeType.updated": "Bijgewerkt",diff --git a/locales/nl-NL/labs.json b/locales/nl-NL/labs.jsonindex 7d83c559873..e71ac27a740 100644--- a/locales/nl-NL/labs.json+++ b/locales/nl-NL/labs.json@@ -1,4 +1,5 @@{+ "description": "Deze functies zijn experimenteel. We kunnen ze verwijderen en ze kunnen bugs bevatten. We horen graag uw feedback tijdens het gebruik ervan.","features.agentGraphConfig.desc": "Toon grafiek runtime-configuratie in de geavanceerde instellingen van een agentprofiel.","features.agentGraphConfig.title": "Agent Grafiek Runtime-configuratie","features.agentSelfIteration.desc": "De assistent kan hierdoor reflecteren, zelfinzicht opbouwen en zich continu blijven verbeteren via aanhoudende pogingen en interacties.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK Runtime","features.groupChat.desc": "Schakel coördinatie van groepschats met meerdere agenten in.","features.groupChat.title": "Groepschat (Meerdere Agenten)",+ "features.heteroSessionImport.desc": "Voeg een \"Importeer Lokale Agent Sessies\" optie toe aan het menu van de onderwerpenlijst: scan lokale Claude Code / Codex CLI-transcripten en importeer ze als onderwerpen, met incrementele synchronisatie bij herimport.",+ "features.heteroSessionImport.title": "Importeren van Lokale Agent Sessies","features.imessage.desc": "Verbind agents met iMessage via de lokale LobeHub Desktop BlueBubbles-bridge.","features.imessage.title": "iMessage-kanaal","features.inAppBrowser.desc": "Toon het browsertabblad in het zijpaneel van het gesprek: een ingebouwde browser die zoekresultaten direct opent en agenten zichtbaar laat browsen.",diff --git a/locales/nl-NL/messenger.json b/locales/nl-NL/messenger.jsonindex 49330fab594..ee79f0bd1ce 100644--- a/locales/nl-NL/messenger.json+++ b/locales/nl-NL/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Koppel het huidige WeChat-account los voordat je een ander account verbindt.","messenger.wechat.paidDescription": "WeChat System Bot is beschikbaar op betaalde persoonlijke abonnementen. Upgrade om te verbinden en het te gebruiken.","messenger.wechat.paidTitle": "Upgrade om WeChat te verbinden",+ "messenger.wechat.push.description": "WeChat staat de bot alleen toe om je binnen een verzendvenster berichten te sturen — antwoord iets aan de bot in WeChat om het te resetten naar {{max}} verzenden / 24 uur.",+ "messenger.wechat.push.expiresIn": "vervalt over {{value}}",+ "messenger.wechat.push.loadFailed": "Kon de status van het verzendvenster niet laden.",+ "messenger.wechat.push.placeholder": "Schrijf een bericht om naar je WeChat te sturen…",+ "messenger.wechat.push.queued": "{{count}} bericht(en) in de wachtrij worden automatisch afgeleverd nadat je de bot in WeChat een bericht stuurt.",+ "messenger.wechat.push.queuedToast": "Het verzendvenster is gesloten — je bericht staat in de wachtrij. Zeg iets tegen de bot in WeChat om het te ontvangen.",+ "messenger.wechat.push.sectionTitle": "Bericht Push",+ "messenger.wechat.push.send": "Verstuur naar WeChat",+ "messenger.wechat.push.sentToast": "Verzonden naar WeChat ({{remaining}} verzenden over in dit venster).",+ "messenger.wechat.push.title": "Proactieve push",+ "messenger.wechat.push.unavailableToast": "Push is tijdelijk niet beschikbaar. Probeer het later opnieuw.",+ "messenger.wechat.push.unlinkedToast": "Je WeChat-koppeling is niet beschikbaar — scan de QR-code opnieuw om opnieuw verbinding te maken.",+ "messenger.wechat.push.windowClosed": "Verzendvenster gesloten",+ "messenger.wechat.push.windowClosedHint": "Stuur een bericht naar de bot in WeChat om het te openen.",+ "messenger.wechat.push.windowOpen": "Verzendvenster open","messenger.wechat.qr.expired": "Deze QR-code is verlopen. Genereer een nieuwe om door te gaan.","messenger.wechat.qr.scanned": "Gescand. Bevestig de verbinding in WeChat.","messenger.wechat.qr.tip": "Open WeChat op je telefoon, scan deze code en bevestig. Deze code is eenmalig te gebruiken en verloopt over 5 minuten.",diff --git a/locales/nl-NL/modelRuntime.json b/locales/nl-NL/modelRuntime.jsonindex e20d42dc115..a3f189dee1f 100644--- a/locales/nl-NL/modelRuntime.json+++ b/locales/nl-NL/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex-authenticatie is mislukt. Controleer uw inloggegevens en probeer het opnieuw.","LocationNotSupportError": "Het spijt ons, uw huidige locatie ondersteunt deze modelservice niet. Dit kan te maken hebben met regionale beperkingen of de onbeschikbaarheid van de service. Controleer of de huidige locatie het gebruik van deze service ondersteunt, of probeer een andere locatie.","ModelEmptyCompletion": "De modelprovider heeft een lege reactie teruggestuurd. Zelfs zonder zichtbare inhoud kunnen er kosten verbonden zijn aan dit verzoek. U kunt het opnieuw proberen of van model wisselen en het opnieuw proberen.",+ "ModelEmptyCompletionWithCost": "De modelprovider heeft een lege reactie gegeven. Dit verzoek kostte {{credits}} credits. Opnieuw proberen kan vergelijkbare kosten met zich meebrengen, of u kunt van model wisselen.","ModelNotFound": "Sorry, het gevraagde model kon niet worden gevonden. Het bestaat mogelijk niet of u heeft mogelijk niet de benodigde toegangsrechten. Probeer het opnieuw na het wijzigen van de API-sleutel of het aanpassen van uw toegangsrechten.","NoAvailableChannel": "Sorry, de proxy of router heeft geen beschikbaar kanaal voor het gevraagde model. Schakel de kanaal-/sleutelconfiguratie om of probeer het later opnieuw.","OllamaBizError": "Fout bij het aanvragen van de Ollama-service, los het probleem op of probeer het opnieuw op basis van de onderstaande informatie.",diff --git a/locales/nl-NL/plugin.json b/locales/nl-NL/plugin.jsonindex 9922a1645d8..866bfd9c382 100644--- a/locales/nl-NL/plugin.json+++ b/locales/nl-NL/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Knooppunt bijwerken","builtins.lobe-page-agent.apiName.wrapNodes": "Knooppunten inpakken","builtins.lobe-page-agent.title": "Pagina",+ "builtins.lobe-remote-device.apiName.activateDevice": "Apparaat verbinden",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Controleer online apparaten",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} online",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} online",+ "builtins.lobe-remote-device.render.activated": "Verbonden",+ "builtins.lobe-remote-device.render.activationFailed": "Kan niet verbinden",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Geen apparaten online",+ "builtins.lobe-remote-device.render.offline": "Offline",+ "builtins.lobe-remote-device.render.online": "Online",+ "builtins.lobe-remote-device.render.scope.personal": "Persoonlijk",+ "builtins.lobe-remote-device.render.scope.workspace": "Werkruimte",+ "builtins.lobe-remote-device.title": "Extern apparaat","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Verbeteringsidee vastleggen","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Verbetering voorstellen","builtins.lobe-self-feedback-intent.inspector.memory.write": "Voorkeur vastleggen",diff --git a/locales/nl-NL/subscription.json b/locales/nl-NL/subscription.jsonindex 097a27e78cf..942a2fe7ce3 100644--- a/locales/nl-NL/subscription.json+++ b/locales/nl-NL/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Deze conceptfactuur is gegenereerd door een nieuw abonnement en wordt binnenkort automatisch in rekening gebracht","billing.empty": "Geen facturatiegeschiedenis","billing.endDate": "Einddatum",+ "billing.existingSubscription.description": "Er is geen nieuw abonnement aangemaakt. U kunt uw huidige abonnement hieronder beheren of annuleren.",+ "billing.existingSubscription.title": "U heeft al een abonnement","billing.history": "Facturatiegeschiedenis","billing.manage.openFailed": "Het openen van de betalingsbeheerpagina is mislukt","billing.manage.title": "Betalingen beheren",diff --git a/locales/nl-NL/topic.json b/locales/nl-NL/topic.jsonindex 95dc3386e94..60ef9c944f5 100644--- a/locales/nl-NL/topic.json+++ b/locales/nl-NL/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Gisteren","guide.desc": "Klik op de knop links om het huidige gesprek op te slaan als historisch onderwerp en een nieuw gesprek te starten.","guide.title": "Onderwerpenlijst",+ "heteroImport.action.ignore": "Negeren: verberg deze map uit de lijst; herstel deze vanuit de genegeerde groep hieronder",+ "heteroImport.action.restore": "Herstel deze map",+ "heteroImport.action.unwatch": "Niet meer volgen en terugzetten naar de oorspronkelijke groep",+ "heteroImport.action.watch": "Volgen: vastpinnen in de gevolgde groep bovenaan; nieuwe sessies kunnen automatisch synchroniseren",+ "heteroImport.allSessions": "Alle Sessies",+ "heteroImport.badge.imported": "Geïmporteerd",+ "heteroImport.badge.linked": "Van LobeHub",+ "heteroImport.badge.linkedTip": "Deze sessie is gestart vanuit LobeHub en staat al in je onderwerpenlijst",+ "heteroImport.badge.syncable": "Nieuwe berichten",+ "heteroImport.badge.syncableTip": "Eerder geïmporteerd, en het lokale transcript is sindsdien gegroeid — opnieuw importeren voegt alleen het nieuwe deel toe",+ "heteroImport.done.cta": "Klaar",+ "heteroImport.done.failed": ", {{count}} mislukt (opnieuw probeerbaar)",+ "heteroImport.done.summary": "{{sessions}} sessies geïmporteerd · {{messages}} berichten",+ "heteroImport.empty.desc": "Geen Claude Code (~/.claude/projects) of Codex (~/.codex/sessions) transcripties gevonden. Gebruik ze eerst in een terminal en probeer het daarna opnieuw.",+ "heteroImport.empty.title": "Geen lokale agent-sessies gevonden",+ "heteroImport.entry": "Importeer Lokale Agent-Sessies",+ "heteroImport.error.desc": "Kon de lokale sessies niet lezen. Controleer of LobeHub toegang heeft tot je transcripties en probeer het opnieuw.",+ "heteroImport.error.title": "Scan mislukt",+ "heteroImport.footer.hint": "Kies sessies om te importeren — herimporteren slaat bestaande inhoud automatisch over",+ "heteroImport.footer.import": "Importeer {{count}} sessies",+ "heteroImport.footer.importEmpty": "Importeren",+ "heteroImport.footer.rescan": "Opnieuw scannen",+ "heteroImport.footer.selected": "Geselecteerde {{sessions}} sessies · ~{{messages}} berichten · {{tokens}} tokens",+ "heteroImport.hideImported": "Verberg geïmporteerd",+ "heteroImport.ignoredGroup": "Genegeerde {{count}} mappen",+ "heteroImport.meta.messages": "{{count}} berichten",+ "heteroImport.meta.tokens": "{{tokens}} tokens",+ "heteroImport.progress": "{{done}}/{{total}} sessies aan het importeren…",+ "heteroImport.retry": "Opnieuw proberen",+ "heteroImport.scanning": "Lokale agent-sessies aan het scannen…",+ "heteroImport.searchEmpty": "Geen overeenkomende sessies",+ "heteroImport.searchPlaceholder": "Zoek sessies…",+ "heteroImport.selectAll": "Alles selecteren",+ "heteroImport.state.failed": "Mislukt",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Wachten",+ "heteroImport.state.running": "Bezig met importeren",+ "heteroImport.title": "Importeer Lokale Agent-Sessies",+ "heteroImport.watchedGroup": "Gevolgd","importError": "Importeren mislukt","importInvalidFormat": "Ongeldig bestandsformaat. Zorg ervoor dat het een geldig JSON-bestand is.","importLoading": "Gesprek wordt geïmporteerd...",diff --git a/locales/nl-NL/verify.json b/locales/nl-NL/verify.jsonindex bb5d8f01da6..49ea4b90186 100644--- a/locales/nl-NL/verify.json+++ b/locales/nl-NL/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Reparatie nodig {{count}}","acceptance.filter.pending": "Te beoordelen {{count}}","acceptance.filter.roundAll": "Alle rondes",+ "acceptance.goalCollapse": "De acceptatiedoel samenvouwen","acceptance.goalEdit": "Bewerk het acceptatiedoel",+ "acceptance.goalExpand": "De acceptatiedoel uitvouwen","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} geaccepteerd","acceptance.group.allVerified": "{{passed}}/{{total}} alles geverifieerd & geaccepteerd","acceptance.group.collapse": "Samenvouwen {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Acceptatie verwijderd","acceptance.workspace.emptyDetail.description": "Kies een acceptatie aan de linkerkant om de controles, rondes en bewijzen te bekijken.","acceptance.workspace.emptyDetail.title": "Selecteer een acceptatie",+ "acceptance.workspace.filters.active": "Bezig",+ "acceptance.workspace.filters.all": "Alle acceptaties",+ "acceptance.workspace.filters.completed": "Voltooid",+ "acceptance.workspace.filters.empty.active": "Geen acceptaties in uitvoering.",+ "acceptance.workspace.filters.empty.completed": "Geen voltooide acceptaties.",+ "acceptance.workspace.filters.noSearchResults": "Geen acceptaties komen overeen met “{{query}}”.",+ "acceptance.workspace.filters.showAll": "Toon alle acceptaties",+ "acceptance.workspace.filters.title": "Filter acceptaties","acceptance.workspace.listEmpty": "Voer een verificatierapport in met de CLI en de acceptatie verschijnt hier.","acceptance.workspace.listEmptyTitle": "Nog geen acceptaties","acceptance.workspace.renameEmpty": "De titel mag niet leeg zijn",diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.jsonindex 2dd5d5f68c2..77a67e965c2 100644--- a/locales/pl-PL/chat.json+++ b/locales/pl-PL/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Naciśnij <key/>, aby wysłać","input.sendWithEnter": "Naciśnij <key/>, aby wysłać","input.stop": "Zatrzymaj",- "input.viewOnlyAgent": "Masz dostęp tylko do podglądu tego agenta, więc wiadomości nie mogą być wysyłane. Poproś twórcę lub właściciela przestrzeni roboczej o dostęp.",- "input.viewOnlyGroup": "Masz dostęp tylko do podglądu tej grupy, więc wiadomości nie mogą być wysyłane. Poproś twórcę lub właściciela przestrzeni roboczej o dostęp.",+ "input.useOnlyAgent": "Możesz używać tylko tego agenta",+ "input.useOnlyGroup": "Możesz używać tylko tej grupy",+ "input.viewOnlyAgent": "Możesz tylko przeglądać tego agenta",+ "input.viewOnlyGroup": "Możesz tylko przeglądać tę grupę","input.warp": "Nowa linia","input.warpWithKey": "Naciśnij <key/>, aby wstawić nową linię","inputQueue.delete": "Usuń",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Podgląd","workingPanel.localFile.preview.source": "Źródło","workingPanel.localFile.truncated": "Podgląd pliku skrócony do {{limit}} znaków",+ "workingPanel.openMenu.configuration": "Konfiguracja",+ "workingPanel.openMenu.terminal": "Otwórz terminal",+ "workingPanel.openMenu.title": "Otwórz panel przestrzeni roboczej",+ "workingPanel.openMenu.tools": "Narzędzia",+ "workingPanel.openMenu.workspace": "Przestrzeń robocza",+ "workingPanel.overview.branch": "Gałąź",+ "workingPanel.overview.branch.detached": "Odłączony HEAD",+ "workingPanel.overview.changes": "Zmiany",+ "workingPanel.overview.changes.clean": "Brak zmian w drzewie roboczym",+ "workingPanel.overview.changes.files_one": "{{count}} zmodyfikowany plik",+ "workingPanel.overview.changes.files_other": "{{count}} zmodyfikowane pliki",+ "workingPanel.overview.documents.desc": "Dokumenty dostępne dla tego agenta",+ "workingPanel.overview.empty": "Aktywność i wyniki przestrzeni roboczej pojawią się tutaj, gdy agent będzie pracował.",+ "workingPanel.overview.emptyTitle": "Gotowy do pracy",+ "workingPanel.overview.environment": "Środowisko",+ "workingPanel.overview.environmentError": "Nie udało się załadować statusu repozytorium",+ "workingPanel.overview.execution.device": "Podłączone urządzenie",+ "workingPanel.overview.execution.local": "To urządzenie",+ "workingPanel.overview.outputs": "Wyniki",+ "workingPanel.overview.resources": "Zasoby",+ "workingPanel.overview.skills.desc": "Umiejętności dostępne dla tego agenta",+ "workingPanel.overview.title": "Przegląd",+ "workingPanel.overview.viewAll": "Zobacz wszystko",+ "workingPanel.overview.workspace.empty": "Nie wybrano przestrzeni roboczej",+ "workingPanel.overview.workspace.emptyDesc": "Wybierz katalog roboczy z paska uruchamiania","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Umiejętności użytkownika","workingPanel.skills.title": "Umiejętności","workingPanel.space": "Przestrzeń",+ "workingPanel.tabs.close": "Zamknij kartę",+ "workingPanel.tabs.closeLeft": "Zamknij karty po lewej",+ "workingPanel.tabs.closeOthers": "Zamknij inne karty",+ "workingPanel.tabs.closeRight": "Zamknij karty po prawej",+ "workingPanel.tabs.pin": "Przypnij kartę",+ "workingPanel.tabs.pinned": "Przypięta karta",+ "workingPanel.tabs.unpin": "Odepnij kartę","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Utworzono","workingPanel.works.changeType.updated": "Zaktualizowano",diff --git a/locales/pl-PL/labs.json b/locales/pl-PL/labs.jsonindex 2a2b68b63df..77efddc2d51 100644--- a/locales/pl-PL/labs.json+++ b/locales/pl-PL/labs.json@@ -1,4 +1,5 @@{+ "description": "Te funkcje są eksperymentalne. Mogą zostać usunięte i mogą zawierać błędy. Będziemy wdzięczni za Twoją opinię podczas ich używania.","features.agentGraphConfig.desc": "Pokaż konfigurację czasu wykonywania grafu w zaawansowanych ustawieniach profilu agenta.","features.agentGraphConfig.title": "Konfiguracja czasu wykonywania grafu agenta","features.agentSelfIteration.desc": "Pozwala asystentowi na refleksję, budowanie samoświadomości oraz ciągłe doskonalenie poprzez kolejne próby i interakcje.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Środowisko wykonawcze Claude Code SDK","features.groupChat.desc": "Włącz koordynację czatu grupowego z wieloma agentami.","features.groupChat.title": "Czat Grupowy (Wielu Agentów)",+ "features.heteroSessionImport.desc": "Dodaj opcję „Importuj sesje lokalnego agenta” do menu listy tematów: skanuj lokalne transkrypcje Claude Code / Codex CLI i importuj je jako tematy, z możliwością incrementalnej synchronizacji przy ponownym imporcie.",+ "features.heteroSessionImport.title": "Import sesji lokalnego agenta","features.imessage.desc": "Połącz agentów z iMessage za pośrednictwem lokalnego mostka LobeHub Desktop BlueBubbles.","features.imessage.title": "Kanał iMessage","features.inAppBrowser.desc": "Wyświetl kartę Przeglądarki w panelu bocznym rozmowy: wbudowaną przeglądarkę, która otwiera wyniki wyszukiwania na miejscu i pozwala agentom przeglądać widocznie.",diff --git a/locales/pl-PL/messenger.json b/locales/pl-PL/messenger.jsonindex 8514c12212f..ebbdb371c37 100644--- a/locales/pl-PL/messenger.json+++ b/locales/pl-PL/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Odłącz bieżące konto WeChat przed połączeniem innego.","messenger.wechat.paidDescription": "System Bot WeChat jest dostępny w płatnych planach osobistych. Ulepsz plan, aby połączyć i uruchomić go.","messenger.wechat.paidTitle": "Ulepsz plan, aby połączyć WeChat",+ "messenger.wechat.push.description": "WeChat pozwala botowi wysyłać wiadomości tylko w ramach okna wysyłania — odpowiedz cokolwiek botowi w WeChat, aby zresetować je do {{max}} wysyłek / 24 godziny.",+ "messenger.wechat.push.expiresIn": "wygasa za {{value}}",+ "messenger.wechat.push.loadFailed": "Nie udało się załadować statusu okna wysyłania.",+ "messenger.wechat.push.placeholder": "Napisz wiadomość do wysłania na WeChat…",+ "messenger.wechat.push.queued": "{{count}} wiadomość(i) w kolejce zostanie automatycznie dostarczona po wysłaniu wiadomości do bota w WeChat.",+ "messenger.wechat.push.queuedToast": "Okno wysyłania jest zamknięte — Twoja wiadomość została dodana do kolejki. Powiedz cokolwiek botowi w WeChat, aby ją otrzymać.",+ "messenger.wechat.push.sectionTitle": "Wysyłanie wiadomości",+ "messenger.wechat.push.send": "Wyślij na WeChat",+ "messenger.wechat.push.sentToast": "Wysłano na WeChat (pozostało {{remaining}} wysyłek w tym oknie).",+ "messenger.wechat.push.title": "Proaktywne wysyłanie",+ "messenger.wechat.push.unavailableToast": "Wysyłanie jest tymczasowo niedostępne. Spróbuj ponownie później.",+ "messenger.wechat.push.unlinkedToast": "Twoje połączenie z WeChat jest niedostępne — zeskanuj ponownie kod QR, aby się połączyć.",+ "messenger.wechat.push.windowClosed": "Okno wysyłania zamknięte",+ "messenger.wechat.push.windowClosedHint": "Wyślij dowolną wiadomość do bota w WeChat, aby je otworzyć.",+ "messenger.wechat.push.windowOpen": "Okno wysyłania otwarte","messenger.wechat.qr.expired": "Ten kod QR wygasł. Wygeneruj nowy, aby kontynuować.","messenger.wechat.qr.scanned": "Zeskanowano. Potwierdź połączenie w WeChat.","messenger.wechat.qr.tip": "Otwórz WeChat na swoim telefonie, zeskanuj ten kod i potwierdź. Ten kod jest jednorazowy i wygasa po 5 minutach.",diff --git a/locales/pl-PL/modelRuntime.json b/locales/pl-PL/modelRuntime.jsonindex 09cb8bac0c2..d2d88745ca7 100644--- a/locales/pl-PL/modelRuntime.json+++ b/locales/pl-PL/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Uwierzytelnianie Vertex nie powiodło się. Proszę sprawdzić swoje dane uwierzytelniające i spróbować ponownie.","LocationNotSupportError": "Przepraszamy, Twoja obecna lokalizacja nie obsługuje tej usługi modelu. Może to być spowodowane ograniczeniami regionalnymi lub niedostępnością usługi. Proszę potwierdzić, czy obecna lokalizacja obsługuje korzystanie z tej usługi, lub spróbować użyć innej lokalizacji.","ModelEmptyCompletion": "Dostawca modelu zwrócił pustą odpowiedź. Nawet bez widocznej treści, to żądanie może nadal generować koszty. Możesz spróbować ponownie lub zmienić model i spróbować jeszcze raz.",+ "ModelEmptyCompletionWithCost": "Dostawca modelu zwrócił pustą odpowiedź. To żądanie kosztowało {{credits}} kredytów. Ponowienie próby może wiązać się z podobnym kosztem, lub możesz zmienić model.","ModelNotFound": "Przepraszamy, żądany model nie został znaleziony. Może nie istnieć lub możesz nie mieć odpowiednich uprawnień dostępu. Proszę spróbować ponownie po zmianie klucza API lub dostosowaniu uprawnień dostępu.","NoAvailableChannel": "Przepraszamy, proxy lub router nie ma dostępnego kanału dla żądanego modelu. Proszę przełączyć konfigurację kanału/klucza lub spróbować ponownie później.","OllamaBizError": "Błąd podczas żądania usługi Ollama, proszę rozwiązać problem lub spróbować ponownie na podstawie poniższych informacji.",diff --git a/locales/pl-PL/plugin.json b/locales/pl-PL/plugin.jsonindex 6aca17252bd..2e8253f80a9 100644--- a/locales/pl-PL/plugin.json+++ b/locales/pl-PL/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Zaktualizuj węzeł","builtins.lobe-page-agent.apiName.wrapNodes": "Zawiń węzły","builtins.lobe-page-agent.title": "Strona",+ "builtins.lobe-remote-device.apiName.activateDevice": "Połącz urządzenie",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Sprawdź dostępne urządzenia online",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} online",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} online",+ "builtins.lobe-remote-device.render.activated": "Połączono",+ "builtins.lobe-remote-device.render.activationFailed": "Nie udało się połączyć",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Brak urządzeń online",+ "builtins.lobe-remote-device.render.offline": "Offline",+ "builtins.lobe-remote-device.render.online": "Online",+ "builtins.lobe-remote-device.render.scope.personal": "Osobiste",+ "builtins.lobe-remote-device.render.scope.workspace": "Przestrzeń robocza",+ "builtins.lobe-remote-device.title": "Zdalne urządzenie","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Zapisz pomysł na ulepszenie","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Zaproponuj ulepszenie","builtins.lobe-self-feedback-intent.inspector.memory.write": "Zapisz preferencję",diff --git a/locales/pl-PL/subscription.json b/locales/pl-PL/subscription.jsonindex 4ee47df1b6e..212608c0924 100644--- a/locales/pl-PL/subscription.json+++ b/locales/pl-PL/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Ten szkic faktury został wygenerowany przez nową subskrypcję i wkrótce zostanie automatycznie obciążony","billing.empty": "Brak historii rozliczeń","billing.endDate": "Data zakończenia",+ "billing.existingSubscription.description": "Nie utworzono nowej subskrypcji. Możesz zarządzać lub anulować swoją obecną subskrypcję poniżej.",+ "billing.existingSubscription.title": "Masz już subskrypcję","billing.history": "Historia rozliczeń","billing.manage.openFailed": "Nie udało się otworzyć strony zarządzania płatnościami","billing.manage.title": "Zarządzaj płatnościami",diff --git a/locales/pl-PL/topic.json b/locales/pl-PL/topic.jsonindex 1ac560529dc..a77114dc7c0 100644--- a/locales/pl-PL/topic.json+++ b/locales/pl-PL/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Wczoraj","guide.desc": "Kliknij przycisk po lewej, aby zapisać bieżącą rozmowę jako temat archiwalny i rozpocząć nową rozmowę.","guide.title": "Lista tematów",+ "heteroImport.action.ignore": "Ignoruj: ukryj ten katalog z listy; przywróć go z grupy Ignorowane poniżej",+ "heteroImport.action.restore": "Przywróć ten katalog",+ "heteroImport.action.unwatch": "Przestań obserwować i przenieś z powrotem do grupy źródłowej",+ "heteroImport.action.watch": "Obserwuj: przypnij do grupy Obserwowane na górze; nowe sesje mogą synchronizować się automatycznie",+ "heteroImport.allSessions": "Wszystkie sesje",+ "heteroImport.badge.imported": "Zaimportowano",+ "heteroImport.badge.linked": "Z LobeHub",+ "heteroImport.badge.linkedTip": "Ta sesja została rozpoczęta z LobeHub i już znajduje się na Twojej liście tematów",+ "heteroImport.badge.syncable": "Nowe wiadomości",+ "heteroImport.badge.syncableTip": "Zaimportowano wcześniej, a lokalny zapis rozmowy się powiększył — ponowny import dodaje tylko nową część",+ "heteroImport.done.cta": "Gotowe",+ "heteroImport.done.failed": ", {{count}} nieudane (możliwe do ponowienia)",+ "heteroImport.done.summary": "Zaimportowano {{sessions}} sesji · {{messages}} wiadomości",+ "heteroImport.empty.desc": "Nie znaleziono transkrypcji Claude Code (~/.claude/projects) ani Codex (~/.codex/sessions). Użyj ich najpierw w terminalu, a potem spróbuj ponownie.",+ "heteroImport.empty.title": "Nie znaleziono lokalnych sesji agenta",+ "heteroImport.entry": "Importuj lokalne sesje agenta",+ "heteroImport.error.desc": "Nie udało się odczytać lokalnych sesji. Sprawdź, czy LobeHub ma dostęp do Twoich transkrypcji, a następnie spróbuj ponownie.",+ "heteroImport.error.title": "Skanowanie nieudane",+ "heteroImport.footer.hint": "Wybierz sesje do zaimportowania — ponowny import automatycznie pomija istniejącą zawartość",+ "heteroImport.footer.import": "Importuj {{count}} sesji",+ "heteroImport.footer.importEmpty": "Importuj",+ "heteroImport.footer.rescan": "Ponowne skanowanie",+ "heteroImport.footer.selected": "Wybrano {{sessions}} sesji · ~{{messages}} wiadomości · {{tokens}} tokenów",+ "heteroImport.hideImported": "Ukryj zaimportowane",+ "heteroImport.ignoredGroup": "Ignorowane {{count}} katalogi",+ "heteroImport.meta.messages": "{{count}} wiadomości",+ "heteroImport.meta.tokens": "{{tokens}} tokenów",+ "heteroImport.progress": "Importowanie {{done}}/{{total}} sesji…",+ "heteroImport.retry": "Ponów próbę",+ "heteroImport.scanning": "Skanowanie lokalnych sesji agenta…",+ "heteroImport.searchEmpty": "Brak pasujących sesji",+ "heteroImport.searchPlaceholder": "Szukaj sesji…",+ "heteroImport.selectAll": "Zaznacz wszystko",+ "heteroImport.state.failed": "Nieudane",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Oczekujące",+ "heteroImport.state.running": "Importowanie",+ "heteroImport.title": "Importuj lokalne sesje agenta",+ "heteroImport.watchedGroup": "Obserwowane","importError": "Import nie powiódł się","importInvalidFormat": "Nieprawidłowy format pliku. Upewnij się, że to poprawny plik JSON.","importLoading": "Importowanie rozmowy...",diff --git a/locales/pl-PL/verify.json b/locales/pl-PL/verify.jsonindex 6b374760e07..1f9d060a6ed 100644--- a/locales/pl-PL/verify.json+++ b/locales/pl-PL/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Wymaga poprawy {{count}}","acceptance.filter.pending": "Do recenzji {{count}}","acceptance.filter.roundAll": "Wszystkie rundy",+ "acceptance.goalCollapse": "Zwiń cel akceptacji","acceptance.goalEdit": "Edytuj cel akceptacji",+ "acceptance.goalExpand": "Rozwiń cel akceptacji","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} zaakceptowane","acceptance.group.allVerified": "{{passed}}/{{total}} wszystkie zweryfikowane i zaakceptowane","acceptance.group.collapse": "Zwiń {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Akceptacja usunięta","acceptance.workspace.emptyDetail.description": "Wybierz akceptację po lewej, aby przejrzeć jej kontrole, rundy i dowody.","acceptance.workspace.emptyDetail.title": "Wybierz akceptację",+ "acceptance.workspace.filters.active": "W toku",+ "acceptance.workspace.filters.all": "Wszystkie akceptacje",+ "acceptance.workspace.filters.completed": "Zakończone",+ "acceptance.workspace.filters.empty.active": "Brak akceptacji w toku.",+ "acceptance.workspace.filters.empty.completed": "Brak zakończonych akceptacji.",+ "acceptance.workspace.filters.noSearchResults": "Brak akceptacji pasujących do „{{query}}”.",+ "acceptance.workspace.filters.showAll": "Pokaż wszystkie akceptacje",+ "acceptance.workspace.filters.title": "Filtruj akceptacje","acceptance.workspace.listEmpty": "Załaduj raport weryfikacyjny za pomocą CLI, a jego akceptacja pojawi się tutaj.","acceptance.workspace.listEmptyTitle": "Brak akceptacji","acceptance.workspace.renameEmpty": "Tytuł nie może być pusty",diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.jsonindex 208d491d980..c6f29866d2b 100644--- a/locales/pt-BR/chat.json+++ b/locales/pt-BR/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Pressione <key/> para enviar","input.sendWithEnter": "Pressione <key/> para enviar","input.stop": "Parar",- "input.viewOnlyAgent": "Você tem acesso apenas para visualização deste agente, portanto, mensagens não podem ser enviadas. Solicite acesso ao criador ou ao proprietário do espaço de trabalho.",- "input.viewOnlyGroup": "Você tem acesso apenas para visualização deste grupo, portanto, mensagens não podem ser enviadas. Solicite acesso ao criador ou ao proprietário do espaço de trabalho.",+ "input.useOnlyAgent": "Você só pode usar este agente",+ "input.useOnlyGroup": "Você só pode usar este grupo",+ "input.viewOnlyAgent": "Você pode apenas visualizar este agente",+ "input.viewOnlyGroup": "Você pode apenas visualizar este grupo","input.warp": "Nova linha","input.warpWithKey": "Pressione <key/> para inserir uma quebra de linha","inputQueue.delete": "Excluir",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Visualizar","workingPanel.localFile.preview.source": "Fonte","workingPanel.localFile.truncated": "Pré-visualização do arquivo truncada para {{limit}} caracteres",+ "workingPanel.openMenu.configuration": "Configuração",+ "workingPanel.openMenu.terminal": "Abrir Terminal",+ "workingPanel.openMenu.title": "Abrir painel de espaço de trabalho",+ "workingPanel.openMenu.tools": "Ferramentas",+ "workingPanel.openMenu.workspace": "Espaço de Trabalho",+ "workingPanel.overview.branch": "Ramo",+ "workingPanel.overview.branch.detached": "HEAD destacado",+ "workingPanel.overview.changes": "Alterações",+ "workingPanel.overview.changes.clean": "Nenhuma alteração na árvore de trabalho",+ "workingPanel.overview.changes.files_one": "{{count}} arquivo modificado",+ "workingPanel.overview.changes.files_other": "{{count}} arquivos modificados",+ "workingPanel.overview.documents.desc": "Documentos disponíveis para este agente",+ "workingPanel.overview.empty": "A atividade e os resultados do espaço de trabalho aparecerão aqui conforme o agente trabalha.",+ "workingPanel.overview.emptyTitle": "Pronto para trabalhar",+ "workingPanel.overview.environment": "Ambiente",+ "workingPanel.overview.environmentError": "Não foi possível carregar o status do repositório",+ "workingPanel.overview.execution.device": "Dispositivo conectado",+ "workingPanel.overview.execution.local": "Este dispositivo",+ "workingPanel.overview.outputs": "Saídas",+ "workingPanel.overview.resources": "Recursos",+ "workingPanel.overview.skills.desc": "Habilidades disponíveis para este agente",+ "workingPanel.overview.title": "Visão Geral",+ "workingPanel.overview.viewAll": "Ver tudo",+ "workingPanel.overview.workspace.empty": "Nenhum espaço de trabalho selecionado",+ "workingPanel.overview.workspace.emptyDesc": "Escolha um diretório de trabalho na barra de execução","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Habilidades do usuário","workingPanel.skills.title": "Habilidades","workingPanel.space": "Espaço",+ "workingPanel.tabs.close": "Fechar aba",+ "workingPanel.tabs.closeLeft": "Fechar abas à esquerda",+ "workingPanel.tabs.closeOthers": "Fechar outras abas",+ "workingPanel.tabs.closeRight": "Fechar abas à direita",+ "workingPanel.tabs.pin": "Fixar aba",+ "workingPanel.tabs.pinned": "Aba fixada",+ "workingPanel.tabs.unpin": "Desafixar aba","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Criado","workingPanel.works.changeType.updated": "Atualizado",diff --git a/locales/pt-BR/labs.json b/locales/pt-BR/labs.jsonindex 8e227d9376c..ec21510dea5 100644--- a/locales/pt-BR/labs.json+++ b/locales/pt-BR/labs.json@@ -1,4 +1,5 @@{+ "description": "Esses recursos são experimentais. Podemos removê-los e eles podem conter bugs. Adoraríamos receber seu feedback enquanto os utiliza.","features.agentGraphConfig.desc": "Exibir configuração de tempo de execução do gráfico nas configurações avançadas do perfil do agente.","features.agentGraphConfig.title": "Configuração de Tempo de Execução do Gráfico do Agente","features.agentSelfIteration.desc": "Permite que o assistente reflita, desenvolva autoconsciência e faça iterações contínuas por meio de tentativas e interações contínuas.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Runtime do SDK Claude Code","features.groupChat.desc": "Ative a coordenação de bate-papo em grupo com múltiplos agentes.","features.groupChat.title": "Bate-Papo em Grupo (Multiagente)",+ "features.heteroSessionImport.desc": "Adicione uma entrada \"Importar Sessões de Agente Local\" ao menu da lista de tópicos: escaneie transcrições locais do Claude Code / Codex CLI e importe-as como tópicos, com sincronização incremental na reimportação.",+ "features.heteroSessionImport.title": "Importação de Sessão de Agente Local","features.imessage.desc": "Conectar agentes ao iMessage através da ponte local LobeHub Desktop BlueBubbles.","features.imessage.title": "Canal iMessage","features.inAppBrowser.desc": "Exibir a aba do navegador no painel lateral da conversa: um navegador embutido que abre os resultados de pesquisa no lugar e permite que os agentes naveguem visivelmente.",diff --git a/locales/pt-BR/messenger.json b/locales/pt-BR/messenger.jsonindex 32f5d13d073..5c5b634d2f7 100644--- a/locales/pt-BR/messenger.json+++ b/locales/pt-BR/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Desconecte a conta do WeChat atual antes de conectar outra.","messenger.wechat.paidDescription": "O Bot do Sistema WeChat está disponível em planos pessoais pagos. Faça o upgrade para conectar e utilizá-lo.","messenger.wechat.paidTitle": "Faça o upgrade para conectar o WeChat",+ "messenger.wechat.push.description": "O WeChat só permite que o bot envie mensagens dentro de uma janela de envio — responda qualquer coisa ao bot no WeChat para redefinir para {{max}} envios / 24 horas.",+ "messenger.wechat.push.expiresIn": "expira em {{value}}",+ "messenger.wechat.push.loadFailed": "Não foi possível carregar o status da janela de envio.",+ "messenger.wechat.push.placeholder": "Escreva uma mensagem para enviar ao seu WeChat…",+ "messenger.wechat.push.queued": "{{count}} mensagem(ns) na fila serão entregues automaticamente após você enviar uma mensagem ao bot no WeChat.",+ "messenger.wechat.push.queuedToast": "A janela de envio está fechada — sua mensagem está na fila. Diga qualquer coisa ao bot no WeChat para recebê-la.",+ "messenger.wechat.push.sectionTitle": "Envio de Mensagens",+ "messenger.wechat.push.send": "Enviar para o WeChat",+ "messenger.wechat.push.sentToast": "Enviado para o WeChat ({{remaining}} envios restantes nesta janela).",+ "messenger.wechat.push.title": "Envio proativo",+ "messenger.wechat.push.unavailableToast": "O envio está temporariamente indisponível. Por favor, tente novamente mais tarde.",+ "messenger.wechat.push.unlinkedToast": "Sua conexão com o WeChat está indisponível — escaneie o código QR novamente para reconectar.",+ "messenger.wechat.push.windowClosed": "Janela de envio fechada",+ "messenger.wechat.push.windowClosedHint": "Envie qualquer mensagem ao bot no WeChat para abri-la.",+ "messenger.wechat.push.windowOpen": "Janela de envio aberta","messenger.wechat.qr.expired": "Este código QR expirou. Gere um novo para continuar.","messenger.wechat.qr.scanned": "Escaneado. Confirme a conexão no WeChat.","messenger.wechat.qr.tip": "Abra o WeChat no seu celular, escaneie este código e confirme. Este código é de uso único e expira em 5 minutos.",diff --git a/locales/pt-BR/modelRuntime.json b/locales/pt-BR/modelRuntime.jsonindex 407302be12d..c55e2e6c55f 100644--- a/locales/pt-BR/modelRuntime.json+++ b/locales/pt-BR/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Falha na autenticação do Vertex. Por favor, verifique suas credenciais e tente novamente.","LocationNotSupportError": "Desculpe, sua localização atual não suporta este serviço de modelo. Isso pode ser devido a restrições regionais ou indisponibilidade do serviço. Por favor, confirme se a localização atual suporta o uso deste serviço ou tente usar uma localização diferente.","ModelEmptyCompletion": "O provedor do modelo retornou uma resposta vazia. Mesmo sem conteúdo visível, esta solicitação ainda pode gerar custos. Você pode tentar novamente ou trocar de modelo e tentar novamente.",+ "ModelEmptyCompletionWithCost": "O provedor do modelo retornou uma resposta vazia. Esta solicitação custou {{credits}} créditos. Tentar novamente pode gerar um custo semelhante, ou você pode trocar de modelo.","ModelNotFound": "Desculpe, o modelo solicitado não pôde ser encontrado. Ele pode não existir ou você pode não ter as permissões de acesso necessárias. Por favor, tente novamente após alterar a chave de API ou ajustar suas permissões de acesso.","NoAvailableChannel": "Desculpe, o proxy ou roteador não possui um canal disponível para o modelo solicitado. Por favor, altere a configuração do canal/chave ou tente novamente mais tarde.","OllamaBizError": "Erro ao solicitar o serviço Ollama. Por favor, solucione o problema ou tente novamente com base nas informações a seguir.",diff --git a/locales/pt-BR/plugin.json b/locales/pt-BR/plugin.jsonindex 2e96c8e6377..1c6783492d7 100644--- a/locales/pt-BR/plugin.json+++ b/locales/pt-BR/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Atualizar nó","builtins.lobe-page-agent.apiName.wrapNodes": "Agrupar nós","builtins.lobe-page-agent.title": "Página",+ "builtins.lobe-remote-device.apiName.activateDevice": "Conectar dispositivo",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Verificar dispositivos online",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} online",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} online",+ "builtins.lobe-remote-device.render.activated": "Conectado",+ "builtins.lobe-remote-device.render.activationFailed": "Não foi possível conectar",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Nenhum dispositivo está online",+ "builtins.lobe-remote-device.render.offline": "Offline",+ "builtins.lobe-remote-device.render.online": "Online",+ "builtins.lobe-remote-device.render.scope.personal": "Pessoal",+ "builtins.lobe-remote-device.render.scope.workspace": "Espaço de trabalho",+ "builtins.lobe-remote-device.title": "Dispositivo Remoto","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Registrar ideia de melhoria","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Sugerir melhoria","builtins.lobe-self-feedback-intent.inspector.memory.write": "Registrar preferência",diff --git a/locales/pt-BR/subscription.json b/locales/pt-BR/subscription.jsonindex d2059412a49..df6b6ba6416 100644--- a/locales/pt-BR/subscription.json+++ b/locales/pt-BR/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Esta fatura provisória foi gerada por uma nova assinatura e será cobrada automaticamente em breve","billing.empty": "Sem histórico de cobrança","billing.endDate": "Data Final",+ "billing.existingSubscription.description": "Nenhuma nova assinatura foi criada. Você pode gerenciar ou cancelar sua assinatura atual abaixo.",+ "billing.existingSubscription.title": "Você já possui uma assinatura","billing.history": "Histórico de Cobrança","billing.manage.openFailed": "Falha ao abrir a página de gerenciamento de pagamentos","billing.manage.title": "Gerenciar Pagamentos",diff --git a/locales/pt-BR/topic.json b/locales/pt-BR/topic.jsonindex e7b808aa641..fc975223487 100644--- a/locales/pt-BR/topic.json+++ b/locales/pt-BR/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Ontem","guide.desc": "Clique no botão à esquerda para salvar a conversa atual como um tópico histórico e iniciar uma nova conversa.","guide.title": "Lista de Tópicos",+ "heteroImport.action.ignore": "Ignorar: ocultar este diretório da lista; restaurá-lo do grupo Ignorado abaixo",+ "heteroImport.action.restore": "Restaurar este diretório",+ "heteroImport.action.unwatch": "Desassistir e mover de volta para seu grupo de origem",+ "heteroImport.action.watch": "Assistir: fixar no grupo Assistido no topo; novas sessões podem sincronizar automaticamente",+ "heteroImport.allSessions": "Todas as Sessões",+ "heteroImport.badge.imported": "Importado",+ "heteroImport.badge.linked": "Do LobeHub",+ "heteroImport.badge.linkedTip": "Esta sessão foi iniciada a partir do LobeHub e já está na sua lista de tópicos",+ "heteroImport.badge.syncable": "Novas mensagens",+ "heteroImport.badge.syncableTip": "Importado anteriormente, e a transcrição local cresceu desde então — importar novamente adiciona apenas a parte nova",+ "heteroImport.done.cta": "Concluído",+ "heteroImport.done.failed": ", {{count}} falharam (retratáveis)",+ "heteroImport.done.summary": "Importadas {{sessions}} sessões · {{messages}} mensagens",+ "heteroImport.empty.desc": "Nenhuma transcrição do Claude Code (~/.claude/projects) ou Codex (~/.codex/sessions) foi encontrada. Use-as em um terminal primeiro, depois tente novamente.",+ "heteroImport.empty.title": "Nenhuma sessão de agente local encontrada",+ "heteroImport.entry": "Importar Sessões de Agente Local",+ "heteroImport.error.desc": "Não foi possível ler as sessões locais. Verifique se o LobeHub pode acessar suas transcrições e tente novamente.",+ "heteroImport.error.title": "Falha na varredura",+ "heteroImport.footer.hint": "Escolha sessões para importar — reimportações ignoram automaticamente o conteúdo existente",+ "heteroImport.footer.import": "Importar {{count}} sessões",+ "heteroImport.footer.importEmpty": "Importar",+ "heteroImport.footer.rescan": "Reescanear",+ "heteroImport.footer.selected": "Selecionadas {{sessions}} sessões · ~{{messages}} mensagens · {{tokens}} tokens",+ "heteroImport.hideImported": "Ocultar importados",+ "heteroImport.ignoredGroup": "{{count}} diretórios ignorados",+ "heteroImport.meta.messages": "{{count}} mensagens",+ "heteroImport.meta.tokens": "{{tokens}} tokens",+ "heteroImport.progress": "Importando {{done}}/{{total}} sessões…",+ "heteroImport.retry": "Tentar novamente",+ "heteroImport.scanning": "Escaneando sessões de agente local…",+ "heteroImport.searchEmpty": "Nenhuma sessão correspondente",+ "heteroImport.searchPlaceholder": "Buscar sessões…",+ "heteroImport.selectAll": "Selecionar tudo",+ "heteroImport.state.failed": "Falhou",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Aguardando",+ "heteroImport.state.running": "Importando",+ "heteroImport.title": "Importar Sessões de Agente Local",+ "heteroImport.watchedGroup": "Assistidos","importError": "Falha na Importação","importInvalidFormat": "Formato de arquivo inválido. Certifique-se de que é um arquivo JSON válido.","importLoading": "Importando conversa...",diff --git a/locales/pt-BR/verify.json b/locales/pt-BR/verify.jsonindex 4987fe08dbe..8ef6740e17d 100644--- a/locales/pt-BR/verify.json+++ b/locales/pt-BR/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Precisa de correção {{count}}","acceptance.filter.pending": "Para revisar {{count}}","acceptance.filter.roundAll": "Todas as rodadas",+ "acceptance.goalCollapse": "Recolher a meta de aceitação","acceptance.goalEdit": "Editar a meta de aceitação",+ "acceptance.goalExpand": "Expandir a meta de aceitação","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} aceitos","acceptance.group.allVerified": "{{passed}}/{{total}} todos verificados e aceitos","acceptance.group.collapse": "Recolher {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Aceitação excluída","acceptance.workspace.emptyDetail.description": "Escolha uma aceitação à esquerda para revisar suas verificações, rodadas e evidências.","acceptance.workspace.emptyDetail.title": "Selecione uma aceitação",+ "acceptance.workspace.filters.active": "Em andamento",+ "acceptance.workspace.filters.all": "Todas as aceitações",+ "acceptance.workspace.filters.completed": "Concluídas",+ "acceptance.workspace.filters.empty.active": "Nenhuma aceitação em andamento.",+ "acceptance.workspace.filters.empty.completed": "Nenhuma aceitação concluída.",+ "acceptance.workspace.filters.noSearchResults": "Nenhuma aceitação corresponde a “{{query}}”.",+ "acceptance.workspace.filters.showAll": "Mostrar todas as aceitações",+ "acceptance.workspace.filters.title": "Filtrar aceitações","acceptance.workspace.listEmpty": "Ingestione um relatório de verificação com o CLI e sua aceitação aparecerá aqui.","acceptance.workspace.listEmptyTitle": "Ainda não há aceitações","acceptance.workspace.renameEmpty": "O título não pode estar vazio",diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.jsonindex 4c654cf08e7..1c5010eaed4 100644--- a/locales/ru-RU/chat.json+++ b/locales/ru-RU/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Нажмите <key/>, чтобы отправить","input.sendWithEnter": "Нажмите <key/>, чтобы отправить","input.stop": "Остановить",- "input.viewOnlyAgent": "У вас есть только доступ для просмотра этого агента, поэтому сообщения отправить нельзя. Попросите создателя или владельца рабочей области предоставить доступ.",- "input.viewOnlyGroup": "У вас есть только доступ для просмотра этой группы, поэтому сообщения отправить нельзя. Попросите создателя или владельца рабочей области предоставить доступ.",+ "input.useOnlyAgent": "Вы можете использовать только этого агента",+ "input.useOnlyGroup": "Вы можете использовать только эту группу",+ "input.viewOnlyAgent": "Вы можете только просматривать этого агента",+ "input.viewOnlyGroup": "Вы можете только просматривать эту группу","input.warp": "Новая строка","input.warpWithKey": "Нажмите <key/>, чтобы вставить перенос строки","inputQueue.delete": "Удалить",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Предпросмотр","workingPanel.localFile.preview.source": "Источник","workingPanel.localFile.truncated": "Предварительный просмотр файла сокращен до {{limit}} символов",+ "workingPanel.openMenu.configuration": "Конфигурация",+ "workingPanel.openMenu.terminal": "Открыть терминал",+ "workingPanel.openMenu.title": "Открыть панель рабочей области",+ "workingPanel.openMenu.tools": "Инструменты",+ "workingPanel.openMenu.workspace": "Рабочая область",+ "workingPanel.overview.branch": "Ветка",+ "workingPanel.overview.branch.detached": "Отключённая HEAD",+ "workingPanel.overview.changes": "Изменения",+ "workingPanel.overview.changes.clean": "Нет изменений в рабочем дереве",+ "workingPanel.overview.changes.files_one": "{{count}} файл изменён",+ "workingPanel.overview.changes.files_other": "{{count}} файлов изменено",+ "workingPanel.overview.documents.desc": "Документы, доступные этому агенту",+ "workingPanel.overview.empty": "Активность и результаты работы будут отображаться здесь, пока агент работает.",+ "workingPanel.overview.emptyTitle": "Готов к работе",+ "workingPanel.overview.environment": "Окружение",+ "workingPanel.overview.environmentError": "Не удалось загрузить статус репозитория",+ "workingPanel.overview.execution.device": "Подключённое устройство",+ "workingPanel.overview.execution.local": "Это устройство",+ "workingPanel.overview.outputs": "Выводы",+ "workingPanel.overview.resources": "Ресурсы",+ "workingPanel.overview.skills.desc": "Навыки, доступные этому агенту",+ "workingPanel.overview.title": "Обзор",+ "workingPanel.overview.viewAll": "Посмотреть все",+ "workingPanel.overview.workspace.empty": "Рабочая область не выбрана",+ "workingPanel.overview.workspace.emptyDesc": "Выберите рабочую директорию на панели выполнения","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Навыки пользователя","workingPanel.skills.title": "Навыки","workingPanel.space": "Пространство",+ "workingPanel.tabs.close": "Закрыть вкладку",+ "workingPanel.tabs.closeLeft": "Закрыть вкладки слева",+ "workingPanel.tabs.closeOthers": "Закрыть другие вкладки",+ "workingPanel.tabs.closeRight": "Закрыть вкладки справа",+ "workingPanel.tabs.pin": "Закрепить вкладку",+ "workingPanel.tabs.pinned": "Закреплённая вкладка",+ "workingPanel.tabs.unpin": "Открепить вкладку","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Создано","workingPanel.works.changeType.updated": "Обновлено",diff --git a/locales/ru-RU/labs.json b/locales/ru-RU/labs.jsonindex 777d5947fcf..d0c085628c8 100644--- a/locales/ru-RU/labs.json+++ b/locales/ru-RU/labs.json@@ -1,4 +1,5 @@{+ "description": "Эти функции являются экспериментальными. Мы можем их удалить, и они могут содержать ошибки. Мы будем рады вашему отзыву при их использовании.","features.agentGraphConfig.desc": "Показать конфигурацию графа времени выполнения в расширенных настройках профиля агента.","features.agentGraphConfig.title": "Конфигурация времени выполнения графа агента","features.agentSelfIteration.desc": "Позволяет помощнику проводить самоанализ, формировать самосознание и постоянно совершенствоваться через непрерывные попытки и взаимодействия.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Среда выполнения Claude Code SDK","features.groupChat.desc": "Включите координацию группового чата с несколькими агентами.","features.groupChat.title": "Групповой чат (мультиагентный)",+ "features.heteroSessionImport.desc": "Добавить пункт \"Импорт локальных сессий агента\" в меню списка тем: сканировать локальные стенограммы Claude Code / Codex CLI и импортировать их как темы, с постепенной синхронизацией при повторном импорте.",+ "features.heteroSessionImport.title": "Импорт локальных сессий агента","features.imessage.desc": "Подключайте агентов к iMessage через локальный мост LobeHub Desktop BlueBubbles.","features.imessage.title": "Канал iMessage","features.inAppBrowser.desc": "Показывать вкладку браузера в боковой панели разговора: встроенный браузер, который открывает результаты поиска на месте и позволяет агентам просматривать их видимо.",diff --git a/locales/ru-RU/messenger.json b/locales/ru-RU/messenger.jsonindex 98b3737d692..620e060fd45 100644--- a/locales/ru-RU/messenger.json+++ b/locales/ru-RU/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Отключите текущий аккаунт WeChat перед подключением другого.","messenger.wechat.paidDescription": "Системный бот WeChat доступен в платных персональных планах. Обновите план, чтобы подключить и использовать его.","messenger.wechat.paidTitle": "Обновите план для подключения WeChat",+ "messenger.wechat.push.description": "WeChat позволяет боту отправлять сообщения только внутри окна отправки — ответьте что-нибудь боту в WeChat, чтобы сбросить его до {{max}} отправок / 24 часа.",+ "messenger.wechat.push.expiresIn": "истекает через {{value}}",+ "messenger.wechat.push.loadFailed": "Не удалось загрузить статус окна отправки.",+ "messenger.wechat.push.placeholder": "Напишите сообщение для отправки в WeChat…",+ "messenger.wechat.push.queued": "{{count}} сообщение(я) в очереди будет автоматически доставлено после того, как вы отправите сообщение боту в WeChat.",+ "messenger.wechat.push.queuedToast": "Окно отправки закрыто — ваше сообщение поставлено в очередь. Скажите что-нибудь боту в WeChat, чтобы получить его.",+ "messenger.wechat.push.sectionTitle": "Отправка сообщений",+ "messenger.wechat.push.send": "Отправить в WeChat",+ "messenger.wechat.push.sentToast": "Отправлено в WeChat ({{remaining}} отправок осталось в этом окне).",+ "messenger.wechat.push.title": "Проактивная отправка",+ "messenger.wechat.push.unavailableToast": "Отправка временно недоступна. Пожалуйста, попробуйте позже.",+ "messenger.wechat.push.unlinkedToast": "Связь с вашим WeChat недоступна — отсканируйте QR-код заново, чтобы восстановить соединение.",+ "messenger.wechat.push.windowClosed": "Окно отправки закрыто",+ "messenger.wechat.push.windowClosedHint": "Отправьте любое сообщение боту в WeChat, чтобы открыть его.",+ "messenger.wechat.push.windowOpen": "Окно отправки открыто","messenger.wechat.qr.expired": "Этот QR-код истек. Создайте новый, чтобы продолжить.","messenger.wechat.qr.scanned": "Сканировано. Подтвердите подключение в WeChat.","messenger.wechat.qr.tip": "Откройте WeChat на своем телефоне, отсканируйте этот код и подтвердите. Этот код одноразовый и истекает через 5 минут.",diff --git a/locales/ru-RU/modelRuntime.json b/locales/ru-RU/modelRuntime.jsonindex 7df57b09e06..e3a28d52b51 100644--- a/locales/ru-RU/modelRuntime.json+++ b/locales/ru-RU/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Ошибка аутентификации Vertex. Пожалуйста, проверьте ваши учетные данные и повторите попытку.","LocationNotSupportError": "Извините, в вашем текущем местоположении эта модель недоступна. Это может быть связано с региональными ограничениями или недоступностью сервиса. Пожалуйста, проверьте, поддерживается ли использование этого сервиса в вашем местоположении, или попробуйте использовать другое местоположение.","ModelEmptyCompletion": "Поставщик модели вернул пустой ответ. Даже без видимого содержимого этот запрос может повлечь за собой расходы. Вы можете повторить попытку или сменить модель и попробовать снова.",+ "ModelEmptyCompletionWithCost": "Поставщик модели вернул пустой ответ. Этот запрос стоил {{credits}} кредитов. Повторная попытка может привести к аналогичным затратам, или вы можете сменить модель.","ModelNotFound": "Извините, запрашиваемая модель не найдена. Она может не существовать, или у вас может не быть необходимых прав доступа. Пожалуйста, попробуйте снова, изменив API-ключ или настройки доступа.","NoAvailableChannel": "Извините, прокси или маршрутизатор не имеет доступного канала для запрашиваемой модели. Пожалуйста, переключите конфигурацию канала/ключа или повторите попытку позже.","OllamaBizError": "Ошибка при запросе сервиса Ollama. Пожалуйста, устраните неполадки или повторите попытку, используя следующую информацию.",diff --git a/locales/ru-RU/plugin.json b/locales/ru-RU/plugin.jsonindex 22e5a39df2b..3a4382f9a9c 100644--- a/locales/ru-RU/plugin.json+++ b/locales/ru-RU/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Обновить узел","builtins.lobe-page-agent.apiName.wrapNodes": "Обернуть узлы","builtins.lobe-page-agent.title": "Страница",+ "builtins.lobe-remote-device.apiName.activateDevice": "Подключить устройство",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Проверить доступные устройства",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} в сети",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} в сети",+ "builtins.lobe-remote-device.render.activated": "Подключено",+ "builtins.lobe-remote-device.render.activationFailed": "Не удалось подключиться",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Нет доступных устройств",+ "builtins.lobe-remote-device.render.offline": "Не в сети",+ "builtins.lobe-remote-device.render.online": "В сети",+ "builtins.lobe-remote-device.render.scope.personal": "Личное",+ "builtins.lobe-remote-device.render.scope.workspace": "Рабочее пространство",+ "builtins.lobe-remote-device.title": "Удалённое устройство","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Записать идею улучшения","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Предложить улучшение","builtins.lobe-self-feedback-intent.inspector.memory.write": "Записать предпочтение",diff --git a/locales/ru-RU/subscription.json b/locales/ru-RU/subscription.jsonindex 21f18d807ae..e0545fb90ac 100644--- a/locales/ru-RU/subscription.json+++ b/locales/ru-RU/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Этот черновик счета создан новой подпиской и скоро будет автоматически оплачен","billing.empty": "История платежей отсутствует","billing.endDate": "Дата окончания",+ "billing.existingSubscription.description": "Новый абонемент не был создан. Вы можете управлять или отменить текущий абонемент ниже.",+ "billing.existingSubscription.title": "У вас уже есть абонемент","billing.history": "История платежей","billing.manage.openFailed": "Не удалось открыть страницу управления платежами","billing.manage.title": "Управление платежами",diff --git a/locales/ru-RU/topic.json b/locales/ru-RU/topic.jsonindex a3a5c36fa3f..d8943efc0fb 100644--- a/locales/ru-RU/topic.json+++ b/locales/ru-RU/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Вчера","guide.desc": "Нажмите кнопку слева, чтобы сохранить текущую беседу как историческую тему и начать новую.","guide.title": "Список тем",+ "heteroImport.action.ignore": "Игнорировать: скрыть этот каталог из списка; восстановить его из группы Игнорируемых ниже",+ "heteroImport.action.restore": "Восстановить этот каталог",+ "heteroImport.action.unwatch": "Прекратить наблюдение и вернуть в исходную группу",+ "heteroImport.action.watch": "Наблюдать: закрепить в группе Наблюдаемых наверху; новые сессии могут автоматически синхронизироваться",+ "heteroImport.allSessions": "Все сессии",+ "heteroImport.badge.imported": "Импортировано",+ "heteroImport.badge.linked": "Из LobeHub",+ "heteroImport.badge.linkedTip": "Эта сессия была начата из LobeHub и уже находится в вашем списке тем",+ "heteroImport.badge.syncable": "Новые сообщения",+ "heteroImport.badge.syncableTip": "Импортировано ранее, и локальный транскрипт был дополнен — повторный импорт добавляет только новую часть",+ "heteroImport.done.cta": "Готово",+ "heteroImport.done.failed": ", {{count}} не удалось (можно повторить)",+ "heteroImport.done.summary": "Импортировано {{sessions}} сессий · {{messages}} сообщений",+ "heteroImport.empty.desc": "Не найдено транскриптов Claude Code (~/.claude/projects) или Codex (~/.codex/sessions). Сначала используйте их в терминале, затем попробуйте снова.",+ "heteroImport.empty.title": "Локальные сессии агентов не найдены",+ "heteroImport.entry": "Импорт локальных сессий агентов",+ "heteroImport.error.desc": "Не удалось прочитать локальные сессии. Убедитесь, что LobeHub имеет доступ к вашим транскриптам, затем повторите попытку.",+ "heteroImport.error.title": "Сканирование не удалось",+ "heteroImport.footer.hint": "Выберите сессии для импорта — повторный импорт автоматически пропускает существующий контент",+ "heteroImport.footer.import": "Импортировать {{count}} сессий",+ "heteroImport.footer.importEmpty": "Импортировать",+ "heteroImport.footer.rescan": "Повторное сканирование",+ "heteroImport.footer.selected": "Выбрано {{sessions}} сессий · ~{{messages}} сообщений · {{tokens}} токенов",+ "heteroImport.hideImported": "Скрыть импортированные",+ "heteroImport.ignoredGroup": "Игнорируемые {{count}} каталоги",+ "heteroImport.meta.messages": "{{count}} сообщений",+ "heteroImport.meta.tokens": "{{tokens}} токенов",+ "heteroImport.progress": "Импортируется {{done}}/{{total}} сессий…",+ "heteroImport.retry": "Повторить",+ "heteroImport.scanning": "Сканирование локальных сессий агентов…",+ "heteroImport.searchEmpty": "Нет подходящих сессий",+ "heteroImport.searchPlaceholder": "Поиск сессий…",+ "heteroImport.selectAll": "Выбрать все",+ "heteroImport.state.failed": "Не удалось",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Ожидание",+ "heteroImport.state.running": "Импортируется",+ "heteroImport.title": "Импорт локальных сессий агентов",+ "heteroImport.watchedGroup": "Наблюдаемые","importError": "Ошибка импорта","importInvalidFormat": "Недопустимый формат файла. Убедитесь, что это корректный JSON-файл.","importLoading": "Импорт беседы...",diff --git a/locales/ru-RU/verify.json b/locales/ru-RU/verify.jsonindex 6c53be2eea3..527f434e995 100644--- a/locales/ru-RU/verify.json+++ b/locales/ru-RU/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Требует исправления {{count}}","acceptance.filter.pending": "Для обзора {{count}}","acceptance.filter.roundAll": "Все раунды",+ "acceptance.goalCollapse": "Свернуть цель принятия","acceptance.goalEdit": "Редактировать цель принятия",+ "acceptance.goalExpand": "Развернуть цель принятия","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} принято","acceptance.group.allVerified": "{{passed}}/{{total}} полностью проверено и принято","acceptance.group.collapse": "Свернуть {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Принятие удалено","acceptance.workspace.emptyDetail.description": "Выберите принятие слева, чтобы просмотреть его проверки, раунды и доказательства.","acceptance.workspace.emptyDetail.title": "Выберите принятие",+ "acceptance.workspace.filters.active": "В процессе",+ "acceptance.workspace.filters.all": "Все принятия",+ "acceptance.workspace.filters.completed": "Завершено",+ "acceptance.workspace.filters.empty.active": "Нет принятий в процессе.",+ "acceptance.workspace.filters.empty.completed": "Нет завершенных принятий.",+ "acceptance.workspace.filters.noSearchResults": "Нет принятий, соответствующих «{{query}}».",+ "acceptance.workspace.filters.showAll": "Показать все принятия",+ "acceptance.workspace.filters.title": "Фильтр принятий","acceptance.workspace.listEmpty": "Загрузите отчет о проверке через CLI, и его принятие появится здесь.","acceptance.workspace.listEmptyTitle": "Пока нет принятий","acceptance.workspace.renameEmpty": "Название не может быть пустым",diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.jsonindex 690ba095629..8dd7386717a 100644--- a/locales/tr-TR/chat.json+++ b/locales/tr-TR/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Göndermek için <key/> tuşuna basın","input.sendWithEnter": "Göndermek için <key/> tuşuna basın","input.stop": "Durdur",- "input.viewOnlyAgent": "Bu ajana yalnızca görüntüleme erişiminiz var, bu nedenle mesajlar gönderilemez. Yaratıcıdan veya bir çalışma alanı sahibinden erişim isteyin.",- "input.viewOnlyGroup": "Bu gruba yalnızca görüntüleme erişiminiz var, bu nedenle mesajlar gönderilemez. Yaratıcıdan veya bir çalışma alanı sahibinden erişim isteyin.",+ "input.useOnlyAgent": "Yalnızca bu temsilciyi kullanabilirsiniz",+ "input.useOnlyGroup": "Yalnızca bu grubu kullanabilirsiniz",+ "input.viewOnlyAgent": "Bu temsilciyi yalnızca görüntüleyebilirsiniz",+ "input.viewOnlyGroup": "Bu grubu yalnızca görüntüleyebilirsiniz","input.warp": "Yeni Satır","input.warpWithKey": "Satır sonu eklemek için <key/> tuşuna basın","inputQueue.delete": "Sil",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Önizleme","workingPanel.localFile.preview.source": "Kaynak","workingPanel.localFile.truncated": "Dosya önizlemesi {{limit}} karakterle sınırlandırıldı",+ "workingPanel.openMenu.configuration": "Yapılandırma",+ "workingPanel.openMenu.terminal": "Terminali Aç",+ "workingPanel.openMenu.title": "Çalışma alanı panelini aç",+ "workingPanel.openMenu.tools": "Araçlar",+ "workingPanel.openMenu.workspace": "Çalışma Alanı",+ "workingPanel.overview.branch": "Dal",+ "workingPanel.overview.branch.detached": "Bağımsız HEAD",+ "workingPanel.overview.changes": "Değişiklikler",+ "workingPanel.overview.changes.clean": "Çalışma ağacında değişiklik yok",+ "workingPanel.overview.changes.files_one": "{{count}} dosya değiştirildi",+ "workingPanel.overview.changes.files_other": "{{count}} dosya değiştirildi",+ "workingPanel.overview.documents.desc": "Bu ajana sunulan belgeler",+ "workingPanel.overview.empty": "Ajanın çalışması sırasında çalışma alanı etkinlikleri ve çıktıları burada görünecek.",+ "workingPanel.overview.emptyTitle": "Çalışmaya hazır",+ "workingPanel.overview.environment": "Ortam",+ "workingPanel.overview.environmentError": "Depo durumu yüklenemedi",+ "workingPanel.overview.execution.device": "Bağlı cihaz",+ "workingPanel.overview.execution.local": "Bu cihaz",+ "workingPanel.overview.outputs": "Çıktılar",+ "workingPanel.overview.resources": "Kaynaklar",+ "workingPanel.overview.skills.desc": "Bu ajana sunulan beceriler",+ "workingPanel.overview.title": "Genel Bakış",+ "workingPanel.overview.viewAll": "Tümünü Görüntüle",+ "workingPanel.overview.workspace.empty": "Seçili çalışma alanı yok",+ "workingPanel.overview.workspace.emptyDesc": "Çalışma zaman çubuğundan bir çalışma dizini seçin","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Kullanıcı becerileri","workingPanel.skills.title": "Beceriler","workingPanel.space": "Boşluk",+ "workingPanel.tabs.close": "Sekmeyi Kapat",+ "workingPanel.tabs.closeLeft": "Soldaki sekmeleri kapat",+ "workingPanel.tabs.closeOthers": "Diğer sekmeleri kapat",+ "workingPanel.tabs.closeRight": "Sağdaki sekmeleri kapat",+ "workingPanel.tabs.pin": "Sekmeyi Sabitle",+ "workingPanel.tabs.pinned": "Sabitlenmiş sekme",+ "workingPanel.tabs.unpin": "Sekmeyi Kaldır","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Oluşturuldu","workingPanel.works.changeType.updated": "Güncellendi",diff --git a/locales/tr-TR/labs.json b/locales/tr-TR/labs.jsonindex 6ca9954bb17..7d14015b7ae 100644--- a/locales/tr-TR/labs.json+++ b/locales/tr-TR/labs.json@@ -1,4 +1,5 @@{+ "description": "Bu özellikler deneyseldir. Kaldırılabilirler ve hatalar içerebilirler. Kullanırken geri bildirimlerinizi memnuniyetle karşılarız.","features.agentGraphConfig.desc": "Bir ajan profilinin gelişmiş ayarlarında grafik çalışma zamanı yapılandırmasını göster.","features.agentGraphConfig.title": "Ajan Grafik Çalışma Zamanı Yapılandırması","features.agentSelfIteration.desc": "Asistanın düşünmesini, öz farkındalık geliştirmesini ve devam eden denemeler ile etkileşimler boyunca sürekli yineleme yapmasını sağlar.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK Çalışma Zamanı","features.groupChat.desc": "Çoklu temsilci grup sohbeti koordinasyonunu etkinleştirin.","features.groupChat.title": "Grup Sohbeti (Çoklu Temsilci)",+ "features.heteroSessionImport.desc": "Konu listesi menüsüne \"Yerel Aracı Oturumlarını İçe Aktar\" seçeneği ekleyin: yerel Claude Code / Codex CLI transkriptlerini tarayın ve bunları konular olarak içe aktarın, yeniden içe aktarma sırasında artımlı senkronizasyon sağlayın.",+ "features.heteroSessionImport.title": "Yerel Aracı Oturumu İçe Aktarma","features.imessage.desc": "Ajanları, yerel LobeHub Masaüstü BlueBubbles köprüsü aracılığıyla iMessage'a bağlayın.","features.imessage.title": "iMessage Kanalı","features.inAppBrowser.desc": "Konuşma yan panelinde Tarayıcı sekmesini göster: arama sonuçlarını yerinde açan ve temsilcilerin görünür bir şekilde gezinmesine olanak tanıyan gömülü bir tarayıcı.",diff --git a/locales/tr-TR/messenger.json b/locales/tr-TR/messenger.jsonindex 3252c789f7a..f4034c0f043 100644--- a/locales/tr-TR/messenger.json+++ b/locales/tr-TR/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Başka bir hesabı bağlamadan önce mevcut WeChat hesabını bağlantısını kesin.","messenger.wechat.paidDescription": "WeChat Sistem Botu, ücretli kişisel planlarda mevcuttur. Bağlanmak ve çalıştırmak için yükseltin.","messenger.wechat.paidTitle": "WeChat'i bağlamak için yükseltin",+ "messenger.wechat.push.description": "WeChat, botun size yalnızca bir gönderim penceresi içinde mesaj göndermesine izin verir — WeChat'te bota herhangi bir şey yanıtlayarak bunu {{max}} gönderim / 24 saat olarak sıfırlayın.",+ "messenger.wechat.push.expiresIn": "{{value}} içinde sona eriyor",+ "messenger.wechat.push.loadFailed": "Gönderim penceresi durumu yüklenemedi.",+ "messenger.wechat.push.placeholder": "WeChat'e göndermek için bir mesaj yazın…",+ "messenger.wechat.push.queued": "{{count}} sıraya alınmış mesaj, WeChat'te bota mesaj gönderdikten sonra otomatik olarak teslim edilecek.",+ "messenger.wechat.push.queuedToast": "Gönderim penceresi kapalı — mesajınız sıraya alındı. WeChat'te bota herhangi bir şey söyleyerek mesajı alabilirsiniz.",+ "messenger.wechat.push.sectionTitle": "Mesaj Gönderimi",+ "messenger.wechat.push.send": "WeChat'e Gönder",+ "messenger.wechat.push.sentToast": "WeChat'e gönderildi (bu pencerede {{remaining}} gönderim kaldı).",+ "messenger.wechat.push.title": "Proaktif Gönderim",+ "messenger.wechat.push.unavailableToast": "Gönderim geçici olarak kullanılamıyor. Lütfen daha sonra tekrar deneyin.",+ "messenger.wechat.push.unlinkedToast": "WeChat bağlantınız kullanılamıyor — yeniden bağlanmak için QR kodunu tekrar tarayın.",+ "messenger.wechat.push.windowClosed": "Gönderim penceresi kapalı",+ "messenger.wechat.push.windowClosedHint": "WeChat'te bota herhangi bir mesaj göndererek açabilirsiniz.",+ "messenger.wechat.push.windowOpen": "Gönderim penceresi açık","messenger.wechat.qr.expired": "Bu QR kodunun süresi doldu. Devam etmek için yeni bir kod oluşturun.","messenger.wechat.qr.scanned": "Tarandı. Bağlantıyı WeChat'te onaylayın.","messenger.wechat.qr.tip": "Telefonunuzda WeChat'i açın, bu kodu tarayın ve onaylayın. Bu kod tek kullanımlıktır ve 5 dakika içinde süresi dolar.",diff --git a/locales/tr-TR/modelRuntime.json b/locales/tr-TR/modelRuntime.jsonindex 3f7b7aea5a7..3f349bc8942 100644--- a/locales/tr-TR/modelRuntime.json+++ b/locales/tr-TR/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex kimlik doğrulaması başarısız oldu. Lütfen kimlik bilgilerinizi kontrol edip yeniden deneyin.","LocationNotSupportError": "Üzgünüz, mevcut konumunuz bu model hizmetini desteklemiyor. Bu durum bölgesel kısıtlamalardan veya hizmetin mevcut olmamasından kaynaklanıyor olabilir. Lütfen mevcut konumun bu hizmeti kullanmayı destekleyip desteklemediğini doğrulayın veya farklı bir konum deneyin.","ModelEmptyCompletion": "Model sağlayıcısı boş bir yanıt döndürdü. Görünür içerik olmasa bile, bu isteğin maliyeti olabilir. Tekrar deneyebilir veya modeli değiştirip yeniden deneyebilirsiniz.",+ "ModelEmptyCompletionWithCost": "Model sağlayıcı boş bir yanıt döndürdü. Bu istek {{credits}} krediye mal oldu. Yeniden denemek benzer bir maliyet oluşturabilir veya modelleri değiştirebilirsiniz.","ModelNotFound": "Üzgünüz, istenen model bulunamadı. Model mevcut olmayabilir veya gerekli erişim izinlerine sahip olmayabilirsiniz. Lütfen API Anahtarını değiştirip veya erişim izinlerinizi ayarladıktan sonra yeniden deneyin.","NoAvailableChannel": "Üzgünüz, proxy veya yönlendiricide istenen model için kullanılabilir bir kanal yok. Lütfen kanal/anahtar yapılandırmasını değiştirin veya daha sonra yeniden deneyin.","OllamaBizError": "Ollama hizmeti istenirken hata oluştu, lütfen aşağıdaki bilgilere dayanarak sorun giderin veya yeniden deneyin.",diff --git a/locales/tr-TR/plugin.json b/locales/tr-TR/plugin.jsonindex 76cc0b70624..cfdf1ef95f1 100644--- a/locales/tr-TR/plugin.json+++ b/locales/tr-TR/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Düğümü güncelle","builtins.lobe-page-agent.apiName.wrapNodes": "Düğümleri sar","builtins.lobe-page-agent.title": "Sayfa",+ "builtins.lobe-remote-device.apiName.activateDevice": "Cihazı bağla",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Çevrimiçi cihazları kontrol et",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} çevrimiçi",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} çevrimiçi",+ "builtins.lobe-remote-device.render.activated": "Bağlandı",+ "builtins.lobe-remote-device.render.activationFailed": "Bağlanılamadı",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Çevrimiçi cihaz yok",+ "builtins.lobe-remote-device.render.offline": "Çevrimdışı",+ "builtins.lobe-remote-device.render.online": "Çevrimiçi",+ "builtins.lobe-remote-device.render.scope.personal": "Kişisel",+ "builtins.lobe-remote-device.render.scope.workspace": "Çalışma Alanı",+ "builtins.lobe-remote-device.title": "Uzaktan Cihaz","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Geliştirme fikrini kaydet","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Geliştirme önerisi","builtins.lobe-self-feedback-intent.inspector.memory.write": "Tercihi kaydet",diff --git a/locales/tr-TR/subscription.json b/locales/tr-TR/subscription.jsonindex ed66a2a5a7d..1005b781238 100644--- a/locales/tr-TR/subscription.json+++ b/locales/tr-TR/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Bu taslak fatura yeni bir abonelik tarafından oluşturuldu ve yakında otomatik olarak tahsil edilecek","billing.empty": "Fatura geçmişi yok","billing.endDate": "Bitiş Tarihi",+ "billing.existingSubscription.description": "Yeni bir abonelik oluşturulmadı. Mevcut aboneliğinizi aşağıdan yönetebilir veya iptal edebilirsiniz.",+ "billing.existingSubscription.title": "Zaten bir aboneliğiniz var","billing.history": "Fatura Geçmişi","billing.manage.openFailed": "Ödeme yönetim sayfası açılamadı","billing.manage.title": "Ödemeleri Yönet",diff --git a/locales/tr-TR/topic.json b/locales/tr-TR/topic.jsonindex 8535b0a12e8..351d9ac557d 100644--- a/locales/tr-TR/topic.json+++ b/locales/tr-TR/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Dün","guide.desc": "Geçerli konuşmayı geçmiş bir konu olarak kaydetmek ve yeni bir konuşma başlatmak için soldaki düğmeye tıklayın.","guide.title": "Konu Listesi",+ "heteroImport.action.ignore": "Yoksay: bu dizini listeden gizle; aşağıdaki Yoksayılan grup üzerinden geri yükleyin",+ "heteroImport.action.restore": "Bu dizini geri yükle",+ "heteroImport.action.unwatch": "İzlemeyi bırak ve kaynak grubuna geri taşı",+ "heteroImport.action.watch": "İzle: Üstteki İzlenen gruba sabitle; yeni oturumlar otomatik senkronize edilebilir",+ "heteroImport.allSessions": "Tüm Oturumlar",+ "heteroImport.badge.imported": "İçe Aktarıldı",+ "heteroImport.badge.linked": "LobeHub'dan",+ "heteroImport.badge.linkedTip": "Bu oturum LobeHub'dan başlatıldı ve zaten konu listenizde yer alıyor",+ "heteroImport.badge.syncable": "Yeni mesajlar",+ "heteroImport.badge.syncableTip": "Daha önce içe aktarıldı ve yerel transkript büyüdü — tekrar içe aktarmak yalnızca yeni kısmı ekler",+ "heteroImport.done.cta": "Tamamlandı",+ "heteroImport.done.failed": ", {{count}} başarısız (tekrar denenebilir)",+ "heteroImport.done.summary": "{{sessions}} oturum · {{messages}} mesaj içe aktarıldı",+ "heteroImport.empty.desc": "Claude Code (~/.claude/projects) veya Codex (~/.codex/sessions) transkriptleri bulunamadı. Önce bir terminalde kullanın, ardından tekrar deneyin.",+ "heteroImport.empty.title": "Yerel ajan oturumları bulunamadı",+ "heteroImport.entry": "Yerel Ajan Oturumlarını İçe Aktar",+ "heteroImport.error.desc": "Yerel oturumlar okunamadı. LobeHub'ın transkriptlerinize erişebildiğinden emin olun, ardından tekrar deneyin.",+ "heteroImport.error.title": "Tarama başarısız oldu",+ "heteroImport.footer.hint": "İçe aktarılacak oturumları seçin — yeniden içe aktarmalar mevcut içeriği otomatik olarak atlar",+ "heteroImport.footer.import": "{{count}} oturumu içe aktar",+ "heteroImport.footer.importEmpty": "İçe Aktar",+ "heteroImport.footer.rescan": "Yeniden Tara",+ "heteroImport.footer.selected": "Seçilen {{sessions}} oturum · ~{{messages}} mesaj · {{tokens}} token",+ "heteroImport.hideImported": "İçe aktarılanları gizle",+ "heteroImport.ignoredGroup": "Yoksayılan {{count}} dizin",+ "heteroImport.meta.messages": "{{count}} mesaj",+ "heteroImport.meta.tokens": "{{tokens}} token",+ "heteroImport.progress": "{{done}}/{{total}} oturum içe aktarılıyor…",+ "heteroImport.retry": "Tekrar Dene",+ "heteroImport.scanning": "Yerel ajan oturumları taranıyor…",+ "heteroImport.searchEmpty": "Eşleşen oturum bulunamadı",+ "heteroImport.searchPlaceholder": "Oturumları ara…",+ "heteroImport.selectAll": "Tümünü seç",+ "heteroImport.state.failed": "Başarısız",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Bekliyor",+ "heteroImport.state.running": "İçe aktarılıyor",+ "heteroImport.title": "Yerel Ajan Oturumlarını İçe Aktar",+ "heteroImport.watchedGroup": "İzlenen","importError": "İçe Aktarma Başarısız","importInvalidFormat": "Geçersiz dosya formatı. Lütfen geçerli bir JSON dosyası olduğundan emin olun.","importLoading": "Konuşma içe aktarılıyor...",diff --git a/locales/tr-TR/verify.json b/locales/tr-TR/verify.jsonindex 2eb9c66644d..e67e05f1b69 100644--- a/locales/tr-TR/verify.json+++ b/locales/tr-TR/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Düzeltme gerekiyor {{count}}","acceptance.filter.pending": "İncelenecek {{count}}","acceptance.filter.roundAll": "Tüm turlar",+ "acceptance.goalCollapse": "Kabul hedefini daralt","acceptance.goalEdit": "Kabul hedefini düzenle",+ "acceptance.goalExpand": "Kabul hedefini genişlet","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} kabul edildi","acceptance.group.allVerified": "{{passed}}/{{total}} tümü doğrulandı ve kabul edildi","acceptance.group.collapse": "{{label}} öğesini daralt",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Kabul silindi","acceptance.workspace.emptyDetail.description": "Sol taraftan bir kabul seçerek kontrollerini, turlarını ve kanıtlarını inceleyin.","acceptance.workspace.emptyDetail.title": "Bir kabul seçin",+ "acceptance.workspace.filters.active": "Devam ediyor",+ "acceptance.workspace.filters.all": "Tüm kabuller",+ "acceptance.workspace.filters.completed": "Tamamlandı",+ "acceptance.workspace.filters.empty.active": "Devam eden kabul yok.",+ "acceptance.workspace.filters.empty.completed": "Tamamlanmış kabul yok.",+ "acceptance.workspace.filters.noSearchResults": "“{{query}}” ile eşleşen kabul yok.",+ "acceptance.workspace.filters.showAll": "Tüm kabulleri göster",+ "acceptance.workspace.filters.title": "Kabulleri filtrele","acceptance.workspace.listEmpty": "CLI ile bir doğrulama raporu yükleyin ve kabul burada görünecektir.","acceptance.workspace.listEmptyTitle": "Henüz kabul yok","acceptance.workspace.renameEmpty": "Başlık boş olamaz",diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.jsonindex 9b1f7ebd9e1..9b50d52f36f 100644--- a/locales/vi-VN/chat.json+++ b/locales/vi-VN/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "Nhấn <key/> để gửi","input.sendWithEnter": "Nhấn <key/> để gửi","input.stop": "Dừng",- "input.viewOnlyAgent": "Bạn chỉ có quyền xem đối với agent này, vì vậy không thể gửi tin nhắn. Hãy yêu cầu người tạo hoặc chủ sở hữu không gian làm việc cấp quyền truy cập.",- "input.viewOnlyGroup": "Bạn chỉ có quyền xem đối với nhóm này, vì vậy không thể gửi tin nhắn. Hãy yêu cầu người tạo hoặc chủ sở hữu không gian làm việc cấp quyền truy cập.",+ "input.useOnlyAgent": "Bạn chỉ có thể sử dụng đại lý này",+ "input.useOnlyGroup": "Bạn chỉ có thể sử dụng nhóm này",+ "input.viewOnlyAgent": "Bạn chỉ có thể xem đại lý này",+ "input.viewOnlyGroup": "Bạn chỉ có thể xem nhóm này","input.warp": "Dòng mới","input.warpWithKey": "Nhấn <key/> để xuống dòng","inputQueue.delete": "Xóa",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "Xem trước","workingPanel.localFile.preview.source": "Nguồn","workingPanel.localFile.truncated": "Xem trước tệp bị cắt ngắn đến {{limit}} ký tự",+ "workingPanel.openMenu.configuration": "Cấu hình",+ "workingPanel.openMenu.terminal": "Mở Terminal",+ "workingPanel.openMenu.title": "Mở bảng làm việc",+ "workingPanel.openMenu.tools": "Công cụ",+ "workingPanel.openMenu.workspace": "Không gian làm việc",+ "workingPanel.overview.branch": "Nhánh",+ "workingPanel.overview.branch.detached": "HEAD tách rời",+ "workingPanel.overview.changes": "Thay đổi",+ "workingPanel.overview.changes.clean": "Không có thay đổi trong cây làm việc",+ "workingPanel.overview.changes.files_one": "{{count}} tệp đã được sửa đổi",+ "workingPanel.overview.changes.files_other": "{{count}} tệp đã được sửa đổi",+ "workingPanel.overview.documents.desc": "Tài liệu có sẵn cho tác nhân này",+ "workingPanel.overview.empty": "Hoạt động và kết quả của không gian làm việc sẽ xuất hiện ở đây khi tác nhân làm việc.",+ "workingPanel.overview.emptyTitle": "Sẵn sàng làm việc",+ "workingPanel.overview.environment": "Môi trường",+ "workingPanel.overview.environmentError": "Không thể tải trạng thái kho lưu trữ",+ "workingPanel.overview.execution.device": "Thiết bị được kết nối",+ "workingPanel.overview.execution.local": "Thiết bị này",+ "workingPanel.overview.outputs": "Kết quả",+ "workingPanel.overview.resources": "Tài nguyên",+ "workingPanel.overview.skills.desc": "Kỹ năng có sẵn cho tác nhân này",+ "workingPanel.overview.title": "Tổng quan",+ "workingPanel.overview.viewAll": "Xem tất cả",+ "workingPanel.overview.workspace.empty": "Không có không gian làm việc nào được chọn",+ "workingPanel.overview.workspace.emptyDesc": "Chọn một thư mục làm việc từ thanh runtime","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "Kỹ năng người dùng","workingPanel.skills.title": "Kỹ năng","workingPanel.space": "Khoảng trống",+ "workingPanel.tabs.close": "Đóng tab",+ "workingPanel.tabs.closeLeft": "Đóng các tab bên trái",+ "workingPanel.tabs.closeOthers": "Đóng các tab khác",+ "workingPanel.tabs.closeRight": "Đóng các tab bên phải",+ "workingPanel.tabs.pin": "Ghim tab",+ "workingPanel.tabs.pinned": "Tab đã được ghim",+ "workingPanel.tabs.unpin": "Bỏ ghim tab","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "Đã tạo","workingPanel.works.changeType.updated": "Đã cập nhật",diff --git a/locales/vi-VN/labs.json b/locales/vi-VN/labs.jsonindex ec4fff1f223..64e7ed3c632 100644--- a/locales/vi-VN/labs.json+++ b/locales/vi-VN/labs.json@@ -1,4 +1,5 @@{+ "description": "Những tính năng này đang trong giai đoạn thử nghiệm. Chúng tôi có thể loại bỏ chúng, và chúng có thể gặp lỗi. Chúng tôi rất mong nhận được phản hồi từ bạn khi sử dụng chúng.","features.agentGraphConfig.desc": "Hiển thị cấu hình thời gian chạy đồ thị trong cài đặt nâng cao của hồ sơ tác nhân.","features.agentGraphConfig.title": "Cấu Hình Thời Gian Chạy Đồ Thị Tác Nhân","features.agentSelfIteration.desc": "Cho phép trợ lý tự phản tư, xây dựng khả năng tự nhận thức và liên tục cải thiện thông qua các nỗ lực và tương tác đang diễn ra.",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Thời gian chạy Claude Code SDK","features.groupChat.desc": "Kích hoạt phối hợp trò chuyện nhóm với nhiều tác nhân.","features.groupChat.title": "Trò Chuyện Nhóm (Đa Tác Nhân)",+ "features.heteroSessionImport.desc": "Thêm mục \"Nhập phiên làm việc của đại lý cục bộ\" vào menu danh sách chủ đề: quét các bản ghi Claude Code / Codex CLI cục bộ và nhập chúng dưới dạng chủ đề, với đồng bộ hóa gia tăng khi nhập lại.",+ "features.heteroSessionImport.title": "Nhập Phiên Làm Việc Đại Lý Cục Bộ","features.imessage.desc": "Kết nối các đại lý với iMessage thông qua cầu nối BlueBubbles LobeHub Desktop cục bộ.","features.imessage.title": "Kênh iMessage","features.inAppBrowser.desc": "Hiển thị tab Trình duyệt trong bảng điều khiển bên của cuộc trò chuyện: một trình duyệt nhúng mở kết quả tìm kiếm tại chỗ và cho phép nhân viên hỗ trợ duyệt web một cách rõ ràng.",diff --git a/locales/vi-VN/messenger.json b/locales/vi-VN/messenger.jsonindex 468656f4434..be26b7c7dcc 100644--- a/locales/vi-VN/messenger.json+++ b/locales/vi-VN/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "Ngắt kết nối tài khoản WeChat hiện tại trước khi kết nối tài khoản khác.","messenger.wechat.paidDescription": "Hệ thống Bot WeChat có sẵn trên các gói cá nhân trả phí. Nâng cấp để kết nối và sử dụng.","messenger.wechat.paidTitle": "Nâng cấp để kết nối WeChat",+ "messenger.wechat.push.description": "WeChat chỉ cho phép bot nhắn tin cho bạn trong một cửa sổ gửi — trả lời bất kỳ điều gì cho bot trong WeChat để đặt lại thành {{max}} lần gửi / 24 giờ.",+ "messenger.wechat.push.expiresIn": "hết hạn sau {{value}}",+ "messenger.wechat.push.loadFailed": "Không thể tải trạng thái cửa sổ gửi.",+ "messenger.wechat.push.placeholder": "Viết một tin nhắn để gửi đến WeChat của bạn…",+ "messenger.wechat.push.queued": "{{count}} tin nhắn trong hàng đợi sẽ được gửi tự động sau khi bạn nhắn tin cho bot trong WeChat.",+ "messenger.wechat.push.queuedToast": "Cửa sổ gửi đã đóng — tin nhắn của bạn đang trong hàng đợi. Nói bất kỳ điều gì với bot trong WeChat để nhận được tin nhắn.",+ "messenger.wechat.push.sectionTitle": "Gửi Tin Nhắn",+ "messenger.wechat.push.send": "Gửi đến WeChat",+ "messenger.wechat.push.sentToast": "Đã gửi đến WeChat (còn {{remaining}} lần gửi trong cửa sổ này).",+ "messenger.wechat.push.title": "Gửi chủ động",+ "messenger.wechat.push.unavailableToast": "Tính năng gửi tạm thời không khả dụng. Vui lòng thử lại sau.",+ "messenger.wechat.push.unlinkedToast": "Liên kết WeChat của bạn không khả dụng — quét lại mã QR để kết nối lại.",+ "messenger.wechat.push.windowClosed": "Cửa sổ gửi đã đóng",+ "messenger.wechat.push.windowClosedHint": "Gửi bất kỳ tin nhắn nào cho bot trong WeChat để mở lại.",+ "messenger.wechat.push.windowOpen": "Cửa sổ gửi đã mở","messenger.wechat.qr.expired": "Mã QR này đã hết hạn. Tạo mã mới để tiếp tục.","messenger.wechat.qr.scanned": "Đã quét. Xác nhận kết nối trong WeChat.","messenger.wechat.qr.tip": "Mở WeChat trên điện thoại của bạn, quét mã này và xác nhận. Mã này chỉ sử dụng một lần và hết hạn sau 5 phút.",diff --git a/locales/vi-VN/modelRuntime.json b/locales/vi-VN/modelRuntime.jsonindex b076c9cb404..0077da45d67 100644--- a/locales/vi-VN/modelRuntime.json+++ b/locales/vi-VN/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Xác thực Vertex thất bại. Vui lòng kiểm tra thông tin xác thực của bạn và thử lại.","LocationNotSupportError": "Rất tiếc, vị trí hiện tại của bạn không hỗ trợ dịch vụ mô hình này. Điều này có thể do hạn chế khu vực hoặc dịch vụ không khả dụng. Vui lòng xác nhận xem vị trí hiện tại có hỗ trợ sử dụng dịch vụ này hay không, hoặc thử sử dụng một vị trí khác.","ModelEmptyCompletion": "Nhà cung cấp mô hình đã trả về một phản hồi trống. Ngay cả khi không có nội dung hiển thị, yêu cầu này vẫn có thể phát sinh chi phí. Bạn có thể thử lại hoặc chuyển đổi mô hình và thử lại.",+ "ModelEmptyCompletionWithCost": "Nhà cung cấp mô hình đã trả về một phản hồi trống. Yêu cầu này tiêu tốn {{credits}} tín dụng. Thử lại có thể tốn chi phí tương tự, hoặc bạn có thể chuyển đổi mô hình.","ModelNotFound": "Rất tiếc, không thể tìm thấy mô hình được yêu cầu. Có thể mô hình không tồn tại hoặc bạn không có quyền truy cập cần thiết. Vui lòng thử lại sau khi thay đổi khóa API hoặc điều chỉnh quyền truy cập của bạn.","NoAvailableChannel": "Rất tiếc, proxy hoặc bộ định tuyến không có kênh khả dụng cho mô hình được yêu cầu. Vui lòng chuyển đổi cấu hình kênh/khóa hoặc thử lại sau.","OllamaBizError": "Lỗi khi yêu cầu dịch vụ Ollama, vui lòng khắc phục sự cố hoặc thử lại dựa trên thông tin sau.",diff --git a/locales/vi-VN/plugin.json b/locales/vi-VN/plugin.jsonindex b3dd29a6472..6d9207e101f 100644--- a/locales/vi-VN/plugin.json+++ b/locales/vi-VN/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "Cập nhật nút","builtins.lobe-page-agent.apiName.wrapNodes": "Bao nút","builtins.lobe-page-agent.title": "Trang",+ "builtins.lobe-remote-device.apiName.activateDevice": "Kết nối thiết bị",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "Kiểm tra thiết bị trực tuyến",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} trực tuyến",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} trực tuyến",+ "builtins.lobe-remote-device.render.activated": "Đã kết nối",+ "builtins.lobe-remote-device.render.activationFailed": "Không thể kết nối",+ "builtins.lobe-remote-device.render.noOnlineDevices": "Không có thiết bị nào trực tuyến",+ "builtins.lobe-remote-device.render.offline": "Ngoại tuyến",+ "builtins.lobe-remote-device.render.online": "Trực tuyến",+ "builtins.lobe-remote-device.render.scope.personal": "Cá nhân",+ "builtins.lobe-remote-device.render.scope.workspace": "Không gian làm việc",+ "builtins.lobe-remote-device.title": "Thiết bị từ xa","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "Ghi lại ý tưởng cải tiến","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "Đề xuất cải tiến","builtins.lobe-self-feedback-intent.inspector.memory.write": "Ghi lại sở thích",diff --git a/locales/vi-VN/subscription.json b/locales/vi-VN/subscription.jsonindex 1db7b5b0254..734c9db5442 100644--- a/locales/vi-VN/subscription.json+++ b/locales/vi-VN/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "Hóa đơn nháp này được tạo bởi một đăng ký mới và sẽ được tự động thanh toán sớm","billing.empty": "Không có lịch sử thanh toán","billing.endDate": "Ngày kết thúc",+ "billing.existingSubscription.description": "Không có gói đăng ký mới nào được tạo. Bạn có thể quản lý hoặc hủy gói đăng ký hiện tại của mình bên dưới.",+ "billing.existingSubscription.title": "Bạn đã có một gói đăng ký","billing.history": "Lịch sử thanh toán","billing.manage.openFailed": "Không thể mở trang quản lý thanh toán","billing.manage.title": "Quản lý Thanh toán",diff --git a/locales/vi-VN/topic.json b/locales/vi-VN/topic.jsonindex 9488cbbc938..db3189c6474 100644--- a/locales/vi-VN/topic.json+++ b/locales/vi-VN/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "Hôm qua","guide.desc": "Nhấn nút bên trái để lưu cuộc trò chuyện hiện tại thành một chủ đề lịch sử và bắt đầu cuộc trò chuyện mới.","guide.title": "Danh sách chủ đề",+ "heteroImport.action.ignore": "Bỏ qua: ẩn thư mục này khỏi danh sách; khôi phục từ nhóm Đã Bỏ Qua bên dưới",+ "heteroImport.action.restore": "Khôi phục thư mục này",+ "heteroImport.action.unwatch": "Bỏ theo dõi và chuyển lại về nhóm nguồn của nó",+ "heteroImport.action.watch": "Theo dõi: ghim vào nhóm Đang Theo Dõi ở trên cùng; các phiên mới có thể tự động đồng bộ",+ "heteroImport.allSessions": "Tất cả các phiên",+ "heteroImport.badge.imported": "Đã nhập",+ "heteroImport.badge.linked": "Từ LobeHub",+ "heteroImport.badge.linkedTip": "Phiên này được bắt đầu từ LobeHub và đã có trong danh sách chủ đề của bạn",+ "heteroImport.badge.syncable": "Tin nhắn mới",+ "heteroImport.badge.syncableTip": "Đã nhập trước đó, và bản ghi cục bộ đã được cập nhật thêm — nhập lại chỉ thêm phần mới",+ "heteroImport.done.cta": "Hoàn tất",+ "heteroImport.done.failed": ", {{count}} thất bại (có thể thử lại)",+ "heteroImport.done.summary": "Đã nhập {{sessions}} phiên · {{messages}} tin nhắn",+ "heteroImport.empty.desc": "Không tìm thấy bản ghi Claude Code (~/.claude/projects) hoặc Codex (~/.codex/sessions). Sử dụng chúng trong terminal trước, sau đó thử lại.",+ "heteroImport.empty.title": "Không tìm thấy phiên tác nhân cục bộ",+ "heteroImport.entry": "Nhập các phiên tác nhân cục bộ",+ "heteroImport.error.desc": "Không thể đọc các phiên cục bộ. Kiểm tra xem LobeHub có thể truy cập bản ghi của bạn không, sau đó thử lại.",+ "heteroImport.error.title": "Quét thất bại",+ "heteroImport.footer.hint": "Chọn các phiên để nhập — nhập lại sẽ tự động bỏ qua nội dung đã tồn tại",+ "heteroImport.footer.import": "Nhập {{count}} phiên",+ "heteroImport.footer.importEmpty": "Nhập",+ "heteroImport.footer.rescan": "Quét lại",+ "heteroImport.footer.selected": "Đã chọn {{sessions}} phiên · ~{{messages}} tin nhắn · {{tokens}} token",+ "heteroImport.hideImported": "Ẩn đã nhập",+ "heteroImport.ignoredGroup": "Đã bỏ qua {{count}} thư mục",+ "heteroImport.meta.messages": "{{count}} tin nhắn",+ "heteroImport.meta.tokens": "{{tokens}} token",+ "heteroImport.progress": "Đang nhập {{done}}/{{total}} phiên…",+ "heteroImport.retry": "Thử lại",+ "heteroImport.scanning": "Đang quét các phiên tác nhân cục bộ…",+ "heteroImport.searchEmpty": "Không có phiên nào phù hợp",+ "heteroImport.searchPlaceholder": "Tìm kiếm phiên…",+ "heteroImport.selectAll": "Chọn tất cả",+ "heteroImport.state.failed": "Thất bại",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "Đang chờ",+ "heteroImport.state.running": "Đang nhập",+ "heteroImport.title": "Nhập các phiên tác nhân cục bộ",+ "heteroImport.watchedGroup": "Đang theo dõi","importError": "Nhập thất bại","importInvalidFormat": "Định dạng tệp không hợp lệ. Vui lòng đảm bảo đó là tệp JSON hợp lệ.","importLoading": "Đang nhập cuộc trò chuyện...",diff --git a/locales/vi-VN/verify.json b/locales/vi-VN/verify.jsonindex ae0f7b78f36..3988e14d7d8 100644--- a/locales/vi-VN/verify.json+++ b/locales/vi-VN/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "Cần sửa {{count}}","acceptance.filter.pending": "Cần đánh giá {{count}}","acceptance.filter.roundAll": "Tất cả các vòng",+ "acceptance.goalCollapse": "Thu gọn mục tiêu chấp nhận","acceptance.goalEdit": "Chỉnh sửa mục tiêu chấp nhận",+ "acceptance.goalExpand": "Mở rộng mục tiêu chấp nhận","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} đã chấp nhận","acceptance.group.allVerified": "{{passed}}/{{total}} tất cả đã được xác minh & chấp nhận","acceptance.group.collapse": "Thu gọn {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "Đã xóa chấp nhận","acceptance.workspace.emptyDetail.description": "Chọn một trạng thái chấp nhận ở bên trái để xem xét các kiểm tra, vòng và bằng chứng của nó.","acceptance.workspace.emptyDetail.title": "Chọn một trạng thái chấp nhận",+ "acceptance.workspace.filters.active": "Đang tiến hành",+ "acceptance.workspace.filters.all": "Tất cả các chấp nhận",+ "acceptance.workspace.filters.completed": "Đã hoàn thành",+ "acceptance.workspace.filters.empty.active": "Không có chấp nhận nào đang tiến hành.",+ "acceptance.workspace.filters.empty.completed": "Không có chấp nhận nào đã hoàn thành.",+ "acceptance.workspace.filters.noSearchResults": "Không có chấp nhận nào khớp với “{{query}}”.",+ "acceptance.workspace.filters.showAll": "Hiển thị tất cả các chấp nhận",+ "acceptance.workspace.filters.title": "Lọc các chấp nhận","acceptance.workspace.listEmpty": "Nhập một báo cáo xác minh bằng CLI và trạng thái chấp nhận của nó sẽ hiển thị ở đây.","acceptance.workspace.listEmptyTitle": "Chưa có trạng thái chấp nhận nào","acceptance.workspace.renameEmpty": "Tiêu đề không được để trống",diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.jsonindex be932a1952b..41975bbd19a 100644--- a/locales/zh-CN/chat.json+++ b/locales/zh-CN/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "按 <key/> 发送","input.sendWithEnter": "按 <key/> 发送","input.stop": "停止",- "input.viewOnlyAgent": "您对该代理只有查看权限,因此无法发送消息。请联系创建者或工作区所有者以获取访问权限。",- "input.viewOnlyGroup": "您对该组只有查看权限,因此无法发送消息。请联系创建者或工作区所有者以获取访问权限。",+ "input.useOnlyAgent": "您仅可使用该助理",+ "input.useOnlyGroup": "您仅可使用该群组",+ "input.viewOnlyAgent": "您仅可查看该助理",+ "input.viewOnlyGroup": "您仅可查看该群组","input.warp": "换行","input.warpWithKey": "按 <key/> 换行","inputQueue.delete": "删除",diff --git a/locales/zh-CN/messenger.json b/locales/zh-CN/messenger.jsonindex c19f8cb3d68..8e38b56d192 100644--- a/locales/zh-CN/messenger.json+++ b/locales/zh-CN/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "请先断开当前微信账号,再连接其他账号。","messenger.wechat.paidDescription": "微信 System Bot 仅面向个人付费方案开放。升级后即可连接并使用。","messenger.wechat.paidTitle": "升级后连接微信",+ "messenger.wechat.push.description": "受微信限制,机器人只能在发送窗口内主动给您发消息,在微信中随意回复一句即可将窗口重置为 {{max}} 条 / 24 小时。",+ "messenger.wechat.push.expiresIn": "{{value}} 后过期",+ "messenger.wechat.push.loadFailed": "无法加载发送窗口状态。",+ "messenger.wechat.push.placeholder": "输入要推送到您微信的消息…",+ "messenger.wechat.push.queued": "{{count}} 条消息排队中,您在微信中给机器人发送消息后将自动送达。",+ "messenger.wechat.push.queuedToast": "发送窗口未打开,消息已排队。在微信中随意给机器人发一句话即可收到。",+ "messenger.wechat.push.sectionTitle": "消息推送",+ "messenger.wechat.push.send": "推送到微信",+ "messenger.wechat.push.sentToast": "已推送到微信(本窗口剩余 {{remaining}} 条)。",+ "messenger.wechat.push.title": "主动推送",+ "messenger.wechat.push.unavailableToast": "推送服务暂时不可用,请稍后重试。",+ "messenger.wechat.push.unlinkedToast": "微信绑定不可用,请重新扫码连接后再试。",+ "messenger.wechat.push.windowClosed": "发送窗口未打开",+ "messenger.wechat.push.windowClosedHint": "在微信中给机器人发送任意消息即可打开。",+ "messenger.wechat.push.windowOpen": "发送窗口已打开","messenger.wechat.qr.expired": "二维码已过期,请生成新的二维码继续。","messenger.wechat.qr.scanned": "已扫码,请在微信中确认连接。","messenger.wechat.qr.tip": "打开手机微信扫描此二维码并确认。二维码仅可使用一次,5 分钟后过期。",diff --git a/locales/zh-CN/verify.json b/locales/zh-CN/verify.jsonindex 9296206991b..80afba138bd 100644--- a/locales/zh-CN/verify.json+++ b/locales/zh-CN/verify.json@@ -207,7 +207,7 @@"acceptance.workspace.filters.all": "全部验收","acceptance.workspace.filters.completed": "已完成","acceptance.workspace.filters.empty.active": "暂无进行中的验收。",- "acceptance.workspace.filters.empty.all": "暂无验收。",+ "acceptance.workspace.filters.empty.all": "暂无验收记录。","acceptance.workspace.filters.empty.completed": "暂无已完成的验收。","acceptance.workspace.filters.noSearchResults": "没有与「{{query}}」匹配的验收。","acceptance.workspace.filters.showAll": "显示全部验收",diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.jsonindex 597543c9b66..2167a27a2c6 100644--- a/locales/zh-TW/chat.json+++ b/locales/zh-TW/chat.json@@ -499,8 +499,10 @@"input.sendWithCmdEnter": "按 <key/> 鍵發送","input.sendWithEnter": "按 <key/> 鍵發送","input.stop": "停止",- "input.viewOnlyAgent": "您對此代理僅有檢視權限,因此無法發送消息。請聯繫創建者或工作區擁有者以獲取權限。",- "input.viewOnlyGroup": "您對此群組僅有檢視權限,因此無法發送消息。請聯繫創建者或工作區擁有者以獲取權限。",+ "input.useOnlyAgent": "您只能使用此代理",+ "input.useOnlyGroup": "您只能使用此群組",+ "input.viewOnlyAgent": "您只能查看此代理",+ "input.viewOnlyGroup": "您只能查看此群組","input.warp": "換行","input.warpWithKey": "按 <key/> 鍵換行","inputQueue.delete": "刪除",@@ -1545,6 +1547,31 @@"workingPanel.localFile.preview.render": "預覽","workingPanel.localFile.preview.source": "來源","workingPanel.localFile.truncated": "檔案預覽已截斷至 {{limit}} 個字元",+ "workingPanel.openMenu.configuration": "設定",+ "workingPanel.openMenu.terminal": "開啟終端機",+ "workingPanel.openMenu.title": "開啟工作區面板",+ "workingPanel.openMenu.tools": "工具",+ "workingPanel.openMenu.workspace": "工作區",+ "workingPanel.overview.branch": "分支",+ "workingPanel.overview.branch.detached": "分離的 HEAD",+ "workingPanel.overview.changes": "變更",+ "workingPanel.overview.changes.clean": "工作樹無變更",+ "workingPanel.overview.changes.files_one": "{{count}} 個檔案已修改",+ "workingPanel.overview.changes.files_other": "{{count}} 個檔案已修改",+ "workingPanel.overview.documents.desc": "此代理可用的文件",+ "workingPanel.overview.empty": "當代理執行時,工作區活動和輸出將顯示在此處。",+ "workingPanel.overview.emptyTitle": "準備開始工作",+ "workingPanel.overview.environment": "環境",+ "workingPanel.overview.environmentError": "無法載入存儲庫狀態",+ "workingPanel.overview.execution.device": "已連接的裝置",+ "workingPanel.overview.execution.local": "此裝置",+ "workingPanel.overview.outputs": "輸出",+ "workingPanel.overview.resources": "資源",+ "workingPanel.overview.skills.desc": "此代理可用的技能",+ "workingPanel.overview.title": "概覽",+ "workingPanel.overview.viewAll": "檢視全部",+ "workingPanel.overview.workspace.empty": "未選擇工作區",+ "workingPanel.overview.workspace.emptyDesc": "從運行時工具列中選擇一個工作目錄","workingPanel.progress": "進度","workingPanel.progress.allCompleted": "所有任務已完成","workingPanel.resources": "資源",@@ -1654,6 +1681,13 @@"workingPanel.skills.section.user": "用戶技能","workingPanel.skills.title": "技能","workingPanel.space": "空間",+ "workingPanel.tabs.close": "關閉標籤頁",+ "workingPanel.tabs.closeLeft": "關閉左側標籤頁",+ "workingPanel.tabs.closeOthers": "關閉其他標籤頁",+ "workingPanel.tabs.closeRight": "關閉右側標籤頁",+ "workingPanel.tabs.pin": "固定標籤頁",+ "workingPanel.tabs.pinned": "已固定的標籤頁",+ "workingPanel.tabs.unpin": "取消固定標籤頁","workingPanel.title": "Working Panel","workingPanel.works.changeType.created": "已建立","workingPanel.works.changeType.updated": "已更新",diff --git a/locales/zh-TW/labs.json b/locales/zh-TW/labs.jsonindex a742aaca282..7d7e9feb25a 100644--- a/locales/zh-TW/labs.json+++ b/locales/zh-TW/labs.json@@ -1,4 +1,5 @@{+ "description": "這些功能是實驗性的。我們可能會移除它們,而且它們可能存在錯誤。在使用過程中,我們非常期待您的回饋。","features.agentGraphConfig.desc": "在代理配置檔的進階設定中顯示圖形運行時配置。","features.agentGraphConfig.title": "代理圖形運行時配置","features.agentSelfIteration.desc": "允許助理進行反思、建立自我認知,並透過持續的嘗試與互動不斷迭代提升。",@@ -11,6 +12,8 @@"features.claudeCodeSdk.title": "Claude Code SDK 執行環境","features.groupChat.desc": "啟用多智能體群組聊天編排功能。","features.groupChat.title": "群組聊天(多智能體)",+ "features.heteroSessionImport.desc": "在主題列表選單中新增「匯入本地代理會話」項目:掃描本地 Claude Code / Codex CLI 轉錄內容並將其匯入為主題,重新匯入時進行增量同步。",+ "features.heteroSessionImport.title": "本地代理會話匯入","features.imessage.desc": "透過本地 LobeHub Desktop BlueBubbles 橋接,將代理連接至 iMessage。","features.imessage.title": "iMessage 通道","features.inAppBrowser.desc": "在對話側邊欄中顯示瀏覽器標籤:嵌入式瀏覽器可直接開啟搜尋結果,並讓客服人員可見地瀏覽。",diff --git a/locales/zh-TW/messenger.json b/locales/zh-TW/messenger.jsonindex e28db5cec38..87888ab361c 100644--- a/locales/zh-TW/messenger.json+++ b/locales/zh-TW/messenger.json@@ -117,6 +117,21 @@"messenger.wechat.error.unlinkBeforeRelink": "在連接另一個帳號之前,請先斷開當前的微信帳號。","messenger.wechat.paidDescription": "微信系統機器人僅適用於付費個人計劃。升級以連接並運行它。","messenger.wechat.paidTitle": "升級以連接微信",+ "messenger.wechat.push.description": "微信僅允許機器人在發送窗口內向您發送消息——在微信中向機器人回覆任何內容即可重置為 {{max}} 次發送 / 24 小時。",+ "messenger.wechat.push.expiresIn": "於 {{value}} 後過期",+ "messenger.wechat.push.loadFailed": "無法加載發送窗口狀態。",+ "messenger.wechat.push.placeholder": "撰寫一條消息推送到您的微信…",+ "messenger.wechat.push.queued": "{{count}} 條排隊消息將在您在微信中向機器人發送消息後自動送達。",+ "messenger.wechat.push.queuedToast": "發送窗口已關閉——您的消息已排隊。請在微信中向機器人發送任何內容以接收消息。",+ "messenger.wechat.push.sectionTitle": "消息推送",+ "messenger.wechat.push.send": "推送到微信",+ "messenger.wechat.push.sentToast": "已推送到微信(此窗口內剩餘 {{remaining}} 次發送)。",+ "messenger.wechat.push.title": "主動推送",+ "messenger.wechat.push.unavailableToast": "推送暫時不可用。請稍後再試。",+ "messenger.wechat.push.unlinkedToast": "您的微信連結不可用——請重新掃描二維碼以重新連接。",+ "messenger.wechat.push.windowClosed": "發送窗口已關閉",+ "messenger.wechat.push.windowClosedHint": "請在微信中向機器人發送任何消息以開啟窗口。",+ "messenger.wechat.push.windowOpen": "發送窗口已開啟","messenger.wechat.qr.expired": "此二維碼已過期。請生成新的二維碼以繼續。","messenger.wechat.qr.scanned": "已掃描。請在微信中確認連接。","messenger.wechat.qr.tip": "在手機上打開微信,掃描此二維碼並確認。此二維碼僅可使用一次,並在 5 分鐘後過期。",diff --git a/locales/zh-TW/modelRuntime.json b/locales/zh-TW/modelRuntime.jsonindex 7ae5cbbb877..d5937a11ab5 100644--- a/locales/zh-TW/modelRuntime.json+++ b/locales/zh-TW/modelRuntime.json@@ -23,6 +23,7 @@"InvalidVertexCredentials": "Vertex 身份驗證失敗。請檢查您的憑證並重試。","LocationNotSupportError": "抱歉,您當前的位置不支援此模型服務。這可能是由於地區限制或服務不可用所致。請確認當前位置是否支援使用此服務,或嘗試使用其他位置。","ModelEmptyCompletion": "模型提供者返回了空的回應。即使沒有可見內容,此請求仍可能產生費用。您可以重試或切換模型後再試一次。",+ "ModelEmptyCompletionWithCost": "模型提供者返回了空的回應。此請求花費了 {{credits}} 點數。重試可能會產生相似的費用,或者您可以切換模型。","ModelNotFound": "抱歉,找不到所請求的模型。它可能不存在或您可能沒有必要的訪問權限。請在更改 API 金鑰或調整訪問權限後重試。","NoAvailableChannel": "抱歉,代理或路由器沒有可用的通道來處理所請求的模型。請切換通道/金鑰配置或稍後重試。","OllamaBizError": "請求 Ollama 服務時發生錯誤,請根據以下資訊進行故障排除或重試。",diff --git a/locales/zh-TW/plugin.json b/locales/zh-TW/plugin.jsonindex a8f958f3e2b..cf47e946968 100644--- a/locales/zh-TW/plugin.json+++ b/locales/zh-TW/plugin.json@@ -344,6 +344,18 @@"builtins.lobe-page-agent.apiName.updateNode": "更新節點","builtins.lobe-page-agent.apiName.wrapNodes": "包裝節點","builtins.lobe-page-agent.title": "文件",+ "builtins.lobe-remote-device.apiName.activateDevice": "連接設備",+ "builtins.lobe-remote-device.apiName.listOnlineDevices": "檢查在線設備",+ "builtins.lobe-remote-device.inspector.onlineCount_one": "{{count}} 在線",+ "builtins.lobe-remote-device.inspector.onlineCount_other": "{{count}} 在線",+ "builtins.lobe-remote-device.render.activated": "已連接",+ "builtins.lobe-remote-device.render.activationFailed": "無法連接",+ "builtins.lobe-remote-device.render.noOnlineDevices": "沒有設備在線",+ "builtins.lobe-remote-device.render.offline": "離線",+ "builtins.lobe-remote-device.render.online": "在線",+ "builtins.lobe-remote-device.render.scope.personal": "個人",+ "builtins.lobe-remote-device.render.scope.workspace": "工作區",+ "builtins.lobe-remote-device.title": "遠端設備","builtins.lobe-self-feedback-intent.apiName.declareSelfFeedbackIntent": "記錄改進想法","builtins.lobe-self-feedback-intent.inspector.gap.proposal": "建議改進","builtins.lobe-self-feedback-intent.inspector.memory.write": "記錄偏好",diff --git a/locales/zh-TW/subscription.json b/locales/zh-TW/subscription.jsonindex 6df51edf6bd..d8d70ab4c06 100644--- a/locales/zh-TW/subscription.json+++ b/locales/zh-TW/subscription.json@@ -16,6 +16,8 @@"billing.draftTooltip": "此草稿帳單由新訂閱產生,將自動扣款","billing.empty": "尚無帳單紀錄","billing.endDate": "結束日期",+ "billing.existingSubscription.description": "未建立新的訂閱。您可以在下方管理或取消您目前的訂閱。",+ "billing.existingSubscription.title": "您已經有一個訂閱","billing.history": "帳單紀錄","billing.manage.openFailed": "無法開啟付款管理頁面","billing.manage.title": "管理付款",diff --git a/locales/zh-TW/topic.json b/locales/zh-TW/topic.jsonindex 90d1c3000a3..96ba961739f 100644--- a/locales/zh-TW/topic.json+++ b/locales/zh-TW/topic.json@@ -93,6 +93,45 @@"groupTitle.byTime.yesterday": "昨天","guide.desc": "點擊發送左側按鈕可將當前會話保存為歷史話題,並開啟新一輪會話","guide.title": "話題列表",+ "heteroImport.action.ignore": "忽略:將此目錄從列表中隱藏;可從下方的忽略群組中恢復",+ "heteroImport.action.restore": "恢復此目錄",+ "heteroImport.action.unwatch": "取消關注並移回其來源群組",+ "heteroImport.action.watch": "關注:固定到頂部的關注群組;新會話可自動同步",+ "heteroImport.allSessions": "所有會話",+ "heteroImport.badge.imported": "已匯入",+ "heteroImport.badge.linked": "來自 LobeHub",+ "heteroImport.badge.linkedTip": "此會話是從 LobeHub 開始的,已存在於您的主題列表中",+ "heteroImport.badge.syncable": "新訊息",+ "heteroImport.badge.syncableTip": "之前已匯入,本地記錄已增長 — 再次匯入只會新增新部分",+ "heteroImport.done.cta": "完成",+ "heteroImport.done.failed": ",{{count}} 個失敗(可重試)",+ "heteroImport.done.summary": "已匯入 {{sessions}} 個會話 · {{messages}} 條訊息",+ "heteroImport.empty.desc": "未找到 Claude Code (~/.claude/projects) 或 Codex (~/.codex/sessions) 的記錄檔。請先在終端中使用它們,然後再試一次。",+ "heteroImport.empty.title": "未找到本地代理會話",+ "heteroImport.entry": "匯入本地代理會話",+ "heteroImport.error.desc": "無法讀取本地會話。請檢查 LobeHub 是否可以訪問您的記錄檔,然後重試。",+ "heteroImport.error.title": "掃描失敗",+ "heteroImport.footer.hint": "選擇要匯入的會話 — 重新匯入會自動跳過已存在的內容",+ "heteroImport.footer.import": "匯入 {{count}} 個會話",+ "heteroImport.footer.importEmpty": "匯入",+ "heteroImport.footer.rescan": "重新掃描",+ "heteroImport.footer.selected": "已選擇 {{sessions}} 個會話 · 約 {{messages}} 條訊息 · {{tokens}} 個標記",+ "heteroImport.hideImported": "隱藏已匯入的",+ "heteroImport.ignoredGroup": "忽略的 {{count}} 個目錄",+ "heteroImport.meta.messages": "{{count}} 條訊息",+ "heteroImport.meta.tokens": "{{tokens}} 個標記",+ "heteroImport.progress": "正在匯入 {{done}}/{{total}} 個會話…",+ "heteroImport.retry": "重試",+ "heteroImport.scanning": "正在掃描本地代理會話…",+ "heteroImport.searchEmpty": "未找到匹配的會話",+ "heteroImport.searchPlaceholder": "搜尋會話…",+ "heteroImport.selectAll": "全選",+ "heteroImport.state.failed": "失敗",+ "heteroImport.state.inserted": "+{{count}}",+ "heteroImport.state.pending": "等待中",+ "heteroImport.state.running": "匯入中",+ "heteroImport.title": "匯入本地代理會話",+ "heteroImport.watchedGroup": "關注","importError": "匯入失敗","importInvalidFormat": "檔案格式無效,請確認為有效的 JSON 檔案","importLoading": "正在匯入對話...",diff --git a/locales/zh-TW/verify.json b/locales/zh-TW/verify.jsonindex 756c7750524..8bb834f9bfc 100644--- a/locales/zh-TW/verify.json+++ b/locales/zh-TW/verify.json@@ -68,7 +68,9 @@"acceptance.filter.needsFix": "需要修復 {{count}}","acceptance.filter.pending": "待審查 {{count}}","acceptance.filter.roundAll": "所有回合",+ "acceptance.goalCollapse": "收起驗收目標","acceptance.goalEdit": "編輯接受目標",+ "acceptance.goalExpand": "展開驗收目標","acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 已接受","acceptance.group.allVerified": "{{passed}}/{{total}} 全部驗證並接受","acceptance.group.collapse": "摺疊 {{label}}",@@ -201,6 +203,14 @@"acceptance.workspace.deleteSuccess": "接受已刪除","acceptance.workspace.emptyDetail.description": "在左側選擇一個接受以查看其檢查、回合和證據。","acceptance.workspace.emptyDetail.title": "選擇一個接受",+ "acceptance.workspace.filters.active": "進行中",+ "acceptance.workspace.filters.all": "所有驗收",+ "acceptance.workspace.filters.completed": "已完成",+ "acceptance.workspace.filters.empty.active": "目前沒有進行中的驗收。",+ "acceptance.workspace.filters.empty.completed": "目前沒有已完成的驗收。",+ "acceptance.workspace.filters.noSearchResults": "沒有符合「{{query}}」的驗收。",+ "acceptance.workspace.filters.showAll": "顯示所有驗收",+ "acceptance.workspace.filters.title": "篩選驗收","acceptance.workspace.listEmpty": "使用 CLI 引入驗證報告,其接受將顯示在此處。","acceptance.workspace.listEmptyTitle": "尚無接受","acceptance.workspace.renameEmpty": "標題不能為空",diff --git a/packages/chat-adapter-wechat/src/adapter.test.ts b/packages/chat-adapter-wechat/src/adapter.test.tsindex f9894545956..67e4f43e053 100644--- a/packages/chat-adapter-wechat/src/adapter.test.ts+++ b/packages/chat-adapter-wechat/src/adapter.test.ts@@ -558,6 +558,30 @@ describe('WechatAdapter', () => {expect(raw.raw.item_list[0].type).toBe(MessageItemType.TEXT);});+ it('reports each outbound text request before Chat SDK messages are sent', async () => {+ const onBeforeSendMessage = vi.fn();+ const trackedAdapter = new WechatAdapter({+ botId: 'bot_123',+ botToken: 'tok',+ onBeforeSendMessage,+ });+ await trackedAdapter.initialize(mockChat as any);+ trackedAdapter.setContextToken(threadId, 'ctx_tok');+ const trackedSendMessage = vi+ .spyOn((trackedAdapter as any).api, 'sendMessage')+ .mockResolvedValue({ ret: 0 });++ await trackedAdapter.postMessage(threadId, 'a'.repeat(4500));++ expect(onBeforeSendMessage).toHaveBeenCalledWith({+ count: 3,+ toUserId: '[email protected]',+ });+ expect(onBeforeSendMessage.mock.invocationCallOrder[0]).toBeLessThan(+ trackedSendMessage.mock.invocationCallOrder[0],+ );+ });+it('uploads and sends an image attachment as a separate IMAGE item', async () => {const bytes = Buffer.from('pretend image bytes');diff --git a/packages/chat-adapter-wechat/src/adapter.ts b/packages/chat-adapter-wechat/src/adapter.tsindex bbd8de85c06..88d6dbc20f6 100644--- a/packages/chat-adapter-wechat/src/adapter.ts+++ b/packages/chat-adapter-wechat/src/adapter.ts@@ -17,7 +17,7 @@ import type {import { Message, parseMarkdown } from 'chat';import mime from 'mime';-import { WechatApiClient, WechatUploadMediaType } from './api';+import { getWechatTextSendCount, WechatApiClient, WechatUploadMediaType } from './api';import { WechatFormatConverter } from './format-converter';import type { MessageItem, WechatAdapterConfig, WechatRawMessage, WechatThreadId } from './types';import { MessageItemType, MessageState, MessageType } from './types';@@ -394,7 +394,6 @@ function mapToUploadMediaType(type: 'image' | 'file' | 'video' | 'audio'): Wechacase 'audio': {return WechatUploadMediaType.VOICE;}- case 'file':default: {return WechatUploadMediaType.FILE;}@@ -411,6 +410,7 @@ export class WechatAdapter implements Adapter<WechatThreadId, WechatRawMessage>readonly name = 'wechat';private readonly api: WechatApiClient;private readonly formatConverter: WechatFormatConverter;+ private readonly onBeforeSendMessage?: WechatAdapterConfig['onBeforeSendMessage'];private _userName: string;private _botUserId?: string;private chat!: ChatInstance;@@ -433,6 +433,7 @@ export class WechatAdapter implements Adapter<WechatThreadId, WechatRawMessage>constructor(config: WechatAdapterConfig & { userName?: string }) {this.api = new WechatApiClient(config.botToken, config.botId, config.baseUrl);this.formatConverter = new WechatFormatConverter();+ this.onBeforeSendMessage = config.onBeforeSendMessage;this._userName = config.userName || 'wechat-bot';this._botUserId = config.botId;}@@ -504,6 +505,7 @@ export class WechatAdapter implements Adapter<WechatThreadId, WechatRawMessage>const sentItems: MessageItem[] = [];if (text.trim()) {+ await this.onBeforeSendMessage?.({ count: getWechatTextSendCount(text), toUserId: id });await this.api.sendMessage(id, text, contextToken);sentItems.push({ text_item: { text }, type: MessageItemType.TEXT });}@@ -515,6 +517,7 @@ export class WechatAdapter implements Adapter<WechatThreadId, WechatRawMessage>for (const spec of mediaSpecs) {try {const item = await this.uploadAndBuildMediaItem(id, spec);+ await this.onBeforeSendMessage?.({ count: 1, toUserId: id });await this.api.sendItem(id, item, contextToken);sentItems.push(item);} catch (error) {@@ -631,7 +634,6 @@ export class WechatAdapter implements Adapter<WechatThreadId, WechatRawMessage>voice_item: { media: cdnMedia },};}- case WechatUploadMediaType.FILE:default: {return {file_item: {diff --git a/packages/chat-adapter-wechat/src/api.test.ts b/packages/chat-adapter-wechat/src/api.test.tsindex e3a520a0fd7..79728c81670 100644--- a/packages/chat-adapter-wechat/src/api.test.ts+++ b/packages/chat-adapter-wechat/src/api.test.ts@@ -6,6 +6,7 @@ import {CDN_BASE_URL,DEFAULT_BASE_URL,fetchQrCode,+ getWechatTextSendCount,pollQrStatus,resolveAesKey,WechatApiClient,@@ -125,6 +126,7 @@ describe('WechatApiClient', () => {await client.sendMessage('user_1', longText, 'ctx');// 4500 / 2000 = 3 chunks+ expect(getWechatTextSendCount(longText)).toBe(3);expect(mockFetch).toHaveBeenCalledTimes(3);});diff --git a/packages/chat-adapter-wechat/src/api.ts b/packages/chat-adapter-wechat/src/api.tsindex 915762d5cef..b5b6f8d1af5 100644--- a/packages/chat-adapter-wechat/src/api.ts+++ b/packages/chat-adapter-wechat/src/api.ts@@ -47,6 +47,10 @@ const DEFAULT_TIMEOUT_MS = 15_000;const BASE_INFO: BaseInfo = { channel_version: CHANNEL_VERSION };+/** Number of iLink `sendmessage` calls needed to deliver a text payload. */+export const getWechatTextSendCount = (text: string): number =>+ chunkText(text, MAX_TEXT_LENGTH).length;+/*** Generate a random X-WECHAT-UIN header value as required by the iLink API.*/diff --git a/packages/chat-adapter-wechat/src/index.ts b/packages/chat-adapter-wechat/src/index.tsindex ff509fc5954..7f8d1579e3e 100644--- a/packages/chat-adapter-wechat/src/index.ts+++ b/packages/chat-adapter-wechat/src/index.ts@@ -1,6 +1,12 @@export { createWechatAdapter, downloadMediaFromRawMessage, WechatAdapter } from './adapter';export type { QrCodeResponse, QrStatusResponse } from './api';-export { DEFAULT_BASE_URL, fetchQrCode, pollQrStatus, WechatApiClient } from './api';+export {+ DEFAULT_BASE_URL,+ fetchQrCode,+ getWechatTextSendCount,+ pollQrStatus,+ WechatApiClient,+} from './api';export { WechatUploadMediaType } from './api';export { WechatFormatConverter } from './format-converter';export type {@@ -8,6 +14,7 @@ export type {WechatAdapterConfig,WechatGetConfigResponse,WechatGetUpdatesResponse,+ WechatOutboundSendEvent,WechatRawMessage,WechatSendMessageResponse,WechatThreadId,diff --git a/packages/chat-adapter-wechat/src/types.ts b/packages/chat-adapter-wechat/src/types.tsindex 0e795151dab..19291af5b6f 100644--- a/packages/chat-adapter-wechat/src/types.ts+++ b/packages/chat-adapter-wechat/src/types.ts@@ -5,6 +5,15 @@ export interface WechatAdapterConfig {botId?: string;/** Bot token obtained from iLink QR code authentication */botToken: string;+ /** Called immediately before outbound `sendmessage` requests are attempted. */+ onBeforeSendMessage?: (event: WechatOutboundSendEvent) => Promise<void> | void;+}++export interface WechatOutboundSendEvent {+ /** Number of iLink `sendmessage` requests about to be made. */+ count: number;+ /** Recipient's iLink user ID. */+ toUserId: string;}export interface WechatThreadId {diff --git a/packages/database/src/models/__tests__/agent.test.ts b/packages/database/src/models/__tests__/agent.test.tsindex 2facd206333..f0463514335 100644--- a/packages/database/src/models/__tests__/agent.test.ts+++ b/packages/database/src/models/__tests__/agent.test.ts@@ -1356,7 +1356,7 @@ describe('AgentModel', () => {expect(workspaceAgent.agencyConfig).toEqual({executionTargetSelectionPolicy: 'member',- modelSelectionPolicy: 'fixed',+ modelSelectionPolicy: 'member',});expect(personalAgent.agencyConfig).toBeNull();});@@ -1711,6 +1711,10 @@ describe('AgentModel', () => {expect(result?.slug).toBe(INBOX_SESSION_ID);expect(result?.workspaceId).toBe(workspace.id);expect(result?.userId).toBe(userId);+ expect(result?.agencyConfig).toEqual({+ executionTargetSelectionPolicy: 'member',+ modelSelectionPolicy: 'member',+ });});it('should allow workspace inbox to coexist with personal inbox for the same user', async () => {diff --git a/packages/database/src/models/__tests__/agentTransfer.test.ts b/packages/database/src/models/__tests__/agentTransfer.test.tsindex f92b8516184..625d26c3f21 100644--- a/packages/database/src/models/__tests__/agentTransfer.test.ts+++ b/packages/database/src/models/__tests__/agentTransfer.test.ts@@ -640,3 +640,95 @@ describe('AgentModel.transferAgent', () => {);});});++describe('AgentModel.transferAgents (batch)', () => {+ it('should transfer multiple agents with their topics and messages in one call', async () => {+ const model = new AgentModel(serverDB, userId);+ const agent1 = await model.create({ title: 'Agent 1' });+ const agent2 = await model.create({ title: 'Agent 2' });++ await serverDB.insert(topics).values([+ { id: 'batch-topic-1', agentId: agent1.id, userId },+ { id: 'batch-topic-2', agentId: agent2.id, userId },+ ]);+ await serverDB.insert(messages).values([+ { id: 'batch-msg-1', agentId: agent1.id, userId, role: 'assistant' },+ { id: 'batch-msg-2', agentId: agent2.id, userId, role: 'assistant' },+ ]);++ const results = await model.transferAgents([agent1.id, agent2.id], wsId1, userId);++ expect(results).toHaveLength(2);+ expect(results.map((r) => r.agentId)).toEqual([agent1.id, agent2.id]);++ for (const agentId of [agent1.id, agent2.id]) {+ const updated = await serverDB.query.agents.findFirst({ where: eq(agents.id, agentId) });+ expect(updated?.workspaceId).toBe(wsId1);+ }+ for (const topicId of ['batch-topic-1', 'batch-topic-2']) {+ const [topic] = await serverDB.select().from(topics).where(eq(topics.id, topicId));+ expect(topic.workspaceId).toBe(wsId1);+ }+ for (const msgId of ['batch-msg-1', 'batch-msg-2']) {+ const [msg] = await serverDB.select().from(messages).where(eq(messages.id, msgId));+ expect(msg.workspaceId).toBe(wsId1);+ }+ });++ it('should resolve slug conflicts against the target scope and within the batch', async () => {+ // Target workspace already holds `my-agent`+ const targetModel = new AgentModel(serverDB, userId, wsId2);+ await targetModel.create({ title: 'Existing', slug: 'my-agent' });++ const model = new AgentModel(serverDB, userId, wsId1);+ const agent1 = await model.create({ title: 'A1', slug: 'my-agent' });+ const agent2 = await model.create({ title: 'A2', slug: 'my-agent-1' });++ const results = await model.transferAgents([agent1.id, agent2.id], wsId2, userId);++ const slugs = new Map(results.map((r) => [r.agentId, r.slug]));+ // agent1 collides with the existing `my-agent` → suffixed; agent2 must not+ // end up colliding with whatever agent1 received.+ expect(slugs.get(agent1.id)).not.toBe('my-agent');+ expect(slugs.get(agent1.id)).not.toBe(slugs.get(agent2.id));++ const moved = await serverDB.query.agents.findMany({+ where: eq(agents.workspaceId, wsId2),+ });+ const movedSlugs = moved.map((a) => a.slug);+ expect(new Set(movedSlugs).size).toBe(movedSlugs.length);+ });++ it('should roll back the whole batch when any agent is missing', async () => {+ const model = new AgentModel(serverDB, userId);+ const agent = await model.create({ title: 'Survivor' });++ await expect(model.transferAgents([agent.id, 'nonexistent'], wsId1, userId)).rejects.toThrow(+ 'Agent not found',+ );++ const untouched = await serverDB.query.agents.findFirst({ where: eq(agents.id, agent.id) });+ expect(untouched?.workspaceId).toBeNull();+ });++ it('should return empty array for empty input', async () => {+ const model = new AgentModel(serverDB, userId);+ await expect(model.transferAgents([], wsId1, userId)).resolves.toEqual([]);+ });++ it('transferHasForeignRows should accept an array of agent ids', async () => {+ const model = new AgentModel(serverDB, userId, wsId1);+ const mine = await model.create({ title: 'Mine' });+ const foreign = await new AgentModel(serverDB, targetUserId, wsId1).create({+ title: 'Foreign',+ visibility: 'public',+ });++ await serverDB+ .insert(topics)+ .values({ id: 'foreign-topic', agentId: foreign.id, userId: targetUserId });++ await expect(model.transferHasForeignRows([mine.id])).resolves.toBe(false);+ await expect(model.transferHasForeignRows([mine.id, foreign.id])).resolves.toBe(true);+ });+});diff --git a/packages/database/src/models/__tests__/workspaceUserSettings.test.ts b/packages/database/src/models/__tests__/workspaceUserSettings.test.tsindex 76377162a5a..79d2dcf488c 100644--- a/packages/database/src/models/__tests__/workspaceUserSettings.test.ts+++ b/packages/database/src/models/__tests__/workspaceUserSettings.test.ts@@ -114,6 +114,16 @@ describe('WorkspaceUserSettingsModel', () => {});});+ it('deep-merges agentModeOverrides so a single-agent patch never drops other agents', async () => {+ const model = new WorkspaceUserSettingsModel(serverDB, userA, workspaceId);+ await model.updatePreference({ agentModeOverrides: { agentX: true } });++ await model.updatePreference({ agentModeOverrides: { agentY: false } });++ const preference = await model.getPreference();+ expect(preference.agentModeOverrides).toEqual({ agentX: true, agentY: false });+ });+it("isolates users' rows so one caller can never observe another's preference", async () => {const modelA = new WorkspaceUserSettingsModel(serverDB, userA, workspaceId);const modelB = new WorkspaceUserSettingsModel(serverDB, userB, workspaceId);@@ -121,10 +131,12 @@ describe('WorkspaceUserSettingsModel', () => {await modelA.updatePreference({agentDeviceOverrides: { shared: { boundDeviceId: 'A-device', executionTarget: 'device' } },agentModelOverrides: { shared: { model: 'A-model', provider: 'A-provider' } },+ agentModeOverrides: { shared: true },});await modelB.updatePreference({agentDeviceOverrides: { shared: { boundDeviceId: 'B-device', executionTarget: 'device' } },agentModelOverrides: { shared: { model: 'B-model', provider: 'B-provider' } },+ agentModeOverrides: { shared: false },});const [prefA, prefB] = await Promise.all([modelA.getPreference(), modelB.getPreference()]);@@ -132,6 +144,8 @@ describe('WorkspaceUserSettingsModel', () => {expect(prefB.agentDeviceOverrides?.shared?.boundDeviceId).toBe('B-device');expect(prefA.agentModelOverrides?.shared?.model).toBe('A-model');expect(prefB.agentModelOverrides?.shared?.model).toBe('B-model');+ expect(prefA.agentModeOverrides?.shared).toBe(true);+ expect(prefB.agentModeOverrides?.shared).toBe(false);});it('cascades on workspace delete — FK removes every row for that workspace', async () => {diff --git a/packages/database/src/models/agent.ts b/packages/database/src/models/agent.tsindex a4beb57b7cc..ac8bb8fbdb1 100644--- a/packages/database/src/models/agent.ts+++ b/packages/database/src/models/agent.ts@@ -6,7 +6,21 @@ import {pruneWorkingDirByDeviceDeletes,} from '@lobechat/types';import { TRPCError } from '@trpc/server';-import { and, count, desc, eq, gt, ilike, inArray, isNull, ne, or, sql } from 'drizzle-orm';+import {+ and,+ count,+ desc,+ eq,+ gt,+ ilike,+ inArray,+ isNull,+ like,+ ne,+ notInArray,+ or,+ sql,+} from 'drizzle-orm';import type { PartialDeep } from 'type-fest';import { merge } from '@/utils/merge';@@ -404,8 +418,10 @@ export class AgentModel {/*** Query non-virtual agents with optional keyword filter.* Returns minimal agent info (id, title, description, avatar, backgroundColor),- * plus a compact `heteroType` derived from `agencyConfig` so callers can tell- * which results are heterogeneous (external CLI/device) agents.+ * plus `userId`/`visibility` so callers can gate per-agent actions (e.g.+ * transfer is creator/primary-owner only), and a compact `heteroType` derived+ * from `agencyConfig` so callers can tell which results are heterogeneous+ * (external CLI/device) agents.* Excludes virtual agents (like inbox, supervisors, etc).*/queryAgents = async (params?: { keyword?: string; limit?: number; offset?: number }) => {@@ -421,6 +437,8 @@ export class AgentModel {id: agents.id,slug: agents.slug,title: agents.title,+ userId: agents.userId,+ visibility: agents.visibility,}).from(agents).where(searchCondition)@@ -1309,6 +1327,7 @@ export class AgentModel {buildWorkspacePayload({ userId: this.userId, workspaceId: this.workspaceId },{+ agencyConfig: this.withWorkspaceSelectionPolicyDefaults(undefined),model: persistConfig.model,provider: persistConfig.provider,slug: persistConfig.slug,@@ -1342,12 +1361,15 @@ export class AgentModel {* cascaded row, so non-owner members must not move an agent that carries* teammates' conversations.*/- transferHasForeignRows = async (agentId: string): Promise<boolean> => {+ transferHasForeignRows = async (agentId: string | string[]): Promise<boolean> => {+ const agentIds = Array.isArray(agentId) ? agentId : [agentId];+ if (agentIds.length === 0) return false;+const links = await this.db.select({ sessionId: agentsToSessions.sessionId }).from(agentsToSessions)- .where(eq(agentsToSessions.agentId, agentId));- const sessionIds = links.map((link) => link.sessionId);+ .where(inArray(agentsToSessions.agentId, agentIds));+ const sessionIds = [...new Set(links.map((link) => link.sessionId))];// A member who merely opened the shared agent already owns a linked// session, even with no topics/messages yet — the transfer would rewrite@@ -1363,8 +1385,8 @@ export class AgentModel {const topicWhere =sessionIds.length > 0- ? or(inArray(topics.sessionId, sessionIds), eq(topics.agentId, agentId))- : eq(topics.agentId, agentId);+ ? or(inArray(topics.sessionId, sessionIds), inArray(topics.agentId, agentIds))+ : inArray(topics.agentId, agentIds);const [foreignTopic] = await this.db.select({ id: topics.id }).from(topics)@@ -1374,8 +1396,8 @@ export class AgentModel {const messageWhere =sessionIds.length > 0- ? or(inArray(messages.sessionId, sessionIds), eq(messages.agentId, agentId))- : eq(messages.agentId, agentId);+ ? or(inArray(messages.sessionId, sessionIds), inArray(messages.agentId, agentIds))+ : inArray(messages.agentId, agentIds);const [foreignMessage] = await this.db.select({ id: messages.id }).from(messages)@@ -1386,7 +1408,7 @@ export class AgentModel {const [foreignThread] = await this.db.select({ id: threads.id }).from(threads)- .where(and(eq(threads.agentId, agentId), ne(threads.userId, this.userId)))+ .where(and(inArray(threads.agentId, agentIds), ne(threads.userId, this.userId))).limit(1);if (foreignThread) return true;@@ -1395,7 +1417,7 @@ export class AgentModel {.from(tasks).where(and(- or(eq(tasks.assigneeAgentId, agentId), eq(tasks.createdByAgentId, agentId)),+ or(inArray(tasks.assigneeAgentId, agentIds), inArray(tasks.createdByAgentId, agentIds)),ne(tasks.createdByUserId, this.userId),),)@@ -1409,41 +1431,77 @@ export class AgentModel {targetUserId: string,targetVisibility?: 'private' | 'public',): Promise<{ agentId: string; slug: string | null }> => {+ const [result] = await this.transferAgents(+ [agentId],+ targetWorkspaceId,+ targetUserId,+ targetVisibility,+ );+ return result;+ };++ /**+ * Batch variant of {@link transferAgent}: moves several agents (and their+ * cascaded topics / messages / threads / tasks / …) in ONE transaction, with+ * every large-table UPDATE issued once via `inArray` instead of once per+ * agent. All-or-nothing: a failure on any agent rolls back the whole batch.+ */+ transferAgents = async (+ agentIds: string[],+ targetWorkspaceId: string | null,+ targetUserId: string,+ targetVisibility?: 'private' | 'public',+ ): Promise<{ agentId: string; slug: string | null }[]> => {+ if (agentIds.length === 0) return [];+return this.db.transaction(async (trx) => {- // 1. Verify agent exists and belongs to current scope- const agent = await trx.query.agents.findFirst({- where: and(eq(agents.id, agentId), this.ownership()),+ // 1. Verify all agents exist and belong to current scope+ const foundAgents = await trx.query.agents.findMany({+ where: and(inArray(agents.id, agentIds), this.ownership()),});- if (!agent) throw new Error('Agent not found');-- // 2. Handle slug conflict in target scope- let slug = agent.slug;- if (slug) {- const buildConflictCheck = (candidate: string) =>- targetWorkspaceId- ? and(eq(agents.slug, candidate), eq(agents.workspaceId, targetWorkspaceId))- : and(- eq(agents.slug, candidate),- eq(agents.userId, targetUserId),- isNull(agents.workspaceId),- );-- const existing = await trx.query.agents.findFirst({- where: buildConflictCheck(slug),- });- if (existing) {- let suffix = 1;- while (suffix < 100) {- const candidate = `${slug}-${suffix}`;- const conflict = await trx.query.agents.findFirst({- where: buildConflictCheck(candidate),- });- if (!conflict) {- slug = candidate;- break;+ if (foundAgents.length !== new Set(agentIds).size) throw new Error('Agent not found');+ const agentById = new Map(foundAgents.map((agent) => [agent.id, agent]));++ // 2. Resolve slug conflicts in the target scope with a single query:+ // fetch every existing slug that could collide (exact match or+ // `<slug>-<n>` suffix), then pick free suffixes in memory. Agents+ // inside the batch also compete with each other for the same slug.+ const targetScopeWhere = targetWorkspaceId+ ? eq(agents.workspaceId, targetWorkspaceId)+ : and(eq(agents.userId, targetUserId), isNull(agents.workspaceId));+ const sluggedAgents = foundAgents.filter((agent) => agent.slug);+ const resolvedSlugs = new Map<string, string | null>();+ if (sluggedAgents.length > 0) {+ const conflictRows = await trx+ .select({ slug: agents.slug })+ .from(agents)+ .where(+ and(+ targetScopeWhere,+ notInArray(agents.id, agentIds),+ or(+ ...sluggedAgents.map((agent) =>+ or(eq(agents.slug, agent.slug!), like(agents.slug, `${agent.slug}-%`)),+ ),+ ),+ ),+ );+ const taken = new Set(conflictRows.map((row) => row.slug));+ for (const agent of sluggedAgents) {+ let slug = agent.slug!;+ if (taken.has(slug)) {+ let suffix = 1;+ while (suffix < 100) {+ const candidate = `${slug}-${suffix}`;+ if (!taken.has(candidate)) {+ slug = candidate;+ break;+ }+ suffix++;}- suffix++;}+ taken.add(slug);+ resolvedSlugs.set(agent.id, slug);}}@@ -1458,70 +1516,85 @@ export class AgentModel {// target workspace is silently dropped. Otherwise the moved agent would// reference a device only the previous owner can reach. Moving to a// personal scope (`targetWorkspaceId === null`) keeps existing bindings.- let nextAgencyConfig: LobeAgentAgencyConfig | null = agent.agencyConfig ?? null;- if (targetWorkspaceId && nextAgencyConfig) {- const candidateIds = this.collectBoundDeviceIds(nextAgencyConfig);- if (candidateIds.length > 0) {- const rows = await trx- .select({ deviceId: devices.deviceId })- .from(devices)- .where(- and(- eq(devices.workspaceId, targetWorkspaceId),- inArray(devices.deviceId, candidateIds),- ),- );- const allowed = new Set(rows.map((r) => r.deviceId));- const cleaned: LobeAgentAgencyConfig = { ...nextAgencyConfig };- if (cleaned.boundDeviceId && !allowed.has(cleaned.boundDeviceId)) {- delete cleaned.boundDeviceId;+ // Device rows for the whole batch are fetched with one query.+ const resolvedAgencyConfigs = new Map<string, LobeAgentAgencyConfig | null>();+ if (targetWorkspaceId) {+ const allCandidateIds = [+ ...new Set(+ foundAgents.flatMap((agent) => this.collectBoundDeviceIds(agent.agencyConfig)),+ ),+ ];+ const deviceRows =+ allCandidateIds.length > 0+ ? await trx+ .select({ deviceId: devices.deviceId, visibility: devices.visibility })+ .from(devices)+ .where(+ and(+ eq(devices.workspaceId, targetWorkspaceId),+ inArray(devices.deviceId, allCandidateIds),+ ),+ )+ : [];+ const allowed = new Set(deviceRows.map((r) => r.deviceId));+ const publicDeviceIds = new Set(+ deviceRows.filter((r) => r.visibility === 'public').map((r) => r.deviceId),+ );++ for (const agent of foundAgents) {+ let nextAgencyConfig: LobeAgentAgencyConfig | null = agent.agencyConfig ?? null;+ if (!nextAgencyConfig) {+ resolvedAgencyConfigs.set(agent.id, nextAgencyConfig);+ continue;}- if (cleaned.workingDirByDevice) {- const filtered: Record<string, string> = {};- for (const [deviceId, cwd] of Object.entries(cleaned.workingDirByDevice)) {- if (allowed.has(deviceId) && typeof cwd === 'string') filtered[deviceId] = cwd;++ const candidateIds = this.collectBoundDeviceIds(nextAgencyConfig);+ if (candidateIds.length > 0) {+ const cleaned: LobeAgentAgencyConfig = { ...nextAgencyConfig };+ if (cleaned.boundDeviceId && !allowed.has(cleaned.boundDeviceId)) {+ delete cleaned.boundDeviceId;+ }+ if (cleaned.workingDirByDevice) {+ const filtered: Record<string, string> = {};+ for (const [deviceId, cwd] of Object.entries(cleaned.workingDirByDevice)) {+ if (allowed.has(deviceId) && typeof cwd === 'string') filtered[deviceId] = cwd;+ }+ cleaned.workingDirByDevice = Object.keys(filtered).length > 0 ? filtered : undefined;}- cleaned.workingDirByDevice = Object.keys(filtered).length > 0 ? filtered : undefined;+ if (+ cleaned.executionTargetSelectionPolicy === 'fixed' &&+ cleaned.executionTarget === 'device' &&+ (!cleaned.boundDeviceId || !allowed.has(cleaned.boundDeviceId))+ ) {+ cleaned.executionTargetSelectionPolicy = 'member';+ }+ nextAgencyConfig = cleaned;}+if (- cleaned.executionTargetSelectionPolicy === 'fixed' &&- cleaned.executionTarget === 'device' &&- (!cleaned.boundDeviceId || !allowed.has(cleaned.boundDeviceId))+ nextAgencyConfig.executionTargetSelectionPolicy === 'fixed' &&+ (!nextAgencyConfig.executionTarget ||+ !['auto', 'device', 'none', 'sandbox'].includes(nextAgencyConfig.executionTarget))) {- cleaned.executionTargetSelectionPolicy = 'member';+ nextAgencyConfig.executionTargetSelectionPolicy = 'member';}- nextAgencyConfig = cleaned;- }-- if (- nextAgencyConfig.executionTargetSelectionPolicy === 'fixed' &&- (!nextAgencyConfig.executionTarget ||- !['auto', 'device', 'none', 'sandbox'].includes(nextAgencyConfig.executionTarget))- ) {- nextAgencyConfig.executionTargetSelectionPolicy = 'member';- }- if (- nextAgencyConfig.executionTargetSelectionPolicy === 'fixed' &&- nextAgencyConfig.executionTarget === 'device'- ) {- if (!nextAgencyConfig.boundDeviceId) {+ if (+ nextAgencyConfig.executionTargetSelectionPolicy === 'fixed' &&+ nextAgencyConfig.executionTarget === 'device' &&+ (!nextAgencyConfig.boundDeviceId ||+ !publicDeviceIds.has(nextAgencyConfig.boundDeviceId))+ ) {nextAgencyConfig.executionTargetSelectionPolicy = 'member';- } else {- const publicDevice = await trx.query.devices.findFirst({- columns: { deviceId: true },- where: and(- eq(devices.workspaceId, targetWorkspaceId),- eq(devices.deviceId, nextAgencyConfig.boundDeviceId),- eq(devices.visibility, 'public'),- ),- });- if (!publicDevice) nextAgencyConfig.executionTargetSelectionPolicy = 'member';}++ resolvedAgencyConfigs.set(agent.id, nextAgencyConfig);}}- // 4. Update the agent record.+ // 4. Update the agent records. slug / agencyConfig differ per agent, so+ // these are per-row PK updates (cheap); the large cascaded tables+ // below are still one bulk UPDATE each.// Only apply visibility when moving into a workspace — visibility is// a no-op in personal scope where every row is implicitly private.// `sessionGroupId` is cleared because sidebar folders belong to the@@ -1529,27 +1602,31 @@ export class AgentModel {// a stale reference would orphan the agent out of the target sidebar.const visibilityUpdate =targetWorkspaceId && targetVisibility ? { visibility: targetVisibility } : {};- await trx- .update(agents)- .set({- ...ownershipUpdate,- ...visibilityUpdate,- agencyConfig: nextAgencyConfig,- sessionGroupId: null,- slug,- // A scope transfer does not make the agent's content newer. Keep the- // original recency so home/search ordering is not reshuffled.- updatedAt: agents.updatedAt,- })- .where(eq(agents.id, agentId));+ for (const agent of foundAgents) {+ await trx+ .update(agents)+ .set({+ ...ownershipUpdate,+ ...visibilityUpdate,+ agencyConfig: targetWorkspaceId+ ? (resolvedAgencyConfigs.get(agent.id) ?? null)+ : (agent.agencyConfig ?? null),+ sessionGroupId: null,+ slug: resolvedSlugs.get(agent.id) ?? agent.slug,+ // A scope transfer does not make the agent's content newer. Keep the+ // original recency so home/search ordering is not reshuffled.+ updatedAt: agents.updatedAt,+ })+ .where(eq(agents.id, agent.id));+ }// 5. Update sessions linked via agentsToSessionsconst links = await trx.select({ sessionId: agentsToSessions.sessionId }).from(agentsToSessions)- .where(eq(agentsToSessions.agentId, agentId));+ .where(inArray(agentsToSessions.agentId, agentIds));- const sessionIds = links.map((l) => l.sessionId);+ const sessionIds = [...new Set(links.map((l) => l.sessionId))];if (sessionIds.length > 0) {// `groupId` is cleared for the same reason as the agent's@@ -1563,13 +1640,13 @@ export class AgentModel {await trx.update(agentsToSessions).set(ownershipUpdate)- .where(eq(agentsToSessions.agentId, agentId));+ .where(inArray(agentsToSessions.agentId, agentIds));// 6. Update topics (linked via sessionId or agentId)const topicCondition =sessionIds.length > 0- ? or(inArray(topics.sessionId, sessionIds), eq(topics.agentId, agentId))- : eq(topics.agentId, agentId);+ ? or(inArray(topics.sessionId, sessionIds), inArray(topics.agentId, agentIds))+ : inArray(topics.agentId, agentIds);await trx.update(topics).set({ ...ownershipUpdate, updatedAt: topics.updatedAt })@@ -1578,8 +1655,8 @@ export class AgentModel {// 7. Update messages (linked via sessionId or agentId)const messageCondition =sessionIds.length > 0- ? or(inArray(messages.sessionId, sessionIds), eq(messages.agentId, agentId))- : eq(messages.agentId, agentId);+ ? or(inArray(messages.sessionId, sessionIds), inArray(messages.agentId, agentIds))+ : inArray(messages.agentId, agentIds);await trx.update(messages).set({ ...ownershipUpdate, updatedAt: messages.updatedAt })@@ -1589,27 +1666,27 @@ export class AgentModel {await trx.update(threads).set({ ...ownershipUpdate, updatedAt: threads.updatedAt })- .where(eq(threads.agentId, agentId));+ .where(inArray(threads.agentId, agentIds));// 9. Update agent files associationsawait trx.update(agentsFiles).set({ ...ownershipUpdate, updatedAt: agentsFiles.updatedAt })- .where(eq(agentsFiles.agentId, agentId));+ .where(inArray(agentsFiles.agentId, agentIds));// 10. Update agent knowledge base associationsawait trx.update(agentsKnowledgeBases).set({ ...ownershipUpdate, updatedAt: agentsKnowledgeBases.updatedAt })- .where(eq(agentsKnowledgeBases.agentId, agentId));+ .where(inArray(agentsKnowledgeBases.agentId, agentIds));// 11. Update agent cron jobsawait trx.update(agentCronJobs).set({ ...ownershipUpdate, updatedAt: agentCronJobs.updatedAt })- .where(eq(agentCronJobs.agentId, agentId));+ .where(inArray(agentCronJobs.agentId, agentIds));- // 12. Update tasks assigned to or created by this agent. The scheduled+ // 12. Update tasks assigned to or created by these agents. The scheduled// task dispatcher uses `createdByUserId` as the execution owner, so tasks// must move with the agent instead of staying under the old owner.// Visibility is cascaded to tasks and child rows so a `private` transfer@@ -1625,7 +1702,9 @@ export class AgentModel {workspaceId: targetWorkspaceId,...visibilityUpdate,})- .where(or(eq(tasks.assigneeAgentId, agentId), eq(tasks.createdByAgentId, agentId)))+ .where(+ or(inArray(tasks.assigneeAgentId, agentIds), inArray(tasks.createdByAgentId, agentIds)),+ ).returning({ id: tasks.id });const movedTaskIds = movedTasks.map((task) => task.id);@@ -1649,18 +1728,21 @@ export class AgentModel {await trx.update(briefs).set(ownershipUpdate).where(inArray(briefs.taskId, movedTaskIds));}- await trx.update(briefs).set(ownershipUpdate).where(eq(briefs.agentId, agentId));+ await trx.update(briefs).set(ownershipUpdate).where(inArray(briefs.agentId, agentIds));// 13. Update agent bot providers (transfer, not delete)await trx.update(agentBotProviders).set({ ...ownershipUpdate, updatedAt: agentBotProviders.updatedAt })- .where(eq(agentBotProviders.agentId, agentId));+ .where(inArray(agentBotProviders.agentId, agentIds));// 14. Remove chat group associations (groups belong to source workspace context)- await trx.delete(chatGroupsAgents).where(eq(chatGroupsAgents.agentId, agentId));+ await trx.delete(chatGroupsAgents).where(inArray(chatGroupsAgents.agentId, agentIds));- return { agentId, slug };+ return agentIds.map((id) => ({+ agentId: id,+ slug: resolvedSlugs.get(id) ?? agentById.get(id)?.slug ?? null,+ }));});};}diff --git a/packages/database/src/models/workspaceUserSettings.ts b/packages/database/src/models/workspaceUserSettings.tsindex 29890dc96bc..102f9d799a8 100644--- a/packages/database/src/models/workspaceUserSettings.ts+++ b/packages/database/src/models/workspaceUserSettings.ts@@ -92,6 +92,14 @@ export class WorkspaceUserSettingsModel {},}: {}),+ ...(patch.agentModeOverrides+ ? {+ agentModeOverrides: {+ ...current.agentModeOverrides,+ ...patch.agentModeOverrides,+ },+ }+ : {}),};const [row] = await this.db.insert(workspaceUserSettings)diff --git a/packages/database/src/repositories/home/__tests__/privatePinned.test.ts b/packages/database/src/repositories/home/__tests__/privatePinned.test.tsnew file mode 100644index 00000000000..1d01638964b--- /dev/null+++ b/packages/database/src/repositories/home/__tests__/privatePinned.test.ts@@ -0,0 +1,85 @@+// Regression: pinning a workspace-private agent must NOT move it into the+// shared `pinned` bucket (rendered under the public/Workspace section) — it+// should surface in `privatePinned` so the sidebar keeps it inside the+// Private section.+import { afterEach, beforeEach, describe, expect, it } from 'vitest';++import { getTestDB } from '../../../core/getTestDB';+import { AgentModel } from '../../../models/agent';+import * as Schema from '../../../schemas';+import { HomeRepository } from '../index';++const clientDB = await getTestDB();++const creator = 'u-creator';+const ws = 'ws-1';++beforeEach(async () => {+ await clientDB.delete(Schema.users);+ await clientDB.delete(Schema.workspaces);+ await clientDB.insert(Schema.users).values([{ id: creator }]);+ await clientDB.insert(Schema.workspaces).values({+ id: ws,+ name: 'WS',+ primaryOwnerId: creator,+ slug: 'ws-1',+ });+});++afterEach(async () => {+ await clientDB.delete(Schema.users);+ await clientDB.delete(Schema.workspaces);+});++describe('workspace private pinned bucket', () => {+ it('pinned private agent goes to privatePinned, not the public pinned bucket', async () => {+ const agentModel = new AgentModel(clientDB, creator, ws);++ const agent = await agentModel.create({+ systemRole: '',+ title: 'Private Agent',+ visibility: 'private',+ } as any);+ await agentModel.update(agent.id, { pinned: true });++ const result = await new HomeRepository(clientDB, creator, ws).getSidebarAgentList();++ expect(result.privatePinned.map((a) => a.id)).toContain(agent.id);+ expect(result.pinned.map((a) => a.id)).not.toContain(agent.id);+ expect(result.privateUngrouped.map((a) => a.id)).not.toContain(agent.id);+ });++ it('pinned public agent stays in the public pinned bucket', async () => {+ const agentModel = new AgentModel(clientDB, creator, ws);++ const agent = await agentModel.create({+ systemRole: '',+ title: 'Public Agent',+ visibility: 'public',+ } as any);+ await agentModel.update(agent.id, { pinned: true });++ const result = await new HomeRepository(clientDB, creator, ws).getSidebarAgentList();++ expect(result.pinned.map((a) => a.id)).toContain(agent.id);+ expect(result.privatePinned).toHaveLength(0);+ });++ it('personal mode keeps all pinned agents in the public pinned bucket', async () => {+ // No workspace scope: `visibility = private` rows are normalized to public,+ // so privatePinned must stay empty and the item lands in `pinned`.+ const agentModel = new AgentModel(clientDB, creator);++ const agent = await agentModel.create({+ systemRole: '',+ title: 'Personal Agent',+ visibility: 'private',+ } as any);+ await agentModel.update(agent.id, { pinned: true });++ const result = await new HomeRepository(clientDB, creator).getSidebarAgentList();++ expect(result.pinned.map((a) => a.id)).toContain(agent.id);+ expect(result.privatePinned).toEqual([]);+ });+});diff --git a/packages/database/src/repositories/home/index.ts b/packages/database/src/repositories/home/index.tsindex 38ad633eafc..ad5ae1e0003 100644--- a/packages/database/src/repositories/home/index.ts+++ b/packages/database/src/repositories/home/index.ts@@ -316,9 +316,11 @@ export class HomeRepository {allItems.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());// Categorize: pinned / grouped / ungrouped, split by visibility. Pinned- // items always bubble to the top regardless of visibility so the user can- // surface their own private agents without leaving them buried.+ // wins over grouping, but stays within its visibility bucket — a pinned+ // private agent must surface at the top of the Private section, not jump+ // into the shared (public) pinned list.const pinned: SidebarAgentItem[] = [];+ const privatePinned: SidebarAgentItem[] = [];const ungrouped: SidebarAgentItem[] = [];const privateUngrouped: SidebarAgentItem[] = [];const groupedMap = new Map<string, SidebarAgentItem[]>();@@ -340,7 +342,7 @@ export class HomeRepository {const cleanedItem = cleanObject(sidebarItem) as SidebarAgentItem;if (item.pinned) {- pinned.push(cleanedItem);+ (isPrivate ? privatePinned : pinned).push(cleanedItem);continue;}@@ -375,7 +377,7 @@ export class HomeRepository {});}- return { groups, pinned, privateGroups, privateUngrouped, ungrouped };+ return { groups, pinned, privateGroups, privatePinned, privateUngrouped, ungrouped };}/**diff --git a/packages/locales/src/default/chat.ts b/packages/locales/src/default/chat.tsindex 41f7027e203..8bf5b220837 100644--- a/packages/locales/src/default/chat.ts+++ b/packages/locales/src/default/chat.ts@@ -492,10 +492,10 @@ export default {'input.inputCompletionError.title': 'Input suggestions paused','input.modelUnavailable':'The current model is no longer available. Choose another model to continue.',- 'input.viewOnlyAgent':- 'You have view-only access to this agent, so messages cannot be sent. Ask the creator or a workspace owner for access.',- 'input.viewOnlyGroup':- 'You have view-only access to this group, so messages cannot be sent. Ask the creator or a workspace owner for access.',+ 'input.useOnlyAgent': 'You can only use this agent',+ 'input.useOnlyGroup': 'You can only use this group',+ 'input.viewOnlyAgent': 'You can only view this agent',+ 'input.viewOnlyGroup': 'You can only view this group','input.heteroPlus.tooltip': 'Formatting and scheduling','input.more': 'More','input.schedule.cancel': 'Cancel',diff --git a/packages/locales/src/default/messenger.ts b/packages/locales/src/default/messenger.tsindex 4074ff7e9ea..c59f98758e8 100644--- a/packages/locales/src/default/messenger.ts+++ b/packages/locales/src/default/messenger.ts@@ -158,6 +158,26 @@ export default {'messenger.wechat.paidDescription':'WeChat System Bot is available on paid personal plans. Upgrade to connect and run it.','messenger.wechat.paidTitle': 'Upgrade to connect WeChat',+ 'messenger.wechat.push.description':+ 'WeChat only lets the bot message you inside a send window — reply anything to the bot in WeChat to reset it to {{max}} sends / 24 hours.',+ 'messenger.wechat.push.expiresIn': 'expires in {{value}}',+ 'messenger.wechat.push.loadFailed': 'Could not load the send window status.',+ 'messenger.wechat.push.placeholder': 'Write a message to push to your WeChat…',+ 'messenger.wechat.push.unlinkedToast':+ 'Your WeChat link is unavailable — rescan the QR code to reconnect.',+ 'messenger.wechat.push.queued':+ '{{count}} queued message(s) will be delivered automatically after you message the bot in WeChat.',+ 'messenger.wechat.push.queuedToast':+ 'The send window is closed — your message is queued. Say anything to the bot in WeChat to receive it.',+ 'messenger.wechat.push.sectionTitle': 'Message Push',+ 'messenger.wechat.push.send': 'Send to WeChat',+ 'messenger.wechat.push.sentToast': 'Pushed to WeChat ({{remaining}} sends left in this window).',+ 'messenger.wechat.push.title': 'Proactive push',+ 'messenger.wechat.push.unavailableToast':+ 'Push is temporarily unavailable. Please try again later.',+ 'messenger.wechat.push.windowClosed': 'Send window closed',+ 'messenger.wechat.push.windowClosedHint': 'Send any message to the bot in WeChat to open it.',+ 'messenger.wechat.push.windowOpen': 'Send window open','messenger.wechat.qr.expired': 'This QR code expired. Generate a new one to continue.','messenger.wechat.qr.scanned': 'Scanned. Confirm the connection in WeChat.','messenger.wechat.qr.tip':diff --git a/packages/types/src/agent/agencyConfig.test.ts b/packages/types/src/agent/agencyConfig.test.tsindex 8a41c40a66d..1f7ce8589c4 100644--- a/packages/types/src/agent/agencyConfig.test.ts+++ b/packages/types/src/agent/agencyConfig.test.ts@@ -10,6 +10,7 @@ import {HETEROGENEOUS_AGENT_DEFAULT_SELECTION,pruneWorkingDirByDeviceDeletes,resolveAgencyConfig,+ resolveAgentAgencyConfig,resolveClaudeCodeModel,resolveClaudeCodeReasoningEffort,resolveCodexModel,@@ -539,3 +540,49 @@ describe('resolveAgencyConfig', () => {});});});++describe('resolveAgentAgencyConfig', () => {+ it('applies the fixed member policy to a public Workspace Agent', () => {+ const shared = {+ boundDeviceId: 'shared-device',+ executionTarget: 'device' as const,+ executionTargetSelectionPolicy: 'fixed' as const,+ };++ expect(+ resolveAgentAgencyConfig(+ shared,+ { boundDeviceId: 'member-device', executionTarget: 'local' },+ { visibility: 'public', workspaceId: 'workspace-1' },+ ),+ ).toEqual(shared);+ });++ it('ignores member policy and overrides while a Workspace Agent is private', () => {+ expect(+ resolveAgentAgencyConfig(+ {+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ { boundDeviceId: 'stale-member-device', executionTarget: 'local' },+ { visibility: 'private', workspaceId: 'workspace-1' },+ ),+ ).toEqual({ boundDeviceId: 'owner-device', executionTarget: 'device' });+ });++ it('ignores member policy and overrides for an author or Workspace admin', () => {+ expect(+ resolveAgentAgencyConfig(+ {+ boundDeviceId: 'shared-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ { boundDeviceId: 'member-device', executionTarget: 'local' },+ { canManage: true, visibility: 'public', workspaceId: 'workspace-1' },+ ),+ ).toEqual({ boundDeviceId: 'shared-device', executionTarget: 'device' });+ });+});diff --git a/packages/types/src/agent/agencyConfig.ts b/packages/types/src/agent/agencyConfig.tsindex 2bcf1fc058c..7f0cbf102ab 100644--- a/packages/types/src/agent/agencyConfig.ts+++ b/packages/types/src/agent/agencyConfig.ts@@ -602,8 +602,8 @@ export type ExecutionTargetSelectionPolicy = 'fixed' | 'member';* Controls whether a workspace agent always uses its shared model or lets* each member choose a personal model for that agent.*- * Missing values intentionally resolve to `fixed` for backwards- * compatibility: existing shared agents keep the model their author chose.+ * Missing values resolve contextually: public Workspace Agents inherit the+ * current `member` default, while personal/private Agents remain fixed.*/export type AgentModelSelectionPolicy = 'fixed' | 'member';@@ -632,9 +632,10 @@ export interface LobeAgentAgencyConfig {executionTargetSelectionPolicy?: ExecutionTargetSelectionPolicy;heterogeneousProvider?: HeterogeneousProviderConfig;/**- * Workspace model-selection policy. `fixed` (and an omitted value) keeps- * the shared agent model authoritative; `member` enables a per-user model- * override stored in `workspace_user_settings.preference`.+ * Workspace model-selection policy. `fixed` keeps the shared agent model+ * authoritative; `member` enables a per-user model override stored in+ * `workspace_user_settings.preference`. Missing values on public Workspace+ * Agents resolve to `member` for legacy rows.*/modelSelectionPolicy?: AgentModelSelectionPolicy;/**@@ -682,13 +683,13 @@ export interface LobeAgentAgencyConfig {/*** Explicit defaults written when a workspace agent is created.*- * The values intentionally differ: the shared model stays authoritative by- * default, while each member may choose their own execution environment.- * Runtime fallbacks for legacy rows without these fields remain unchanged.+ * Members may choose their own model and execution environment by default.+ * Legacy public Workspace rows without a model policy resolve to the same+ * `member` default at runtime.*/export const DEFAULT_WORKSPACE_AGENT_SELECTION_POLICIES = {executionTargetSelectionPolicy: 'member',- modelSelectionPolicy: 'fixed',+ modelSelectionPolicy: 'member',} as const satisfies Pick<LobeAgentAgencyConfig,'executionTargetSelectionPolicy' | 'modelSelectionPolicy'@@ -731,6 +732,38 @@ export const resolveAgencyConfig = (};};+export interface AgentAgencyConfigContext {+ /** Author/admin callers manage the shared config instead of using member overrides. */+ canManage?: boolean;+ visibility?: 'private' | 'public';+ workspaceId?: string | null;+}++/**+ * Resolve an Agent's effective agency config in its ownership context.+ *+ * Member execution-target policies and overrides apply only after a Workspace+ * Agent is public. A Private Agent remains owner-configurable: its shared+ * execution target is used directly, while the stored selection policy is+ * retained only as the policy that will take effect if the Agent is published.+ */+export const resolveAgentAgencyConfig = (+ agencyConfig: LobeAgentAgencyConfig | null | undefined,+ override: Pick<LobeAgentAgencyConfig, 'boundDeviceId' | 'executionTarget'> | null | undefined,+ context: AgentAgencyConfigContext,+): LobeAgentAgencyConfig | undefined => {+ const isPublicWorkspaceAgent =+ !!context.workspaceId && context.visibility !== 'private' && context.canManage !== true;++ if (isPublicWorkspaceAgent) return resolveAgencyConfig(agencyConfig, override);++ const base = agencyConfig ?? undefined;+ if (!base?.executionTargetSelectionPolicy) return base;++ const { executionTargetSelectionPolicy, ...ownerConfig } = base;+ return executionTargetSelectionPolicy ? ownerConfig : base;+};+/*** Apply "undefined means delete" semantics to a `workingDirByDevice` patch.*diff --git a/packages/types/src/agent/modelSelection.test.ts b/packages/types/src/agent/modelSelection.test.tsindex d0043dd08d6..7c048d3b824 100644--- a/packages/types/src/agent/modelSelection.test.ts+++ b/packages/types/src/agent/modelSelection.test.ts@@ -1,26 +1,53 @@import { describe, expect, it } from 'vitest';-import { resolveAgentModelConfig } from './modelSelection';+import { resolveAgentModelConfig, resolveAgentModelSelectionPolicy } from './modelSelection';const shared = {model: 'shared-model',provider: 'shared-provider',};+const workspaceShared = {+ ...shared,+ visibility: 'public' as const,+ workspaceId: 'workspace-1',+};++describe('resolveAgentModelSelectionPolicy', () => {+ it('defaults a legacy public Workspace Agent to member selection', () => {+ expect(resolveAgentModelSelectionPolicy(workspaceShared)).toBe('member');+ });++ it('keeps personal and private Agents fixed when the policy is missing', () => {+ expect(resolveAgentModelSelectionPolicy({ workspaceId: null })).toBe('fixed');+ expect(resolveAgentModelSelectionPolicy({ ...workspaceShared, visibility: 'private' })).toBe(+ 'fixed',+ );+ });++ it('preserves an explicit fixed policy for a public Workspace Agent', () => {+ expect(+ resolveAgentModelSelectionPolicy({+ ...workspaceShared,+ agencyConfig: { modelSelectionPolicy: 'fixed' },+ }),+ ).toBe('fixed');+ });+});describe('resolveAgentModelConfig', () => {- it('treats a missing policy as fixed for existing workspace agents', () => {+ it('uses a member override for a legacy public Workspace Agent', () => {expect(- resolveAgentModelConfig(shared, {+ resolveAgentModelConfig(workspaceShared, {model: 'member-model',provider: 'member-provider',}),- ).toEqual({ model: 'shared-model', provider: 'shared-provider' });+ ).toEqual({ model: 'member-model', provider: 'member-provider' });});it('ignores a retained member override while the policy is fixed', () => {expect(resolveAgentModelConfig(- { ...shared, agencyConfig: { modelSelectionPolicy: 'fixed' } },+ { ...workspaceShared, agencyConfig: { modelSelectionPolicy: 'fixed' } },{ model: 'member-model', provider: 'member-provider' },),).toEqual({ model: 'shared-model', provider: 'shared-provider' });@@ -29,12 +56,25 @@ describe('resolveAgentModelConfig', () => {it('uses the member override when the author allows member selection', () => {expect(resolveAgentModelConfig(- { ...shared, agencyConfig: { modelSelectionPolicy: 'member' } },+ { ...workspaceShared, agencyConfig: { modelSelectionPolicy: 'member' } },{ model: 'member-model', provider: 'member-provider' },),).toEqual({ model: 'member-model', provider: 'member-provider' });});+ it('ignores member overrides for an author or Workspace admin', () => {+ expect(+ resolveAgentModelConfig(+ {+ ...workspaceShared,+ agencyConfig: { modelSelectionPolicy: 'member' },+ canManage: true,+ },+ { model: 'member-model', provider: 'member-provider' },+ ),+ ).toEqual({ model: 'shared-model', provider: 'shared-provider' });+ });+it('ignores the member override while the workspace Agent is private', () => {expect(resolveAgentModelConfig(@@ -42,6 +82,7 @@ describe('resolveAgentModelConfig', () => {...shared,agencyConfig: { modelSelectionPolicy: 'member' },visibility: 'private',+ workspaceId: 'workspace-1',},{ model: 'member-model', provider: 'member-provider' },),@@ -53,6 +94,8 @@ describe('resolveAgentModelConfig', () => {resolveAgentModelConfig({...shared,agencyConfig: { modelSelectionPolicy: 'member' },+ visibility: 'public',+ workspaceId: 'workspace-1',}),).toEqual({ model: 'shared-model', provider: 'shared-provider' });});@@ -60,7 +103,7 @@ describe('resolveAgentModelConfig', () => {it('applies explicit per-run overrides after the member choice', () => {expect(resolveAgentModelConfig(- { ...shared, agencyConfig: { modelSelectionPolicy: 'member' } },+ { ...workspaceShared, agencyConfig: { modelSelectionPolicy: 'member' } },{ model: 'member-model', provider: 'member-provider' },{ model: 'run-model' },),diff --git a/packages/types/src/agent/modelSelection.ts b/packages/types/src/agent/modelSelection.tsindex 5db1915ca98..82524efcd87 100644--- a/packages/types/src/agent/modelSelection.ts+++ b/packages/types/src/agent/modelSelection.ts@@ -1,4 +1,4 @@-import type { LobeAgentAgencyConfig } from './agencyConfig';+import type { AgentModelSelectionPolicy, LobeAgentAgencyConfig } from './agencyConfig';/** A workspace member's personal model choice for one shared agent. */export interface AgentModelOverride {@@ -8,11 +8,31 @@ export interface AgentModelOverride {export interface AgentModelConfig {agencyConfig?: Pick<LobeAgentAgencyConfig, 'modelSelectionPolicy'>;+ /** Author/admin callers use the shared model and ignore member overrides. */+ canManage?: boolean;model: string;provider?: string;visibility?: 'private' | 'public';+ workspaceId?: string | null;}+/**+ * Resolve the model-selection policy for an Agent in its ownership context.+ *+ * Legacy public Workspace Agents predate the persisted policy. They inherit+ * the current Workspace default (`member`), while personal/private Agents keep+ * the shared model and an explicit `fixed` policy always remains authoritative.+ */+export const resolveAgentModelSelectionPolicy = (+ shared: Pick<AgentModelConfig, 'agencyConfig' | 'visibility' | 'workspaceId'>,+): AgentModelSelectionPolicy => {+ const isPublicWorkspaceAgent = !!shared.workspaceId && shared.visibility !== 'private';++ if (!isPublicWorkspaceAgent) return 'fixed';++ return shared.agencyConfig?.modelSelectionPolicy ?? 'member';+};+/*** Resolve the model used by an agent run.*@@ -21,9 +41,8 @@ export interface AgentModelConfig {** explicit per-run override > allowed member override > shared agent model.*- * An omitted policy is fixed. A member override is therefore dormant (but- * retained) while fixed and becomes effective again when the author reopens- * member selection.+ * A member override is dormant (but retained) while fixed and becomes+ * effective again when the author reopens member selection.*/export const resolveAgentModelConfig = (shared: AgentModelConfig,@@ -31,7 +50,7 @@ export const resolveAgentModelConfig = (explicitOverride?: Partial<AgentModelOverride> | null,): Pick<AgentModelConfig, 'model' | 'provider'> => {const effectiveMemberOverride =- shared.visibility !== 'private' && shared.agencyConfig?.modelSelectionPolicy === 'member'+ shared.canManage !== true && resolveAgentModelSelectionPolicy(shared) === 'member'? memberOverride: undefined;diff --git a/packages/types/src/home.ts b/packages/types/src/home.tsindex 2373ca97071..88e54e465cd 100644--- a/packages/types/src/home.ts+++ b/packages/types/src/home.ts@@ -104,6 +104,12 @@ export interface SidebarAgentListResponse {* `visibility = 'private'`. Empty array in personal mode.*/privateGroups: SidebarGroup[];+ /**+ * Workspace-only: pinned agents/chat groups owned by the current user with+ * `visibility = 'private'`. Kept out of {@link pinned} so the sidebar can+ * render them inside the Private section. Empty array in personal mode.+ */+ privatePinned: SidebarAgentItem[];/*** Workspace-only: ungrouped private agents/chat groups owned by the current* user. Empty array in personal mode.diff --git a/packages/types/src/user/preference.ts b/packages/types/src/user/preference.tsindex 3512b331171..2efa77f5a26 100644--- a/packages/types/src/user/preference.ts+++ b/packages/types/src/user/preference.ts@@ -49,6 +49,8 @@ export interface WorkspaceUserPreference {agentDeviceOverrides?: Record<string /* agentId */, AgentDeviceOverride>;/** Personal model choices for workspace agents that allow member selection. */agentModelOverrides?: Record<string /* agentId */, AgentModelOverride>;+ /** Per-member Agent/Chat runtime mode for shared workspace agents. */+ agentModeOverrides?: Record<string /* agentId */, boolean>;}export interface LobeUser {diff --git a/src/features/AgentTaskManager/AgentSelectorAction.test.tsx b/src/features/AgentTaskManager/AgentSelectorAction.test.tsxindex ad0476793cf..d88b9bbcfab 100644--- a/src/features/AgentTaskManager/AgentSelectorAction.test.tsx+++ b/src/features/AgentTaskManager/AgentSelectorAction.test.tsx@@ -30,6 +30,7 @@ const mocks = vi.hoisted(() => ({isAgentListInit: true,pinnedAgents: [] as any[],privateAgentGroups: [] as any[],+ privatePinnedAgents: [] as any[],privateUngroupedAgents: [] as any[],ungroupedAgents: [{ id: 'agt_custom', title: 'Custom Agent', type: 'agent' },diff --git a/src/features/AgentTaskManager/AgentSelectorAction.tsx b/src/features/AgentTaskManager/AgentSelectorAction.tsxindex 1b3e3077696..067d672dafc 100644--- a/src/features/AgentTaskManager/AgentSelectorAction.tsx+++ b/src/features/AgentTaskManager/AgentSelectorAction.tsx@@ -57,6 +57,7 @@ const AgentSelectorAction = memo<AgentSelectorActionProps>(({ onAgentChange }) =const agentGroups = useHomeStore(homeAgentListSelectors.agentGroups, isEqual);const ungroupedAgents = useHomeStore(homeAgentListSelectors.ungroupedAgents, isEqual);const privateAgentGroups = useHomeStore(homeAgentListSelectors.privateAgentGroups, isEqual);+ const privatePinnedAgents = useHomeStore(homeAgentListSelectors.privatePinnedAgents, isEqual);const privateUngroupedAgents = useHomeStore(homeAgentListSelectors.privateUngroupedAgents,isEqual,@@ -97,8 +98,10 @@ const AgentSelectorAction = memo<AgentSelectorActionProps>(({ onAgentChange }) =const privateAgents = useMemo<SidebarAgentItem[]>(() => {const groupedItems = privateAgentGroups.flatMap((group) => group.items);- return [...groupedItems, ...privateUngroupedAgents].filter((agent) => agent.type === 'agent');- }, [privateAgentGroups, privateUngroupedAgents]);+ return [...privatePinnedAgents, ...groupedItems, ...privateUngroupedAgents].filter(+ (agent) => agent.type === 'agent',+ );+ }, [privateAgentGroups, privatePinnedAgents, privateUngroupedAgents]);const activeAgent = useMemo(() => [...privateAgents, ...workspaceAgents].find((agent) => agent.id === agentId),diff --git a/src/features/AgentTasks/features/AssigneeAgentSelector.tsx b/src/features/AgentTasks/features/AssigneeAgentSelector.tsxindex eb655d8d804..0a0d3b65bb2 100644--- a/src/features/AgentTasks/features/AssigneeAgentSelector.tsx+++ b/src/features/AgentTasks/features/AssigneeAgentSelector.tsx@@ -75,6 +75,7 @@ const AssigneeAgentSelector = memo<AssigneeAgentSelectorProps>(const agentGroups = useHomeStore(homeAgentListSelectors.agentGroups, isEqual);const ungroupedAgents = useHomeStore(homeAgentListSelectors.ungroupedAgents, isEqual);const privateAgentGroups = useHomeStore(homeAgentListSelectors.privateAgentGroups, isEqual);+ const privatePinnedAgents = useHomeStore(homeAgentListSelectors.privatePinnedAgents, isEqual);const privateUngroupedAgents = useHomeStore(homeAgentListSelectors.privateUngroupedAgents,isEqual,@@ -119,8 +120,10 @@ const AssigneeAgentSelector = memo<AssigneeAgentSelectorProps>(const privateAgents = useMemo<SidebarAgentItem[]>(() => {const groupedItems = privateAgentGroups.flatMap((group) => group.items);- return [...groupedItems, ...privateUngroupedAgents].filter((agent) => agent.type === 'agent');- }, [privateAgentGroups, privateUngroupedAgents]);+ return [...privatePinnedAgents, ...groupedItems, ...privateUngroupedAgents].filter(+ (agent) => agent.type === 'agent',+ );+ }, [privateAgentGroups, privatePinnedAgents, privateUngroupedAgents]);const filteredPrivate = useMemo(() => {const q = search.trim().toLowerCase();diff --git a/src/features/ChatInput/ActionBar/AgentMode/index.tsx b/src/features/ChatInput/ActionBar/AgentMode/index.tsxindex 687730a94be..3f320bb30cc 100644--- a/src/features/ChatInput/ActionBar/AgentMode/index.tsx+++ b/src/features/ChatInput/ActionBar/AgentMode/index.tsx@@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next';import { useBusinessAgentModeSync } from '@/business/client/hooks/useBusinessAgentMode';import { useAgentId } from '@/features/ChatInput/hooks/useAgentId';+import { useChatInputResourceAccess } from '@/features/ChatInput/hooks/useChatInputResourceAccess';import { useEffectiveAgentMode } from '@/features/ChatInput/hooks/useEffectiveAgentMode';import { useToggleAgentMode } from '@/features/ChatInput/hooks/useToggleAgentMode';import { usePermission } from '@/hooks/usePermission';@@ -138,29 +139,34 @@ const AgentMode = memo(() => {useBusinessAgentModeSync(agentId);const [open, setOpen] = useState(false);const { allowed: canCreateContent, reason } = usePermission('create_content');+ const { canUseResource, isAccessLoading, isGroupContext } = useChatInputResourceAccess();- const { canSelectAgentMode, currentMode, isAgentModeUnavailable } =+ const { canSelectAgentMode, currentMode, isAgentModeUnavailable, isPreferenceLoading } =useEffectiveAgentMode(agentId);+ const disabled = !canCreateContent || !canUseResource;+ const disabledReason = !canCreateContent+ ? reason+ : t(isGroupContext ? 'input.viewOnlyGroup' : 'input.viewOnlyAgent');const CurrentIcon = currentMode === 'agent' ? InfinityIcon : MessageCircleIcon;const handleSelect = useCallback(async (mode: 'chat' | 'agent') => {- if (!canCreateContent) return;+ if (disabled) return;if (mode === 'agent' && !canSelectAgentMode) return;setOpen(false);await toggleAgentMode(mode === 'agent');},- [canCreateContent, canSelectAgentMode, toggleAgentMode],+ [canSelectAgentMode, disabled, toggleAgentMode],);const handleOpenChange = useCallback((nextOpen: boolean) => {- if (!canCreateContent) return;+ if (disabled) return;setOpen(nextOpen);},- [canCreateContent],+ [disabled],);const agentTooltip = (@@ -236,16 +242,18 @@ const AgentMode = memo(() => {);const button = (- <div className={cx(styles.button, !canCreateContent && styles.buttonDisabled)}>+ <div className={cx(styles.button, disabled && styles.buttonDisabled)}><Icon icon={CurrentIcon} size={14} /><span>{t(`chatMode.${currentMode}`)}</span><Icon icon={ChevronDownIcon} size={12} /></div>);- if (!canCreateContent)+ if (isAccessLoading || isPreferenceLoading) return null;++ if (disabled)return (- <Tooltip title={reason}>+ <Tooltip title={disabledReason}><div>{button}</div></Tooltip>);@@ -254,7 +262,7 @@ const AgentMode = memo(() => {<PopoverclassName={styles.popoverPopup}content={popoverContent}- open={canCreateContent && open}+ open={!disabled && open}placement="bottomLeft"trigger="click"styles={{diff --git a/src/features/ChatInput/ActionBar/Model/index.tsx b/src/features/ChatInput/ActionBar/Model/index.tsxindex b7c778fdedf..392e2c9aa07 100644--- a/src/features/ChatInput/ActionBar/Model/index.tsx+++ b/src/features/ChatInput/ActionBar/Model/index.tsx@@ -2,67 +2,60 @@ import { ModelIcon } from '@lobehub/icons';import { Center, Tooltip } from '@lobehub/ui';import { createStaticStyles, cx } from 'antd-style';import { memo, useCallback } from 'react';-import { useTranslation } from 'react-i18next';import ModelSwitchPanel from '@/features/ModelSwitchPanel';-import { usePermission } from '@/hooks/usePermission';+import { aiModelSelectors, useAiInfraStore } from '@/store/aiInfra';import { useChatStore } from '@/store/chat';import { topicSelectors } from '@/store/chat/slices/topic/selectors';import { useAgentId } from '../../hooks/useAgentId';import { useAgentModelSelection } from '../../hooks/useAgentModelSelection';-import { useChatInputResourceAccess } from '../../hooks/useChatInputResourceAccess';import { useActionBarContext } from '../context';const styles = createStaticStyles(({ css, cssVar }) => ({icon: css`transition: scale 400ms cubic-bezier(0.215, 0.61, 0.355, 1);`,- modelDisabled: css`- cursor: not-allowed;- opacity: 0.5;+ model: css`+ cursor: pointer;+ border-radius: 24px;:hover {- background: transparent;+ background: ${cssVar.colorFillSecondary};}:active {div {- scale: 1;+ scale: 0.8;}}`,- model: css`- cursor: pointer;- border-radius: 24px;+ modelReadonly: css`+ cursor: default;:hover {- background: ${cssVar.colorFillSecondary};+ background: transparent;}:active {div {- scale: 0.8;+ scale: 1;}}`,}));const ModelSwitch = memo(() => {- const { t } = useTranslation('setting');const { actionSize, dropdownPlacement } = useActionBarContext();const blockSize = actionSize?.blockSize ?? 32;const iconSize = actionSize?.size ?? 20;- const { allowed: canCreateContent, reason } = usePermission('create_content');- const { canConfigureResource, canUseResource, isAccessLoading } = useChatInputResourceAccess();const agentId = useAgentId();const {- isPreferenceLoading,+ canDisplayModel,+ canSelectModel,model: agentModel,provider: agentProvider,- selectionPolicy,selectModel,- usesWorkspaceMemberSelection,} = useAgentModelSelection(agentId);// Topic-scoped model: a topic pins its own model (top-level `topics.model`// column). Display the topic's pinned model when present, else the agent@@ -73,20 +66,9 @@ const ModelSwitch = memo(() => {const updateTopicModel = useChatStore((s) => s.updateTopicModel);const model = topicModel?.model ?? agentModel;const provider = topicModel?.model ? topicModel.provider : agentProvider;- const canSelectForAgent = usesWorkspaceMemberSelection- ? canUseResource && selectionPolicy === 'member'- : canConfigureResource;- const canSelectModel =- canCreateContent && canSelectForAgent && !isAccessLoading && !isPreferenceLoading;- const disabledReason = !canCreateContent- ? reason- : isAccessLoading || isPreferenceLoading- ? t('checkingPermissions')- : usesWorkspaceMemberSelection && !canUseResource- ? t('permission.accessTag.viewOnlyTip')- : usesWorkspaceMemberSelection && selectionPolicy === 'fixed'- ? t('settingAgent.modelPolicy.fixedTip')- : t('permission.accessTag.useOnlyTip');++ const enabledModel = useAiInfraStore(aiModelSelectors.getEnabledModelById(model, provider));+ const displayName = enabledModel?.displayName || model;const handleModelChange = useCallback(async (params: { model: string; provider: string }) => {@@ -101,8 +83,8 @@ const ModelSwitch = memo(() => {const trigger = (<Centeraria-disabled={!canSelectModel}- aria-label={model}- className={cx(styles.model, !canSelectModel && styles.modelDisabled)}+ aria-label={displayName}+ className={cx(styles.model, !canSelectModel && styles.modelReadonly)}height={blockSize}width={blockSize}>@@ -112,12 +94,9 @@ const ModelSwitch = memo(() => {</Center>);- if (!canSelectModel)- return (- <Tooltip title={`${model} · ${disabledReason}`}>- <div>{trigger}</div>- </Tooltip>- );+ if (!canDisplayModel) return null;++ if (!canSelectModel) return <Tooltip title={displayName}>{trigger}</Tooltip>;return (<ModelSwitchPaneldiff --git a/src/features/ChatInput/ActionBar/ModelLabel/index.tsx b/src/features/ChatInput/ActionBar/ModelLabel/index.tsxindex a2cc13d74b3..77ef8ccb3e1 100644--- a/src/features/ChatInput/ActionBar/ModelLabel/index.tsx+++ b/src/features/ChatInput/ActionBar/ModelLabel/index.tsx@@ -1,18 +1,15 @@-import { Center, Flexbox, Tooltip } from '@lobehub/ui';+import { Center, Flexbox } from '@lobehub/ui';import { createStaticStyles, cx } from 'antd-style';import { ChevronDownIcon } from 'lucide-react';import { memo, useCallback } from 'react';-import { useTranslation } from 'react-i18next';import ModelSwitchPanel from '@/features/ModelSwitchPanel';-import { usePermission } from '@/hooks/usePermission';import { aiModelSelectors, useAiInfraStore } from '@/store/aiInfra';import { useChatStore } from '@/store/chat';import { topicSelectors } from '@/store/chat/slices/topic/selectors';import { useAgentId } from '../../hooks/useAgentId';import { useAgentModelSelection } from '../../hooks/useAgentModelSelection';-import { useChatInputResourceAccess } from '../../hooks/useChatInputResourceAccess';import { useActionBarContext } from '../context';const styles = createStaticStyles(({ css, cssVar }) => ({@@ -37,28 +34,24 @@ const styles = createStaticStyles(({ css, cssVar }) => ({background: ${cssVar.colorFillTertiary};}`,- triggerDisabled: css`- cursor: not-allowed;+ triggerReadonly: css`+ cursor: default;- :hover {+ &:hover {background: transparent;}`,}));const ModelLabel = memo(() => {- const { t } = useTranslation('setting');const { dropdownPlacement } = useActionBarContext();- const { allowed: canCreateContent, reason } = usePermission('create_content');- const { canConfigureResource, canUseResource, isAccessLoading } = useChatInputResourceAccess();const agentId = useAgentId();const {- isPreferenceLoading,+ canDisplayModel,+ canSelectModel,model: agentModel,provider: agentProvider,- selectionPolicy,selectModel,- usesWorkspaceMemberSelection,} = useAgentModelSelection(agentId);// Topic-scoped model: a topic pins its own model (top-level `topics.model`// column). Display the topic's pinned model when present, else the agent@@ -69,20 +62,6 @@ const ModelLabel = memo(() => {const updateTopicModel = useChatStore((s) => s.updateTopicModel);const model = topicModel?.model ?? agentModel;const provider = topicModel?.model ? topicModel.provider : agentProvider;- const canSelectForAgent = usesWorkspaceMemberSelection- ? canUseResource && selectionPolicy === 'member'- : canConfigureResource;- const canSelectModel =- canCreateContent && canSelectForAgent && !isAccessLoading && !isPreferenceLoading;- const disabledReason = !canCreateContent- ? reason- : isAccessLoading || isPreferenceLoading- ? t('checkingPermissions')- : usesWorkspaceMemberSelection && !canUseResource- ? t('permission.accessTag.viewOnlyTip')- : usesWorkspaceMemberSelection && selectionPolicy === 'fixed'- ? t('settingAgent.modelPolicy.fixedTip')- : t('permission.accessTag.useOnlyTip');const enabledModel = useAiInfraStore(aiModelSelectors.getEnabledModelById(model, provider));const displayName = enabledModel?.displayName || model;@@ -100,25 +79,20 @@ const ModelLabel = memo(() => {const trigger = (<Centerhorizontal- aria-disabled={!canSelectModel}aria-label={displayName}- className={cx(styles.trigger, !canSelectModel && styles.triggerDisabled)}+ className={cx(styles.trigger, !canSelectModel && styles.triggerReadonly)}height={28}paddingInline={6}><Flexbox horizontal align={'center'} gap={2}><span className={styles.name}>{displayName}</span>- <ChevronDownIcon className={styles.chevron} size={12} />+ {canSelectModel ? <ChevronDownIcon className={styles.chevron} size={12} /> : null}</Flexbox></Center>);- if (!canSelectModel)- return (- <Tooltip title={disabledReason}>- <div>{trigger}</div>- </Tooltip>- );+ if (!canDisplayModel) return null;+ if (!canSelectModel) return trigger;return (<ModelSwitchPaneldiff --git a/src/features/ChatInput/ActionBar/filterChatOnlyActions.ts b/src/features/ChatInput/ActionBar/filterChatOnlyActions.tsindex d025fac4b2c..054c22c33ad 100644--- a/src/features/ChatInput/ActionBar/filterChatOnlyActions.ts+++ b/src/features/ChatInput/ActionBar/filterChatOnlyActions.ts@@ -1,6 +1,7 @@import type { ActionKey, ActionKeys } from './config';const CHAT_ONLY_ACTIONS = new Set<ActionKey>([+ 'agentMode','clear','fileUpload','history',@@ -12,22 +13,18 @@ const CHAT_ONLY_ACTIONS = new Set<ActionKey>(['typo',]);-const normalizeChatOnlyAction = (action: ActionKey): ActionKey =>- action === 'model' ? 'modelLabel' : action;-/**- * Chat-only members (no configuration access) keep attachments, formatting and- * chat operations while configuration actions are hidden. `model` degrades to- * the read-only `modelLabel`.+ * Chat-only members (no configuration access) keep runtime preferences,+ * attachments, formatting and chat operations while configuration actions are+ * hidden. `model` stays as the icon trigger — it is policy-aware and renders a+ * readonly icon when the member cannot pick a model.*/export const filterChatOnlyActions = (actions: ActionKeys[]): ActionKeys[] => {const visibleActions: ActionKeys[] = [];for (const action of actions) {if (Array.isArray(action)) {- const visibleGroup = action- .filter((item) => CHAT_ONLY_ACTIONS.has(item))- .map(normalizeChatOnlyAction);+ const visibleGroup = action.filter((item) => CHAT_ONLY_ACTIONS.has(item));if (visibleGroup.length > 0) visibleActions.push(visibleGroup);continue;}@@ -37,7 +34,7 @@ export const filterChatOnlyActions = (actions: ActionKeys[]): ActionKeys[] => {continue;}- if (CHAT_ONLY_ACTIONS.has(action)) visibleActions.push(normalizeChatOnlyAction(action));+ if (CHAT_ONLY_ACTIONS.has(action)) visibleActions.push(action);}return visibleActions;diff --git a/src/features/ChatInput/ActionBar/index.test.ts b/src/features/ChatInput/ActionBar/index.test.tsindex 0627931fc7a..b7a9c03bf84 100644--- a/src/features/ChatInput/ActionBar/index.test.ts+++ b/src/features/ChatInput/ActionBar/index.test.ts@@ -3,9 +3,10 @@ import { describe, expect, it } from 'vitest';import { filterChatOnlyActions } from './filterChatOnlyActions';describe('filterChatOnlyActions', () => {- it('keeps attachments, formatting, and chat operations while hiding configuration actions', () => {+ it('keeps runtime mode, attachments, formatting, and chat operations while hiding configuration actions', () => {expect(filterChatOnlyActions([+ 'agentMode','model','search','memory',@@ -14,11 +15,11 @@ describe('filterChatOnlyActions', () => {'---',['typo', 'params', 'clear'],]),- ).toEqual(['modelLabel', 'fileUpload', '---', ['typo', 'clear']]);+ ).toEqual(['agentMode', 'model', 'fileUpload', '---', ['typo', 'clear']]);});- it('shows the current model label instead of an icon-only selector for chat-only members', () => {- expect(filterChatOnlyActions(['model', 'plus'])).toEqual(['modelLabel', 'plus']);+ it('keeps the icon model trigger for chat-only members instead of degrading to the text label', () => {+ expect(filterChatOnlyActions(['model', 'plus'])).toEqual(['model', 'plus']);expect(filterChatOnlyActions(['modelLabel', 'plus'])).toEqual(['modelLabel', 'plus']);});});diff --git a/src/features/ChatInput/ActionBar/index.tsx b/src/features/ChatInput/ActionBar/index.tsxindex 192fbd61ca2..2e2359ea5a7 100644--- a/src/features/ChatInput/ActionBar/index.tsx+++ b/src/features/ChatInput/ActionBar/index.tsx@@ -64,7 +64,7 @@ const ActionToolbar = memo<ActionToolbarProps>(s.toggleExpandInputActionbar,]);const enableRichRender = useUserStore(labPreferSelectors.enableInputMarkdown);- const { canConfigureResource } = useChatInputResourceAccess();+ const { canConfigureResource, canShowControls } = useChatInputResourceAccess();const leftActions = useChatInputStore((s) => {const actions = s.leftActions.filter((item) => (enableRichRender ? true : item !== 'typo'));@@ -83,6 +83,8 @@ const ActionToolbar = memo<ActionToolbarProps>([borderRadius, dropdownPlacement],);+ if (!canShowControls) return null;+return (<ActionBarContext value={contextValue}><ChatInputActionsdiff --git a/src/features/ChatInput/ChatInputNotice/index.tsx b/src/features/ChatInput/ChatInputNotice/index.tsxindex ba948fb6ebe..b7191ce207e 100644--- a/src/features/ChatInput/ChatInputNotice/index.tsx+++ b/src/features/ChatInput/ChatInputNotice/index.tsx@@ -9,11 +9,15 @@ import { useChatInputNotice } from './useChatInputNotice';const styles = createStaticStyles(({ css, cssVar }) => ({alert: css`+ flex: 0 1 auto;++ /* The Alert root already flex-gaps icon and content; without zeroing the+ icon margin below the two would stack into a ~14px gap. */+ gap: 6px !important;+/* Keep the icon centered against the single-line title. */align-items: center !important;- flex: 0 1 auto;-min-width: 0;max-width: min(560px, 52vw);padding-block: 4px !important;@@ -37,10 +41,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({.ant-alert-icon {flex: none;height: 18px !important;- margin-inline-end: 6px !important;+ margin-inline-end: 0 !important;}- @media (max-width: 768px) {+ @media (width <= 768px) {max-width: 100%;}`,diff --git a/src/features/ChatInput/ChatInputNotice/useChatInputNotice.test.tsx b/src/features/ChatInput/ChatInputNotice/useChatInputNotice.test.tsxindex 0cdbc81e80b..f05b4fd9168 100644--- a/src/features/ChatInput/ChatInputNotice/useChatInputNotice.test.tsx+++ b/src/features/ChatInput/ChatInputNotice/useChatInputNotice.test.tsx@@ -35,7 +35,14 @@ const testState = vi.hoisted(() => ({isInitAiProviderRuntimeState: false,},isDesktop: false,- resourceAccess: { canUseResource: true, isGroupContext: false },+ resourceAccess: {+ canConfigureResource: true,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: false,+ },}));type StoreSelector<T = unknown, S = Record<PropertyKey, unknown>> = (state: S) => T;@@ -105,11 +112,25 @@ describe('useChatInputNotice', () => {testState.aiInfra.enabledChatModelList = [];testState.aiInfra.isInitAiProviderRuntimeState = false;testState.isDesktop = false;- testState.resourceAccess = { canUseResource: true, isGroupContext: false };+ testState.resourceAccess = {+ canConfigureResource: true,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: false,+ };});it('returns the agent view-only notice when the member lacks use access', () => {- testState.resourceAccess = { canUseResource: false, isGroupContext: false };+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: false,+ isGroupContext: false,+ isResourceGated: true,+ };const { result } = renderHook(() => useChatInputNotice());@@ -117,7 +138,14 @@ describe('useChatInputNotice', () => {});it('returns the group view-only notice in group context and outranks model notices', () => {- testState.resourceAccess = { canUseResource: false, isGroupContext: true };+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: false,+ isGroupContext: true,+ isResourceGated: true,+ };// Would produce input.modelUnavailable on its own — view-only must win.testState.aiInfra.isInitAiProviderRuntimeState = true;@@ -126,6 +154,122 @@ describe('useChatInputNotice', () => {expect(result.current).toEqual({ key: 'input.viewOnlyGroup', type: 'warning' });});+ it('returns the agent use-only notice when a gated member can use but not edit', () => {+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: true,+ };+ testState.aiInfra.isInitAiProviderRuntimeState = true;+ testState.aiInfra.enabledChatModelList = [+ { children: [{ abilities: { functionCall: true }, id: 'gpt-4o' }], id: 'openai' },+ ];++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toEqual({ key: 'input.useOnlyAgent', type: 'info' });+ });++ it('returns the group use-only notice in group context', () => {+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: true,+ isResourceGated: true,+ };+ testState.aiInfra.isInitAiProviderRuntimeState = true;+ testState.aiInfra.enabledChatModelList = [+ { children: [{ abilities: { functionCall: true }, id: 'gpt-4o' }], id: 'openai' },+ ];++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toEqual({ key: 'input.useOnlyGroup', type: 'info' });+ });++ it('lets the model warning outrank the use-only note', () => {+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: true,+ };+ // selected model absent from the chat selector → modelUnavailable wins+ testState.aiInfra.isInitAiProviderRuntimeState = true;++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toEqual({ key: 'input.modelUnavailable', type: 'warning' });+ });++ it('does not flash the use-only note while the access request is in flight', () => {+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: true,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: true,+ };+ testState.aiInfra.isInitAiProviderRuntimeState = true;+ testState.aiInfra.enabledChatModelList = [+ { children: [{ abilities: { functionCall: true }, id: 'gpt-4o' }], id: 'openai' },+ ];++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toBeUndefined();+ });++ it('does not show the use-only note when the access request errored (unresolved)', () => {+ // getGeneralAccess failed: not loading, no data — canUseResource stays+ // permissive, but positive use-only messaging must not fire for an editor.+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: false,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: true,+ };+ testState.aiInfra.isInitAiProviderRuntimeState = true;+ testState.aiInfra.enabledChatModelList = [+ { children: [{ abilities: { functionCall: true }, id: 'gpt-4o' }], id: 'openai' },+ ];++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toBeUndefined();+ });++ it('does not show the use-only note on ungated (private/home) inputs', () => {+ // e.g. a member without edit_own_content on their own private agent —+ // General access does not gate it, so no workspace note applies.+ testState.resourceAccess = {+ canConfigureResource: false,+ isAccessLoading: false,+ isAccessResolved: true,+ canUseResource: true,+ isGroupContext: false,+ isResourceGated: false,+ };+ testState.aiInfra.isInitAiProviderRuntimeState = true;+ testState.aiInfra.enabledChatModelList = [+ { children: [{ abilities: { functionCall: true }, id: 'gpt-4o' }], id: 'openai' },+ ];++ const { result } = renderHook(() => useChatInputNotice());++ expect(result.current).toBeUndefined();+ });+it('does not return a notice before the model runtime config is ready', () => {const { result } = renderHook(() => useChatInputNotice());diff --git a/src/features/ChatInput/ChatInputNotice/useChatInputNotice.ts b/src/features/ChatInput/ChatInputNotice/useChatInputNotice.tsindex 257c76ad122..d8804ae8abd 100644--- a/src/features/ChatInput/ChatInputNotice/useChatInputNotice.ts+++ b/src/features/ChatInput/ChatInputNotice/useChatInputNotice.ts@@ -13,6 +13,7 @@ interface ResolveChatInputNoticeParams {isGroupContext?: boolean;isHeterogeneousAgent: boolean;isModelConfigReady: boolean;+ isResourceUseOnly?: boolean;isResourceViewOnly?: boolean;}@@ -32,6 +33,7 @@ export const resolveChatInputNotice = ({isGroupContext,isHeterogeneousAgent,isModelConfigReady,+ isResourceUseOnly,isResourceViewOnly,}: ResolveChatInputNoticeParams) => {// View-level General access on the bound agent/group makes the whole input@@ -59,6 +61,15 @@ export const resolveChatInputNotice = ({!currentChatModel)return { action: undefined, key: 'input.modelUnavailable', type: 'warning' } as const;++ // Use-level General access: the member can chat but not edit the shared+ // config. Informational only, so any send-blocking warning above wins.+ if (isResourceUseOnly)+ return {+ action: undefined,+ key: isGroupContext ? 'input.useOnlyGroup' : 'input.useOnlyAgent',+ type: 'info',+ } as const;};/** Union of every notice shape `resolveChatInputNotice` can return. */@@ -87,7 +98,14 @@ export const useChatInputNotice = (): ChatInputNotice | undefined => {aiProviderSelectors.isInitAiProviderRuntimeState(s),);const currentChatModel = findEnabledChatModel(enabledChatModelList, model, provider);- const { canUseResource, isGroupContext } = useChatInputResourceAccess();+ const {+ canConfigureResource,+ canUseResource,+ isAccessLoading,+ isAccessResolved,+ isGroupContext,+ isResourceGated,+ } = useChatInputResourceAccess();return resolveChatInputNotice({currentChatModel,@@ -95,6 +113,17 @@ export const useChatInputNotice = (): ChatInputNotice | undefined => {isGroupContext,isHeterogeneousAgent,isModelConfigReady,+ // Only workspace-shared resources get the use-only note — a private agent+ // is never "use only" for its owner. `canConfigureResource` is false while+ // the access request is in flight or errored, so require the request to+ // have actually resolved: otherwise an editor would see the use-only note+ // on a cold load or after a failed access fetch.+ isResourceUseOnly:+ !isAccessLoading &&+ isAccessResolved &&+ isResourceGated &&+ canUseResource &&+ !canConfigureResource,isResourceViewOnly: !canUseResource,});};diff --git a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsxindex 67e20d5c4d8..d15dfe93518 100644--- a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx+++ b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx@@ -38,8 +38,6 @@ import { useEffectiveAgencyConfig } from '@/hooks/useEffectiveAgencyConfig';import { useAgentStore } from '@/store/agent';import { useElectronStore } from '@/store/electron';-import { formatFixedExecutionTargetTooltip } from './executionTargetTooltip';-const styles = createStaticStyles(({ css }) => ({button: css`cursor: pointer;@@ -64,21 +62,20 @@ const styles = createStaticStyles(({ css }) => ({background: ${cssVar.colorFillSecondary};}`,- buttonDisabled: css`- cursor: not-allowed;- opacity: 0.5;-- &:hover {- color: ${cssVar.colorTextSecondary};- background: transparent;- }- `,buttonLabel: css`overflow: hidden;max-width: 120px;text-overflow: ellipsis;white-space: nowrap;`,+ buttonReadonly: css`+ cursor: default;++ &:hover {+ color: ${cssVar.colorTextSecondary};+ background: transparent;+ }+ `,check: css`flex: none;margin-inline-start: auto;@@ -322,8 +319,7 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {const { t } = useTranslation('chat');const [open, setOpen] = useState(false);const navigate = useWorkspaceAwareNavigate();- const { canUseResource, isGroupContext } = useChatInputResourceAccess();- const viewOnly = !canUseResource;+ const { canUseResource } = useChatInputResourceAccess();const agentWorkspaceId = useAgentStore((s) => s.agentMap[agentId]?.workspaceId);const isWorkspaceAgent = Boolean(agentWorkspaceId);@@ -333,12 +329,13 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {// what the picker shows and what dispatch will actually do always agree.const {agencyConfig,+ canDisplayExecutionTarget,+ canSelectExecutionTarget,isPreferenceLoading: isWorkspacePreferenceLoading,workspaceScoped,} = useEffectiveAgencyConfig(agentId);-- const isFixedExecutionTarget =- isWorkspaceAgent && agencyConfig?.executionTargetSelectionPolicy === 'fixed';+ const canShowExecutionTarget = canUseResource && canDisplayExecutionTarget;+ const canShowExecutionTargetSelector = canShowExecutionTarget && canSelectExecutionTarget;const heteroType = agencyConfig?.heterogeneousProvider?.type;const boundDeviceId = agencyConfig?.boundDeviceId;@@ -372,16 +369,28 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {isHetero,workspaceScoped,});+ // A read-only member receives the safe target type but not `boundDeviceId`.+ // Use the stored type for the summary so a fixed, bound `local` target is+ // described as a workspace device instead of being client-coerced to sandbox.+ const chipExecutionTarget = canShowExecutionTargetSelector+ ? executionTarget+ : (agencyConfig?.executionTarget ?? executionTarget);// Device-only CLIs cannot fall back to the cloud sandbox. When a web/legacy// config has no usable device target, open the picker once so `none` is an// explicit setup prompt rather than a disabled-but-active sandbox row.useEffect(() => {+ if (!canShowExecutionTargetSelector) return;if (supportsSandbox) return;if (isWorkspacePreferenceLoading) return;if (executionTarget !== 'none') return;setOpen(true);- }, [executionTarget, isWorkspacePreferenceLoading, supportsSandbox]);+ }, [+ canShowExecutionTargetSelector,+ executionTarget,+ isWorkspacePreferenceLoading,+ supportsSandbox,+ ]);const selectExecutionTarget = useSelectExecutionTarget(agentId);const handleSelect = useCallback(@@ -407,10 +416,7 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {// default would clobber it.useEffect(() => {if (!isDesktop) return;- // View-only members must not write anything — not even the harmless- // per-user local-device default.- if (viewOnly) return;- if (isFixedExecutionTarget) return;+ if (!canShowExecutionTargetSelector) return;if (isWorkspacePreferenceLoading) return;if (agencyConfig?.executionTarget !== undefined) return;if (agencyConfig?.boundDeviceId !== undefined) return;@@ -421,16 +427,18 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {agencyConfig?.executionTarget,agencyConfig?.boundDeviceId,currentDeviceId,+ canShowExecutionTargetSelector,isWorkspacePreferenceLoading,- isFixedExecutionTarget,- viewOnly,]);// Don't render for remote hetero agents — they use RemoteAgentConfigCard in profile.if (heteroType && isRemoteHeterogeneousType(heteroType)) return null;+ if (!canShowExecutionTarget) return null;const boundDevice =- executionTarget === 'device' ? devices?.find((d) => d.deviceId === boundDeviceId) : undefined;+ canShowExecutionTargetSelector && executionTarget === 'device'+ ? devices?.find((d) => d.deviceId === boundDeviceId)+ : undefined;// The picker splits by whether the caller is inside a workspace agent://@@ -477,22 +485,27 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {// Compute chiplet chipIcon: ReactNode = <ExecutionTargetIcon target={'sandbox'} />;let chipLabel = t('heteroAgent.executionTarget.sandbox');- if (executionTarget === 'none') {+ if (chipExecutionTarget === 'none') {chipIcon = <ExecutionTargetIcon target={'none'} />;chipLabel = t('heteroAgent.executionTarget.none');- } else if (executionTarget === 'auto') {+ } else if (chipExecutionTarget === 'auto') {chipIcon = <ExecutionTargetIcon target={'auto'} />;chipLabel = t('heteroAgent.executionTarget.auto');- } else if (executionTarget === 'local') {+ } else if (chipExecutionTarget === 'local') {// 本机始终使用通用的本地电脑图标,不区分具体平台- chipIcon = <ExecutionTargetIcon target={'local'} />;- chipLabel = t('heteroAgent.executionTarget.local');- } else if (executionTarget === 'device') {+ chipIcon = <ExecutionTargetIcon target={canShowExecutionTargetSelector ? 'local' : 'device'} />;+ chipLabel = t(+ canShowExecutionTargetSelector+ ? 'heteroAgent.executionTarget.local'+ : 'heteroAgent.executionTarget.workspaceGroup',+ );+ } else if (chipExecutionTarget === 'device') {chipIcon = <ExecutionTargetIcon devicePlatform={boundDevice?.platform} target={'device'} />;- chipLabel =- boundDevice?.friendlyName ??- boundDevice?.hostname ??- t('heteroAgent.executionTarget.unknownDevice');+ chipLabel = canShowExecutionTargetSelector+ ? (boundDevice?.friendlyName ??+ boundDevice?.hostname ??+ t('heteroAgent.executionTarget.unknownDevice'))+ : t('heteroAgent.executionTarget.workspaceGroup');}const isActive = (target: DeviceExecutionTarget, deviceId?: string) => {@@ -675,32 +688,15 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {</Flexbox>);- const selectionDisabled = viewOnly || isFixedExecutionTarget;const chip = (- <div className={cx(styles.button, selectionDisabled && styles.buttonDisabled)}>+ <div className={cx(styles.button, !canShowExecutionTargetSelector && styles.buttonReadonly)}>{chipIcon}<span className={styles.buttonLabel}>{chipLabel}</span>- <Icon icon={ChevronDownIcon} size={12} />+ {canShowExecutionTargetSelector ? <Icon icon={ChevronDownIcon} size={12} /> : null}</div>);- // View-level General access: the whole input area is read-only, so the- // execution-target picker stays visible but inert (disabled, not hidden).- if (selectionDisabled)- return (- <Tooltip- title={- isFixedExecutionTarget- ? formatFixedExecutionTargetTooltip(- chipLabel,- t('heteroAgent.executionTarget.fixedTip'),- )- : t(isGroupContext ? 'input.viewOnlyGroup' : 'input.viewOnlyAgent')- }- >- {chip}- </Tooltip>- );+ if (!canShowExecutionTargetSelector) return chip;return (<Popoverdiff --git a/src/features/ChatInput/ControlBar/HeteroModel.tsx b/src/features/ChatInput/ControlBar/HeteroModel.tsxindex 46b5d16eb58..15b828b321d 100644--- a/src/features/ChatInput/ControlBar/HeteroModel.tsx+++ b/src/features/ChatInput/ControlBar/HeteroModel.tsx@@ -35,9 +35,8 @@ import {DropdownMenuSubmenuRoot,DropdownMenuSubmenuTrigger,DropdownMenuTrigger,- Tooltip,} from '@lobehub/ui/base-ui';-import { createStaticStyles, cssVar, cx } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import isEqual from 'fast-deep-equal';import { CheckIcon, ChevronDownIcon, ChevronRightIcon, ZapIcon } from 'lucide-react';import type { ReactNode } from 'react';@@ -243,15 +242,6 @@ const styles = createStaticStyles(({ css }) => ({background: ${cssVar.colorFillSecondary};}`,- triggerDisabled: css`- cursor: not-allowed;- opacity: 0.5;-- &:hover {- color: ${cssVar.colorTextSecondary};- background: transparent;- }- `,}));interface SelectorSubmenuProps {@@ -403,10 +393,10 @@ const HeteroModel = memo(() => {);const updateAgentConfigById = useAgentStore((s) => s.updateAgentConfigById);const { allowed: canCreateContent, reason } = usePermission('create_content');- // Model/effort picks write the shared agencyConfig — view-only General- // access disables the whole picker (disabled, not hidden).- const { canUseResource, isGroupContext } = useChatInputResourceAccess();- const enabled = canCreateContent && canUseResource;+ // Model/effort picks write the shared heterogeneous-provider config. Hide+ // the selector when this caller cannot configure that shared resource.+ const { canConfigureResource } = useChatInputResourceAccess();+ const enabled = canCreateContent && canConfigureResource;const [open, setOpen] = useState(false);const patchProvider = useCallback(@@ -492,6 +482,7 @@ const HeteroModel = memo(() => {);if (!isSelectableProviderType(provider?.type)) return null;+ if (!enabled) return null;if (provider.type === 'opencode') {const model =@@ -502,7 +493,7 @@ const HeteroModel = memo(() => {return (<OpenCodeModelSelectoragentId={agentId}- disabled={!canCreateContent}+ disabled={false}model={model}permissionReason={reason}onSelect={(value) => void patchProvider({ model: value })}@@ -584,7 +575,7 @@ const HeteroModel = memo(() => {const trigger = (<div- className={cx(styles.trigger, !enabled && styles.triggerDisabled)}+ className={styles.trigger}aria-label={t('heteroAgent.modelSelector.ariaLabel', {model: modelLabel,reasoning: effortLabel,@@ -596,19 +587,6 @@ const HeteroModel = memo(() => {</div>);- if (!enabled)- return (- <Tooltip- title={- !canCreateContent- ? reason- : t(isGroupContext ? 'input.viewOnlyGroup' : 'input.viewOnlyAgent')- }- >- <div>{trigger}</div>- </Tooltip>- );-const renderOption = <T extends string>(title: string,options: readonly { description?: string; icon?: typeof ZapIcon; label: string; value: T }[],diff --git a/src/features/ChatInput/ControlBar/ModeSelector.tsx b/src/features/ChatInput/ControlBar/ModeSelector.tsxindex 48d35f5ef5c..8d182ac47bf 100644--- a/src/features/ChatInput/ControlBar/ModeSelector.tsx+++ b/src/features/ChatInput/ControlBar/ModeSelector.tsx@@ -139,15 +139,15 @@ const ModeSelector = memo(() => {useBusinessAgentModeSync(agentId);const [open, setOpen] = useState(false);const { allowed: canCreateContent, reason } = usePermission('create_content');- // Per-resource General access: view-only members can't send, so switching the- // chat/agent mode (a shared agent-config write) is disabled too.+ // Agent/Chat mode is a caller runtime preference for ordinary Workspace+ // members; only members who cannot use the Agent are disabled.const { canUseResource, isGroupContext } = useChatInputResourceAccess();const disabled = !canCreateContent || !canUseResource;const disabledReason = !canCreateContent? reason: t(isGroupContext ? 'input.viewOnlyGroup' : 'input.viewOnlyAgent');- const { canSelectAgentMode, currentMode, isAgentModeUnavailable } =+ const { canSelectAgentMode, currentMode, isAgentModeUnavailable, isPreferenceLoading } =useEffectiveAgentMode(agentId);const CurrentIcon = currentMode === 'agent' ? InfinityIcon : MessageCircleIcon;@@ -251,6 +251,8 @@ const ModeSelector = memo(() => {</div>);+ if (isPreferenceLoading) return null;+if (disabled)return (<Tooltip title={disabledReason}>diff --git a/src/features/ChatInput/ControlBar/index.tsx b/src/features/ChatInput/ControlBar/index.tsxindex 883b65e9642..7d3c6f7f540 100644--- a/src/features/ChatInput/ControlBar/index.tsx+++ b/src/features/ChatInput/ControlBar/index.tsx@@ -11,7 +11,6 @@ import { useChatInputResourceAccess } from '../hooks/useChatInputResourceAccess'import { useEffectiveAgentMode } from '../hooks/useEffectiveAgentMode';import { useChatInputStore } from '../store';import ApprovalMode from './ApprovalMode';-import HeteroDeviceSwitcher from './HeteroDeviceSwitcher';import ModeSelector from './ModeSelector';import WorkspaceControls from './WorkspaceControls';@@ -43,15 +42,15 @@ const styles = createStaticStyles(({ css }) => ({const ControlBar = memo(() => {const agentId = useAgentId();- const { canConfigureResource, isAccessLoading } = useChatInputResourceAccess();+ const { canShowControls } = useChatInputResourceAccess();const showContextWindow = useChatInputStore((s) =>s.rightActions.flat().includes('contextWindow'),);const isLoading = useAgentStore((s) => agentByIdSelectors.isAgentConfigLoadingById(agentId)(s));- const { isAgentRuntimeMode } = useEffectiveAgentMode(agentId);+ const { isAgentRuntimeMode, isPreferenceLoading } = useEffectiveAgentMode(agentId);- if (isAccessLoading) return null;+ if (!canShowControls || isPreferenceLoading) return null;// Skeleton placeholder to prevent layout jump during loadingif (!agentId || isLoading) {@@ -63,18 +62,6 @@ const ControlBar = memo(() => {);}- // Can-use members (and viewers, whose chat input is already disabled) see- // only the execution device. It is a per-member usage choice, not shared- // AgentConfig; fixed agents keep the same chip visible but disabled.- if (!canConfigureResource) {- if (!isAgentRuntimeMode) return null;- return (- <Flexbox horizontal align={'center'} className={styles.bar}>- <HeteroDeviceSwitcher agentId={agentId} />- </Flexbox>- );- }-return (<Flexbox horizontal align={'center'} className={styles.bar} justify={'space-between'}>{/* Left: chat-mode switcher + (agent-only) execution device + working directory */}diff --git a/src/features/ChatInput/InputEditor/useMentionCategories.tsx b/src/features/ChatInput/InputEditor/useMentionCategories.tsxindex 54131f228b2..4bd5b14aeea 100644--- a/src/features/ChatInput/InputEditor/useMentionCategories.tsx+++ b/src/features/ChatInput/InputEditor/useMentionCategories.tsx@@ -30,6 +30,7 @@ export const useMentionCategories = (): MentionCategory[] => {const workspaceGroups = useHomeStore(homeAgentListSelectors.agentGroups, isEqual);const workspaceUngrouped = useHomeStore(homeAgentListSelectors.ungroupedAgents, isEqual);const privateGroups = useHomeStore(homeAgentListSelectors.privateAgentGroups, isEqual);+ const privatePinned = useHomeStore(homeAgentListSelectors.privatePinnedAgents, isEqual);const privateUngrouped = useHomeStore(homeAgentListSelectors.privateUngroupedAgents, isEqual);const topicPageSize = useGlobalStore(systemStatusSelectors.topicPageSize);@@ -89,6 +90,7 @@ export const useMentionCategories = (): MentionCategory[] => {// even inside the caller's own private agent — the bug this fixes.const privateAgentIds = new Set<string>();for (const g of privateGroups) for (const a of g.items) privateAgentIds.add(a.id);+ for (const a of privatePinned) privateAgentIds.add(a.id);for (const a of privateUngrouped) privateAgentIds.add(a.id);const workspaceCandidates = dedupeAgents([@@ -97,6 +99,7 @@ export const useMentionCategories = (): MentionCategory[] => {...workspaceUngrouped,]);const privateCandidates = dedupeAgents([+ ...privatePinned,...privateGroups.flatMap((g) => g.items),...privateUngrouped,]);@@ -246,6 +249,7 @@ export const useMentionCategories = (): MentionCategory[] => {workspaceGroups,workspaceUngrouped,privateGroups,+ privatePinned,privateUngrouped,currentAgentId,topics,diff --git a/src/features/ChatInput/SendArea/index.tsx b/src/features/ChatInput/SendArea/index.tsxindex bca4807438b..5bbdb7f98e7 100644--- a/src/features/ChatInput/SendArea/index.tsx+++ b/src/features/ChatInput/SendArea/index.tsx@@ -4,6 +4,7 @@ import { memo, useMemo } from 'react';import { type ActionKey } from '../ActionBar/config';import { actionMap } from '../ActionBar/config';+import { useChatInputResourceAccess } from '../hooks/useChatInputResourceAccess';import { useChatInputStore } from '../store';import ExpandButton from './ExpandButton';import SendButton from './SendButton';@@ -15,20 +16,25 @@ const mapActionsToItems = (keys: ActionKey[]) =>});const SendArea = memo(() => {+ const { canShowControls } = useChatInputResourceAccess();const allowExpand = useChatInputStore((s) => s.allowExpand);const rightActions = useChatInputStore((s) => s.rightActions, isEqual);const items = useMemo(() =>- mapActionsToItems(- ((rightActions as ActionKey[]) || []).filter((actionKey) => actionKey !== 'contextWindow'),- ),- [rightActions],+ canShowControls+ ? mapActionsToItems(+ ((rightActions as ActionKey[]) || []).filter(+ (actionKey) => actionKey !== 'contextWindow',+ ),+ )+ : [],+ [canShowControls, rightActions],);return (<Flexbox horizontal align={'center'} flex={'none'} gap={12}>- {allowExpand && <ExpandButton />}+ {canShowControls && allowExpand && <ExpandButton />}{items}<SendButton /></Flexbox>diff --git a/src/features/ChatInput/hooks/useAgentModelSelection.test.ts b/src/features/ChatInput/hooks/useAgentModelSelection.test.tsindex c443af9d4ef..50a299d6fe4 100644--- a/src/features/ChatInput/hooks/useAgentModelSelection.test.ts+++ b/src/features/ChatInput/hooks/useAgentModelSelection.test.ts@@ -4,6 +4,18 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { useAgentModelSelection } from './useAgentModelSelection';const testState = vi.hoisted(() => ({+ access: {+ canManageAgent: true,+ isAccessLoading: false,+ },+ permission: {+ allowed: true,+ },+ resource: {+ canConfigureResource: true,+ canUseResource: true,+ isAccessLoading: false,+ },agent: {agencyConfig: undefined as { modelSelectionPolicy?: 'fixed' | 'member' } | undefined,agentMap: {@@ -36,6 +48,14 @@ vi.mock('@/business/client/hooks/useBusinessAgentMode', () => ({useBusinessModelModeConfig: () => (config: unknown) => config,}));+vi.mock('@/features/ResourcePermission/useAgentManagementAccess', () => ({+ useAgentManagementAccess: () => testState.access,+}));++vi.mock('@/hooks/usePermission', () => ({+ usePermission: () => testState.permission,+}));+vi.mock('@/store/agent', () => ({useAgentStore: (selector: (s: typeof testState.agent) => unknown) => selector(testState.agent),}));@@ -53,8 +73,18 @@ vi.mock('@/store/user', () => ({useUserStore: (selector: (s: typeof testState.user) => unknown) => selector(testState.user),}));+vi.mock('./useChatInputResourceAccess', () => ({+ useChatInputResourceAccess: () => testState.resource,+}));+describe('useAgentModelSelection', () => {beforeEach(() => {+ testState.access.canManageAgent = true;+ testState.access.isAccessLoading = false;+ testState.permission.allowed = true;+ testState.resource.canConfigureResource = true;+ testState.resource.canUseResource = true;+ testState.resource.isAccessLoading = false;testState.agent.agencyConfig = undefined;testState.agent.agentMap['agent-1'] = {};testState.agent.model = 'shared-model';@@ -72,6 +102,8 @@ describe('useAgentModelSelection', () => {await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: true,model: 'shared-model',provider: 'shared-provider',usesWorkspaceMemberSelection: false,@@ -83,7 +115,9 @@ describe('useAgentModelSelection', () => {expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();});- it('defaults a workspace Agent to fixed and ignores a retained personal choice', async () => {+ it('defaults a legacy public Workspace Agent to member selection', async () => {+ testState.access.canManageAgent = false;+ testState.resource.canConfigureResource = false;testState.agent.agentMap['agent-1'] = {visibility: 'public',workspaceId: 'workspace-1',@@ -98,16 +132,52 @@ describe('useAgentModelSelection', () => {await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: true,+ model: 'member-model',+ provider: 'member-provider',+ selectionPolicy: 'member',+ usesWorkspaceMemberSelection: true,+ });+ expect(testState.user.updateWorkspaceUserPreference).toHaveBeenCalledWith({+ agentModelOverrides: {+ 'agent-1': { model: 'next-model', provider: 'next-provider' },+ },+ });+ expect(testState.agent.updateAgentConfigById).not.toHaveBeenCalled();+ });++ it('keeps an explicit fixed policy locked for a public Workspace Agent', async () => {+ testState.access.canManageAgent = false;+ testState.resource.canConfigureResource = false;+ testState.agent.agencyConfig = { modelSelectionPolicy: 'fixed' };+ testState.agent.agentMap['agent-1'] = {+ visibility: 'public',+ workspaceId: 'workspace-1',+ };+ testState.user.workspaceUserPreference = {+ agentModelOverrides: {+ 'agent-1': { model: 'member-model', provider: 'member-provider' },+ },+ };+ const { result } = renderHook(() => useAgentModelSelection('agent-1'));++ await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });++ expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: false,model: 'shared-model',provider: 'shared-provider',selectionPolicy: 'fixed',- usesWorkspaceMemberSelection: true,});expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();expect(testState.agent.updateAgentConfigById).not.toHaveBeenCalled();});it('shows and updates the caller override when member selection is enabled', async () => {+ testState.access.canManageAgent = false;+ testState.resource.canConfigureResource = false;testState.agent.agencyConfig = { modelSelectionPolicy: 'member' };testState.agent.agentMap['agent-1'] = {visibility: 'public',@@ -124,6 +194,8 @@ describe('useAgentModelSelection', () => {await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: true,model: 'member-model',provider: 'member-provider',selectionPolicy: 'member',@@ -138,6 +210,8 @@ describe('useAgentModelSelection', () => {});it('does not overwrite preferences before the workspace bucket settles', async () => {+ testState.access.canManageAgent = false;+ testState.resource.canConfigureResource = false;testState.agent.agencyConfig = { modelSelectionPolicy: 'member' };testState.agent.agentMap['agent-1'] = {visibility: 'public',@@ -149,6 +223,8 @@ describe('useAgentModelSelection', () => {await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });expect(result.current.isPreferenceLoading).toBe(true);+ expect(result.current.canDisplayModel).toBe(false);+ expect(result.current.canSelectModel).toBe(false);expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();});@@ -168,6 +244,8 @@ describe('useAgentModelSelection', () => {await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: true,isPreferenceLoading: false,model: 'shared-model',provider: 'shared-provider',@@ -180,4 +258,46 @@ describe('useAgentModelSelection', () => {});expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();});++ it('lets the author or Workspace admin update the shared model regardless of member policy', async () => {+ testState.agent.agencyConfig = { modelSelectionPolicy: 'fixed' };+ testState.agent.agentMap['agent-1'] = {+ visibility: 'public',+ workspaceId: 'workspace-1',+ };+ testState.user.workspaceUserPreference = {+ agentModelOverrides: {+ 'agent-1': { model: 'stale-member-model', provider: 'stale-member-provider' },+ },+ };+ const { result } = renderHook(() => useAgentModelSelection('agent-1'));++ await result.current.selectModel({ model: 'next-model', provider: 'next-provider' });++ expect(result.current).toMatchObject({+ canDisplayModel: true,+ canSelectModel: true,+ model: 'shared-model',+ provider: 'shared-provider',+ selectionPolicy: 'fixed',+ usesWorkspaceMemberSelection: false,+ });+ expect(testState.agent.updateAgentConfigById).toHaveBeenCalledWith('agent-1', {+ model: 'next-model',+ provider: 'next-provider',+ });+ expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();+ });++ it('hides the model summary when the caller cannot use the Agent', () => {+ testState.resource.canConfigureResource = false;+ testState.resource.canUseResource = false;++ const { result } = renderHook(() => useAgentModelSelection('agent-1'));++ expect(result.current).toMatchObject({+ canDisplayModel: false,+ canSelectModel: false,+ });+ });});diff --git a/src/features/ChatInput/hooks/useAgentModelSelection.ts b/src/features/ChatInput/hooks/useAgentModelSelection.tsindex 85941c5515c..669f54d2aaf 100644--- a/src/features/ChatInput/hooks/useAgentModelSelection.ts+++ b/src/features/ChatInput/hooks/useAgentModelSelection.ts@@ -1,20 +1,26 @@'use client';import type { AgentModelSelectionPolicy } from '@lobechat/types';-import { resolveAgentModelConfig } from '@lobechat/types';+import { resolveAgentModelConfig, resolveAgentModelSelectionPolicy } from '@lobechat/types';import { useCallback } from 'react';import { useBusinessModelModeConfig } from '@/business/client/hooks/useBusinessAgentMode';+import { useAgentManagementAccess } from '@/features/ResourcePermission/useAgentManagementAccess';+import { usePermission } from '@/hooks/usePermission';import { useAgentStore } from '@/store/agent';import { agentByIdSelectors } from '@/store/agent/selectors';import { useUserStore } from '@/store/user';+import { useChatInputResourceAccess } from './useChatInputResourceAccess';+interface ModelSelection {model: string;provider: string;}export interface UseAgentModelSelectionResult extends ModelSelection {+ canDisplayModel: boolean;+ canSelectModel: boolean;isPreferenceLoading: boolean;selectionPolicy: AgentModelSelectionPolicy;selectModel: (selection: ModelSelection) => Promise<void>;@@ -31,12 +37,20 @@ export interface UseAgentModelSelectionResult extends ModelSelection {* diverge.*/export const useAgentModelSelection = (agentId: string): UseAgentModelSelectionResult => {+ const { allowed: canCreateContent } = usePermission('create_content');+ const {+ canConfigureResource,+ canUseResource,+ isAccessLoading: isResourceAccessLoading,+ } = useChatInputResourceAccess();const agent = useAgentStore(agentByIdSelectors.getAgentById(agentId));const sharedAgencyConfig = useAgentStore(agentByIdSelectors.getAgencyConfigById(agentId));const sharedModel = useAgentStore(agentByIdSelectors.getAgentModelById(agentId));const sharedProvider = useAgentStore(agentByIdSelectors.getAgentModelProviderById(agentId));const updateAgentConfigById = useAgentStore((s) => s.updateAgentConfigById);- const usesWorkspaceMemberSelection = !!agent?.workspaceId && agent.visibility !== 'private';+ const { canManageAgent, isAccessLoading } = useAgentManagementAccess(agentId);+ const usesWorkspaceMemberSelection =+ !!agent?.workspaceId && agent.visibility !== 'private' && !canManageAgent;const updateWorkspaceUserPreference = useUserStore((s) => s.updateWorkspaceUserPreference);const storePreference = useUserStore((s) => s.workspaceUserPreference);@@ -47,20 +61,34 @@ export const useAgentModelSelection = (agentId: string): UseAgentModelSelectionRconst memberOverride = usesWorkspaceMemberSelection? preference.agentModelOverrides?.[agentId]: undefined;- const effectiveModel = resolveAgentModelConfig(- {- agencyConfig: sharedAgencyConfig,- model: sharedModel,- provider: sharedProvider,- visibility: agent?.visibility,- },- memberOverride,- );- const selectionPolicy = sharedAgencyConfig?.modelSelectionPolicy ?? 'fixed';+ const sharedModelConfig = {+ agencyConfig: sharedAgencyConfig,+ model: sharedModel,+ provider: sharedProvider,+ visibility: agent?.visibility,+ workspaceId: agent?.workspaceId,+ canManage: canManageAgent,+ };+ const effectiveModel = resolveAgentModelConfig(sharedModelConfig, memberOverride);+ const selectionPolicy = resolveAgentModelSelectionPolicy(sharedModelConfig);const applyBusinessModelModeConfig = useBusinessModelModeConfig();+ const isPreferenceLoading = isAccessLoading || (usesWorkspaceMemberSelection && isLoading);+ const canSelectForAgent = usesWorkspaceMemberSelection+ ? canUseResource && selectionPolicy === 'member'+ : canConfigureResource;+ const canSelectModel =+ canCreateContent && canSelectForAgent && !isResourceAccessLoading && !isPreferenceLoading;+ const canDisplayModel =+ !!agentId &&+ canCreateContent &&+ canUseResource &&+ !isResourceAccessLoading &&+ !isPreferenceLoading;const selectModel = useCallback(async (selection: ModelSelection) => {+ if (!canSelectModel) return;+if (usesWorkspaceMemberSelection) {if (selectionPolicy !== 'member' || isLoading) return;@@ -78,6 +106,7 @@ export const useAgentModelSelection = (agentId: string): UseAgentModelSelectionR[agentId,applyBusinessModelModeConfig,+ canSelectModel,isLoading,preference.agentModelOverrides,selectionPolicy,@@ -88,7 +117,9 @@ export const useAgentModelSelection = (agentId: string): UseAgentModelSelectionR);return {- isPreferenceLoading: usesWorkspaceMemberSelection && isLoading,+ canDisplayModel,+ canSelectModel,+ isPreferenceLoading,model: effectiveModel.model,provider: effectiveModel.provider ?? sharedProvider,selectionPolicy,diff --git a/src/features/ChatInput/hooks/useChatInputResourceAccess.test.tsx b/src/features/ChatInput/hooks/useChatInputResourceAccess.test.tsxindex b71818552e9..368f2d8cfe8 100644--- a/src/features/ChatInput/hooks/useChatInputResourceAccess.test.tsx+++ b/src/features/ChatInput/hooks/useChatInputResourceAccess.test.tsx@@ -45,6 +45,7 @@ describe('useChatInputResourceAccess', () => {it('does not throw when rendered without a ChatInput store Provider', () => {const { result } = renderHook(() => useChatInputResourceAccess());+ expect(result.current.canShowControls).toBe(true);expect(result.current.canUseResource).toBe(true);expect(result.current.isGroupContext).toBe(false);// No bound agent to gate when there is no store.@@ -59,7 +60,37 @@ describe('useChatInputResourceAccess', () => {const { result } = renderHook(() => useChatInputResourceAccess(), { wrapper });+ expect(result.current.canShowControls).toBe(true);expect(result.current.canUseResource).toBe(true);expect(useResourceAccessMock).toHaveBeenLastCalledWith('agent', 'agent-1');});++ it('hides composer controls when the caller can only view the resource', () => {+ useResourceAccessMock.mockReturnValueOnce({+ canEditResource: false,+ canManageResource: false,+ canUseResource: false,+ isAccessResolved: true,+ isLoading: false,+ });++ const { result } = renderHook(() => useChatInputResourceAccess());++ expect(result.current.canShowControls).toBe(false);+ expect(result.current.canUseResource).toBe(false);+ });++ it('hides composer controls while resource access is unresolved', () => {+ useResourceAccessMock.mockReturnValueOnce({+ canEditResource: false,+ canManageResource: false,+ canUseResource: true,+ isAccessResolved: false,+ isLoading: true,+ });++ const { result } = renderHook(() => useChatInputResourceAccess());++ expect(result.current.canShowControls).toBe(false);+ });});diff --git a/src/features/ChatInput/hooks/useChatInputResourceAccess.ts b/src/features/ChatInput/hooks/useChatInputResourceAccess.tsindex 961803da44e..29c5313e574 100644--- a/src/features/ChatInput/hooks/useChatInputResourceAccess.ts+++ b/src/features/ChatInput/hooks/useChatInputResourceAccess.ts@@ -69,8 +69,24 @@ export const useChatInputResourceAccess = () => {return {canConfigureResource: isAccessResolved && canEditContent && canEditResource,+ /** Hide composer controls until access resolves, and for view-only callers. */+ canShowControls:+ !isAccessLoading && isAccessResolved && canCreateContent && canUseResourceLevel,canUseResource: canCreateContent && canUseResourceLevel,+ /**+ * Whether the General-access request has actually resolved. `canUseResource`+ * stays permissive on error/no-data, so positive messaging (e.g. the+ * use-only notice) must additionally require this flag.+ */+ isAccessResolved,isAccessLoading,isGroupContext,+ /**+ * Whether this input targets a workspace-shared resource whose General+ * access actually gates the member (home/inbox/private inputs are never+ * gated). Lets callers scope "use-only"/"view-only" messaging to shared+ * resources instead of surfacing it for every private agent.+ */+ isResourceGated: !!gatedResourceId,};};diff --git a/src/features/ChatInput/hooks/useEffectiveAgentMode.test.ts b/src/features/ChatInput/hooks/useEffectiveAgentMode.test.tsindex 7abbaeaf26b..95315414fa9 100644--- a/src/features/ChatInput/hooks/useEffectiveAgentMode.test.ts+++ b/src/features/ChatInput/hooks/useEffectiveAgentMode.test.ts@@ -1,6 +1,81 @@-import { describe, expect, it } from 'vitest';+import { renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';-import { resolveEffectiveAgentMode } from './useEffectiveAgentMode';+import { resolveEffectiveAgentMode, useEffectiveAgentMode } from './useEffectiveAgentMode';++const testState = vi.hoisted(() => ({+ access: {+ canManageAgent: false,+ isAccessLoading: false,+ },+ agent: {+ agent: undefined as { visibility?: 'private' | 'public'; workspaceId?: string } | undefined,+ enableAgentMode: true,+ model: 'model-1',+ provider: 'provider-1',+ },+ aiInfra: {+ isReady: true,+ },+ supportToolUse: true,+ user: {+ fetchedPreference: undefined as+ { agentModeOverrides?: Record<string, boolean> } | null | undefined,+ isLoading: false,+ useFetchWorkspaceUserPreference: () => ({+ data: testState.user.fetchedPreference,+ isLoading: testState.user.isLoading,+ }),+ workspaceUserPreference: {} as { agentModeOverrides?: Record<string, boolean> },+ },+}));++vi.mock('@/features/ResourcePermission/useAgentManagementAccess', () => ({+ useAgentManagementAccess: () => testState.access,+}));++vi.mock('@/hooks/useModelSupportToolUse', () => ({+ useModelSupportToolUse: () => testState.supportToolUse,+}));++vi.mock('@/store/agent', () => ({+ useAgentStore: (selector: (s: typeof testState.agent) => unknown) => selector(testState.agent),+}));++vi.mock('@/store/agent/selectors', () => ({+ agentByIdSelectors: {+ getAgentById: () => (s: typeof testState.agent) => s.agent,+ getAgentEnableModeById: () => (s: typeof testState.agent) => s.enableAgentMode,+ getAgentModelById: () => (s: typeof testState.agent) => s.model,+ getAgentModelProviderById: () => (s: typeof testState.agent) => s.provider,+ },+}));++vi.mock('@/store/aiInfra', () => ({+ aiProviderSelectors: {+ isInitAiProviderRuntimeState: (s: typeof testState.aiInfra) => s.isReady,+ },+ useAiInfraStore: (selector: (s: typeof testState.aiInfra) => unknown) =>+ selector(testState.aiInfra),+}));++vi.mock('@/store/user', () => ({+ useUserStore: (selector: (s: typeof testState.user) => unknown) => selector(testState.user),+}));++beforeEach(() => {+ testState.access.canManageAgent = false;+ testState.access.isAccessLoading = false;+ testState.agent.agent = undefined;+ testState.agent.enableAgentMode = true;+ testState.agent.model = 'model-1';+ testState.agent.provider = 'provider-1';+ testState.aiInfra.isReady = true;+ testState.supportToolUse = true;+ testState.user.fetchedPreference = undefined;+ testState.user.isLoading = false;+ testState.user.workspaceUserPreference = {};+});describe('resolveEffectiveAgentMode', () => {it('uses agent mode when the stored mode is enabled and the model supports tool use', () => {@@ -85,3 +160,47 @@ describe('resolveEffectiveAgentMode', () => {});});});++describe('useEffectiveAgentMode', () => {+ it('uses an ordinary member personal mode for a public Workspace Agent', () => {+ testState.agent.agent = { visibility: 'public', workspaceId: 'workspace-1' };+ testState.user.workspaceUserPreference = {+ agentModeOverrides: { 'agent-1': false },+ };++ const { result } = renderHook(() => useEffectiveAgentMode('agent-1'));++ expect(result.current).toMatchObject({+ currentMode: 'chat',+ isAgentRuntimeMode: false,+ isPreferenceLoading: false,+ usesWorkspaceMemberMode: true,+ });+ });++ it('ignores a member override for the author or Workspace admin', () => {+ testState.access.canManageAgent = true;+ testState.agent.agent = { visibility: 'public', workspaceId: 'workspace-1' };+ testState.user.workspaceUserPreference = {+ agentModeOverrides: { 'agent-1': false },+ };++ const { result } = renderHook(() => useEffectiveAgentMode('agent-1'));++ expect(result.current).toMatchObject({+ currentMode: 'agent',+ isAgentRuntimeMode: true,+ isPreferenceLoading: false,+ usesWorkspaceMemberMode: false,+ });+ });++ it('waits for the ordinary member preference before exposing the mode control', () => {+ testState.agent.agent = { visibility: 'public', workspaceId: 'workspace-1' };+ testState.user.isLoading = true;++ const { result } = renderHook(() => useEffectiveAgentMode('agent-1'));++ expect(result.current.isPreferenceLoading).toBe(true);+ });+});diff --git a/src/features/ChatInput/hooks/useEffectiveAgentMode.ts b/src/features/ChatInput/hooks/useEffectiveAgentMode.tsindex 4c93b1187b5..574a582b0ff 100644--- a/src/features/ChatInput/hooks/useEffectiveAgentMode.ts+++ b/src/features/ChatInput/hooks/useEffectiveAgentMode.ts@@ -1,7 +1,9 @@+import { useAgentManagementAccess } from '@/features/ResourcePermission/useAgentManagementAccess';import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';import { useAgentStore } from '@/store/agent';import { agentByIdSelectors } from '@/store/agent/selectors';import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';+import { useUserStore } from '@/store/user';export type ChatInputMode = 'agent' | 'chat';@@ -43,13 +45,30 @@ export const resolveEffectiveAgentMode = ({};export const useEffectiveAgentMode = (agentId: string) => {- const [enableAgentMode, model, provider] = useAgentStore((s) => [+ const [sharedEnableAgentMode, model, provider, agent] = useAgentStore((s) => [agentByIdSelectors.getAgentEnableModeById(agentId)(s),agentByIdSelectors.getAgentModelById(agentId)(s),agentByIdSelectors.getAgentModelProviderById(agentId)(s),+ agentByIdSelectors.getAgentById(agentId)(s),]);+ const { canManageAgent, isAccessLoading } = useAgentManagementAccess(agentId);+ const usesWorkspaceMemberMode =+ !!agent?.workspaceId && agent.visibility !== 'private' && !canManageAgent;+ const storePreference = useUserStore((s) => s.workspaceUserPreference);+ const { data: fetchedPreference, isLoading } = useUserStore(+ (s) => s.useFetchWorkspaceUserPreference,+ )();+ const preference = fetchedPreference === undefined ? storePreference : (fetchedPreference ?? {});+ const memberModeOverride = usesWorkspaceMemberMode+ ? preference.agentModeOverrides?.[agentId]+ : undefined;+ const enableAgentMode = memberModeOverride ?? sharedEnableAgentMode;const supportToolUse = useModelSupportToolUse(model, provider);const isModelListReady = useAiInfraStore(aiProviderSelectors.isInitAiProviderRuntimeState);- return resolveEffectiveAgentMode({ enableAgentMode, isModelListReady, supportToolUse });+ return {+ ...resolveEffectiveAgentMode({ enableAgentMode, isModelListReady, supportToolUse }),+ isPreferenceLoading: isAccessLoading || (usesWorkspaceMemberMode && isLoading),+ usesWorkspaceMemberMode,+ };};diff --git a/src/features/ChatInput/hooks/useSelectExecutionTarget.test.ts b/src/features/ChatInput/hooks/useSelectExecutionTarget.test.tsindex c4997dc83e3..55b6c734f05 100644--- a/src/features/ChatInput/hooks/useSelectExecutionTarget.test.ts+++ b/src/features/ChatInput/hooks/useSelectExecutionTarget.test.ts@@ -4,6 +4,10 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { useSelectExecutionTarget } from './useSelectExecutionTarget';const testState = vi.hoisted(() => ({+ access: {+ canManageAgent: true,+ isAccessLoading: false,+ },agent: {agencyConfig: undefined as| {@@ -13,7 +17,10 @@ const testState = vi.hoisted(() => ({heterogeneousProvider?: { type: string };}| undefined,- agentMap: {} as Record<string, { workspaceId?: string | null }>,+ agentMap: {} as Record<+ string,+ { visibility?: 'private' | 'public'; workspaceId?: string | null }+ >,isHetero: false,updateAgentConfigById: vi.fn(),},@@ -42,6 +49,10 @@ vi.mock('@/services/electron/gatewayConnection', () => ({},}));+vi.mock('@/features/ResourcePermission/useAgentManagementAccess', () => ({+ useAgentManagementAccess: () => testState.access,+}));+vi.mock('@/store/agent', () => ({useAgentStore: (selector: (s: typeof testState.agent) => unknown) => selector(testState.agent),}));@@ -64,6 +75,8 @@ vi.mock('@/store/user', () => ({describe('useSelectExecutionTarget', () => {beforeEach(() => {+ testState.access.canManageAgent = true;+ testState.access.isAccessLoading = false;testState.agent.agencyConfig = undefined;testState.agent.agentMap = {};testState.agent.isHetero = false;@@ -150,7 +163,10 @@ describe('useSelectExecutionTarget', () => {describe('workspace agent — writes to workspace_user_settings.preference.agentDeviceOverrides (LOBE-11689)', () => {beforeEach(() => {- testState.agent.agentMap = { 'agent-id': { workspaceId: 'ws-1' } };+ testState.access.canManageAgent = false;+ testState.agent.agentMap = {+ 'agent-id': { visibility: 'public', workspaceId: 'ws-1' },+ };});it('routes a workspace device pick into the workspace-scoped caller preference, never the shared config', async () => {@@ -223,5 +239,51 @@ describe('useSelectExecutionTarget', () => {agentDeviceOverrides: { 'agent-id': { executionTarget: 'sandbox' } },});});++ it('lets the author or Workspace admin update the shared target while members are fixed', async () => {+ testState.access.canManageAgent = true;+ testState.agent.agencyConfig = {+ boundDeviceId: 'fixed-device',+ executionTargetSelectionPolicy: 'fixed',+ executionTarget: 'device',+ };+ const { result } = renderHook(() => useSelectExecutionTarget('agent-id'));++ await result.current('sandbox');++ expect(testState.agent.updateAgentConfigById).toHaveBeenCalledWith('agent-id', {+ agencyConfig: {+ boundDeviceId: 'fixed-device',+ executionTarget: 'sandbox',+ executionTargetSelectionPolicy: 'fixed',+ },+ });+ expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();+ });+ });++ describe('private Workspace agent — writes to the owner-controlled shared config', () => {+ it('switches target directly even when the future public policy is fixed', async () => {+ testState.agent.agentMap = {+ 'agent-id': { visibility: 'private', workspaceId: 'ws-1' },+ };+ testState.agent.agencyConfig = {+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ };+ const { result } = renderHook(() => useSelectExecutionTarget('agent-id'));++ await result.current('sandbox');++ expect(testState.agent.updateAgentConfigById).toHaveBeenCalledWith('agent-id', {+ agencyConfig: {+ boundDeviceId: 'owner-device',+ executionTarget: 'sandbox',+ executionTargetSelectionPolicy: 'fixed',+ },+ });+ expect(testState.user.updateWorkspaceUserPreference).not.toHaveBeenCalled();+ });});});diff --git a/src/features/ChatInput/hooks/useSelectExecutionTarget.ts b/src/features/ChatInput/hooks/useSelectExecutionTarget.tsindex 5ea7dd22c13..e8013a64f74 100644--- a/src/features/ChatInput/hooks/useSelectExecutionTarget.ts+++ b/src/features/ChatInput/hooks/useSelectExecutionTarget.ts@@ -4,6 +4,7 @@ import { isDesktop } from '@lobechat/const';import type { DeviceExecutionTarget } from '@lobechat/types';import { useCallback } from 'react';+import { useAgentManagementAccess } from '@/features/ResourcePermission/useAgentManagementAccess';import { gatewayConnectionService } from '@/services/electron/gatewayConnection';import { useAgentStore } from '@/store/agent';import { agentByIdSelectors } from '@/store/agent/selectors';@@ -22,7 +23,7 @@ import { useUserStore } from '@/store/user';* - **Personal agent** — writes go straight into the shared* `agents.agencyConfig` (there's only ever one owner, so there's nothing to* isolate).- * - **Workspace agent** — writes go into+ * - **Public Workspace agent** — writes go into* `workspace_user_settings.preference.agentDeviceOverrides[agentId]`* (per-user per-workspace) so each member's Cloud Sandbox / workspace-device* / this-machine choice stays independent. The shared `agents.agencyConfig`@@ -30,6 +31,9 @@ import { useUserStore } from '@/store/user';* chosen anything yet. Reads / writes are cached through the* `workspaceUserSettings` slice of the user store, keyed on the active* workspaceId.+ * - **Private Workspace agent** — like a personal agent, writes go directly to+ * `agents.agencyConfig`; the member-selection policy takes effect only after+ * the Agent is published.** `local` is stored verbatim (`{ executionTarget: 'local', boundDeviceId: <me> }`)* so both desktop dispatch (in-process IPC — the fast path) and web dispatch@@ -41,7 +45,12 @@ import { useUserStore } from '@/store/user';export const useSelectExecutionTarget = (agentId: string) => {const agencyConfig = useAgentStore(agentByIdSelectors.getAgencyConfigById(agentId));const isHetero = useAgentStore(agentByIdSelectors.isAgentHeterogeneousById(agentId));- const isWorkspaceAgent = useAgentStore((s) => Boolean(s.agentMap[agentId]?.workspaceId));+ const isPublicWorkspaceAgent = useAgentStore((s) => {+ const agent = s.agentMap[agentId];+ return !!agent?.workspaceId && agent.visibility !== 'private';+ });+ const { canManageAgent, isAccessLoading } = useAgentManagementAccess(agentId);+ const usesWorkspaceMemberSelection = isPublicWorkspaceAgent && !canManageAgent;const updateAgentConfigById = useAgentStore((s) => s.updateAgentConfigById);const updateWorkspaceUserPreference = useUserStore((s) => s.updateWorkspaceUserPreference);@@ -57,10 +66,13 @@ export const useSelectExecutionTarget = (agentId: string) => {return useCallback(async (target: DeviceExecutionTarget, deviceId?: string) => {+ if (isAccessLoading) return;+// Fixed workspace agents are author-controlled. Keep any existing member// override dormant (so switching back to member choice restores it), but// never let this picker create or update an override while fixed.- if (isWorkspaceAgent && agencyConfig?.executionTargetSelectionPolicy === 'fixed') return;+ if (usesWorkspaceMemberSelection && agencyConfig?.executionTargetSelectionPolicy === 'fixed')+ return;const boundDeviceId = agencyConfig?.boundDeviceId;let nextBoundDeviceId = target === 'device' ? deviceId : boundDeviceId;@@ -92,7 +104,7 @@ export const useSelectExecutionTarget = (agentId: string) => {// `resolveExecutionTarget` already coerces a stored `local` +// `boundDeviceId` to `device` when a gateway is available, so the// server-side dispatch path Just Works — no need to pre-coerce here.- if (isWorkspaceAgent) {+ if (usesWorkspaceMemberSelection) {const nextOverrides = {...workspaceUserPreference.agentDeviceOverrides,[agentId]: {@@ -117,9 +129,10 @@ export const useSelectExecutionTarget = (agentId: string) => {agencyConfig,currentDeviceId,isHetero,- isWorkspaceAgent,+ isAccessLoading,updateAgentConfigById,updateWorkspaceUserPreference,+ usesWorkspaceMemberSelection,workspaceUserPreference,],);diff --git a/src/features/ChatInput/hooks/useToggleAgentMode.test.ts b/src/features/ChatInput/hooks/useToggleAgentMode.test.tsnew file mode 100644index 00000000000..78dd7523410--- /dev/null+++ b/src/features/ChatInput/hooks/useToggleAgentMode.test.ts@@ -0,0 +1,96 @@+import { act, renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import { useToggleAgentMode } from './useToggleAgentMode';++const testState = vi.hoisted(() => ({+ access: {+ canManageAgent: false,+ isAccessLoading: false,+ },+ agent: {+ current: undefined as { visibility?: 'private' | 'public'; workspaceId?: string } | undefined,+ },+ businessCanEnable: true,+ updateAgentChatConfig: vi.fn(),+ updateWorkspaceUserPreference: vi.fn(),+}));++vi.mock('@/business/client/hooks/useBusinessAgentMode', () => ({+ useBusinessCanEnableAgentMode: () => testState.businessCanEnable,+}));++vi.mock('@/features/ResourcePermission/useAgentManagementAccess', () => ({+ useAgentManagementAccess: () => testState.access,+}));++vi.mock('@/store/agent', () => ({+ useAgentStore: (selector: (s: typeof testState.agent) => unknown) => selector(testState.agent),+}));++vi.mock('@/store/agent/selectors', () => ({+ agentByIdSelectors: {+ getAgentById: () => (s: typeof testState.agent) => s.current,+ },+}));++vi.mock('@/store/user', () => ({+ useUserStore: (+ selector: (s: {+ updateWorkspaceUserPreference: typeof testState.updateWorkspaceUserPreference;+ }) => unknown,+ ) => selector({ updateWorkspaceUserPreference: testState.updateWorkspaceUserPreference }),+}));++vi.mock('./useAgentId', () => ({+ useAgentId: () => 'agent-1',+}));++vi.mock('./useUpdateAgentConfig', () => ({+ useUpdateAgentConfig: () => ({ updateAgentChatConfig: testState.updateAgentChatConfig }),+}));++describe('useToggleAgentMode', () => {+ beforeEach(() => {+ testState.access.canManageAgent = false;+ testState.access.isAccessLoading = false;+ testState.agent.current = undefined;+ testState.businessCanEnable = true;+ testState.updateAgentChatConfig = vi.fn();+ testState.updateWorkspaceUserPreference = vi.fn();+ });++ it('stores a public Workspace member mode as a personal preference', async () => {+ testState.agent.current = { visibility: 'public', workspaceId: 'workspace-1' };+ const { result } = renderHook(() => useToggleAgentMode());++ await act(() => result.current(false));++ expect(testState.updateWorkspaceUserPreference).toHaveBeenCalledWith({+ agentModeOverrides: { 'agent-1': false },+ });+ expect(testState.updateAgentChatConfig).not.toHaveBeenCalled();+ });++ it('updates the shared default for the author or Workspace admin', async () => {+ testState.access.canManageAgent = true;+ testState.agent.current = { visibility: 'public', workspaceId: 'workspace-1' };+ const { result } = renderHook(() => useToggleAgentMode());++ await act(() => result.current(true));++ expect(testState.updateAgentChatConfig).toHaveBeenCalledWith({ enableAgentMode: true });+ expect(testState.updateWorkspaceUserPreference).not.toHaveBeenCalled();+ });++ it('does not write while management access is unresolved', async () => {+ testState.access.isAccessLoading = true;+ testState.agent.current = { visibility: 'public', workspaceId: 'workspace-1' };+ const { result } = renderHook(() => useToggleAgentMode());++ await act(() => result.current(true));++ expect(testState.updateAgentChatConfig).not.toHaveBeenCalled();+ expect(testState.updateWorkspaceUserPreference).not.toHaveBeenCalled();+ });+});diff --git a/src/features/ChatInput/hooks/useToggleAgentMode.ts b/src/features/ChatInput/hooks/useToggleAgentMode.tsindex 6033ec6e7cb..b766606d68c 100644--- a/src/features/ChatInput/hooks/useToggleAgentMode.ts+++ b/src/features/ChatInput/hooks/useToggleAgentMode.ts@@ -3,6 +3,10 @@import { useCallback } from 'react';import { useBusinessCanEnableAgentMode } from '@/business/client/hooks/useBusinessAgentMode';+import { useAgentManagementAccess } from '@/features/ResourcePermission/useAgentManagementAccess';+import { useAgentStore } from '@/store/agent';+import { agentByIdSelectors } from '@/store/agent/selectors';+import { useUserStore } from '@/store/user';import { useAgentId } from './useAgentId';import { useUpdateAgentConfig } from './useUpdateAgentConfig';@@ -18,10 +22,33 @@ export const useToggleAgentMode = () => {const agentId = useAgentId();const { updateAgentChatConfig } = useUpdateAgentConfig();const canEnableBusinessAgentMode = useBusinessCanEnableAgentMode(agentId);+ const agent = useAgentStore(agentByIdSelectors.getAgentById(agentId));+ const { canManageAgent, isAccessLoading } = useAgentManagementAccess(agentId);+ const usesWorkspaceMemberMode =+ !!agent?.workspaceId && agent.visibility !== 'private' && !canManageAgent;+ const updateWorkspaceUserPreference = useUserStore((s) => s.updateWorkspaceUserPreference);return useCallback(- (enable: boolean) =>- updateAgentChatConfig({ enableAgentMode: enable && canEnableBusinessAgentMode }),- [canEnableBusinessAgentMode, updateAgentChatConfig],+ async (enable: boolean) => {+ if (isAccessLoading) return;++ const enableAgentMode = enable && canEnableBusinessAgentMode;+ if (usesWorkspaceMemberMode) {+ await updateWorkspaceUserPreference({+ agentModeOverrides: { [agentId]: enableAgentMode },+ });+ return;+ }++ await updateAgentChatConfig({ enableAgentMode });+ },+ [+ agentId,+ canEnableBusinessAgentMode,+ isAccessLoading,+ updateAgentChatConfig,+ updateWorkspaceUserPreference,+ usesWorkspaceMemberMode,+ ],);};diff --git a/src/features/Conversation/store/slices/generation/action.ts b/src/features/Conversation/store/slices/generation/action.tsindex 35d21461130..58266caa6de 100644--- a/src/features/Conversation/store/slices/generation/action.ts+++ b/src/features/Conversation/store/slices/generation/action.ts@@ -6,7 +6,7 @@ import type {ConversationContext,HeterogeneousProviderConfig,} from '@lobechat/types';-import { resolveAgencyConfig } from '@lobechat/types';+import { resolveAgentAgencyConfig } from '@lobechat/types';import { t } from 'i18next';import { type StateCreator } from 'zustand';@@ -38,6 +38,7 @@ import {import { messageMapKey } from '@/store/chat/utils/messageMapKey';import { getElectronStoreState } from '@/store/electron';import { getUserStoreState } from '@/store/user';+import { userProfileSelectors } from '@/store/user/selectors';import { type Store as ConversationStore } from '../../action';import { MAX_HETERO_AUTO_RETRIES } from './heteroRetryConfig';@@ -96,14 +97,22 @@ const settleGenerationEntry = (const getEffectiveAgencyConfig = (agentId: string) => {const agentState = getAgentStoreState();const sharedAgencyConfig = agentSelectors.getAgentConfigById(agentId)(agentState)?.agencyConfig;- const isWorkspaceAgent = agentByIdSelectors.isWorkspaceAgentById(agentId)(agentState);- const deviceOverride = isWorkspaceAgent+ const agent = agentByIdSelectors.getAgentById(agentId)(agentState);+ const currentUserId = userProfileSelectors.userId(getUserStoreState());+ const isAuthor = !!currentUserId && agent?.userId === currentUserId;+ const usesWorkspaceMemberSelection =+ !!agent?.workspaceId && agent.visibility !== 'private' && !isAuthor;+ const deviceOverride = usesWorkspaceMemberSelection? getUserStoreState().workspaceUserPreference.agentDeviceOverrides?.[agentId]: undefined;return {- agencyConfig: resolveAgencyConfig(sharedAgencyConfig, deviceOverride),- workspaceScoped: resolveWorkspaceScoped(isWorkspaceAgent, deviceOverride),+ agencyConfig: resolveAgentAgencyConfig(sharedAgencyConfig, deviceOverride, {+ canManage: isAuthor,+ visibility: agent?.visibility,+ workspaceId: agent?.workspaceId,+ }),+ workspaceScoped: resolveWorkspaceScoped(usesWorkspaceMemberSelection, deviceOverride),};};diff --git a/src/features/Conversation/store/slices/generation/continueHeteroAfterError.test.ts b/src/features/Conversation/store/slices/generation/continueHeteroAfterError.test.tsindex 0f696f82d3e..d5c7cfd0675 100644--- a/src/features/Conversation/store/slices/generation/continueHeteroAfterError.test.ts+++ b/src/features/Conversation/store/slices/generation/continueHeteroAfterError.test.ts@@ -29,6 +29,7 @@ vi.mock('@/store/chat/slices/agentRun/actions/dispatch/agentDispatcher', () => (}));let mockResumeSessionId: string | undefined = 'sess-1';+let mockAgentVisibility: 'private' | 'public' = 'public';let mockIsWorkspaceAgent = false;let mockSharedExecutionTarget: 'device' | 'local' = 'local';let mockWorkspaceOverride: { boundDeviceId: string; executionTarget: 'local' } | undefined;@@ -65,7 +66,10 @@ vi.mock('@/store/agent', () => ({vi.mock('@/store/agent/selectors', () => ({agentByIdSelectors: {- isWorkspaceAgentById: () => () => mockIsWorkspaceAgent,+ getAgentById: () => () =>+ mockIsWorkspaceAgent+ ? { visibility: mockAgentVisibility, workspaceId: 'workspace-1' }+ : undefined,},agentSelectors: {getAgentConfigById: () => () => ({@@ -159,6 +163,7 @@ const executorParams = () => mockExecuteHeterogeneousAgent.mock.calls[0][1];describe('continueHeteroAfterError', () => {beforeEach(() => {vi.clearAllMocks();+ mockAgentVisibility = 'public';mockResumeSessionId = 'sess-1';mockIsWorkspaceAgent = false;mockSharedExecutionTarget = 'local';@@ -300,6 +305,32 @@ describe('continueHeteroAfterError', () => {expect(mockExecuteHeterogeneousAgent).not.toHaveBeenCalled();});+ it('ignores a retained member device override while the Workspace Agent is private', async () => {+ mockAgentVisibility = 'private';+ mockIsWorkspaceAgent = true;+ mockSharedExecutionTarget = 'device';+ mockWorkspaceOverride = {+ boundDeviceId: 'personal-device',+ executionTarget: 'local',+ };+ const store = buildGroupStore([+ { content: 'looking', id: 'step-1', tools: [{ id: 'call-1' }] },+ { content: '', error: HETERO_RATE_LIMIT, id: 'step-2' },+ ]);++ await act(async () => {+ await store.getState().continueHeteroAfterError('step-1');+ });++ expect(mockSelectRuntimeType).toHaveBeenCalledWith(+ expect.objectContaining({+ boundDeviceId: 'workspace-device',+ executionTarget: 'device',+ isWorkspaceAgent: false,+ }),+ );+ });+it('ignores a tail error that is not a heterogeneous-agent status error', async () => {const store = buildGroupStore([{ content: 'looking', id: 'step-1', tools: [{ id: 'call-1' }] },diff --git a/src/features/Conversation/store/slices/generation/regenerateHeteroImages.test.ts b/src/features/Conversation/store/slices/generation/regenerateHeteroImages.test.tsindex 5306dda82f0..1e7c4595217 100644--- a/src/features/Conversation/store/slices/generation/regenerateHeteroImages.test.ts+++ b/src/features/Conversation/store/slices/generation/regenerateHeteroImages.test.ts@@ -48,6 +48,7 @@ vi.mock('@/store/agent', () => ({vi.mock('@/store/agent/selectors', () => ({agentByIdSelectors: {+ getAgentById: () => () => undefined,isWorkspaceAgentById: () => () => false,},agentSelectors: {diff --git a/src/features/Messenger/IntegrationDetail/Wechat.test.tsx b/src/features/Messenger/IntegrationDetail/Wechat.test.tsxindex 83ae65f4f22..4a9b3def467 100644--- a/src/features/Messenger/IntegrationDetail/Wechat.test.tsx+++ b/src/features/Messenger/IntegrationDetail/Wechat.test.tsx@@ -3,17 +3,22 @@ import type { ReactNode } from 'react';import { beforeEach, describe, expect, it, vi } from 'vitest';import { WechatQrSetup } from './Wechat';+import WechatPushSection from './WechatPush';const messengerServiceMocks = vi.hoisted(() => ({createWechatQrSession: vi.fn(),pollWechatQrSession: vi.fn(),}));+const useSWRMock = vi.hoisted(() => vi.fn());vi.mock('@lobehub/ui', () => ({Alert: ({ message }: { message?: ReactNode }) => <div>{message}</div>,Block: ({ children }: { children?: ReactNode }) => <div>{children}</div>,Flexbox: ({ children }: { children?: ReactNode }) => <div>{children}</div>,Icon: () => <span />,+ Input: () => <input />,+ Skeleton: { Button: () => <span>Loading</span> },+ Tag: ({ children }: { children?: ReactNode }) => <span>{children}</span>,Text: ({ children }: { children?: ReactNode }) => <span>{children}</span>,}));@@ -54,16 +59,29 @@ vi.mock('antd-style', () => ({vi.mock('react-i18next', () => ({useTranslation: () => ({- t: (key: string) =>- ({- 'messenger.wechat.connectCta': 'Connect WeChat',- 'messenger.wechat.qr.tip': 'Scan with WeChat',- 'messenger.wechat.qr.waiting': 'Waiting',- 'messenger.wechat.setupTitle': 'Set up WeChat',- })[key] ?? key,+ t: (key: string, params?: Record<string, number | string>) => {+ if (key === 'messenger.wechat.push.expiresIn') return `expires in ${params?.value}`;++ return (+ {+ 'messenger.wechat.connectCta': 'Connect WeChat',+ 'messenger.wechat.qr.tip': 'Scan with WeChat',+ 'messenger.wechat.qr.waiting': 'Waiting',+ 'messenger.wechat.setupTitle': 'Set up WeChat',+ 'messenger.wechat.push.description': 'WeChat send window description',+ 'messenger.wechat.push.sectionTitle': 'Message Push',+ 'messenger.wechat.push.title': 'Proactive messages',+ 'messenger.wechat.push.windowClosed': 'Closed',+ 'messenger.wechat.push.windowClosedHint': 'Reply in WeChat',+ 'messenger.wechat.push.windowOpen': 'Open',+ }[key] ?? key+ );+ },}),}));+vi.mock('swr', () => ({ default: useSWRMock }));+vi.mock('@/components/AsyncError', () => ({ default: () => null }));vi.mock('@/components/NeuralNetworkLoading', () => ({ default: () => <span>Loading</span> }));vi.mock('@/features/Workspace/useWorkspaceAwareNavigate', () => ({@@ -76,6 +94,7 @@ vi.mock('./shared', () => ({DetailLayout: ({ children }: { children?: ReactNode }) => <div>{children}</div>,IntegrationDetailSkeleton: () => null,UserAgentConnection: () => null,+ styles: { card: 'card', rowIcon: 'rowIcon', rowIdentity: 'rowIdentity' },useLinkActions: () => ({ handleSetActive: vi.fn(), handleUnlink: vi.fn() }),useMessengerData: () => ({ installations: [], links: [] }),}));@@ -109,3 +128,48 @@ describe('WechatQrSetup', () => {);});});++describe('WechatPushSection', () => {+ beforeEach(() => {+ useSWRMock.mockReturnValue({+ data: {+ expiresInSeconds: 3600,+ linked: true,+ maxSends: 10,+ queued: 0,+ remaining: 9,+ windowOpen: true,+ },+ mutate: vi.fn(),+ });+ });++ it('renders the section header with the send-window description while the window is open', () => {+ const { container } = render(<WechatPushSection />);++ expect(screen.getByText('Message Push')).toBeInTheDocument();+ expect(screen.getByText('WeChat send window description')).toBeInTheDocument();+ expect(screen.getByText('Open')).toBeInTheDocument();+ expect(screen.getByText('expires in ~1h')).toBeInTheDocument();+ expect(container).toHaveTextContent('9 / 10');+ });++ it('renders the send-window description while the window is closed', () => {+ useSWRMock.mockReturnValue({+ data: {+ expiresInSeconds: null,+ linked: true,+ maxSends: 10,+ queued: 0,+ remaining: 0,+ windowOpen: false,+ },+ mutate: vi.fn(),+ });++ render(<WechatPushSection />);++ expect(screen.getByText('WeChat send window description')).toBeInTheDocument();+ expect(screen.getByText('Closed')).toBeInTheDocument();+ });+});diff --git a/src/features/Messenger/IntegrationDetail/Wechat.tsx b/src/features/Messenger/IntegrationDetail/Wechat.tsxindex 7441c2a9dc9..9bee86375d4 100644--- a/src/features/Messenger/IntegrationDetail/Wechat.tsx+++ b/src/features/Messenger/IntegrationDetail/Wechat.tsx@@ -23,6 +23,7 @@ import {useMessengerData,UserAgentConnection,} from './shared';+import WechatPushSection from './WechatPush';const QR_POLL_INTERVAL_MS = 2000;const QR_SIZE = 220;@@ -284,6 +285,7 @@ const WechatDetail = memo<WechatDetailProps>(({ access, name, onBack }) => {return (<DetailLayouthasConnections+ extraSections={!paidBlocked && hasConnection ? <WechatPushSection /> : undefined}headerAction={headerAction}name={name}platform="wechat"diff --git a/src/features/Messenger/IntegrationDetail/WechatPush.tsx b/src/features/Messenger/IntegrationDetail/WechatPush.tsxnew file mode 100644index 00000000000..ae094c0f7b6--- /dev/null+++ b/src/features/Messenger/IntegrationDetail/WechatPush.tsx@@ -0,0 +1,247 @@+'use client';++import { Alert, Block, Flexbox, Icon, Input, Skeleton, Tag, Text } from '@lobehub/ui';+import { Button } from '@lobehub/ui/base-ui';+import { App } from 'antd';+import { createStaticStyles } from 'antd-style';+import { CheckCircle2Icon, ClockIcon, MoonIcon, RefreshCwIcon, SendIcon } from 'lucide-react';+import { memo, useState } from 'react';+import { useTranslation } from 'react-i18next';+import useSWR from 'swr';++import { messengerKeys } from '@/libs/swr/keys';+import { messengerService } from '@/services/messenger';++import { getMessengerErrorMessage } from '../i18n';+import { styles } from './shared';++const PUSH_WINDOW_REFRESH_INTERVAL = 5000;+const PUSH_WINDOW_DEFAULT_MAX_SENDS = 10;++const pushStyles = createStaticStyles(({ css, cssVar }) => ({+ quotaText: css`+ font-size: 13px;+ color: ${cssVar.colorText};+ white-space: nowrap;++ > span {+ color: ${cssVar.colorTextSecondary};+ }+ `,+ statBar: css`+ width: 4px;+ height: 16px;+ border-radius: 2px;+ background: ${cssVar.colorFillSecondary};++ &[data-filled='true'] {+ background: ${cssVar.colorInfo};+ }+ `,+}));++/** Discrete best-effort quota meter: one bar per locally tracked send. */+const QuotaBars = memo<{ remaining: number; total: number }>(({ remaining, total }) => (+ <Flexbox horizontal align="center" gap={3}>+ {Array.from({ length: total }, (_, index) => (+ <div className={pushStyles.statBar} data-filled={index < remaining} key={index} />+ ))}+ </Flexbox>+));+QuotaBars.displayName = 'MessengerWechatQuotaBars';++/**+ * "Message Push" section on the WeChat integration detail page.+ *+ * WeChat only lets the bot deliver messages inside a send window opened by the+ * user's own inbound message (10 sends / 24h). The section header condenses+ * that protocol constraint into its description, and the card makes the live+ * state visible — current window state, remaining quota, queued backlog — with+ * a self-serve test send so the capability can be verified without leaving the+ * page.+ */+const WechatPushSection = memo(() => {+ const { t } = useTranslation('messenger');+ const { message } = App.useApp();+ const [content, setContent] = useState('');+ const [sending, setSending] = useState(false);++ const windowSWR = useSWR(+ messengerKeys.pushWindow('wechat'),+ () => messengerService.getMessengerPushWindow('wechat'),+ {+ refreshInterval: PUSH_WINDOW_REFRESH_INTERVAL,+ refreshWhenHidden: false,+ refreshWhenOffline: false,+ },+ );+ const status = windowSWR.data;++ // The send affordance is gated on an open window: pushing outside it cannot+ // be delivered now anyway, and the state line already tells the user how to+ // open it (message the bot in WeChat). Queueing stays a backend concern for+ // server-side callers; the self-serve UI never lets the user send into a+ // closed window.+ const canPush = !!status?.windowOpen;++ const handleSend = async () => {+ const text = content.trim();+ if (!text || sending || !canPush) return;++ setSending(true);+ try {+ const result = await messengerService.sendMessengerPush({+ content: text,+ platform: 'wechat',+ });+ switch (result.status) {+ case 'sent': {+ message.success(+ t('messenger.wechat.push.sentToast', { remaining: result.remaining ?? 0 }),+ );+ setContent('');+ break;+ }+ case 'queued': {+ message.info(t('messenger.wechat.push.queuedToast'));+ setContent('');+ break;+ }+ case 'unlinked': {+ message.warning(t('messenger.wechat.push.unlinkedToast'));+ break;+ }+ default: {+ message.warning(t('messenger.wechat.push.unavailableToast'));+ }+ }+ await windowSWR.mutate();+ } catch (error) {+ message.error(getMessengerErrorMessage(error, t, 'messenger.wechat.push.unavailableToast'));+ } finally {+ setSending(false);+ }+ };++ const renderWindowState = () => {+ if (windowSWR.error)+ return (+ <Flexbox horizontal align="center" gap={8}>+ <Text type="secondary">{t('messenger.wechat.push.loadFailed')}</Text>+ <Button+ icon={<Icon icon={RefreshCwIcon} />}+ size="small"+ onClick={() => windowSWR.mutate()}+ >+ {t('messenger.wechat.retry')}+ </Button>+ </Flexbox>+ );++ if (!status) return <Skeleton.Button active size="small" style={{ width: 220 }} />;++ if (!status.windowOpen)+ return (+ <Flexbox horizontal align="center" gap={8} wrap="wrap">+ <Tag icon={<Icon icon={MoonIcon} size="small" />}>+ {t('messenger.wechat.push.windowClosed')}+ </Tag>+ <Text style={{ fontSize: 13 }} type="secondary">+ {t('messenger.wechat.push.windowClosedHint')}+ </Text>+ </Flexbox>+ );++ const expiryValue =+ status.expiresInSeconds === null+ ? null+ : status.expiresInSeconds >= 3600+ ? `~${Math.round(status.expiresInSeconds / 3600)}h`+ : `~${Math.max(1, Math.round(status.expiresInSeconds / 60))}m`;++ return (+ <Flexbox horizontal align="center" gap={8} justify="space-between" wrap="wrap">+ <Flexbox horizontal align="center" gap={8}>+ <Tag color="success" icon={<Icon icon={CheckCircle2Icon} size="small" />}>+ {t('messenger.wechat.push.windowOpen')}+ </Tag>+ {expiryValue && (+ <Tag icon={<Icon icon={ClockIcon} size="small" />}>+ {t('messenger.wechat.push.expiresIn', { value: expiryValue })}+ </Tag>+ )}+ </Flexbox>+ <Flexbox horizontal align="center" gap={8}>+ <QuotaBars remaining={status.remaining} total={status.maxSends} />+ <span className={pushStyles.quotaText}>+ {status.remaining}+ <span> / {status.maxSends}</span>+ </span>+ </Flexbox>+ </Flexbox>+ );+ };++ return (+ <Flexbox gap={8}>+ <Flexbox gap={2}>+ <Text strong style={{ fontSize: 15 }}>+ {t('messenger.wechat.push.sectionTitle')}+ </Text>+ <Text style={{ fontSize: 13 }} type="secondary">+ {t('messenger.wechat.push.description', {+ max: status?.maxSends ?? PUSH_WINDOW_DEFAULT_MAX_SENDS,+ })}+ </Text>+ </Flexbox>+ <Block className={styles.card}>+ <Flexbox gap={12}>+ <Flexbox horizontal align="center" gap={12}>+ <div className={styles.rowIcon}>+ <Icon icon={SendIcon} />+ </div>+ <Flexbox className={styles.rowIdentity} flex={1} gap={4}>+ <Text style={{ fontSize: 12 }} type="secondary">+ {t('messenger.wechat.push.title')}+ </Text>+ {renderWindowState()}+ </Flexbox>+ </Flexbox>++ <Flexbox gap={12} style={{ paddingInlineStart: 48 }}>+ {!!status?.queued && (+ <Alert+ showIcon+ message={t('messenger.wechat.push.queued', { count: status.queued })}+ type="info"+ />+ )}++ <Flexbox horizontal align="center" gap={8}>+ <Input+ disabled={sending || !canPush}+ placeholder={t('messenger.wechat.push.placeholder')}+ value={content}+ onChange={(e) => setContent(e.target.value)}+ onPressEnter={handleSend}+ />+ <Button+ disabled={!content.trim() || !canPush}+ icon={<Icon icon={SendIcon} />}+ loading={sending}+ type="primary"+ onClick={handleSend}+ >+ {t('messenger.wechat.push.send')}+ </Button>+ </Flexbox>+ </Flexbox>+ </Flexbox>+ </Block>+ </Flexbox>+ );+});++WechatPushSection.displayName = 'MessengerWechatPushSection';++export default WechatPushSection;diff --git a/src/features/Messenger/IntegrationDetail/shared.tsx b/src/features/Messenger/IntegrationDetail/shared.tsxindex 534eed3d632..38f5fc8cd33 100644--- a/src/features/Messenger/IntegrationDetail/shared.tsx+++ b/src/features/Messenger/IntegrationDetail/shared.tsx@@ -177,6 +177,9 @@ IntegrationDetailSkeleton.displayName = 'MessengerIntegrationDetailSkeleton';interface DetailLayoutProps {children?: ReactNode;+ /** Standalone sections (own title + card) rendered between the connections+ * section and the commands section. */+ extraSections?: ReactNode;hasConnections: boolean;headerAction: ReactNode;name: string;@@ -186,7 +189,16 @@ interface DetailLayoutProps {}export const DetailLayout = memo<DetailLayoutProps>(- ({ children, headerAction, hasConnections, name, onBack, platform, sectionTitle }) => {+ ({+ children,+ extraSections,+ headerAction,+ hasConnections,+ name,+ onBack,+ platform,+ sectionTitle,+ }) => {const { t } = useTranslation('messenger');return (@@ -224,6 +236,8 @@ export const DetailLayout = memo<DetailLayoutProps>(</Flexbox>)}+ {extraSections}+<CommandsSection platform={platform} /></Flexbox>);diff --git a/src/features/ResourcePermission/useAgentManagementAccess.test.tsx b/src/features/ResourcePermission/useAgentManagementAccess.test.tsxnew file mode 100644index 00000000000..d55dd637a9d--- /dev/null+++ b/src/features/ResourcePermission/useAgentManagementAccess.test.tsx@@ -0,0 +1,74 @@+import { renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import { useAgentManagementAccess } from './useAgentManagementAccess';++const testState = vi.hoisted(() => ({+ agent: undefined as+ { visibility?: 'private' | 'public'; workspaceId?: string | null } | undefined,+ permission: {+ canManageResource: false,+ isAccessResolved: true,+ isLoading: false,+ },+}));++vi.mock('@/features/ResourcePermission/useResourceAccess', () => ({+ useResourceAccess: () => testState.permission,+}));++vi.mock('@/hooks/usePermission', () => ({+ usePermission: () => ({ allowed: true }),+}));++vi.mock('@/store/agent', () => ({+ useAgentStore: (selector: (state: { agentMap: Record<string, unknown> }) => unknown) =>+ selector({ agentMap: testState.agent ? { 'agent-1': testState.agent } : {} }),+}));++vi.mock('@/store/agent/selectors', () => ({+ agentByIdSelectors: {+ getAgentById: (agentId: string) => (state: { agentMap: Record<string, unknown> }) =>+ state.agentMap[agentId],+ },+}));++describe('useAgentManagementAccess', () => {+ beforeEach(() => {+ testState.agent = undefined;+ testState.permission.canManageResource = false;+ testState.permission.isAccessResolved = true;+ testState.permission.isLoading = false;+ });++ it('fails closed while the Agent identity is loading', () => {+ const { result } = renderHook(() => useAgentManagementAccess('agent-1'));++ expect(result.current).toEqual({ canManageAgent: false, isAccessLoading: true });+ });++ it('uses server-confirmed management access for public Workspace Agents', () => {+ testState.agent = { visibility: 'public', workspaceId: 'workspace-1' };+ testState.permission.canManageResource = true;++ const { result } = renderHook(() => useAgentManagementAccess('agent-1'));++ expect(result.current).toEqual({ canManageAgent: true, isAccessLoading: false });+ });++ it('does not treat an ordinary public-resource editor as an Agent manager', () => {+ testState.agent = { visibility: 'public', workspaceId: 'workspace-1' };++ const { result } = renderHook(() => useAgentManagementAccess('agent-1'));++ expect(result.current).toEqual({ canManageAgent: false, isAccessLoading: false });+ });++ it('keeps personal and private Agents owner-controlled', () => {+ testState.agent = { visibility: 'private', workspaceId: 'workspace-1' };++ const { result } = renderHook(() => useAgentManagementAccess('agent-1'));++ expect(result.current).toEqual({ canManageAgent: true, isAccessLoading: false });+ });+});diff --git a/src/features/ResourcePermission/useAgentManagementAccess.ts b/src/features/ResourcePermission/useAgentManagementAccess.tsnew file mode 100644index 00000000000..cee02bdeaea--- /dev/null+++ b/src/features/ResourcePermission/useAgentManagementAccess.ts@@ -0,0 +1,32 @@+import { useResourceAccess } from '@/features/ResourcePermission/useResourceAccess';+import { usePermission } from '@/hooks/usePermission';+import { useAgentStore } from '@/store/agent';+import { agentByIdSelectors } from '@/store/agent/selectors';++/**+ * Resolve whether the current caller manages an Agent rather than merely+ * editing or using it through Workspace Member Permissions.+ *+ * Authors and Workspace admins (`canManage`) configure the shared Agent row;+ * ordinary members use the Agent's member-selection policy even when General+ * access grants them edit capability.+ */+export const useAgentManagementAccess = (agentId?: string) => {+ const agent = useAgentStore((s) =>+ agentId ? agentByIdSelectors.getAgentById(agentId)(s) : undefined,+ );+ const isAgentLoading = !!agentId && !agent;+ const isPublicWorkspaceAgent = !!agent?.workspaceId && agent.visibility !== 'private';+ const { allowed: canEditContent } = usePermission('edit_own_content');+ const { canManageResource, isAccessResolved, isLoading } = useResourceAccess(+ 'agent',+ isPublicWorkspaceAgent ? agentId : undefined,+ );++ return {+ canManageAgent:+ !isAgentLoading &&+ (!isPublicWorkspaceAgent || (isAccessResolved && canEditContent && canManageResource)),+ isAccessLoading: isAgentLoading || (isPublicWorkspaceAgent && (isLoading || !isAccessResolved)),+ };+};diff --git a/src/features/ResourcePermission/useResourceAccess.test.tsx b/src/features/ResourcePermission/useResourceAccess.test.tsxnew file mode 100644index 00000000000..7906446ae13--- /dev/null+++ b/src/features/ResourcePermission/useResourceAccess.test.tsx@@ -0,0 +1,67 @@+import { renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import type { ResourceGeneralAccess } from '@/services/resourcePermission';++import { useResourceAccess } from './useResourceAccess';++const testState = vi.hoisted(() => ({+ data: undefined as ResourceGeneralAccess | undefined,+ hasActiveWorkspace: true,+}));++vi.mock('@/business/client/hooks/useHasActiveWorkspace', () => ({+ useHasActiveWorkspace: () => testState.hasActiveWorkspace,+}));++vi.mock('@/libs/swr', () => ({+ useClientDataSWR: () => ({+ data: testState.data,+ error: undefined,+ isLoading: false,+ mutate: vi.fn(),+ }),+}));++describe('useResourceAccess', () => {+ beforeEach(() => {+ testState.data = undefined;+ testState.hasActiveWorkspace = true;+ });++ it('does not apply view-only Member Permissions to an Agent author or admin', () => {+ testState.data = {+ accessLevel: 'view',+ canManage: true,+ creatorId: 'creator',+ generalAccess: 'viewer',+ visibility: 'public',+ };++ const { result } = renderHook(() => useResourceAccess('agent', 'agent-1'));++ expect(result.current).toMatchObject({+ canEditResource: true,+ canManageResource: true,+ canUseResource: true,+ });+ });++ it('still applies view-only Member Permissions to an ordinary member', () => {+ testState.data = {+ accessLevel: 'view',+ canManage: false,+ creatorId: 'creator',+ generalAccess: 'viewer',+ visibility: 'public',+ };++ const { result } = renderHook(() => useResourceAccess('agent', 'agent-1'));++ expect(result.current).toMatchObject({+ canEditResource: false,+ canManageResource: false,+ canUseResource: false,+ });+ });+});diff --git a/src/features/ResourcePermission/useResourceAccess.ts b/src/features/ResourcePermission/useResourceAccess.tsindex ba5be319786..169cb6f4e71 100644--- a/src/features/ResourcePermission/useResourceAccess.ts+++ b/src/features/ResourcePermission/useResourceAccess.ts@@ -10,9 +10,10 @@ const FETCH_RESOURCE_PERMISSION_KEY = 'resource-permission';* Read-side derivation of the workspace General-access level for a resource.** Edit/use checks stay permissive while workspace access is loading so chat- * input does not flash disabled. Management checks are deliberately- * fail-closed: destructive/ownership controls must not appear until the- * server confirms creator/owner access. Personal mode keeps full access.+ * input does not flash disabled. A server-confirmed creator/admin (`canManage`)+ * bypasses the public resource's Member Permissions. Management checks are+ * deliberately fail-closed: destructive/ownership controls must not appear+ * until that access is confirmed. Personal mode keeps full access.*/export const useResourceAccess = (resourceType: PermissionResourceType,diff --git a/src/hooks/useEffectiveAgencyConfig.test.ts b/src/hooks/useEffectiveAgencyConfig.test.tsindex 48e00092d00..cbb681813a6 100644--- a/src/hooks/useEffectiveAgencyConfig.test.ts+++ b/src/hooks/useEffectiveAgencyConfig.test.ts@@ -6,15 +6,27 @@ import { useUserStore } from '@/store/user';import { useEffectiveAgencyConfig } from './useEffectiveAgencyConfig';+const managementAccess = vi.hoisted(() => ({+ canManageAgent: false,+ isAccessLoading: false,+}));++vi.mock('@/features/ResourcePermission/useAgentManagementAccess', () => ({+ useAgentManagementAccess: () => managementAccess,+}));+vi.mock('@/store/agent', () => ({ useAgentStore: vi.fn() }));vi.mock('@/store/agent/selectors', () => ({agentByIdSelectors: {getAgencyConfigById:(id: string) => (s: { agentMap: Record<string, { agencyConfig?: unknown }> }) =>s.agentMap[id]?.agencyConfig,- isWorkspaceAgentById:- (id: string) => (s: { agentMap: Record<string, { workspaceId?: string }> }) =>- Boolean(s.agentMap[id]?.workspaceId),+ getAgentById:+ (id: string) =>+ (s: {+ agentMap: Record<string, { visibility?: 'private' | 'public'; workspaceId?: string }>;+ }) =>+ s.agentMap[id],},}));vi.mock('@/store/user', () => ({ useUserStore: vi.fn() }));@@ -37,6 +49,7 @@ const setupStores = ({fetchedPreference,isLoading = false,override,+ visibility,workspaceId,}: {agencyConfig?: unknown;@@ -44,9 +57,10 @@ const setupStores = ({fetchedPreference?: unknown;isLoading?: boolean;override?: unknown;+ visibility?: 'private' | 'public';workspaceId?: string;} = {}) => {- const agentState = { agentMap: { 'agent-1': { agencyConfig, workspaceId } } };+ const agentState = { agentMap: { 'agent-1': { agencyConfig, visibility, workspaceId } } };const userState = {useFetchWorkspaceUserPreference: () => ({ data: fetchedPreference, isLoading }),workspaceUserPreference: { agentDeviceOverrides: override ? { 'agent-1': override } : {} },@@ -58,6 +72,8 @@ const setupStores = ({describe('useEffectiveAgencyConfig', () => {beforeEach(() => {vi.clearAllMocks();+ managementAccess.canManageAgent = false;+ managementAccess.isAccessLoading = false;});it('returns the shared config as-is for personal agents, ignoring any override', () => {@@ -93,6 +109,73 @@ describe('useEffectiveAgencyConfig', () => {expect(result.current.workspaceScoped).toBe(true);});+ it('ignores member overrides and policy while the Workspace Agent is private', () => {+ setupStores({+ agencyConfig: {+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ isLoading: true,+ override: { boundDeviceId: 'member-device', executionTarget: 'local' },+ visibility: 'private',+ workspaceId: 'ws-1',+ });++ const { result } = renderHook(() => useEffectiveAgencyConfig('agent-1'));++ expect(result.current).toEqual({+ agencyConfig: { boundDeviceId: 'owner-device', executionTarget: 'device' },+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,+ isPreferenceLoading: false,+ workspaceScoped: false,+ });+ });++ it('ignores member overrides and policy for the author or Workspace admin', () => {+ managementAccess.canManageAgent = true;+ setupStores({+ agencyConfig: {+ boundDeviceId: 'shared-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ override: { boundDeviceId: 'member-device', executionTarget: 'local' },+ visibility: 'public',+ workspaceId: 'ws-1',+ });++ const { result } = renderHook(() => useEffectiveAgencyConfig('agent-1'));++ expect(result.current).toEqual({+ agencyConfig: { boundDeviceId: 'shared-device', executionTarget: 'device' },+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,+ isPreferenceLoading: false,+ workspaceScoped: false,+ });+ });++ it('shows a read-only execution summary when an ordinary member is fixed to the shared target', () => {+ setupStores({+ agencyConfig: {+ boundDeviceId: 'shared-device',+ executionTarget: 'device',+ executionTargetSelectionPolicy: 'fixed',+ },+ visibility: 'public',+ workspaceId: 'ws-1',+ });++ const { result } = renderHook(() => useEffectiveAgencyConfig('agent-1'));++ expect(result.current).toMatchObject({+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: false,+ });+ });+it('preserves workspace scope when an override has no explicit execution target', () => {setupStores({ override: { boundDeviceId: 'my-device' }, workspaceId: 'ws-1' });@@ -106,6 +189,8 @@ describe('useEffectiveAgencyConfig', () => {setupStores({ isLoading: true, workspaceId: 'ws-1' });const workspaceResult = renderHook(() => useEffectiveAgencyConfig('agent-1'));expect(workspaceResult.result.current.isPreferenceLoading).toBe(true);+ expect(workspaceResult.result.current.canDisplayExecutionTarget).toBe(false);+ expect(workspaceResult.result.current.canSelectExecutionTarget).toBe(false);setupStores({ isLoading: true });const personalResult = renderHook(() => useEffectiveAgencyConfig('agent-1'));@@ -148,6 +233,8 @@ describe('useEffectiveAgencyConfig', () => {const { result } = renderHook(() => useEffectiveAgencyConfig(undefined));expect(result.current.agencyConfig).toBeUndefined();+ expect(result.current.canDisplayExecutionTarget).toBe(false);+ expect(result.current.canSelectExecutionTarget).toBe(false);expect(result.current.isPreferenceLoading).toBe(false);expect(result.current.workspaceScoped).toBe(false);});diff --git a/src/hooks/useEffectiveAgencyConfig.ts b/src/hooks/useEffectiveAgencyConfig.tsindex 40998e9b824..4cddd7d1221 100644--- a/src/hooks/useEffectiveAgencyConfig.ts+++ b/src/hooks/useEffectiveAgencyConfig.ts@@ -1,6 +1,7 @@import type { LobeAgentAgencyConfig } from '@lobechat/types';-import { resolveAgencyConfig } from '@lobechat/types';+import { resolveAgentAgencyConfig } from '@lobechat/types';+import { useAgentManagementAccess } from '@/features/ResourcePermission/useAgentManagementAccess';import { resolveWorkspaceScoped } from '@/helpers/executionTarget';import { useAgentStore } from '@/store/agent';import { agentByIdSelectors } from '@/store/agent/selectors';@@ -9,6 +10,10 @@ import { useUserStore } from '@/store/user';export interface UseEffectiveAgencyConfigResult {/** Shared `agents.agencyConfig` merged with the caller's per-agent override. */agencyConfig: LobeAgentAgencyConfig | undefined;+ /** Whether the execution target is ready to be shown as an effective runtime summary. */+ canDisplayExecutionTarget: boolean;+ /** Whether this caller may open the execution-target selector. */+ canSelectExecutionTarget: boolean;/*** The workspace preference fetch is still in flight. Until it settles, a* workspace agent's `agencyConfig` may reflect only the shared row — callers@@ -29,15 +34,16 @@ export interface UseEffectiveAgencyConfigResult {* The agent's EFFECTIVE `agencyConfig` for the current caller.** The workspace-shared `agents.agencyConfig` is one row per agent, but each- * member picks their own execution device (LOBE-11689) — that pick lives in+ * member picks their own execution device after the Agent is public+ * (LOBE-11689) — that pick lives in* `workspace_user_settings.preference.agentDeviceOverrides[agentId]` and must- * be merged over the shared row via `resolveAgencyConfig` at read time.+ * be merged over the shared row via `resolveAgentAgencyConfig` at read time.* Reading the shared row alone shows whichever device landed there (usually* the creator's machine) instead of this member's choice.*- * Personal agents have a single owner whose choice IS the shared config, so- * the override is only applied for workspace agents — mirroring the write- * side (`useSelectExecutionTarget`).+ * Personal and Private Workspace Agents have a single owner whose choice IS+ * the shared config, so the override and member policy are applied only for+ * public Workspace Agents — mirroring the write side (`useSelectExecutionTarget`).** Self-populates the workspace preference cache (SWR dedupes across callers;* personal mode short-circuits without a network call).@@ -46,9 +52,12 @@ export const useEffectiveAgencyConfig = (agentId?: string): UseEffectiveAgencyCoconst sharedAgencyConfig = useAgentStore((s) =>agentId ? agentByIdSelectors.getAgencyConfigById(agentId)(s) : undefined,);- const isWorkspaceAgent = useAgentStore((s) =>- agentId ? agentByIdSelectors.isWorkspaceAgentById(agentId)(s) : false,+ const agent = useAgentStore((s) =>+ agentId ? agentByIdSelectors.getAgentById(agentId)(s) : undefined,);+ const { canManageAgent, isAccessLoading } = useAgentManagementAccess(agentId);+ const usesWorkspaceMemberSelection =+ !!agent?.workspaceId && agent.visibility !== 'private' && !canManageAgent;// Prefer the SWR response over the store bucket: the SWR cache is keyed by// the ACTIVE workspace, while the zustand bucket is a single un-keyed slot —@@ -64,10 +73,19 @@ export const useEffectiveAgencyConfig = (agentId?: string): UseEffectiveAgencyCoconst storePreference = useUserStore((s) => s.workspaceUserPreference);const preference = fetchedPreference === undefined ? storePreference : (fetchedPreference ?? {});const override = agentId ? preference.agentDeviceOverrides?.[agentId] : undefined;+ const agencyConfig = resolveAgentAgencyConfig(sharedAgencyConfig, override, {+ canManage: canManageAgent,+ visibility: agent?.visibility,+ workspaceId: agent?.workspaceId,+ });+ const isPreferenceLoading = isAccessLoading || (usesWorkspaceMemberSelection && isLoading);return {- agencyConfig: resolveAgencyConfig(sharedAgencyConfig, isWorkspaceAgent ? override : undefined),- isPreferenceLoading: isWorkspaceAgent && isLoading,- workspaceScoped: resolveWorkspaceScoped(isWorkspaceAgent, override),+ agencyConfig,+ canDisplayExecutionTarget: !!agentId && !isPreferenceLoading,+ canSelectExecutionTarget:+ !!agentId && !isPreferenceLoading && agencyConfig?.executionTargetSelectionPolicy !== 'fixed',+ isPreferenceLoading,+ workspaceScoped: resolveWorkspaceScoped(usesWorkspaceMemberSelection, override),};};diff --git a/src/hooks/useRemoteAgentDeviceGuard.test.ts b/src/hooks/useRemoteAgentDeviceGuard.test.tsindex 706fa8dd023..503bf66f190 100644--- a/src/hooks/useRemoteAgentDeviceGuard.test.ts+++ b/src/hooks/useRemoteAgentDeviceGuard.test.ts@@ -29,6 +29,8 @@ describe('useRemoteAgentDeviceGuard', () => {executionTarget: 'device',heterogeneousProvider: { type: 'codex' },},+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,isPreferenceLoading: false,workspaceScoped: false,});@@ -49,6 +51,8 @@ describe('useRemoteAgentDeviceGuard', () => {executionTarget: 'device',heterogeneousProvider: { type: 'claude-code' },},+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,isPreferenceLoading: false,workspaceScoped: false,});@@ -66,6 +70,8 @@ describe('useRemoteAgentDeviceGuard', () => {executionTarget: 'device',heterogeneousProvider: { type: 'codex' },},+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,isPreferenceLoading: true,workspaceScoped: true,});@@ -79,6 +85,8 @@ describe('useRemoteAgentDeviceGuard', () => {it('reports no-device when nothing is bound', async () => {mockedUseEffectiveAgencyConfig.mockReturnValue({agencyConfig: { heterogeneousProvider: { type: 'codex' } },+ canDisplayExecutionTarget: true,+ canSelectExecutionTarget: true,isPreferenceLoading: false,workspaceScoped: false,});diff --git a/src/libs/swr/keys.ts b/src/libs/swr/keys.tsindex 0f1a8feeaf9..ce47b62fcde 100644--- a/src/libs/swr/keys.ts+++ b/src/libs/swr/keys.ts@@ -763,6 +763,7 @@ export const messengerKeys = {tokenScopeKey,]),peek: def('messenger:peek', (randomId: string) => ['messenger:peek', randomId]),+ pushWindow: def('messenger:pushWindow', (platform: string) => ['messenger:pushWindow', platform]),};// ---- verify (deliverable judging) ---------------------------------------diff --git a/src/routes/(main)/agent/_layout/Sidebar/Header/Agent/SwitchPanel.tsx b/src/routes/(main)/agent/_layout/Sidebar/Header/Agent/SwitchPanel.tsxindex dd73219bc9a..b74719f9bff 100644--- a/src/routes/(main)/agent/_layout/Sidebar/Header/Agent/SwitchPanel.tsx+++ b/src/routes/(main)/agent/_layout/Sidebar/Header/Agent/SwitchPanel.tsx@@ -12,6 +12,7 @@ import AgentListContent from '@/routes/(main)/home/_layout/Body/Agent/List/Agentimport { AgentModalProvider } from '@/routes/(main)/home/_layout/Body/Agent/ModalProvider';import PrivateList from '@/routes/(main)/home/_layout/Body/Private/List';import { useHomeStore } from '@/store/home';+import { homeAgentListSelectors } from '@/store/home/selectors';const styles = createStaticStyles(({ cssVar, css }) => ({sectionHeader: css`@@ -49,9 +50,7 @@ const SwitchPanel = memo<PropsWithChildren>(({ children }) => {// Only show the "私人 / 工作区" split when the user actually has private// items in this workspace — a lone Private header above an empty section// would be noise.- const hasPrivateItems = useHomeStore(- (s) => s.privateAgentGroups.length > 0 || s.privateUngroupedAgents.length > 0,- );+ const hasPrivateItems = useHomeStore(homeAgentListSelectors.hasPrivateAgents);const showPrivateSection = Boolean(activeWorkspaceId) && hasPrivateItems;const handleMoreClick = useCallback(() => navigate('/'), [navigate]);diff --git a/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.test.tsx b/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.test.tsxindex c3fb3dce3fb..e4d121b1b90 100644--- a/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.test.tsx+++ b/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.test.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react';import type { ReactNode } from 'react';-import { describe, expect, it, vi } from 'vitest';+import { beforeEach, describe, expect, it, vi } from 'vitest';import { WorkspaceAgentModelPolicy } from './WorkspaceAgentModelPolicy';@@ -33,13 +33,24 @@ vi.mock('@/features/ModelSelect', () => ({}));vi.mock('./WorkspaceAgentPolicyCard', () => ({- WorkspaceAgentPolicyCard: ({ children, title }: { children: ReactNode; title: string }) => (+ WorkspaceAgentPolicyCard: ({+ action,+ children,+ title,+ }: {+ action: ReactNode;+ children: ReactNode;+ title: string;+ }) => (<div><span>{title}</span>+ {action}{children}</div>),- WorkspaceAgentSelectionPolicyMenu: () => <div data-testid="policy-menu" />,+ WorkspaceAgentSelectionPolicyMenu: ({ locked }: { locked: boolean }) => (+ <div data-locked={String(locked)} data-testid="policy-menu" />+ ),}));vi.mock('@/store/agent', () => ({@@ -48,6 +59,15 @@ vi.mock('@/store/agent', () => ({}));describe('WorkspaceAgentModelPolicy', () => {+ beforeEach(() => {+ testState.agent.agentMap['agent-1'] = {+ agencyConfig: { modelSelectionPolicy: 'member' },+ model: 'gpt-4',+ visibility: 'public',+ workspaceId: 'workspace-1',+ };+ });+it('renders the policy card for a loaded workspace agent', () => {render(<WorkspaceAgentModelPolicy agentId="agent-1" />);@@ -55,6 +75,19 @@ describe('WorkspaceAgentModelPolicy', () => {expect(screen.getByTestId('model-select')).toBeTruthy();});+ it('shows a legacy public Workspace Agent without a persisted policy as unlocked', () => {+ testState.agent.agentMap['agent-1'] = {+ agencyConfig: undefined,+ model: 'gpt-4',+ visibility: 'public',+ workspaceId: 'workspace-1',+ };++ render(<WorkspaceAgentModelPolicy agentId="agent-1" />);++ expect(screen.getByTestId('policy-menu').getAttribute('data-locked')).toBe('false');+ });+it('renders nothing instead of crashing while the agent config is not loaded yet', () => {const { container } = render(<WorkspaceAgentModelPolicy agentId="missing-agent" />);diff --git a/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.tsx b/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.tsxindex accb08adbf8..d47cc1f35e6 100644--- a/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.tsx+++ b/src/routes/(main)/agent/profile/features/ProfileEditor/WorkspaceAgentModelPolicy.tsx@@ -1,5 +1,6 @@'use client';+import { resolveAgentModelSelectionPolicy } from '@lobechat/types';import isEqual from 'fast-deep-equal';import { Bot } from 'lucide-react';import { memo } from 'react';@@ -28,7 +29,12 @@ export const WorkspaceAgentModelPolicy = memo<WorkspaceAgentModelPolicyProps>(({const updateAgentConfigById = useAgentStore((s) => s.updateAgentConfigById);if (!agent?.workspaceId || !config) return null;- const isLocked = config.agencyConfig?.modelSelectionPolicy !== 'member';+ const isLocked =+ resolveAgentModelSelectionPolicy({+ agencyConfig: config.agencyConfig,+ visibility: agent.visibility,+ workspaceId: agent.workspaceId,+ }) !== 'member';const labelKeys = getWorkspaceAgentSelectionPolicyLabelKeys(agent.visibility === 'private');diff --git a/src/routes/(main)/group/_layout/Sidebar/AddGroupMemberModal/AvailableAgentList.tsx b/src/routes/(main)/group/_layout/Sidebar/AddGroupMemberModal/AvailableAgentList.tsxindex 9834c339bd8..1f03a15d7ae 100644--- a/src/routes/(main)/group/_layout/Sidebar/AddGroupMemberModal/AvailableAgentList.tsx+++ b/src/routes/(main)/group/_layout/Sidebar/AddGroupMemberModal/AvailableAgentList.tsx@@ -51,13 +51,15 @@ const AvailableAgentList = memo<AvailableAgentListProps>(({ agents, isLoading })// store so we can bucket the modal's flat list into private/workspace// sections without changing the shared `AvailableAgentItem` payload.const privateGroups = useHomeStore(homeAgentListSelectors.privateAgentGroups, isEqual);+ const privatePinned = useHomeStore(homeAgentListSelectors.privatePinnedAgents, isEqual);const privateUngrouped = useHomeStore(homeAgentListSelectors.privateUngroupedAgents, isEqual);const privateAgentIds = useMemo(() => {const ids = new Set<string>();for (const g of privateGroups) for (const a of g.items) ids.add(a.id);+ for (const a of privatePinned) ids.add(a.id);for (const a of privateUngrouped) ids.add(a.id);return ids;- }, [privateGroups, privateUngrouped]);+ }, [privateGroups, privatePinned, privateUngrouped]);const handleSearchChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {setSearchTerm(e.target.value);diff --git a/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.test.tsx b/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.test.tsxnew file mode 100644index 00000000000..0a8eade8758--- /dev/null+++ b/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.test.tsx@@ -0,0 +1,150 @@+import { renderHook } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import { useAgentDropdownMenu } from './useDropdownMenu';++const mocks = vi.hoisted(() => ({+ canCreate: true,+ canEdit: true,+ canEditResource: false,+ home: {+ duplicateAgent: vi.fn(),+ pinAgent: vi.fn(),+ refreshAgentList: vi.fn(),+ removeAgent: vi.fn(),+ updateAgentGroup: vi.fn(),+ },+ openAgentInNewWindow: vi.fn(),+}));++vi.mock('antd', async (importOriginal) => {+ const actual = await importOriginal<Record<string, unknown>>();++ return {+ ...actual,+ App: Object.assign(actual.App as object, {+ useApp: () => ({+ message: { error: vi.fn(), success: vi.fn() },+ }),+ }),+ };+});++vi.mock('react-i18next', () => ({+ useTranslation: () => ({ t: (key: string) => key }),+}));++vi.mock('@/business/client/hooks/useActiveWorkspaceId', () => ({+ useActiveWorkspaceId: () => 'workspace-1',+}));++vi.mock('@/business/client/hooks/useAgentTransferMenuItem', () => ({+ useAgentTransferMenuItem: () => null,+}));++vi.mock('@/features/EditingPopover/store', () => ({ openEditingPopover: vi.fn() }));++vi.mock('@/features/ResourcePermission/useResourceAccess', () => ({+ useResourceAccess: () => ({+ canEditResource: mocks.canEditResource,+ isAccessResolved: true,+ }),+}));++vi.mock('@/features/VisibilityConfirmContent', () => ({ default: () => null }));++vi.mock('@/hooks/usePermission', () => ({+ usePermission: (action: 'create_content' | 'edit_own_content') => ({+ allowed: action === 'create_content' ? mocks.canCreate : mocks.canEdit,+ reason: '',+ }),+}));++vi.mock('@/hooks/useResourceManageable', () => ({+ useResourceManageable: () => false,+}));++vi.mock('@/services/agent', () => ({ agentService: {} }));++vi.mock('@/store/global', () => ({+ useGlobalStore: (selector: (state: { openAgentInNewWindow: typeof vi.fn }) => unknown) =>+ selector({ openAgentInNewWindow: mocks.openAgentInNewWindow }),+}));++vi.mock('@/store/home', () => ({+ useHomeStore: (selector: (state: typeof mocks.home) => unknown) => selector(mocks.home),+}));++vi.mock('@/store/home/selectors', () => ({+ homeAgentListSelectors: {+ agentGroups: () => [],+ privateAgentGroups: () => [],+ },+}));++vi.mock('@/store/user', () => ({+ useUserStore: (selector: (state: { userId: string }) => unknown) =>+ selector({ userId: 'member-1' }),+}));++vi.mock('@/store/user/selectors', () => ({+ userProfileSelectors: { userId: (state: { userId: string }) => state.userId },+}));++vi.mock('../../../../hooks', () => ({ useRevealSidebarSection: () => vi.fn() }));++const getMenuKeys = (items: ReturnType<ReturnType<typeof useAgentDropdownMenu>>) =>+ (items ?? []).flatMap((item) =>+ item && typeof item === 'object' && 'key' in item && item.key ? [item.key] : [],+ );++describe('useAgentDropdownMenu', () => {+ beforeEach(() => {+ vi.clearAllMocks();+ mocks.canCreate = true;+ mocks.canEdit = true;+ mocks.canEditResource = false;+ });++ it('keeps non-config actions available to a use-only Workspace member', () => {+ const { result } = renderHook(() =>+ useAgentDropdownMenu({+ anchor: null,+ group: undefined,+ id: 'agent-1',+ openCreateGroupModal: vi.fn(),+ pinned: false,+ title: 'Public Agent',+ userId: 'creator-1',+ visibility: 'public',+ }),+ );++ expect(getMenuKeys(result.current())).toEqual([+ 'pin',+ 'duplicate',+ 'openInNewWindow',+ 'moveGroup',+ ]);+ });++ it('keeps write actions hidden from a Workspace viewer', () => {+ mocks.canCreate = false;+ mocks.canEdit = false;++ const { result } = renderHook(() =>+ useAgentDropdownMenu({+ anchor: null,+ group: undefined,+ id: 'agent-1',+ openCreateGroupModal: vi.fn(),+ pinned: false,+ title: 'Public Agent',+ userId: 'creator-1',+ visibility: 'public',+ }),+ );++ expect(getMenuKeys(result.current())).toEqual(['openInNewWindow']);+ });+});diff --git a/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.tsx b/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.tsxindex 5f3424eceb1..93ff623b9bb 100644--- a/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.tsx+++ b/src/routes/(main)/home/_layout/Body/Agent/List/AgentItem/useDropdownMenu.tsx@@ -109,8 +109,8 @@ export const useAgentDropdownMenu = ({!!currentUserId &&userId === currentUserId;- // Chat-only resource access hides configuration mutations entirely. The- // pure navigation action remains available to Can use members and viewers.+ // Member Permissions only gate Agent configuration. Workspace-level list+ // organization (pin/group) and duplication remain available to members.const { allowed: canEdit } = usePermission('edit_own_content');const { allowed: canCreate } = usePermission('create_content');const { canEditResource, isAccessResolved } = useResourceAccess('agent', id);@@ -143,7 +143,7 @@ export const useAgentDropdownMenu = ({return useMemo(() => () =>[- ...(canConfigure+ ...(canEdit? [{icon: <Icon icon={pinned ? PinOff : Pin} />,@@ -151,6 +151,10 @@ export const useAgentDropdownMenu = ({label: t(pinned ? 'pinOff' : 'pin'),onClick: () => pinAgent(id, !pinned),},+ ]+ : []),+ ...(canConfigure+ ? [{// Renaming is config co-editing, which stays collaborative for// shared agents — only ownership actions remain creator/owner-scoped.@@ -164,14 +168,16 @@ export const useAgentDropdownMenu = ({}},},+ ]+ : []),+ ...(canCreate+ ? [{- disabled: !canCreate,icon: <Icon icon={LucideCopy} />,key: 'duplicate',label: t('duplicate', { ns: 'common' }),onClick: ({ domEvent }: any) => {domEvent.stopPropagation();- if (!canCreate) return;duplicateAgent(id);},},@@ -186,7 +192,7 @@ export const useAgentDropdownMenu = ({openAgentInNewWindow(id);},},- ...(canConfigure+ ...(canEdit? [{ type: 'divider' as const },{@@ -218,6 +224,10 @@ export const useAgentDropdownMenu = ({key: 'moveGroup',label: t('sessionGroup.moveGroup'),},+ ]+ : []),+ ...(canConfigure+ ? [...(transferMenuItems?.length? [{ type: 'divider' as const }, ...transferMenuItems]: []),@@ -352,6 +362,7 @@ export const useAgentDropdownMenu = ({anchor,canCreate,canConfigure,+ canEdit,canManage,pinned,id,diff --git a/src/routes/(main)/home/_layout/Body/Private/List.tsx b/src/routes/(main)/home/_layout/Body/Private/List.tsxindex a83fad73c66..6d4a8caab68 100644--- a/src/routes/(main)/home/_layout/Body/Private/List.tsx+++ b/src/routes/(main)/home/_layout/Body/Private/List.tsx@@ -22,13 +22,14 @@ interface PrivateListProps {onMoreClick?: () => void;}-// Renders only the workspace-private bucket: private folders followed by-// private ungrouped agents/chat groups. The server already filters out+// Renders only the workspace-private bucket: pinned private items, then+// private folders, then ungrouped agents/chat groups. The server already filters out// items the viewer can't see (other members' private rows), so this list// is always the viewer's own.const PrivateList = memo<PrivateListProps>(({ hideCreateButton, onMoreClick }) => {const { t } = useTranslation('chat');const isInit = useHomeStore(homeAgentListSelectors.isAgentListInit);+ const privatePinned = useHomeStore(homeAgentListSelectors.privatePinnedAgents, isEqual);const privateGroups = useHomeStore(homeAgentListSelectors.privateAgentGroups, isEqual);const privateAgentPageSize = useGlobalStore(systemStatusSelectors.privateAgentPageSize);const privateUngrouped = useHomeStore(@@ -40,6 +41,7 @@ const PrivateList = memo<PrivateListProps>(({ hideCreateButton, onMoreClick }) =if (!isInit) return <SkeletonList rows={2} />;+ const hasPinned = privatePinned.length > 0;const hasGroups = privateGroups.length > 0;const hasUngrouped = privateUngrouped.length > 0;const hasMore = privateUngroupedCount > privateAgentPageSize;@@ -49,7 +51,7 @@ const PrivateList = memo<PrivateListProps>(({ hideCreateButton, onMoreClick }) =// Empty state still surfaces the create-button so a fresh user has an// obvious affordance for their first private agent.- if (!hasGroups && !hasUngrouped) {+ if (!hasPinned && !hasGroups && !hasUngrouped) {if (hideCreateButton) return null;return (<Flexbox gap={1} paddingBlock={1}>@@ -60,6 +62,7 @@ const PrivateList = memo<PrivateListProps>(({ hideCreateButton, onMoreClick }) =return (<Flexbox gap={1} paddingBlock={1}>+ {hasPinned && <SessionList dataSource={privatePinned} />}{hasGroups && <Group dataSource={privateGroups} />}{hasUngrouped && <SessionList dataSource={privateUngrouped} />}{hasMore && (diff --git a/src/routes/(main)/home/features/InputArea/useSend.test.ts b/src/routes/(main)/home/features/InputArea/useSend.test.tsindex e4ab56d6bd3..bd4e9bfee1d 100644--- a/src/routes/(main)/home/features/InputArea/useSend.test.ts+++ b/src/routes/(main)/home/features/InputArea/useSend.test.ts@@ -41,6 +41,7 @@ const homeState = vi.hoisted(() => ({isAgentListInit: true,pinnedAgents: [],privateAgentGroups: [],+ privatePinnedAgents: [],privateUngroupedAgents: [],sendAsAgent: vi.fn(),sendAsGroup: vi.fn(),diff --git a/src/services/agent.ts b/src/services/agent.tsindex 19489ac5e2c..4c1cb2da212 100644--- a/src/services/agent.ts+++ b/src/services/agent.ts@@ -311,6 +311,24 @@ class AgentService {targetWorkspaceId,});};++ /**+ * Batch transfer: moves all agents in one request / one DB transaction+ * instead of a serial per-agent call chain.+ */+ transferAgents = async (+ agentIds: string[],+ targetWorkspaceId: string | null,+ targetVisibility?: 'private' | 'public',+ targetAccessLevel?: 'edit' | 'use',+ ): Promise<{ agentId: string; slug: string | null }[]> => {+ return lambdaClient.agent.transferAgents.mutate({+ agentIds,+ targetAccessLevel,+ targetVisibility,+ targetWorkspaceId,+ });+ };}export const agentService = new AgentService();diff --git a/src/services/chat/mecha/agentConfigResolver.test.ts b/src/services/chat/mecha/agentConfigResolver.test.tsindex 70b359db225..998824c1ac0 100644--- a/src/services/chat/mecha/agentConfigResolver.test.ts+++ b/src/services/chat/mecha/agentConfigResolver.test.ts@@ -52,7 +52,7 @@ describe('resolveAgentConfig', () => {vi.spyOn(agentSelectors.chatConfigByIdSelectors, 'getChatConfigById').mockReturnValue(() => mockChatConfig as any,);- useUserStore.setState({ workspaceUserPreference: {} });+ useUserStore.setState({ user: undefined, workspaceUserPreference: {} });});describe('regular agent (non-builtin)', () => {@@ -176,7 +176,7 @@ describe('resolveAgentConfig', () => {expect(result.agentConfig.provider).toBe('member-provider');});- it('ignores a retained member model override when the workspace policy is missing', () => {+ it('uses a retained member model override when a legacy workspace policy is missing', () => {vi.spyOn(agentSelectors.agentByIdSelectors, 'getAgentById').mockReturnValue(() => ({ visibility: 'public', workspaceId: 'workspace-1' }) as any,);@@ -193,6 +193,32 @@ describe('resolveAgentConfig', () => {const result = resolveAgentConfig({ agentId: 'test-agent' });+ expect(result.agentConfig.model).toBe('member-model');+ expect(result.agentConfig.provider).toBe('member-provider');+ });++ it('ignores a retained member model override when the workspace policy is fixed', () => {+ vi.spyOn(agentSelectors.agentByIdSelectors, 'getAgentById').mockReturnValue(+ () => ({ visibility: 'public', workspaceId: 'workspace-1' }) as any,+ );+ vi.spyOn(agentSelectors.agentSelectors, 'getAgentConfigById').mockReturnValue(+ () =>+ ({+ ...mockAgentConfig,+ agencyConfig: { modelSelectionPolicy: 'fixed' },+ provider: 'openai',+ }) as any,+ );+ useUserStore.setState({+ workspaceUserPreference: {+ agentModelOverrides: {+ 'test-agent': { model: 'member-model', provider: 'member-provider' },+ },+ },+ });++ const result = resolveAgentConfig({ agentId: 'test-agent' });+expect(result.agentConfig.model).toBe('gpt-4');expect(result.agentConfig.provider).toBe('openai');});@@ -223,6 +249,43 @@ describe('resolveAgentConfig', () => {expect(result.agentConfig.provider).toBe('openai');});+ it('uses an ordinary member personal Agent/Chat mode for a public Workspace Agent', () => {+ vi.spyOn(agentSelectors.agentByIdSelectors, 'getAgentById').mockReturnValue(+ () => ({ userId: 'author-1', visibility: 'public', workspaceId: 'workspace-1' }) as any,+ );+ vi.spyOn(agentSelectors.chatConfigByIdSelectors, 'getChatConfigById').mockReturnValue(+ () => ({ enableAgentMode: true, enableStreaming: true }) as any,+ );+ useUserStore.setState({+ user: { id: 'member-1' } as any,+ workspaceUserPreference: { agentModeOverrides: { 'test-agent': false } },+ });++ const result = resolveAgentConfig({ agentId: 'test-agent' });++ expect(result.chatConfig).toMatchObject({+ enableAgentMode: false,+ enableStreaming: true,+ });+ });++ it('ignores a personal mode override for the public Workspace Agent author', () => {+ vi.spyOn(agentSelectors.agentByIdSelectors, 'getAgentById').mockReturnValue(+ () => ({ userId: 'author-1', visibility: 'public', workspaceId: 'workspace-1' }) as any,+ );+ vi.spyOn(agentSelectors.chatConfigByIdSelectors, 'getChatConfigById').mockReturnValue(+ () => ({ enableAgentMode: true }) as any,+ );+ useUserStore.setState({+ user: { id: 'author-1' } as any,+ workspaceUserPreference: { agentModeOverrides: { 'test-agent': false } },+ });++ const result = resolveAgentConfig({ agentId: 'test-agent' });++ expect(result.chatConfig.enableAgentMode).toBe(true);+ });+describe('params adjustment based on chatConfig', () => {const mockAgentConfigWithParams = {model: 'gpt-4',diff --git a/src/services/chat/mecha/agentConfigResolver.ts b/src/services/chat/mecha/agentConfigResolver.tsindex 37f6da1e9f4..b1a3e009e09 100644--- a/src/services/chat/mecha/agentConfigResolver.ts+++ b/src/services/chat/mecha/agentConfigResolver.ts@@ -23,7 +23,7 @@ import {import { getChatGroupStoreState } from '@/store/agentGroup';import { agentGroupByIdSelectors, agentGroupSelectors } from '@/store/agentGroup/selectors';import { useUserStore } from '@/store/user';-import { userGeneralSettingsSelectors } from '@/store/user/selectors';+import { userGeneralSettingsSelectors, userProfileSelectors } from '@/store/user/selectors';import { isDev } from '@/utils/env';const log = debug('mecha:agentConfigResolver');@@ -190,18 +190,33 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge// Get base config from storeconst sharedAgentConfig = agentSelectors.getAgentConfigById(agentId)(agentStoreState);const agent = agentByIdSelectors.getAgentById(agentId)(agentStoreState);- const usesWorkspaceMemberSelection = !!agent?.workspaceId && agent.visibility !== 'private';+ const currentUserId = userProfileSelectors.userId(useUserStore.getState());+ const isAuthor = !!currentUserId && agent?.userId === currentUserId;+ const usesWorkspaceMemberSelection =+ !!agent?.workspaceId && agent.visibility !== 'private' && !isAuthor;const memberModelOverride = usesWorkspaceMemberSelection? useUserStore.getState().workspaceUserPreference.agentModelOverrides?.[agentId]: undefined;+ const memberModeOverride = usesWorkspaceMemberSelection+ ? useUserStore.getState().workspaceUserPreference.agentModeOverrides?.[agentId]+ : undefined;const agentConfig = {...sharedAgentConfig,...resolveAgentModelConfig(- { ...sharedAgentConfig, visibility: agent?.visibility },+ {+ ...sharedAgentConfig,+ canManage: isAuthor,+ visibility: agent?.visibility,+ workspaceId: agent?.workspaceId,+ },memberModelOverride,),};- const chatConfig = chatConfigByIdSelectors.getChatConfigById(agentId)(agentStoreState);+ const sharedChatConfig = chatConfigByIdSelectors.getChatConfigById(agentId)(agentStoreState);+ const chatConfig =+ memberModeOverride === undefined+ ? sharedChatConfig+ : { ...sharedChatConfig, enableAgentMode: memberModeOverride };// Base plugins from agent config (pinned identifiers only — disabled entries excluded)const basePlugins = getActivePluginIds(agentConfig?.plugins);diff --git a/src/services/messenger.ts b/src/services/messenger.tsindex 5759a665dab..3cc31931b70 100644--- a/src/services/messenger.ts+++ b/src/services/messenger.ts@@ -58,6 +58,17 @@ class MessengerService {pollWechatQrSession = async (sessionId: string) => {return lambdaClient.messenger.pollWechatQrSession.mutate({ sessionId });};++ getMessengerPushWindow = async (platform: MessengerPlatform) => {+ return lambdaClient.messenger.getMessengerPushWindow.query({ platform: platform as 'wechat' });+ };++ sendMessengerPush = async (params: { content: string; platform: MessengerPlatform }) => {+ return lambdaClient.messenger.sendMessengerPush.mutate({+ ...params,+ platform: params.platform as 'wechat',+ });+ };}export const messengerService = new MessengerService();diff --git a/src/store/chat/slices/agentRun/actions/__tests__/conversationLifecycle.test.ts b/src/store/chat/slices/agentRun/actions/__tests__/conversationLifecycle.test.tsindex c8cc24c4ed7..6c6189c6008 100644--- a/src/store/chat/slices/agentRun/actions/__tests__/conversationLifecycle.test.ts+++ b/src/store/chat/slices/agentRun/actions/__tests__/conversationLifecycle.test.ts@@ -1774,7 +1774,9 @@ describe('ConversationLifecycle actions', () => {});const { agentByIdSelectors } = await import('@/store/agent/selectors');- vi.spyOn(agentByIdSelectors, 'isWorkspaceAgentById').mockReturnValue(() => true);+ vi.spyOn(agentByIdSelectors, 'getAgentById').mockReturnValue(+ () => ({ visibility: 'public', workspaceId: 'workspace-1' }) as any,+ );useUserStore.setState({workspaceUserPreference: {agentDeviceOverrides: {@@ -1828,7 +1830,9 @@ describe('ConversationLifecycle actions', () => {});const { agentByIdSelectors } = await import('@/store/agent/selectors');- vi.spyOn(agentByIdSelectors, 'isWorkspaceAgentById').mockReturnValue(() => true);+ vi.spyOn(agentByIdSelectors, 'getAgentById').mockReturnValue(+ () => ({ visibility: 'public', workspaceId: 'workspace-1' }) as any,+ );const executeGatewayAgent = vi.fn().mockResolvedValue(undefined);act(() => {@@ -1858,6 +1862,58 @@ describe('ConversationLifecycle actions', () => {expect(executeHeterogeneousAgentMock).not.toHaveBeenCalled();});+ it('uses the owner target and ignores a retained member override for a private Workspace Agent', async () => {+ mockConstEnv.isDesktop = true;+ setupMockSelectors({+ agentConfig: {+ agencyConfig: {+ boundDeviceId: 'owner-device',+ executionTarget: 'local',+ executionTargetSelectionPolicy: 'fixed',+ heterogeneousProvider: { command: 'codex', type: 'codex' },+ },+ },+ agentMeta: { visibility: 'private', workspaceId: 'workspace-1' },+ });+ useUserStore.setState({+ workspaceUserPreference: {+ agentDeviceOverrides: {+ [TEST_IDS.SESSION_ID]: {+ boundDeviceId: 'stale-workspace-device',+ executionTarget: 'device',+ },+ },+ },+ });++ const executeGatewayAgent = vi.fn().mockResolvedValue(undefined);+ act(() => {+ useChatStore.setState({ executeGatewayAgent });+ });+ vi.spyOn(aiChatService, 'sendMessageInServer').mockResolvedValue({+ assistantMessageId: TEST_IDS.ASSISTANT_MESSAGE_ID,+ messages: [+ createMockMessage({ id: TEST_IDS.USER_MESSAGE_ID, role: 'user' }),+ createMockMessage({ id: TEST_IDS.ASSISTANT_MESSAGE_ID, role: 'assistant' }),+ ],+ topicId: TEST_IDS.TOPIC_ID,+ topics: [],+ userMessageId: TEST_IDS.USER_MESSAGE_ID,+ } as any);+ executeHeterogeneousAgentMock.mockResolvedValue(undefined);++ const { result } = renderHook(() => useChatStore());+ await act(async () => {+ await result.current.sendMessage({+ message: TEST_CONTENT.USER_MESSAGE,+ context: createTestContext(),+ });+ });++ expect(executeHeterogeneousAgentMock).toHaveBeenCalledTimes(1);+ expect(executeGatewayAgent).not.toHaveBeenCalled();+ });+it('should route new-topic heterogeneous streaming updates to the persisted topic key', async () => {mockConstEnv.isDesktop = true;setupMockSelectors({diff --git a/src/store/chat/slices/agentRun/actions/__tests__/helpers.ts b/src/store/chat/slices/agentRun/actions/__tests__/helpers.tsindex 40b85237023..622814a2ffb 100644--- a/src/store/chat/slices/agentRun/actions/__tests__/helpers.ts+++ b/src/store/chat/slices/agentRun/actions/__tests__/helpers.ts@@ -2,7 +2,11 @@ import { vi } from 'vitest';import { chatService } from '@/services/chat';import { messageService } from '@/services/message';-import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selectors';+import {+ agentByIdSelectors,+ agentChatConfigSelectors,+ agentSelectors,+} from '@/store/agent/selectors';import { useChatStore } from '../../../../store';import { messageMapKey } from '../../../../utils/messageMapKey';@@ -25,6 +29,9 @@ export const setupMockSelectors = (// Mock getAgentConfigById to return config for any agentIdconst getAgentConfig = () => createMockAgentConfig(options.agentConfig);vi.spyOn(agentSelectors, 'getAgentConfigById').mockImplementation(() => getAgentConfig);+ vi.spyOn(agentByIdSelectors, 'getAgentById').mockImplementation(+ () => () => options.agentMeta || {},+ );vi.spyOn(agentChatConfigSelectors, 'currentChatConfig').mockImplementation(() =>createMockChatConfig(options.chatConfig),diff --git a/src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.ts b/src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.tsindex 3cb762a446e..03cb7054dcf 100644--- a/src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.ts+++ b/src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.ts@@ -24,7 +24,7 @@ import type {import {getWorkingDirEffectivePath,getWorkingDirSourcePath,- resolveAgencyConfig,+ resolveAgentAgencyConfig,} from '@lobechat/types';import { nanoid } from '@lobechat/utils';import { TRPCClientError } from '@trpc/client';@@ -85,6 +85,7 @@ import { systemStatusSelectors } from '@/store/global/selectors';import { pageAgentRuntime } from '@/store/tool/slices/builtin/executors/lobe-page-agent';import { type StoreSetter } from '@/store/types';import { getUserStoreState } from '@/store/user';+import { userProfileSelectors } from '@/store/user/selectors';import { useUserMemoryStore } from '@/store/userMemory';import { markdownToTxt } from '@/utils/markdownToTxt';@@ -286,15 +287,23 @@ export class ConversationLifecycleActionImpl {const agentState = getAgentStoreState();const agentConfig = agentSelectors.getAgentConfigById(agentId)(agentState);- const isWorkspaceAgent = agentByIdSelectors.isWorkspaceAgentById(agentId)(agentState);- const deviceOverride = isWorkspaceAgent+ const agent = agentByIdSelectors.getAgentById(agentId)(agentState);+ const currentUserId = userProfileSelectors.userId(getUserStoreState());+ const isAuthor = !!currentUserId && agent?.userId === currentUserId;+ const usesWorkspaceMemberSelection =+ !!agent?.workspaceId && agent.visibility !== 'private' && !isAuthor;+ const deviceOverride = usesWorkspaceMemberSelection? getUserStoreState().workspaceUserPreference.agentDeviceOverrides?.[agentId]: undefined;- const workspaceScoped = resolveWorkspaceScoped(isWorkspaceAgent, deviceOverride);+ const workspaceScoped = resolveWorkspaceScoped(usesWorkspaceMemberSelection, deviceOverride);// Runtime selection must use the same per-user device override as the// switcher. A workspace-local pick is intentionally private to this member// and is therefore safe to execute in-process on their desktop.- const agencyConfig = resolveAgencyConfig(agentConfig?.agencyConfig, deviceOverride);+ const agencyConfig = resolveAgentAgencyConfig(agentConfig?.agencyConfig, deviceOverride, {+ canManage: isAuthor,+ visibility: agent?.visibility,+ workspaceId: agent?.workspaceId,+ });const heterogeneousProvider = agencyConfig?.heterogeneousProvider;const runtimeType = selectRuntimeType({boundDeviceId: agencyConfig?.boundDeviceId,diff --git a/src/store/home/slices/agentList/action.ts b/src/store/home/slices/agentList/action.tsindex 85112aea998..40d6e5ef74f 100644--- a/src/store/home/slices/agentList/action.ts+++ b/src/store/home/slices/agentList/action.ts@@ -57,6 +57,7 @@ export class AgentListActionImpl {isEqual(state.agentGroups, newState.agentGroups) &&isEqual(state.ungroupedAgents, newState.ungroupedAgents) &&isEqual(state.privateAgentGroups, newState.privateAgentGroups) &&+ isEqual(state.privatePinnedAgents, newState.privatePinnedAgents) &&isEqual(state.privateUngroupedAgents, newState.privateUngroupedAgents)) {return;diff --git a/src/store/home/slices/agentList/initialState.ts b/src/store/home/slices/agentList/initialState.tsindex 200f9fc578b..884363f6b21 100644--- a/src/store/home/slices/agentList/initialState.ts+++ b/src/store/home/slices/agentList/initialState.ts@@ -26,6 +26,12 @@ export interface AgentListState {* Always empty in personal mode.*/privateAgentGroups: SidebarGroup[];+ /**+ * Pinned private agents/chat groups owned by the current user within the+ * workspace. Rendered at the top of the Private section, never in the+ * public pinned list. Always empty in personal mode.+ */+ privatePinnedAgents: SidebarAgentItem[];/*** Ungrouped private agents/chat groups owned by the current user within* the workspace. Always empty in personal mode.@@ -43,6 +49,7 @@ export const initialAgentListState: AgentListState = {isAgentListInit: false,pinnedAgents: [],privateAgentGroups: [],+ privatePinnedAgents: [],privateUngroupedAgents: [],ungroupedAgents: [],};@@ -57,12 +64,14 @@ export const mapResponseToState = (| 'agentGroups'| 'pinnedAgents'| 'privateAgentGroups'+ | 'privatePinnedAgents'| 'privateUngroupedAgents'| 'ungroupedAgents'> => ({agentGroups: response.groups,pinnedAgents: response.pinned,privateAgentGroups: response.privateGroups ?? [],+ privatePinnedAgents: response.privatePinned ?? [],privateUngroupedAgents: response.privateUngrouped ?? [],ungroupedAgents: response.ungrouped,});diff --git a/src/store/home/slices/agentList/selectors.test.ts b/src/store/home/slices/agentList/selectors.test.tsnew file mode 100644index 00000000000..dedbfe34523--- /dev/null+++ b/src/store/home/slices/agentList/selectors.test.ts@@ -0,0 +1,45 @@+import { describe, expect, it } from 'vitest';++import { type HomeStore } from '@/store/home/store';++import { homeAgentListSelectors } from './selectors';++const createState = (overrides: Partial<HomeStore>): HomeStore =>+ ({+ agentGroups: [],+ pinnedAgents: [],+ privateAgentGroups: [],+ privatePinnedAgents: [],+ privateUngroupedAgents: [],+ ungroupedAgents: [],+ ...overrides,+ }) as HomeStore;++// Fixed timestamp: two `new Date()` calls can land on different milliseconds,+// making `toEqual([agent('a1')])` flaky when re-invoked in the assertion.+const FIXED_UPDATED_AT = new Date('2026-01-01T00:00:00.000Z');++const agent = (id: string) => ({+ id,+ pinned: true,+ title: id,+ type: 'agent' as const,+ updatedAt: FIXED_UPDATED_AT,+});++describe('homeAgentListSelectors - private pinned', () => {+ it('privatePinnedAgents returns the private pinned bucket', () => {+ const state = createState({ privatePinnedAgents: [agent('a1')] });+ expect(homeAgentListSelectors.privatePinnedAgents(state)).toEqual([agent('a1')]);+ });++ it('hasPrivateAgents is true when the only private item is pinned', () => {+ const state = createState({ privatePinnedAgents: [agent('a1')] });+ expect(homeAgentListSelectors.hasPrivateAgents(state)).toBe(true);+ });++ it('allAgents includes private pinned items', () => {+ const state = createState({ privatePinnedAgents: [agent('a1')] });+ expect(homeAgentListSelectors.allAgents(state).map((a) => a.id)).toContain('a1');+ });+});diff --git a/src/store/home/slices/agentList/selectors.ts b/src/store/home/slices/agentList/selectors.tsindex f0e45a53ec0..ffc29ee1773 100644--- a/src/store/home/slices/agentList/selectors.ts+++ b/src/store/home/slices/agentList/selectors.ts@@ -17,6 +17,12 @@ const agentGroups = (s: HomeStore): SidebarGroup[] => s.agentGroups;*/const privateAgentGroups = (s: HomeStore): SidebarGroup[] => s.privateAgentGroups;+/**+ * Get pinned private agents owned by the current user.+ * Empty array in personal mode.+ */+const privatePinnedAgents = (s: HomeStore): SidebarAgentItem[] => s.privatePinnedAgents;+/*** Get all ungrouped agents*/@@ -32,7 +38,9 @@ const privateUngroupedAgents = (s: HomeStore): SidebarAgentItem[] => s.privateUn* Whether the current user has any private content in this workspace.*/const hasPrivateAgents = (s: HomeStore): boolean =>- s.privateAgentGroups.length > 0 || s.privateUngroupedAgents.length > 0;+ s.privateAgentGroups.length > 0 ||+ s.privatePinnedAgents.length > 0 ||+ s.privateUngroupedAgents.length > 0;/*** Limit ungrouped agents for sidebar display based on page size@@ -75,6 +83,7 @@ const allAgents = (s: HomeStore): SidebarAgentItem[] => {...s.pinnedAgents,...groupedAgents,...s.ungroupedAgents,+ ...s.privatePinnedAgents,...privateGroupedAgents,...s.privateUngroupedAgents,];@@ -113,6 +122,7 @@ export const homeAgentListSelectors = {isAgentListInit,pinnedAgents,privateAgentGroups,+ privatePinnedAgents,privateUngroupedAgents,privateUngroupedAgentsCount,privateUngroupedAgentsLimited,diff --git a/src/store/user/slices/workspaceUserSettings/action.test.ts b/src/store/user/slices/workspaceUserSettings/action.test.tsindex a0c2c423ebb..4a9b55ead11 100644--- a/src/store/user/slices/workspaceUserSettings/action.test.ts+++ b/src/store/user/slices/workspaceUserSettings/action.test.ts@@ -30,6 +30,9 @@ describe('WorkspaceUserSettingsActionImpl', () => {agentModelOverrides: {existing: { model: 'existing-model', provider: 'existing-provider' },},+ agentModeOverrides: {+ existing: true,+ },},};const set = vi.fn((patch: Partial<typeof state>) => Object.assign(state, patch));@@ -50,6 +53,9 @@ describe('WorkspaceUserSettingsActionImpl', () => {existing: { model: 'existing-model', provider: 'existing-provider' },selected: { model: 'selected-model', provider: 'selected-provider' },},+ agentModeOverrides: {+ existing: true,+ },});expect(mockMutate).toHaveBeenCalledWith(['FETCH_WORKSPACE_USER_SETTINGS', 'workspace-1'],@@ -57,4 +63,24 @@ describe('WorkspaceUserSettingsActionImpl', () => {{ revalidate: false },);});++ it('optimistically deep-merges one Agent mode without dropping other modes', async () => {+ const state = {+ workspaceUserPreference: {+ agentModeOverrides: { existing: true },+ },+ };+ const set = vi.fn((patch: Partial<typeof state>) => Object.assign(state, patch));+ const action = new WorkspaceUserSettingsActionImpl(set as never, () => state as never);+ vi.spyOn(workspaceUserSettingsService, 'updatePreference').mockResolvedValue();++ await action.updateWorkspaceUserPreference({+ agentModeOverrides: { selected: false },+ });++ expect(state.workspaceUserPreference.agentModeOverrides).toEqual({+ existing: true,+ selected: false,+ });+ });});diff --git a/src/store/user/slices/workspaceUserSettings/action.ts b/src/store/user/slices/workspaceUserSettings/action.tsindex 54d9ea345b8..51b86d25caf 100644--- a/src/store/user/slices/workspaceUserSettings/action.ts+++ b/src/store/user/slices/workspaceUserSettings/action.ts@@ -98,6 +98,14 @@ export class WorkspaceUserSettingsActionImpl {},}: {}),+ ...(patch.agentModeOverrides+ ? {+ agentModeOverrides: {+ ...previous.agentModeOverrides,+ ...patch.agentModeOverrides,+ },+ }+ : {}),};const workspaceId = getActiveWorkspaceId();const swrKey = workspaceId ? [WORKSPACE_USER_SETTINGS_SWR_KEY, workspaceId] : null;