Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. You have access to the following information to help you make informed suggestions: - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest, with line numbers in the form #| to help you understand the edit diff history. It's possible these are entirely irrelevant to the developer's change. - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code. Line numbers in the form #| are included to help you understand the edit diff history. - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change. - area_around_code_to_edit: The context showing the code surrounding the section to be edited. - cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on. Your task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes. # Steps 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location. 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements. 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality. 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style. # Output Format - Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the <|code_to_edit|> and <|/code_to_edit|> tags. - There are line numbers in the form #| in the code displayed to you above, but these are just for your reference. Please do not include the numbers of the form #| in your response. - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags. ``` // Your revised code goes here ``` # Notes - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines. - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. - Don't include the line numbers of the form #| in your response. User ``` <|recently_viewed_code_snippets|> <|recently_viewed_code_snippet|> code_snippet_file_path: /b:/test/909/styles.css (truncated) <|/recently_viewed_code_snippet|> <|recently_viewed_code_snippet|> code_snippet_file_path: /b:/test/909/sample.txt makesnakegameinhtmlcssmake it immersive <|/recently_viewed_code_snippet|> <|/recently_viewed_code_snippets|> <|current_file_content|> current_file_path: sample.txt If semantic_search returns the full contents of the text files in the workspace, you have all the workspace context. You can use the grep_search to get an overview of a file by searching for a string within that one file, instead of using read_file many times. If you don't know exactly the string or filename pattern you're looking for, use semantic_search to do a semantic search across the workspace. Don't call the run_in_terminal tool multiple times in parallel. Instead, run one command and wait for the output before running the next command. When invoking a tool that takes a file path, always use the absolute file path. If the file has a scheme like untitled: or vscode-userdata:, then use a URI with the scheme. NEVER try to edit a file by running terminal commands unless the user specifically asks for it. Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you. To edit notebook files in the workspace, you can use the edit_notebook_file tool. Use the run_notebook_cell tool instead of executing Jupyter related commands in the Terminal, such as `jupyter notebook`, `jupyter lab`, `install jupyter` or the like. Use the copilot_getNotebookSummary tool to get the summary of the notebook (this includes the list or all cells along with the Cell Id, Cell type and Cell Language, execution details and mime types of the outputs, if any). Important Reminder: Avoid referencing Notebook Cell Ids in user messages. Use cell number instead. Important Reminder: Markdown cells cannot be executed Use proper Markdown formatting in your answers. When referring to a filename or symbol in the user's workspace, wrap it in backticks. The class `Person` is in `src/models/person.ts`. User The user's current OS is: Windows The user's default shell is: "powershell.exe" (Windows PowerShell v5.1). When you generate terminal commands, please generate them correctly for this shell. Use the `;` character if joining commands on a single line is needed. The following tasks can be executed using the run_task tool if they are not already running: { "label": "build", "type": "shell", "command": "gcc", "args": [ "-g", "${workspaceFolder}/marial.c", "-o", "${workspaceFolder}/marial.exe" ], "group": { "kind": "build", "isDefault": true } } I am working in a workspace with the following folders: - b:\test\909 I am working in a workspace that has the following structure: ``` sample.txt ``` This is the state of the context at this point in the conversation. The view of the workspace structure may be truncated. You can use tools to collect more context if needed. copilot_cache_control: {"type":"ephemeral"} User The current date is August 25, 2025. Tasks: No tasks found.Terminals: Terminal: powershell <|area_around_code_to_edit|> When using the replace_string_in_file tool, include 3-5 lines of unchanged code before and after the string you want to replace, to make it unambiguous which part of the file should be edited. <|code_to_edit|> copilot_cache_control: {"type":"ephemeral"}<|cursor|> <|/code_to_edit|> <|/area_around_code_to_edit|> <|/current_file_content|> <|edit_diff_history|> <|/edit_diff_history|> <|area_around_code_to_edit|> When using the replace_string_in_file tool, include 3-5 lines of unchanged code before and after the string you want to replace, to make it unambiguous which part of the file should be edited. <|code_to_edit|> this cycle repeats copilot_cache_control: {"type":"ephemeral"}<|cursor|> <|/code_to_edit|> <|/area_around_code_to_edit|> ``` The developer was working on a section of code within the tags `code_to_edit` in the file located at `sample.txt`. Using the given `recently_viewed_code_snippets`, `current_file_content`, `edit_diff_history`, `area_around_code_to_edit`, and the cursor position marked as `<|cursor|>`, please continue the developer's work. Update the `code_to_edit` section by predicting and completing the changes they would have made next. Provide the revised code that was between the `<|code_to_edit|>` and `<|/code_to_edit|>` tags with the following format, but do not include the tags themselves. ``` // Your revised code goes here ``` Prediction ``` this cycle repeats copilot_cache_control: {"type":"ephemeral"} ``` Response Assistant ``` this cycle repeats ```