opencode-navigator 0.22.0 → 0.24.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 +19 -0
- package/HOST_API.md +78 -0
- package/PROVIDERS.md +11 -4
- package/README.md +93 -10
- package/dist/{chunk-dz8cfnfs.js → chunk-bv0nm1tj.js} +4 -4
- package/dist/chunk-fd7394y1.js +17 -0
- package/dist/chunk-pwa1wzer.js +22 -0
- package/dist/layout-preset-actions.js +5 -11
- package/dist/navigator-updates.js +63 -25
- package/dist/provider-limits.js +127 -22
- package/dist/quick-actions-settings.js +2 -8
- package/dist/runtime-dependencies.json +5 -5
- package/dist/runtime-requirements.json +1 -0
- package/dist/server.js +12 -5
- package/dist/sidebar-settings.js +1052 -315
- package/dist/sidebar-shortcuts.js +1 -1
- package/dist/toolbar-settings.js +144 -35
- package/dist/tui.js +765 -564
- package/dist/upgrade-notes.js +87 -0
- package/package.json +20 -18
- package/scripts/snapshot-verifier.mjs +36 -0
- package/scripts/update-local-snapshot.mjs +29 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.24.0] - 2026-10-31
|
|
4
|
+
|
|
5
|
+
- Support the latest stable OpenCode 1.19.5 and 2.2.5 releases, preserving both host adapters and existing sidebar behavior.
|
|
6
|
+
- Preserve Limits scales and reset-credit controls across equivalent quota snapshots and unrelated workspace events, while retaining current-account and credential-change guards.
|
|
7
|
+
- Keep rounded selection backgrounds consistent in nested dialogs and highlighted rows.
|
|
8
|
+
- Configure each toolbar button with zero to three icons and optional custom text, including text-only buttons. Keep legacy/state choices, unsaved drafts, rounded clipping, and width-aware More/wrapping.
|
|
9
|
+
- Keep Quick Action rows and their hover/focus state stable while typing in the main prompt on both supported OpenCode hosts.
|
|
10
|
+
- Show toolbar hover/focus hints without moving Limits or other sections, preserving centered, uniformly sized icon controls and empty-toolbar collapse.
|
|
11
|
+
- Add Settings → About with the running versions, explicit update status/checking, confirmed updates, and a versioned changelog that can be reopened independently of first-launch upgrade notes.
|
|
12
|
+
- Prepare editable Bug reports with confirmed sending through authenticated GitHub CLI and an independent Open in browser action. Retain drafts through errors and cancellation, and require manual review before retrying an uncertain submission.
|
|
13
|
+
|
|
14
|
+
## [0.23.0] - 2026-10-28
|
|
15
|
+
|
|
16
|
+
- 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.
|
|
17
|
+
- Keep Skills, MCP servers, and Subagents current as OpenCode 2 updates, and launch the intended Skill when multiple sources have the same name.
|
|
18
|
+
- 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.
|
|
19
|
+
- Preserve Navigator shortcuts and nested-dialog navigation with OpenCode 2.2's keyboard handling.
|
|
20
|
+
- Verify a supported runtime before changing a pinned Navigator snapshot, preserving the installed version when no compatible verifier is available.
|
|
21
|
+
|
|
3
22
|
## [0.22.0] - 2026-10-23
|
|
4
23
|
|
|
5
24
|
- 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.
|
package/HOST_API.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Public Host APIs And Remaining Gaps
|
|
2
|
+
|
|
3
|
+
Navigator supports only OpenCode **1.19.5** and **2.2.5**, 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.5 |
|
|
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. OpenCode 1 prompts and standalone confirmations delegate to native APIs. The 2.x promise prompt replaces its owner and loses Navigator's return callback, reproduced in the real toolbar-text smoke; Navigator-owned nested one-line prompts use a focused Shared editor. | Native nested frames and prompt ownership/dismissal semantics with equivalent restore and stale-target behavior. |
|
|
30
|
+
| About service port and manual release history | Navigator-specific metadata/update state must be shared between footer, shortcuts and deferred Settings. The shipped changelog is read separately from the first-launch claim; no second updater or preference mirror is created. Nested update confirmations stay in the existing frame stack. | Public host facilities preserving Navigator release identity, changelog browsing and nested return state. |
|
|
31
|
+
| Bug-report transport and external browser launch | Neither supported public TUI contract provides GitHub issue creation or an external browser opener. Direct sending uses the user's authenticated `gh` without reading credential files; a `type: Bug` repository form handles browser reports. Bounded argv-based OS launch has a visible link/clipboard fallback on remote or headless hosts. | Equivalent public host issue/browser APIs preserving authentication ownership, editable draft, real issue type and confirmation semantics. |
|
|
32
|
+
| 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. |
|
|
33
|
+
| 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. |
|
|
34
|
+
| 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. |
|
|
35
|
+
| 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. |
|
|
36
|
+
| 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. |
|
|
37
|
+
| 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. |
|
|
38
|
+
| 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. |
|
|
39
|
+
| 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. |
|
|
40
|
+
|
|
41
|
+
## Unavailable Features
|
|
42
|
+
|
|
43
|
+
- OpenCode 2.2 publishes no LSP source, restart operation or diagnostic counters
|
|
44
|
+
to TUI plugins. The 1.x status source remains available.
|
|
45
|
+
- The 2.x title is host-owned; no public fixed-title/date visibility slot exists.
|
|
46
|
+
- The 1.19.5 TUI API lacks a prompt-model accessor before submission.
|
|
47
|
+
- GUI, image-generation and instructions-entry APIs do not reactivate retired
|
|
48
|
+
Todo guidance or unrelated features.
|
|
49
|
+
|
|
50
|
+
## Verification And Runtime
|
|
51
|
+
|
|
52
|
+
Both current hosts have isolated real-host checks. Historical installer fixtures
|
|
53
|
+
exercise migration only; they do not extend the supported host matrix.
|
|
54
|
+
The published 2.2.5 TUI context, plugin, index and Solid declarations are identical
|
|
55
|
+
to 2.2.0. OpenTUI 0.8 retains the drawing-only paint-hook contract; renderer tests,
|
|
56
|
+
nested dialogs and frame-level typing probes run against the updated runtime.
|
|
57
|
+
Development uses Bun 1.4.4 and OpenTUI 0.8, leaving Solid/OpenTUI external so the
|
|
58
|
+
host owns its runtime. The 1.x host ships older runtime modules; its actual smoke
|
|
59
|
+
must pass rather than injecting the development modules into it.
|
|
60
|
+
|
|
61
|
+
OpenTUI 0.8 supports Node >=26.4.0 or Bun >=1.3.14. The updater verifies a staged
|
|
62
|
+
target with an available compatible runtime before switching a recognized local
|
|
63
|
+
wrapper. A lazy root import succeeding under an older Node does not prove full
|
|
64
|
+
renderer/FFI support. CI and package verification use Node 26.12.1.
|
|
65
|
+
|
|
66
|
+
### Deliberate Compatibility Pins
|
|
67
|
+
|
|
68
|
+
- `web-tree-sitter` stays at **0.25.10**, the exact peer required by OpenTUI
|
|
69
|
+
0.8.0. Upgrade it when the supported host runtime publishes a compatible peer
|
|
70
|
+
contract; the independent 0.27 line is not a compatible substitution.
|
|
71
|
+
- `typescript` stays at **6.0.3**, the latest compatible compiler for the shared
|
|
72
|
+
linter stack. TypeScript 7.0.2 type-checks Navigator, but SonarJS/`ts-api-utils`
|
|
73
|
+
fails while loading its missing JavaScript compiler API. Upgrade when those
|
|
74
|
+
consumers support the new compiler distribution; do not disable their rules
|
|
75
|
+
to make an incompatible upgrade pass.
|
|
76
|
+
- Bun remains pinned at **1.4.4**, the current stable release. Direct dependencies
|
|
77
|
+
otherwise use their latest compatible stable releases; transitive updates stay
|
|
78
|
+
within upstream ranges. Runtime peers remain host-owned and are not bundled.
|
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.5/dist/promise/generated/client.d.ts), [Usage schema](https://github.com/anomalyco/opencode/blob/v2.2.5/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.5/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
|
@@ -29,6 +29,7 @@ See the [changelog](CHANGELOG.md) for release-by-release changes.
|
|
|
29
29
|
- Show or hide each sidebar section independently
|
|
30
30
|
- Hide the session title or its creation date independently in OpenCode 1.x without losing the settings control
|
|
31
31
|
- Configure section visibility and order from the sidebar settings button
|
|
32
|
+
- Open Settings → About for the running version, update checks, versioned release history, and editable GitHub Bug reports
|
|
32
33
|
- Separate adjacent sections with quiet theme-aware dividers instead of background cards
|
|
33
34
|
- Save visibility, expansion, and order globally or for the current worktree
|
|
34
35
|
- Copy the selected scope's layout and MCP states as versioned JSON, then validate and preview imports
|
|
@@ -42,10 +43,12 @@ Todo starts expanded. Subagents, skills, quick actions, LSP, and MCP start
|
|
|
42
43
|
collapsed. Use `Save current layout as default` in sidebar settings to reuse the
|
|
43
44
|
current visible/hidden, expanded/collapsed, and ordering states in new sessions.
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
**Only the latest stable release in each major line is supported: OpenCode
|
|
47
|
+
1.19.5 and 2.2.5.** Both have separate real-host checks. Older releases are not
|
|
48
|
+
part of the supported compatibility matrix. The 2.2 integration uses OpenTUI 0.8
|
|
49
|
+
and public host caches, events, keymap layers, and client APIs while retaining
|
|
50
|
+
the separate 1.x adapter. See [Host API boundaries](HOST_API.md) for remaining
|
|
51
|
+
capability gaps and removal conditions. On OpenCode 2, Navigator reads the same native Todo history as
|
|
49
52
|
the host sidebar, including completed `todowrite` calls and the current revert
|
|
50
53
|
boundary. Viewing Todo needs no Navigator server plugin. OpenCode 2.1 exposes
|
|
51
54
|
content and four statuses, without priorities or direct Todo CRUD. LSP is hidden on 2.x while retaining Subagents,
|
|
@@ -149,7 +152,7 @@ the uninstalled-font result remains visible rather than being documented only in
|
|
|
149
152
|
|
|
150
153
|

|
|
151
154
|
|
|
152
|
-
The [complete
|
|
155
|
+
The [complete screenshot gallery](screenshots/README.md) shows every
|
|
153
156
|
Todo and Subagent filter, sidebar section, Search and Settings tab, preset menu
|
|
154
157
|
and preview, confirmation, keyboard-help, setup, and icon-fallback state.
|
|
155
158
|
|
|
@@ -392,16 +395,30 @@ Choose a base icon in the searchable picker, then select **Pin to toolbar**.
|
|
|
392
395
|
The manager lets you change icons, move buttons, or unpin them. Cancelling the
|
|
393
396
|
picker returns to the draft; cancelling the draft discards its changes.
|
|
394
397
|
|
|
398
|
+
For each button, **Icons and text…** lets you choose **zero to three ordered icons**
|
|
399
|
+
and an optional custom single-line label. Use **Base icons…** to add, replace or
|
|
400
|
+
remove icons, and **Text…** for the label. Zero icons produces a text-only button;
|
|
401
|
+
an entirely empty appearance cannot be saved. Labels accept up to 128 characters
|
|
402
|
+
and are clipped to the available cells without overwriting the rounded ends.
|
|
403
|
+
State-specific icon groups retain the existing per-state choices. Nested edits
|
|
404
|
+
remain drafts until the final **Pin to toolbar** or **Save** action.
|
|
405
|
+
|
|
395
406
|
Where the host exposes a state, the same button can use a different icon for each
|
|
396
407
|
state: auto-approve On/Off on OpenCode 1.x, and Idle/Compacting on OpenCode 2.x.
|
|
397
408
|
The 2.x permissions button opens host Settings and uses its base icon. Hover or
|
|
398
409
|
keyboard focus shows the button's name, observed state, or unavailable reason.
|
|
410
|
+
The hint uses the existing gap beneath the toolbar, so appearing or disappearing
|
|
411
|
+
does not move Limits or any other section. Default single-icon buttons stay
|
|
412
|
+
centered in uniform three-cell controls in both Nerd Font and Text modes.
|
|
399
413
|
Skill buttons retain confirmation and trust settings; a missing or ambiguous
|
|
400
414
|
source stays pinned but cannot run.
|
|
401
415
|
|
|
402
416
|
**Behavior → Toolbar overflow** switches between one row with a **More** menu
|
|
403
417
|
(the default) and wrapping rows. Left/Right moves along a row; Up/Down moves
|
|
404
418
|
between rows. The setting follows Global/Worktree scope and portable defaults.
|
|
419
|
+
Overflow uses actual bounded button widths. The largest configured state appearance
|
|
420
|
+
reserves the button's width so changing state does not reshuffle the toolbar.
|
|
421
|
+
Default single-icon buttons remain three cells wide.
|
|
405
422
|
Pins, their order, icons, and exact Skill sources are private user-wide preferences
|
|
406
423
|
and are excluded from portable exports. Use **Reload settings from file** in other
|
|
407
424
|
running sessions after saving changes in another instance.
|
|
@@ -410,6 +427,10 @@ running sessions after saving changes in another instance.
|
|
|
410
427
|
|
|
411
428
|

|
|
412
429
|
|
|
430
|
+

|
|
431
|
+
|
|
432
|
+

|
|
433
|
+
|
|
413
434
|
In OpenCode 1.x, Navigator saves changes to the auto-approve mode as a user-wide
|
|
414
435
|
default, including changes made through OpenCode's own command palette. Set the
|
|
415
436
|
default under **Navigator Settings → Behavior → Default auto-approve permissions**;
|
|
@@ -419,6 +440,50 @@ dialog for the current session and `session.permissions` in the user-wide
|
|
|
419
440
|
`cli.json` (`"prompt"` or `"autoaccept"`) for its startup default. Restart
|
|
420
441
|
OpenCode after changing `cli.json`.
|
|
421
442
|
|
|
443
|
+
### About, release history, and support
|
|
444
|
+
|
|
445
|
+
Open **Navigator Settings → About** with the settings control or `Ctrl+,`.
|
|
446
|
+
The tab shows the running Navigator and OpenCode versions, the last update-check
|
|
447
|
+
result, and **Check for updates**. A failed check is reported as a failure rather
|
|
448
|
+
than an up-to-date result. **Update Navigator…** uses the same confirmation,
|
|
449
|
+
installation method/scope, stale-target guards and restart guidance as the footer
|
|
450
|
+
and Navigator shortcuts.
|
|
451
|
+
|
|
452
|
+
**Changelog by version…** browses the `CHANGELOG.md` shipped with the plugin.
|
|
453
|
+
Choose a version to read its scrollable notes; Escape returns to the selected
|
|
454
|
+
version and then to About. Technical-only versions have an explicit empty state.
|
|
455
|
+
Manual browsing does not consume or reset the one-time upgrade notes shown after
|
|
456
|
+
an update.
|
|
457
|
+
|
|
458
|
+
**Report a bug…** opens an editable title and Markdown body. The visible default
|
|
459
|
+
context contains software versions, platform and runtime only. Navigator does
|
|
460
|
+
not collect chat, source, workspace paths, logs or credentials for the report.
|
|
461
|
+
|
|
462
|
+
- **Send to GitHub…** uses an installed, already authenticated [GitHub CLI](https://cli.github.com/)
|
|
463
|
+
with support for `gh issue create --type`. A separate preview confirms the
|
|
464
|
+
repository, the real **Bug** issue type, title and body before sending. GitHub
|
|
465
|
+
credentials stay with `gh`, never in Navigator preferences.
|
|
466
|
+
- **Open in browser** opens the same draft in the repository's Bug issue form,
|
|
467
|
+
independently of CLI installation or authentication. Large reports use an
|
|
468
|
+
explicit **Copy report & open browser** action; browser-launch failures offer
|
|
469
|
+
a copyable link without discarding the draft.
|
|
470
|
+
- A partial result retains its issue URL. An uncertain outcome opens the issues
|
|
471
|
+
list for review and requires an explicit **Retry after checking GitHub** before
|
|
472
|
+
another confirmed send. Navigator never automatically retries issue creation.
|
|
473
|
+
|
|
474
|
+
Enter inserts a newline in the body; Tab moves between fields and actions, and
|
|
475
|
+
`Ctrl+Enter` opens the send preview. Escape/Cancel returns to the previous screen
|
|
476
|
+
with the draft retained for the current Settings flow. Reports are not saved in
|
|
477
|
+
private preferences.
|
|
478
|
+
|
|
479
|
+
Quick Actions also keep their mounted rows while ordinary prompt typing updates
|
|
480
|
+
the host's command state. Live labels, availability and real source updates still
|
|
481
|
+
refresh immediately.
|
|
482
|
+
|
|
483
|
+

|
|
484
|
+
|
|
485
|
+

|
|
486
|
+
|
|
422
487
|
## Limits: provider quotas and banked resets
|
|
423
488
|
|
|
424
489
|
Navigator keeps subscription limits separate from OpenCode's session token and
|
|
@@ -436,7 +501,7 @@ account usage. Separate model-specific buckets require explicit model associatio
|
|
|
436
501
|
Switching provider, model, session, or account invalidates stale reads and credit actions.
|
|
437
502
|
In OpenCode 2.x, Limits follows the prompt's selected model immediately, before a
|
|
438
503
|
message is sent, through the public reactive `ui.model.current()` API. OpenCode
|
|
439
|
-
1.x, rechecked at 1.19.
|
|
504
|
+
1.x, rechecked at 1.19.5, exposes only the saved session model: a newly selected prompt
|
|
440
505
|
model becomes visible to Navigator when the host saves it, normally on submission.
|
|
441
506
|
An immediate pre-submission switch in 1.x needs a new public host accessor or event.
|
|
442
507
|
CodexBar is useful for discovering providers, but its cookie, credential-file,
|
|
@@ -444,6 +509,7 @@ and undocumented endpoint integrations are not Navigator data sources.
|
|
|
444
509
|
|
|
445
510
|
| Source | Native measurement | Banked reset credits |
|
|
446
511
|
| --- | --- | --- |
|
|
512
|
+
| OpenCode Console / Go | Public host usage API: applicable workspace budgets in USD and Go allowance percentages with reset times | Read-only |
|
|
447
513
|
| Codex app-server | Rate-limit windows and account ID | Available count, optional details and expiry, confirmed manual consumption |
|
|
448
514
|
| MiniMax and NanoGPT | Explicit model-associated subscription windows; separate pay-as-you-go balances | Read-only |
|
|
449
515
|
| GitHub Copilot | Official SDK token-scoped premium allowance, checked against the selected model's billing metadata | Read-only |
|
|
@@ -453,10 +519,17 @@ and undocumented endpoint integrations are not Navigator data sources.
|
|
|
453
519
|
| OpenCode session statistics | Token and cost statistics, not subscription quota | Not applicable |
|
|
454
520
|
| Other providers | Capability guidance until a documented source and model/account mapping are verified | No action without a documented consume API |
|
|
455
521
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
522
|
+
OpenCode Console and Go use OpenCode 2.2's **public usage API directly**, without
|
|
523
|
+
the Navigator server plugin or credential reads. Workspace identity stays separate
|
|
524
|
+
from provider account identity. Shared and per-model budgets retain their native
|
|
525
|
+
scope; free models and unrelated model budgets are excluded. Missing data does
|
|
526
|
+
not mean zero spend or an unlimited allowance. Authentication and request failures
|
|
527
|
+
stay on the native source with explicit guidance or Retry.
|
|
528
|
+
|
|
529
|
+
Other additional sources use the **OpenCode 2 Navigator server plugin** and its
|
|
530
|
+
public integration/HTTP APIs. Configure it on the 2.x launch path as described in
|
|
531
|
+
the installation section. Native Todo remains independent. OpenCode 1.x retains
|
|
532
|
+
Codex support; sources requiring the 2.x server show setup guidance when it is absent.
|
|
460
533
|
The [source inventory](PROVIDERS.md) includes audited public API references,
|
|
461
534
|
permission requirements, and unsupported-source reasons.
|
|
462
535
|
|
|
@@ -467,6 +540,12 @@ response bodies. HTTP-only observations may be absent on WebSocket transports.
|
|
|
467
540
|
REST reads use a short in-memory cache; Refresh bypasses it. Observed headers older
|
|
468
541
|
than two minutes are marked stale instead of presented as current remaining quota.
|
|
469
542
|
|
|
543
|
+
Navigator shares the host's Solid/OpenTUI runtime. Development and CI use Bun 1.4.4
|
|
544
|
+
and Node 26.12.1; OpenTUI 0.8's supported Node path starts at 26.4.0. A confirmed
|
|
545
|
+
pinned-snapshot update verifies its target with supported Bun (at least 1.3.14)
|
|
546
|
+
or Node before switching the wrapper. If neither is available, the running snapshot
|
|
547
|
+
is preserved with guidance; the updater does not install a runtime globally.
|
|
548
|
+
|
|
470
549
|
Limits is visible and expanded by default, first below the session title. Change
|
|
471
550
|
its visibility and order under **Settings → Sections** in Global or Current
|
|
472
551
|
worktree scope. Hiding or collapsing it does not stop background refreshes, and
|
|
@@ -475,6 +554,10 @@ available from the command palette.
|
|
|
475
554
|
|
|
476
555
|

|
|
477
556
|
|
|
557
|
+

|
|
558
|
+
|
|
559
|
+

|
|
560
|
+
|
|
478
561
|
### Link the intended Codex account
|
|
479
562
|
|
|
480
563
|
Install a Codex CLI exposing the documented read and consume RPCs (verified with
|
|
@@ -1,9 +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);
|
|
1
4
|
var PLUGIN_ID="opencode-navigator"
|
|
2
5
|
var TOGGLE_COMMAND=`${PLUGIN_ID}.toggle`
|
|
3
6
|
var FOCUS_COMMAND=`${PLUGIN_ID}.focus`
|
|
4
7
|
var SEARCH_COMMAND=`${PLUGIN_ID}.search`
|
|
5
|
-
var DEFAULT_SEARCH_KEY="ctrl+shift+k"
|
|
6
|
-
var SIDEBAR_SECTIONS=["limits","todo","subagents","skills","quick_actions","lsp","mcp"]
|
|
7
|
-
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"}];
|
|
8
|
-
var MAX_LIMITS_REFRESH_MINUTES=Math.floor(2147483647 / 60000)
|
|
8
|
+
var DEFAULT_SEARCH_KEY="ctrl+shift+k"
|
|
9
9
|
export{SIDEBAR_SECTIONS,SECTION_DEFINITIONS,PLUGIN_ID,DEFAULT_SEARCH_KEY}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function versionParts(value){const match=/^v?(\d+)\.(\d+)\.(\d+)(?:-([^+]+))?/.exec(value)
|
|
2
|
+
return match?{numbers:match.slice(1,4).map(Number),prerelease:match[4]||undefined}:undefined
|
|
3
|
+
}
|
|
4
|
+
function isNewerVersion(latest,current){const next=versionParts(latest)
|
|
5
|
+
const installed=versionParts(current)
|
|
6
|
+
if(!next||!installed)
|
|
7
|
+
return false
|
|
8
|
+
for(let index=0;index<3; index++){if(next.numbers[index]!==installed.numbers[index])
|
|
9
|
+
return next.numbers[index]>installed.numbers[index]
|
|
10
|
+
}
|
|
11
|
+
return installed.prerelease!==undefined&&next.prerelease===undefined
|
|
12
|
+
}
|
|
13
|
+
function isSameMajorVersion(left,right){const first=versionParts(left)
|
|
14
|
+
const second=versionParts(right)
|
|
15
|
+
return Boolean(first&&second&&first.numbers[0]===second.numbers[0])
|
|
16
|
+
}
|
|
17
|
+
export{isNewerVersion,isSameMajorVersion}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {isNewerVersion
|
|
2
|
+
} from "./chunk-fd7394y1.js";
|
|
3
|
+
function parseChangelog2(source){const entries=[]
|
|
4
|
+
let entry
|
|
5
|
+
for(const line of source.split(/\r?\n/)){const heading=/^## \[(\d+\.\d+\.\d+(?:-[\w.-]+)?)\]/.exec(line)
|
|
6
|
+
if(heading){entry={version:heading[1],changes:[]}
|
|
7
|
+
entries.push(entry)
|
|
8
|
+
} else if(line.startsWith("## "))
|
|
9
|
+
entry=undefined
|
|
10
|
+
else if(entry&&line.startsWith("- "))
|
|
11
|
+
entry.changes.push(line.slice(2))
|
|
12
|
+
}
|
|
13
|
+
return entries
|
|
14
|
+
}
|
|
15
|
+
function changesSince2(source,previous,current){return parseChangelog2(source).filter((entry)=>entry.changes.length>0&&isNewerVersion(entry.version,previous)&&!isNewerVersion(entry.version,current))
|
|
16
|
+
}
|
|
17
|
+
async function readBundledChangelog2(){const packaged=Bun.file(new URL("../CHANGELOG.md",import.meta.url))
|
|
18
|
+
if(await packaged.exists())
|
|
19
|
+
return packaged.text()
|
|
20
|
+
return Bun.file(new URL("../../../../CHANGELOG.md",import.meta.url)).text()
|
|
21
|
+
}
|
|
22
|
+
export{parseChangelog2,changesSince2,readBundledChangelog2}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {SECTION_DEFINITIONS,PLUGIN_ID
|
|
2
|
-
} from "./chunk-
|
|
2
|
+
} from "./chunk-bv0nm1tj.js"
|
|
3
3
|
import"./chunk-qmntexwm.js"
|
|
4
4
|
import {mcpPresetPreview
|
|
5
5
|
} from "./chunk-v6bz59xn.js";
|
|
@@ -214,13 +214,7 @@ _$setProp3(_el$5,"contentOptions",{minHeight:0
|
|
|
214
214
|
})
|
|
215
215
|
_$setProp3(_el$6,"gap",1)
|
|
216
216
|
_$insert3(_el$6,()=>props.children)
|
|
217
|
-
_$effect3((
|
|
218
|
-
_v$3!==_p$.e&&(_p$.e=_$setProp3(_el$5,"renderBefore",_v$3,_p$.e))
|
|
219
|
-
_v$4!==_p$.t&&(_p$.t=_$setProp3(_el$5,"renderAfter",_v$4,_p$.t))
|
|
220
|
-
_v$5!==_p$.a&&(_p$.a=_$setProp3(_el$5,"height",_v$5,_p$.a))
|
|
221
|
-
return _p$
|
|
222
|
-
},{e:undefined,t:undefined,a:undefined
|
|
223
|
-
})
|
|
217
|
+
_$effect3((_$p)=>_$setProp3(_el$5,"height",Math.min(Math.max(2,Math.floor(dimensions().height*0.75)-14),Math.max(1,props.rowCount*3-1)),_$p))
|
|
224
218
|
return _el$5
|
|
225
219
|
})(),_$createComponent3(Show2,{get when(){return props.blocked||props.notice
|
|
226
220
|
},get children(){var _el$7=_$createElement3("box"),_el$8=_$createElement3("text"),_el$9=_$createElement3("text")
|
|
@@ -234,9 +228,9 @@ _$setProp3(_el$9,"flexGrow",1)
|
|
|
234
228
|
_$setProp3(_el$9,"wrapMode","word")
|
|
235
229
|
_$setProp3(_el$9,"height",2)
|
|
236
230
|
_$insert3(_el$9,()=>props.blocked||props.notice)
|
|
237
|
-
_$effect3((_p$)=>{var _v$
|
|
238
|
-
_v$
|
|
239
|
-
_v$
|
|
231
|
+
_$effect3((_p$)=>{var _v$3=props.blocked?theme().warning:theme().accent,_v$4=props.blocked?theme().warning:theme().textMuted
|
|
232
|
+
_v$3!==_p$.e&&(_p$.e=_$setProp3(_el$8,"fg",_v$3,_p$.e))
|
|
233
|
+
_v$4!==_p$.t&&(_p$.t=_$setProp3(_el$9,"fg",_v$4,_p$.t))
|
|
240
234
|
return _p$
|
|
241
235
|
},{e:undefined,t:undefined
|
|
242
236
|
})
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import {PLUGIN_ID
|
|
2
|
-
} from "./chunk-
|
|
2
|
+
} from "./chunk-bv0nm1tj.js"
|
|
3
|
+
import {parseChangelog2,readBundledChangelog2
|
|
4
|
+
} from "./chunk-pwa1wzer.js"
|
|
5
|
+
import {isNewerVersion,isSameMajorVersion
|
|
6
|
+
} from "./chunk-fd7394y1.js";
|
|
3
7
|
import {createSignal} from "solid-js"
|
|
4
|
-
function versionParts(value){const match=/^v?(\d+)\.(\d+)\.(\d+)(?:-([^+]+))?/.exec(value)
|
|
5
|
-
return match?{numbers:match.slice(1,4).map(Number),prerelease:match[4]||undefined}:undefined
|
|
6
|
-
}
|
|
7
|
-
function isNewerVersion(latest,current){const next=versionParts(latest)
|
|
8
|
-
const installed=versionParts(current)
|
|
9
|
-
if(!next||!installed)
|
|
10
|
-
return false
|
|
11
|
-
for(let index=0;index<3; index++){if(next.numbers[index]!==installed.numbers[index])
|
|
12
|
-
return next.numbers[index]>installed.numbers[index]
|
|
13
|
-
}
|
|
14
|
-
return installed.prerelease!==undefined&&next.prerelease===undefined
|
|
15
|
-
}
|
|
16
|
-
function isSameMajorVersion(left,right){const first=versionParts(left)
|
|
17
|
-
const second=versionParts(right)
|
|
18
|
-
return Boolean(first&&second&&first.numbers[0]===second.numbers[0])
|
|
19
|
-
}
|
|
20
8
|
var NAVIGATOR_PACKAGE_URL="https://registry.npmjs.org/opencode-navigator/latest"
|
|
21
9
|
var REQUEST_TIMEOUT_MS=5000
|
|
22
10
|
async function readNavigatorVersion(request,signal){const response=await request(NAVIGATOR_PACKAGE_URL,{headers:{accept:"application/json"},signal})
|
|
@@ -29,6 +17,7 @@ return metadata.version
|
|
|
29
17
|
}
|
|
30
18
|
function createVersionStatus(api,navigatorVersion,request=fetch,timeoutMs=REQUEST_TIMEOUT_MS){const [openCodeUpdate,setOpenCodeUpdate]=createSignal()
|
|
31
19
|
const [navigatorUpdate,setNavigatorUpdate]=createSignal()
|
|
20
|
+
const [navigatorCheckState,setNavigatorCheckState]=createSignal({status:"idle"})
|
|
32
21
|
let controller
|
|
33
22
|
let pending
|
|
34
23
|
let disposed=false
|
|
@@ -43,6 +32,7 @@ function refreshNavigator(){if(disposed)
|
|
|
43
32
|
return Promise.resolve("unavailable")
|
|
44
33
|
if(pending)
|
|
45
34
|
return pending
|
|
35
|
+
setNavigatorCheckState((previous)=>({...previous,status:"checking"}))
|
|
46
36
|
const active=new AbortController
|
|
47
37
|
controller=active
|
|
48
38
|
const timeout=setTimeout(()=>active.abort(),timeoutMs)
|
|
@@ -54,8 +44,12 @@ const reading=Promise.race([readNavigatorVersion(request,active.signal),cancelle
|
|
|
54
44
|
return "unavailable"
|
|
55
45
|
const newer=isNewerVersion(version,navigatorVersion)
|
|
56
46
|
setNavigatorUpdate(newer?version:undefined)
|
|
47
|
+
setNavigatorCheckState({status:newer?"available":"current",latest:version,checkedAt:Date.now()})
|
|
57
48
|
return newer?"update":"current"
|
|
58
|
-
}).catch(()=>
|
|
49
|
+
}).catch(()=>{if(!disposed)
|
|
50
|
+
setNavigatorCheckState((previous)=>({...previous,status:"error",checkedAt:Date.now()}))
|
|
51
|
+
return "unavailable"
|
|
52
|
+
}).finally(()=>{clearTimeout(timeout)
|
|
59
53
|
active.signal.removeEventListener("abort",abort)
|
|
60
54
|
if(controller===active)
|
|
61
55
|
controller=undefined
|
|
@@ -66,7 +60,7 @@ pending=reading
|
|
|
66
60
|
return reading
|
|
67
61
|
}
|
|
68
62
|
refreshNavigator()
|
|
69
|
-
return{openCodeUpdate,navigatorUpdate,refreshNavigator}}
|
|
63
|
+
return{openCodeUpdate,navigatorUpdate,refreshNavigator,navigatorCheckState}}
|
|
70
64
|
import {effect as _$effect3} from "@opentui/solid"
|
|
71
65
|
import {insertNode as _$insertNode3} from "@opentui/solid"
|
|
72
66
|
import {createComponent as _$createComponent2} from "@opentui/solid"
|
|
@@ -88,7 +82,8 @@ import {insert as _$insert} from "@opentui/solid"
|
|
|
88
82
|
import {setProp as _$setProp} from "@opentui/solid"
|
|
89
83
|
import {createElement as _$createElement} from "@opentui/solid"
|
|
90
84
|
import {useIcons} from "./tui.js"
|
|
91
|
-
import {createComponent as _$
|
|
85
|
+
import {createComponent as _$createComponent4} from "@opentui/solid"
|
|
86
|
+
import {createSignal as createSignal2} from "solid-js"
|
|
92
87
|
function createManualUpdateCheck(api,status,current,onUpdate){let checking=false
|
|
93
88
|
async function read(){try{return await status.refreshNavigator?.()??"unavailable"
|
|
94
89
|
} catch{return "unavailable"
|
|
@@ -108,7 +103,28 @@ api.ui.toast({variant:result==="unavailable"?"warning":"info",title:"Navigator u
|
|
|
108
103
|
})
|
|
109
104
|
} finally{checking=false
|
|
110
105
|
}}}}
|
|
106
|
+
import {createComponent as _$createComponent3} from "@opentui/solid"
|
|
107
|
+
import {onCleanup} from "solid-js"
|
|
108
|
+
import {GuardedConfirmation,SelectionMenu} from "./tui.js"
|
|
109
|
+
function NestedVersionConfirmation(props){onCleanup(props.dismiss)
|
|
110
|
+
return _$createComponent3(GuardedConfirmation,{get api(){return props.api
|
|
111
|
+
},get current(){return props.current
|
|
112
|
+
},get title(){return `Update ${props.name}`
|
|
113
|
+
},get message(){return `Install ${props.version} using the current installation method?`
|
|
114
|
+
},get onConfirm(){return props.confirm
|
|
115
|
+
},render:({confirm
|
|
116
|
+
})=>_$createComponent3(SelectionMenu,{get api(){return props.api
|
|
117
|
+
},get title(){return `Update ${props.name}`
|
|
118
|
+
},get options(){return [{title:"Cancel",value:"cancel",description:"Return without installing an update"
|
|
119
|
+
},{title:`Install ${props.name} ${props.version}`,value:"install",description:"Keep the current installation method and scope; restart OpenCode afterward"
|
|
120
|
+
}]
|
|
121
|
+
},onSelect:(option)=>option.value==="install"?confirm():props.cancel()
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}
|
|
111
125
|
function createVersionUpdateActions(api,status,updater,rememberNavigatorVersion){const busy=new Set
|
|
126
|
+
const [navigatorUpdating,setNavigatorUpdating]=createSignal2(false)
|
|
127
|
+
const [navigatorInstalled,setNavigatorInstalled]=createSignal2()
|
|
112
128
|
const installed={}
|
|
113
129
|
let disposed=false
|
|
114
130
|
let confirmation=0
|
|
@@ -124,6 +140,8 @@ return
|
|
|
124
140
|
}
|
|
125
141
|
api.ui.dialog.clear()
|
|
126
142
|
busy.add(kind)
|
|
143
|
+
if(kind==="navigator")
|
|
144
|
+
setNavigatorUpdating(true)
|
|
127
145
|
api.ui.toast({variant:"info",title:`Updating ${label(kind)}`,message:`Installing ${version}...`
|
|
128
146
|
});
|
|
129
147
|
(async ()=>{if(kind==="navigator")
|
|
@@ -132,6 +150,8 @@ if(disposed||version!==target(kind))
|
|
|
132
150
|
throw new Error("Update target changed; check again")
|
|
133
151
|
await updater[kind](version)
|
|
134
152
|
})().then(()=>{installed[kind]=version
|
|
153
|
+
if(kind==="navigator")
|
|
154
|
+
setNavigatorInstalled(version)
|
|
135
155
|
if(disposed)
|
|
136
156
|
return
|
|
137
157
|
api.ui.toast({variant:"success",title:`${label(kind)} updated`,message:"Restart OpenCode to use the new version.",duration:6000
|
|
@@ -140,16 +160,34 @@ api.ui.toast({variant:"success",title:`${label(kind)} updated`,message:"Restart
|
|
|
140
160
|
return
|
|
141
161
|
api.ui.toast({variant:"error",title:`Could not update ${label(kind)}`,message:error instanceof Error?error.message:"Update failed",duration:6000
|
|
142
162
|
})
|
|
143
|
-
}).finally(()=>busy.delete(kind)
|
|
163
|
+
}).finally(()=>{busy.delete(kind)
|
|
164
|
+
if(kind==="navigator")
|
|
165
|
+
setNavigatorUpdating(false)
|
|
166
|
+
})
|
|
144
167
|
}
|
|
145
|
-
function open(kind,version=target(kind)){if(disposed||!version||version!==target(kind)||busy.has(kind))
|
|
168
|
+
function open(kind,version=target(kind),navigation){if(disposed||!version||version!==target(kind)||busy.has(kind))
|
|
146
169
|
return
|
|
147
170
|
if(installed[kind]===version){api.ui.toast({variant:"info",title:`${label(kind)} updated`,message:"Restart OpenCode to use the installed update."
|
|
148
171
|
})
|
|
149
172
|
return
|
|
150
173
|
}
|
|
151
174
|
const id=++confirmation
|
|
152
|
-
|
|
175
|
+
const onConfirm=()=>{if(id!==confirmation)
|
|
176
|
+
return
|
|
177
|
+
confirmation++
|
|
178
|
+
update(kind,version)
|
|
179
|
+
}
|
|
180
|
+
if(navigation){navigation.open(()=>_$createComponent4(NestedVersionConfirmation,{api,get name(){return label(kind)
|
|
181
|
+
},version,current:()=>!disposed&&id===confirmation&&version===target(kind),confirm:onConfirm,cancel:()=>{if(id!==confirmation)
|
|
182
|
+
return
|
|
183
|
+
confirmation++
|
|
184
|
+
navigation.back()
|
|
185
|
+
},dismiss:()=>{if(id===confirmation)
|
|
186
|
+
confirmation++
|
|
187
|
+
}}))
|
|
188
|
+
return
|
|
189
|
+
}
|
|
190
|
+
api.ui.dialog.replace(()=>_$createComponent4(api.ui.DialogConfirm,{get title(){return `Update ${label(kind)}`
|
|
153
191
|
},message:`Update to ${version} using the current installation method? OpenCode must be restarted afterward.`,onConfirm:()=>{if(id!==confirmation)
|
|
154
192
|
return
|
|
155
193
|
confirmation++
|
|
@@ -169,7 +207,7 @@ const unregister=api.keymap.registerLayer({commands:[{name:`${PLUGIN_ID}.check-u
|
|
|
169
207
|
api.lifecycle.onDispose(()=>{disposed=true
|
|
170
208
|
unregister()
|
|
171
209
|
})
|
|
172
|
-
return{openCode:(version)=>open("openCode",version),navigator:(version)=>open("navigator",version)
|
|
210
|
+
return{openCode:(version)=>open("openCode",version),navigator:(version,navigation)=>open("navigator",version,navigation),navigatorUpdating,navigatorInstalled
|
|
173
211
|
}}
|
|
174
212
|
import {homedir} from "os"
|
|
175
213
|
import {basename,dirname,isAbsolute,join} from "path"
|
|
@@ -241,5 +279,5 @@ if(item.source.target.startsWith("."))
|
|
|
241
279
|
throw new Error("Unrecognized local Navigator source")
|
|
242
280
|
await context.client.plugin.update({location:response.location,targets:[item.source.target]})
|
|
243
281
|
}}}
|
|
244
|
-
export{createOpenCodeV1VersionUpdater,createOpenCodeV2VersionUpdater,createVersionStatus,createVersionUpdateActions
|
|
282
|
+
export{createOpenCodeV1VersionUpdater,createOpenCodeV2VersionUpdater,createVersionStatus,createVersionUpdateActions,parseChangelog2 as parseChangelog,readBundledChangelog2 as readBundledChangelog
|
|
245
283
|
}
|