feat(coding-agent): configure isolated task apply behavior
This commit is contained in:
@@ -160,6 +160,7 @@ export function formatResultOutputFallback(result: Pick<SingleResult, "output" |
|
||||
function renderDescription(
|
||||
agents: AgentDefinition[],
|
||||
isolationEnabled: boolean,
|
||||
applyIsolatedChanges: boolean,
|
||||
disabledAgents: string[],
|
||||
batchEnabled: boolean,
|
||||
asyncEnabled: boolean,
|
||||
@@ -187,6 +188,7 @@ function renderDescription(
|
||||
defaultAgent: spawnPolicy.defaultAgent,
|
||||
allowedAgentsText: spawnPolicy.allowedPromptText,
|
||||
isolationEnabled,
|
||||
applyIsolatedChanges,
|
||||
batchEnabled,
|
||||
asyncEnabled,
|
||||
hasBlockingAgents: renderedAgents.some(agent => agent.blocking),
|
||||
@@ -566,6 +568,7 @@ export class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskToolDetai
|
||||
return renderDescription(
|
||||
this.#discoveredAgents,
|
||||
!planMode && isolationMode !== "none",
|
||||
this.session.settings.get("task.isolation.apply"),
|
||||
disabledAgents,
|
||||
this.#isBatchEnabled(),
|
||||
this.session.settings.get("async.enabled"),
|
||||
|
||||
@@ -300,7 +300,9 @@ export async function resolveEffectiveSubagentPolicy(
|
||||
planMode,
|
||||
isIsolated,
|
||||
mergeMode: request.isolation?.merge ?? request.session.settings.get("task.isolation.merge"),
|
||||
applyChanges: request.isolation?.apply !== false,
|
||||
applyChanges:
|
||||
request.isolation?.apply ??
|
||||
(request.invocationKind === "task" ? request.session.settings.get("task.isolation.apply") : true),
|
||||
enableLsp:
|
||||
!planMode &&
|
||||
(request.enableLsp ?? ((request.session.enableLsp ?? true) && request.session.settings.get("task.enableLsp"))),
|
||||
|
||||
Reference in New Issue
Block a user