fix(consult): BUG-945~949 领域截断、思考分片、Pass 4 按模式分流
schema 上限与执行上限解耦;校正思考改分片门;日期观察不删字,保证句与无分钟个人盘退回重写。
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
shouldPublishStepText,
|
||||
} from "../src/lib/rectification-agentic/v9/step-answer.ts";
|
||||
import { mapStreamChunkToPhase, mapStreamChunkToThinking } from "../src/lib/rectification-agentic/v9/stream-mapping.ts";
|
||||
import { createThinkingFragmentAssembler } from "../src/lib/think-step-gate.ts";
|
||||
import { PUBLIC_RECTIFICATION_TOOLS } from "../src/lib/rectification-agentic/v9/public-receipt.ts";
|
||||
|
||||
function isPublicTool(name: string): boolean {
|
||||
@@ -44,6 +45,13 @@ test("never publishes reasoning-delta to the browser", () => {
|
||||
assert.ok(mapStreamChunkToThinking(chunk("reasoning-delta", { text: "先核对经历。" }) as never));
|
||||
});
|
||||
|
||||
test("consecutive Chinese reasoning fragments assemble into a visible thinking line", () => {
|
||||
const assembler = createThinkingFragmentAssembler();
|
||||
assert.equal(assembler.push("The proposedKind value was rejected"), null);
|
||||
assert.equal(assembler.push("先核"), null);
|
||||
assert.equal(assembler.push("对经历。"), "先核对经历。");
|
||||
});
|
||||
|
||||
test("publishes only the terminal no-tool step as assistant text", () => {
|
||||
const state = createStepAnswerState();
|
||||
applyStepAnswerChunk(state, chunk("step-start"), isPublicTool);
|
||||
|
||||
Reference in New Issue
Block a user