feat(coding): complete PI conversation UI
This commit is contained in:
@@ -12,12 +12,16 @@ describe('coding project Host facade', () => {
|
||||
.mockResolvedValueOnce({ projects: [], activeProjectId: null })
|
||||
.mockResolvedValueOnce({ snapshot: { project: { id: 'project/a' }, config: {} } })
|
||||
.mockResolvedValueOnce({ conversations: [] })
|
||||
.mockResolvedValueOnce({ conversation: { id: 'conversation-1' } });
|
||||
.mockResolvedValueOnce({ conversation: { id: 'conversation-1' } })
|
||||
.mockResolvedValueOnce({ conversation: { id: 'conversation-1', title: 'Renamed' } })
|
||||
.mockResolvedValueOnce({});
|
||||
const {
|
||||
createCodingProjectConversation,
|
||||
getCodingProjectConfig,
|
||||
listCodingProjectConversations,
|
||||
listCodingProjects,
|
||||
patchCodingProjectConversation,
|
||||
deleteCodingProjectConversation,
|
||||
} = await import('@/lib/coding-projects');
|
||||
|
||||
await listCodingProjects();
|
||||
@@ -28,6 +32,8 @@ describe('coding project Host facade', () => {
|
||||
agentId: 'agent-1',
|
||||
title: '新对话',
|
||||
});
|
||||
await patchCodingProjectConversation('conversation/1', { title: 'Renamed', unread: true });
|
||||
await deleteCodingProjectConversation('conversation/1');
|
||||
|
||||
expect(hostApiFetch.mock.calls).toEqual([
|
||||
['/api/coding/projects'],
|
||||
@@ -37,6 +43,11 @@ describe('coding project Host facade', () => {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ projectId: 'project/a', agentId: 'agent-1', title: '新对话' }),
|
||||
}],
|
||||
['/api/coding/conversations/conversation%2F1', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ title: 'Renamed', unread: true }),
|
||||
}],
|
||||
['/api/coding/conversations/conversation%2F1', { method: 'DELETE' }],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user