Improve in-flight cancel latency via run abort signal propagation
This commit is contained in:
@@ -24,10 +24,11 @@ describe('NativeAgent', () => {
|
||||
const response = await agent.process('Hi');
|
||||
|
||||
expect(response).toBe('Hello!');
|
||||
expect(mockClient.chat).toHaveBeenCalledWith({
|
||||
expect(mockClient.chat).toHaveBeenCalledWith(expect.objectContaining({
|
||||
messages: [{ role: 'user', content: 'Hi' }],
|
||||
system: 'You are helpful.',
|
||||
});
|
||||
signal: expect.any(AbortSignal),
|
||||
}));
|
||||
|
||||
const history = agent.getHistory();
|
||||
expect(history).toHaveLength(2);
|
||||
|
||||
Reference in New Issue
Block a user