(
state: MakaPiTranscriptState,
sourceToolCallId: string,
update: Extract<ToolResultContent, { kind: 'shell_run' }>,
)
| 299 | } |
| 300 | |
| 301 | export function applyShellRunUpdateToTranscript( |
| 302 | state: MakaPiTranscriptState, |
| 303 | sourceToolCallId: string, |
| 304 | update: Extract<ToolResultContent, { kind: 'shell_run' }>, |
| 305 | ): boolean { |
| 306 | const tool = findToolEntry(state, sourceToolCallId); |
| 307 | if (!tool || tool.toolName !== 'Bash') return false; |
| 308 | if (tool.result?.kind === 'shell_run' && tool.result.ref !== update.ref) return false; |
| 309 | return applyShellRunResult(tool, update); |
| 310 | } |
| 311 | |
| 312 | export function replaceTranscriptWithStoredMessages( |
| 313 | state: MakaPiTranscriptState, |
no test coverage detected