MCPcopy Create free account
hub / github.com/cortexkit/magic-context / makeTranscriptId

Function makeTranscriptId

packages/pi-plugin/src/transcript-pi.test.ts:207–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205 });
206 it("gives tail synthetic tool-result users a stable deterministic id", () => {
207 const makeTranscriptId = () => {
208 const messages = [
209 assistantToolCall("call-tail", "Read", { path: "tail.txt" }, 11),
210 toolResultMessage("call-tail", "tail output", 12),
211 ];
212 const transcript = createPiTranscript(messages, "ses-transcript", [
213 "entry-assistant",
214 "entry-tool-result",
215 ]);
216
217 return transcript.messages[1]?.info.id;
218 };
219
220 expect(makeTranscriptId()).toBe("synth-user-entry-tool-result");
221 expect(makeTranscriptId()).toBe(makeTranscriptId());

Callers 1

Calls 3

assistantToolCallFunction · 0.90
toolResultMessageFunction · 0.90
createPiTranscriptFunction · 0.90

Tested by

no test coverage detected