Promote raw stream replay into standalone simulator tool and add SSE field doc

This commit is contained in:
CJACK.
2026-04-03 10:18:48 +08:00
parent fe43f1e6ee
commit a28e833f33
13 changed files with 1364 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ const {
normalizePreparedToolNames,
boolDefaultTrue,
filterIncrementalToolCallDeltasByAllowed,
shouldSkipPath,
} = handler.__test;
test('chat-stream exposes parser test hooks', () => {
@@ -218,3 +219,9 @@ test('parseChunkForContent supports wrapped response.fragments object shape', ()
assert.equal(parsed.finished, false);
assert.equal(parsed.parts.map((p) => p.text).join(''), 'AB');
});
test('shouldSkipPath skips dynamic response/fragments/*/status paths only', () => {
assert.equal(shouldSkipPath('response/fragments/-16/status'), true);
assert.equal(shouldSkipPath('response/fragments/8/status'), true);
assert.equal(shouldSkipPath('response/status'), false);
});