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

Function makeThinkingEntry

packages/cli/src/commands/migrate.ts:340–358  ·  view source on GitHub ↗
(
    text: string,
    timestamp: string,
    parentId: string | null,
    usage: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

338}
339
340function makeThinkingEntry(
341 text: string,
342 timestamp: string,
343 parentId: string | null,
344 usage: Record<string, unknown>,
345): PiJson {
346 return {
347 type: "message",
348 id: shortId(),
349 parentId,
350 timestamp,
351 message: {
352 role: "assistant",
353 content: [{ type: "thinking", thinking: text, thinkingSignature: null }],
354 timestamp: Date.parse(timestamp),
355 usage,
356 },
357 };
358}
359
360function makeToolCallEntry(
361 tool: { callId: string; name: string; input: unknown },

Callers 1

convertPartToEntriesFunction · 0.85

Calls 1

shortIdFunction · 0.85

Tested by

no test coverage detected