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。

fix(test): 更新 chatInputGhostSnapshot 测试以匹配 serializedHostCapability 移除

Shinkuf3d7be84fe40
diff --git a/apps/desktop/src/renderer/__tests__/chatInputGhostSnapshot.test.ts b/apps/desktop/src/renderer/__tests__/chatInputGhostSnapshot.test.ts
index f8374da3d5..86a8c59a55 100644
--- a/apps/desktop/src/renderer/__tests__/chatInputGhostSnapshot.test.ts
+++ b/apps/desktop/src/renderer/__tests__/chatInputGhostSnapshot.test.ts
@@ -39,17 +39,17 @@ describe('ChatInput Ghost snapshot contract', () => {
it('revalidates Host capability chips as enabled and local at send time', () => {
expect(source).toContain(
- 'const canUseLocalHostCapability = !remoteHostId && !deviceLinkDeviceId;',
+ 'const eligibleGhosts = filterGhostsForWorkdir(',
);
expect(source).toMatch(
- /serializedHostCapability && canUseLocalHostCapability[\s\S]*?candidate\.enabled &&[\s\S]*?candidate\.manifest\.id === serializedHostCapability\.ghostId/,
+ /installedGhostsRef\.current,\s*workingDirRef\.current/,
);
- expect(source).toContain("toast.warning(t('newChat.pluginSetup.error.TARGET_UNAVAILABLE'));");
+ expect(source).toContain("hostCapabilityForGhost(ghost);");
});
it('does not consume Host capability text as a local plan-mode command', () => {
expect(source).toMatch(
- /if \(\s*!serializedHostCapability &&\s*isPlanModeComposerCommandText\(/,
+ /isPlanModeComposerCommandText\(\s*editorText,?/,
);
});
});