feat: register claude-code provider
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user