Skip to content

Commit 5dc4178

Browse files
authored
introduce copilot-fast (#1666)
1 parent 54730c0 commit 5dc4178

File tree

24 files changed

+32
-33
lines changed

24 files changed

+32
-33
lines changed

src/extension/conversation/vscode-node/terminalFixGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class TerminalQuickFixGenerator {
158158
}
159159
}
160160

161-
const endpoint = await this._endpointProvider.getChatEndpoint('gpt-4o-mini');
161+
const endpoint = await this._endpointProvider.getChatEndpoint('copilot-fast');
162162

163163
const promptRenderer = PromptRenderer.create(this._instantiationService, endpoint, TerminalQuickFixPrompt, {
164164
commandLine: commandMatchResult.commandLine,
@@ -216,7 +216,7 @@ class TerminalQuickFixGenerator {
216216
}
217217

218218
private async _generateTerminalQuickFixFileContext(commandMatchResult: vscode.TerminalCommandMatchResult, token: CancellationToken) {
219-
const endpoint = await this._endpointProvider.getChatEndpoint('gpt-4o-mini');
219+
const endpoint = await this._endpointProvider.getChatEndpoint('copilot-fast');
220220

221221
const promptRenderer = PromptRenderer.create(this._instantiationService, endpoint, TerminalQuickFixFileContextPrompt, {
222222
commandLine: commandMatchResult.commandLine,

src/extension/intents/node/generateNewWorkspaceContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class NewWorkspaceContentGenerator {
2020
) { }
2121

2222
public async generate(promptArgs: NewWorkspaceContentsPromptProps, token: CancellationToken): Promise<string> {
23-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
23+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
2424
const promptRenderer = PromptRenderer.create(this.instantiationService, endpoint, this.promptType, promptArgs);
2525
const prompt = await promptRenderer.render();
2626

src/extension/intents/node/searchKeywordsIntent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class SearchKeywordsIntent implements IIntent {
5555

5656
async invoke(invocationContext: IIntentInvocationContext): Promise<IIntentInvocation> {
5757
const location = invocationContext.location;
58-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
58+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
5959
return this.instantiationService.createInstance(SearchKeywordsIntentInvocation, this, location, endpoint);
6060
}
6161
}

src/extension/intents/node/testIntent/userQueryParser.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class UserQueryParser {
3232
) { }
3333

3434
public async parse(query: string): Promise<ParsedUserQuery | null> {
35-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
35+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
3636
const promptRenderer = PromptRenderer.create(
3737
this.instantiationService,
3838
endpoint,

src/extension/prompt/node/githubPullRequestTitleAndDescriptionGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class GitHubPullRequestTitleAndDescriptionGenerator implements TitleAndDe
8080
const issues: { reference: string; content: string }[] | undefined = context.issues;
8181
const template: string | undefined = context.template;
8282

83-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
83+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
8484
const charLimit = Math.floor((endpoint.modelMaxPromptTokens * 4) / 3);
8585

8686
const prompt = await this.createPRTitleAndDescriptionPrompt(commitMessages, patches, issues, template, charLimit);
@@ -189,7 +189,7 @@ export class GitHubPullRequestTitleAndDescriptionGenerator implements TitleAndDe
189189
}
190190
}
191191

192-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
192+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
193193
const promptRenderer = PromptRenderer.create(this.instantiationService, endpoint, GitHubPullRequestPrompt, { commitMessages, issues, patches, template });
194194
return promptRenderer.render(undefined, undefined);
195195
}

src/extension/prompt/node/intentDetector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class IntentDetector implements ChatParticipantDetectionProvider {
181181

182182
this.logService.trace('Building intent detector');
183183

184-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
184+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
185185

186186
const preferredIntent = await this.getPreferredIntent(location, documentContext, history, messageText);
187187

@@ -254,7 +254,7 @@ export class IntentDetector implements ChatParticipantDetectionProvider {
254254
history: Turn[] = [],
255255
document?: TextDocumentSnapshot
256256
) {
257-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
257+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
258258

259259
const { messages: currentSelection } = await renderPromptElement(this.instantiationService, endpoint, CurrentSelection, { document });
260260
const { messages: conversationHistory } = await renderPromptElement(this.instantiationService, endpoint, ConversationHistory, { history, priority: 1000 }, undefined, undefined).catch(() => ({ messages: [] }));

src/extension/prompt/node/summarizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class ChatSummarizerProvider implements vscode.ChatSummarizer {
3434
return '';
3535
}
3636

37-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
37+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
3838
const promptContext: IBuildPromptContext = {
3939
requestId: 'chat-summary',
4040
query: '',

src/extension/prompt/node/title.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class ChatTitleProvider implements vscode.ChatTitleProvider {
3131
return '';
3232
}
3333

34-
const endpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
34+
const endpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
3535
const { messages } = await renderPromptElement(this.instantiationService, endpoint, TitlePrompt, { history: turns });
3636
const response = await endpoint.makeChatRequest(
3737
'title',

src/extension/prompts/node/panel/chatVariables.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export class ChatToolReferences extends PromptElement<ChatToolCallProps, void> {
353353
continue;
354354
}
355355

356-
const toolArgsEndpoint = await this.endpointProvider.getChatEndpoint('gpt-4o-mini');
356+
const toolArgsEndpoint = await this.endpointProvider.getChatEndpoint('copilot-fast');
357357
const internalToolArgs = toolReference.input ?? {};
358358
const toolArgs = await this.fetchToolArgs(tool, toolArgsEndpoint);
359359

src/extension/prompts/node/panel/newWorkspace/newWorkspace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class NewWorkspacePrompt extends PromptElement<NewWorkspacePromptProps, N
7979
}
8080

8181
progress?.report(new ChatResponseProgressPart(l10n.t('Determining user intent...')));
82-
const endpoint = await this.endPointProvider.getChatEndpoint('gpt-4o-mini');
82+
const endpoint = await this.endPointProvider.getChatEndpoint('copilot-fast');
8383
const { messages } = await buildNewWorkspaceMetaPrompt(this.instantiationService, endpoint, this.props.promptContext);
8484

8585
if (token.isCancellationRequested) {

0 commit comments

Comments
 (0)