refactor: share account snapshot descriptions

This commit is contained in:
Peter Steinberger
2026-03-22 20:41:32 +00:00
parent 11c66b36fd
commit 00b2f10dec
22 changed files with 227 additions and 133 deletions

View File

@@ -1,3 +1,4 @@
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
import {
adaptScopedAccountAccessor,
@@ -146,13 +147,14 @@ export const googlechatPlugin = createChatChannelPlugin({
config: {
...googleChatConfigAdapter,
isConfigured: (account) => account.credentialSource !== "none",
describeAccount: (account) => ({
accountId: account.accountId,
name: account.name,
enabled: account.enabled,
configured: account.credentialSource !== "none",
credentialSource: account.credentialSource,
}),
describeAccount: (account) =>
describeAccountSnapshot({
account,
configured: account.credentialSource !== "none",
extra: {
credentialSource: account.credentialSource,
},
}),
},
groups: {
resolveRequireMention: resolveGoogleChatGroupRequireMention,