Open jaresty opened 6 months ago
- OS: macOS - Continue: 2024-04-12, 20:45:34 - IDE: VSCode
I'm unable to reference symbols that are coming from my tsx files. I think the issue might be that, while ts files are marked as typescript, tsx files are not. https://github.com/continuedev/continue/blob/8ff3d58387231a627c8996b655b2f43831cffa0e/core/util/treeSitter.ts#L37
Open up a react project with some tsx files and try to search for a symbol that is in one of them. I don't think you'll see any results.
,/src/,#- coding: utf-8,,t., t,function,class,module,export,import raw: true ############################################ <fim_prefix>{ "models": [ { "title": "Ollama", "provider": "ollama", "model": "AUTODETECT" } ], "slashCommands": [ { "name": "edit", "description": "Edit selected code" }, { "name": "comment", "description": "Write comments for the selected code" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ], "customCommands": [ { "name": "test", "prompt": "Write 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": "diff", "params": {} }, { "name": "open", "params": {} }, { "name": "terminal", "params": {} }, { "name": "problems", "params": {} }, { "name": "codebase", "params": {} }, { "name": "code", "params": { "<fim_suffix>" } }, { "name": "folder" }, { "name": "docs", "params": {} }, { "name": "search", "params": {} }, { "name": "locals", "params": { "stackDepth": 3 } },<fim_middle>========================================================================== ========================================================================== Settings: contextLength: 4096 model: starcoder2:3b maxTokens: 1024 temperature: 0.01 stop: <fim_prefix>,<fim_suffix>,<fim_middle>,<|endoftext|>, , ,/src/,#- coding: utf-8,```,t., t,function,class,module,export,import raw: true ############################################ <fim_prefix>{ "models": [ { "title": "Ollama", "provider": "ollama", "model": "AUTODETECT" } ], "slashCommands": [ { "name": "edit", "description": "Edit selected code" }, { "name": "comment", "description": "Write comments for the selected code" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ], "customCommands": [ { "name": "test", "prompt": "Write 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": "diff", "params": {} }, { "name": "open", "params": {} }, { "name": "terminal", "params": {} }, { "name": "problems", "params": {} }, { "name": "codebase", "params": {} }, { "name": "code", "params": { "e<fim_suffix>" } }, { "name": "folder" }, { "name": "docs", "params": {} }, { "name": "search", "params": {} }, { "name": "locals", "params": { "stackDepth": 3 } },<fim_middle>========================================================================== ========================================================================== Completion: xcludes": [ "node_ ========================================================================== ========================================================================== Settings: contextLength: 4096 model: starcoder2:3b maxTokens: 1024 temperature: 0.01 stop: <fim_prefix>,<fim_suffix>,<fim_middle>,<|endoftext|>, , ,/src/,#- coding: utf-8,```,t., t,function,class,module,export,import raw: true ############################################ <fim_prefix>{ "models": [ { "title": "Ollama", "provider": "ollama", "model": "AUTODETECT" } ], "slashCommands": [ { "name": "edit", "description": "Edit selected code" }, { "name": "comment", "description": "Write comments for the selected code" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ], "customCommands": [ { "name": "test", "prompt": "Write 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": "diff", "params": {} }, { "name": "open", "params": {} }, { "name": "terminal", "params": {} }, { "name": "problems", "params": {} }, { "name": "codebase", "params": {} }, { "name": "code", "params": { <fim_suffix> } }, { "name": "folder" }, { "name": "docs", "params": {} }, { "name": "search", "params": {} }, { "name": "locals", "params": { "stackDepth": 3 } },<fim_middle>========================================================================== ========================================================================== Completion: "file": "file"
Created a pull request for the change I think might need to happen here
Before submitting your bug report
Relevant environment info
Description
I'm unable to reference symbols that are coming from my tsx files. I think the issue might be that, while ts files are marked as typescript, tsx files are not. https://github.com/continuedev/continue/blob/8ff3d58387231a627c8996b655b2f43831cffa0e/core/util/treeSitter.ts#L37
To reproduce
Open up a react project with some tsx files and try to search for a symbol that is in one of them. I don't think you'll see any results.
Log output