Skip to content

feat(commands): Session management [Phase 3/3] command execution centralization#961

Closed
mingmxren wants to merge 6 commits intosipeed:mainfrom
mingmxren:codex/pr-split-3-command-centralization
Closed

feat(commands): Session management [Phase 3/3] command execution centralization#961
mingmxren wants to merge 6 commits intosipeed:mainfrom
mingmxren:codex/pr-split-3-command-centralization

Conversation

@mingmxren
Copy link
Copy Markdown
Contributor

@mingmxren mingmxren commented Mar 1, 2026

📝 Description

  • Centralizes command execution with tri-state executor/runtime contracts.
  • Routes generic command handling through one runtime-backed path while preserving /switch passthrough behavior.
  • Removes dead parser/dispatcher remnants and keeps channel behavior aligned.
  • Removes docs/plans artifacts from this PR and moves the high-level implementation rationale into English comments in key executor/runtime/agent functions.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

Checked on 2026-03-03 in sipeed/picoclaw upstream issues:

📚 Technical Context (Skip for Docs)

  • Reference URL: code comments in pkg/commands/executor.go, pkg/commands/builtin.go, pkg/agent/loop.go
  • Reasoning: A single command execution path reduces channel drift, preserves reject/passthrough semantics, and keeps command behavior deterministic.

🧪 Test Environment

  • Hardware: Mac mini
  • OS: macOS 26.3
  • Model/Provider: gpt-5.2, gemini-3-flash-preview, gemini-3-pro-preview
  • Channels: Telegram, WhatsApp

📸 Evidence (Optional)

Click to view Logs/Screenshots
  • go test ./pkg/commands ./pkg/agent ./pkg/session ./pkg/config ./pkg/channels/...

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

@mingmxren mingmxren changed the title refactor(commands): centralize command execution [Phase 3/3] refactor(commands): centralize command execution Mar 1, 2026
@mingmxren mingmxren marked this pull request as draft March 1, 2026 15:01
@mingmxren mingmxren changed the title [Phase 3/3] refactor(commands): centralize command execution feat(commands): Session management [Phase 3/3] command centralization Mar 1, 2026
@mingmxren mingmxren changed the title feat(commands): Session management [Phase 3/3] command centralization feat(commands): Session management [Phase 3/3] command execution centralization Mar 1, 2026
@mingmxren mingmxren force-pushed the codex/pr-split-3-command-centralization branch from f3e96f2 to 730c599 Compare March 1, 2026 15:13
Comment thread pkg/channels/telegram/command_registration.go Outdated
@mingmxren mingmxren force-pushed the codex/pr-split-3-command-centralization branch 4 times, most recently from b4d669d to 839050a Compare March 3, 2026 08:11
@mingmxren mingmxren force-pushed the codex/pr-split-3-command-centralization branch from 839050a to 51a88fd Compare March 3, 2026 08:39
@mingmxren mingmxren force-pushed the codex/pr-split-3-command-centralization branch from 51a88fd to aa56870 Compare March 3, 2026 09:02
@mingmxren
Copy link
Copy Markdown
Contributor Author

Superseded by #959 after merging Phase 3 changes into PR1. We now keep a two-branch train with #959 first and #960 follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants