MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isMemoryWriteOrEdit

Function isMemoryWriteOrEdit

source code/utils/collapseReadSearch.ts:111–117  ·  view source on GitHub ↗

* Check if a Write or Edit tool use targets a memory file and should be collapsed.

(toolName: string, toolInput: unknown)

Source from the content-addressed store, hash-verified

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

Callers 1

getToolSearchOrReadInfoFunction · 0.85

Calls 2

getFilePathFromToolInputFunction · 0.85
isAutoManagedMemoryFileFunction · 0.85

Tested by

no test coverage detected