MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / expandForLines

Method expandForLines

packages/pi-tui/src/tui.ts:1155–1164  ·  view source on GitHub ↗
(lines: string[])

Source from the content-addressed store, hash-verified

1153 let expandedFirstChanged = firstChanged;
1154 let expandedLastChanged = lastChanged;
1155 const expandForLines = (lines: string[]): void => {
1156 for (let i = 0; i < lines.length; i++) {
1157 if (extractKittyImageIds(lines[i]!).length === 0) continue;
1158 const blockEnd = i + this.getKittyImageReservedRows(lines, i) - 1;
1159 if (i >= firstChanged || (i <= lastChanged && blockEnd >= firstChanged)) {
1160 expandedFirstChanged = Math.min(expandedFirstChanged, i);
1161 expandedLastChanged = Math.max(expandedLastChanged, blockEnd);
1162 }
1163 }
1164 };
1165
1166 expandForLines(this.previousLines);
1167 expandForLines(newLines);

Callers

nothing calls this directly

Calls 2

extractKittyImageIdsFunction · 0.85

Tested by

no test coverage detected