Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

merge: 同步 main(6a6ad571a),解决 agent-island / sessions / register 的 import 与术语表冲突

WZBbiao5d53bcf35f19
diff --cc apps/desktop/src/main/agent-island/__tests__/service.test.ts
index a81f0c8194,581beba19e..bf2b6a0568
--- a/apps/desktop/src/main/agent-island/__tests__/service.test.ts
+++ b/apps/desktop/src/main/agent-island/__tests__/service.test.ts
@@@ -61,9 -62,10 +62,12 @@@ const mocks = vi.hoisted(() => (
userSendAt: number | null;
workingDir: string | null;
workspaceKind: string | null;
+ source?: string | null;
} | null>>(() => Promise.resolve(null)),
+ /** 「消息免打扰」同步索引:默认不静音,用例按需覆写。 */
+ isSessionNotificationsMutedSync: vi.fn((_sessionId: string) => false),
+ readAgentIslandCompanion: vi.fn<(sessionId: string) => Promise<AgentIslandCompanionIdentity | null>>(() => Promise.resolve(null)),
+ companionAvatarThumbnail: vi.fn<(avatar: string, deviceId?: string | null) => Promise<string | undefined>>(() => Promise.resolve(undefined)),
primaryDisplay: {
id: 1,
label: 'Built-in Retina Display',
@@@ -139,10 -141,12 +143,17 @@@ vi.mock('../../localDb/ipc/sessions.js'
getSessionRowSnapshot: mocks.getSessionRowSnapshot,
}));
+vi.mock('../../localDb/sessionFlagRegistry', () => ({
+ isSessionNotificationsMutedSync: mocks.isSessionNotificationsMutedSync,
+}));
+
+ vi.mock('../companionIdentity.js', async (importOriginal) => ({
+ ...(await importOriginal<typeof import('../companionIdentity.js')>()),
+ readAgentIslandCompanion: mocks.readAgentIslandCompanion,
+ companionAvatarThumbnail: mocks.companionAvatarThumbnail,
+ }));
++}));
+
vi.mock('../layoutPreferenceStore.js', () => ({
readAgentIslandDetachedLayoutPreferences: mocks.readDetachedLayoutPreferences,
readAgentIslandLayoutPreferences: mocks.readLayoutPreferences,
diff --cc apps/desktop/src/main/agent-island/service.ts
index f44763abbe,72b475fe72..da8f8530d5
--- a/apps/desktop/src/main/agent-island/service.ts
+++ b/apps/desktop/src/main/agent-island/service.ts
@@@ -75,7 -76,14 +76,15 @@@ import
type AgentIslandScreenLayoutMetrics,
} from '../../shared/agentIsland.js';
import { getSessionRowSnapshot } from '../localDb/ipc/sessions.js';
+import { isSessionNotificationsMutedSync } from '../localDb/sessionFlagRegistry';
+ import { setAgentIslandCompanionChangeSink } from '../localDb/agentIslandSessionPatch.js';
+ import {
+ companionAvatarHasArtwork,
+ companionAvatarThumbnail,
+ companionSnapshotWithoutArtwork,
+ readAgentIslandCompanion,
+ type AgentIslandCompanionIdentity,
+ } from './companionIdentity.js';
import { createLogger } from '../logger.js';
import { t } from '../i18n.js';
import { isAppContentWindow, isFocusedAppContentWindow } from '../windowFocusClassifier.js';
diff --cc apps/desktop/src/main/localDb/ipc/sessions.ts
index cd97982f4e,130c2e283f..b4652abb1f
--- a/apps/desktop/src/main/localDb/ipc/sessions.ts
+++ b/apps/desktop/src/main/localDb/ipc/sessions.ts
@@@ -81,7 -81,8 +81,8 @@@ import { assertRendererSessionSourceAll
import type { SessionReference } from '../../../shared/sessionReference.js';
import * as broadcastTap from '../../device-link/broadcast-tap.js';
import { notifyAgentIslandSessionPatch } from '../agentIslandSessionPatch';
-import { ensureHiddenSessionRegistryLoaded } from '../hiddenSessionRegistry.js';
+import { ensureSessionFlagRegistryLoaded, noteSessionNotificationsMuted } from '../sessionFlagRegistry.js';
+ import { recoverGeneratedImagesForHistory } from '../../cindy-media/generatedImageRecovery';
import { noteSessionClearBoundary } from '../../messagePersistBroadcaster';
import {
ackSessionTurnEndedDurable,
diff --cc apps/desktop/src/main/maker-ipc/register.ts
index 559e12683b,89b60ba954..ccf8911d27
--- a/apps/desktop/src/main/maker-ipc/register.ts
+++ b/apps/desktop/src/main/maker-ipc/register.ts
@@@ -11,7 -11,8 +11,8 @@@ import { pluginWorkerCompletedAt } fro
import { createPluginTaskStore } from './pluginTaskStore.js';
import { createPluginBackgroundTaskHandlers, revealAllPluginHiddenTasks } from './pluginHiddenTasks.js';
import { setSessionHidden } from '../localDb/ipc/sessionHidden.js';
-import { isSessionHiddenSync } from '../localDb/hiddenSessionRegistry.js';
+import { isSessionHiddenSync, isSessionNotificationsMutedSync } from '../localDb/sessionFlagRegistry.js';
+ import { notifyAgentIslandBotGroupChanged } from '../localDb/agentIslandSessionPatch.js';
import { ghostDeclaresHiddenTasks } from '../../shared/ghost.js';
import { hasAcceptedUserTaskInput } from './pluginTaskInput.js';
import { controlOwnedSessionExecution, isSameSessionExecution, withdrawOwnedSessionInputs } from './sessionExecutionOwnership.js';
diff --cc i18n/glossary.json
index cb516c6375,4a39f44395..d16d09d1f2
--- a/i18n/glossary.json
+++ b/i18n/glossary.json
@@@ -2496,18 -2511,18 +2511,31 @@@
"checkCase": false,
"note": "云端伙伴运行的那台电脑(docs/product-rules/cloud-companions.md §3):伙伴的 Agent、工作目录与连接只在这台电脑上,其他电脑与手机是查看和发消息的入口。手机与桌面同一叫法,伙伴设置行名、离线横幅与侧栏状态共用。英文行名用 Title Case(Main Computer),句中小写 main computer,故 checkCase 为 false。不要写成「主设备」「宿主机」或 home device(代码字段 homeDeviceId 不是界面用语)。先登记为 proposed,待桌面与手机实机走查后再定。"
},
+ {
+ "id": "session-notification-mute",
+ "status": "proposed",
+ "en": "Mute notifications",
+ "translations": {
+ "zh-CN": "消息免打扰",
+ "zh-TW": "訊息免打擾",
+ "ja": "通知をミュート",
+ "ko": "알림 끄기"
+ },
+ "checkCase": false,
+ "note": "任务右键菜单里的通知开关,是普通句子不是品牌词,故 checkCase 为 false。开关两态成对出现:未静音时显示「消息免打扰」(点了就静音),已静音时显示「允许消息通知」(点了就恢复);英文对为 Mute notifications / Allow notifications。与设置里的全局通知开关(ccAgent.settings.notifications)区分:这个是单个任务的。中文不用「免打扰模式」「静音」。「允许消息通知」是反面文案,未列入 translations,待五语用例变多后一并裁决。"
++ },
+ {
+ "id": "left-navigation",
+ "status": "proposed",
+ "en": "Left navigation",
+ "translations": {
+ "zh-CN": "左侧导航",
+ "zh-TW": "左側導航",
+ "ja": "左側ナビゲーション",
+ "ko": "왼쪽 내비게이션"
+ },
+ "checkCase": false,
+ "note": "主窗口左侧放任务与「自动化」「插件」「伙伴」等一级入口的那一栏。插件主视图入口的开关称「导航入口」(Navigation Entry),用来与右侧放插件面板、浏览器、终端的「右侧栏」(right sidebar)区分,所以涉及这个入口的文案写左侧导航,不再写笼统的「侧边栏」。韩语依国立国语院标准外来语表记写 내비게이션,不写 네비게이션。英文句中小写 left navigation,故 checkCase 为 false。先登记为 proposed:其他位置仍有「侧边栏」泛指左栏的存量文案,待统一清理时再裁决。"
}
]
}