Skip to content

feat(chat): copy, quote or ask by the way about text selected in the conversation - #1301

Merged
leookun merged 1 commit into
mainfrom
feat/chat-selection-bar
Nov 25, 2026
Merged

leookun merged 1 commit into
mainfrom
feat/chat-selection-bar

Conversation

@leookun

@leookun leookun commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

What

Text selected in the conversation gets a bar over it: Copy, Quote and By the Way.

  • The bar shows as soon as the selection is made (the drag still held), over it as a document's editor has it — over the characters within a line, over the text across lines, under it where there is no room. It is placed as it is painted, so it goes with the selection as it is dragged and with the text as it scrolls in the same frame. It only fades in and out; it does not glide.
  • Quote puts the text in the message being written as a tag. The model gets the text with a note that the user quoted it from the conversation; a long one (past the long-paste limits) goes as a file, as a long paste does.
  • By the Way quotes it the same way in a /btw message (the command added once, before what is typed).
  • The history's right-click menu is the IDE's menu now: Copy, Quote, By the Way, Select All.
  • The bar's icons are Remix Icon's (Apache-2.0), drawn from SVGs through SvgIcons.

The markdown format bar (the IDE's markdown preview, the stash) shares the bar and how it follows: it shows while the drag is held, sits over the selection's middle, follows it in the same frame, and fades in and out instead of popping.

Tests

  • test/chat/history_selection_test.dart: the bar while dragging, Quote handing the text over, following scroll and the selection in the same frame, fading out at the next press, placement within a line and across lines, a drag begun beside a message.
  • test/composer_test.dart: quotes go in as tags; By the Way makes the message a /btw, once.
  • test/chat/composer_files_test.dart: the quote's appendix round-trips (inline and kept as a file).
  • test/ide/markdown/markdown_preview_test.dart: the format bar over the selection's middle, following in the same frame, fading out where it was.

🤖 Generated with BaoCode

…conversation

- A bar over text selected in the conversation: Copy, Quote and By the
  Way. It shows as soon as the selection is made, over it as a document's
  editor has it (under it where there is no room), and is placed as it is
  painted: it goes with the selection as it is dragged, and with the text
  as it scrolls, in that frame. It only fades in and out.
- Quote puts the text in the message being written as a tag; the model
  gets it with a note that the user quoted it from the conversation, and
  a long one as a file, as a long paste is. By the Way does the same in a
  /btw message (added once, before what is typed).
- The history's right-click menu is the IDE's: Copy, Quote, By the Way,
  Select All.
- The markdown format bar (the IDE's preview, the stash) shows while the
  drag is held, over the selection's middle, follows it in the same frame
  and fades in and out, on the bar and follower they now share.

Co-Authored-By: BaoCode <noreply@baocode.dev>
@leookun
leookun merged commit 1b9460e into main Nov 25, 2026
3 checks passed
@leookun
leookun deleted the feat/chat-selection-bar branch November 25, 2026 04:29
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