* Check if a Write or Edit tool use targets a memory file and should be collapsed.
(toolName: string, toolInput: unknown)
| 129 | * Check if a Write or Edit tool use targets a memory file and should be collapsed. |
| 130 | */ |
| 131 | function isMemoryWriteOrEdit(toolName: string, toolInput: unknown): boolean { |
| 132 | if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME) { |
| 133 | return false |
| 134 | } |
| 135 | const filePath = getFilePathFromToolInput(toolInput) |
| 136 | return filePath !== undefined && isAutoManagedMemoryFile(filePath) |
| 137 | } |
| 138 | |
| 139 | // ~5 lines × ~60 cols. Generous static cap — the renderer lets Ink wrap. |
| 140 | const MAX_HINT_CHARS = 300 |
no test coverage detected