84
if (newPart) {
85
if (i !== 0) {
86
>
// Insert a part for all the text we passed over, then insert the new parsed part
chatRequestParser.ts
87
>
const previousPart = parts.at(-1);
88
>
const previousPartEnd = previousPart?.range.endExclusive ?? 0;
89
>
const previousPartEditorRangeEndLine = previousPart?.editorRange.endLineNumber ?? 1;
90
>
const previousPartEditorRangeEndCol = previousPart?.editorRange.endColumn ?? 1;
91
>
parts.push(new ChatRequestTextPart(
92
>
new OffsetRange(previousPartEnd, i),
93
>
new Range(previousPartEditorRangeEndLine, previousPartEditorRangeEndCol, lineNumber, column),
94
>
message.slice(previousPartEnd, i)));
95
>
}
96
97
parts.push(newPart);