|
7 | 7 | import { renderPrompt } from '@vscode/prompt-tsx'; |
8 | 8 | import * as vscode from 'vscode'; |
9 | 9 | import { Disposable } from '../common/lifecycle'; |
10 | | -import { CodingAgentPrompt, ParticipantsPrompt } from './participantsPrompt'; |
| 10 | +import { ParticipantsPrompt } from './participantsPrompt'; |
11 | 11 | import { IToolCall, TOOL_COMMAND_RESULT, TOOL_MARKDOWN_RESULT } from './tools/toolsUtils'; |
12 | 12 |
|
13 | 13 | export class ChatParticipantState { |
@@ -76,26 +76,22 @@ export class ChatParticipant extends Disposable { |
76 | 76 | ): Promise<void> { |
77 | 77 | this.state.reset(); |
78 | 78 |
|
79 | | - const useCodingAgent = request.command && request.command === 'codingAgent'; |
80 | 79 | const models = await vscode.lm.selectChatModels({ |
81 | 80 | vendor: 'copilot', |
82 | 81 | family: 'gpt-4o' |
83 | 82 | }); |
84 | 83 | const model = models[0]; |
85 | 84 |
|
86 | | - const allTools = (useCodingAgent |
87 | | - ? vscode.lm.tools |
88 | | - .filter(tool => tool.name === 'github-pull-request_copilot-coding-agent') |
89 | | - : vscode.lm.tools).map((tool): vscode.LanguageModelChatTool => { |
90 | | - return { |
91 | | - name: tool.name, |
92 | | - description: tool.description, |
93 | | - inputSchema: tool.inputSchema ?? {} |
94 | | - }; |
95 | | - }); |
| 85 | + const allTools = vscode.lm.tools.map((tool): vscode.LanguageModelChatTool => { |
| 86 | + return { |
| 87 | + name: tool.name, |
| 88 | + description: tool.description, |
| 89 | + inputSchema: tool.inputSchema ?? {} |
| 90 | + }; |
| 91 | + }); |
96 | 92 |
|
97 | 93 | const { messages } = await renderPrompt( |
98 | | - useCodingAgent ? CodingAgentPrompt : ParticipantsPrompt, |
| 94 | + ParticipantsPrompt, |
99 | 95 | { userMessage: request.prompt }, |
100 | 96 | { modelMaxPromptTokens: model.maxInputTokens }, |
101 | 97 | model); |
|
0 commit comments