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。

test(desktop): update dialogue sidebar source contract

DavidShen94dde348e980
diff --git a/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts b/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts
index 36cb36fc33..74e5cf776b 100644
--- a/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts
+++ b/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts
@@ -209,8 +209,8 @@ describe('Mixed main list (sidebar-redesign D 期)', () => {
);
// 不按设备分组的两条渲染路径不传目标 → 上层沿用作用域推断。
expect(projectsSectionSource).toContain('renderNonProjectEntry(entry, DIALOGUE_GROUP_ALL_KEY)');
- expect(projectsSectionSource).toContain(
- 'onCreateDialogue={isMake ? undefined : () => onCreateDialogue(dialogueDeviceTarget)}',
+ expect(projectsSectionSource).toMatch(
+ /onCreateDialogue=\{\s*isMake\s*\?\s*canCreateMake\s*\?\s*\(\) => setMakeCreateOpen\(true\)\s*:\s*undefined\s*:\s*\(\) => onCreateDialogue\(dialogueDeviceTarget\)\s*\}/s,
);
// 目标设备离线 → 禁用新建并复用远程写保护文案(被控端才是真正的创建方)。
expect(projectsSectionSource).toContain("t('ccAgent.remoteSession.actionsUnavailable')");