Repository navigation
Commit 4c41eb9
committed
feat(task): allow runtime systemPrompt for subtasks
Add runtime system prompt override support for subagent subtasks.
- add optional systemPrompt to MessageV2.SubtaskPart schema so subtask inputs accept and preserve it
- thread systemPrompt through subtask execution plumbing into task tool args
- pass systemPrompt to SessionPrompt.prompt as the child session system override
- regenerate OpenAPI and JS SDK v2 generated types to expose SubtaskPartInput.systemPrompt
- update subtask conversion test to use the general subagent with a systemPrompt example
Verification:
- bun test test/session/message-v2.test.ts
Refs anomalyco#73511 parent bab3124 commit 4c41eb9
6 files changed
Lines changed: 15 additions & 1 deletion
File tree
- packages
- opencode
- src
- session
- tool
- test/session
- sdk
- js/src/v2/gen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| 405 | + | |
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| |||
2093 | 2094 | | |
2094 | 2095 | | |
2095 | 2096 | | |
| 2097 | + | |
2096 | 2098 | | |
2097 | 2099 | | |
2098 | 2100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6648 | 6648 | | |
6649 | 6649 | | |
6650 | 6650 | | |
| 6651 | + | |
| 6652 | + | |
| 6653 | + | |
6651 | 6654 | | |
6652 | 6655 | | |
6653 | 6656 | | |
| |||
10640 | 10643 | | |
10641 | 10644 | | |
10642 | 10645 | | |
| 10646 | + | |
| 10647 | + | |
| 10648 | + | |
10643 | 10649 | | |
10644 | 10650 | | |
10645 | 10651 | | |
| |||
0 commit comments