mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-10 17:35:57 +00:00
16391e35ab
* support slash skill activation * format slash skill activation * Preserve slash skill activation with uploads * Address slash skill review feedback * Address slash skill follow-up review * Fix lazy slash skill storage resolution * Keep slash skill activation out of system prompt * Address slash skill review issues * fix: harden slash skill command handling * feat(frontend): add slash skill autocomplete * fix: address slash skill review feedback * fix: preserve slash skill text for IM uploads
28 lines
765 B
Python
28 lines
765 B
Python
"""Shared command definitions used by all channel implementations.
|
|
|
|
Keeping the authoritative command set in one place ensures that channel
|
|
parsers (e.g. Feishu) and the ChannelManager dispatcher stay in sync
|
|
automatically — adding or removing a command here is the single edit
|
|
required.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
KNOWN_CHANNEL_COMMANDS: frozenset[str] = frozenset(
|
|
{
|
|
"/bootstrap",
|
|
"/new",
|
|
"/status",
|
|
"/models",
|
|
"/memory",
|
|
"/help",
|
|
}
|
|
)
|
|
|
|
|
|
def is_known_channel_command(text: str) -> bool:
|
|
"""Return whether text starts with a registered channel control command."""
|
|
if not text.startswith("/"):
|
|
return False
|
|
return text.split(maxsplit=1)[0].lower() in KNOWN_CHANNEL_COMMANDS
|