mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-12 14:10:46 +08:00
fix(qq): stop flashing the status frame during tool runs
The shared Harness client emits a '正在整理结果…' status update after every tool/result. Pushing each one into the QQ stream message made multi-tool turns repeatedly flash that notice instead of showing real progress. Skip status frames in the QQ onUpdate handler so the stream keeps the last meaningful frame (tool name or generated text), which matches the official dsh-qqbot behaviour of not pushing tool-noise.
This commit is contained in:
parent
81884173df
commit
6b176d9053
3 changed files with 40 additions and 2 deletions
|
|
@ -619,11 +619,13 @@ export class QqHarnessBridge {
|
|||
signal: this.#signal,
|
||||
control: { owner: this, key },
|
||||
onUpdate: stream ? async (update) => {
|
||||
// status 帧(如工具结束后的“正在整理结果…”)不推送:
|
||||
// 保持上一帧(工具名或已生成文本),避免中间过程反复闪提示。
|
||||
const progress = update.type === 'text'
|
||||
? update.text
|
||||
: update.type === 'tool'
|
||||
? `正在使用${update.name}…`
|
||||
: update.text;
|
||||
: null;
|
||||
if (progress) await stream.update(progress);
|
||||
} : undefined,
|
||||
onInteraction: (interaction) => this.#handleInteraction(interaction, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue