feat(core): support plan versioning and diffing

- Core: Save rejected plans as versioned backups (.v1, .v2, etc.)
   - Core: Compute diff between previous and current plan version in exit_plan_mode
   - UI: Display color-coded diff using DiffRenderer in plan approval dialog
   - UI: Update AskUserDialog and DialogFooter to support ReactNode in extraParts
   - Docs: Update planning documentation to mention versioning and diff features
   - Tests: Add comprehensive unit tests for versioning, diffing, and UI rendering

   Fixes #17794
This commit is contained in:
A.K.M. Adib
2026-03-31 17:15:41 -04:00
parent 9cf410478c
commit b6a6682f26
11 changed files with 193 additions and 15 deletions
+3
View File
@@ -51,7 +51,10 @@ finalized plan to the user and requests approval to start the implementation.
- Marks the plan as approved for implementation.
- If the user rejects the plan:
- Stays in Plan Mode.
- Saves a versioned backup of the rejected plan.
- Returns user feedback to the model to refine the plan.
- The next time `exit_plan_mode` is called, a diff against the previous
version is shown in the approval step.
- **Output (`llmContent`):**
- On approval: A message indicating the plan was approved and the new approval
mode.