Repository navigation
Commit c479109
committed
Introduce a headless CLI target mode for prompt execution by refactoring agentic search logic into a reusable feature and updating UI components to support CLI interactions
- add new target: 'CLI', similarly to 'API', has only 'edit files' prompt type. for now, don't show any configurations and make the handler just log into the console 'invoked'.
- translate [Fragment]
- rename 'make cli call' to 'invoke headless cli'
- because we will want to be able to invoke cli agents from other places, create a feature in `apps/editor/src/features` called 'headless cli invocation' and move appropriate generic logic off `apps/editor/src/views/prompt/backend/message-handlers/handle-agentic-search`
- when invoking headless cli from `apps/editor/src/views/prompt/backend/message-handlers/handle-invoke-headless-cli/handle-invoke-headless-cli.ts`: 1) in `# Files` list file paths, e.g. [Pasted text] 2) append section: [Pasted text](save as cli_requirements in `apps/editor/src/constants/instructions.ts`) below `# Output formatting`
- agent selector triggered from `apps/editor/src/views/prompt/backend/message-handlers/handle-invoke-headless-cli/handle-invoke-headless-cli.ts` should not have back arrow
- move [Fragment] to translations
- remove notification 'agent finished in...'
- add translations [Fragment]
- in prompt field: on 'submit' in CLI target, show 'Invoke CLI' tooltip
- [Pasted text]
- in CLI target, 'send with...' should be the only available 'submitting' option
- should not show last choice on 'cli' target
- when there is no last choice, use 'send with ellipsis' in tooltip
- allow previewing/copying CLI prompt
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ └── apply-response-command
│ │ └── response-processor
│ │ └── response-processor.ts
│ ├── constants
│ │ ├── instructions.ts
│ │ └── state-keys.ts
│ ├── features
│ │ ├── context-restoration
│ │ │ └── index.ts
│ │ └── headless-cli-invocation
│ │ ├── agents
│ │ │ ├── antigravity.ts
│ │ │ ├── claude.ts
│ │ │ ├── codex.ts
│ │ │ ├── cursor.ts
│ │ │ ├── grok.ts
│ │ │ ├── index.ts
│ │ │ ├── muse.ts
│ │ │ └── opencode.ts
│ │ ├── index.ts
│ │ ├── invoke-headless-cli.ts
│ │ ├── types.ts
│ │ └── utils
│ │ ├── check-command-exists.ts
│ │ ├── format-duration.ts
│ │ └── get-progress-dots.ts
│ ├── i18n
│ │ └── translations
│ │ ├── commands
│ │ │ └── apply-response-command.ts
│ │ ├── features
│ │ │ ├── checkpoints.ts
│ │ │ ├── context-restoration.ts
│ │ │ ├── index.ts
│ │ │ └── search-files.ts
│ │ ├── services
│ │ │ ├── prompt-view-api-calls-manager.ts
│ │ │ └── websocket-manager.ts
│ │ └── views
│ │ └── prompt
│ │ └── handlers
│ │ ├── handle-agentic-search.ts
│ │ ├── handle-autofill.ts
│ │ ├── handle-copy-prompt.ts
│ │ ├── handle-delete-task.ts
│ │ ├── handle-hash-sign-quick-pick.ts
│ │ ├── handle-invoke-headless-cli.ts
│ │ ├── handle-make-api-call.ts
│ │ ├── handle-patch-repair.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
│ ├── services
│ │ └── prompt-view-api-calls-manager.ts
│ ├── utils
│ │ └── prompt-builder.ts
│ └── views
│ └── prompt
│ ├── backend
│ │ ├── message-handlers
│ │ │ ├── handle-agentic-search
│ │ │ │ ├── agentic-search.ts
│ │ │ │ ├── handle-agentic-search.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils
│ │ │ │ ├── build-agent-prompt.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── prompt-for-search-term.ts
│ │ │ ├── handle-autofill.ts
│ │ │ ├── handle-copy-prompt.ts
│ │ │ ├── handle-get-cli-prompt-type.ts
│ │ │ ├── handle-invoke-headless-cli.ts
│ │ │ ├── handle-make-api-call.ts
│ │ │ ├── handle-preview-prompt.ts
│ │ │ ├── handle-preview-web-configuration.ts
│ │ │ ├── handle-save-api-prompt-type.ts
│ │ │ ├── handle-save-cli-prompt-type.ts
│ │ │ ├── handle-save-web-prompt-type.ts
│ │ │ ├── handle-template-quick-pick.ts
│ │ │ ├── index.ts
│ │ │ └── utils
│ │ │ ├── build-cli-prompt.ts
│ │ │ ├── build-prompt-payload.ts
│ │ │ └── patch-repair-utils.ts
│ │ ├── prompt-view-provider.ts
│ │ └── utils
│ │ └── preview-text-in-temp-file.ts
│ ├── frontend
│ │ ├── Home
│ │ │ ├── Home.tsx
│ │ │ └── hooks
│ │ │ └── use-keyboard-shortcuts.ts
│ │ ├── Main
│ │ │ ├── Main.tsx
│ │ │ └── MainView
│ │ │ ├── MainView.tsx
│ │ │ ├── components
│ │ │ │ └── Header
│ │ │ │ └── Header.tsx
│ │ │ ├── hooks
│ │ │ │ ├── use-invocation-counts.ts
│ │ │ │ ├── use-keyboard-shortcuts.ts
│ │ │ │ └── use-last-choice-tooltip.ts
│ │ │ └── prompt-type-labels.ts
│ │ ├── Prompt.tsx
│ │ ├── hooks
│ │ │ ├── use-api-configuration-editing.ts
│ │ │ └── use-prompt
│ │ │ ├── hooks
│ │ │ │ └── use-instructions.ts
│ │ │ └── use-prompt.ts
│ │ └── i18n
│ │ └── translations
│ │ ├── home.ts
│ │ └── prompt-field.ts
│ └── types
│ └── messages.ts
└── packages
├── shared
│ └── src
│ └── types
│ ├── mode.ts
│ └── prompt-types.ts
└── ui
└── src
└── components
└── editor
└── common
└── prompts
└── PromptField
├── PromptField.stories.tsx
├── PromptField.tsx
└── hooks
└── use-keyboard-shortcuts.ts1 parent 076002b commit c479109
50 files changed
Lines changed: 1545 additions & 951 deletions
File tree
- apps/editor/src
- constants
- features/headless-cli-invocation
- agents
- utils
- i18n/translations
- commands
- services
- views/prompt/handlers
- services
- views/prompt
- backend
- message-handlers
- handle-agentic-search
- utils
- utils
- frontend
- Home
- hooks
- Main
- MainView
- components/Header
- hooks
- hooks/use-prompt
- hooks
- i18n/translations
- types
- packages
- ui/src/components/editor/common/prompts/PromptField
- hooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
165 | 191 | | |
166 | 192 | | |
167 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | | - | |
| 14 | + | |
18 | 15 | | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
| 30 | + | |
34 | 31 | | |
35 | | - | |
| 32 | + | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | | - | |
| 15 | + | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
0 commit comments