fix(teacher): 合并续接工具活动并修正暂停状态

This commit is contained in:
brother7 committed 2026-09-27 09:11:27 +08:00
1 parent 60c20f996e
commit 8a74721337
7 files changed
+141 -16

No files matched your search

+5 -1
View File
@@ -29,10 +29,14 @@ describe('teacher cloud tool activity projection', () => {
});
it.each([
['tool-finished', { type: 'tool', content: 'tool result', status: 'success' }, undefined, 'completed'],
['tool-error', undefined, 'private error', 'failed'],
])('accepts real %s events that carry only the call id', (event, output, error, status) => {
expect(cloudToolActivity({ status: 'stream_event', event: { method: 'tools', data: {
event, tool_call_id: 'call', output, error,
} } }, 'run')).toEqual({ id: 'run:call', status });
});
it('waits for the outcome instead of treating a raw tool error as failure', () => {
expect(cloudToolActivity({ status: 'stream_event', event: { method: 'tools', data: {
event: 'tool-error', tool_call_id: 'call', message: 'Interrupt',
} } }, 'question')).toBeUndefined();
});
});