Files
pi-plan/test/fixtures/offline-model.ts
T
wassname2 3636953eda Port native goals workers and checkpoint report review workflow
Use Nico project panes, session-scoped scheduler integration and plan-owned reviewed status. Compact the goal footer and add history-backed report review with verified saved delivery.

Dogfooding checkpoint: ownership rebinding, broader report ingestion and native review UAT remain unfinished. Verified 139 tests, typecheck, lint and diff-check.
2026-09-15 14:30:27 +08:00

23 lines
800 B
TypeScript

import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
import { workerAttachment } from "../../src/prompts.js";
export default function offlineModel(pi: ExtensionAPI): void {
pi.registerCommand("fixture-attachment-notice", {
handler: (_args, ctx) => pi.sendMessage({ customType: "pi-goals-supervision", content: workerAttachment(ctx.cwd, "fixture-peer", "Attachment recorded."), display: true }, { triggerTurn: false }),
});
pi.registerProvider("offline", {
baseUrl: process.env.PI_GOALS_OFFLINE_MODEL_URL!,
apiKey: "test",
api: "openai-completions",
models: [{
id: "test",
name: "Offline test model",
reasoning: false,
input: ["text"],
contextWindow: 16_000,
maxTokens: 1_000,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
}],
});
}