Commit 7763c68
feat: Add support for message queueing (RooCodeInc#6167)
* feat: Add support for message queueing
* fix: address PR review feedback for message queueing feature
- Restore original ChatView tests from main branch
- Fix broken test by updating ChatTextArea mock
- Add comprehensive tests for message queueing (simplified due to mocking constraints)
- Fix race condition using useRef and setTimeout in queue processing
- Extract QueuedMessage interface to shared types.ts file
- Replace inline styles with Tailwind classes in QueuedMessages
- Add i18n support for 'Queued Messages:' text
- Add keyboard navigation for removing queued messages
- Add JSDoc for fromQueue parameter in handleSendMessage
* refactor: move QueuedMessage interface to packages/types
- Move QueuedMessage interface from local types.ts to packages/types/src/message.ts
- Update imports in ChatView.tsx and QueuedMessages.tsx to use @roo-code/types
- Remove local types.ts file to follow codebase conventions
* fix: add id field when creating queued messages
- Generate unique id using timestamp when adding messages to queue
- Fixes TypeScript error after moving QueuedMessage interface
* Stop disabling sending
* Translations
* Fix tests
* Improved styling
* Remove unused string
* Test cleanup
* fix: address message queueing issues
- Fix race condition in queue processing by re-checking queue state inside setTimeout
- Add error handling for queue operations with retry mechanism
- Replace array index with stable message.id for React keys in QueuedMessages
- Generate more unique IDs using timestamp + random component
* feat: add inline editing for queued messages
- Add ability to edit queued messages by clicking on them
- Support Enter to save and Escape to cancel edits
- Add textarea that auto-resizes based on content
- Add hover effect to indicate messages are editable
- Add translation for click to edit tooltip
* feat: add scrollbar and fix height for queued messages
- Add max-height of 300px with scrollbar to queue container
- Add flex-shrink-0 to prevent message items from being squished
- Ensure consistent height for message items when multiple messages are queued
* feat: add translations for queued message edit tooltip
- Add 'queuedMessages.clickToEdit' translation key to all 18 language files
- Provides localized tooltip text for the click-to-edit functionality
* fix: improve message queue processing reliability
- Fix race condition by removing nested setState and setTimeout
- Add retry limit (3 attempts) to prevent infinite loops
- Add proper cleanup on component unmount
- Clear queue when starting new task
- Prevent queue processing during API errors
- Fix ESLint warnings for React hooks dependencies
---------
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Daniel Riccio <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>1 parent 1c3d226 commit 7763c68
File tree
25 files changed
+847
-554
lines changed- packages/types/src
- src
- webview-ui/src
- components/chat
- __tests__
- i18n/locales
- ca
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- tr
- vi
- zh-CN
- zh-TW
25 files changed
+847
-554
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 207 | | |
212 | 208 | | |
213 | 209 | | |
| |||
216 | 212 | | |
217 | 213 | | |
218 | 214 | | |
219 | | - | |
| 215 | + | |
220 | 216 | | |
221 | 217 | | |
222 | 218 | | |
| |||
436 | 432 | | |
437 | 433 | | |
438 | 434 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
444 | 438 | | |
445 | 439 | | |
446 | 440 | | |
| |||
488 | 482 | | |
489 | 483 | | |
490 | 484 | | |
491 | | - | |
492 | 485 | | |
493 | 486 | | |
494 | 487 | | |
| |||
1034 | 1027 | | |
1035 | 1028 | | |
1036 | 1029 | | |
1037 | | - | |
1038 | | - | |
| 1030 | + | |
| 1031 | + | |
1039 | 1032 | | |
1040 | 1033 | | |
1041 | 1034 | | |
| |||
1045 | 1038 | | |
1046 | 1039 | | |
1047 | 1040 | | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
| 1041 | + | |
1051 | 1042 | | |
1052 | 1043 | | |
1053 | 1044 | | |
| |||
1059 | 1050 | | |
1060 | 1051 | | |
1061 | 1052 | | |
1062 | | - | |
1063 | | - | |
| 1053 | + | |
| 1054 | + | |
1064 | 1055 | | |
1065 | 1056 | | |
1066 | 1057 | | |
| |||
1070 | 1061 | | |
1071 | 1062 | | |
1072 | 1063 | | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
| 1064 | + | |
1076 | 1065 | | |
1077 | 1066 | | |
1078 | 1067 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
442 | 453 | | |
443 | 454 | | |
444 | 455 | | |
| |||
538 | 549 | | |
539 | 550 | | |
540 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
541 | 558 | | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
554 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
555 | 581 | | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
573 | 608 | | |
574 | | - | |
575 | 609 | | |
576 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
577 | 620 | | |
578 | 621 | | |
579 | | - | |
| 622 | + | |
580 | 623 | | |
581 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
582 | 679 | | |
583 | 680 | | |
584 | 681 | | |
| |||
594 | 691 | | |
595 | 692 | | |
596 | 693 | | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
597 | 706 | | |
598 | 707 | | |
599 | 708 | | |
| |||
1630 | 1739 | | |
1631 | 1740 | | |
1632 | 1741 | | |
1633 | | - | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1634 | 1745 | | |
1635 | 1746 | | |
1636 | 1747 | | |
| |||
1836 | 1947 | | |
1837 | 1948 | | |
1838 | 1949 | | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
1839 | 1957 | | |
1840 | 1958 | | |
1841 | 1959 | | |
| |||
0 commit comments