Repository navigation
Commit ddaf514
committed
Add agentic CLI support to the Code at Cursor and Commit Message flows and refactor CLI agent and prompt builder configurations
- to code at cursor, add option 'Invoke CLI'
- 'perform_code_at_cursor' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
- eliminate code repetition around showing ghost text
- `apps/editor/src/commands/code-at-cursor-command/utils/show-ghost-text.ts` should have just a single function
- rename [Fragment] to 'show_ghost_text'
- rename 'invoke cli' option to invoke agent
- PromptBuilder should accept keys (instead of system instructions): output formatting and requirements, and place these headings by itself not hold them in other places like `apps/editor/src/constants/instructions.ts`
- in [Fragment] [Fragment] should be detached into two keys (then separated list items) so that `apps/editor/src/commands/code-at-cursor-command/utils/perform-code-at-cursor.ts` doesn't use [Fragment]
- use `apps/editor/src/constants/state-keys.ts` for last_selected_workspace_state_key
- [Fragment] should not be passed via param
- functionality behind [Fragment] should be expressed in a more generic way (other params)
- `apps/editor/src/commands/code-at-cursor-command/utils/perform-code-at-cursor.ts` when running agentic cli, should isolate in temp dir, just like 'edit'
- edit/ask args should have more generic names, maybe isolated_dir_args/integrated_terminal_args
- in code at cursor, place 'invoke agent' below 'send request'
- similarly to 'code at cursor', implement 'invoke agent' in commit message generation
- invoke_agentic_cli.title param should have better name: notification_title
- keys on invoke_agentic_cli that are always used should not be optional
- similarly to places like commit message generation, 'invoke agent' should be implemented to 'intelligent search' as well
└── apps
└── editor
└── src
├── commands
│ ├── code-at-cursor-command
│ │ ├── code-at-cursor-commands.ts
│ │ ├── index.ts
│ │ └── utils
│ │ ├── get-code-at-cursor-config.ts
│ │ ├── perform-code-at-cursor.ts
│ │ └── show-ghost-text.ts
│ ├── copy-markdown-command.ts
│ └── generate-commit-message-commands
│ ├── actions
│ │ ├── get-prompt-data.ts
│ │ └── run-generate-action.ts
│ ├── generate-commit-message-commands.ts
│ ├── index.ts
│ └── utils
│ ├── build-commit-message-prompt.ts
│ ├── generate-commit-message-with-api.ts
│ ├── get-commit-message-config.ts
│ └── strip-wrapping-quotes.ts
├── constants
│ ├── instructions.ts
│ └── state-keys.ts
├── features
│ ├── agentic-search
│ │ └── agentic-search.ts
│ └── search-files
│ ├── index.ts
│ ├── search-files.ts
│ ├── search-modes
│ │ ├── perform-intelligent-search-mode.ts
│ │ ├── perform-keywords-search-mode.ts
│ │ └── perform-phrase-search-mode.ts
│ └── utils
│ ├── analyze-files.ts
│ ├── check-matches-condition.ts
│ ├── create-search-regex.ts
│ ├── prompt-for-config.ts
│ ├── prompt-for-intelligent-search-results.ts
│ ├── prompt-for-keywords-match-mode.ts
│ ├── prompt-for-keywords-target.ts
│ ├── prompt-for-search-mode.ts
│ ├── prompt-for-search-results.ts
│ ├── prompt-for-search-term.ts
│ ├── prompt-for-shrink-mode.ts
│ ├── search-files-by-intelligent.ts
│ ├── search-files-by-keywords.ts
│ ├── search-files-by-phrase.ts
│ └── show-search-results-quick-pick.ts
├── i18n
│ └── translations
│ ├── common.ts
│ └── utils
│ └── agentic-cli-invocation.ts
├── services
│ └── providers-manager.ts
├── utils
│ ├── agentic-cli-invocation
│ │ ├── agents
│ │ │ ├── antigravity.ts
│ │ │ ├── claude.ts
│ │ │ ├── codex.ts
│ │ │ ├── cursor.ts
│ │ │ ├── grok.ts
│ │ │ ├── index.ts
│ │ │ └── opencode.ts
│ │ ├── index.ts
│ │ ├── invoke-agentic-cli.ts
│ │ ├── types.ts
│ │ └── utils
│ │ ├── check-command-exists.ts
│ │ ├── format-duration.ts
│ │ ├── generate-diff-markdown.ts
│ │ └── get-progress-dots.ts
│ ├── apply-reasoning-effort.ts
│ ├── build-user-content.ts
│ ├── get-api-configuration.ts
│ ├── git-repository-utils.ts
│ ├── prompt-builder.ts
│ └── send-llm-message.ts
└── views
└── prompt
└── backend
└── message-handlers
├── handle-autofill.ts
├── handle-copy-prompt.ts
├── handle-invoke-agentic-cli.ts
├── handle-make-api-call.ts
├── handle-preview-prompt.ts
├── handle-preview-web-configuration.ts
└── utils
└── build-cli-prompt.ts1 parent b58da6f commit ddaf514
29 files changed
Lines changed: 546 additions & 260 deletions
File tree
- apps/editor/src
- commands
- code-at-cursor-command
- utils
- generate-commit-message-commands
- actions
- utils
- constants
- features
- agentic-search
- search-files
- search-modes
- utils
- i18n/translations
- features
- utils
- agentic-cli-invocation
- agents
- views/prompt/backend/message-handlers
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 82 | | |
98 | 83 | | |
99 | 84 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
113 | 88 | | |
114 | 89 | | |
115 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
114 | | - | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
| |||
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
| |||
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
145 | | - | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
210 | | - | |
| 220 | + | |
211 | 221 | | |
212 | 222 | | |
213 | 223 | | |
| |||
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
240 | | - | |
| 250 | + | |
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
| |||
254 | 264 | | |
255 | 265 | | |
256 | 266 | | |
257 | | - | |
| 267 | + | |
258 | 268 | | |
259 | 269 | | |
260 | 270 | | |
| |||
333 | 343 | | |
334 | 344 | | |
335 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
336 | 461 | | |
337 | 462 | | |
338 | 463 | | |
| |||
391 | 516 | | |
392 | 517 | | |
393 | 518 | | |
394 | | - | |
| 519 | + | |
395 | 520 | | |
396 | 521 | | |
397 | 522 | | |
| |||
499 | 624 | | |
500 | 625 | | |
501 | 626 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | 627 | | |
523 | 628 | | |
524 | 629 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
540 | 634 | | |
541 | 635 | | |
542 | 636 | | |
| |||
0 commit comments