fix(chat): recover active requests and preserve finish order
This commit is contained in:
@@ -54,6 +54,14 @@ test('only ambiguous transport failures keep the chat streaming', () => {
|
||||
assert.equal(shouldKeepStreamingAfterRunError(503), true);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(400), false);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(undefined), false);
|
||||
assert.equal(
|
||||
shouldKeepStreamingAfterRunError(
|
||||
undefined,
|
||||
'Session already has an active request. Cancel it first.',
|
||||
),
|
||||
true,
|
||||
);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(undefined, '后台任务失败'), false);
|
||||
});
|
||||
|
||||
test('shouldPromoteSessionIdToStreaming skips re-streaming after Finish', () => {
|
||||
|
||||
Reference in New Issue
Block a user