输入中指示(Typing indicators)
当一次 run 正在执行时,Moltbot 会向聊天渠道发送“正在输入/输入中”的指示。用 agents.defaults.typingMode 控制 何时 开始 typing,用 typingIntervalSeconds 控制 多久 刷新一次。
默认行为
当 agents.defaults.typingMode 未设置时,Moltbot 保持旧版(legacy)行为:
- 私聊:一旦模型 loop 开始,就立刻开始 typing。
- 群聊且有 @ 提及:立刻开始 typing。
- 群聊且无 @ 提及:只有当消息文本开始 streaming 时才开始 typing。
- Heartbeat runs:禁用 typing。
模式
将 agents.defaults.typingMode 设置为以下之一:
never— 永不显示 typing 指示器。instant— 模型 loop 一开始就立刻开始 typing,即使本次 run 最后只返回静默回复 token。thinking— 在第一个 reasoning delta 到来时开始 typing(要求该 run 设置reasoningLevel: "stream")。message— 在第一个非静默文本 delta 到来时开始 typing(会忽略NO_REPLY静默 token)。
按“触发得有多早”的顺序: never → message → thinking → instant
配置
json5
{
agent: {
typingMode: "thinking",
typingIntervalSeconds: 6
}
}你也可以在每个 session 覆盖 mode 或刷新频率:
json5
{
session: {
typingMode: "message",
typingIntervalSeconds: 4
}
}备注
message模式不会对“仅静默”的回复显示 typing(例如用于抑制输出的NO_REPLYtoken)。thinking只有在 run 流式输出 reasoning(reasoningLevel: "stream")时才会触发。 如果模型没有发出 reasoning deltas,则不会开始 typing。- Heartbeat 无论什么 mode 都不会显示 typing。
typingIntervalSeconds控制的是刷新频率,不是开始时间。 默认值为 6 秒。