Repository navigation
Commit 7a5df79
feat(composer): render captured selections as inline reference chips (#91)
* feat(composer): add inline selection reference token plumbing
Extend reference chips to carry selection kinds with custom labels and
icons, add composer unregister support, and introduce pure token helpers
so editor/browser/canvas selections can render as inline chips.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* refactor(chat): drive selections from composer tokens instead of pills
Replace the context-row selection pills with a token sink so the three
selection controllers append inline chips to the composer text and
reconcile on manual edits. The context row now only hosts image previews.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* feat(chat): render selection tokens as chips in sent bubbles
Recognize editor/browser/canvas selection tokens in message text, map
each kind to its icon, and document them for the agent so it relies on
the accompanying XML snapshots rather than resolving the tokens.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* chore(chat): drop the pill-era selectors and styles left by the token migration
The context row now only ever holds the image preview, so the visibility
check, its tests, the mock display map and the pill/file-chip CSS rules for
the removed indicators are dead weight.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix(composer): keep selection chips decorated when typing right after them
Append a trailing space with the token so the decoration boundary holds while
the user continues typing at the end of the input.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix(chat): recognize selection tokens whose note path contains spaces
The bubble scanner's path part excluded whitespace, so tokens for notes under
spaced folders never chipified and rendered as raw text.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix(composer): do not re-append a selection whose chip was sent or removed
The editor highlight outlives the sent turn, so the poll re-captured the same
range and put the chip back into the cleared composer. Remember the consumed
selection signature until the highlight collapses or the selection changes.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix(composer): survive view-reload blips when suppressing consumed selections
Reopening a note (e.g. from a sent-message chip) yields one empty-selection
poll before the persisted highlight returns, which reset the consumed marker
and re-appended the chip. Require two consecutive empty polls before a
collapsed selection counts as fresh intent.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* feat(composer): re-select the referenced lines when a selection chip is clicked
Clicking a selection chip (composer or sent bubble) opened the note but left
the range unmarked; parse the token's line suffix and restore the editor
selection so the highlight points back at the exact range.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* fix(composer): keep a consumed selection suppressed until the range changes
The empty-poll heuristic still lost the consumed marker while a note reloads
(clicking a sent chip), re-appending the selection. Treat a consumed range as
permanently spent; only a different selection restores auto-append.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
* refactor(composer): keep selection and chip in plain live sync
Drop the consumed-signature bookkeeping: a visible selection always shows its
chip, clicking a chip restores the highlight and therefore the chip. Sending a
turn collapses the editor selection so the chip leaves with the message
instead of snapping back into the cleared composer.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
---------
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>1 parent 5901d7b commit 7a5df79
31 files changed
Lines changed: 1049 additions & 593 deletions
File tree
- src
- features/chat
- controllers
- rendering
- tabs
- ui
- composer
- file-context
- qoder/prompt
- style
- components
- tests
- helpers
- unit
- features/chat/controllers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
| 29 | + | |
22 | 30 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | | - | |
32 | 33 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 240 | + | |
| 241 | + | |
245 | 242 | | |
246 | 243 | | |
247 | | - | |
248 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
249 | 247 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
260 | 275 | | |
261 | | - | |
262 | 276 | | |
263 | 277 | | |
264 | | - | |
265 | | - | |
| 278 | + | |
| 279 | + | |
266 | 280 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
272 | 290 | | |
273 | | - | |
274 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
275 | 300 | | |
276 | | - | |
277 | 301 | | |
278 | 302 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
283 | 309 | | |
284 | 310 | | |
285 | 311 | | |
| |||
292 | 318 | | |
293 | 319 | | |
294 | 320 | | |
295 | | - | |
| 321 | + | |
296 | 322 | | |
297 | 323 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
| 36 | + | |
28 | 37 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | | - | |
38 | 40 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
119 | 136 | | |
120 | | - | |
121 | 137 | | |
122 | 138 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
127 | 162 | | |
128 | 163 | | |
129 | 164 | | |
| |||
140 | 175 | | |
141 | 176 | | |
142 | 177 | | |
143 | | - | |
| 178 | + | |
144 | 179 | | |
145 | 180 | | |
0 commit comments