mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 12:21:24 +00:00
refactor(gateway-test): share preview transcript fixture
This commit is contained in:
11
src/gateway/session-preview.test-helpers.ts
Normal file
11
src/gateway/session-preview.test-helpers.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export function createToolSummaryPreviewTranscriptLines(sessionId: string): string[] {
|
||||
return [
|
||||
JSON.stringify({ type: "session", version: 1, id: sessionId }),
|
||||
JSON.stringify({ message: { role: "user", content: "Hello" } }),
|
||||
JSON.stringify({ message: { role: "assistant", content: "Hi" } }),
|
||||
JSON.stringify({
|
||||
message: { role: "assistant", content: [{ type: "toolcall", name: "weather" }] },
|
||||
}),
|
||||
JSON.stringify({ message: { role: "assistant", content: "Forecast ready" } }),
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user