diff --git a/src/extension/intents/node/askAgentIntent.ts b/src/extension/intents/node/askAgentIntent.ts index b6b64c545..98b4f513e 100644 --- a/src/extension/intents/node/askAgentIntent.ts +++ b/src/extension/intents/node/askAgentIntent.ts @@ -62,7 +62,7 @@ export class AskAgentIntent implements IIntent { private getIntentHandlerOptions(request: vscode.ChatRequest): IDefaultIntentRequestHandlerOptions | undefined { return { - maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 15, + maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 200, temperature: this.configurationService.getConfig(ConfigKey.Internal.AgentTemperature) ?? 0, overrideRequestLocation: ChatLocation.EditingSession, }; diff --git a/src/extension/intents/node/editCodeIntent2.ts b/src/extension/intents/node/editCodeIntent2.ts index 78bb26547..26a038820 100644 --- a/src/extension/intents/node/editCodeIntent2.ts +++ b/src/extension/intents/node/editCodeIntent2.ts @@ -77,7 +77,7 @@ export class EditCode2Intent extends EditCodeIntent { protected override getIntentHandlerOptions(request: vscode.ChatRequest): IDefaultIntentRequestHandlerOptions | undefined { return { - maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 15, + maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 200, temperature: this.configurationService.getConfig(ConfigKey.Internal.AgentTemperature) ?? 0, overrideRequestLocation: ChatLocation.EditingSession, }; diff --git a/src/extension/intents/node/notebookEditorIntent.ts b/src/extension/intents/node/notebookEditorIntent.ts index 6bac92cf0..150fb0537 100644 --- a/src/extension/intents/node/notebookEditorIntent.ts +++ b/src/extension/intents/node/notebookEditorIntent.ts @@ -81,7 +81,7 @@ export class NotebookEditorIntent extends EditCodeIntent { protected override getIntentHandlerOptions(request: vscode.ChatRequest): IDefaultIntentRequestHandlerOptions | undefined { return { - maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 15, + maxToolCallIterations: getRequestedToolCallIterationLimit(request) ?? this.configurationService.getNonExtensionConfig('chat.agent.maxRequests') ?? 200, temperature: this.configurationService.getConfig(ConfigKey.Internal.AgentTemperature) ?? 0, overrideRequestLocation: ChatLocation.Notebook, }; diff --git a/src/extension/prompt/node/defaultIntentRequestHandler.ts b/src/extension/prompt/node/defaultIntentRequestHandler.ts index e0373000a..a422e70b5 100644 --- a/src/extension/prompt/node/defaultIntentRequestHandler.ts +++ b/src/extension/prompt/node/defaultIntentRequestHandler.ts @@ -82,7 +82,7 @@ export class DefaultIntentRequestHandler { protected readonly documentContext: IDocumentContext | undefined, private readonly location: ChatLocation, private readonly chatTelemetryBuilder: ChatTelemetryBuilder, - private readonly handlerOptions: IDefaultIntentRequestHandlerOptions = { maxToolCallIterations: 15 }, + private readonly handlerOptions: IDefaultIntentRequestHandlerOptions = { maxToolCallIterations: 200 }, private readonly onPaused: Event, // todo: use a PauseController instead @IInstantiationService private readonly _instantiationService: IInstantiationService, @IConversationOptions private readonly options: IConversationOptions, diff --git a/src/extension/prompts/node/agent/agentInstructions.tsx b/src/extension/prompts/node/agent/agentInstructions.tsx index 49a83e939..9c1e48854 100644 --- a/src/extension/prompts/node/agent/agentInstructions.tsx +++ b/src/extension/prompts/node/agent/agentInstructions.tsx @@ -39,6 +39,8 @@ export class DefaultAgentPrompt extends PromptElement { You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.
The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.
+ You must not only answer the user's question but also generate the minimum and necessary code changes to fix issues in the user's question.
+ Do not ask the user any questions, just answer the user's question and perform the task they asked you to do.
{getKeepGoingReminder(this.props.modelFamily)} You will be given some context and attachments along with the user prompt. You can use them if they are relevant to the task, and ignore them if not.{hasReadFileTool && <> Some attachments may be summarized. You can use the {ToolName.ReadFile} tool to read more context, but only do this if the attached file is incomplete.}
If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes.