Commit bcdfcdd
authored
fix(amazonq): enable input after prompt is rejected, prevent iteration limit exceeded (#6395)
## Problem
When a user encounters an error while updating a README, they see a
"Retry" button, which isn't correct because the previous prompt is not
retried. Instead, the user should be able to input a new prompt.
When a user runs out of iterations in a session, the chat allows them to
continue making README update requests, which results in an "Iteration
limit exceeded error".
## Solution
If a user gets an error while updating a README, the chat input is
enabled and the user can try another prompt.
Once the user hits their iteration limit for the session, they are not
able to suggest more changes and have to accept/reject the existing set
of changes. This will reduce the "iteration limit exceeded" errors
encountered by users.
A E2E test is added to verify that prompt errors during README updates
are handled correctly with the relevant error message, and validates
that users can enter a new prompt.
Screenshots:
_Prompt enabled after error updating README_
<img width="520" alt="image"
src="https://github.com/user-attachments/assets/407109d2-3f10-4e8c-9312-ecab57e625b4"
/>
_'Make changes' button hidden once iteration limit is reached_
<img width="506" alt="image"
src="https://github.com/user-attachments/assets/acf960c0-1c43-475c-a478-c95336ab857b"
/>
---
- 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 d7bfb5d commit bcdfcdd
File tree
10 files changed
+149
-130
lines changed- packages
- amazonq
- .changes/next-release
- test/e2e/amazonq
- core
- src
- amazonqDoc
- controllers/chat
- session
- amazonq/commons/connector
10 files changed
+149
-130
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
149 | 177 | | |
150 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
388 | | - | |
| 389 | + | |
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| |||
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 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 | + | |
95 | 132 | | |
96 | 133 | | |
97 | 134 | | |
| |||
Lines changed: 29 additions & 71 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 302 | + | |
313 | 303 | | |
314 | 304 | | |
315 | 305 | | |
| |||
412 | 402 | | |
413 | 403 | | |
414 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
415 | 409 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
422 | 418 | | |
423 | 419 | | |
424 | 420 | | |
| |||
427 | 423 | | |
428 | 424 | | |
429 | 425 | | |
430 | | - | |
431 | | - | |
432 | 426 | | |
433 | 427 | | |
434 | 428 | | |
| |||
461 | 455 | | |
462 | 456 | | |
463 | 457 | | |
464 | | - | |
465 | | - | |
466 | 458 | | |
467 | 459 | | |
468 | | - | |
469 | | - | |
470 | 460 | | |
471 | 461 | | |
472 | 462 | | |
| |||
590 | 580 | | |
591 | 581 | | |
592 | 582 | | |
593 | | - | |
| 583 | + | |
594 | 584 | | |
595 | 585 | | |
596 | | - | |
597 | 586 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
627 | 598 | | |
628 | 599 | | |
629 | 600 | | |
| |||
642 | 613 | | |
643 | 614 | | |
644 | 615 | | |
| 616 | + | |
645 | 617 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | 618 | | |
650 | 619 | | |
651 | 620 | | |
| |||
670 | 639 | | |
671 | 640 | | |
672 | 641 | | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
| 642 | + | |
685 | 643 | | |
686 | 644 | | |
687 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 31 | + | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
39 | | - | |
| 35 | + | |
40 | 36 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
52 | 44 | | |
53 | 45 | | |
54 | 46 | | |
55 | | - | |
| 47 | + | |
56 | 48 | | |
57 | | - | |
| 49 | + | |
58 | 50 | | |
59 | 51 | | |
60 | 52 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
66 | 56 | | |
67 | 57 | | |
68 | 58 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
74 | 62 | | |
75 | 63 | | |
0 commit comments