(input: {
readonly toolCallId: string
readonly toolName: string
readonly state: RunningToolState
readonly output?: string
readonly cwd?: string
})
| 138 | } |
| 139 | |
| 140 | export function runningToolUpdate(input: { |
| 141 | readonly toolCallId: string |
| 142 | readonly toolName: string |
| 143 | readonly state: RunningToolState |
| 144 | readonly output?: string |
| 145 | readonly cwd?: string |
| 146 | }): ToolCallUpdate { |
| 147 | const content = input.output |
| 148 | ? [ |
| 149 | { |
| 150 | type: "content" as const, |
| 151 | content: { |
| 152 | type: "text" as const, |
| 153 | text: input.output, |
| 154 | }, |
| 155 | }, |
| 156 | ] |
| 157 | : undefined |
| 158 | |
| 159 | return { |
| 160 | toolCallId: input.toolCallId, |
| 161 | status: "in_progress", |
| 162 | kind: toToolKind(input.toolName), |
| 163 | title: toolTitle(input.toolName, input.state.input, input.state.title), |
| 164 | locations: toLocations(input.toolName, input.state.input, input.cwd), |
| 165 | rawInput: rawInput(input.toolName, input.state.input, input.cwd), |
| 166 | ...(content ? { content } : {}), |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | export function duplicateRunningToolUpdate(input: { |
| 171 | readonly toolCallId: string |
no test coverage detected