moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/**
* AI-OS #6 — chat goal-ancestry wiring: project resolves from the active
* workspace name. Focused unit on the exported resolver (no SSE turn needed).
*/
import { describe, it, expect } from 'vitest';
import { resolveChatAncestry } from '../src/local/routes/chat.js';
describe('resolveChatAncestry (#6)', () => {
const server = {
workspaceManager: {
get: (id: string) => (id === 'ws1' ? { name: 'Acme Redesign' } : null),
},
};
it('resolves project from the active workspace name', () => {
expect(resolveChatAncestry(server as never, 'ws1')).toEqual({ project: 'Acme Redesign' });
});
it('returns empty for unknown / missing workspace', () => {
expect(resolveChatAncestry(server as never, 'missing')).toEqual({});
expect(resolveChatAncestry(server as never, undefined)).toEqual({});
});
});