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 upstream/main and isolate catalog discovery test fixture

zqchris86220efca679
diff --cc apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
index 49543e5623,90c2bef9b0..7bd7587931
--- a/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
@@@ -365,18 -379,18 +379,21 @@@ describe('active-catalog discovered aug
it('adds a newly discovered Grok model to Pi without a bundled model or public declaration', () => {
setActiveCatalog(BUNDLED_CATALOG);
++ // A synthetic ID keeps this discovery-only case independent of new bundled releases.
++ const discoveredId = 'grok-discovery-fixture';
++ const models = () => getActiveCatalog().providers.find(p => p.id === 'xai')!.models.pi!;
++ expect(models().some(model => model.id === discoveredId)).toBe(false);
setXaiDiscoveredModels([{
-- id: 'xai/grok-4.7', name: 'Grok 4.7', contextWindow: 500_000,
++ id: `xai/${discoveredId}`, name: 'Grok discovery fixture', contextWindow: 500_000,
maxOutput: 64_000, efforts: ['xhigh', 'high', 'medium', 'low'], defaultEffort: 'high',
}]);
-- const models = () => getActiveCatalog().providers.find(p => p.id === 'xai')!.models.pi!;
-- expect(models().find(model => model.id === 'grok-4.7')).toMatchObject({
-- name: 'Grok 4.7', contextWindow: 500_000, maxOutput: 64_000,
++ expect(models().find(model => model.id === discoveredId)).toMatchObject({
++ name: 'Grok discovery fixture', contextWindow: 500_000, maxOutput: 64_000,
efforts: ['low', 'medium', 'high', 'xhigh'], defaultEffort: 'high',
piApi: 'openai-responses',
});
setXaiDiscoveredModels(null);
-- expect(models().some(model => model.id === 'grok-4.7')).toBe(false);
++ expect(models().some(model => model.id === discoveredId)).toBe(false);
});
it('keeps discovered Pi models scoped to their Grok account', () => {