Commit b222e0b
authored
feat(chat): Grouping read and list directory messages UX (#7006)
### Problem:
We identified and fixed an issue where the IDE's UI would prematurely
stop displaying when executing certain commands. This occurred
specifically when the Language Model (LLM) attempted to run the
executeBash command before the Read/List Directory tools.
### Example:
When a user asks "write a script that tells me whoami", the operation
only requires the fsWrite command and not any directory reading tools.
In such cases, the IDE would execute fsWrite but fail to display the
executeBash tool in the chat interface. This[ UI behavior has been
corrected
](https://github.com/aws/aws-toolkit-vscode/blob/2028754f3d933909f86bb65f18f06dab526d2708/packages/core/src/codewhispererChat/tools/chatStream.ts#L43-L47)in
this PR, along with improvements to the Reading File user experience.
- Major changes lies in this
[commit](https://github.com/aws/aws-toolkit-vscode/blob/2028754f3d933909f86bb65f18f06dab526d2708/packages/core/src/codewhispererChat/tools/chatStream.ts#L43-L47)
in `ChatStream.ts`
```
// For FsRead and ListDirectory tools If messageIdToUpdate is undefined, we need to first create an empty message with messageId so it can be updated later
if (isReadorList && !messageIdToUpdate) {
this.messenger.sendInitialToolMessage(tabID, triggerID, toolUse?.toolUseId)
} else {
this.messenger.sendInitalStream(tabID, triggerID)
}
```
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent 68f9468 commit b222e0b
File tree
11 files changed
+308
-85
lines changed- packages/core/src
- amazonq/webview/ui
- apps
- codewhispererChat
- clients/chat/v0
- controllers/chat
- messenger
- tools
- view/connector
11 files changed
+308
-85
lines changedLines changed: 48 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
182 | 209 | | |
183 | 210 | | |
184 | 211 | | |
| |||
238 | 265 | | |
239 | 266 | | |
240 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
241 | 273 | | |
242 | 274 | | |
243 | 275 | | |
| |||
369 | 401 | | |
370 | 402 | | |
371 | 403 | | |
372 | | - | |
373 | | - | |
374 | | - | |
| 404 | + | |
| 405 | + | |
375 | 406 | | |
376 | 407 | | |
377 | 408 | | |
378 | | - | |
| 409 | + | |
| 410 | + | |
379 | 411 | | |
380 | 412 | | |
381 | 413 | | |
382 | | - | |
383 | | - | |
384 | | - | |
| 414 | + | |
| 415 | + | |
385 | 416 | | |
386 | 417 | | |
387 | 418 | | |
388 | | - | |
| 419 | + | |
| 420 | + | |
389 | 421 | | |
390 | 422 | | |
391 | 423 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 424 | + | |
| 425 | + | |
396 | 426 | | |
397 | 427 | | |
398 | 428 | | |
399 | | - | |
| 429 | + | |
| 430 | + | |
400 | 431 | | |
401 | 432 | | |
402 | 433 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 434 | + | |
| 435 | + | |
407 | 436 | | |
408 | 437 | | |
409 | 438 | | |
410 | | - | |
| 439 | + | |
| 440 | + | |
411 | 441 | | |
412 | 442 | | |
413 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 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 | + | |
| 136 | + | |
| 137 | + | |
103 | 138 | | |
104 | 139 | | |
105 | 140 | | |
| |||
346 | 381 | | |
347 | 382 | | |
348 | 383 | | |
349 | | - | |
| 384 | + | |
350 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
351 | 389 | | |
352 | 390 | | |
353 | 391 | | |
| |||
409 | 447 | | |
410 | 448 | | |
411 | 449 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
| 450 | + | |
438 | 451 | | |
439 | 452 | | |
440 | 453 | | |
| |||
Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
52 | 71 | | |
53 | 72 | | |
54 | 73 | | |
| |||
95 | 114 | | |
96 | 115 | | |
97 | 116 | | |
98 | | - | |
| 117 | + | |
99 | 118 | | |
100 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
106 | 128 | | |
107 | | - | |
| 129 | + | |
108 | 130 | | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
112 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
113 | 141 | | |
114 | 142 | | |
115 | 143 | | |
| |||
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
732 | | - | |
733 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
734 | 744 | | |
735 | 745 | | |
736 | 746 | | |
| |||
1221 | 1231 | | |
1222 | 1232 | | |
1223 | 1233 | | |
| 1234 | + | |
1224 | 1235 | | |
1225 | 1236 | | |
1226 | 1237 | | |
| |||
0 commit comments