-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Adopt Plan API for plan display and editing #491
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The SDK has a full Plan API (session.Rpc.Plan.Read/Update/Delete) and plan events (SessionPlanChangedEvent, ExitPlanModeRequestedEvent) — all completely unused. When agents create plans (in plan mode), PolyPilot has no way to show them to the user or let users edit them.
PR #116 (stale, from Feb 15) attempted to add plan display in the chat area but was never merged and is now heavily conflicted.
SDK APIs Available
RPC:
session.Rpc.Plan.ReadAsync()— returnsExists,Content,Pathsession.Rpc.Plan.UpdateAsync(content)— write/update plansession.Rpc.Plan.DeleteAsync()— delete plan
Events:
SessionPlanChangedEvent— plan file updated (operation: create/update/delete)ExitPlanModeRequestedEvent— agent wants to exit plan mode (includesPlanContent)ExitPlanModeCompletedEvent— plan mode exit completed
Mode:
session.Rpc.Mode.SetAsync(SessionModeGetResultMode.Plan)— switch to plan modeSessionModeChangedEvent— mode changed
What to Change
- Listen for
SessionPlanChangedEventto detect when agent creates/updates a plan - Call
Plan.ReadAsync()to get plan content - Display plan in UI — collapsible block in chat area or a popup/panel
- Allow user to edit the plan and call
Plan.UpdateAsync()to save changes - Agent picks up changes on next turn (plan file is source of truth)
- Handle
ExitPlanModeRequestedEventto transition UI out of plan mode
Context
- PR Show plan in chat area during plan mode #116 (copilot/add-plan-mode-preview-option) has a stale implementation of plan display
- The Implement & Challenge charter now tells workers to create checklists — these could be proper plans via the Plan API
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request