Repository navigation
Commit b78cfd6
committed
Redesign prompt view layout to incorporate mode toggling in the header and token counts in the prompt field footer
- place 'tokens in context' count (e.g. 22K) in 'prompt field', next to edit format. Use '·' as separator when necessary. Remove 'context utilization' component.
- when context is 0, don't show it
- place token count on the right side of 'edit format', make it the same font-size
- token count should have font size of edit format
- [Commit] restore the mode toggler ui component
- place 'mode toggler' to the left of prompt type in header
- to mode toggler add support for alt+esc handling
- mode toggler should use font family accent
- use chatbots/api calls labels for mode toggler
- wrap edit/ask in a div, set gap to 10px
- align mode toggler labels to left
- remove tabs component
- on token count show tooltip "Tokens in context"
- rename 'right edit format' to 'right details
- use css instead of [Pasted text]
- use css instead ofstyle={{ position: 'relative', display: 'flex', minWidth: 0 }}
- extract footer to a render function
- after recent edits, tabs are rendered incorrectly [Changes]
- after recent edits, tabs are render incorrectly [Changes]
- use bem for [Pasted text]
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ └── select-referencing-files-commands
│ │ ├── index.ts
│ │ ├── select-referencing-files-commands.ts
│ │ └── utils
│ │ ├── get-referencing-files-for-position.ts
│ │ ├── get-referencing-files-for-uris.ts
│ │ └── prompt-for-referencing-files.ts
│ └── views
│ └── prompt
│ └── frontend
│ ├── Main
│ │ ├── Main.tsx
│ │ └── MainView
│ │ ├── MainView.module.scss
│ │ ├── MainView.tsx
│ │ ├── components
│ │ │ └── Header
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ ├── hooks
│ │ │ │ └── use-keyboard-shortcuts.ts
│ │ │ └── index.ts
│ │ ├── hooks
│ │ │ ├── use-invocation-counts.ts
│ │ │ ├── use-last-choice-tooltip.ts
│ │ │ └── use-re-render-on-interval.ts
│ │ ├── index.ts
│ │ └── prompt-type-labels.ts
│ └── i18n
│ └── use-translation.tsx
└── packages
└── ui
└── src
└── components
└── editor
├── common
│ └── prompts
│ ├── PromptField
│ │ ├── PromptField.module.scss
│ │ ├── PromptField.stories.tsx
│ │ ├── PromptField.tsx
│ │ ├── components
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── index.ts
│ │ ├── hooks
│ │ │ ├── use-drag-drop.ts
│ │ │ ├── use-dropdown.ts
│ │ │ ├── use-ghost-text.ts
│ │ │ ├── use-handlers
│ │ │ │ ├── handle-copy.ts
│ │ │ │ ├── handle-cut.ts
│ │ │ │ ├── handle-input-change.ts
│ │ │ │ ├── handle-input-click.ts
│ │ │ │ ├── handle-key-down.ts
│ │ │ │ ├── handle-paste.ts
│ │ │ │ ├── handle-submit.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── types.ts
│ │ │ │ ├── use-handlers.ts
│ │ │ │ └── utils.ts
│ │ │ └── use-keyboard-shortcuts.ts
│ │ └── index.ts
│ ├── Template
│ │ ├── Template.module.scss
│ │ ├── Template.tsx
│ │ └── 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
├── ModeToggler
│ ├── ModeToggler.module.scss
│ ├── ModeToggler.tsx
│ └── index.ts
└── PromptTypeButton
├── PromptTypeButton.module.scss
├── PromptTypeButton.stories.tsx
├── PromptTypeButton.tsx
└── index.ts1 parent 02cbb3c commit b78cfd6
14 files changed
Lines changed: 716 additions & 564 deletions
File tree
- apps/editor/src/views/prompt/frontend/Main/MainView
- components/Header
- hooks
- packages/ui/src/components/editor
- common/prompts/PromptField
- prompt
- Configurations
- ContextUtilisation
- ModeToggler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
262 | 260 | | |
263 | 261 | | |
264 | 262 | | |
| 263 | + | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
| |||
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | 383 | | |
388 | 384 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
| 385 | + | |
403 | 386 | | |
404 | 387 | | |
405 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
44 | 57 | | |
45 | | - | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
| |||
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
74 | | - | |
| 87 | + | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| |||
123 | 132 | | |
124 | 133 | | |
125 | 134 | | |
| 135 | + | |
126 | 136 | | |
127 | 137 | | |
128 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
201 | 202 | | |
202 | | - | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
206 | 233 | | |
207 | 234 | | |
208 | | - | |
| 235 | + | |
209 | 236 | | |
210 | 237 | | |
211 | 238 | | |
| |||
347 | 374 | | |
348 | 375 | | |
349 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
350 | 381 | | |
351 | 382 | | |
352 | 383 | | |
| |||
0 commit comments