Skip to content

rm task tools #357

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

Merged
merged 6 commits into from
Jul 24, 2025
Merged
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
138 changes: 1 addition & 137 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"icon": "assets/copilot.png",
"pricing": "Trial",
"engines": {
"vscode": "^1.103.0-20250721",
"vscode": "^1.103.0-20250725",
"npm": ">=9.0.0",
"node": ">=22.14.0"
},
Expand Down Expand Up @@ -390,35 +390,6 @@
]
}
},
{
"name": "copilot_getTaskOutput",
"toolReferenceName": "getTaskOutput",
"displayName": "%copilot.tools.getTaskOutput.name%",
"modelDescription": "Retrieves the output of a VS Code task.\n- Use this tool when the user is trying to understand the current project state, debug issues, or analyze task-related errors, output, or status.",
"tags": [],
"when": "!config.chat.agent.terminal.newTaskToolsEnabled",
"inputSchema": {
"type": "object",
"properties": {
"workspaceFolder": {
"type": "string",
"description": "The workspace folder path containing the task"
},
"id": {
"type": "string",
"description": "The task ID to run."
},
"maxCharsToRetrieve": {
"type": "number",
"description": "The maximum number of characters to retrieve from the terminal output."
}
},
"required": [
"id",
"workspaceFolder"
]
}
},
{
"name": "copilot_getErrors",
"displayName": "%copilot.tools.getErrors.name%",
Expand Down Expand Up @@ -567,80 +538,6 @@
"enable_other_tool_get_project_setup_info"
]
},
{
"name": "copilot_createAndRunTask",
"displayName": "%github.copilot.tools.createAndRunTask.name%",
"toolReferenceName": "createAndRunTask",
"canBeReferencedInPrompt": false,
"icon": "$(json)",
"userDescription": "%github.copilot.tools.createAndRunTask.userDescription%",
"when": "config.github.copilot.chat.agent.runTasks",
"modelDescription": "For a workspace, this tool will create a task based on the package.json, README.md, and project structure so that the project can be built and run.",
"inputSchema": {
"type": "object",
"properties": {
"workspaceFolder": {
"type": "string",
"description": "The absolute path of the workspace folder where the tasks.json file will be created."
},
"task": {
"type": "object",
"description": "The task to add to the new tasks.json file.",
"properties": {
"label": {
"type": "string",
"description": "The label of the task."
},
"type": {
"type": "string",
"description": "The type of the task. The only supported value is 'shell'.",
"enum": [
"shell"
]
},
"command": {
"type": "string",
"description": "The shell command to run for the task. Use this to specify commands for building or running the application."
},
"args": {
"type": "array",
"description": "The arguments to pass to the command.",
"items": {
"type": "string"
}
},
"isBackground": {
"type": "boolean",
"description": "Whether the task runs in the background without blocking the UI or other tasks. Set to true for long-running processes like watch tasks or servers that should continue executing without requiring user attention. When false, the task will block the terminal until completion."
},
"problemMatcher": {
"type": "array",
"description": "The problem matcher to use to parse task output for errors and warnings. Can be a predefined matcher like '$tsc' (TypeScript), '$eslint-stylish', '$gcc', etc., or a custom pattern defined in tasks.json. This helps VS Code display errors in the Problems panel and enables quick navigation to error locations.",
"items": {
"type": "string"
}
},
"group": {
"type": "string",
"description": "The group to which the task belongs."
}
},
"required": [
"label",
"type",
"command"
]
}
},
"required": [
"task",
"workspaceFolder"
]
},
"tags": [
"enable_other_tool_copilot_getProjectSetupInfo"
]
},
{
"name": "copilot_getProjectSetupInfo",
"displayName": "%github.copilot.tools.getProjectSetupInfo.name%",
Expand Down Expand Up @@ -743,30 +640,6 @@
},
"tags": []
},
{
"name": "copilot_runVsCodeTask",
"displayName": "runVsCodeTask",
"toolReferenceName": "runTask",
"modelDescription": "Runs a VS Code task.\n\n- If you see that an appropriate task exists for building or running code, prefer to use this tool to run the task instead of using the run_in_terminal tool.\n- Make sure that any appropriate build or watch task is running before trying to run tests or execute code.\n- If the user asks to run a task, use this tool to do so.",
"when": "!config.chat.agent.terminal.newTaskToolsEnabled",
"inputSchema": {
"type": "object",
"properties": {
"workspaceFolder": {
"type": "string",
"description": "The workspace folder path containing the task"
},
"id": {
"type": "string",
"description": "The task ID to run."
}
},
"required": [
"workspaceFolder",
"id"
]
}
},
{
"name": "copilot_insertEdit",
"toolReferenceName": "insertEdit",
Expand Down Expand Up @@ -1192,15 +1065,6 @@
"getProjectSetupInfo",
"installExtension"
]
},
{
"name": "runTasks",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this registered from core now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like I need to rename that runTasks, will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"description": "%copilot.toolSet.runTasks.description%",
"tools": [
"createAndRunTask",
"runTask",
"getTaskOutput"
]
}
],
"chatParticipants": [
Expand Down
2 changes: 1 addition & 1 deletion src/extension/intents/node/agentIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const getTools = (instaService: IInstantiationService, request: vscode.ChatReque
}

allowTools[ToolName.RunTests] = await testService.hasAnyTests();
allowTools[ToolName.RunTask] = !!(configurationService.getConfig(ConfigKey.AgentCanRunTasks) && tasksService.getTasks().length);
allowTools[ToolName.CoreCreateAndRunTask] = !!(configurationService.getConfig(ConfigKey.AgentCanRunTasks) && tasksService.getTasks().length);

return toolsService.getEnabledTools(request, tool => {
if (typeof allowTools[tool.name] === 'boolean') {
Expand Down
2 changes: 1 addition & 1 deletion src/extension/prompts/node/agent/agentPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ class AgentTasksInstructions extends PromptElement {
}

return <>
The following tasks can be executed using the {ToolName.CoreRunTask} or {ToolName.RunTask} tool if they are not already running:<br />
The following tasks can be executed using the {ToolName.CoreRunTask} tool if they are not already running:<br />
{taskGroups.map(([folder, tasks]) =>
<Tag name='workspaceFolder' attrs={{ path: this._promptPathRepresentationService.getFilePath(folder) }}>
{tasks.map((t, i) => {
Expand Down
12 changes: 3 additions & 9 deletions src/extension/tools/common/toolNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const enum ToolName {
CreateNewJupyterNotebook = 'create_new_jupyter_notebook',
SearchWorkspaceSymbols = 'search_workspace_symbols',
Usages = 'list_code_usages',
RunTask = 'run_vs_code_task',
EditFile = 'insert_edit_into_file',
CreateFile = 'create_file',
ReplaceString = 'replace_string_in_file',
Expand All @@ -41,16 +40,16 @@ export const enum ToolName {
SearchViewResults = 'get_search_view_results',
DocInfo = 'get_doc_info',
GithubRepo = 'github_repo',
CreateAndRunTask = 'create_and_run_task',
SimpleBrowser = 'open_simple_browser',
CreateDirectory = 'create_directory',
RunVscodeCmd = 'run_vscode_command',
GetTaskOutput = 'get_task_output',

CoreRunInTerminal = 'run_in_terminal',
CoreGetTerminalOutput = 'get_terminal_output',
CoreRunTask = 'run__task',
CoreGetTaskOutput = 'get_task_output2',
CoreCreateAndRunTask = 'create_and_run_task',
CoreRunTask = 'run_task',
CoreGetTaskOutput = 'get_task_output',
}

// When updating this, also update contributedToolNameToToolNames
Expand All @@ -76,7 +75,6 @@ export const enum ContributedToolName {
TerminalLastCommand = 'copilot_getTerminalLastCommand',
CreateNewWorkspace = 'copilot_createNewWorkspace',
CreateNewJupyterNotebook = 'copilot_createNewJupyterNotebook',
RunTask = 'copilot_runVsCodeTask',
EditFile = 'copilot_insertEdit',
CreateFile = 'copilot_createFile',
ReplaceString = 'copilot_replaceString',
Expand All @@ -95,7 +93,6 @@ export const enum ContributedToolName {
SimpleBrowser = 'copilot_openSimpleBrowser',
CreateDirectory = 'copilot_createDirectory',
RunVscodeCmd = 'copilot_runVscodeCommand',
GetTaskOutput = 'copilot_getTaskOutput'
}

const contributedToolNameToToolNames = new Map<ContributedToolName, ToolName>([
Expand All @@ -119,7 +116,6 @@ const contributedToolNameToToolNames = new Map<ContributedToolName, ToolName>([
[ContributedToolName.TerminalLastCommand, ToolName.TerminalLastCommand],
[ContributedToolName.CreateNewWorkspace, ToolName.CreateNewWorkspace],
[ContributedToolName.CreateNewJupyterNotebook, ToolName.CreateNewJupyterNotebook],
[ContributedToolName.RunTask, ToolName.RunTask],
[ContributedToolName.InstallExtension, ToolName.InstallExtension],
[ContributedToolName.Think, ToolName.Think],
[ContributedToolName.FetchWebPage, ToolName.FetchWebPage],
Expand All @@ -133,11 +129,9 @@ const contributedToolNameToToolNames = new Map<ContributedToolName, ToolName>([
[ContributedToolName.GetProjectSetupInfo, ToolName.GetProjectSetupInfo],
[ContributedToolName.SearchViewResults, ToolName.SearchViewResults],
[ContributedToolName.GithubRepo, ToolName.GithubRepo],
[ContributedToolName.CreateAndRunTask, ToolName.CreateAndRunTask],
[ContributedToolName.SimpleBrowser, ToolName.SimpleBrowser],
[ContributedToolName.CreateDirectory, ToolName.CreateDirectory],
[ContributedToolName.RunVscodeCmd, ToolName.RunVscodeCmd],
[ContributedToolName.GetTaskOutput, ToolName.GetTaskOutput]
]);

const toolNameToContributedToolNames = new Map<ToolName, ContributedToolName>();
Expand Down
3 changes: 0 additions & 3 deletions src/extension/tools/node/allTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ import './findTextInFilesTool';
import './getErrorsTool';
import './getNotebookCellOutputTool';
import './getSearchViewResultsTool';
import './getTaskOutputTool';
import './githubRepoTool';
import './insertEditTool';
import './installExtensionTool';
import './listDirTool';
import './newNotebookTool';
import './newWorkspace/createAndRunTaskTool';
import './newWorkspace/newWorkspaceTool';
import './newWorkspace/projectSetupInfoTool';
import './notebookSummaryTool';
import './readFileTool';
import './readProjectStructureTool';
import './replaceStringTool';
import './runNotebookCellTool';
import './runTaskTool';
import './scmChangesTool';
import './searchWorkspaceSymbolsTool';
import './simpleBrowserTool';
Expand Down
92 changes: 0 additions & 92 deletions src/extension/tools/node/getTaskOutputTool.tsx

This file was deleted.

Loading