fix(web): isolate rectification answers from tool-step planning text
Mastra intermediate text-delta was published as answer.delta, then set-focus domain errors reset the attempt and replayed evidence. Publish only the terminal no-tool step, persist the next probe on the server, and ground batch quotes in the source turn. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -537,6 +537,28 @@ test("rectification keeps the composer but never renders generated suggestion ch
|
||||
assert.match(chat, /点上面的选项即可/);
|
||||
});
|
||||
|
||||
test("does not parse suggestions from an incomplete run", () => {
|
||||
assert.match(chat, /completed && !streamFailed \? parseAgentReply/);
|
||||
assert.doesNotMatch(chat, /parseAgentReply\(raw\)/);
|
||||
assert.doesNotMatch(chat, /parseAgentReply\(partial/);
|
||||
});
|
||||
|
||||
test("does not auto-submit a suggestion during render or recovery", () => {
|
||||
assert.match(chat, /origin: "typed"/);
|
||||
assert.match(chat, /origin: "choice_click"/);
|
||||
assert.doesNotMatch(chat, /origin: "suggestion_click"/);
|
||||
assert.doesNotMatch(chat, /origin: "system_recovery"/);
|
||||
assert.doesNotMatch(chat, /2002/);
|
||||
});
|
||||
|
||||
test("persists message origin for every user turn", () => {
|
||||
assert.match(route, /origin: z\.enum\(/);
|
||||
assert.match(route, /messageOrigin:/);
|
||||
assert.match(route, /clientActionId:/);
|
||||
assert.match(chat, /clientActionId: requestId/);
|
||||
assert.match(chat, /clientActionId: actionId/);
|
||||
});
|
||||
|
||||
test("rectification Agent output stays natural and keeps tool execution silent", () => {
|
||||
const skill = readFileSync(
|
||||
new URL("../../skills/jyotish-birth-time-rectification/SKILL.md", import.meta.url),
|
||||
|
||||
Reference in New Issue
Block a user