Description
find_workspace_symbols always fails with TypeScript Server Error: No Project. regardless of the query.
Root Cause
The workspaceSymbol() method in the cclsp source does not call ensureFileOpen() before sending the workspace/symbol LSP request. Without a file being opened first, the TypeScript language server never loads the project context and returns a "No Project" error.
This is the same root cause as #27, which was fixed for find_references in PR #30 by adding ensureFileOpen(). The fix was not applied to workspaceSymbol().
Environment
- cclsp: 0.7.0 (latest)
- typescript-language-server: 5.1.3
- Node.js: 22
- OS: macOS 15 (Darwin 25.2.0)
- Claude Code: latest
Steps to Reproduce
- Install cclsp and configure it as an MCP server in Claude Code
- Open a TypeScript project
- Call
find_workspace_symbols with any query (e.g., { "query": "useState" })
- Observe error:
TypeScript Server Error: No Project.
Workaround
Call any file-based tool first (e.g., get_diagnostics, find_definition, or get_hover on any project file) to prime the TypeScript server with project context. After that, find_workspace_symbols works correctly for the remainder of the session.
Suggested Fix
Add an ensureFileOpen() call (or equivalent) at the beginning of the workspaceSymbol() method, matching the pattern used in find_references after PR #30. For example, open tsconfig.json or the first .ts file found in the project root before sending the workspace/symbol request.
Description
find_workspace_symbolsalways fails withTypeScript Server Error: No Project.regardless of the query.Root Cause
The
workspaceSymbol()method in the cclsp source does not callensureFileOpen()before sending theworkspace/symbolLSP request. Without a file being opened first, the TypeScript language server never loads the project context and returns a "No Project" error.This is the same root cause as #27, which was fixed for
find_referencesin PR #30 by addingensureFileOpen(). The fix was not applied toworkspaceSymbol().Environment
Steps to Reproduce
find_workspace_symbolswith any query (e.g.,{ "query": "useState" })TypeScript Server Error: No Project.Workaround
Call any file-based tool first (e.g.,
get_diagnostics,find_definition, orget_hoveron any project file) to prime the TypeScript server with project context. After that,find_workspace_symbolsworks correctly for the remainder of the session.Suggested Fix
Add an
ensureFileOpen()call (or equivalent) at the beginning of theworkspaceSymbol()method, matching the pattern used infind_referencesafter PR #30. For example, opentsconfig.jsonor the first.tsfile found in the project root before sending theworkspace/symbolrequest.