Skip to content

Commit 0d60b58

Browse files
authored
remove unused language fields and clean up project setup info (#404)
* remove unused language fields and clean up project setup info * fix: add missing punctuation in instructions for clarity * Update cache * Remove cache layer file that requires signed commit * Update cache
1 parent c62bfff commit 0d60b58

9 files changed

+79
-173
lines changed

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,6 @@
550550
"projectType": {
551551
"type": "string",
552552
"description": "The type of project to create. Supported values are: 'python-script', 'python-project', 'mcp-server', 'model-context-protocol-server', 'vscode-extension', 'next-js', 'vite' and 'other'"
553-
},
554-
"language": {
555-
"type": "string",
556-
"description": "The programming language for the project. Supported: 'javascript', 'typescript', 'python' and 'other'."
557553
}
558554
},
559555
"required": [

src/extension/tools/node/newWorkspace/newWorkspaceTool.tsx

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ import * as l10n from '@vscode/l10n';
66
import { BasePromptElementProps, PromptElement, PromptElementProps, PromptSizing, TextChunk } from '@vscode/prompt-tsx';
77
import type { CancellationToken, LanguageModelToolInvocationOptions, LanguageModelToolInvocationPrepareOptions, PreparedToolInvocation, Uri } from 'vscode';
88
import { IRunCommandExecutionService } from '../../../../platform/commands/common/runCommandExecutionService';
9-
import { ConfigKey, IConfigurationService } from '../../../../platform/configuration/common/configurationService';
109
import { IDialogService } from '../../../../platform/dialog/common/dialogService';
1110
import { IVSCodeExtensionContext } from '../../../../platform/extContext/common/extensionContext';
1211
import { IFileSystemService } from '../../../../platform/filesystem/common/fileSystemService';
1312
import { IInteractiveSessionService } from '../../../../platform/interactive/common/interactiveSessionService';
14-
import { IPromptPathRepresentationService } from '../../../../platform/prompts/common/promptPathRepresentationService';
1513
import { IWorkspaceService } from '../../../../platform/workspace/common/workspaceService';
1614
import { CancellationError } from '../../../../util/vs/base/common/errors';
1715
import { extUri } from '../../../../util/vs/base/common/resources';
@@ -123,9 +121,7 @@ export class GetNewWorkspaceTool implements ICopilotTool<INewWorkspaceToolParams
123121
export class NewWorkspaceCreationResult extends PromptElement<NewWorkspaceElementProps> {
124122
constructor(
125123
props: PromptElementProps<NewWorkspaceElementProps>,
126-
@IPromptPathRepresentationService private readonly promptPathRepresentationService: IPromptPathRepresentationService,
127124
@IWorkspaceService private readonly workspaceService: IWorkspaceService,
128-
@IConfigurationService private readonly configurationService: IConfigurationService
129125
) {
130126
super(props);
131127
}
@@ -140,60 +136,71 @@ export class NewWorkspaceCreationResult extends PromptElement<NewWorkspaceElemen
140136
</TextChunk>;
141137
}
142138

143-
const useContext7 = this.configurationService.getConfig(ConfigKey.NewWorkspaceUseContext7);
144139
return <>
145140
<TextChunk>
146-
The user has opened the workspace folder {this.promptPathRepresentationService.getFilePath(workspaceUri)}<br />
147-
Follow the plan below to create a new project in the current VS Code workspace folder<br />
148-
Step 1: Create a `.github/copilot-instructions.md` with the following content as a markdown todo list<br />
149-
- If the user has requested a VS Code extension: Add a note at the top to use {ToolName.VSCodeAPI} tool<br />
150-
- If the user has requested an MCP server: Add a link at the top to https://modelcontextprotocol.io/llms-full.txt<br />
151-
- Include this comment at the top of the file {`<!-- Use this file to provide workspace-specific custom instructions to Copilot. For more details, visit https://code.visualstudio.com/docs/copilot/copilot-customization#_use-a-githubcopilotinstructionsmd-file -->`}<br />
152-
- Copy the entire markdown content below including all tasks and their comments exactly as shown<br />
153-
- If vscode_manageTodoList tool is available, use it to manage this checklist throughout the process<br />
154-
- After completing each step, mark it as done and update your progress (use vscode_manageTodoList if available)<br />
141+
Create or update the file `.github/copilot-instructions.md` with the exact content shown below.<br />
142+
<br />
155143
</TextChunk>
156144
<UnsafeCodeBlock code={`
145+
<!-- Use this file to provide workspace-specific custom instructions to Copilot. For more details, visit https://code.visualstudio.com/docs/copilot/copilot-customization#_use-a-githubcopilotinstructionsmd-file -->
146+
- [ ] Verify that .github/copilot-instructions.md is created.
147+
157148
- [ ] Clarify Project Requirements
158149
<!-- Ask for project type, language, and frameworks if not specified. Skip if already provided. -->
159150
160151
- [ ] Scaffold the Project
161152
<!--
162-
${useContext7 ? 'MANDATORY Context7 Usage: Call mcp_context7_resolve-library-id with your project requirements, then call mcp_context7_get-library-docs to get scaffolding instructions. Review the Context7 documentation carefully and use it to scaffold the project.' : 'Call project setup tool with projectType and language parameters.'}
153+
Ensure that the previous step has been marked as completed.
154+
Call project setup tool with projectType parameter.
163155
Run scaffolding command to create project files and folders.
164156
Use '.' as the working directory.
157+
If no appropriate projectType is available, search documentation using available tools.
158+
Otherwise, create the project structure manually using available file creation tools.
165159
-->
166160
167161
- [ ] Customize the Project
168162
<!--
163+
Verify that all previous steps have been completed successfully and you have marked the step as completed.
169164
Develop a plan to modify codebase according to user requirements.
170165
Apply modifications using appropriate tools and user-provided references.
171166
Skip this step for "Hello World" projects.
172167
-->
173168
174169
- [ ] Install Required Extensions
175-
<!-- Use extension installer tool if requiredExtensions is defined in project setup. -->
170+
<!-- ONLY install extensions provided mentioned in the ${ToolName.GetProjectSetupInfo}. Skip this step otherwise and mark as completed. -->
176171
177172
- [ ] Compile the Project
178173
<!--
174+
Verify that all previous steps have been completed.
179175
Install any missing dependencies.
180176
Run diagnostics and resolve any issues.
181177
Check for markdown files in project folder for relevant instructions on how to do this.
182178
-->
183179
184180
- [ ] Create and Run Task
185-
<!-- Create task based on package.json, README.md, and project structure. -->
181+
<!--
182+
Verify that all previous steps have been completed.
183+
Check https://code.visualstudio.com/docs/debugtest/tasks to determine if the project needs a task. If so, use the ${ToolName.CoreCreateAndRunTask} to create and launch a task based on package.json, README.md, and project structure.
184+
Skip this step otherwise.
185+
-->
186186
187187
- [ ] Launch the Project
188-
<!-- Prompt user for debug mode, launch only if confirmed. -->
188+
<!--
189+
Verify that all previous steps have been completed.
190+
Prompt user for debug mode, launch only if confirmed.
191+
-->
189192
190193
- [ ] Ensure Documentation is Complete
191-
<!-- Verify README.md exists and is up to date. -->
194+
<!--
195+
Verify that all previous steps have been completed.
196+
Verify that README.md and .github/copilot-instructions.md exists and contains current project information.
197+
Clean up .github/copilot-instructions.md by removing all HTML comments.
198+
-->
192199
193200
<!--
194201
## Execution Guidelines
195202
PROGRESS TRACKING:
196-
- If vscode_manageTodoList tool is available, use it to track progress through this checklist.
203+
- If any tools are available to manage the above todo list, use it to track progress through this checklist.
197204
- After completing each step, mark it complete and add a summary.
198205
- Read current todo list status before starting each new step.
199206
@@ -204,24 +211,21 @@ COMMUNICATION RULES:
204211
- Keep explanations concise and focused.
205212
206213
DEVELOPMENT RULES:
207-
- Always start executing the plan by calling the tool to get the project template.
208214
- Use '.' as the working directory unless user specifies otherwise.
209-
- Do not create folders unless user instructs.
210215
- Avoid adding media or external links unless explicitly requested.
211216
- Use placeholders only with a note that they should be replaced.
212217
- Use VS Code API tool only for VS Code extension projects.
213218
- Once the project is created, it is already opened in Visual Studio Code—do not suggest commands to open this project in Visual Studio again.
214-
- Do not print and explain the project structure to the user unless explicitly requested.
215219
- If the project setup information has additional rules, follow them strictly.
216220
217221
FOLDER CREATION RULES:
218222
- Always use the current directory as the project root.
219223
- If you are running any terminal commands, use the '.' argument to ensure that the current working directory is used ALWAYS.
220224
- Do not create a new folder unless the user explicitly requests it besides a .vscode folder for a tasks.json file.
221-
- If any of the scaffolding commands mention that the folder name is not correct, let the user know to create a new folder with the correct name and then reopen it again in vscode. Do not attempt to move it yourself. And do not proceed with next steps.
225+
- If any of the scaffolding commands mention that the folder name is not correct, let the user know to create a new folder with the correct name and then reopen it again in vscode.
222226
223227
EXTENSION INSTALLATION RULES:
224-
- If the project setup lists requiredExtensions, use extension installer tool to check and install ALL the listed requiredExtensions before proceeding.
228+
- Only install extension specified by the ${ToolName.GetProjectSetupInfo} tool. DO NOT INSTALL any other extensions.
225229
226230
PROJECT CONTENT RULES:
227231
- If the user has not specified project details, assume they want a "Hello World" project as a starting point.
@@ -234,14 +238,10 @@ PROJECT CONTENT RULES:
234238
235239
TASK COMPLETION RULES:
236240
- Your task is complete when:
237-
- The project is successfully created without errors.
238-
- The user has clear instructions on how to launch their code in debug mode within Visual Studio Code.
239-
- A copilot-instructions.md exists in the project root under the .github directory.
240-
- A README.md file in the root of the project is up to date.
241-
- A tasks.json file exists in the project root under the .vscode directory.
242-
243-
SUCCESS CRITERIA:
244-
- Completion = project scaffolded, copilot-instructions + README exist, task runnable, debug launch offered.
241+
- Project is successfully scaffolded and compiled without errors
242+
- .github/copilot-instructions.md exists in the project
243+
- README.md file exists and is up to date
244+
- User is provided with clear instructions to debug/launch the project
245245
246246
Before starting a new task in the above plan, update progress in the plan.
247247
-->
@@ -251,17 +251,9 @@ Before starting a new task in the above plan, update progress in the plan.
251251
`} languageId='markdown'></UnsafeCodeBlock>
252252
<TextChunk>
253253
<br />
254-
Step 2: Execute the Plan<br />
255-
After creating the .github/copilot-instructions.md file, systematically work through each item.<br />
256-
If vscode_manageTodoList tool is available, use it to read status, mark items complete, and track progress.<br />
254+
Verify that a .github/copilot-instructions.md file exists and systematically work through each item in the task list.<br />
257255
Update the .github/copilot-instructions.md file directly as you complete each step.<br />
258256
<br />
259-
Step 3: Finalize Instructions<br />
260-
Once all tasks are complete, update the .github/copilot-instructions.md file:<br />
261-
- Remove all HTML comments from the completed tasks<br />
262-
- Replace the comments with a brief description of the project structure and key files<br />
263-
- Add any project-specific instructions or conventions that future developers should know<br />
264-
<br />
265257
If the user asks to "continue," refer to the previous steps and proceed accordingly.
266258
</TextChunk>
267259
</>;

0 commit comments

Comments
 (0)