mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:58:26 +00:00
fix(discord): avoid false model picker mismatch warning (#39105)
Land #39105 by @akropp. Co-authored-by: Adam Kropp <adam@thekropp.com>
This commit is contained in:
@@ -937,6 +937,11 @@ async function handleDiscordModelPickerInteraction(
|
||||
return;
|
||||
}
|
||||
|
||||
// The session store write happens asynchronously after the command dispatch
|
||||
// completes. Give it a short window to flush before reading back the persisted
|
||||
// value, otherwise the check races the write and reports a false mismatch.
|
||||
await new Promise((resolve) => setTimeout(resolve, 250));
|
||||
|
||||
const effectiveModelRef = resolveDiscordModelPickerCurrentModel({
|
||||
cfg: ctx.cfg,
|
||||
route,
|
||||
|
||||
Reference in New Issue
Block a user