microsoft / microsoft/multilspy

Typescript LSP does not resolve references between files.

Open
#96 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
610
Forks
111
PR merge metrics
No merged PRs in 30d

Description

consider following file

https://github.com/assistant-ui/assistant-ui/blob/main/packages/react-ai-sdk/src/ui/use-assistant/useVercelUseAssistantRuntime.tsx

from multilspy import SyncLanguageServer
from multilspy.multilspy_config import MultilspyConfig
from multilspy.multilspy_logger import MultilspyLogger

config = MultilspyConfig.from_dict({"code_language": "typescript"})
logger = MultilspyLogger()
lsp = SyncLanguageServer.create(config, logger, "/Users/root/assistant-ui/")



with lsp.start_server():
    result1 = lsp.request_definition(
        "packages/react-ai-sdk/src/ui/use-assistant/useVercelUseAssistantRuntime.tsx", # Filename of location where request is being made
        34, # line number of symbol for which request is being made
        34 # column number of symbol for which request is being made
    )

this was always pointing to import statement in the same file but never to definition file
assistant-ui/packages/react-ai-sdk/src/ui/utils/vercelAttachmentAdapter.ts that actually contains definition

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with SyncLanguageServer, MultilspyConfig, and request_definition against the TypeScript files shown in the report. Trace how the language server is started for the /Users/root/assistant-ui/ workspace and how the request is resolved. Done means the reference from useVercelUseAssistantRuntime.tsx resolves to vercelAttachmentAdapter.ts rather than the import statement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.