Commit Graph
58 Commits
Author SHA1 Message Date
Cursor AgentandSerhii Dziupin 938e58868f fix(ui): let Escape reach the terminal PTY from the context panel
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>
2026-08-05 17:11:41 +00: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
Cursor AgentandSerhii Dziupin 65a1eec782 fix(ui): keep manual model override after delegated subtask completes
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.

Closes openchamber/openchamber#2404

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-04 12:46:48 +00:00
Cursor AgentandSerhii Dziupin bc24b8a836 fix(walkthrough): drop info tint from disabled Generate button
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>
2026-08-04 12:43:31 +00:00
Cursor AgentandSerhii Dziupin 8d8bc8edcb fix(providers): hide models until credentials exist
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>
2026-08-04 12:39:16 +00:00
Cursor AgentandSerhii Dziupin 5c6eee331e fix(walkthrough): keep unauthenticated models out of the picker
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>
2026-08-04 12:35:25 +00:00
Cursor AgentandSerhii Dziupin 0bdf5ee4f3 fix(providers): hide API key form for OAuth-only providers
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>
2026-08-04 12:30:47 +00:00
Cursor AgentandSerhii Dziupin 35f17e9e96 fix(walkthrough): hide unauthenticated models and disable Generate
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>
2026-08-04 12:22:54 +00:00
Cursor AgentandSerhii Dziupin abb396e080 fix(walkthrough): block unauthenticated providers with a friendly refusal
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.

Closes openchamber/openchamber#2607

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-04 11:29:58 +00:00
Cursor AgentandSerhii Dziupin f4f23704b8 fix(ui): drop Ctrl+L hint from text selection menu
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>
2026-08-04 08:21:14 +00:00
Cursor AgentandSerhii Dziupin 682c42df8f fix(ui): harden Ctrl+L selection capture and menu delivery
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>
2026-08-03 14:24:22 +00: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
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
Cursor AgentandSerhii Dziupin 9cccc8d667 Load provider OAuth methods on reconnect, not only add mode.
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>
2026-08-03 12:47:12 +00:00
Cursor AgentandSerhii Dziupin 3ad3f21024 feat(ui): add Ctrl/Cmd+L to send selected text to chat
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>
2026-08-03 12:04:35 +00:00
Cursor AgentandSerhii Dziupin 395e08c683 Document deferred OpenCode restart contract and drop dead helper.
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>
2026-08-03 12:03:37 +00:00
Cursor AgentandSerhii Dziupin 0d24d0a167 fix(skills): repair renameSkill directory resolution after merge
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>
2026-08-03 11:05:27 +00:00
Cursor AgentandSerhii Dziupin 5b9a8c4bef merge(main): resolve skills.test.js import conflict
Keep both discoverSkills from main and renameSkill from this branch.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 09:55:56 +00:00
Cursor AgentandSerhii Dziupin 47b441d719 merge(main): resolve terminal runtime.test.js ARGV0 vs DA query
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>
2026-08-03 09:54:22 +00:00
Cursor AgentandSerhii Dziupin 3cb02439ea Add German pendingRestart locale keys after main merge.
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>
2026-08-03 09:52:24 +00:00
Cursor AgentandSerhii Dziupin c070b9c53b Merge origin/main into deferred OpenCode restart branch.
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>
2026-08-03 09:26:57 +00: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 5defd1af75 fix(terminal): drop native ARGV0 for bun-pty via env -u
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>
2026-08-03 09:12:35 +00:00
Cursor AgentandSerhii Dziupin ebf1b027cc fix(i18n): add German strings for custom LLM providers
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>
2026-08-03 08:56:23 +00:00
Cursor AgentandSerhii Dziupin 0cde9e9413 Fix deferred restart review findings.
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>
2026-08-03 08:56:05 +00:00
Cursor AgentandSerhii Dziupin be38fb8cf4 fix(desktop): strip AppImage ARGV0 before child shells (#2588)
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>
2026-08-03 08:54:39 +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 7c27a39cf4 Force confirm dialog action widths with inline 40%.
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>
2026-08-03 08:51:17 +00:00
Cursor AgentandSerhii Dziupin fbdc0830db Enforce equal 40% widths for confirm dialog actions.
Wrap Cancel and Apply & Restart in fixed-percentage containers so
Button content sizing cannot skew the centered pair.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-03 08:29:58 +00:00
Cursor AgentandSerhii Dziupin 576791d024 fix: invalidate skills cache with loadSkills directory key
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>
2026-08-03 08:23:37 +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 12715c6e73 Fix Apply & Restart confirm dialog vertical stack.
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>
2026-08-03 08:15:26 +00:00
Cursor AgentandSerhii Dziupin 4956a133d3 Make Apply & Restart confirm actions nearly full-width.
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>
2026-08-03 08:06:19 +00:00
Cursor AgentandSerhii Dziupin 7014374837 Restyle Apply & Restart confirm dialog actions
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>
2026-08-03 08:00:58 +00:00
Cursor AgentandSerhii Dziupin 72b0d9b90f Shorten Apply & Restart action label
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>
2026-08-03 07:35:31 +00:00
Cursor AgentandSerhii Dziupin 096f2fa52c Move Apply & Restart into Settings footer with confirm
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>
2026-08-03 07:25:10 +00:00
Cursor AgentandSerhii Dziupin 190fbeedb4 Improve pending OpenCode restart counter contrast
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>
2026-08-03 07:10:41 +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 57819dd164 Accumulate OpenCode settings restarts behind Apply & Restart
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>
2026-08-03 06:56:38 +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
Cursor AgentandSerhii Dziupin 049600df72 fix: discover repository-local .agents skills in Settings
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>
2026-08-02 12:57:51 +00:00
Cursor AgentandSerhii Dziupin b7c09ee137 fix custom provider edit gating and form reset on re-render
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>
2026-08-02 12:42:23 +00: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 d84e4e0312 test: cover JSON body parsing for /api/provider
Guards the selective express.json allowlist so custom provider upsert
requests keep a parsed body.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-08-02 10:12:28 +00:00
Cursor AgentandSerhii Dziupin 0131c66bdd fix: parse JSON bodies for /api/provider routes
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>
2026-08-02 09:55:41 +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
Cursor AgentandSerhii Dziupin d839c8b0f8 fix(git): pin simple-git to project path for session discovery
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>
2026-07-31 09:53:09 +00:00
Cursor AgentandSerhii Dziupin be572c1692 fix(files): address autosave migration and review regressions
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>
2026-07-30 11:29:37 +00:00
Cursor AgentandSerhii Dziupin fc4db0c656 fix(files): keep text opens working after content-cache dispose
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>
2026-07-30 09:02:14 +00:00
Cursor AgentandSerhii Dziupin d35cf957ac fix(files): pass directory into context panel binary open guard
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>
2026-07-30 08:22:10 +00:00
Cursor AgentandSerhii Dziupin 4f30a00814 fix(files): let context panel open binaries into FilesView safely
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>
2026-07-30 07:05:34 +00:00
Cursor AgentandSerhii Dziupin d79908cc9e test(ui): cover autoSaveEnabled settings sync round-trip
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>
2026-07-30 06:39:57 +00:00
Cursor AgentandSerhii Dziupin 5b727ed53c fix(files): prevent autosave data loss on load lag and binary files
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>
2026-07-30 06:37:47 +00:00
Cursor AgentandSerhii Dziupin 0caff15b3e fix(desktop): Linux AppImage tray menu and system file-manager icons
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>
2026-07-28 17:57:44 +00:00
Cursor AgentandSerhii Dziupin f172119921 chore(deps): remove unused react-syntax-highlighter
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>
2026-06-26 11:26:11 +00:00
Cursor AgentandSerhii Dziupin 05dd270a9a perf(ui): lazy-load html-to-image and snapDOM
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>
2026-06-26 11:26:11 +00:00
Cursor AgentandSerhii Dziupin 3d27c0a0ca perf(build): fix bun .bun chunk parsing and isolate Vite preload helper
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>
2026-06-26 11:26:11 +00:00