Ship Paseo-equivalent provider snapshot, AgentComposerBar, ACP dispatch rewrite with streaming/persist, permission prompts, and agent commands. Follow-up: pane-scoped chat resolution, CoderMessageList tool timeline, WS user-delta replace, and inference orphan tool_call stripping. Archive openspec v2-2; update CHANGELOG and CURRENT. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
335 B
TypeScript
12 lines
335 B
TypeScript
/** User messages are inserted atomically — never stream-append like assistant deltas. */
|
|
export function applyMessageDelta(
|
|
role: 'user' | 'assistant' | 'system' | 'tool',
|
|
existingContent: string,
|
|
chunk: string,
|
|
): string {
|
|
if (role === 'user') {
|
|
return chunk || existingContent;
|
|
}
|
|
return existingContent + chunk;
|
|
}
|