feat: register claude-code provider

This commit is contained in:
Ivanko1608
2026-10-25 02:04:22 +04:00
parent c41c5f3132
commit 2b2cf79b9a
3 changed files with 32 additions and 3 deletions
+3
View File
@@ -12,6 +12,8 @@ import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
import { type ModelRole } from "../../config.ts";
import { DEFAULT_THINKING_ORDER } from "../core/settings.ts";
import packageMetadata from "../../package.json" with { type: "json" };
import { createClaudeCodeProvider } from "./claude-code/provider.ts";
import { streamClaudeCode } from "./claude-code/stream.ts";
/** App identity is immutable and shared by Models and every native Agent.
* Agent's default Pi attribution otherwise overrides the Models identity. */
@@ -57,6 +59,7 @@ export function piModels() {
if (!collection) {
collection = createModels({ identity: APP_IDENTITY });
for (const provider of builtinProviders()) collection.setProvider(provider);
collection.setProvider(createClaudeCodeProvider(streamClaudeCode));
}
return collection;
}