Linter rules.

This commit is contained in:
Christian Gunderman
2026-03-13 12:21:17 -07:00
parent 6d44d3f0a3
commit b2a323f8ef
4 changed files with 18 additions and 13 deletions

View File

@@ -134,7 +134,7 @@ export class CoreToolScheduler {
this.onAllToolCallsComplete = options.onAllToolCallsComplete;
this.onToolCallsUpdate = options.onToolCallsUpdate;
this.getPreferredEditor = options.getPreferredEditor;
this.toolExecutor = new ToolExecutor(this.context.config);
this.toolExecutor = new ToolExecutor(this.context);
this.toolModifier = new ToolModificationHandler();
// Subscribe to message bus for ASK_USER policy decisions

View File

@@ -7,7 +7,7 @@
import { describe, it, expect, vi } from 'vitest';
import { CoreToolScheduler } from './coreToolScheduler.js';
import type { ToolCall, ErroredToolCall } from '../scheduler/types.js';
import type { Config, ToolRegistry } from '../index.js';
import type { Config, ToolRegistry, AgentLoopContext } from '../index.js';
import {
ApprovalMode,
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
@@ -118,7 +118,11 @@ describe('CoreToolScheduler Hooks', () => {
const onAllToolCallsComplete = vi.fn();
const scheduler = new CoreToolScheduler({
config: mockConfig,
context: {
config: mockConfig,
messageBus: mockMessageBus,
toolRegistry,
} as unknown as AgentLoopContext,
onAllToolCallsComplete,
getPreferredEditor: () => 'vscode',
});
@@ -188,7 +192,11 @@ describe('CoreToolScheduler Hooks', () => {
const onAllToolCallsComplete = vi.fn();
const scheduler = new CoreToolScheduler({
config: mockConfig,
context: {
config: mockConfig,
messageBus: mockMessageBus,
toolRegistry,
} as unknown as AgentLoopContext,
onAllToolCallsComplete,
getPreferredEditor: () => 'vscode',
});
@@ -261,7 +269,11 @@ describe('CoreToolScheduler Hooks', () => {
const onAllToolCallsComplete = vi.fn();
const scheduler = new CoreToolScheduler({
config: mockConfig,
context: {
config: mockConfig,
messageBus: mockMessageBus,
toolRegistry,
} as unknown as AgentLoopContext,
onAllToolCallsComplete,
getPreferredEditor: () => 'vscode',
});

View File

@@ -584,7 +584,6 @@ export class Scheduler {
this.state.updateStatus(
callId,
CoreToolCallStatus.Error,
signal,
createErrorResponse(
toolCall.request,
hookResult.error,

View File

@@ -18,7 +18,6 @@ import { buildParamArgsPattern } from '../policy/utils.js';
import type { MessageBus } from '../confirmation-bus/message-bus.js';
import { ToolErrorType } from './tool-error.js';
import { getErrorMessage } from '../utils/errors.js';
import { ApprovalMode } from '../policy/types.js';
import { getResponseText } from '../utils/partUtils.js';
import { fetchWithTimeout, isPrivateIp } from '../utils/fetch.js';
import { truncateString } from '../utils/textUtils.js';
@@ -465,11 +464,6 @@ ${aggregatedContent}
protected override async getConfirmationDetails(
_abortSignal: AbortSignal,
): Promise<ToolCallConfirmationDetails | false> {
// Check for AUTO_EDIT approval mode. This tool has a specific behavior
// where ProceedAlways switches the entire session to AUTO_EDIT.
if (this.context.config.getApprovalMode() === ApprovalMode.AUTO_EDIT) {
return false;
}
let urls: string[] = [];
let prompt = this.params.prompt || '';
@@ -878,7 +872,7 @@ export class WebFetchTool extends BaseDeclarativeTool<
_toolDisplayName?: string,
): ToolInvocation<WebFetchToolParams, ToolResult> {
return new WebFetchToolInvocation(
this.context.config,
this.context,
params,
messageBus,
_toolName,