mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
fix(discord): defer component interactions to prevent timeout (#16287)
* fix(discord): defer component interactions to prevent timeout Discord requires interaction responses within 3 seconds. Button clicks were routed through the LLM pipeline before responding, exceeding this window and showing 'This interaction failed' to users. Now immediately defers the interaction, then processes the agent response asynchronously. Fixes #16262 * fix: harden deferred interaction replies and silent chat finals (#16287) (thanks @robbyczgw-cla) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -56,6 +56,16 @@ export class ChatLog extends Container {
|
||||
this.addChild(new AssistantMessageComponent(text));
|
||||
}
|
||||
|
||||
dropAssistant(runId?: string) {
|
||||
const effectiveRunId = this.resolveRunId(runId);
|
||||
const existing = this.streamingRuns.get(effectiveRunId);
|
||||
if (!existing) {
|
||||
return;
|
||||
}
|
||||
this.removeChild(existing);
|
||||
this.streamingRuns.delete(effectiveRunId);
|
||||
}
|
||||
|
||||
startTool(toolCallId: string, toolName: string, args: unknown) {
|
||||
const existing = this.toolById.get(toolCallId);
|
||||
if (existing) {
|
||||
|
||||
Reference in New Issue
Block a user