Skip to content

fix: use window.activeTextEditor instead of composable in command handler#42

Merged
9romise merged 1 commit intomainfrom
fix/composable
Feb 13, 2026
Merged

fix: use window.activeTextEditor instead of composable in command handler#42
9romise merged 1 commit intomainfrom
fix/composable

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Feb 13, 2026

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

This pull request enforces a pattern where command handlers use the VSCode API directly instead of wrapper composables. The ESLint configuration is updated with a targeted rule that restricts imports from 'reactive-vscode' in files under src/commands/. Additionally, the open-file-in-npmx.ts command is refactored to replace the useActiveTextEditor hook with VSCode's native window.activeTextEditor API, adjusting the optional chaining syntax accordingly.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request has no author-provided description, making it impossible to assess whether any description exists or is related to the changeset. Add a pull request description explaining the rationale for replacing the composable hook with VSCode's native window.activeTextEditor API and the benefits of this change.
✅ Passed checks (1 passed)
Check name Status Explanation
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/composable

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
eslint.config.ts (1)

6-6: Consider specifying file extensions in the glob pattern.

The pattern src/commands/** should work, but explicitly specifying extensions like src/commands/**/*.ts can make the intent clearer and avoid accidentally matching non-TypeScript files (e.g., .json, .md) that might be added to this directory in the future.

♻️ Optional refinement
-    files: ['src/commands/**'],
+    files: ['src/commands/**/*.ts'],

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

@9romise 9romise merged commit 3d51f65 into main Feb 13, 2026
9 checks passed
@9romise 9romise deleted the fix/composable branch February 13, 2026 06:23
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