Skip to content

Misc updates#1202

Open
curran wants to merge 1 commit into
mainfrom
misc-changes
Open

Misc updates#1202
curran wants to merge 1 commit into
mainfrom
misc-changes

Conversation

@curran

@curran curran commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes small cleanup updates in the LLM streaming server code, primarily improving how diff metadata is attached to AI chat messages to avoid relying on “last message” assumptions.

Changes:

  • Update addDiffToAIMessage to optionally target a specific AI message via messageId, with a safer fallback that searches for the most recent assistant message.
  • Remove stray blank lines in the LLM streaming implementation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/llm-streaming-server/llmStreaming.ts Removes unnecessary blank lines (formatting cleanup).
src/llm-streaming-server/chatOperations.ts Improves diff attachment logic by supporting explicit message targeting and safer assistant-message lookup.

Comment on lines +313 to +323
if (messageId) {
targetMessageIndex = messages.findIndex(
(msg) => msg.id === messageId,
);
if (targetMessageIndex === -1) {
console.warn(
`AI message with id ${messageId} not found in chat ${chatId}`,
);
return;
}
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants