mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
25 lines
824 B
TypeScript
25 lines
824 B
TypeScript
// Qa Channel plugin module implements status behavior.
|
|
import { DEFAULT_ACCOUNT_ID } from "./accounts.js";
|
|
import {
|
|
createComputedAccountStatusAdapter,
|
|
createDefaultChannelRuntimeState,
|
|
} from "./runtime-api.js";
|
|
import type { ResolvedQaChannelAccount } from "./types.js";
|
|
|
|
export const qaChannelStatus = createComputedAccountStatusAdapter<ResolvedQaChannelAccount>({
|
|
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
|
|
buildChannelSummary: ({ snapshot }) => ({
|
|
baseUrl: snapshot.baseUrl ?? "[missing]",
|
|
}),
|
|
resolveAccountSnapshot: ({ account }) => ({
|
|
accountId: account.accountId,
|
|
name: account.name,
|
|
enabled: account.enabled,
|
|
configured: account.configured,
|
|
extra: {
|
|
baseUrl: account.baseUrl || "[missing]",
|
|
botUserId: account.botUserId,
|
|
},
|
|
}),
|
|
});
|