opencode-git-plugin 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/tui.js +1828 -0
- package/package.json +5 -4
- package/src/config/constants.ts +0 -16
- package/src/config/index.ts +0 -2
- package/src/config/options.ts +0 -8
- package/src/diff/body.tsx +0 -90
- package/src/diff/header.tsx +0 -77
- package/src/diff/index.ts +0 -2
- package/src/diff/keymap.ts +0 -113
- package/src/diff/open-diff.ts +0 -57
- package/src/diff/panel.tsx +0 -156
- package/src/diff/search.tsx +0 -38
- package/src/git/diff-parse.ts +0 -35
- package/src/git/index.ts +0 -3
- package/src/git/porcelain.ts +0 -10
- package/src/git/runner.ts +0 -45
- package/src/sidebar/file-list.tsx +0 -47
- package/src/sidebar/focus.tsx +0 -37
- package/src/sidebar/header.tsx +0 -55
- package/src/sidebar/index.ts +0 -1
- package/src/sidebar/keymap.ts +0 -143
- package/src/sidebar/list-navigation.tsx +0 -96
- package/src/sidebar/staging.tsx +0 -108
- package/src/sidebar/status.tsx +0 -29
- package/src/sidebar/view.tsx +0 -159
- package/src/sidebar/working-copy.tsx +0 -81
- package/src/state/diff-store.ts +0 -34
- package/src/state/index.ts +0 -1
- package/src/tui.tsx +0 -25
- package/src/types.ts +0 -63
- package/src/ui/format.ts +0 -67
- package/src/ui/index.ts +0 -2
- package/src/ui/syntax.ts +0 -61
- package/tui.ts +0 -1
package/README.md
CHANGED
|
@@ -118,12 +118,15 @@ Do not add the plugin to `opencode.json(c)`; that file is for server plugins and
|
|
|
118
118
|
```sh
|
|
119
119
|
bun install
|
|
120
120
|
bun run check
|
|
121
|
+
bun run build
|
|
121
122
|
npm pack --dry-run
|
|
122
123
|
```
|
|
123
124
|
|
|
124
|
-
The package exposes
|
|
125
|
+
The published package exposes `./tui` as `dist/tui.js`, compiled by `bun run build` with the OpenTUI Solid transform. OpenCode does not compile JSX inside `node_modules`, so shipping raw `.tsx` makes the panel fail to render once installed from npm. `npm pack` and `npm publish` run the build automatically.
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
A local directory plugin is resolved as `<dir>/tui`, so local development loads `tui.ts` at the repository root, which re-exports `src/tui.tsx` and is compiled by OpenCode on the fly.
|
|
128
|
+
|
|
129
|
+
Any module that imports runtime values from `solid-js` (`createSignal`, `createMemo`, `onCleanup`, …) must be a `.tsx` file. For local plugins OpenCode only applies its Solid transform to `.jsx`/`.tsx` files; in a `.ts` file the import loads a second Solid instance and the UI stops updating. A test enforces this.
|
|
127
130
|
|
|
128
131
|
Before publishing, test the packed tarball rather than the working directory:
|
|
129
132
|
|