Repository navigation
Commit dde6c50
committed
Update CLI prompt generation to include file contents and remove requirements
- all rules [Pasted text] should be objects with keys like: read_only, files, output_formatting
- when building cli prompt: when attached files take no more 'tokens' than 20k characters, they should be placed inline. If they take more than 20k characters, they should be referenced as paths (current behavior)
- when building cli prompt: when attaching preloaded files, use appropriate rule instead of 'files' (preloaded_files)
- merge [Fragment] into a single cli_rules object
- rename 'rules' to 'requirements'
- remove 'output formatting' rule
- remove 'read only' rule
- when files are only referenced by paths, use 'referenced files' requirement. when they're inlined, use 'inline files' requirement
- should not use delete requirements pattern, instead access [Fragment] keys explicitly
- extract [Fragment] as 'read_only key on cli_requirements
- dont use [Fragment] in requirements object
- simplify [Fragment] to two keys 'preloaded files', 'referenced files'
- extract [Fragment] to 'read_only' key
- simplify [Pasted text] as there is only one erquirement. Don't use '- '
- small files (up to 1000 characters) should be always inlined, larger ones should use "### Large file: `[path]`"
- as you inline files with up to 1000 characters, set up a counter so no more than 20000 characters are inlined
- don't use file/large file distinction when all files no matter individual size don't exceed 20k characters
- preload all files here [Fragment]
- this limit [Fragment] should be for the total content
- should use cli_requirements.referenced_files_only when all files referenced are large
└── apps
└── editor
└── src
├── constants
│ └── instructions.ts
└── views
└── prompt
└── backend
├── message-handlers
│ ├── handle-invoke-agentic-cli.ts
│ ├── handle-make-api-call.ts
│ └── utils
│ └── build-cli-prompt.ts
└── prompt-view-provider.ts1 parent 466a829 commit dde6c50
2 files changed
Lines changed: 57 additions & 22 deletions
File tree
- apps/editor/src
- constants
- views/prompt/backend/message-handlers/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
48 | 62 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 63 | | |
55 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
56 | 95 | | |
57 | 96 | | |
58 | 97 | | |
| |||
69 | 108 | | |
70 | 109 | | |
71 | 110 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 111 | | |
78 | 112 | | |
79 | 113 | | |
80 | 114 | | |
81 | 115 | | |
82 | 116 | | |
83 | | - | |
84 | 117 | | |
85 | 118 | | |
86 | 119 | | |
| |||
0 commit comments