BUG: "Add all missing imports" quick fix not showing for Astro components after extension (`astro-vscode`) version v2.6.13
- P4: importanttriage: needs triagepkg: language-tools
### Astro Info
```block
Astro v7.2.0
Node v22.22.1
System macOS (x64)
Package Manager pnpm
Output static
Adapter none
Integrations @astrojs/mdx
@astrojs/sitemap
```
### If this issue only occurs in one browser, which browser is a problem?
_No response_
### Describe the Bug
After extension
<img width="863" height="239" alt="Image" src="https://github.com/user-attachments/assets/ddf4e632-4cd5-4edb-8202-301220783f21" />
(`astro-vscode`) version 2.6.13, the Quick Fix feature in the Astro VS Code extension no longer offers the “Add all missing imports” (or import suggestion) for Astro components that have not been imported (e.g., <BlogPost />). This feature worked correctly in 2.6.13 and earlier versions.
### What's the expected result?
## Steps to Reproduce
1. Install the Astro VS Code extension with a version later than 2.6.13 (e.g., the latest version).
3. Create an Astro component file (e.g., BlogPost.astro).
5. In another .astro file, use that component without an import statement, e.g., write <BlogPost />.
7. Place the cursor on <BlogPost /> and wait for the Quick Fix lightbulb to appear, or manually trigger it (shortcut: Cmd+. / Ctrl+.).
## Expected Behavior
The Quick Fix menu should include an option like “Add all missing imports” or “Add import from '../layouts/BlogPost.astro'” to automatically add the necessary import statement.
## Actual Behavior
The Quick Fix menu only shows Copilot‑related actions (e.g., Fix, Explain) and does not include any import-related suggestions. The missing import is not automatically resolved.
## Additional Context
The issue first appears in versions after `2.6.13`. Rolling back to `2.6.13` (or earlier) restores the expected behavior.
The attached screenshot shows that only `Fix` and `Explain` appear in the Quick Fix panel, without the import addition option.
This may be a regression introduced after `2.6.13`; it might be related to changes in the TypeScript auto‑import cache or language service, but further investigation is needed.
### Link to Minimal Reproducible Example
None
### Participation
- [ ] I am willing to submit a pull request for this issue.
关闭于 22 天前 1 条评论