(commit: StreamCommit, raw: string)
| 1357 | } |
| 1358 | |
| 1359 | export function toolSnapshot(commit: StreamCommit, raw: string): ToolSnapshot | undefined { |
| 1360 | const ctx = toolFrame(commit, raw) |
| 1361 | const draw = rule(ctx.name)?.snap |
| 1362 | if (!draw) { |
| 1363 | return undefined |
| 1364 | } |
| 1365 | |
| 1366 | try { |
| 1367 | return draw(props(ctx)) |
| 1368 | } catch { |
| 1369 | return undefined |
| 1370 | } |
| 1371 | } |
| 1372 | |
| 1373 | function textBody(content: string): RunEntryBody | undefined { |
| 1374 | if (!content) { |
no test coverage detected