mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(channels): add shared slash command system
- Add /help, /clear (aliases: /reset, /new), /status commands to ChannelBase - Commands are handled locally without agent round-trip - TelegramAdapter skips "Working..." indicator for local commands - Update docs to reflect new command structure This provides a consistent command interface across all channel types (Telegram, WeChat, etc.) with platform-specific extensibility. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
697898a9fb
commit
9c001ba61e
4 changed files with 130 additions and 53 deletions
|
|
@ -217,14 +217,16 @@ Files work with any model — no multimodal support required.
|
|||
|
||||
## Slash Commands
|
||||
|
||||
Channels support slash commands. Some are handled locally by the adapter:
|
||||
Channels support slash commands. These are handled locally (no agent round-trip):
|
||||
|
||||
- `/start` — Welcome message
|
||||
- `/help` — List available commands
|
||||
- `/reset` — Reset your session and start fresh
|
||||
- `/clear` — Clear your session and start fresh (aliases: `/reset`, `/new`)
|
||||
- `/status` — Show session info and access policy
|
||||
|
||||
All other slash commands (e.g., `/compress`, `/summary`) are forwarded to the agent.
|
||||
|
||||
These commands work on all channel types (Telegram, WeChat, etc.).
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ You can send photos and documents to the bot, not just text.
|
|||
## Tips
|
||||
|
||||
- **Keep instructions concise-focused** — Telegram has a 4096-character message limit. Adding instructions like "keep responses short" helps the agent stay within bounds.
|
||||
- **Use `sessionScope: "user"`** — This gives each user their own conversation. Use `/reset` to start fresh.
|
||||
- **Use `sessionScope: "user"`** — This gives each user their own conversation. Use `/clear` to start fresh.
|
||||
- **Restrict access** — Use `senderPolicy: "allowlist"` for a fixed set of users, or `"pairing"` to let new users request access with a code you approve via CLI. See [DM Pairing](./overview#dm-pairing) for details.
|
||||
|
||||
## Message Formatting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue