858
return;
859
} else if (progress.kind === 'markdownContent') {
861
>
// last response which is NOT a text edit group because we do want to support heterogenous streaming but not have
862
>
// the MD be chopped up by text edit groups (and likely other non-renderable parts)
863
>
const lastResponsePart = this._responseParts
864
>
.filter(p => p.kind !== 'textEditGroup')
865
>
.at(-1);
866
>
867
>
if (!lastResponsePart || lastResponsePart.kind !== 'markdownContent' || !canMergeMarkdownStrings(lastResponsePart.content, progress.content)) {
868
>
// The last part can't be merged with- not markdown, or markdown with different permissions
869
>
this._responseParts.push(progress);
870
>
} else {
871
// Don't modify the current object, since it's being diffed by the renderer
872
const idx = this._responseParts.indexOf(lastResponsePart);
873
this._responseParts[idx] = { ...lastResponsePart, content: appendMarkdownString(lastResponsePart.content, progress.content) };
874
}
876
} else if (progress.kind === 'thinking') {
877