Repository navigation
Commit 7334150
committed
Streamline prompt attachments and context controls by removing empty context warning and adding clear context shortcuts
- make 'X completed tasks' in the prompt field have 'clear all' button on the right side, identical to status bar we show below. Move translation to `apps/editor/src/views/prompt/frontend/i18n/translations/prompt-field.ts` and remove this status bar completely.
- when context is empty, should not turn prompt field and bar underneath into warning color
- under prompt field, 'clear context' should have shortcut alt+x
- remove 'agentic search' from prompt field's 'more' dropdown menu
- when showing 'clear context', show 'agentic search' but only icon (without label)
- when showing 'clear context' and 'agentic search' together, 'agentic search' should turn into 'search'
- don't use short form 'search' but always 'agentic search'
- 'clear context' should not have label, just icon
- show 'clear context' in the prompt attachments at all times
- instead of 'context is empty' show 'attaching 0 files'
- move [Pasted text] to main
├── apps
│ └── editor
│ ├── package.json
│ └── src
│ ├── context
│ │ └── context-initialization.ts
│ └── views
│ └── prompt
│ ├── backend
│ │ └── message-handlers
│ │ └── handle-agentic-search.ts
│ └── frontend
│ ├── Main
│ │ ├── Main.tsx
│ │ └── MainView
│ │ ├── MainView.tsx
│ │ └── components
│ │ └── PromptAttachments
│ │ ├── PromptAttachments.tsx
│ │ └── index.ts
│ └── i18n
│ └── translations
│ ├── common.ts
│ ├── index.ts
│ ├── main.ts
│ ├── prompt-field.ts
│ └── selected-files.ts
└── packages
└── ui
└── src
└── components
└── editor
├── common
│ └── prompts
│ ├── PromptField
│ │ ├── PromptField.module.scss
│ │ ├── PromptField.stories.tsx
│ │ ├── PromptField.tsx
│ │ ├── components
│ │ │ ├── Footer
│ │ │ │ ├── Footer.tsx
│ │ │ │ └── index.ts
│ │ │ └── Tabs
│ │ │ └── index.ts
│ │ ├── hooks
│ │ │ ├── use-ghost-text.ts
│ │ │ ├── use-handlers
│ │ │ │ ├── handle-copy.ts
│ │ │ │ ├── handle-cut.ts
│ │ │ │ ├── handle-input-change.ts
│ │ │ │ ├── handle-key-down.ts
│ │ │ │ ├── handle-paste.ts
│ │ │ │ ├── handle-submit.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils.ts
│ │ │ └── use-keyboard-shortcuts.ts
│ │ └── index.ts
│ ├── Template
│ │ └── index.ts
│ └── shared
│ └── symbols
│ ├── caret.ts
│ ├── get-highlighted-text.tsx
│ ├── index.ts
│ ├── position-mapping.ts
│ ├── prompt-symbols.module.scss
│ ├── reconstruct-raw-value.ts
│ └── use-symbol-deletion.ts
└── prompt-view
└── StatusBar
└── index.ts1 parent 5a666b1 commit 7334150
10 files changed
Lines changed: 75 additions & 164 deletions
File tree
- apps/editor/src/views/prompt/frontend
- Main/MainView
- components/PromptAttachments
- i18n/translations
- packages/ui/src/components/editor/common/prompts/PromptField
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | 197 | | |
201 | 198 | | |
202 | 199 | | |
| |||
441 | 438 | | |
442 | 439 | | |
443 | 440 | | |
444 | | - | |
| 441 | + | |
445 | 442 | | |
446 | 443 | | |
447 | 444 | | |
| |||
488 | 485 | | |
489 | 486 | | |
490 | 487 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | 499 | | |
505 | 500 | | |
506 | 501 | | |
507 | 502 | | |
508 | 503 | | |
509 | 504 | | |
510 | 505 | | |
511 | | - | |
| 506 | + | |
512 | 507 | | |
513 | 508 | | |
514 | 509 | | |
| |||
564 | 559 | | |
565 | 560 | | |
566 | 561 | | |
567 | | - | |
568 | | - | |
| 562 | + | |
569 | 563 | | |
570 | 564 | | |
571 | 565 | | |
572 | 566 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 567 | + | |
592 | 568 | | |
593 | 569 | | |
594 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | | - | |
| 23 | + | |
26 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
163 | 181 | | |
164 | 182 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | 487 | | |
506 | 488 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
147 | | - | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
| |||
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
218 | | - | |
219 | | - | |
| 216 | + | |
220 | 217 | | |
221 | 218 | | |
222 | 219 | | |
| |||
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
290 | | - | |
291 | | - | |
| 287 | + | |
292 | 288 | | |
293 | 289 | | |
294 | 290 | | |
| |||
359 | 355 | | |
360 | 356 | | |
361 | 357 | | |
362 | | - | |
363 | | - | |
| 358 | + | |
364 | 359 | | |
365 | 360 | | |
366 | 361 | | |
| |||
430 | 425 | | |
431 | 426 | | |
432 | 427 | | |
433 | | - | |
434 | | - | |
| 428 | + | |
435 | 429 | | |
436 | 430 | | |
437 | 431 | | |
| |||
509 | 503 | | |
510 | 504 | | |
511 | 505 | | |
512 | | - | |
513 | | - | |
| 506 | + | |
514 | 507 | | |
515 | 508 | | |
516 | 509 | | |
| |||
580 | 573 | | |
581 | 574 | | |
582 | 575 | | |
583 | | - | |
584 | | - | |
| 576 | + | |
585 | 577 | | |
586 | 578 | | |
587 | 579 | | |
| |||
652 | 644 | | |
653 | 645 | | |
654 | 646 | | |
655 | | - | |
656 | | - | |
| 647 | + | |
657 | 648 | | |
658 | 649 | | |
659 | 650 | | |
| |||
752 | 743 | | |
753 | 744 | | |
754 | 745 | | |
755 | | - | |
756 | | - | |
| 746 | + | |
757 | 747 | | |
758 | 748 | | |
759 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
0 commit comments