agentscope-ai / agentscope-ai/QwenPaw
[Feature]: customizable slash command shortcut menu
- Dominant language
- Python
- Stars
- 34.9k
- Forks
- 3.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 225
Description
## Summary
The `/` shortcut menu in chat input currently shows only 4–5 magic commands
(/clear /compact /mission /skills), but QwenPaw has 20+ built-in commands.
Users who don't read the docs have no idea that /new /history /model /stop
/proactive etc. even exist. Let users **choose** which built-in commands
appear in the shortcut menu, persisted to agent.json.
## Component(s) Affected
- [x] Core / Backend (new chat_commands API + config field)
- [x] Console (frontend web UI) (settings panel + dynamic menu)
- [ ] Channels
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy
## Problem / Motivation
A month ago #3671 requested showing all commands in the suggestion list.
The maintainer replied:
> We put the most helpful/common ones there. Showing all of them would likely
> degrade the conversation experience. We may add more later, but we're not
> considering adding all of them for now.
This reply captures the core tension — **showing everything is noisy, but
hardcoding a subset is too rigid**. Different users need different commands:
someone who wants to review past conversation context needs /history —
without the shortcut menu they'd never discover it. Filling the menu
with all 21 commands hurts UX, but not exposing them at all means those
commands effectively don't exist.
Who benefits: all console users, especially newcomers who don't know what
commands are available.
## Proposed Solution
Core idea: **let users decide what to show. Keep the current defaults.**
Backend:
- Add `chat_commands: list[str]` field to `AgentsRunningConfig`, default
`["clear", "compact", "mission", "skills"]` (matches current hardcoded set)
- `GET/PUT /agent/chat-commands` endpoints to read/write preferences
- `GET /agent/chat-commands/available` endpoint returning all 21 available
commands with category and argument info
Frontend:
- Replace hardcoded `commandSuggestions` in Chat/index.tsx with dynamic
rendering based on the `chat_commands` config
- Add a gear icon near the input area that opens a settings modal, showing
checkable commands grouped by category (context/history/model/
session/control/daemon)
Backward compatibility: `AgentsRunningConfig` already has `extra="ignore"`;
old agent.json files without this field will fall back to the default set.
## Alternatives Considered
1. **Show everything (#3671):** Already rejected by maintainer — 21 commands
flooding the menu is indeed too noisy.
2. **Pure frontend (localStorage):** Minimal change, but lost on browser
switch / cache clear; no multi-device sync.
3. **Keep 4–5 hardcoded forever:** The status quo. /new /history /model etc.
remain invisible to most users.
## Additional Context
- Related closed issue: #3671 (this proposal directly addresses the
maintainer's concern)
- Full command list (21): /clear /compact /new /history /message
/compact_str /summarize_status /dump_history /load_history /model /mission
/plan /proactive /skills /stop /status /restart /reload-config
/reload_config /version /logs
- `/approve` and `/deny` are deliberately excluded — they're context-
sensitive and only appear dynamically during tool approval flows.
## Willing to Contribute
- [x] I am willing to open a PR for this feature (after discussion).
Contributor guide
Assessment
This issue has not been assessed yet.