feat(files): comment on selection in read-only markdown previews
Selecting text in a rendered markdown preview shows a Comment pill; attaching stores a file-quote context draft carrying the file path, the selected fragment (not whole lines), the user's comment, and a best-effort source line range resolved by anchoring the fragment's first and last lines in the raw content — a partially located fragment gets no range rather than a misleading one. The fragment stays highlighted while the comment input is open, using the selection overlay rects shared with chat quote comments, and the preview's native selection color now matches chat messages. file-quote flows through the same context contract: composer chip previews, the message context card, and the metadata round-trip.
This commit is contained in:
@@ -76,7 +76,9 @@ button,
|
||||
}
|
||||
|
||||
:root.light .message-content-text::selection,
|
||||
:root.light .message-content-text ::selection {
|
||||
:root.light .message-content-text ::selection,
|
||||
:root.light .oc-file-preview::selection,
|
||||
:root.light .oc-file-preview ::selection {
|
||||
background: color-mix(in srgb, var(--interactive-border-focus) 18%, transparent);
|
||||
color: var(--surface-foreground);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user