feat(coding): add project identity UX
This commit is contained in:
@@ -106,6 +106,31 @@ describe('coding workspace store', () => {
|
||||
expect(createConversation).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('passes the explicit identity choice through project creation', async () => {
|
||||
const createProject = vi.fn(async () => ({
|
||||
project,
|
||||
config: config([agent('agent-a')]),
|
||||
knowledgeFiles: [],
|
||||
}));
|
||||
const store = createCodingWorkspaceStore({
|
||||
listProjects: vi.fn(async () => ({ projects: [project], activeProjectId: project.id })),
|
||||
getConfig: vi.fn(async () => ({ project, config: config([agent('agent-a')]) })),
|
||||
listConversations: vi.fn(async () => []),
|
||||
createProject,
|
||||
});
|
||||
|
||||
await expect(store.getState().createProject({
|
||||
projectPath: 'C:/projects/new',
|
||||
projectType: 'custom',
|
||||
identity: { kind: 'bind', projectId: 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa' },
|
||||
})).resolves.toEqual(project);
|
||||
expect(createProject).toHaveBeenCalledWith({
|
||||
projectPath: 'C:/projects/new',
|
||||
projectType: 'custom',
|
||||
identity: { kind: 'bind', projectId: 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa' },
|
||||
});
|
||||
});
|
||||
|
||||
it('creates a missing first Conversation once for concurrent callers', async () => {
|
||||
let resolveCreate!: (value: CodingConversationMetadata) => void;
|
||||
const createFlight = new Promise<CodingConversationMetadata>((resolve) => {
|
||||
|
||||
Reference in New Issue
Block a user