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(tests): update static source assertions to match current ChatInput code

Shinku0498fccd4353
diff --git a/apps/desktop/src/renderer/__tests__/chatInputSessionFocus.test.ts b/apps/desktop/src/renderer/__tests__/chatInputSessionFocus.test.ts
index f33a013ecc..693e691072 100644
--- a/apps/desktop/src/renderer/__tests__/chatInputSessionFocus.test.ts
+++ b/apps/desktop/src/renderer/__tests__/chatInputSessionFocus.test.ts
@@ -134,15 +134,11 @@ describe('ChatInput session switch focus contract', () => {
),
).toHaveLength(1);
expect(capabilitySelectionBlock).toContain("selectedItem.type === 'plugin-command'");
- expect(capabilitySelectionBlock).toContain('if (ghost.manifest.command) {');
+ expect(capabilitySelectionBlock).toContain('!ghost?.enabled || !ghost.manifest.command');
expect(capabilitySelectionBlock).toContain(
'placeGhostAtComposerStart(editor, ghost, installedGhostsRef.current);',
);
- expect(capabilitySelectionBlock).toContain(
- 'placeHostCapabilityAtComposerStart(editor, ghost, installedGhostsRef.current);',
- );
- expect(capabilitySelectionBlock).toContain('!remoteHostId');
- expect(capabilitySelectionBlock).toContain('!deviceLinkDeviceId');
+ expect(capabilitySelectionBlock).toContain('closeAtPanel();');
expect(capabilitySelectionBlock).not.toContain('focusIOSSimulatorPanel');
expect(chatInputSource).toContain('focusComposerEndNextFrame(editor);');
});
diff --git a/apps/desktop/src/renderer/lib/__tests__/providerModelEfforts.test.ts b/apps/desktop/src/renderer/lib/__tests__/providerModelEfforts.test.ts
index 741d3fdee4..852d3830c8 100644
--- a/apps/desktop/src/renderer/lib/__tests__/providerModelEfforts.test.ts
+++ b/apps/desktop/src/renderer/lib/__tests__/providerModelEfforts.test.ts
@@ -146,7 +146,7 @@ describe('resolveProviderModelEfforts', () => {
'resolveModelEfforts(\n newModelId,\n providerId,\n targetAgentKind,\n )',
);
expect(source.slice(modelChangeStart, modelChangeEnd)).toMatch(
- /resolveModelEfforts\(\s*newModelId,\s*effectiveSourceId\s*\)/,
+ /resolveModelEfforts\(\s*newModelId,\s*effectiveSourceId,\s*\)/,
);
expect(source.slice(providerChangeStart, providerChangeEnd)).toContain(
'{ effort: eff, fastMode: restoredFast }',