Stop treating Provider.env length as credentials, refetch provider
sources after OAuth/API key writes, and respect an explicit auth-panel
Hide so OAuth-only providers do not stick on a stale "Credentials
missing" / empty-models state after a successful login.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Create no longer aborts when recoverStaleDraftDirectory rewrites the
implicit new-chat draft to the active project during the create probe.
Also rank the Unreleased Chat bullet below the changelog highlights.
Co-authored-by: serkraser <serkraser@gmail.com>
Plugin listing still called readConfigFile per layer, so one unparseable
project file made GET /api/config/plugins and VS Code listPluginEntries
fail. Reuse readConfigLayer isolation and pin comment-only empty parse
in the VS Code suite.
Co-authored-by: serkraser <serkraser@gmail.com>
Keep both Unreleased bullets: the config-wipe Settings fix and the
stale merged-PR Git panel fix from main.
Co-authored-by: serkraser <serkraser@gmail.com>
Address review findings on the #2923 fail-closed parse fix:
- Comment-only files produce ValueExpected with no JSON value; treat that
as empty config instead of INVALID_JSONC. Partial object trees still throw.
- readConfigLayers no longer lets one unparseable layer abort valid sibling
layers. Mutations still fail closed on the custom/user write target.
Co-authored-by: serkraser <serkraser@gmail.com>
Keep both Unreleased changelog bullets: the lastDirectory new-chat
fallback and the Git PR panel stale-status fix from main.
Co-authored-by: serkraser <serkraser@gmail.com>
When a regular new-chat draft inherits a deleted lastDirectory, update
the visible draft target to the active project immediately. lastDirectory
still stays unchanged until session creation succeeds.
Co-authored-by: serkraser <serkraser@gmail.com>
Add store persist/hydrate regressions for terminal branch associations
and a server test that a complete empty open list does not query closed
PRs. Inline the open-only matcher state so the next repo target can win.
Co-authored-by: serkraser <serkraser@gmail.com>
New chats inherited a persisted lastDirectory even after that worktree
was removed, so the first message saved but the prompt never started.
Validate the implicit draft directory, fall back to the active project
only when OpenCode confirms the path is missing, and leave explicit
worktree targets and unknown probes unchanged.
Co-authored-by: serkraser <serkraser@gmail.com>
jsonc-parser was returning truncated trees (often only `$schema`) when
configs contained JSON5-style unquoted keys. Config mutations then backed
up and overwrote the full file with that stub. Check parse errors on read
and refuse to overwrite unparseable files on write in web and VS Code.
Fixes#2923
Co-authored-by: serkraser <serkraser@gmail.com>
The desktop ContextPanel captured Escape on the panel aside and closed
the whole pane before ghostty-web's bubble-phase listener could forward
the key. Skip closing when the event target is inside the terminal so
apps like Vim can leave insert mode.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Scope toast width overrides to sm+ so Sonner keeps full-width mobile
toasts, resolve ask actions from live composer/attachment state, and
extract offer-id invalidation into a unit-tested helper.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Synthetic subagent-completion nudges were treated as the latest user model
choice and rehydrated the agent default, while setAgent preferred the agent
pin over the session override. Skip synthetic prompts for restore, preserve
manual selection-store overrides, and prefer session agent models in setAgent.
Closesopenchamber/openchamber#2404
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
The status-info classes were winning over muted disabled styles, so the
button still looked actionable when no model was selected.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
For OAuth-only providers like Cursor, open the auth panel when
credentials are missing and omit the models list until auth/env
credentials are present so placeholder catalog entries are not shown
before login.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Treat an empty allowedProviderIds list as allow-none, disable Generate
when no usable model is selected, and mute the button styling so it
reads as unavailable rather than actionable.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Only show the API key credential UI when a provider declares API auth
(or auth methods are still unknown). OAuth-only plugin providers such as
Cursor now show Connect/OAuth only, load auth methods on reconnect, and
skip an empty models section until models are discovered.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Do not present a provider without a login as the selected walkthrough
model, and grey out Generate when readiness is false instead of showing
a login-error blocker or raw auth banner.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Drop the grey description and info icon, and widen the toast so the
title and two actions sit on one clean row.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Offer to turn sufficiently large plain-text clipboard pastes into
pasted-context-N.txt attachments instead of inserting them into the
composer, with ask/attach/inline composer settings.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Neutralize the catastrophic TextMate template-call lookahead when loading
JS/TS grammars in the markdown Shiki worker, and terminate hung highlight
requests after 5s so unbounded Oniguruma WASM matching cannot OOM the
renderer (openchamber/openchamber#2587).
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
When the walkthrough small model resolves to a provider with no usable
login, readiness was still ready and generate returned a raw 500 message.
Refuse up front with no-provider-login and surface a blocker instead.
Closesopenchamber/openchamber#2607
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Keep the shortcut in Help/Settings only; the floating selection chip
should stay quiet so the Add to Chat action is easier to scan.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Cover CodeMirror and DOM capture paths in tests, collapse text-control
selections after capture, and deliver the desktop Edit-menu action over
a single IPC channel so append cannot double-fire.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
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>
Reconnect previously showed only the API key field because
provider.auth() ran solely in add-provider mode. Also keep the
original OpenCode method index when listing OAuth options.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Bind mod+l to append the current selection into the chat composer
(Cursor-style), and move session sidebar toggle to mod+alt+l so desktop
menus stay in sync. Closes#208.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Add config-mutation-response.js to owning docs, describe restartDeferred
and external requiresManualRestart on /api/config/reload, and remove the
unused buildConfigMutationResponse export.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Use getRequestDirectory and x-opencode-directory like the other skill
mutations, and pin renamable list/store mapping with focused tests.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Keep ARGV0/env-u assertions from this branch and the DA startup-reply
expectations from main's terminal PTY-before-viewport fix.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
de.settings.ts came from main without Apply & Restart strings;
add translations so i18n key parity stays intact.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Resolve skills store conflicts by keeping repository-local directory
resolution from main and deferred-restart handling from this branch.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
bun-pty merges the OS environ into PTY children, so deleting ARGV0 from the
JS env object alone left the AppImage path in the shell. Wrap Linux PTY
spawns with env -u ARGV0, clear native ARGV0 under Bun via libc unsetenv,
and always clear process.env even when no login-shell snapshot exists.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Merge of main brought the de locale without the custom-provider keys
added on this branch, which broke the UI build type cast to I18nDictionary.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Drop phantom pending records when provider disconnect removes nothing
and when Behavior AGENTS.md payloads are not deferred. Clear the Apply
badge after external OpenCode manual-restart guidance. Align skills and
commands save toasts with deferred restart feedback, and fix French
OpenCode elision.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
AppImage exports ARGV0 into the process environment. zsh treats that as
argv[0] for every external command, which broke Python venv detection in
the integrated terminal and managed OpenCode sessions.
Clear ARGV0 in Electron before login-shell probing, refuse to re-apply it
from shell snapshots, and strip it from terminal PTY and managed OpenCode
launch environments.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
Keep text → buttons → checkbox stack and avoid DialogFooter
row layout; use inline width so the pair stays nearly full-width.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
performConfigRefresh passed client-directory-first path into
invalidateSkillsLoadCache, missing the active-project cache key used by
loadSkills after the repository-local skills discovery fix.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
Stop using DialogFooter (sm:flex-row) so layout is text, then
centered ~40% action buttons, then the don't-show-again checkbox.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Keep Cancel and Apply & Restart at about 40% each and centered,
with the don't-show-again checkbox stacked underneath.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Center nearly full-width Cancel and Apply buttons and move the
don't-show-again checkbox below them for a clearer decision layout.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Drop OpenCode from the Settings footer apply button and confirm title so
the action fits the narrow nav and stays concise.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Replace the top-right pending CTA with a primary footer action that
replaces Reload OpenCode when changes are pending, and warn that running
chats will stop unless the user opts out of the confirmation.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Place a high-contrast count badge first on the Apply & Restart action so
pending settings changes remain obvious in the Settings chrome.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
Defer OpenCode reloads after settings mutations, track pending changes,
and expose a top-right Apply & Restart OpenCode action with a counter so
sessions stay available until the user explicitly applies.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Skills listing ignored the active project when the OpenCode client
directory was unset, so project `.agents/skills` files were created but
never shown. Prefer the active project path (matching Commands/Agents)
and soft-fall back to it on skill API routes when directory is omitted.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Gate Edit/incomplete-auth on config-layer sources so catalog providers
are not treated as editable custom overrides. Snapshot form initial
values when Edit is clicked and ignore same-id initialValues identity
changes so parent re-renders cannot wipe in-progress edits.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
Custom provider upsert uses PUT /api/provider, which was skipped by the
selective express.json allowlist and always saw an empty body.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
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>
simple-git without baseDir inherits process.cwd(), so launching
OpenChamber from a neutral directory (e.g. $HOME) and opening a git
project elsewhere produced repeated "not a git repository" status
errors and could abort project/session enumeration. Always require an
explicit baseDir, soft-handle non-repo GitErrors on status/check
routes, and cover non-git, foreign-cwd, and nested-repo cases.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Seed omitted autoSaveEnabled from the hydrated client preference (including
legacy localStorage) instead of resetting everyone to enabled. Restore SVG
non-editable flags, treat clean draft saves as success, and throw again from
disposed content-cache owners while keeping runtime-switch cache invalidation.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
React Strict Mode disposed the memoized content-cache owner while the
provider kept reusing it, so validateContextFileOpen threw before any
/api/fs/read and toasted "Failed to open file" for notes.txt. Binaries
still opened because they skip the pre-read. Serve uncached reads from
disposed owners, clear cache on runtime switch without deactivating, and
own the cache lifecycle in an effect.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Scope context-file open validation to the active project directory so
binary opens resolve against the correct workspace root.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Skip UTF-8 pre-read for known binary/image/PDF paths so the shared
editor can show preview or cannot-preview instead of failing open or
decoding binaries as text.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Ensure the new persisted editor autosave flag applies from server
settings, autosaves through appearanceAutoSave, and resets to true when
omitted from an authoritative snapshot.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Guard FilesView autosave until the selected file has finished loading,
refuse binary/PDF/office/archive text saves, and add a persisted global
autoSaveEnabled setting (default true) under Settings → General.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Resize Linux tray icons so StatusNotifier hosts show them, add Show/Hide/Close
context-menu actions, and resolve FreeDesktop theme icons for Open-in apps
(including the default file manager) instead of skipping Linux icon fetch.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Adds focused regression coverage for #2359 bootstrap-only detection
used by directory/projects startup when RuntimeAPIs are not registered yet.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
d2efa707 fixed projects-store detection via __VSCODE_CONFIG__, but
lib/desktop.isVSCodeRuntime (used by useDirectoryStore) still required
RuntimeAPIs. At webview startup that left directory init on stale
localStorage paths from other windows (#2359).
Share bootstrap detection in lib/vscodeBootstrap and use it from both
desktop runtime checks and the projects-store helper.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
react-syntax-highlighter (and its @types) is no longer imported anywhere —
code highlighting is handled by the Shiki web worker. Drop the dead deps.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Both are only needed on explicit user actions (export message as image,
capture preview annotation screenshot). Defer them with dynamic import so
~140 KB leaves the eager app-shell graph.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
The manualChunks package-name parser used the first node_modules/ segment,
which under bun's isolated install (.bun/<pkg>@<ver>/node_modules/<pkg>) is
always '.bun'. This collapsed nearly every dependency — including lazy-only
heavy libs (Shiki langs/themes, transformers, katex, mermaid, elkjs, etc.) —
into one 18.5 MB eager 'vendor-.bun' chunk, defeating all code splitting.
- Resolve the real package from the LAST node_modules/ segment.
- Pin Vite's __vitePreload helper to its own chunk so Rollup stops
co-locating it inside vendor-shiki and dragging Shiki core + the 629 KB
oniguruma engine into the eager bootstrap.
- Drop the now-dead react-syntax-highlighter chunk rule.
Eager bootstrap graph drops from ~18.5 MB to ~0.44 MB.
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>