port: sync from Mike/pygienium@f01d4c22
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user