Merge pull request #60 from LAN-SHH/fix/qq-c2c-markdown-replies

fix(qq): deliver C2C replies as markdown
This commit is contained in:
xiemanR 2026-08-25 23:40:41 +08:00 • committed by GitHub
commit 8f03c66775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 53 deletions

View file

@ -776,16 +776,8 @@ export class QqHarnessBridge {
const content = hasImages
? await promptContentForMessage(promptMessage, { signal: this.#signal })
: undefined;
// QQ C2C keeps one stream bubble. Progress is collected but never submitted:
// some clients reject replacing an already visible stream frame, which would
// otherwise leave a stale progress bubble plus a separate fallback answer.
if (message.kind === 'c2c' && target?.msgId && typeof this.#bot.openStream === 'function') {
try {
stream = this.#bot.openStream({ target });
} catch (error) {
this.#logger.warn?.('[dsh-im:qq] unable to start a QQ stream; using markdown fallback:', error);
}
}
// QQ stream_messages can acknowledge a final frame without rendering it in
// some C2C clients. Standard Markdown delivery is the reliable reply path.
const toolErrors = [];
let answer;
let artifacts = [];