port: sync from Mike/pygienium@bff187da
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
|
||||
import { rm } from "node:fs/promises";
|
||||
import { resolve, join } from "node:path";
|
||||
import type { ExtensionUIContext } from "@oh-my-pi/pi-coding-agent";
|
||||
import type {
|
||||
ExtensionCommandContext,
|
||||
ExtensionUIContext,
|
||||
} from "@oh-my-pi/pi-coding-agent";
|
||||
import type { CheckDefinition, CheckScope } from "../checks/registry.js";
|
||||
import { runAgentTask } from "../agent-runner.js";
|
||||
import { runRecon } from "../recon.js";
|
||||
@@ -84,6 +87,12 @@ export interface RunCheckOptions {
|
||||
ui?: ExtensionUIContext;
|
||||
/** Whether dialog-capable UI is available. */
|
||||
hasUI?: boolean;
|
||||
/**
|
||||
* The currently selected model from the invoking session; forwarded to
|
||||
* each sub-agent so scans run on the model the user picked, not the
|
||||
* settings default.
|
||||
*/
|
||||
model?: ExtensionCommandContext["model"];
|
||||
/** Pre-existing run state to update (for `/pygienium-all` and resume). */
|
||||
existingState?: RunState;
|
||||
/** Optional callback to post completion messages into the chat. */
|
||||
@@ -278,6 +287,7 @@ async function runCheckImplInner(
|
||||
cwd: scope.target,
|
||||
agentName: check.agentName,
|
||||
task: scanTask,
|
||||
model: opts.model,
|
||||
onEvent: forward(PHASE_ANALYSIS),
|
||||
});
|
||||
findings = scanResult.text;
|
||||
@@ -310,6 +320,7 @@ async function runCheckImplInner(
|
||||
cwd: scope.target,
|
||||
agentName: check.fixAgentName ?? "fixer",
|
||||
task: fixTask,
|
||||
model: opts.model,
|
||||
onEvent: forward(PHASE_FIX),
|
||||
});
|
||||
changes = fixResult.text;
|
||||
|
||||
Reference in New Issue
Block a user