From d3118957e1b4b4c249c901a7f09b91470a781785 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Wed, 26 Aug 2026 20:41:08 +1000 Subject: [PATCH] fix(staged): quote every line of review comments in session prompts buildCommentPrompt put a single '> ' before the whole comment body, so only the first line of a multi-line review comment was quoted in the note/commit session prompts started from a comment. Prefix each line (blank lines become bare '>') so the full comment renders as one contiguous markdown blockquote. Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- apps/staged/src/lib/features/diff/DiffModal.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/staged/src/lib/features/diff/DiffModal.svelte b/apps/staged/src/lib/features/diff/DiffModal.svelte index 2d295eab..c9ec582b 100644 --- a/apps/staged/src/lib/features/diff/DiffModal.svelte +++ b/apps/staged/src/lib/features/diff/DiffModal.svelte @@ -446,7 +446,12 @@ const reviewId = reviewHandle?.state.review?.id ?? activeReviewId; const reviewRef = reviewId ? `Re: #review:${reviewId}\n` : ''; const tail = mode === 'note' ? 'Plan a fix for this' : 'Fix this'; - return `${reviewRef}Code review comment:\n> ${comment.path} ${formatLineRange(comment.span)}\n> ${comment.content}\n\n${tail}`; + // Quote every line (blank ones too) so multi-line comments stay one blockquote. + const quotedContent = comment.content + .split('\n') + .map((line) => (line ? `> ${line}` : '>')) + .join('\n'); + return `${reviewRef}Code review comment:\n> ${comment.path} ${formatLineRange(comment.span)}\n${quotedContent}\n\n${tail}`; } async function launchSessionDirectly(comment: Comment, mode: BranchSessionType) {