mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
This aligns Weixin/WhatsApp with admin-managed model routing by adding channel/account-level specialist controls, improves OSS startup resilience by skipping missing sidecars gracefully, and refreshes runbook/readme guidance for the new default behavior and Weixin OpenAI-key silent handling. Made-with: Cursor
13 lines
415 B
TypeScript
13 lines
415 B
TypeScript
import path from "node:path";
|
|
import { useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
|
|
export type AuthState = Awaited<ReturnType<typeof useMultiFileAuthState>>;
|
|
|
|
export function resolveAuthDir(stateDir: string): string {
|
|
return path.join(stateDir, "auth");
|
|
}
|
|
|
|
export async function loadAuthState(stateDir: string): Promise<AuthState> {
|
|
return await useMultiFileAuthState(resolveAuthDir(stateDir));
|
|
}
|
|
|