mirror of
https://github.com/yan-istart/IStart-Note-AI-Plugin.git
synced 2026-07-22 06:51:37 +00:00
Before:
- Plan draft notes contained raw JSON at the bottom
- No way to execute a pending plan from the UI
- User saw technical payload with no clear next step
After:
- Plan drafts are clean markdown: summary table + operation list + affected
files + detailed preview. No JSON visible.
- Raw plan data cached in PlanDraftStore memory (not in note)
- New action: '确认执行此计划' (icon: play)
- Only visible when current file has type: execution-plan
- Shows confirmation dialog with risk level and file count
- Executes via PlanExecutor, marks draft as 'executed'
- On failure: shows error, draft stays pending
- PlanDraftStore.getPendingPlans() for listing
- PlanDraftStore.markExecuted() updates note status
Execution flow now:
1. Generate plan → save as readable draft note
2. User opens and reviews the plan
3. User triggers '确认执行此计划' from command panel or right-click
4. Confirmation dialog → execute → log written → draft marked done
Limitation: plan cache is in-memory only. If Obsidian restarts between
plan creation and confirmation, user must regenerate. This is acceptable
for v2.0; persistent plan storage comes in v2.1.
|
||
|---|---|---|
| .. | ||
| actions | ||
| ai | ||
| core | ||
| features | ||
| settings | ||
| util | ||
| vault | ||
| main.ts | ||
| types.ts | ||