Play rounds end in present.v1 body instead of creation HITL.
Narrator uses capability-probed structured delivery and falls back to shell body on failure; play UI hides worker questions and keeps thinking on process rows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,8 @@ import {
|
||||
parsePresentPacket,
|
||||
parseShellAdaptationFromReplyFormat,
|
||||
presentFromPlainText,
|
||||
presentOutputFromFallback,
|
||||
isPlayPresentWorker,
|
||||
shellDefaultRegions,
|
||||
} from "../src/skills/present-packet.js";
|
||||
|
||||
@@ -114,3 +116,18 @@ describe("shell adaptation from reply-format", () => {
|
||||
expect(adapt?.shell_id).toBe("prose");
|
||||
});
|
||||
});
|
||||
|
||||
describe("play present worker", () => {
|
||||
it("recognizes narrator and round-present", () => {
|
||||
expect(isPlayPresentWorker("narrator")).toBe(true);
|
||||
expect(isPlayPresentWorker("round-present")).toBe(true);
|
||||
expect(isPlayPresentWorker("world-simulator")).toBe(false);
|
||||
});
|
||||
|
||||
it("fallback packet uses the given shell", () => {
|
||||
const raw = presentOutputFromFallback("她点了点头。", "chat_monitor");
|
||||
const view = parsePresentPacket(raw, "prose");
|
||||
expect(view.packet.shell).toBe("chat_monitor");
|
||||
expect(view.packet.blocks.body).toBe("她点了点头。");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user