mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 16:30:33 +00:00
Infra: unify plugin split runtime state (#50725)
Merged via squash.
Prepared head SHA: 570b7b9459
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
resolveThreadBindingConversationIdFromBindingId,
|
||||
unregisterSessionBindingAdapter,
|
||||
type BindingTargetKind,
|
||||
type SessionBindingAdapter,
|
||||
type SessionBindingRecord,
|
||||
} from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import { normalizeAccountId, resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
||||
@@ -233,11 +234,15 @@ export function createFeishuThreadBindingManager(params: {
|
||||
}
|
||||
}
|
||||
getState().managersByAccountId.delete(accountId);
|
||||
unregisterSessionBindingAdapter({ channel: "feishu", accountId });
|
||||
unregisterSessionBindingAdapter({
|
||||
channel: "feishu",
|
||||
accountId,
|
||||
adapter: sessionBindingAdapter,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
registerSessionBindingAdapter({
|
||||
const sessionBindingAdapter: SessionBindingAdapter = {
|
||||
channel: "feishu",
|
||||
accountId,
|
||||
capabilities: {
|
||||
@@ -292,7 +297,9 @@ export function createFeishuThreadBindingManager(params: {
|
||||
const removed = manager.unbindConversation(conversationId);
|
||||
return removed ? [toSessionBindingRecord(removed, { idleTimeoutMs, maxAgeMs })] : [];
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
registerSessionBindingAdapter(sessionBindingAdapter);
|
||||
|
||||
getState().managersByAccountId.set(accountId, manager);
|
||||
return manager;
|
||||
|
||||
Reference in New Issue
Block a user