Skip to content

fix: load keyHint from the pi-tui chrome subpath on Oh My Pi 18 - #13

Open
crxssrazr93 wants to merge 1 commit into
DevVig:mainfrom
crxssrazr93:fix/omp18-keybinding-hints
Open

crxssrazr93 wants to merge 1 commit into
DevVig:mainfrom
crxssrazr93:fix/omp18-keybinding-hints

Conversation

@crxssrazr93

Copy link
Copy Markdown

Summary

omp plugin install aborts on Oh My Pi 18.x during extension validation:

/home/<user>/.omp/plugins/node_modules/omp-claude-bridge/src/index.ts: Failed to load extension:
Cannot find package '@oh-my-pi/pi-coding-agent' imported from .../src/index.ts?mtime=...

Root cause is one import. Oh My Pi 18 moved keyHint from
@oh-my-pi/pi-coding-agent/modes/components/keybinding-hints to
@oh-my-pi/pi-tui/chrome/keybinding-hints, and the old subpath is no longer in the
host-package map. Bun reports a missing subpath as a missing package, which is
why the message names the package root even though the root and every other
@oh-my-pi/* specifier resolves.

Fixes #5.

Type of change

  • Bug fix

Checklist

  • bun run typecheck passes
  • bun run test passes
  • Context-routing changes include a case in tests/unit-context-window.mjs — N/A, no routing change

Notes

Verified on omp 18.13.3 / Linux:

  • An isolated extension importing @oh-my-pi/pi-coding-agent/modes/components/keybinding-hints
    fails with the exact install error; importing
    @oh-my-pi/pi-tui/chrome/keybinding-hints loads and exports keyHint.
  • With this patch the full extension loads, registers its provider (12 models at the time
    of testing), and completes live turns through the bridge.
  • @oh-my-pi/pi-tui dev dependency raised to ^18.13.3 because 16.x/17.x don't ship
    chrome/keybinding-hints, so tsc --noEmit cannot resolve the new subpath. The other
    @oh-my-pi/* dev pins stay at ^16.3.6 and still type-check against pi-tui 18.

Caveat for the maintainer: this drops Oh My Pi 17 compatibility for the keyHint lookup.
If 17 support matters, the alternative is a dynamic import with a fallback to the old
subpath; I kept the static import because the plugin's other host imports already assume a
current host map.

Oh My Pi 18 dropped @oh-my-pi/pi-coding-agent/modes/components/keybinding-hints
from its host-package map; the module now lives at
@oh-my-pi/pi-tui/chrome/keybinding-hints. Bun reports the missing subpath as
"Cannot find package '@oh-my-pi/pi-coding-agent'", which aborted
`omp plugin install` during extension validation (issue DevVig#5).

Bump the @oh-my-pi/pi-tui dev dependency to ^18.13.3 so tsc resolves the new
subpath; the rest of the dev pins still type-check against it.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 016240f0-257e-40c8-969c-622c214eecdf
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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.

Cannot find package '@oh-my-pi/pi-coding-agent' error when installing plugin

1 participant