opencode-navigator 0.21.8 → 0.23.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/CHANGELOG.md +17 -1
- package/HOST_API.md +59 -0
- package/PROVIDERS.md +11 -4
- package/README.md +118 -24
- package/dist/chunk-bv0nm1tj.js +9 -0
- package/dist/chunk-qmntexwm.js +0 -0
- package/dist/chunk-v6bz59xn.js +20 -0
- package/dist/icon-picker.js +175 -0
- package/dist/layout-preset-actions.js +8 -30
- package/dist/navigator-updates.js +12 -4
- package/dist/project-profile.js +12 -4
- package/dist/provider-limits.js +117 -17
- package/dist/quick-actions-settings.js +6 -20
- package/dist/rpc.js +1 -0
- package/dist/runtime-dependencies.json +10 -0
- package/dist/runtime-requirements.json +1 -0
- package/dist/server.js +27 -58
- package/dist/settings-import.js +4 -3
- package/dist/sidebar-settings.js +822 -0
- package/dist/sidebar-shortcuts.js +261 -0
- package/dist/toolbar-settings.js +161 -0
- package/dist/tui.js +1337 -1288
- package/package.json +14 -11
- package/scripts/snapshot-runtime.mjs +32 -0
- package/scripts/snapshot-verifier.mjs +36 -0
- package/scripts/update-local-snapshot.mjs +43 -19
- package/dist/chunk-d1bws32s.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## [0.23.0] - 2026-10-28
|
|
4
|
+
|
|
5
|
+
- Support only the latest stable OpenCode 1.x and 2.x releases, currently 1.19.5 and 2.2.0, including the newer terminal renderer.
|
|
6
|
+
- Keep Skills, MCP servers, and Subagents current as OpenCode 2 updates, and launch the intended Skill when multiple sources have the same name.
|
|
7
|
+
- Show OpenCode Console workspace budgets and Go allowance through the public host usage API without a Navigator server plugin. Preserve workspace scope, native units, reset times, and explicit failure/retry states.
|
|
8
|
+
- Preserve Navigator shortcuts and nested-dialog navigation with OpenCode 2.2's keyboard handling.
|
|
9
|
+
- Verify a supported runtime before changing a pinned Navigator snapshot, preserving the installed version when no compatible verifier is available.
|
|
10
|
+
|
|
11
|
+
## [0.22.0] - 2026-10-23
|
|
12
|
+
|
|
13
|
+
- Pin Quick Actions and Skills to a compact sidebar toolbar independently of bookmarks. Choose icons in a searchable picker, customize supported state icons, reorder buttons, and select a More menu or wrapping rows. Preserve Skill confirmations, unavailable reasons, keyboard navigation, and Text fallback; hide the toolbar entirely when empty.
|
|
14
|
+
- Use OpenCode 2's built-in Todo history for the sidebar, with native completed-write and revert semantics, existing filters/progress, and manual Refresh. Keep edits in ordinary chat, preserve previous Navigator tasks as a read-only archive, and retain the independent provider-quota server integration.
|
|
15
|
+
- Support OpenCode 2.1's plugin and rendering APIs while retaining the OpenCode 1.x adapter; restore custom dialogs and rounded selections on the newer native renderer.
|
|
16
|
+
- Replace the shortcut toast with an icon-led hint featuring highlighted keys, navigation/update groups, a distinct Escape action, and responsive Text/no-corner-font layouts. Keep prompt focus and share its action list with scrollable keyboard help.
|
|
17
|
+
- Update Subagent status immediately from OpenCode 2's execution lifecycle and keep unresolved external credentials separate from verified provider accounts.
|
|
18
|
+
- Keep OpenCode updates on the current major line and preserve pinned-source Navigator updates when a target release needs newer runtime dependencies.
|
|
4
19
|
|
|
5
20
|
## [0.21.8] - 2026-10-09
|
|
6
21
|
|
|
@@ -112,6 +127,7 @@
|
|
|
112
127
|
|
|
113
128
|
Earlier release notes are available on [GitHub Releases](https://github.com/St1ggy/opencode-navigator/releases).
|
|
114
129
|
|
|
130
|
+
[0.22.0]: https://github.com/St1ggy/opencode-navigator/compare/v0.21.8...v0.22.0
|
|
115
131
|
[0.21.8]: https://github.com/St1ggy/opencode-navigator/compare/v0.21.7...v0.21.8
|
|
116
132
|
[0.21.7]: https://github.com/St1ggy/opencode-navigator/compare/v0.21.6...v0.21.7
|
|
117
133
|
[0.21.6]: https://github.com/St1ggy/opencode-navigator/compare/v0.21.5...v0.21.6
|
package/HOST_API.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Public Host APIs And Remaining Gaps
|
|
2
|
+
|
|
3
|
+
Navigator supports only OpenCode **1.19.5** and **2.2.0**, the current stable
|
|
4
|
+
release in each major line. Published SDK declarations and real-host checks
|
|
5
|
+
define the boundary; internal host components are not plugin APIs.
|
|
6
|
+
|
|
7
|
+
## Host-Owned Services
|
|
8
|
+
|
|
9
|
+
| Capability | OpenCode 1.19.5 | OpenCode 2.2.0 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Todo | Supported host Todo source/events | Public message cache, completed `todowrite` and revert boundary |
|
|
12
|
+
| Skills | Host discovery and prompt insertion | Native Skill cache and `session.skill` with exact ID |
|
|
13
|
+
| MCP | Host status and connection API | Native cache, sync/invalidate and connect/disconnect |
|
|
14
|
+
| Subagents | Supported child/status API and events | Native session cache/status and typed execution events |
|
|
15
|
+
| Commands | Public keymap | Public owned layers, targets, priorities, modes, discovery and dispatch |
|
|
16
|
+
| Dialogs/toasts | Public dialog components and mounting | Public show/prompt/confirm/set/clear and toast |
|
|
17
|
+
| Model/variant | Saved session model and host pickers | Reactive prompt model, variant API and host pickers |
|
|
18
|
+
| Provider usage | Codex's documented external protocol | Public Console/Go usage first; documented external sources outside coverage |
|
|
19
|
+
| Package updates | Public plugin manager | Public plugin manager |
|
|
20
|
+
|
|
21
|
+
## Focused Navigator Implementations
|
|
22
|
+
|
|
23
|
+
Each row records a missing capability, rather than a request failure that would
|
|
24
|
+
justify bypassing a native API.
|
|
25
|
+
|
|
26
|
+
| Implementation | Missing equivalent / preserved semantics | Removal condition |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Shared private preferences and atomic lock | A common 1.x/2.x store with existing data, Global/Worktree overrides, portable-default precedence and user-wide pins/groups/trust. The 2.x host store is per-channel/plugin, not this cross-host contract. No mirrored store is created. | A public shared store and supported migration preserving scopes and concurrency. |
|
|
29
|
+
| Nested dialog frames | The host has one active dialog, not the preceding frame's query, selection, scroll and unsaved draft. Simple prompts/confirms delegate to native APIs. | Native nested frames with equivalent restore and stale-target behavior. |
|
|
30
|
+
| Literal Ctrl+, hook on 2.x | Public plugin bindings are strings; the comma expander splits literal commas into alternatives. The named parser does not normalize `comma` to the actual comma event. Dispatch still uses the native command API. | A documented literal-comma binding passing the real Settings smoke. |
|
|
31
|
+
| Subagent child discovery | Published TUI Data caches sessions but has no complete children-sync operation. Initial/manual/reconnect discovery uses the public paginated API and syncs unknown IDs into the host cache. | A complete children-sync/query on the supplied public Data interface. |
|
|
32
|
+
| Subagent observation history and retry details | Native status and cached transcript retry data are used first; recent runs, pre-observation clock markers, errors and unloaded-child retry detail remain observation history. | Equivalent public observed-run/retry history without loading every transcript. |
|
|
33
|
+
| Read-only Todo projection | Native completed tool calls and revert are public; the host's `sessionTodos` helper is not exported. No direct CRUD/priority API exists. | A public equivalent projection; editing also requires an explicitly selected interaction and supported API. |
|
|
34
|
+
| Console/Go request lifecycle and projection | `client.usage.limits` is public, but the internal usage cache and budget selectors are not in published Plugin Context. Workspace IDs are not provider account IDs. | Equivalent public cache and selector on the plugin interface. |
|
|
35
|
+
| External quotas / reset credits | Console/Go is not a universal provider API and has no Codex reset-credit consume operation. Sources stay documented, account-bound and portable. Native auth/request errors never enable a bypass reader. | Host APIs matching provider/account/units/resets and idempotent consume semantics. |
|
|
36
|
+
| Pinned-file snapshot installer | Native package updates do not implement the recognized versioned wrapper/staging layout. Preserve installation source and scope. | A public atomic file-snapshot update API with equivalent verification. |
|
|
37
|
+
| Corner masks and product UI | Multiline shape, three-cell controls, filters, groups, presets and pins are product features. Paint hooks only draw; scroll restoration runs outside paint. | Equivalent public primitives preserving geometry, behavior and fallback mode. |
|
|
38
|
+
|
|
39
|
+
## Unavailable Features
|
|
40
|
+
|
|
41
|
+
- OpenCode 2.2 publishes no LSP source, restart operation or diagnostic counters
|
|
42
|
+
to TUI plugins. The 1.x status source remains available.
|
|
43
|
+
- The 2.x title is host-owned; no public fixed-title/date visibility slot exists.
|
|
44
|
+
- The 1.19.5 TUI API lacks a prompt-model accessor before submission.
|
|
45
|
+
- GUI, image-generation and instructions-entry APIs do not reactivate retired
|
|
46
|
+
Todo guidance or unrelated features.
|
|
47
|
+
|
|
48
|
+
## Verification And Runtime
|
|
49
|
+
|
|
50
|
+
Both current hosts have isolated real-host checks. Historical installer fixtures
|
|
51
|
+
exercise migration only; they do not extend the supported host matrix.
|
|
52
|
+
Development uses Bun 1.4.4 and OpenTUI 0.7, leaving Solid/OpenTUI external so the
|
|
53
|
+
host owns its runtime. The 1.x host ships older runtime modules; its actual smoke
|
|
54
|
+
must pass rather than injecting the development modules into it.
|
|
55
|
+
|
|
56
|
+
OpenTUI 0.7 supports Node >=26.4.0 or Bun >=1.3.14. The updater verifies a staged
|
|
57
|
+
target with an available compatible runtime before switching a recognized local
|
|
58
|
+
wrapper. A lazy root import succeeding under an older Node does not prove full
|
|
59
|
+
renderer/FFI support. CI and package verification use Node 26.12.1.
|
package/PROVIDERS.md
CHANGED
|
@@ -5,15 +5,21 @@ It never treats session token/cost totals as remaining provider quota. Subscript
|
|
|
5
5
|
windows, API rate limits, configured capacities, and monetary balances are different
|
|
6
6
|
measurements and are labelled separately.
|
|
7
7
|
|
|
8
|
-
The
|
|
8
|
+
The external provider contracts were rechecked on 2026-10-06; the public
|
|
9
|
+
OpenCode Console/Go contract was added on 2026-10-28. The runtime also includes providers from
|
|
9
10
|
the host catalog; an unrecognized provider gets an explicit unverified-source state
|
|
10
11
|
rather than fabricated quota values. Availability depends on the selected account,
|
|
11
12
|
permissions, region, transport, and supported host APIs.
|
|
12
13
|
|
|
13
14
|
## Audited Read Sources
|
|
14
15
|
|
|
16
|
+
OpenCode 2.2 adds a direct public `client.usage.limits` source for Console/Go.
|
|
17
|
+
It takes priority for verified host coverage; an auth, permission, rate-limit or
|
|
18
|
+
network failure does not switch to a credential-based or external reader.
|
|
19
|
+
|
|
15
20
|
| Provider | Native source | Scope and prerequisites | Reference |
|
|
16
21
|
| --- | --- | --- | --- |
|
|
22
|
+
| OpenCode Console / Go | Public OpenCode 2.2 `usage.limits` client API | Workspace identity, applicable USD budgets and percent-based Go windows; no Navigator server required | [Published client](https://cdn.jsdelivr.net/npm/@opencode/client@2.2.0/dist/promise/generated/client.d.ts), [Usage schema](https://github.com/anomalyco/opencode/blob/v2.2.0/packages/schema/src/usage-limits.ts) |
|
|
17
23
|
| OpenAI / Codex ChatGPT | Codex app-server account/rate-limit RPC and manual reset credits | Verified account identity; ordinary `codex` quota is account-scoped even with null model metadata; separate model buckets need explicit association; native durations describe quota windows, not time until reset | [Codex protocol](https://github.com/openai/codex/tree/main/codex-rs/app-server-protocol) |
|
|
18
24
|
| OpenAI API | HTTP request/token/project-token rate-limit headers | Actual response for the selected model/account; HTTP transport | [Rate limits](https://developers.openai.com/api/docs/guides/rate-limits) |
|
|
19
25
|
| Anthropic API | Native response headers and organization rate-limits API | Per-model headers; configured limits need an eligible org/admin credential and explicit model association | [Rate limits API](https://platform.claude.com/docs/en/manage-claude/rate-limits-api) |
|
|
@@ -51,7 +57,7 @@ permissions, region, transport, and supported host APIs.
|
|
|
51
57
|
| Qwen / Alibaba Cloud / DashScope | Model/project/cloud quota and billing permissions; browser OAuth state is not a portable quota source | [Model Studio docs](https://www.alibabacloud.com/help/en/model-studio/) |
|
|
52
58
|
| Hugging Face Inference Providers | Hub request quotas are not automatically inference-model quotas or inference credits | [Hub limits](https://huggingface.co/docs/hub/rate-limits), [Inference pricing](https://huggingface.co/docs/inference-providers/pricing) |
|
|
53
59
|
| Cloudflare Workers AI | Account billing/analytics and model/resource limits; do not derive remaining free allowance from static daily examples | [Workers AI limits](https://developers.cloudflare.com/workers-ai/platform/limits/) |
|
|
54
|
-
| OpenCode
|
|
60
|
+
| OpenCode Console / Go boundaries | Native workspace budgets and Go allowance are supported, not an inferred wallet balance; other providers need their own documented source | [Host usage source](https://github.com/anomalyco/opencode/blob/v2.2.0/packages/core/src/usage-limits.ts) |
|
|
55
61
|
| Cursor | Consumer account usage requires a supported external API; no browser cookies or local credential extraction | [Cursor docs](https://docs.cursor.com/) |
|
|
56
62
|
| Windsurf / Codeium | Consumer plan usage is separate from API response rate limits; no private account endpoints | [Windsurf docs](https://docs.windsurf.com/) |
|
|
57
63
|
| Amp | Product credits require a supported external account API; no credential-file or cookie integrations | [Amp manual](https://ampcode.com/manual) |
|
|
@@ -80,8 +86,9 @@ permissions, region, transport, and supported host APIs.
|
|
|
80
86
|
triggers inference, a credit purchase, a reset, or an authorization flow.
|
|
81
87
|
- HTTP-only observations may be absent for WebSocket transports. Report that
|
|
82
88
|
limitation instead of changing the host transport or reading private frames.
|
|
83
|
-
-
|
|
84
|
-
1.x keeps Codex support and capability
|
|
89
|
+
- Console/Go use the host client API directly; other native provider adapters use
|
|
90
|
+
the OpenCode 2 server plugin. OpenCode 1.x keeps Codex support and capability
|
|
91
|
+
guidance without accessing host internals.
|
|
85
92
|
- REST credentials are not reused against a native provider origin when the host
|
|
86
93
|
explicitly configures a different gateway origin. Redirects are rejected.
|
|
87
94
|
- Contract fixtures cover endpoint selection, regions, units, pagination, account
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ See the [changelog](CHANGELOG.md) for release-by-release changes.
|
|
|
12
12
|
|
|
13
13
|
- Theme-aware session title with the session creation date
|
|
14
14
|
- First-run setup guide with interactive section settings
|
|
15
|
-
- Collapsible Todo section with status filters, grouped tasks
|
|
15
|
+
- Collapsible Todo section with status filters, grouped tasks and progress; OpenCode 2 follows the host's native Todo history, while OpenCode 1.x retains supported priority indicators
|
|
16
16
|
- Active subagent list with live statuses and click-to-open navigation, including dev-team workers running in separate local processes
|
|
17
17
|
- Compact, searchable workspace skill list with user-wide favorites and groups, recent skills, source details, and click-to-confirm slash commands
|
|
18
18
|
- Configurable host quick actions, including OpenCode 1.x's auto-approve toggle and OpenCode 2.x's Permissions settings, with user-wide bookmarks and availability reasons
|
|
@@ -34,6 +34,7 @@ See the [changelog](CHANGELOG.md) for release-by-release changes.
|
|
|
34
34
|
- Copy the selected scope's layout and MCP states as versioned JSON, then validate and preview imports
|
|
35
35
|
- Focus the sidebar with `Ctrl+Shift+F`, then navigate with arrows or `j`/`k`
|
|
36
36
|
- Open sidebar shortcut mode with `Ctrl+Shift+B`; press `h` to toggle the panel, `c` to check Navigator updates, or `u` to check and confirm an update
|
|
37
|
+
- Scan an icon-led shortcut hint with highlighted keys, separate navigation/update groups, and a clear Escape action; narrow terminals and Text fallback use the same controls
|
|
37
38
|
- Optionally open new sessions directly in an empty chat with the sidebar, skipping Home on startup and from New session
|
|
38
39
|
- Keep OpenCode's compact footer while showing host and Navigator versions with independent update indicators; click a version label or its update icon to confirm an in-place update through the current installation method and scope
|
|
39
40
|
|
|
@@ -41,10 +42,15 @@ Todo starts expanded. Subagents, skills, quick actions, LSP, and MCP start
|
|
|
41
42
|
collapsed. Use `Save current layout as default` in sidebar settings to reuse the
|
|
42
43
|
current visible/hidden, expanded/collapsed, and ordering states in new sessions.
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
**Only the latest stable release in each major line is supported: OpenCode
|
|
46
|
+
1.19.5 and 2.2.0.** Both have separate real-host checks. Older releases are not
|
|
47
|
+
part of the supported compatibility matrix. The 2.2 integration uses OpenTUI 0.7
|
|
48
|
+
and public host caches, events, keymap layers, and client APIs while retaining
|
|
49
|
+
the separate 1.x adapter. See [Host API boundaries](HOST_API.md) for remaining
|
|
50
|
+
capability gaps and removal conditions. On OpenCode 2, Navigator reads the same native Todo history as
|
|
51
|
+
the host sidebar, including completed `todowrite` calls and the current revert
|
|
52
|
+
boundary. Viewing Todo needs no Navigator server plugin. OpenCode 2.1 exposes
|
|
53
|
+
content and four statuses, without priorities or direct Todo CRUD. LSP is hidden on 2.x while retaining Subagents,
|
|
48
54
|
Skills, Quick Actions, MCP, Search, settings, and presets. All interface icons use Nerd Font glyphs by
|
|
49
55
|
default (Codicons for controls, keyboard symbols for hints, language logos for LSP). Use a Nerd Fonts v3
|
|
50
56
|
terminal font, or select **Settings → Behavior → Icon style → Text fallback**.
|
|
@@ -145,7 +151,7 @@ the uninstalled-font result remains visible rather than being documented only in
|
|
|
145
151
|
|
|
146
152
|

|
|
147
153
|
|
|
148
|
-
The [complete
|
|
154
|
+
The [complete screenshot gallery](screenshots/README.md) shows every
|
|
149
155
|
Todo and Subagent filter, sidebar section, Search and Settings tab, preset menu
|
|
150
156
|
and preview, confirmation, keyboard-help, setup, and icon-fallback state.
|
|
151
157
|
|
|
@@ -190,9 +196,28 @@ OpenCode 2.x CLI plugins are global terminal settings; there is no project-local
|
|
|
190
196
|
plugin overrides are required. OpenCode validates `cli.json` strictly, so keep it
|
|
191
197
|
within the linked schema and restart OpenCode after changing it.
|
|
192
198
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
OpenCode 2.1's built-in Todo tool is opt-in. Enable it in the OpenCode server
|
|
200
|
+
configuration used by that host, then restart OpenCode:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"$schema": "https://opencode.ai/config.json",
|
|
205
|
+
"experimental": { "todo": true }
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Ask the agent in ordinary chat to create or change the list through `todowrite`.
|
|
210
|
+
Navigator displays the latest completed native call before the session's revert
|
|
211
|
+
boundary, reacts to host updates, and offers All / Active / Finished filters,
|
|
212
|
+
status groups, progress, Refresh, and retry after read failures. It does not start
|
|
213
|
+
model requests from Todo controls. Running or failed writes leave the last
|
|
214
|
+
completed list visible; a completed write with an empty array clears it.
|
|
215
|
+
Native tasks have `content` and one of `pending`, `in_progress`, `completed`, or
|
|
216
|
+
`cancelled`; priorities remain unavailable in OpenCode 2's native schema.
|
|
217
|
+
|
|
218
|
+
The optional **server** half of Navigator is used for provider-native quotas and
|
|
219
|
+
read-only access to the previous Navigator Todo archive. Add it to the server
|
|
220
|
+
configuration only when those integrations are needed:
|
|
196
221
|
|
|
197
222
|
```json
|
|
198
223
|
{
|
|
@@ -204,14 +229,25 @@ Add the same package to `~/.config/opencode/opencode.json` (or the project
|
|
|
204
229
|
For a local source installation, use the directory containing Navigator's
|
|
205
230
|
`server.js` in the `plugin` array. Keep the TUI package in `cli.json` as above;
|
|
206
231
|
the server configuration alone does not replace it. Restart OpenCode after
|
|
207
|
-
configuring both.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
232
|
+
configuring both. OpenCode owns native Todo persistence and tool instructions;
|
|
233
|
+
the separate `navigator_todo_write` tool and Navigator Todo-instructions control
|
|
234
|
+
are retired. OpenCode 1.x continues to show its supported host Todo source.
|
|
235
|
+
|
|
236
|
+
Previous Navigator tasks stay in their original plugin-scoped storage. Their
|
|
237
|
+
existing RPC is now a read-only archive; it never replaces native history or
|
|
238
|
+
deletes the saved list. To inspect a previous session explicitly:
|
|
239
|
+
|
|
240
|
+
```sh
|
|
241
|
+
opencode api --standalone rpc.call --param rpcID=opencode-navigator.todo --param method=list --data '{"input":{"sessionID":"ses_previous"},"location":{"directory":"/path/to/project"}}'
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
After reviewing the archive, an ordinary chat request can transfer its content
|
|
245
|
+
and statuses through the host's native tool. Archive reads do not change tasks
|
|
246
|
+
or add model instructions.
|
|
212
247
|
|
|
213
248
|
If you use both OpenCode 1.x and 2.x with the same global `opencode.json`, keep
|
|
214
|
-
that shared server config compatible with 1.x. Place the
|
|
249
|
+
that shared server config compatible with 1.x. Place the 2.x experimental Todo
|
|
250
|
+
setting and optional server-plugin entry
|
|
215
251
|
in a separate JSON file and set `OPENCODE_CONFIG` to its path **only when
|
|
216
252
|
launching OpenCode 2.x**. The TUI configuration in `cli.json` remains separate;
|
|
217
253
|
the OpenCode 1.x launch must not load Navigator's 2.x server plugin.
|
|
@@ -346,6 +382,36 @@ Search Everything. Usage never changes the order. Visibility remains independent
|
|
|
346
382
|
so any action, including a bookmarked one, can be hidden from the sidebar while it
|
|
347
383
|
remains searchable. Unavailable actions stay visible with a route- or host-specific reason.
|
|
348
384
|
|
|
385
|
+
### Pinned toolbar
|
|
386
|
+
|
|
387
|
+
Pin frequently used Quick Actions and Skills to an icon toolbar above the sidebar's
|
|
388
|
+
sections. In OpenCode 2.x it sits below the host-owned title. An empty toolbar takes
|
|
389
|
+
no space. Pins are independent of bookmarks, section visibility, filters, and item limits.
|
|
390
|
+
|
|
391
|
+
Use the pin control on an Action or Skill row, or open **Settings → Behavior →
|
|
392
|
+
Pinned toolbar…**. The command palette also offers **Manage pinned toolbar**.
|
|
393
|
+
Choose a base icon in the searchable picker, then select **Pin to toolbar**.
|
|
394
|
+
The manager lets you change icons, move buttons, or unpin them. Cancelling the
|
|
395
|
+
picker returns to the draft; cancelling the draft discards its changes.
|
|
396
|
+
|
|
397
|
+
Where the host exposes a state, the same button can use a different icon for each
|
|
398
|
+
state: auto-approve On/Off on OpenCode 1.x, and Idle/Compacting on OpenCode 2.x.
|
|
399
|
+
The 2.x permissions button opens host Settings and uses its base icon. Hover or
|
|
400
|
+
keyboard focus shows the button's name, observed state, or unavailable reason.
|
|
401
|
+
Skill buttons retain confirmation and trust settings; a missing or ambiguous
|
|
402
|
+
source stays pinned but cannot run.
|
|
403
|
+
|
|
404
|
+
**Behavior → Toolbar overflow** switches between one row with a **More** menu
|
|
405
|
+
(the default) and wrapping rows. Left/Right moves along a row; Up/Down moves
|
|
406
|
+
between rows. The setting follows Global/Worktree scope and portable defaults.
|
|
407
|
+
Pins, their order, icons, and exact Skill sources are private user-wide preferences
|
|
408
|
+
and are excluded from portable exports. Use **Reload settings from file** in other
|
|
409
|
+
running sessions after saving changes in another instance.
|
|
410
|
+
|
|
411
|
+

|
|
412
|
+
|
|
413
|
+

|
|
414
|
+
|
|
349
415
|
In OpenCode 1.x, Navigator saves changes to the auto-approve mode as a user-wide
|
|
350
416
|
default, including changes made through OpenCode's own command palette. Set the
|
|
351
417
|
default under **Navigator Settings → Behavior → Default auto-approve permissions**;
|
|
@@ -372,7 +438,7 @@ account usage. Separate model-specific buckets require explicit model associatio
|
|
|
372
438
|
Switching provider, model, session, or account invalidates stale reads and credit actions.
|
|
373
439
|
In OpenCode 2.x, Limits follows the prompt's selected model immediately, before a
|
|
374
440
|
message is sent, through the public reactive `ui.model.current()` API. OpenCode
|
|
375
|
-
1.x
|
|
441
|
+
1.x, rechecked at 1.19.5, exposes only the saved session model: a newly selected prompt
|
|
376
442
|
model becomes visible to Navigator when the host saves it, normally on submission.
|
|
377
443
|
An immediate pre-submission switch in 1.x needs a new public host accessor or event.
|
|
378
444
|
CodexBar is useful for discovering providers, but its cookie, credential-file,
|
|
@@ -380,6 +446,7 @@ and undocumented endpoint integrations are not Navigator data sources.
|
|
|
380
446
|
|
|
381
447
|
| Source | Native measurement | Banked reset credits |
|
|
382
448
|
| --- | --- | --- |
|
|
449
|
+
| OpenCode Console / Go | Public host usage API: applicable workspace budgets in USD and Go allowance percentages with reset times | Read-only |
|
|
383
450
|
| Codex app-server | Rate-limit windows and account ID | Available count, optional details and expiry, confirmed manual consumption |
|
|
384
451
|
| MiniMax and NanoGPT | Explicit model-associated subscription windows; separate pay-as-you-go balances | Read-only |
|
|
385
452
|
| GitHub Copilot | Official SDK token-scoped premium allowance, checked against the selected model's billing metadata | Read-only |
|
|
@@ -389,10 +456,17 @@ and undocumented endpoint integrations are not Navigator data sources.
|
|
|
389
456
|
| OpenCode session statistics | Token and cost statistics, not subscription quota | Not applicable |
|
|
390
457
|
| Other providers | Capability guidance until a documented source and model/account mapping are verified | No action without a documented consume API |
|
|
391
458
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
459
|
+
OpenCode Console and Go use OpenCode 2.2's **public usage API directly**, without
|
|
460
|
+
the Navigator server plugin or credential reads. Workspace identity stays separate
|
|
461
|
+
from provider account identity. Shared and per-model budgets retain their native
|
|
462
|
+
scope; free models and unrelated model budgets are excluded. Missing data does
|
|
463
|
+
not mean zero spend or an unlimited allowance. Authentication and request failures
|
|
464
|
+
stay on the native source with explicit guidance or Retry.
|
|
465
|
+
|
|
466
|
+
Other additional sources use the **OpenCode 2 Navigator server plugin** and its
|
|
467
|
+
public integration/HTTP APIs. Configure it on the 2.x launch path as described in
|
|
468
|
+
the installation section. Native Todo remains independent. OpenCode 1.x retains
|
|
469
|
+
Codex support; sources requiring the 2.x server show setup guidance when it is absent.
|
|
396
470
|
The [source inventory](PROVIDERS.md) includes audited public API references,
|
|
397
471
|
permission requirements, and unsupported-source reasons.
|
|
398
472
|
|
|
@@ -403,6 +477,12 @@ response bodies. HTTP-only observations may be absent on WebSocket transports.
|
|
|
403
477
|
REST reads use a short in-memory cache; Refresh bypasses it. Observed headers older
|
|
404
478
|
than two minutes are marked stale instead of presented as current remaining quota.
|
|
405
479
|
|
|
480
|
+
Navigator shares the host's Solid/OpenTUI runtime. Development and CI use Bun 1.4.4
|
|
481
|
+
and Node 26.12.1; OpenTUI 0.7's supported Node path starts at 26.4.0. A confirmed
|
|
482
|
+
pinned-snapshot update verifies its target with supported Bun (at least 1.3.14)
|
|
483
|
+
or Node before switching the wrapper. If neither is available, the running snapshot
|
|
484
|
+
is preserved with guidance; the updater does not install a runtime globally.
|
|
485
|
+
|
|
406
486
|
Limits is visible and expanded by default, first below the session title. Change
|
|
407
487
|
its visibility and order under **Settings → Sections** in Global or Current
|
|
408
488
|
worktree scope. Hiding or collapsing it does not stop background refreshes, and
|
|
@@ -411,6 +491,10 @@ available from the command palette.
|
|
|
411
491
|
|
|
412
492
|

|
|
413
493
|
|
|
494
|
+

|
|
495
|
+
|
|
496
|
+

|
|
497
|
+
|
|
414
498
|
### Link the intended Codex account
|
|
415
499
|
|
|
416
500
|
Install a Codex CLI exposing the documented read and consume RPCs (verified with
|
|
@@ -519,6 +603,7 @@ Navigator plugin tuple:
|
|
|
519
603
|
"cornerFont": true,
|
|
520
604
|
"lspIconStyle": "nerd",
|
|
521
605
|
"rowDensity": "compact",
|
|
606
|
+
"toolbarOverflow": "menu",
|
|
522
607
|
"sectionItemLimits": { "todo": 0, "skills": 5, "mcp": 5 },
|
|
523
608
|
"quickActionOrder": ["session.rename", "session.copy", "session.fork"],
|
|
524
609
|
"quickActionVisibility": { "session.export": false }
|
|
@@ -556,7 +641,7 @@ density, item limits, and Navigator's safe Quick Action allowlist. Unknown value
|
|
|
556
641
|
sections, actions, and MCP states are discarded. The previous snake_case tuple
|
|
557
642
|
options (`toggle_key`, `focus_key`, `search_key`, `persist_mcp`, `limits_refresh_minutes`, `start_in_chat`, `show_session_title`,
|
|
558
643
|
`show_session_date`, `corner_font`, `icon_style`,
|
|
559
|
-
`lsp_icon_style`, `row_density`, `section_item_limits`, `quick_action_order`,
|
|
644
|
+
`lsp_icon_style`, `row_density`, `toolbar_overflow`, `section_item_limits`, `quick_action_order`,
|
|
560
645
|
`quick_action_visibility`, `sections`, and `section_order`) remain compatible;
|
|
561
646
|
canonical nested fields win when both forms are present.
|
|
562
647
|
|
|
@@ -667,14 +752,23 @@ Press `Ctrl+Shift+B` to enter Navigator shortcuts, then choose an action:
|
|
|
667
752
|
| `u` | Check for a Navigator update, then open its confirmation if available |
|
|
668
753
|
| `Escape` | Cancel shortcut mode |
|
|
669
754
|
|
|
670
|
-
The mode ends after an action or five seconds of inactivity. Its
|
|
671
|
-
|
|
755
|
+
The mode ends after an action or five seconds of inactivity. Its compact,
|
|
756
|
+
non-modal hint groups section navigation separately from update actions, uses
|
|
757
|
+
icons and highlighted key tokens, and keeps Escape visible. It adapts to narrow
|
|
758
|
+
or short terminals, light/dark themes, Text fallback, and the no-corner-font
|
|
759
|
+
setting without taking focus from the prompt. Keyboard help uses the same
|
|
760
|
+
action inventory and supports arrow-key and page-key scrolling. Only actions
|
|
761
|
+
supported by the current host are listed; LSP is omitted on OpenCode 2.x. Change the
|
|
672
762
|
entry shortcut under **Settings → Behavior**. The command palette also offers
|
|
673
763
|
**Check Navigator updates** and **Update Navigator**.
|
|
674
764
|
|
|
675
765
|
Manual checks report when Navigator is current or the update source is unavailable.
|
|
676
766
|
Updates require confirmation, preserve the existing installation method and scope,
|
|
677
|
-
and show a restart reminder after completion.
|
|
767
|
+
and show a restart reminder after completion. OpenCode updates stay on the running
|
|
768
|
+
major line; moving from 1.x to 2.x remains a separate installation decision.
|
|
769
|
+
Confirmed pinned-source Navigator updates install the target release's runtime
|
|
770
|
+
dependencies in a new snapshot before switching its wrapper. The previous
|
|
771
|
+
snapshot and private settings remain intact. Background check failures stay quiet.
|
|
678
772
|
|
|
679
773
|
### Search Everything
|
|
680
774
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var SIDEBAR_SECTIONS=["limits","todo","subagents","skills","quick_actions","lsp","mcp"]
|
|
2
|
+
var SECTION_DEFINITIONS=[{name:"limits",label:"Limits"},{name:"todo",label:"Todo"},{name:"subagents",label:"Subagents"},{name:"skills",label:"Skills"},{name:"quick_actions",label:"Quick actions"},{name:"lsp",label:"LSP"},{name:"mcp",label:"MCP"}];
|
|
3
|
+
var MAX_LIMITS_REFRESH_MINUTES=Math.floor(2147483647 / 60000);
|
|
4
|
+
var PLUGIN_ID="opencode-navigator"
|
|
5
|
+
var TOGGLE_COMMAND=`${PLUGIN_ID}.toggle`
|
|
6
|
+
var FOCUS_COMMAND=`${PLUGIN_ID}.focus`
|
|
7
|
+
var SEARCH_COMMAND=`${PLUGIN_ID}.search`
|
|
8
|
+
var DEFAULT_SEARCH_KEY="ctrl+shift+k"
|
|
9
|
+
export{SIDEBAR_SECTIONS,SECTION_DEFINITIONS,PLUGIN_ID,DEFAULT_SEARCH_KEY}
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function mcpToggleAction(status){if(status==="pending")
|
|
2
|
+
return
|
|
3
|
+
return status==="connected"?"disconnect":"connect"
|
|
4
|
+
}
|
|
5
|
+
function mcpPresetPreview(items,states){const byName=new Map(items.map((item)=>[item.name,item]))
|
|
6
|
+
const names=[...new Set([...Object.keys(states),...byName.keys()])].sort((a,b)=>a.localeCompare(b))
|
|
7
|
+
const rows=names.map((name)=>{const item=byName.get(name)
|
|
8
|
+
const desired=Object.hasOwn(states,name)?states[name]:undefined
|
|
9
|
+
const action=item&&mcpToggleAction(item.status)
|
|
10
|
+
let change="unchanged"
|
|
11
|
+
if(desired&&!item)
|
|
12
|
+
change="missing"
|
|
13
|
+
else if(desired&&!action)
|
|
14
|
+
change="unavailable"
|
|
15
|
+
else if(desired==="enabled"&&action==="connect"||desired==="disabled"&&action==="disconnect"){change=action
|
|
16
|
+
}
|
|
17
|
+
return{name,status:item?.status,desired,change}})
|
|
18
|
+
const changes=rows.flatMap((row)=>row.change==="connect"||row.change==="disconnect"?[{name:row.name,action:row.change}]:[])
|
|
19
|
+
return{rows,changes}}
|
|
20
|
+
export{mcpPresetPreview}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import {use as _$use} from "@opentui/solid"
|
|
2
|
+
import {effect as _$effect3} from "@opentui/solid"
|
|
3
|
+
import {createTextNode as _$createTextNode} from "@opentui/solid"
|
|
4
|
+
import {insertNode as _$insertNode} from "@opentui/solid"
|
|
5
|
+
import {insert as _$insert3} from "@opentui/solid"
|
|
6
|
+
import {memo as _$memo3} from "@opentui/solid"
|
|
7
|
+
import {setProp as _$setProp3} from "@opentui/solid"
|
|
8
|
+
import {createElement as _$createElement3} from "@opentui/solid"
|
|
9
|
+
import {createComponent as _$createComponent3} from "@opentui/solid"
|
|
10
|
+
import {useTerminalDimensions} from "@opentui/solid"
|
|
11
|
+
import {For,createEffect,createMemo,createSignal as createSignal2,onCleanup} from "solid-js"
|
|
12
|
+
import {DialogHeader,DialogSurface,SelectionBox as SelectionBox3,terminalIcon as terminalIcon2,terminalIconIDs,terminalIconLabel as terminalIconLabel2,useDialogState,useDialogs,useIcons as useIcons3} from "./tui.js"
|
|
13
|
+
import {createComponent as _$createComponent} from "@opentui/solid"
|
|
14
|
+
import {effect as _$effect} from "@opentui/solid"
|
|
15
|
+
import {insert as _$insert} from "@opentui/solid"
|
|
16
|
+
import {setProp as _$setProp} from "@opentui/solid"
|
|
17
|
+
import {createElement as _$createElement} from "@opentui/solid"
|
|
18
|
+
import {memo as _$memo} from "@opentui/solid"
|
|
19
|
+
import {SelectionBox,terminalIcon,terminalIconLabel,useIcons} from "./tui.js"
|
|
20
|
+
function IconPickerItem(props){const icons=useIcons()
|
|
21
|
+
const theme=()=>props.api.theme.current
|
|
22
|
+
return _$createComponent(SelectionBox,{get id(){return `icon-picker.${props.id}`
|
|
23
|
+
},width:9,height:2,paddingLeft:1,paddingRight:1,get backgroundColor(){return _$memo(()=>!!props.active)()?theme().backgroundElement:undefined
|
|
24
|
+
},get onMouseOver(){return props.onHover
|
|
25
|
+
},onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
26
|
+
props.onSelect()
|
|
27
|
+
},get children(){return [(()=>{var _el$=_$createElement("text")
|
|
28
|
+
_$setProp(_el$,"truncate",true)
|
|
29
|
+
_$setProp(_el$,"wrapMode","none")
|
|
30
|
+
_$insert(_el$,()=>terminalIcon(props.id,icons.style()),null)
|
|
31
|
+
_$insert(_el$,()=>props.selected?" *":"",null)
|
|
32
|
+
_$effect((_$p)=>_$setProp(_el$,"fg",props.active||props.selected?theme().accent:theme().text,_$p))
|
|
33
|
+
return _el$
|
|
34
|
+
})(),(()=>{var _el$2=_$createElement("text")
|
|
35
|
+
_$setProp(_el$2,"truncate",true)
|
|
36
|
+
_$setProp(_el$2,"wrapMode","none")
|
|
37
|
+
_$insert(_el$2,()=>terminalIconLabel(props.id))
|
|
38
|
+
_$effect((_$p)=>_$setProp(_el$2,"fg",theme().textMuted,_$p))
|
|
39
|
+
return _el$2
|
|
40
|
+
})()]
|
|
41
|
+
}})
|
|
42
|
+
}
|
|
43
|
+
import {createComponent as _$createComponent2} from "@opentui/solid"
|
|
44
|
+
import {setProp as _$setProp2} from "@opentui/solid"
|
|
45
|
+
import {effect as _$effect2} from "@opentui/solid"
|
|
46
|
+
import {insert as _$insert2} from "@opentui/solid"
|
|
47
|
+
import {createElement as _$createElement2} from "@opentui/solid"
|
|
48
|
+
import {memo as _$memo2} from "@opentui/solid"
|
|
49
|
+
import {createSignal} from "solid-js"
|
|
50
|
+
import {SelectionBox as SelectionBox2,useIcons as useIcons2} from "./tui.js"
|
|
51
|
+
function IconPickerSearch(props){const icons=useIcons2()
|
|
52
|
+
const [focused,setFocused]=createSignal(true)
|
|
53
|
+
const theme=()=>props.api.theme.current
|
|
54
|
+
const fg=()=>focused()?theme().selectedListItemText:theme().text
|
|
55
|
+
return _$createComponent2(SelectionBox2,{paddingLeft:1,paddingRight:1,flexDirection:"row",gap:1,get backgroundColor(){return _$memo2(()=>!!focused())()?theme().primary:theme().backgroundElement
|
|
56
|
+
},get children(){return [(()=>{var _el$=_$createElement2("text")
|
|
57
|
+
_$insert2(_el$,()=>icons.icon("search"))
|
|
58
|
+
_$effect2((_$p)=>_$setProp2(_el$,"fg",fg(),_$p))
|
|
59
|
+
return _el$
|
|
60
|
+
})(),(()=>{var _el$2=_$createElement2("input")
|
|
61
|
+
_$setProp2(_el$2,"id","icon-picker.search")
|
|
62
|
+
_$setProp2(_el$2,"flexGrow",1)
|
|
63
|
+
_$setProp2(_el$2,"focused",true)
|
|
64
|
+
_$setProp2(_el$2,"placeholder","Search icons...")
|
|
65
|
+
_$setProp2(_el$2,"on:focused",()=>setFocused(true))
|
|
66
|
+
_$setProp2(_el$2,"on:blurred",()=>setFocused(false))
|
|
67
|
+
_$setProp2(_el$2,"backgroundColor","transparent")
|
|
68
|
+
_$setProp2(_el$2,"focusedBackgroundColor","transparent")
|
|
69
|
+
_$effect2((_p$)=>{var{query:_v$,onInput:_v$2}=props,_v$3=fg(),_v$4=fg(),_v$5=fg(),_v$6=fg()
|
|
70
|
+
_v$!==_p$.e&&(_p$.e=_$setProp2(_el$2,"value",_v$,_p$.e))
|
|
71
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp2(_el$2,"onInput",_v$2,_p$.t))
|
|
72
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp2(_el$2,"textColor",_v$3,_p$.a))
|
|
73
|
+
_v$4!==_p$.o&&(_p$.o=_$setProp2(_el$2,"focusedTextColor",_v$4,_p$.o))
|
|
74
|
+
_v$5!==_p$.i&&(_p$.i=_$setProp2(_el$2,"placeholderColor",_v$5,_p$.i))
|
|
75
|
+
_v$6!==_p$.n&&(_p$.n=_$setProp2(_el$2,"cursorColor",_v$6,_p$.n))
|
|
76
|
+
return _p$
|
|
77
|
+
},{e:undefined,t:undefined,a:undefined,o:undefined,i:undefined,n:undefined
|
|
78
|
+
})
|
|
79
|
+
return _el$2
|
|
80
|
+
})()]
|
|
81
|
+
}})
|
|
82
|
+
}
|
|
83
|
+
function IconPicker(props){const icons=useIcons3()
|
|
84
|
+
const dialogs=useDialogs(props.api)
|
|
85
|
+
const dimensions=useTerminalDimensions()
|
|
86
|
+
const [query,setQuery]=useDialogState("icon-query","")
|
|
87
|
+
const [active,setActive]=useDialogState("icon-active",props.value)
|
|
88
|
+
const keywords={bolt:"action lightning",gear:"settings configuration",shield:"permissions security",copy:"clipboard transcript",check:"done success",refresh:"compact reload retry",book:"skill documentation",pin:"favorite bookmark"
|
|
89
|
+
}
|
|
90
|
+
const items=createMemo(()=>terminalIconIDs.filter((id)=>`${terminalIconLabel2(id)} ${keywords[id] ?? ""}`.includes(query().toLowerCase().trim())))
|
|
91
|
+
const [width,setWidth]=createSignal2(Math.max(10,dimensions().width-12))
|
|
92
|
+
const columns=createMemo(()=>Math.max(1,Math.min(6,Math.floor(width() / 10))))
|
|
93
|
+
const rows=createMemo(()=>Array.from({length:Math.ceil(items().length / columns())
|
|
94
|
+
},(_,index)=>items().slice(index*columns(),(index + 1)*columns())))
|
|
95
|
+
let body
|
|
96
|
+
createEffect(()=>{if(!items().includes(active()))
|
|
97
|
+
setActive(items()[0]??"")
|
|
98
|
+
})
|
|
99
|
+
function move(offset,horizontal=false){const index=items().indexOf(active())
|
|
100
|
+
const start=horizontal?Math.floor(index / columns())*columns():0
|
|
101
|
+
const end=horizontal?Math.min(items().length-1,start + columns()-1):items().length-1
|
|
102
|
+
const next=items()[Math.max(start,Math.min(end,index + offset))]
|
|
103
|
+
if(next){setActive(next)
|
|
104
|
+
body?.scrollChildIntoView(`icon-picker.${next}`)
|
|
105
|
+
}}
|
|
106
|
+
function select(id=active()){if(items().includes(id))
|
|
107
|
+
props.onSelect(id)
|
|
108
|
+
}
|
|
109
|
+
const prefix="opencode-navigator.icon-picker"
|
|
110
|
+
const unregister=props.api.keymap.registerLayer({mode:"modal",priority:1000,commands:[{name:`${prefix}.left`,run:()=>move(-1,true)
|
|
111
|
+
},{name:`${prefix}.right`,run:()=>move(1,true)
|
|
112
|
+
},{name:`${prefix}.up`,run:()=>move(-columns())
|
|
113
|
+
},{name:`${prefix}.down`,run:()=>move(columns())
|
|
114
|
+
},{name:`${prefix}.select`,run:()=>select()
|
|
115
|
+
}],bindings:["left","right","up","down","return"].map((key)=>({key,cmd:`${prefix}.${key === "return" ? "select" : key}`
|
|
116
|
+
}))
|
|
117
|
+
})
|
|
118
|
+
onCleanup(unregister)
|
|
119
|
+
const theme=()=>props.api.theme.current
|
|
120
|
+
return _$createComponent3(DialogSurface,{get api(){return props.api
|
|
121
|
+
},id:"opencode-navigator.icon-picker",get children(){return [_$createComponent3(DialogHeader,{get api(){return props.api
|
|
122
|
+
},title:"Choose an icon",get onBack(){return dialogs.back
|
|
123
|
+
}}),_$createComponent3(IconPickerSearch,{get api(){return props.api
|
|
124
|
+
},get query(){return query()
|
|
125
|
+
},onInput:setQuery
|
|
126
|
+
}),_$createComponent3(SelectionBox3,{paddingLeft:1,paddingRight:1,get backgroundColor(){return theme().backgroundElement
|
|
127
|
+
},get children(){var _el$=_$createElement3("text"),_el$2=_$createTextNode(` `)
|
|
128
|
+
_$insertNode(_el$,_el$2)
|
|
129
|
+
_$setProp3(_el$,"wrapMode","none")
|
|
130
|
+
_$setProp3(_el$,"truncate",true)
|
|
131
|
+
_$insert3(_el$,()=>terminalIcon2(active(),icons.style()),_el$2)
|
|
132
|
+
_$insert3(_el$,()=>terminalIconLabel2(active())||"No matching icons",null)
|
|
133
|
+
_$insert3(_el$,()=>active()===props.value?" \xB7 selected":"",null)
|
|
134
|
+
_$effect3((_$p)=>_$setProp3(_el$,"fg",theme().accent,_$p))
|
|
135
|
+
return _el$
|
|
136
|
+
}}),(()=>{var _el$3=_$createElement3("scrollbox")
|
|
137
|
+
_$use((node)=>{body=node
|
|
138
|
+
},_el$3)
|
|
139
|
+
_$setProp3(_el$3,"onSizeChange",function(){setWidth(this.width)
|
|
140
|
+
})
|
|
141
|
+
_$setProp3(_el$3,"scrollX",false)
|
|
142
|
+
_$insert3(_el$3,_$createComponent3(For,{get each(){return rows()
|
|
143
|
+
},children:(row)=>(()=>{var _el$0=_$createElement3("box")
|
|
144
|
+
_$setProp3(_el$0,"flexDirection","row")
|
|
145
|
+
_$setProp3(_el$0,"gap",1)
|
|
146
|
+
_$insert3(_el$0,_$createComponent3(For,{each:row,children:(id)=>_$createComponent3(IconPickerItem,{get api(){return props.api
|
|
147
|
+
},id,get active(){return id===active()
|
|
148
|
+
},get selected(){return id===props.value
|
|
149
|
+
},onHover:()=>setActive(id),onSelect:()=>select(id)
|
|
150
|
+
})
|
|
151
|
+
}))
|
|
152
|
+
return _el$0
|
|
153
|
+
})()
|
|
154
|
+
}))
|
|
155
|
+
_$effect3((_$p)=>_$setProp3(_el$3,"height",Math.max(2,Math.min(10,Math.floor(dimensions().height*0.6)-9)),_$p))
|
|
156
|
+
return _el$3
|
|
157
|
+
})(),(()=>{var _el$4=_$createElement3("text"),_el$5=_$createTextNode(` rows \xB7 `),_el$6=_$createTextNode(` icons \xB7 `),_el$7=_$createTextNode(` choose \xB7 `),_el$8=_$createTextNode(` cancel`)
|
|
158
|
+
_$insertNode(_el$4,_el$5)
|
|
159
|
+
_$insertNode(_el$4,_el$6)
|
|
160
|
+
_$insertNode(_el$4,_el$7)
|
|
161
|
+
_$insertNode(_el$4,_el$8)
|
|
162
|
+
_$setProp3(_el$4,"height",1)
|
|
163
|
+
_$setProp3(_el$4,"truncate",true)
|
|
164
|
+
_$setProp3(_el$4,"wrapMode","none")
|
|
165
|
+
_$insert3(_el$4,()=>icons.key("up/down"),_el$5)
|
|
166
|
+
_$insert3(_el$4,()=>icons.key("left/right"),_el$6)
|
|
167
|
+
_$insert3(_el$4,()=>icons.key("enter"),_el$7)
|
|
168
|
+
_$insert3(_el$4,()=>icons.key("esc"),_el$8)
|
|
169
|
+
_$effect3((_$p)=>_$setProp3(_el$4,"fg",theme().textMuted,_$p))
|
|
170
|
+
return _el$4
|
|
171
|
+
})()]
|
|
172
|
+
}})
|
|
173
|
+
}
|
|
174
|
+
export{IconPicker
|
|
175
|
+
}
|