MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isResultTruncated

Function isResultTruncated

src/tools/FileWriteTool/UI.tsx:142–155  ·  view source on GitHub ↗
({
  type,
  content
}: Output)

Source from the content-addressed store, hash-verified

140 * Called per visible message on hover/scroll, so early-exit after finding the
141 * (MAX+1)th line instead of splitting the whole (possibly huge) content. */
142export function isResultTruncated({
143 type,
144 content
145}: Output): boolean {
146 if (type !== 'create') return false;
147 let pos = 0;
148 for (let i = 0; i < MAX_LINES_TO_RENDER; i++) {
149 pos = content.indexOf(EOL, pos);
150 if (pos === -1) return false;
151 pos++;
152 }
153 // countLines treats a trailing EOL as a terminator, not a new line
154 return pos < content.length;
155}
156export function getToolUseSummary(input: Partial<{
157 file_path: string;
158 content: string;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected