mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #235] bug: Messaging bot commands with arguments (/workspace <name>, /model <id>) are never intercepted — parsed as plain chat text #149
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Chengzhi-Yang on GitHub (Aug 24, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/235
Body:
Summary
Commands sent to a messaging bot (Discord/Telegram/etc.) that take an argument —
/workspace <name>and/model <id>— are never intercepted by the bot's command layer. They fall through to normal message dispatch and reach the agent as plain text, so the documented behavior (/workspace <name>switches the bot's workspace and starts a new chat) never happens.Bare commands without arguments (
/new,/stop,/retry,/help,/workspaces) work fine.Environment
cptr, installed via venv)/workspace <name>— Switch workspace (fuzzy match) and start a new chat)Steps to reproduce
/projects), start it./workspace jellyfin-storage/workspace jellyfin-storageas plain text and responds to it conversationally./model <id>.Root cause
In
cptr/utils/bridge.py,BotManager._handle_message, the command is extracted like this:clean.split("@")[0]only strips a Telegram-style@BotNamesuffix — it does not split on whitespace. So:/workspace jellyfin-storage→cmd = "/workspace jellyfin-storage"→cmd == "/workspace"isFalse→ falls through to chat dispatch/model gpt-4o→cmd = "/model gpt-4o"→cmd == "/model"isFalse→ falls throughThe command handler for
/workspaceexists and is correct (it matches by name/path suffix, updates the bot config, and starts a new chat) — it's just unreachable because the parser never produces a bare/workspace.Suggested fix
One line in
cptr/utils/bridge.py:Verified: this yields
cmd == "/workspace"for/workspace jellyfin-storage, still strips@BotNamesuffixes (/cmd@BotName→/cmd), and leaves bare commands and non-slash messages unchanged.Workaround (for users on affected versions)
Set the bot's workspace directly in Settings → Admin → Bots instead of using
/workspace, or patch the single line above (note: it lives in the container's writable layer and is lost on container rebuild).@owui-terminator[bot] commented on GitHub (Aug 24, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
Related because it is the only nearby messaging-bot issue and discusses Discord integration limitations in the same bridge/core area. However, it focuses on delivery of responses from timers/scheduled jobs rather than command parsing.
by rs189
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.