This commit is contained in:
omp-port
2026-10-20 21:44:51 +00:00
parent 350ca5435a
commit 83514f01c6
7 changed files with 90 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ import type {
ExtensionUIContext,
} from "@oh-my-pi/pi-coding-agent";
import type { CheckDefinition, CheckScope } from "../checks/registry.js";
import { runAgentTask } from "../agent-runner.js";
import { runAgentTask, type ProviderRegistry } from "../agent-runner.js";
import { runRecon } from "../recon.js";
import {
createPhaseStrip,
@@ -93,6 +93,12 @@ export interface RunCheckOptions {
* settings default.
*/
model?: ExtensionCommandContext["model"];
/**
* The invoking session's provider registry; carried into every sub-agent so a
* provider only an extension registered stays resolvable (see
* `providerForwardingExtension` in `agent-runner.ts`).
*/
modelRegistry?: ProviderRegistry;
/** Pre-existing run state to update (for `/pygienium-all` and resume). */
existingState?: RunState;
/** Optional callback to post completion messages into the chat. */
@@ -288,6 +294,7 @@ async function runCheckImplInner(
agentName: check.agentName,
task: scanTask,
model: opts.model,
modelRegistry: opts.modelRegistry,
onEvent: forward(PHASE_ANALYSIS),
});
findings = scanResult.text;
@@ -321,6 +328,7 @@ async function runCheckImplInner(
agentName: check.fixAgentName ?? "fixer",
task: fixTask,
model: opts.model,
modelRegistry: opts.modelRegistry,
onEvent: forward(PHASE_FIX),
});
changes = fixResult.text;