Feature/20260701 n p 1 - #45
Merged
Merged
Conversation
Insert an approval step between planning Phase A and execution Phase B. When planning is enabled, the assistant pauses after producing a plan so the user can run it or reject it; rejecting refills the composer with the original prompt so the user can refine and resend (the prompt stays the single source of intent, avoiding conflict with goal stability). - PlanApprovalState (oneshot + RAII guard) mirroring ToolApprovalState - respond_plan_approval command; planning_approval_enabled config (default on) - emit llm:plan-approval-resolved so the card is dismissed on any resolution (approve/reject/timeout/cancel), not just button clicks - AiPlanApprovalDialog UI + settings toggle + i18n - KNOWFORGE_DEBUG_PLANNING logs the final plan before Phase B
- Add plan.update_step tool for LLM to report step status - Parse plan text into numbered steps in planning.rs - Emit llm:plan-steps and llm:plan-step-update events - Inject step-tracking instructions into Phase B prompt - Add PlanStepInfo type and planSteps to ChatMessage.meta - Frontend: plan-steps/plan-step-update event listeners - Frontend: tree view rendering with step status indicators - Frontend: tool calls nested under active plan step - Detect plan.update_step in agent loop, emit step updates - Graceful degradation: falls back to flat display if model doesn't call plan.update_step
Remove plan approval gate and merge Phase A/B into a single agent_loop call. Planning mode now only adds a system prompt; no separate plan generation or step tracking. Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
…ers from AiConversationPanel Break 2570-line God Component into focused modules: - ToolCallItem (54 lines): self-recursive tool call renderer - MessageBubble (160 lines): single message render logic - useAgentEventHandlers (734 lines): 11 Tauri event listeners + session refs AiConversationPanel reduced from 2570 to 1758 lines (-31.6%). Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
… reliability Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
变更类型
检查清单
npm run build(若改动前端)cd src-tauri && cargo test(若改动 Rust)备注