mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:41:25 +00:00
chore: update deps and pi model discovery
This commit is contained in:
14
src/agents/pi-model-discovery.ts
Normal file
14
src/agents/pi-model-discovery.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import path from "node:path";
|
||||
|
||||
import { AuthStorage, ModelRegistry } from "@mariozechner/pi-coding-agent";
|
||||
|
||||
// Compatibility helpers for pi-coding-agent 0.50+ (discover* helpers removed).
|
||||
export function discoverAuthStorage(agentDir: string): AuthStorage {
|
||||
return new AuthStorage(path.join(agentDir, "auth.json"));
|
||||
}
|
||||
|
||||
export function discoverModels(authStorage: AuthStorage, agentDir: string): ModelRegistry {
|
||||
return new ModelRegistry(authStorage, path.join(agentDir, "models.json"));
|
||||
}
|
||||
|
||||
export type { AuthStorage, ModelRegistry };
|
||||
Reference in New Issue
Block a user