fix(web): show live agent work progress and fail truncated rectification answers
Rectification dropped tool.activity started events and treated length finishes as completed. Share generation settings with consultation, keep the activity line through streaming, and name multi-domain chart calculation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -36,6 +36,10 @@ const houseTable = readFileSync(
|
||||
new URL("../src/components/rectification-house-table.tsx", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
const progressLabels = readFileSync(
|
||||
new URL("../src/lib/rectification-activity-labels.ts", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
const completedActivityReceipt = readFileSync(
|
||||
new URL("../src/components/completed-activity-receipt.tsx", import.meta.url),
|
||||
"utf8",
|
||||
@@ -231,6 +235,7 @@ test("rectification uses one case-level entitlement and the session-pinned model
|
||||
assert.match(route, /const billingRequestPrefix = `rectification:case:\$\{caseId\}`/);
|
||||
assert.match(route, /requestId: billingRequestId/);
|
||||
assert.match(route, /modelConfigVersion: selectedModel\.configVersion/);
|
||||
assert.match(route, /generationModel: selectedModel\.model/);
|
||||
assert.doesNotMatch(route, /loadLanguageModelCatalog|resolveLanguageModelFromCatalog|\bresolveLanguageModel\(|\bdefaultLanguageModel\(/);
|
||||
});
|
||||
|
||||
@@ -243,7 +248,7 @@ test("Agentic rectification scrolls the conversation container as streamed messa
|
||||
assert.doesNotMatch(chat, /conversationEnd|scrollIntoView/);
|
||||
});
|
||||
|
||||
test("rectification keeps receipts for the varga sentence and hides Activity from the user", () => {
|
||||
test("rectification keeps receipts for the varga sentence and shows live tool progress", () => {
|
||||
const activityHelper = chat.slice(
|
||||
chat.indexOf("function completedReceiptFromPersisted"),
|
||||
chat.indexOf("export function RectificationAgenticChat"),
|
||||
@@ -254,12 +259,15 @@ test("rectification keeps receipts for the varga sentence and hides Activity fro
|
||||
assert.match(activityHelper, /receipt\.methods/);
|
||||
assert.match(activityHelper, /filter\(isPublicRectificationMethod\)/);
|
||||
assert.match(chat, /completedReceipt\?: CompletedActivityReceiptView/);
|
||||
assert.match(chat, /showActivity=\{displayedMessage\.state === "thinking"\}/);
|
||||
assert.match(chat, /showActivity=\{displayedMessage\.state !== "settled"\}/);
|
||||
assert.match(chat, /vargaSentenceFromMethods/);
|
||||
assert.match(chat, /vargaSentence=\{vargaSentence\}/);
|
||||
assert.match(board, /RectificationHouseTableView/);
|
||||
assert.doesNotMatch(chat, /activeActivity/);
|
||||
assert.doesNotMatch(chat, /正在读取校正记录/);
|
||||
assert.match(chat, /RECTIFICATION_TOOL_PROGRESS_LABELS/);
|
||||
assert.match(chat, /rectificationCompletedTrail\(activityReceiptState\.completedSteps\)/);
|
||||
assert.match(progressLabels, /正在读取校正记录/);
|
||||
assert.match(progressLabels, /正在比较候选时间/);
|
||||
assert.doesNotMatch(chat, /<CompletedActivityReceipt/);
|
||||
assert.match(chat, /event\.type === "tool\.activity"/);
|
||||
assert.match(chat, /event\.status === "started"/);
|
||||
@@ -279,6 +287,8 @@ test("rectification keeps receipts for the varga sentence and hides Activity fro
|
||||
for (const genericCopy of ["开始本轮执行", "正在加载专用方法", "专用方法已加载", "本轮做了什么"]) {
|
||||
assert.doesNotMatch(chat, new RegExp(genericCopy));
|
||||
}
|
||||
assert.match(chat, /回答未完成,已保留现有内容;本次不会扣点/);
|
||||
assert.doesNotMatch(chat, /reasoning-delta|chain-of-thought/);
|
||||
});
|
||||
|
||||
test("completed Agent replies restore feedback, copy and safe in-place regeneration actions", () => {
|
||||
@@ -431,7 +441,7 @@ test("rectification composer can stop a live agent run", () => {
|
||||
assert.match(chat, /aria-label="停止回答"/);
|
||||
assert.match(chat, /event\.type === "attempt\.reset"/);
|
||||
assert.match(chat, /caught\.name === "AbortError"/);
|
||||
assert.match(chat, /showActivity=\{displayedMessage\.state === "thinking"\}/);
|
||||
assert.match(chat, /showActivity=\{displayedMessage\.state !== "settled"\}/);
|
||||
});
|
||||
|
||||
test("conversation and house board reuse the quiet overlay scrollbar", () => {
|
||||
|
||||
Reference in New Issue
Block a user