(error: string, label: string)
| 369 | } |
| 370 | |
| 371 | function formatErrorString(error: string, label: string): JSX.Element { |
| 372 | const errorMarker = "Error: " |
| 373 | const startsWithError = error.startsWith(errorMarker) |
| 374 | |
| 375 | return startsWithError ? ( |
| 376 | <pre> |
| 377 | <span data-color="red" data-marker="label" data-separator> |
| 378 | {label} |
| 379 | </span> |
| 380 | <span>{error.slice(errorMarker.length)}</span> |
| 381 | </pre> |
| 382 | ) : ( |
| 383 | <pre> |
| 384 | <span data-color="dimmed">{error}</span> |
| 385 | </pre> |
| 386 | ) |
| 387 | } |
| 388 | |
| 389 | export function TodoWriteTool(props: ToolProps) { |
| 390 | const messages = useShareMessages() |
no outgoing calls
no test coverage detected