Skip to content

Agent pane: Support ACP slash commands - #623

Open
Kai Tao (vanzue) wants to merge 1 commit into
microsoft:mainfrom
vanzue:dev/vanzue/acp-agent-commands
Open

Agent pane: Support ACP slash commands#623
Kai Tao (vanzue) wants to merge 1 commit into
microsoft:mainfrom
vanzue:dev/vanzue/acp-agent-commands

Conversation

@vanzue

Copy link
Copy Markdown
Contributor

Summary

  • consume session-scoped ACP available_commands_update snapshots and merge Agent commands into slash-command completion
  • preserve WTA command precedence, Agent ordering, input hints, and per-session isolation
  • send advertised Agent commands verbatim through session/prompt without planner templates or terminal context
  • label command origins in the popup with [IT] and the connected Agent name

Validation

  • cargo test --target x86_64-pc-windows-msvc --manifest-path tools/wta/Cargo.toml
  • cargo build --target x86_64-pc-windows-msvc --manifest-path tools/wta/Cargo.toml
  • deployed the Debug AppX binary and manually exercised Agent slash-command discovery and /usage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cf3ec318-7c51-4a1c-ac30-a465f32d39a5
Copilot AI lite review requested due to automatic review settings August 17, 2026 05:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds session-scoped ACP “available commands” support to the WTA agent-pane slash-command UX, merging Agent-advertised commands into the existing completion flow while ensuring Agent commands are sent verbatim over session/prompt.

Changes:

  • Introduces AcpSessionCommand + ACP normalization and routes available_commands_update into AppEvent::SessionCommandsUpdated.
  • Merges per-session Agent commands into the slash-command completion list with origin badges ([IT] vs Agent name) and input-hint handling.
  • Adds prompt-dispatch plumbing to bypass templates/runtime context for Agent commands and expands unit coverage for the new behaviors.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/wta/src/ui/mod.rs Re-exports new CommandCandidate for cross-module use (tests/app).
tools/wta/src/ui/command_popup.rs Renders merged client/agent command candidates and adds source badges + truncation logic.
tools/wta/src/slash_command_tests.rs Adds tests covering merge ordering, reserved-name collision handling, per-session replacement, and input-hint behavior.
tools/wta/src/protocol/acp/session_commands.rs Normalizes ACP command snapshots (trimming, de-duplication, input-hint extraction).
tools/wta/src/protocol/acp/mod.rs Wires in the new session_commands module.
tools/wta/src/protocol/acp/mock_agent_tests.rs Adds async coverage for verbatim agent-command dispatch and routing of ACP command snapshots.
tools/wta/src/protocol/acp/client.rs Adds agent_command prompt mode, routes available_commands_update, and bypasses templates/context for agent commands.
tools/wta/src/app.rs Stores per-session command snapshots and integrates them into popup candidates, ghost hints, and Enter handling.
tools/wta/src/app_keys.rs Marks prompt submissions as agent commands when appropriate.
tools/wta/src/app_events.rs Stores incoming session command snapshots on SessionCommandsUpdated.
tools/wta/src/app_contracts/mod.rs Exposes the new AcpSessionCommand contract type.
tools/wta/src/app_contracts/event.rs Adds SessionCommandsUpdated event variant.
tools/wta/src/app_contracts/command.rs Defines AcpSessionCommand.
doc/specs/acp-v1-support-completion-plan.md Updates ACP v1 completion plan status and notes Agent Commands implementation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/wta/src/app.rs
Comment on lines 4670 to 4681
fn command_popup_candidate_count(&self) -> usize {
let agent_count = self.agent_command_candidates().count();
let agent_count = self.available_agent_command_candidates().count();
if agent_count > 0 {
agent_count
} else {
let tab = self.current_tab();
tab.command_popup_candidates.len() + tab.move_position_candidates.len()
if !tab.move_position_candidates.is_empty() {
tab.move_position_candidates.len()
} else {
self.slash_command_candidates().len()
}
}
session_id: "session-1".into(),
commands: vec![session_command("plan", "Build a plan", None)],
});
type_input(&mut app, "/pla");
@github-actions

Copy link
Copy Markdown

check-spelling-bot Report

⚠️ Dictionary not found

Problems were encountered retrieving check dictionaries (cspell:html/dict/html.txt cspell:python/src/common/extra.txt cspell:cpp/src/lang-keywords.txt cspell:ada/dict/ada.txt cspell:sql/src/tsql.txt cspell:dart/src/dart.txt cspell:css/dict/css.txt cspell:sql/src/sql.txt cspell:public-licenses/src/additional-licenses.txt cspell:django/dict/django.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:python/src/additional_words.txt cspell:cpp/src/people.txt cspell:golang/dict/go.txt cspell:docker/src/docker-words.txt cspell:swift/src/swift.txt cspell:lua/dict/lua.txt cspell:haskell/dict/haskell.txt cspell:ruby/dict/ruby.txt cspell:latex/dict/latex.txt cspell:svelte/dict/svelte.txt cspell:java/src/java.txt cspell:python/src/python/python-lib.txt cspell:redis/dict/redis.txt cspell:cpp/src/stdlib-cmath.txt cspell:software-terms/dict/softwareTerms.txt cspell:rust/dict/rust.txt cspell:clojure/src/clojure.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:cpp/src/stdlib-cpp.txt cspell:fullstack/dict/fullstack.txt cspell:powershell/dict/powershell.txt cspell:python/src/python/python.txt cspell:r/src/r.txt cspell:cpp/src/compiler-msvc.txt cspell:cpp/src/stdlib-c.txt cspell:shell/dict/shell-all-words.txt cspell:cpp/src/stdlib-cerrno.txt cspell:k8s/dict/k8s.txt cspell:dotnet/dict/dotnet.txt cspell:gaming-terms/dict/gaming-terms.txt cspell:php/dict/php.txt cspell:cpp/src/lang-jargon.txt cspell:npm/dict/npm.txt cspell:cpp/src/compiler-gcc.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:cpp/src/ecosystem.txt cspell:elixir/dict/elixir.txt cspell:software-terms/dict/webServices.txt cspell:typescript/dict/typescript.txt cspell:node/dict/node.txt cspell:cpp/src/template-strings.txt cspell:scala/dict/scala.txt cspell:java/src/java-terms.txt).

⚠️ For more information, see check-dictionary-not-found.

🔴 Please review

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

Unrecognized words (1)

pla

These words are not needed and should be removed AHP aiu Backgrounder CANTCALLOUT Ccc cplusplus ctl Debian depl dotnet drv endptr EOFs evt frob frobnicate Fullwidth gitlab hdr idl IME inbox ININPUTSYNCCALL INJ intelligentterminal Ioctl KVM lbl lld lsb NODEFAULT NONINFRINGEMENT notif oss outdir Podcast pri prioritization rcv segfault SND sourced SWP Tbl testname transitioning unk unparseable unregisters Virt VMs webpage websites WINVER WSLENV xsi

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:vanzue/intelligent-terminal.git repository
on the dev/vanzue/acp-agent-commands branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/intelligent-terminal/actions/runs/31998580347/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (2100) from .github/actions/spelling/expect/alphabet.txt .github/actions/spelling/expect/expect.txt .github/actions/spelling/expect/web.txt and unrecognized words (1)

Dictionary Entries Covers Uniquely
cspell:csharp/csharp.txt 32 2 2
cspell:aws/aws.txt 232 2 2
cspell:fonts/fonts.txt 536 1 1

Consider adding to the extra_dictionaries array (in the .github/actions/spelling/config.json file):

    "cspell:csharp/csharp.txt",
    "cspell:aws/aws.txt",
    "cspell:fonts/fonts.txt",

To stop checking additional dictionaries, put (in the .github/actions/spelling/config.json file):

"check_extra_dictionaries": []

Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spelling/patterns/98963c171c3373b22bc9dc7868352c3e27cb894e.txt:

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# container images
image: [-\w./:@]+

Alternatively, if a pattern suggestion doesn't make sense for this project, add a # to the beginning of the line in the candidates file with the pattern to stop suggesting it.

Warnings and Notices ⚠️ (2)

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

⚠️ Warnings and Notices Count
ℹ️ candidate-pattern 1
⚠️ check-dictionary-not-found 54

See ⚠️ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

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.

3 participants