feat(task): surface nesting depth and parent task id to the model (#16) - #1268
feat(task): surface nesting depth and parent task id to the model (#16)#1268easonLiangWorldedtech wants to merge 7 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Part 1/8 of the task-tree series (upstream-ready recomposition). Adds `depth` to HistoryItem and a cycle-safe `backfillTaskDepth()` that propagates parent depth through the delegation tree, so every task knows its nesting level. Depth is surfaced for later use by settings validation, environment details, and history-tree display. Includes the single-open-invariant spec mock for backfillTaskDepth (folded in from the series' CI fix) so this PR passes unit tests standalone.
…ound-trip Part 2/8 of the task-tree series (upstream-ready recomposition). Adds two global settings that control subtask delegation: - `maxNestingDepth` (default 2, range 0-5): how many levels a subtask may nest. A value of 0 disables delegation entirely — every new_task runs inline. - `autoFlattenOnLimit` (default true): when the limit is reached, flatten the subtask into the current conversation instead of opening a new tab; when disabled such requests are rejected so you can continue directly. Full round trip: global-settings schema + defaults, ExtensionState, SettingsView control bound to cachedState with save payload, webviewMessageHandler persistence through ContextProxy, ClineProvider getState/getStateToPostToWebview, runtime consumers using the shared defaults. Includes focused tests for UI binding/save, persistence, and the saved value returned to the webview. Also completes the taskTree translation keys in all 17 non-English locales so check-translations passes standalone (folded in from the series' CI fix).
…ached (#12) Co-authored-by: Eason Liang <easonliang28@gmail.com>
Adds a three-level new_task chain e2e (root -> child -> depth-2 task) where the depth-2 task's own new_task call exceeds maxNestingDepth and is flattened inline. Asserts exactly 3 tasks exist, the flattened work completes in the depth-2 task's own conversation, parent/child resume correctly, and the task stack never holds a fourth task. Hand-written aimock fixtures (no API key needed) use unique FLATTEN_E2E_ markers with predicate matching to avoid cross-suite collisions.
…n history tree (#13) Co-authored-by: Eason Liang <easonliang28@gmail.com>
…hods (#14) Co-authored-by: Eason Liang <easonliang28@gmail.com>
Co-authored-by: Eason Liang <easonliang28@gmail.com>
ba0531e to
b2d17c5
Compare
|
Closing per the author: this stacked series is being re-verified in a fork sandbox before upstream submission. Will be re-opened as individually reviewed PRs once each branch's CI is confirmed green. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Part 6/8 of the task-tree series (builds on parts 1-5). The per-request environment_details now includes a Task Context block with the task's nesting depth (root = 0) and, for children, its parent task id - so a subtask can see its own position in the delegation tree. Parent title resolution is deliberately avoided to keep every environment refresh free of history-store lookups.