fix(web): keep thinking off the spoken consult and rectification answer
Enumerate evidence kinds so education cannot be proposed as a kind, and stream Chinese thinking on a separate channel that collapses when the reply arrives. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -48,6 +48,9 @@ test("shows honest agent activity states before and during streamed text", () =>
|
||||
const activity = { phase: "chart-calculation", label: "正在计算本命盘…" } as const;
|
||||
const view = chatMessageViews(previousMessages, true, "", activity).at(-1);
|
||||
assert.deepEqual(view?.activity, activity);
|
||||
const thinkingView = chatMessageViews(previousMessages, true, "", activity, "先看事业宫。").at(-1);
|
||||
assert.equal(thinkingView?.thinkingText, "先看事业宫。");
|
||||
assert.equal(thinkingView?.state, "thinking");
|
||||
assert.match(messageRowSource, /"loading-method": "searching"/);
|
||||
assert.match(messageRowSource, /"chart-calculation": "solving"/);
|
||||
assert.match(messageRowSource, /"evidence-validation": "working"/);
|
||||
@@ -79,6 +82,9 @@ test("shows honest agent activity states before and during streamed text", () =>
|
||||
assert.doesNotMatch(globalStyles, /\.thinking\b/);
|
||||
assert.match(pageSource, /application\/x-ndjson/);
|
||||
assert.match(pageSource, /createNdjsonParser/);
|
||||
assert.match(pageSource, /event.type === "thinking.delta"/);
|
||||
assert.match(pageSource, /activeStreamingThinking/);
|
||||
assert.match(messageRowSource, /思考过程/);
|
||||
assert.match(pageSource, /event\.type === "run\.failed"/);
|
||||
assert.match(pageSource, /event\.code === "answer_truncated"/);
|
||||
assert.match(pageSource, /throw new ConsultationResponseError/);
|
||||
|
||||
Reference in New Issue
Block a user