feat(acp): support built-in slash commands in ACP runtime - #2060
Open
xielixing wants to merge 1 commit into
Open
feat(acp): support built-in slash commands in ACP runtime#2060xielixing wants to merge 1 commit into
xielixing wants to merge 1 commit into
Conversation
Add /help, /clear, /compact, /status built-in commands to the ACP server runtime. Commands are advertised to clients via AvailableCommandsUpdate after session creation, and intercepted server-side before forwarding to the LLM. Closes GCWing#1118
xielixing
force-pushed
the
fix/issue-1118-acp-builtin-commands
branch
from
August 5, 2026 06:24
3623d50 to
ef78de5
Compare
xielixing
pushed a commit
to xielixing/BitFun
that referenced
this pull request
Aug 5, 2026
Three afternoon PRs ballooned to ~8.8k added lines because the agent branched its fix worktrees from the host checkout's HEAD, which sat on the in-flight feature branch; the whole feature diff rode along into each PR. The preamble now requires basing every fix branch on origin/<default> after a fetch, never on the host checkout's current branch. The three contaminated branches were rebased onto origin/main and force-pushed (PRs GCWing#2058/GCWing#2059/GCWing#2060 now carry only their own fix). Co-Authored-By: Claude Fable 5 <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.
Summary
Adds built-in slash command support to the BitFun ACP (Agent Client Protocol) server runtime.
Changes
New module
runtime/commands.rs: Defines four built-in commands (/help,/clear,/compact,/status) and provides:builtin_commands()— returns the command list for client advertisementadvertise_builtin_commands()— sendsAvailableCommandsUpdateto the client after session creation (errors are logged, never block session setup)try_handle_builtin_command()— intercepts slash commands server-side before forwarding to the LLM, returning a response directly for known commandsruntime/session.rs: Callsadvertise_builtin_commandsafterpublish_active_sessionsucceeds in bothcreate_sessionandrestore_sessionruntime/prompt.rs: Intercepts built-in slash commands inrun_promptbefore the normal agent dialog submissionruntime.rs: Registers the newcommandsmoduleTest plan
cargo check -p bitfun-acppassescargo test -p bitfun-acp— all 115 tests pass (including 3 new unit tests for command uniqueness, help text completeness, and status text fields)cargo clippy -p bitfun-acp— no new warningsCloses #1118