惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
GbyAI
GbyAI
博客园 - 司徒正美
美团技术团队
Vercel News
Vercel News
IT之家
IT之家
U
Unit 42
Y
Y Combinator Blog
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
V
Visual Studio Blog
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MyScale Blog
MyScale Blog
博客园 - 叶小钗
A
About on SuperTechFans
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(qqbot): shorten typing keepalive window (#83469) · op...
sliverp · 2026-05-18 · via Recent Commits to openclaw:main

@@ -15,13 +15,19 @@ type SendInputNotifyFn = (

1515

inputSecond: number,

1616

) => Promise<unknown>;

171718-

/** Refresh every 50s for the QQ API's 60s input-notify window. */

19-

const TYPING_INTERVAL_MS = 50_000;

20-

export const TYPING_INPUT_SECOND = 60;

18+

/** Refresh every 5s for the QQ API's 10s input-notify window. */

19+

const TYPING_INTERVAL_MS = 5_000;

20+

export const TYPING_INPUT_SECOND = 10;

21+

const QQ_C2C_PASSIVE_REPLY_LIMIT = 5;

22+

const INITIAL_TYPING_NOTIFY_COUNT = 1;

23+

const FINAL_REPLY_RESERVE_COUNT = 1;

24+

export const TYPING_RENEWAL_LIMIT =

25+

QQ_C2C_PASSIVE_REPLY_LIMIT - INITIAL_TYPING_NOTIFY_COUNT - FINAL_REPLY_RESERVE_COUNT;

21262227

export class TypingKeepAlive {

2328

private timer: ReturnType<typeof setInterval> | null = null;

2429

private stopped = false;

30+

private renewalsRemaining = TYPING_RENEWAL_LIMIT;

25312632

constructor(

2733

private readonly getToken: () => Promise<string>,

@@ -62,18 +68,35 @@ export class TypingKeepAlive {

6268

private async send(): Promise<void> {

6369

try {

6470

const token = await this.getToken();

65-

await this.sendInputNotify(token, this.openid, this.msgId, TYPING_INPUT_SECOND);

66-

this.log?.debug?.(`Typing keep-alive sent to ${this.openid}`);

71+

await this.sendAttempt(token);

6772

} catch (err) {

6873

try {

6974

this.clearCache();

7075

const token = await this.getToken();

71-

await this.sendInputNotify(token, this.openid, this.msgId, TYPING_INPUT_SECOND);

76+

await this.sendAttempt(token);

7277

} catch {

7378

this.log?.debug?.(

7479

`Typing keep-alive failed for ${this.openid}: ${formatErrorMessage(err)}`,

7580

);

7681

}

7782

}

7883

}

84+85+

private async sendAttempt(token: string): Promise<void> {

86+

if (this.stopped || this.renewalsRemaining <= 0) {

87+

this.stop();

88+

return;

89+

}

90+91+

this.renewalsRemaining--;

92+

try {

93+

await this.sendInputNotify(token, this.openid, this.msgId, TYPING_INPUT_SECOND);

94+

this.log?.debug?.(`Typing keep-alive sent to ${this.openid}`);

95+

} finally {

96+

if (this.renewalsRemaining <= 0) {

97+

this.log?.debug?.(`Typing keep-alive budget exhausted for ${this.openid}`);

98+

this.stop();

99+

}

100+

}

101+

}

79102

}