Download src/plugin-sdk/config-paths.ts from shimen/shinclaw: direct link, hf CLI and curl.
- Browser
- Download file 668 Bytes
-
https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/plugin-sdk/config-paths.ts
- Command line
-
hf download hf://spaces/shimen/shinclaw/src/plugin-sdk/config-paths.ts
-
curl -L -o config-paths.ts https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/plugin-sdk/config-paths.ts
668 Bytes
| import type { OpenClawConfig } from "../config/config.js"; | |
| export function resolveChannelAccountConfigBasePath(params: { | |
| cfg: OpenClawConfig; | |
| channelKey: string; | |
| accountId: string; | |
| }): string { | |
| const channels = params.cfg.channels as unknown as Record<string, unknown> | undefined; | |
| const channelSection = channels?.[params.channelKey] as Record<string, unknown> | undefined; | |
| const accounts = channelSection?.accounts as Record<string, unknown> | undefined; | |
| const useAccountPath = Boolean(accounts?.[params.accountId]); | |
| return useAccountPath | |
| ? `channels.${params.channelKey}.accounts.${params.accountId}.` | |
| : `channels.${params.channelKey}.`; | |
| } | |