The dashboard talks only to the modules/chat API, which sends no slash commands, model list, voice support, attachments or any question other than an approval, so the UI built on those could never appear: - the slash command menu, Retry, Undo, Branch and Preview compression in the More menu, and the /model, /update and /new handling - the model picker, the update card and the api.update* calls - voice recording and the task tags nothing ever added - the questionnaire, picker and clarify cards, and the "Always this session" answer, so components/ui/questionnaire loses its last user - channel.ts, command-scroll.ts and turn.ts, which nothing imported - the old dock-storage migration and the second capitalised spelling of message and tool fields Tasks are gone from the binary too, so chat links and prompts speak of runs: the #N task-link step in the markdown renderer goes, since an agent already links pages through dashboard_navigate. state.ts keeps the shared state and actions; types.ts, stream.ts, transcript.ts, escape.ts and dock-window.ts hold the types, the stream reader, turn-to-message building, Escape layers and the dock's pointer and keyboard handling. ChatDock.vue drops from 560 lines to 307.
19 lines
577 B
TypeScript
19 lines
577 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { serializePromptValue } from "../src/chat/prompt-tokens.ts";
|
|
|
|
test("serializePromptValue maps text and tokens into the chat wire format", () => {
|
|
const cases = [
|
|
[["Review the retry policy"], "Review the retry policy"],
|
|
[
|
|
["Check ", { id: "1", type: "workflow", value: "wf-1", label: "Event triage" }, " runs"],
|
|
"Check @Event triage runs",
|
|
],
|
|
] as const;
|
|
|
|
for (const [value, expected] of cases) {
|
|
assert.equal(serializePromptValue([...value]), expected);
|
|
}
|
|
});
|