Skip to content

Feature/20260701 n p 1 - #45

Merged
donfaquir merged 10 commits into
mainfrom
feature/20260701-n-p-1
Jul 6, 2026
Merged

Feature/20260701 n p 1#45
donfaquir merged 10 commits into
mainfrom
feature/20260701-n-p-1

Conversation

@donfaquir

Copy link
Copy Markdown
Owner

摘要

变更类型

  • 缺陷修复
  • 新功能或行为变更
  • 文档或元数据(LICENSE、CI 等)
  • 重构或性能(无行为变化)
  • 其他:

检查清单

  • 本地已运行 npm run build(若改动前端)
  • 本地已运行 cd src-tauri && cargo test(若改动 Rust)
  • 不包含无权再许可的第三方素材或机密信息
  • 已阅读并遵守 CONTRIBUTING.mdCODE_OF_CONDUCT.md

备注

donfaquir and others added 10 commits July 2, 2026 16:59
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>
@donfaquir
donfaquir merged commit 6dce8f3 into main Jul 6, 2026
2 checks passed
@donfaquir
donfaquir deleted the feature/20260701-n-p-1 branch July 6, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant