[solution]
Returns the loaded project that currently owns the given file path.
TypeScript and JavaScript workspaces can contain multiple projects, generated configs, path aliases, and live editor text.
The model can load, refresh, and inspect the workspace state it will use for later semantic calls.
Try it locally in the TGlider playground
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Workspace-relative or absolute file path. |
Find the owner project for a source file
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "find_project_for_file",
"arguments": {
"filePath": "src/app.ts"
}
}
}Returns the owning project summary for the file.