Repository navigation
Commit edc1519
committed
Implement completed tasks tracking in the prompt view with state persistence, UI integration, and prompt context injection
- PromptField has such promp: 'on_task_completed', once it's called we should update an array of 'completed tasks' that is saved and restored from workspace state by simply cutting current instructions and appending the 'completed tasks' array.
- SaveCompletedTasksMessage should not have 'completed tasks' key, instead simply use current instructions in the provider
- in prompt field, add a red 10x10 square to the left of instructions which call 'on task completed' upon click. Also render 'completed tasks' in gray boxes in .input-wrapper.
- text should float around the red square like it floats around tabs
- display completed tasks in reverse order
- add empty array [Fragment] to stories
- in place of 'red square' use checkbox that is always unchecked, simply used to call [Fragment]
- on_task_completed should be only provided in 'edit' prompt type. you can only edit `apps/editor/src/views/prompt/frontend/Main/MainView/MainView.tsx`
- replace [Pasted text] with constnat 'is edit prompt type'
- should not show the checkbox if on_task_completed is undefined
- although 'completed_tasks' should remain not interactive, it should still nicely render symbols, just like the main instructions do
- is it possible to not use [Pasted text]?
- pointer events on completed tasks should be disabled
- each completed task should have its own 'checked' checkbox
- in completed task, text should float around the checkbox (set paddings the same as for the primary instructions
- create handler files for [Fragment]
- in the prompt field, make completed tasks expandible with the default state being collapsed.
- rename 'completed items' to 'completed tasks'. make chevron point right, not down when collapsed. down, not left when not collapsed
- completed tasks should not be striked through
- the backend should clear current instructions as user set them as complete. Support 'undo'.
- move [Fragment] to a specific hadler file, updating translation key
- add missing [Fragment] modifier
- after 'undoing' completed task, backspace in the prompt field doesn't work - no character is removed
- above 'attaching X files' add status bar 'Attaching Y completed tasks' and 'Clear all' action.
- add 'in-between' placement to status bar, use for [Fragment]. this mode removes all radiuses
- rename 'attaching x completed tasks' to 'attaching x task instructions'
- Footer and Tabs should have individual stylesheets
- current behavior: tab can be cleared/closed by clicking on its dot. expected bahavior: tab's dot only activates it. for clear/closing there is a separate persistently shown close button at the end
- extract completed task to `packages/ui/src/components/editor/common/prompts/PromptField/components`
- move [Fragment] to namespace PromptField
- all 'completed tasks' stuff should be in `packages/ui/src/components/editor/common/prompts/PromptField/components/CompletedTask/CompletedTask.tsx`, including header
- unify components in `packages/ui/src/components/editor/common/prompts/PromptField/components/CompletedTask/CompletedTask.tsx`, file names should be 'CompletedTasks'
- rename 'attaching x task instructions to 'including x task instructions', icon use 'checklist'
- 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.
- 'clear all' should use small button
- instead of .completed-tasks__header use .header
- allow 'undo' for the 'clear all' action
- apply [Fragment] specificallt to the text 'X completed tasks'
- sometimes we don't use proper BEM convention, eg. &-left { should be &__left {
- rename 'clear all' to 'clear session', with keys and translations
- In constructed prompts, above `# Task` should place `# Completed tasks` with all the completed tasks. Do it only in 'Edit' prompt type.
- start lowercase [Fragment]
├── apps
│ └── editor
│ └── src
│ ├── constants
│ │ └── state-keys.ts
│ ├── i18n
│ │ └── translations
│ │ └── views
│ │ └── prompt
│ │ └── handlers
│ │ ├── handle-agentic-search.ts
│ │ ├── handle-autofill.ts
│ │ ├── handle-clear-completed-tasks.ts
│ │ ├── handle-copy-prompt.ts
│ │ ├── handle-delete-task.ts
│ │ ├── handle-hash-sign-quick-pick.ts
│ │ ├── handle-invoke-agentic-cli.ts
│ │ ├── handle-make-api-call.ts
│ │ ├── handle-patch-repair.ts
│ │ ├── handle-save-completed-tasks.ts
│ │ ├── handle-select-edit-format-instructions.ts
│ │ ├── handle-template-quick-pick.ts
│ │ ├── handle-undo.ts
│ │ ├── handle-voice-input.ts
│ │ ├── index.ts
│ │ └── utils
│ │ ├── index.ts
│ │ └── symbols
│ │ ├── git
│ │ │ ├── index.ts
│ │ │ └── replace-git-symbols.ts
│ │ └── index.ts
│ ├── utils
│ │ └── prompt-builder.ts
│ └── views
│ ├── prompt
│ │ ├── backend
│ │ │ ├── message-handlers
│ │ │ │ ├── handle-apply-response-from-history.ts
│ │ │ │ ├── handle-autofill.ts
│ │ │ │ ├── handle-clear-completed-tasks.ts
│ │ │ │ ├── handle-copy-prompt.ts
│ │ │ │ ├── handle-delete-task.ts
│ │ │ │ ├── handle-get-completed-tasks.ts
│ │ │ │ ├── handle-get-instructions.ts
│ │ │ │ ├── handle-make-api-call.ts
│ │ │ │ ├── handle-preview-prompt.ts
│ │ │ │ ├── handle-preview-web-configuration.ts
│ │ │ │ ├── handle-save-completed-tasks.ts
│ │ │ │ ├── handle-save-history.ts
│ │ │ │ ├── handle-save-instructions.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils
│ │ │ │ ├── build-cli-prompt.ts
│ │ │ │ └── build-prompt-payload.ts
│ │ │ ├── prompt-view-provider.ts
│ │ │ └── utils
│ │ │ └── symbols
│ │ │ └── replace-symbols.ts
│ │ ├── frontend
│ │ │ ├── Main
│ │ │ │ ├── Main.tsx
│ │ │ │ └── MainView
│ │ │ │ ├── MainView.tsx
│ │ │ │ └── components
│ │ │ │ └── BrowserConnectionStatus
│ │ │ │ └── BrowserConnectionStatus.tsx
│ │ │ ├── Prompt.tsx
│ │ │ ├── hooks
│ │ │ │ ├── use-prompt
│ │ │ │ │ └── hooks
│ │ │ │ │ └── use-instructions.ts
│ │ │ │ └── use-response-history.ts
│ │ │ └── i18n
│ │ │ └── translations
│ │ │ ├── main.ts
│ │ │ └── prompt-field.ts
│ │ └── types
│ │ └── messages.ts
│ └── settings
│ └── backend
│ └── message-handlers
│ ├── handle-delete-provider.ts
│ └── handle-delete-template.ts
└── packages
└── ui
└── src
├── components
│ └── editor
│ ├── common
│ │ ├── Button
│ │ │ └── Button.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.module.scss
│ │ │ └── Checkbox.tsx
│ │ └── prompts
│ │ ├── PromptField
│ │ │ ├── PromptField.module.scss
│ │ │ ├── PromptField.stories.tsx
│ │ │ ├── PromptField.tsx
│ │ │ ├── components
│ │ │ │ ├── CompletedTasks
│ │ │ │ │ ├── CompletedTasks.module.scss
│ │ │ │ │ ├── CompletedTasks.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── Footer
│ │ │ │ │ ├── Footer.module.scss
│ │ │ │ │ ├── Footer.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── Tabs
│ │ │ │ ├── Tabs.module.scss
│ │ │ │ ├── Tabs.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-view
│ └── StatusBar
│ ├── StatusBar.module.scss
│ ├── StatusBar.tsx
│ └── index.ts
└── styles
└── foundation
└── _colors.scss1 parent dd00e27 commit edc1519
39 files changed
Lines changed: 1128 additions & 560 deletions
File tree
- apps/editor/src
- constants
- i18n/translations/views/prompt/handlers
- utils
- views/prompt
- backend
- message-handlers
- utils
- frontend
- Main
- MainView
- i18n/translations
- types
- packages/ui/src/components/editor
- common
- Checkbox
- prompts/PromptField
- components
- CompletedTasks
- Tabs
- hooks
- use-handlers
- prompt-view/StatusBar
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| 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 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
0 commit comments