* Check if a Write or Edit tool use targets a memory file and should be collapsed.
(toolName: string, toolInput: unknown)
| 107 | * Check if a Write or Edit tool use targets a memory file and should be collapsed. |
| 108 | */ |
| 109 | function isMemoryWriteOrEdit(toolName: string, toolInput: unknown): boolean { |
| 110 | if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME) { |
| 111 | return false |
| 112 | } |
| 113 | const filePath = getFilePathFromToolInput(toolInput) |
| 114 | return filePath !== undefined && isAutoManagedMemoryFile(filePath) |
| 115 | } |
| 116 | |
| 117 | // ~5 lines × ~60 cols. Generous static cap — the renderer lets Ink wrap. |
| 118 | const MAX_HINT_CHARS = 300 |
no test coverage detected