Files
Memoh/assets/zh_getting-started_sessions.md.Co3PgbK6.js
2026-04-24 06:37:27 +00:00

2 lines
6.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as s,o as r,c as a,ag as o}from"./chunks/framework.CAXxHpAX.js";const u=JSON.parse('{"title":"会话","description":"","frontmatter":{},"headers":[],"relativePath":"zh/getting-started/sessions.md","filePath":"zh/getting-started/sessions.md","lastUpdated":1777012567000}'),e={name:"zh/getting-started/sessions.md"};function n(i,t,d,l,h,c){return r(),a("div",null,[...t[0]||(t[0]=[o('<h1 id="会话" tabindex="-1">会话 <a class="header-anchor" href="#会话" aria-label="Permalink to &quot;会话&quot;"></a></h1><p><strong>会话</strong>是用户与机器人之间的一路独立对话。每路有自己的上下文与历史,换话题或任务时常开新会话。</p><hr><h2 id="为什么要隔离" tabindex="-1">为什么要隔离 <a class="header-anchor" href="#为什么要隔离" aria-label="Permalink to &quot;为什么要隔离&quot;"></a></h2><p>你和机器人聊的内容都落在当前会话里;<strong>新开会话</strong>会换一块上下文,老记录还在,只是不再参与当前这一路的推理。</p><p>会话按<strong>机器人</strong>分;每个机器人各自一摞会话,互不掺。</p><hr><h2 id="会话类型" tabindex="-1">会话类型 <a class="header-anchor" href="#会话类型" aria-label="Permalink to &quot;会话类型&quot;"></a></h2><table tabindex="0"><thead><tr><th>类型</th><th>说明</th></tr></thead><tbody><tr><td><strong>Chat</strong></td><td>最常见的用户发起对话,默认就它。</td></tr><tr><td><strong>Discuss</strong></td><td>偏「旁观」:机器人默认可以不吱声,把模型输出当内心戏,只有用发送类动作时才算对频道真说话。</td></tr><tr><td><strong>Heartbeat</strong></td><td>心跳触发生成,记自主行为。</td></tr><tr><td><strong>Schedule</strong></td><td>cron 触发。</td></tr><tr><td><strong>Subagent</strong></td><td>子智能体被委派时。</td></tr></tbody></table><p>你日常在聊拉里直接看到的,多半是 <strong>Chat</strong> 和 <strong>Discuss</strong>;后三种多由系统建,在列表里像只读记录。</p><h3 id="chat-和-discuss-差在哪" tabindex="-1">Chat 和 Discuss 差在哪 <a class="header-anchor" href="#chat-和-discuss-差在哪" aria-label="Permalink to &quot;Chat 和 Discuss 差在哪&quot;"></a></h3><p><strong>Chat</strong></p><ul><li>像普通助理来回问</li><li>用户发一句,通常就期待有一条可见回复</li><li>网页、私聊默认多落在这类</li></ul><p><strong>Discuss</strong></p><ul><li>常出现在群里:机器人<strong>看着</strong>大家聊</li><li>直接文本多算内部独白</li><li>真发到频道要显式 <code>send</code> 之类动作</li><li><strong>保持沉默是正常选项</strong></li></ul><p>有 Discuss,机器人才更像「要不要接话我自己决定」的群成员,而不是每句都回的客服。</p><hr><h2 id="new-开新会话" tabindex="-1"><code>/new</code> 开新会话 <a class="header-anchor" href="#new-开新会话" aria-label="Permalink to &quot;`/new` 开新会话&quot;"></a></h2><p>同一路由下用 <code>/new</code> 可开新会话,不删老历史,只是<strong>当前</strong>换一块上下文。</p><ul><li><code>/new</code>:按当前场景默认类型</li><li><code>/new chat</code>:强制普通 chat</li><li><code>/new discuss</code>:强制 discuss</li></ul><p><strong>网页本地频道</strong> 默认 <code>chat</code><strong>私聊</strong> 多 <code>chat</code><strong>外接群聊</strong> 多 <code>discuss</code>。</p><p><strong>内置网页本地</strong> 不支持 <code>/new discuss</code>,要 discuss 请用 Telegram、Discord、Misskey 等真实渠道。</p><p>在渠道里发这些命令会:建新会话、后续消息都进这路、旧会话保留但不再当「当前」。</p><p><strong>网页</strong> 里也可用侧栏 <strong>New Session</strong>、切换、搜索、按类型筛、重命名、删除等。</p><hr><h2 id="管理" tabindex="-1">管理 <a class="header-anchor" href="#管理" aria-label="Permalink to &quot;管理&quot;"></a></h2><h3 id="列表" tabindex="-1">列表 <a class="header-anchor" href="#列表" aria-label="Permalink to &quot;列表&quot;"></a></h3><p>当前机器人的会话在侧栏;每项可见标题、类型图标、最近活跃时间。日常你关心的 <strong>Chat / Discuss</strong> 会混在同一列表,都是「人能看到的那类线程」。</p><h3 id="重命名" tabindex="-1">重命名 <a class="header-anchor" href="#重命名" aria-label="Permalink to &quot;重命名&quot;"></a></h3><p>点标题可改,方便按题目标注。</p><h3 id="删" tabindex="-1">删 <a class="header-anchor" href="#删" aria-label="Permalink to &quot;删&quot;"></a></h3><p>删会话会<strong>永久</strong>去掉这一路的历史。</p><hr><h2 id="状态区" tabindex="-1">状态区 <a class="header-anchor" href="#状态区" aria-label="Permalink to &quot;状态区&quot;"></a></h2><p>状态区和 <code>/status</code> 是同一份信息:本会话消息数、<strong>上下文占用</strong>(相对 <code>context_window</code>)、<strong>缓存命中</strong>、读写量、<strong>本路用到的技能</strong> 等。这里有 <strong>立即压缩</strong>,触发的是 <a href="/zh/getting-started/compaction.html">会话上下文压缩</a>,不是改记忆条目的那种。</p><hr><h2 id="和其它功能的关系" tabindex="-1">和其它功能的关系 <a class="header-anchor" href="#和其它功能的关系" aria-label="Permalink to &quot;和其它功能的关系&quot;"></a></h2><ul><li><strong>Discuss</strong> 给「群里多看少说」用。</li><li><strong>Heartbeat</strong> 每触发一次,会有一条对应当次自主行为的会话,可点开看做了啥。</li><li><strong>Schedule</strong> 到点也会生成会话,可看 cron 命令跑的结果。</li><li><strong>Subagent</strong> 各自会话,跟委派任务对齐。</li><li><strong>长期记忆</strong>在机器人整级共享,从哪一路抽出来,别路也能检索到(在你配置允的前提下)。</li></ul>',38)])])}const p=s(e,[["render",n]]);export{u as __pageData,p as default};