Skip to content

feat: add slash command support across all SDKs#1

Open
jagilber wants to merge 3 commits intomainfrom
feature/slash-command-support
Open

feat: add slash command support across all SDKs#1
jagilber wants to merge 3 commits intomainfrom
feature/slash-command-support

Conversation

@jagilber
Copy link
Copy Markdown
Owner

Summary

Adds slash command support (/help, /model, /compact, /clear, /agent, etc.) across all four SDKs (.NET, Node.js, Python, Go).

Changes

  • CommandRegistry — registry of built-in slash commands with parsing and lookup
  • sendCommand / send_command API — new method on session for executing slash commands
  • Three dispatch methods:
    • Local — /help, /clear\ handled entirely in SDK
    • RPC — /model, /compact, /agent\ call dedicated RPC methods
    • Passthrough — all other commands sent via \session.send()\ for CLI handling
  • Unit tests for all SDKs
  • global.json updated to .NET SDK 10.0.201

Files Added

SDK Source Tests
.NET \dotnet/src/Commands.cs\ \dotnet/test/CommandsTests.cs\
Node.js \
odejs/src/commands.ts\ \
odejs/test/commands.test.ts\
Python \python/copilot/commands.py\ \python/test_commands.py\
Go \go/commands.go\ \go/commands_test.go\

jagilber and others added 3 commits March 14, 2026 19:46
Add CommandRegistry and sendCommand/send_command API to .NET, Node.js,
Python, and Go SDKs for handling slash commands (/help, /model, /compact,
/clear, /agent, etc.) with local, RPC, and passthrough dispatch.

- Local handling for /help and /clear
- RPC dispatch for /model, /compact, /agent
- Passthrough via session.send() for all other commands
- Unit tests for all SDKs
- Update global.json to SDK 10.0.201

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Change agentSlug/agent_slug to name across all SDKs (matches SessionAgentSelectParams)
- Fix prettier formatting in nodejs/src/index.ts
- Fix ruff formatting in python/copilot/session.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove unused pytest and SlashCommandResult imports flagged by ruff lint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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