(tool: string, title: string, status: "completed" | "running" = "completed")
| 27 | } |
| 28 | |
| 29 | function createToolPart(tool: string, title: string, status: "completed" | "running" = "completed"): SessionV1.Part { |
| 30 | if (status === "completed") { |
| 31 | return { |
| 32 | id: PartID.ascending(), |
| 33 | sessionID: SessionID.make("ses_test"), |
| 34 | messageID: MessageID.make("msg_test"), |
| 35 | type: "tool" as const, |
| 36 | callID: "c1", |
| 37 | tool, |
| 38 | state: { |
| 39 | status: "completed", |
| 40 | input: {}, |
| 41 | output: "", |
| 42 | title, |
| 43 | metadata: {}, |
| 44 | time: { start: 0, end: 1 }, |
| 45 | }, |
| 46 | } |
| 47 | } |
| 48 | return { |
| 49 | id: PartID.ascending(), |
| 50 | sessionID: SessionID.make("ses_test"), |
| 51 | messageID: MessageID.make("msg_test"), |
| 52 | type: "tool" as const, |
| 53 | callID: "c1", |
| 54 | tool, |
| 55 | state: { |
| 56 | status: "running", |
| 57 | input: {}, |
| 58 | time: { start: 0 }, |
| 59 | }, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | function createStepStartPart(): SessionV1.Part { |
| 64 | return { |
no test coverage detected