Skip to content

feat: add catalog name completion in package.json#75

Open
RYGRIT wants to merge 3 commits intonpmx-dev:mainfrom
RYGRIT:feat/catalog-completion
Open

feat: add catalog name completion in package.json#75
RYGRIT wants to merge 3 commits intonpmx-dev:mainfrom
RYGRIT:feat/catalog-completion

Conversation

@RYGRIT
Copy link
Collaborator

@RYGRIT RYGRIT commented Mar 11, 2026

There are currently two problems.

  1. Catalog smart categorization prompts take a while to appear
  2. Setting the range will cause catalog completion to not be displayed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

This change introduces catalog-based completion item support to the editor. A new getCatalogs() method is added to WorkspaceContext to safely expose catalogue data, with updated null-handling logic in the workspace context. A new CatalogCompletionItemProvider class is implemented to provide completion items for catalogues, triggered by the ':' character. The provider is then registered in the completion item provider system for package JSON files via a new watch effect, whilst preserving the existing version-based completion provider registration and logic.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description directly addresses the changeset by identifying specific problems (slow catalog prompts and range-related display issues) and the PR objectives confirm the implementation adds catalog name completion to solve these issues.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 289ada72-3744-4f7b-9429-fe0db80925d6

📥 Commits

Reviewing files that changed from the base of the PR and between b5cacf5 and ae8b0e5.

📒 Files selected for processing (3)
  • src/core/workspace.ts
  • src/providers/completion-item/catalog.ts
  • src/providers/completion-item/index.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant