mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
import{_ as t,o as d,c as a,ag as o}from"./chunks/framework.DXGyWiRo.js";const p=JSON.parse('{"title":"Slash Commands","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/slash-commands.md","filePath":"getting-started/slash-commands.md","lastUpdated":1774787421000}'),s={name:"getting-started/slash-commands.md"};function r(n,e,c,l,i,h){return d(),a("div",null,[...e[0]||(e[0]=[o('<h1 id="slash-commands" tabindex="-1">Slash Commands <a class="header-anchor" href="#slash-commands" aria-label="Permalink to "Slash Commands""></a></h1><p>Memoh bots support <strong>slash commands</strong> — text commands prefixed with <code>/</code> that can be sent in any channel (Telegram, Discord, Feishu, Web, etc.) to perform administrative actions without going through the AI agent.</p><p>Slash commands are intercepted before they reach the LLM, so they execute instantly and don't consume tokens.</p><hr><h2 id="quick-reference" tabindex="-1">Quick Reference <a class="header-anchor" href="#quick-reference" aria-label="Permalink to "Quick Reference""></a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><code>/help</code></td><td>Show all available commands</td></tr><tr><td><code>/new</code></td><td>Start a new conversation session</td></tr><tr><td><code>/schedule</code></td><td>Manage scheduled tasks</td></tr><tr><td><code>/mcp</code></td><td>Manage MCP connections</td></tr><tr><td><code>/settings</code></td><td>View and update bot settings</td></tr><tr><td><code>/model</code></td><td>Manage bot models</td></tr><tr><td><code>/memory</code></td><td>Manage memory provider</td></tr><tr><td><code>/search</code></td><td>Manage search provider</td></tr><tr><td><code>/browser</code></td><td>Manage browser context</td></tr><tr><td><code>/usage</code></td><td>View token usage statistics</td></tr><tr><td><code>/email</code></td><td>View email configuration</td></tr><tr><td><code>/heartbeat</code></td><td>View heartbeat logs</td></tr><tr><td><code>/skill</code></td><td>View bot skills</td></tr><tr><td><code>/fs</code></td><td>Browse container filesystem</td></tr></tbody></table><hr><h2 id="command-format" tabindex="-1">Command Format <a class="header-anchor" href="#command-format" aria-label="Permalink to "Command Format""></a></h2><p>Commands follow the pattern:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/resource [action] [arguments...]</span></span></code></pre></div><ul><li><strong>resource</strong> — The command group (e.g., <code>schedule</code>, <code>model</code>).</li><li><strong>action</strong> — The sub-command (e.g., <code>list</code>, <code>set</code>, <code>create</code>). Some commands have a default action.</li><li><strong>arguments</strong> — Additional parameters. Use quotes for values with spaces.</li></ul><p>Example: <code>/schedule create daily-report "0 9 * * *" "Send me a daily summary"</code></p><hr><h2 id="permissions" tabindex="-1">Permissions <a class="header-anchor" href="#permissions" aria-label="Permalink to "Permissions""></a></h2><p>Commands that modify bot settings are marked as <strong>owner-only</strong>. Only the bot owner can execute these commands. Read-only commands (listing, viewing) are available to all users who have chat access.</p><p>Owner-only commands are marked with <code>[owner]</code> in the <code>/help</code> output.</p><hr><h2 id="global-commands" tabindex="-1">Global Commands <a class="header-anchor" href="#global-commands" aria-label="Permalink to "Global Commands""></a></h2><h3 id="help" tabindex="-1"><code>/help</code> <a class="header-anchor" href="#help" aria-label="Permalink to "`/help`""></a></h3><p>Displays a list of all available commands and their usage.</p><h3 id="new" tabindex="-1"><code>/new</code> <a class="header-anchor" href="#new" aria-label="Permalink to "`/new`""></a></h3><p>Starts a new conversation session, resetting the current context. See <a href="/getting-started/sessions.html">Sessions</a> for details.</p><hr><h2 id="schedule-—-manage-scheduled-tasks" tabindex="-1"><code>/schedule</code> — Manage Scheduled Tasks <a class="header-anchor" href="#schedule-—-manage-scheduled-tasks" aria-label="Permalink to "`/schedule` — Manage Scheduled Tasks""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/schedule list</code></td><td>All</td></tr><tr><td><code>get</code></td><td><code>/schedule get <name></code></td><td>All</td></tr><tr><td><code>create</code></td><td><code>/schedule create <name> <pattern> <command></code></td><td>Owner</td></tr><tr><td><code>update</code></td><td><code>/schedule update <name> [--pattern P] [--command C]</code></td><td>Owner</td></tr><tr><td><code>delete</code></td><td><code>/schedule delete <name></code></td><td>Owner</td></tr><tr><td><code>enable</code></td><td><code>/schedule enable <name></code></td><td>Owner</td></tr><tr><td><code>disable</code></td><td><code>/schedule disable <name></code></td><td>Owner</td></tr></tbody></table><p><strong>Examples:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/schedule list</span></span>\n<span class="line"><span>/schedule create morning-news "0 9 * * *" "Summarize today's top tech news"</span></span>\n<span class="line"><span>/schedule disable morning-news</span></span></code></pre></div><hr><h2 id="mcp-—-manage-mcp-connections" tabindex="-1"><code>/mcp</code> — Manage MCP Connections <a class="header-anchor" href="#mcp-—-manage-mcp-connections" aria-label="Permalink to "`/mcp` — Manage MCP Connections""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/mcp list</code></td><td>All</td></tr><tr><td><code>get</code></td><td><code>/mcp get <name></code></td><td>All</td></tr><tr><td><code>delete</code></td><td><code>/mcp delete <name></code></td><td>Owner</td></tr></tbody></table><hr><h2 id="settings-—-view-and-update-bot-settings" tabindex="-1"><code>/settings</code> — View and Update Bot Settings <a class="header-anchor" href="#settings-—-view-and-update-bot-settings" aria-label="Permalink to "`/settings` — View and Update Bot Settings""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>get</code></td><td><code>/settings</code> or <code>/settings get</code></td><td>All</td></tr><tr><td><code>update</code></td><td><code>/settings update [options]</code></td><td>Owner</td></tr></tbody></table><p><strong>Update options:</strong></p><table tabindex="0"><thead><tr><th>Option</th><th>Values</th></tr></thead><tbody><tr><td><code>--language</code></td><td>Language code (e.g., <code>en</code>, <code>zh</code>)</td></tr><tr><td><code>--acl_default_effect</code></td><td><code>allow</code> or <code>deny</code></td></tr><tr><td><code>--reasoning_enabled</code></td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>--reasoning_effort</code></td><td><code>low</code>, <code>medium</code>, or <code>high</code></td></tr><tr><td><code>--heartbeat_enabled</code></td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>--heartbeat_interval</code></td><td>Minutes (integer)</td></tr><tr><td><code>--chat_model_id</code></td><td>Model UUID</td></tr><tr><td><code>--heartbeat_model_id</code></td><td>Model UUID</td></tr></tbody></table><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/settings update --language en --heartbeat_enabled true --heartbeat_interval 30</span></span></code></pre></div><hr><h2 id="model-—-manage-bot-models" tabindex="-1"><code>/model</code> — Manage Bot Models <a class="header-anchor" href="#model-—-manage-bot-models" aria-label="Permalink to "`/model` — Manage Bot Models""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/model list</code></td><td>All</td></tr><tr><td><code>set</code></td><td><code>/model set <provider_name> <model_name></code></td><td>Owner</td></tr><tr><td><code>set-heartbeat</code></td><td><code>/model set-heartbeat <provider_name> <model_name></code></td><td>Owner</td></tr></tbody></table><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/model list</span></span>\n<span class="line"><span>/model set OpenAI gpt-4o</span></span>\n<span class="line"><span>/model set-heartbeat OpenAI gpt-4o-mini</span></span></code></pre></div><hr><h2 id="memory-—-manage-memory-provider" tabindex="-1"><code>/memory</code> — Manage Memory Provider <a class="header-anchor" href="#memory-—-manage-memory-provider" aria-label="Permalink to "`/memory` — Manage Memory Provider""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/memory list</code></td><td>All</td></tr><tr><td><code>set</code></td><td><code>/memory set <name></code></td><td>Owner</td></tr></tbody></table><hr><h2 id="search-—-manage-search-provider" tabindex="-1"><code>/search</code> — Manage Search Provider <a class="header-anchor" href="#search-—-manage-search-provider" aria-label="Permalink to "`/search` — Manage Search Provider""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/search list</code></td><td>All</td></tr><tr><td><code>set</code></td><td><code>/search set <name></code></td><td>Owner</td></tr></tbody></table><hr><h2 id="browser-—-manage-browser-context" tabindex="-1"><code>/browser</code> — Manage Browser Context <a class="header-anchor" href="#browser-—-manage-browser-context" aria-label="Permalink to "`/browser` — Manage Browser Context""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/browser list</code></td><td>All</td></tr><tr><td><code>set</code></td><td><code>/browser set <name></code></td><td>Owner</td></tr></tbody></table><hr><h2 id="usage-—-view-token-usage" tabindex="-1"><code>/usage</code> — View Token Usage <a class="header-anchor" href="#usage-—-view-token-usage" aria-label="Permalink to "`/usage` — View Token Usage""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>summary</code></td><td><code>/usage</code> or <code>/usage summary</code></td><td>All</td></tr><tr><td><code>by-model</code></td><td><code>/usage by-model</code></td><td>All</td></tr></tbody></table><p>Shows token usage for the last 7 days, broken down by session type (chat, heartbeat, schedule) or by model.</p><hr><h2 id="email-—-view-email-configuration" tabindex="-1"><code>/email</code> — View Email Configuration <a class="header-anchor" href="#email-—-view-email-configuration" aria-label="Permalink to "`/email` — View Email Configuration""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>providers</code></td><td><code>/email providers</code></td><td>All</td></tr><tr><td><code>bindings</code></td><td><code>/email bindings</code></td><td>All</td></tr><tr><td><code>outbox</code></td><td><code>/email outbox</code></td><td>All</td></tr></tbody></table><hr><h2 id="heartbeat-—-view-heartbeat-logs" tabindex="-1"><code>/heartbeat</code> — View Heartbeat Logs <a class="header-anchor" href="#heartbeat-—-view-heartbeat-logs" aria-label="Permalink to "`/heartbeat` — View Heartbeat Logs""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>logs</code></td><td><code>/heartbeat</code> or <code>/heartbeat logs</code></td><td>All</td></tr></tbody></table><p>Shows the 10 most recent heartbeat execution logs.</p><hr><h2 id="skill-—-view-bot-skills" tabindex="-1"><code>/skill</code> — View Bot Skills <a class="header-anchor" href="#skill-—-view-bot-skills" aria-label="Permalink to "`/skill` — View Bot Skills""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/skill</code> or <code>/skill list</code></td><td>All</td></tr></tbody></table><hr><h2 id="fs-—-browse-container-filesystem" tabindex="-1"><code>/fs</code> — Browse Container Filesystem <a class="header-anchor" href="#fs-—-browse-container-filesystem" aria-label="Permalink to "`/fs` — Browse Container Filesystem""></a></h2><table tabindex="0"><thead><tr><th>Sub-command</th><th>Usage</th><th>Permission</th></tr></thead><tbody><tr><td><code>list</code></td><td><code>/fs list [path]</code></td><td>All</td></tr><tr><td><code>read</code></td><td><code>/fs read <path></code></td><td>All</td></tr></tbody></table><p><strong>Examples:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/fs list /</span></span>\n<span class="line"><span>/fs list /home</span></span>\n<span class="line"><span>/fs read /home/bot/IDENTITY.md</span></span></code></pre></div><p>File content is truncated to 2000 characters when displayed in chat.</p><hr><h2 id="mention-prefixed-commands" tabindex="-1">Mention-Prefixed Commands <a class="header-anchor" href="#mention-prefixed-commands" aria-label="Permalink to "Mention-Prefixed Commands""></a></h2><p>In group chats, you can prefix commands with a mention:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>@BotName /help</span></span>\n<span class="line"><span>@BotName /new</span></span></code></pre></div><p>The bot will strip the mention and process the slash command normally.</p>',76)])])}const b=t(s,[["render",r]]);export{p as __pageData,b as default};
|