Skip to content

Not for merging: Code updates for evals #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
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 @@ -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,
};
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 @@ -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,
};
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
2 changes: 2 additions & 0 deletions src/extension/prompts/node/agent/agentInstructions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export class DefaultAgentPrompt extends PromptElement<DefaultAgentPromptProps> {
<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 />
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.<br />
Do not ask the user any questions, just answer the user's question and perform the task they asked you to do.<br />
{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.</>}<br />
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 />
Expand Down
Loading