continue
continue copied to clipboard
Issues with slashCommands in VsCode
Before submitting your bug report
- [ ] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 11
- Continue: v0.8.52
- IDE: VSCode 1.94.0
- Model: Ollama v0.3.10
- config.json:
{
"models": [
{
"model": "qwen2.5:7b-instruct-q4_K_M",
"title": "Ollama (Remote)",
"completionOptions": {},
"apiBase": "http://localhost:3000/ollama",
"apiKey":"<API KEY>",
"provider": "ollama",
"useLegacyCompletionsEndpoint": false
}
],
"systemMessage": "You are a coding assistant for the user. Your task is to help the users with the any kind of programming or coding questions only. Do not respond to non-programming or non-coding questions like 'Tell me a joke' or 'what is the capital city of india' etc ",
"completionOptions": {
"temperature": 0,
"topP": 1,
"topK": null,
"presencePenalty": null,
"frequencyPenalty": null,
"stop": null,
"maxTokens": 600,
"stream": true
},
"tabAutocompleteModel": {
"model": "qwen2.5:7b-instruct-q4_K_M",
"title": "Ollama (Remote)",
"completionOptions": {},
"apiBase": "http://localhost:3000/ollama",
"apiKey":"<API KEY>",
"provider": "ollama",
"useLegacyCompletionsEndpoint": false
},
"customCommands": [
{
"name": "test",
"prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"contextProviders": [
{
"name": "code",
"params": {}
},
{
"name": "docs",
"params": {}
},
{
"name": "diff",
"params": {}
},
{
"name": "terminal",
"params": {}
},
{
"name": "problems",
"params": {}
},
{
"name": "folder",
"params": {}
},
{
"name": "codebase",
"params": {}
}
],
"slashCommands": [
{
"name": "edit",
"description": "Edit selected code"
},
{
"name": "comment",
"description": "Write comments for the selected code"
},
{
"name": "share",
"description": "Export the current chat session to markdown"
},
{
"name": "cmd",
"description": "Generate a shell command"
},
{
"name": "commit",
"description": "Generate a git commit message"
}
]
}
### Description
Facing issues to run the slashCommands in the windows machine.
**Error message:** ENOENT: no such file or directory, open 'C:\Untitled-1'
Upon checking the logs from the developer tools. I was able to find the below message
Extension Host] Error handling webview message: {
"msg": {
"messageId": "c7bbbf6d-e918-4194-a32a-957e2ea6bfbe",
"messageType": "command/run",
"data": {
"input": "/edit Untitled-1 (1-2)\ndef is_even(n):\r\n return n%2==0\n",
"history": [
{
"role": "user",
"content": "Take the file prefix and suffix into account, but only rewrite the code_to_edit as specified in the user_request. The code you write in modified_code_to_edit will replace the code between the code_to_edit tags. Do NOT preface your answer or write anything other than code. The </modified_code_to_edit> tag should be written to indicate the end of the modified code section. Do not ever use nested tags.\n\nExample:\n\n<file_prefix>\nclass Database:\n def init(self):\n self._data = {{}}\n\n def get(self, key):\n return self._data[key]\n\n</file_prefix>\n<code_to_edit>\n def set(self, key, value):\n self._data[key] = value\n</code_to_edit>\n<file_suffix>\n\n def clear_all():\n self._data = {{}}\n</file_suffix>\n<user_request>\nRaise an error if the key already exists.\n</user_request>\n<modified_code_to_edit>\n def set(self, key, value):\n if key in self._data:\n raise KeyError(f"Key {{key}} already exists")\n self._data[key] = value\n</modified_code_to_edit>\n\nMain task:\n\n<code_to_edit>\ndef is_even(n):\r\n return n%2==0\n</code_to_edit>\n<user_request>\n/edit Untitled-1 (1-2)\ndef is_even(n):\r\n return n%2==0\n\n</user_request>\n<modified_code_to_edit>\n"
}
],
"modelTitle": "Ollama (Remote)",
"slashCommandName": "edit",
"contextItems": [
{
"content": "def is_even(n):\r\n return n%2==0",
"name": "Untitled-1 (1-2)",
"description": "Untitled-1 (1-2)",
"id": {
"providerTitle": "code",
"itemId": "Untitled-1"
},
"editing": true
}
],
"historyIndex": 0,
"selectedCode": [
{
"filepath": "Untitled-1 (1-2)",
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 1,
"character": 0
}
}
}
]
}
}
}
EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open 'C:\Untitled-1'
### To reproduce
_No response_
### Log output
_No response_