feat(agents): reference chips, quote blocks and a richer completion in the composer (#3091)

The agent composer is now a CodeMirror editor: the text stays plain and is what's sent, while @ file references are drawn as chips (icon, name, lines) that move and delete as one piece, open on click and preview on hover; Backspace after a chip opens it as text. Quotes show as blocks, and sent messages get the same chips and quote blocks. The @ completion lists open editors first, highlights matches and shows the folder; the focused editor's file is offered above the text, a pasted project path becomes a reference, and dropping files shows a hint. Lines copied from an editor paste as a reference, terminal output as a terminal block, and code blocks show as cards. The reference trimming regex avoids lookbehind for WebKit before 16.4.
This commit is contained in:
l0ng-ai
2026-11-13 22:29:59 +08:00
committed by GitHub
parent 834f9e172c
commit 89f00a29f9
35 changed files with 3407 additions and 745 deletions
+3 -2
View File
@@ -41,11 +41,12 @@
/* A picker that reads as a chip beside the facts it belongs with (Chip). */
.chip {
composes: surface from "./Chip.module.css";
padding: 0 4px 0 8px;
padding: 0 4px 0 6px;
}
.chip:hover,
.chip[aria-expanded="true"] {
background: var(--bg-hover);
background: var(--bg-toolbar-hover);
color: var(--fg-strong);
}
.chip:focus-visible {
outline: none;