* Check if a Write or Edit tool use targets a memory file and should be collapsed.
(toolName: string, toolInput: unknown)
| 120 | * Check if a Write or Edit tool use targets a memory file and should be collapsed. |
| 121 | */ |
| 122 | function isMemoryWriteOrEdit(toolName: string, toolInput: unknown): boolean { |
| 123 | if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME) { |
| 124 | return false |
| 125 | } |
| 126 | const filePath = getFilePathFromToolInput(toolInput) |
| 127 | return filePath !== undefined && isAutoManagedMemoryFile(filePath) |
| 128 | } |
| 129 | |
| 130 | // ~5 lines × ~60 cols. Generous static cap — the renderer lets Ink wrap. |
| 131 | const MAX_HINT_CHARS = 300 |
no test coverage detected