Commit Graph
460 Commits
Author SHA1 Message Date
Bohdan Triapitsyn a7f1d7d89e chore: added unreleased changes 2026-08-09 20:07:40 +03:00
Bohdan Triapitsyn f8b33be5eb chore: bump @opencode-ai/sdk to 1.18.15 2026-08-09 20:03:06 +03:00
Bohdan Triapitsyn 4faf660a38 feat(usage): add xAI quota reporting #2628
feat(usage): add xAI quota reporting
2026-08-07 11:48:56 +03:00
Bohdan Triapitsyn c19418cba0 Merge origin/main into deferred OpenCode restart branch 2026-08-07 10:08:50 +03:00
10606d79d3 fix(git): enable core.longpaths for worktree population (#2746) (#2747)
* fix(git): enable core.longpaths for worktree population

Worktrees live under a deep OpenCode data-dir path, so Windows checkouts
of deeply nested repos failed bootstrap with "Filename too long". Enable
Git core.longpaths before git reset --hard (web + VS Code) and surface
clearer path-length guidance when the filesystem still rejects a path.

Fixes #2746

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* chore(vscode): keep ensureWorktreeLongpaths private

Avoid an unused export in the VS Code git service; the helper stays
local to populateWorktreeWithLockRecovery.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-07 09:52:48 +03:00
Bruno Fantauzzi 25780c9203 fix(git): run post-checkout hook after worktree creation bootstrap (#2721)
Worktrees are created with `git worktree add --no-checkout` and populated
with `git reset --hard`, neither of which runs git's post-checkout hook.
Invoke the hook explicitly after population with git's standard arguments
(null ref previous HEAD, checked-out HEAD, flag 1) and the worktree as cwd,
mirroring `git worktree add` without --no-checkout.

A missing or non-executable hook is skipped (matching git) and a failing
hook is logged as a warning, never failing worktree creation or session
bootstrap. Applied to both the web server git service and the VS Code
runtime's git service.
2026-08-07 00:55:28 +03:00
Mel0ny 7e0e22f6e2 fix(deps): upgrade adm-zip to 0.6.0 to fix GHSA-xcpc-8h2w-3j85 (#2643)
adm-zip <0.6.0 allows a crafted ZIP to trigger a ~4GB memory
allocation (GHSA-xcpc-8h2w-3j85). Bump the dependency in the web
and vscode packages to ^0.6.0. The new AdmZip(buffer) and
extractAllTo(dir, overwrite) APIs are unchanged, so no call-site
adaptation is needed.

Add a vitest regression test for the ClawdHub install path that
builds a real ZIP with adm-zip and asserts extractAllTo restores
files (including nested subdirectories) into the target skill dir.
2026-08-06 22:59:08 +03:00
TPOB 4bb89bf6a6 fix(vscode): open notebook links in notebook editor (#2373) 2026-08-06 21:37:41 +03:00
Henry Moran 543b2a2dd1 feat(usage): add xAI quota reporting
packages/ui/src/components/sections/usage/UsagePage.tsx\n  - What: Show selected configured-provider errors in Usage settings.\n  - Why: Preserve provider-specific failures when another provider succeeds.\n\npackages/ui/src/lib/quota/providers/index.ts\n  - What: Register xAI in shared quota metadata.\n  - Why: Expose xAI across shared usage surfaces.\n\npackages/ui/src/types/quota.ts\n  - What: Add xAI to the quota provider contract.\n  - Why: Allow typed xAI results across runtimes.\n\npackages/vscode/src/opencodeAuth.ts\n  - What: Preserve secure auth-file persistence for refreshed xAI credentials.\n  - Why: Reuse the VS Code auth boundary safely.\n\npackages/vscode/src/quotaProviders.ts\n  - What: Add xAI SuperGrok quota fetching, refresh, parsing, and failure isolation.\n  - Why: Provide VS Code usage parity.\n\npackages/web/server/lib/opencode/auth.js\n  - What: Enforce secure auth directory, auth file, and backup permissions.\n  - Why: Protect refreshed OAuth credentials.\n\npackages/web/server/lib/quota/DOCUMENTATION.md\n  - What: Document the xAI quota provider.\n  - Why: Keep provider ownership documentation current.\n\npackages/web/server/lib/quota/providers/index.js\n  - What: Register the xAI web quota adapter.\n  - Why: Expose xAI through the existing quota route.\n\npackages/web/server/lib/quota/providers/xai.js\n  - What: Add SuperGrok usage fetching, inherited OAuth refresh, strict parsing, and zero/error semantics.\n  - Why: Report xAI billing-period usage without new auth architecture or credentials.
2026-08-04 14:40:44 -07:00
Bohdan Triapitsyn 67965ced2f release v1.18.1 2026-08-04 19:39:40 +03:00
Cursor AgentandSerhii Dziupin 460675f57e Merge origin/main into deferred OpenCode restart branch.
Adopt main's providerAuth helpers (OAuth index preservation, OAuth-only API
key hiding, always-load auth methods) while keeping deferred Apply & Restart
for provider mutations.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-04 13:29:46 +00:00
Bohdan Triapitsyn f28d36a23f release v1.18.0 2026-08-04 02:29:53 +03:00
Bohdan Triapitsyn 4c0fc25ac8 fix(worktree): stop writing worktree registration into OpenCode's storage
Creating a worktree wrote the new directory straight into OpenCode's own
project storage: the web server updated `storage/project/<id>.json` and ran an
`UPDATE project SET sandboxes` against `opencode.db` through better-sqlite3,
and the VS Code extension wrote the same JSON.

Both wrote behind the back of a running OpenCode process. OpenCode registers a
sandbox through `project.addSandbox`, which emits a project-updated event; a
direct row write emits nothing, so a worktree created while OpenCode was
running stayed unknown to it until a restart. The SQLite write also opened a
database file owned by another live process. The VS Code write was inert on top
of that: OpenCode v2 reads sandboxes from the database, not from that JSON.

Registration is not ours to perform. OpenCode records a worktree as a sandbox
itself when an instance boots for that directory, and filters entries whose
directory no longer exists when reading them back, so removal needs no
counterpart either. The only consumer on our side, the project seed in
sync/bootstrap.ts, already falls back to `project.current()` when the seed is
absent; the worktree list itself comes from git, not from sandboxes.

Reported symptom this targets: a worktree created after `openchamber restart`
never answers prompts, and restarting OpenChamber makes it work. Not reproduced
locally, so this is not confirmed as the cause.
2026-08-03 23:37:53 +03:00
Bohdan Triapitsyn e4fddabb19 fix(quota): normalize DeepSeek timeout errors 2026-08-03 18:42:31 +03:00
Bohdan Triapitsyn 1cc5cfedbb feat: add DeepSeek quota provider #2594 2026-08-03 18:37:31 +03:00
Serhii Dziupin 166b89d8db Merge pull request #2596 from openchamber/fix-Kimi-for-Coding-usage
fix: Kimi for Coding usage showing 0% despite full consumption
2026-08-03 17:02:43 +03:00
Cursor AgentandSerhii Dziupin ead9aad33b Merge origin/main into deferred OpenCode restart branch.
Resolve ProvidersPage and lifecycle conflicts with custom providers and
AppImage ARGV0 stripping. Address review follow-ups: OAuth index helper +
tests, single auth-methods load trigger, shared Google env-alias module with
VS Code parity coverage, and deferred restart for custom provider upsert.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 13:57:05 +00:00
Serhii Dziupin 635a70b24f fix: compute Kimi quota usage from used or remaining field 2026-08-03 16:39:14 +03:00
Cursor AgentandSerhii Dziupin 321794a621 Mirror Google API key env aliases into managed OpenCode.
OpenCode can mark Google connected via GEMINI_API_KEY while the Generative AI
SDK only reads GOOGLE_GENERATIVE_AI_API_KEY, so chat asked for a key that was
already present. Alias unset sibling names on managed launch for web and VS Code.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 13:18:27 +00:00
Serhii Dziupin 9289dea4a0 Merge pull request #2586 from openchamber/feat/skill-renaming-content-preservation-c1d5
fix(skills): preserve SKILL.md content when renaming
2026-08-03 15:04:48 +03:00
Howon Lee 2dd3bbfe8e feat: add DeepSeek quota provider 2026-08-03 20:46:32 +09:00
Bohdan Triapitsyn e0bd787468 docs: changelog entries for the upcoming release 2026-08-03 13:55:51 +03:00
Cursor AgentandSerhii Dziupin 20fc675af0 fix(skills): drive UI rename gating from server renamable flag
Expose authoritative renamable on skill list responses using the same
managed-root policy as renameSkill, drop the divergent UI path heuristic,
and remove an unused rejection-test fixture.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 09:25:25 +00:00
Cursor AgentandSerhii Dziupin bfea13ef1d fix(skills): harden rename to managed roots and cover failures
Restrict in-place skill rename to managed skill directories, require
frontmatter name to match before moving, roll back/reject with tests,
hide rename in the UI for unmanaged paths, and drop unused toast keys.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 08:54:29 +00:00
Cursor AgentandSerhii Dziupin 094fb4fc40 merge main to pick up German locale for custom provider keys
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 08:53:06 +00:00
Cursor AgentandSerhii Dziupin 66c5f0cdd4 fix custom provider edit to preserve config scope
Derive the effective OpenCode config layer (custom > project > user) from
provider sources and send it on PUT /api/provider so project/custom edits
update that layer instead of creating a global user override. Resolve
OPENCODE_CONFIG at call time and add UI/web/VS Code coverage for scoped
upserts.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 08:22:30 +00:00
Cursor AgentandSerhii Dziupin f0591515fd fix(skills): preserve SKILL.md content when renaming
Rename skills by moving the skill directory and updating frontmatter
name instead of recreate-with-stub-description, which wiped the body
and supporting files.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 07:02:24 +00:00
Cursor AgentandSerhii Dziupin 775da6e9f4 Defer OpenCode restarts for config mutations
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 06:40:01 +00:00
Bohdan Triapitsyn 75606a4ecd chore: update changelogs with recent mobile and UI fixes 2026-08-02 19:38:23 +03:00
Bohdan Triapitsyn ad862d4025 docs: update changelogs for walkthrough and UI changes
Adds an unreleased summary for the new guided walkthrough and mobile/tablet layout.
Documents session, sidebar, chat, and VS Code fixes.
2026-08-02 17:48:50 +03:00
Bohdan Triapitsyn 34d0ff7383 feat(walkthrough): guided AI walkthrough for diffs, branches, and PRs (#2572)
A diff is ordered by file path, which is almost never the order in which a
change makes sense. This adds a Walkthrough surface that reorders it: the model
groups related hunks into stops, explains what each group changes about
behavior, and orders the stops so each builds on the last. It explains and
orders; judging code stays with the existing Review action.

Reviews uncommitted work (all, staged, unstaged), a branch against its base, or
a pull request. Generation is always user-initiated — nothing runs on a timer,
on a file change, or as a side effect of opening a panel.

Invariants worth preserving:

- Hunk identity is derived on the server and only there. Ids are content
  hashes, so an anchor that no longer resolves is proof the code it described
  changed, and staleness needs no heuristics. The client matches ids to ids and
  never recomputes them; two implementations would have to agree forever.
- The digest is never truncated. A diff that does not fit the model's context
  is refused with an actionable reason, because a walkthrough written against
  half a diff reads as confident and is wrong.
- Nothing disappears. Lockfiles and other generated output are excluded from
  the model's input by name — never by size — and everything no stop covers is
  listed at the end, so "have I seen all of it" stays answerable.
- Cost is explicit. Results are content-addressed, so returning the working
  tree to an earlier state costs nothing; generation outlives its request, so a
  refresh detaches the client rather than discarding paid-for work, and only an
  explicit cancel stops it.

Supporting changes to shared modules:

- git: expose the existing getRangeDiff as GET /api/git
  listUntrackedPaths and getUntrackedDiffs. The latter resolve the repository
  once for a batch instead of per file, taking a panel
  ~340ms on an 80-file working tree.
- small-model: structured output across four wire forma
  and abort signal, and an onOverflow policy so an oversized prompt fails
  loudly instead of being silently clipped. A provider
  remembered so the prompt-side fallback goes first next time.
- models.dev metadata: surface structured_output as tri
  false blocks a model, a missing field does not, because the catalog omits it
  for roughly half of all models.

Desktop and tablet only: VS Code serves Git through its
these routes, and the mobile shell does not consume the surface registry.

Docs: packages/docs walkthrough page in English and all eight locales.
2026-08-02 16:22:55 +03:00
Cursor AgentandSerhii Dziupin d40bb9e5a0 fix custom provider credentials, edit path, and failure UX
Require an API key or {env:VAR} on client and server, add edit/prefill for
existing custom providers, save auth before config, and surface incomplete
auth plus disconnect after partial failures. Add VS Code parity tests and
drop the unused allProvidersConnected locale key.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-02 11:40:02 +00:00
Cursor AgentandSerhii Dziupin be87e25c7d feat: add custom/other OpenAI-compatible LLM providers
Allow Settings → Providers to define custom providers (id, name, base URL,
API key, models, headers) without code changes. Persist config via OpenCode
layers, store keys through auth.set, and keep web/VS Code parity.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-02 09:12:28 +00:00
Bohdan Triapitsyn 37ff3a8164 release v1.17.2 2026-08-01 23:17:28 +03:00
Howon LeeandBohdan Triapitsyn 09f0c64839 feat: add Windows ARM64 support with x64-baseline CLI workaround (#2537)
* feat: add Windows ARM64 support with x64-baseline CLI workaround

Windows ARM64 native opencode.exe fails with a Bun FFI/TinyCC dlopen
error (anomalyco/opencode#19130). As a temporary workaround:

- Bundle x64-baseline OpenCode CLI on ARM64 instead of native ARM64
  (prepare-opencode-cli.mjs, env-runtime.js)
- Disable OpenCode self-upgrade on ARM64 in server, VS Code, and UI
  (upgrade-capability.js, opencode-upgrade-runtime.ts, useUIStore.ts,
  OpenCodeCliSettings.tsx, search.ts, SettingsView.tsx, platform.ts)
- Add ARM64 Windows cross-compile builds to release and smoke workflows
  (release.yml, release-desktop-smoke.yml)
- Refactor Windows latest.yml to use combine-electron-manifests pattern
  matching macOS, since two arches now produce per-arch manifests

The CI ARM64 build itself is permanent; only the x64-baseline CLI
bundling and upgrade disablement are temporary and should be reverted
when the upstream issue is resolved.

* fix(desktop): select Windows updater by architecture

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-07-30 20:07:08 +03:00
Bohdan Triapitsyn 80d939cccd fix(telemetry): report real VS Code platform and honor usage opt-out
The VS Code bridge re-mapped the already-mapped platform value from the
webview, collapsing every install to platform "web"; it also sent the
installId even when usage reporting was disabled. The remote-instance
update poll in the header and the post-update wait poll now send
reportUsage=false so status checks no longer count as activity.
2026-07-30 19:19:43 +03:00
Bohdan Triapitsyn d69ee1033e fix(vscode): prevent early SSE replay loss 2026-07-30 00:31:15 +03:00
Bohdan Triapitsyn 34aefb731b fix(quota): show all Z.ai usage windows 2026-07-30 00:05:52 +03:00
Bohdan Triapitsyn 4c7b87bb21 release v1.17.1 2026-07-29 20:18:11 +03:00
Bohdan Triapitsyn 0716797efb chore: bump @opencode-ai/sdk to 1.18.9 2026-07-29 20:16:58 +03:00
𝖎𝖚𝖑𝖎𝖎𝖆andBohdan Triapitsyn c88dd16d2a fix: prevent bundled OpenCode self-upgrades (#2525)
* fix: prevent bundled OpenCode self-upgrades

* feat(vscode): support OpenCode upgrades

* fix: refresh OpenCode update status on runtime switch

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-07-29 19:59:41 +03:00
Bohdan Triapitsyn 98c716cf92 fix(vscode): recover stalled OpenCode SSE streams 2026-07-29 18:38:05 +03:00
Bohdan Triapitsyn d5e63467cf fix(vscode): support Codex business spend limits 2026-07-29 18:32:27 +03:00
Bohdan Triapitsyn c4c5087715 release v1.17.0 2026-07-28 19:39:32 +03:00
Bohdan Triapitsyn 02e5b5f769 chore: updated unreleased changes 2026-07-28 19:29:34 +03:00
Bohdan Triapitsyn 3a5c399298 chore: bump @opencode-ai/sdk to 1.18.8 2026-07-28 12:26:20 +03:00
Bohdan Triapitsyn 3fa0c5be57 chore: bump @opencode-ai/sdk to 1.18.7 2026-07-27 23:13:21 +03:00
Bohdan Triapitsyn b6cdf7b6a7 chore: update opencode sdk version to 1.18.5 2026-07-26 18:53:58 +03:00
Bohdan Triapitsyn f6fa00c45b chore: updated unreleased vscode changes 2026-07-26 18:51:34 +03:00
pablogonzalez e2b0a113b8 feat(quota): add Crof and NeuralWatt quota providers (#2415) 2026-07-26 17:57:53 +03:00