Commit bd975f3
committed
fix: preserve original input when navigating history after typing
- Modified resetOnInputChange to not clear tempInput when user types
- Updated handleHistoryNavigation to allow navigating back to history even after typing
- Added test case to verify the new behavior prevents input loss
- Fixed linting warning about missing dependency in useCallback
Fixes #62491 parent 6216075 commit bd975f3
File tree
2 files changed
+56
-10
lines changed- webview-ui/src/components/chat
- __tests__
- hooks
2 files changed
+56
-10
lines changedLines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
605 | 638 | | |
606 | 639 | | |
607 | 640 | | |
| |||
Lines changed: 23 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | | - | |
155 | | - | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
170 | | - | |
| 182 | + | |
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
174 | 186 | | |
| 187 | + | |
175 | 188 | | |
176 | 189 | | |
177 | 190 | | |
| |||
0 commit comments