opencode-git-plugin 0.2.0 → 0.3.0

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 CHANGED
@@ -82,6 +82,7 @@ Do not add the plugin to `opencode.json(c)`; that file is for server plugins and
82
82
  | Option | Type | Default | Description |
83
83
  | --- | --- | --- | --- |
84
84
  | `intervalMs` | `number` | `4000` | Refresh interval in milliseconds; values below `1000` are clamped. |
85
+ | `folderTree` | `string` | `"none"` | File list style: `"none"` (full paths), `"comfortable"` (indented tree, 2 cols/level), `"compact"` (tree, 1 col/level), or `"minimal"` (plain indentation). |
85
86
 
86
87
  ## Usage
87
88
 
@@ -92,6 +93,7 @@ Do not add the plugin to `opencode.json(c)`; that file is for server plugins and
92
93
  - Click a row to open its diff; click the branch name to enter stage mode (every clicked file toggles staged/unstaged; branch click or `ESC` exits)
93
94
  - Clicking the prompt input exits list mode so typing is never hijacked
94
95
  - Staging also via palette (`Git Panel: Stage/Unstage File`)
96
+ - With `folderTree` enabled, clicking a folder collapses/expands it; in stage mode, clicking a folder stages/unstages everything inside it (unstages only when all of its files are already staged)
95
97
 
96
98
  ### Diff panel
97
99
 
@@ -110,7 +112,7 @@ Do not add the plugin to `opencode.json(c)`; that file is for server plugins and
110
112
 
111
113
  - `Loading…` while fetching
112
114
  - `Working tree clean` when there is nothing to show (header stats hidden)
113
- - `Empty repo — no commits yet` before the first commit
115
+ - `Empty repo — no commits yet` before the first commit when nothing is staged or untracked (files still list normally once they exist)
114
116
  - `Not a git repository` outside a repo, plus raw fetch errors
115
117
 
116
118
  ## Development
@@ -118,12 +120,15 @@ Do not add the plugin to `opencode.json(c)`; that file is for server plugins and
118
120
  ```sh
119
121
  bun install
120
122
  bun run check
123
+ bun run build
121
124
  npm pack --dry-run
122
125
  ```
123
126
 
124
- The package exposes only the `./tui` export (`tui.ts` at the package root, which re-exports `src/tui.tsx`). Local directory plugins are resolved as `<dir>/tui`, published packages through the `./tui` export.
127
+ 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
128
 
126
- Any module that imports runtime values from `solid-js` (`createSignal`, `createMemo`, `onCleanup`, …) must be a `.tsx` file. OpenCode only redirects `solid-js` to its own runtime in `.jsx`/`.tsx` files; in a `.ts` file the import loads a second Solid instance and the UI stops updating. A test enforces this.
129
+ 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.
130
+
131
+ 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
132
 
128
133
  Before publishing, test the packed tarball rather than the working directory:
129
134