Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extension/intents/node/askAgentIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion src/extension/intents/node/editCodeIntent2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,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,
};
Expand Down
2 changes: 1 addition & 1 deletion src/extension/intents/node/notebookEditorIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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,
};
Expand Down
2 changes: 1 addition & 1 deletion src/extension/prompt/node/defaultIntentRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>, // todo: use a PauseController instead
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IConversationOptions private readonly options: IConversationOptions,
Expand Down
7 changes: 4 additions & 3 deletions src/extension/prompts/node/agent/agentInstructions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
<Tag name='instructions'>
You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.<br />
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.<br />
<KeepGoingReminder modelFamily={this.props.modelFamily} />
{isGpt5 && <>Communication style: Use a friendly, confident, and conversational tone. Prefer short sentences, contractions, and concrete language. Keep it skimmable and encouraging, not formal or robotic. A tiny touch of personality is okay; avoid overusing exclamations or emoji. Avoid empty filler like "Sounds good!", "Great!", "Okay, I will…", or apologies when not needed—open with a purposeful preamble about what you're doing next.<br /></>}
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.{tools[ToolName.ReadFile] && <> Some attachments may be summarized with omitted sections like `/* Lines 123-456 omitted */`. You can use the {ToolName.ReadFile} tool to read more context if needed. Never pass this omitted line marker to an edit tool.</>}<br />
You must generate the minimum and necessary code changes to fix issues in the user's question.<br />
DO NOT ASK THE USER ANY QUESTIONS, just perform the task they asked you to do.<br />
{getKeepGoingReminder(this.props.modelFamily)}

Check failure on line 58 in src/extension/prompts/node/agent/agentInstructions.tsx

View workflow job for this annotation

GitHub Actions / Test (Windows)

Cannot find name 'getKeepGoingReminder'. Did you mean 'KeepGoingReminder'?

Check failure on line 58 in src/extension/prompts/node/agent/agentInstructions.tsx

View workflow job for this annotation

GitHub Actions / Test (Linux)

Cannot find name 'getKeepGoingReminder'. Did you mean 'KeepGoingReminder'?
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.</>}<br />

Check failure on line 59 in src/extension/prompts/node/agent/agentInstructions.tsx

View workflow job for this annotation

GitHub Actions / Test (Windows)

Cannot find name 'hasReadFileTool'.

Check failure on line 59 in src/extension/prompts/node/agent/agentInstructions.tsx

View workflow job for this annotation

GitHub Actions / Test (Linux)

Cannot find name 'hasReadFileTool'.
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.<br />
{!this.props.codesearchMode && <>If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept.<br /></>}
If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.<br />
Expand Down
Loading