MCPcopy Create free account
hub / github.com/arctic-cli/interface / assistant

Function assistant

packages/arctic/test/session/message-v2.test.ts:29–54  ·  view source on GitHub ↗
(id: string, parentID: string, text: string)

Source from the content-addressed store, hash-verified

27}
28
29function assistant(id: string, parentID: string, text: string): MessageV2.WithParts {
30 return {
31 info: {
32 id,
33 sessionID,
34 role: "assistant",
35 parentID,
36 modelID: "claude-sonnet-4-20250514",
37 providerID: "anthropic",
38 mode: "build",
39 path: { cwd: "/", root: "/" },
40 cost: 0,
41 tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } },
42 time: { created: 0 },
43 },
44 parts: [
45 {
46 id: "p_" + id,
47 sessionID,
48 messageID: id,
49 type: "text",
50 text,
51 },
52 ],
53 }
54}
55
56function userText(msg: ModelMessage): string {
57 if (msg.role !== "user" || !Array.isArray(msg.content)) return ""

Callers 1

message-v2.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected