Commit Graph
287 Commits
Author SHA1 Message Date
Bohdan Triapitsyn d5cdf464fa release v1.11.2 2026-05-18 01:01:31 +03:00
Erman HAVUÇandBohdan Triapitsyn 631905764e feat(git): inline file diffs in commit history rows (#1291)
* chore: add .worktrees/ to gitignore for worktree workflow

* feat(git): add getCommitFileDiff service function

* docs(git): document getCommitFileDiff in module docs

* feat(git): add GET /api/git/commit-file-diff route

* feat(git): add CommitFileDiffResponse type and GitAPI method signature

* feat(git): add getCommitFileDiff HTTP client function

* feat(git): add getCommitFileDiff API facade

* feat(git): add getCommitFileDiff stub to VS Code bridge

* feat(git): add getCommitFileDiff to VS Code gitService and bridge handler

* feat(git): add inline file diff to history commit rows

* fix(git): consolidate CommitFileDiffResponse import to gitApi facade

* fix(git): pass directory through history, validate hash, propagate git errors

* fix(git): use exit code check for VS Code getCommitFileDiff error detection

* fix(git): VS Code rename detection, hash validation parity, retry on error

* fix(git): register scroll container as virtualizer root to fix empty space in history diffs

* fix(git): address greptile review — rename key extraction, directory guard, language detection, isBinary cleanup

* fix(git): harden history inline diffs

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-17 20:08:17 +03:00
Erman HAVUÇandBohdan Triapitsyn fa8fac2590 fix(git): use local-first base ref resolution in getLog, port to VS Code (#1284)
* chore: add .worktrees/ to gitignore for worktree workflow

* fix: resolve remote-tracking base ref in getLog for PR description generation

getLog was calling git log <base>..<head> with a bare branch name that
often doesn't exist locally (e.g. main when only origin/main is present),
causing a fatal 'unknown revision' error and HTTP 500.

Apply the same origin/<base> resolution already used in getRangeDiff and
getRangeFiles: check refs/remotes/origin/<base> first and prefer that ref
if it exists.

Also fix getGitLog in gitApiHttp.ts to read the JSON error body on
failure instead of falling back to response.statusText, so the actual
git error message surfaces in the toast instead of 'Internal Server Error'.

* fix(git): use local-first ref resolution in getLog and port to VS Code

- Replace unconditional origin/<from> preference in getLog() with a
  local-first fallback: prefer the local ref, only use origin/<from>
  when the local ref cannot be resolved, and pass through unchanged
  when neither resolves so git surfaces a meaningful error.
- Extract the logic into an exported resolveBaseRefForLog(from, checkRef)
  helper so it is unit-testable without a real git repo.
- Add service.test.js with 6 cases covering local-wins, origin-fallback,
  neither-exists passthrough, and falsy/empty inputs.
- Port the same local-first resolution to packages/vscode/src/gitService.ts
  getGitLog() to close the cross-runtime parity gap; also handles
  from-only ranges as from..HEAD, matching the web service contract.

* fix(vscode): add missing to-only range branch in getGitLog

When only 'to' is supplied (no 'from'), the web service appends it as a
positional git-log argument. The VS Code port was missing this branch and
silently returned unbounded history instead. Adds the else-if to restore
full cross-runtime parity.

* fix(vscode): surface git log errors

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-17 19:28:08 +03:00
Bohdan Triapitsyn 947f725976 release v1.11.1 2026-05-15 23:18:55 +03:00
Bohdan Triapitsyn a4decfd3dd release v1.11.0 2026-05-14 15:36:07 +03:00
Bohdan Triapitsyn 92f1fa7dfe fix: avoid opencode structured output session breakage
Replace server-enforced structured output with local JSON parsing for Git generation
Render generated commit and PR JSON responses as compact chat cards
Tighten generation prompts while preserving active session context
2026-05-14 02:16:52 +03:00
Bohdan Triapitsyn ef2dc8751d chore: updated opencode sdk version to 1.4.48 2026-05-13 15:59:49 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 2c25bfc8d7 fix(vscode): skip stale active editor broadcasts (#1246)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-13 10:37:11 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez cde9c656e7 fix(vscode): sync agent manager settings saves (#1245)
* fix(vscode): sync agent manager settings saves

* fix(vscode): receive agent manager settings sync

---------

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-13 10:33:54 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 6b52efbd34 fix(vscode): abort SSE reconnect delays (#1248)
* fix(vscode): abort SSE reconnect delays

* fix(vscode): throw abort reason after SSE retry cancel

---------

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-13 10:33:30 +03:00
kjhqandartac f059bc8dd6 fix: remove GitHub hardcoding and generalize for non-GitHub git providers (#1216)
* fix: remove GitHub hardcoding and generalize for non-GitHub git providers

* fix: guard SSH path extraction against missing colon separator

---------

Co-authored-by: artac <artac@artacs-MacBook-Pro.local>
2026-05-13 10:19:31 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 3228e7f45f fix(vscode): clear activity snapshot on stop (#1201)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:12:01 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 75d78b6113 fix(vscode): clean up disposed chat webviews (#1196)
* fix(vscode): clean up disposed chat webviews

* fix(vscode): scope disposed webview streams

---------

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:10:27 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 736e33ab67 fix(vscode): cancel activity watcher retries on stop (#1194)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:09:49 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez f2ce138e86 fix(vscode): include mtime in fs stat proxy (#1188)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:06:40 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 3c7c20e1b6 fix(vscode): resolve chat view before commands (#1237)
* fix(vscode): resolve chat view before commands

* fix(vscode): guard chat command payload delivery

---------

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:02:42 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 9816f5dd6c fix(vscode): clear bridge request timeouts (#1236)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-12 11:02:15 +03:00
Bohdan Triapitsyn c38727efc9 release v1.10.4 2026-05-09 01:18:33 +03:00
Bohdan Triapitsyn a591f63ed2 release v1.10.3 2026-05-08 16:26:07 +03:00
Isaac Sanchez-HawkinsandIsaac Sanchez 28f7a52ec8 fix(git): forward status mode to runtimes (#1153)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
2026-05-08 15:57:25 +03:00
Bohdan Triapitsyn c827d6b8df fix: restore messages after redo
Refetches session messages before applying redo
Aligns undo/redo navigation with OpenCode behavior
Keeps restored messages visible after unrevert
2026-05-08 14:53:48 +03:00
Bohdan Triapitsyn 686fec7419 release v1.10.2 2026-05-07 23:54:35 +03:00
zerone0xandBohdan Triapitsyn 3fbcdbc3dc fix(quota): stop showing misleading OpenRouter percentages (#1127)
* fix(quota): stop showing misleading OpenRouter percentages

Fixes #1085

* fix(quota): clean up OpenRouter credit labels

---------
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-07 23:39:53 +03:00
Bohdan Triapitsyn 4cc2f1bff6 refactor: split vscode into a dedicated app root
Renders VS Code through its own app entrypoint
Keeps shared app effects focused and reusable
Avoids importing the full desktop app root in VS Code
2026-05-07 01:31:17 +03:00
Bohdan Triapitsyn 8fb6cd1de3 chore: update screenshot references 2026-05-06 23:17:23 +03:00
Bohdan Triapitsyn 633edb27c3 release v1.10.1 2026-05-06 20:03:29 +03:00
Bohdan Triapitsyn 966eb5a1e2 chore: update opencode sdk version 2026-05-06 19:46:01 +03:00
82b36e5080 fix: align session status parsing and vscode reconnect reconcile (#1125)
* fix: align session status parsing and vscode reconnect reconcile

* fix vscode session status fallback and reconcile cleanup safety

---------

Co-authored-by: vhqtvn <8930337+vhqtvn@users.noreply.github.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-06 19:45:31 +03:00
Bohdan Triapitsyn b18886598c fix: validate configured OpenCode binary (#1120)
* Validate configured OpenCode binary

* fix: keep WSL OpenCode startup failures retryable

Avoids misclassifying transient WSL resolution failures as invalid binary config
Adds regression coverage for WSL strict-mode handling
Cleans up temporary test directories
Fix for #1119 issue
2026-05-06 02:06:16 +03:00
Bohdan Triapitsyn 7b66bca2c5 fix: clarify sync button and result toasts
Show sync label when no remote changes are known
Report pulled file counts in sync success toasts
Count pulled files correctly in VS Code sync
2026-05-05 23:53:21 +03:00
Bohdan Triapitsyn 93267927ff feat: add git stash management
Add a Stashes dialog with create, apply, pop, and drop actions
Include untracked files automatically when stashing
Show file counts for current changes and stash entries
2026-05-05 23:39:20 +03:00
Bohdan Triapitsyn c80c2b62a8 feat: add one-click git sync button
Combine fetch, pull with rebase, and push into one sync action
Keep remote dropdown focused on safe fetch actions
Block sync when uncommitted changes would conflict with rebase
2026-05-05 20:45:31 +03:00
Bohdan Triapitsyn 495b9d56d2 release v1.10.0 2026-05-05 01:39:33 +03:00
David SazandBohdan Triapitsyn 5475ef2db3 Feat/add ide opened file to chat context (#1106)
* feat(chat): add active editor file context and related functionality

* feat(chat): improve active editor file context handling and update translations

* feat(i18n): standardize quotation marks in file attachment messages

* update Korean translation for image removal action in file attachment

* feat(chat): refine active editor file handling and optimize broadcast logic

* fix(chat): stabilize VS Code editor context chips

---------

Signed-off-by: David Saz <david.saz.g@gmail.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-05 01:24:03 +03:00
Islam NoflandBohdan Triapitsyn a23f5e7545 fix: cross-verify update API claims against npm registry (#1082)
* fix: cross-verify update API claims against npm registry

* Update packages/web/server/lib/package-manager.js

Signed-off-by: Islam Nofl <islamnofl.official@gmail.com>

* fix: show live server version in AboutDialog instead of stale build-time constant

* fix: add comment to empty catch block to satisfy lint no-empty rule

* fix: preserve live about dialog version in electron

* fix: scope update checks by runtime

---------

Signed-off-by: Islam Nofl <islamnofl.official@gmail.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-01 12:23:58 +03:00
Shyamalan KannanandBohdan Triapitsyn bcbf34b1d1 feat: add Behavior settings page for global AGENTS.md (#1079)
* feat: add Behavior settings page for global AGENTS.md

- Add new 'Behavior' settings page to manage global system prompt
- Sync global behavior prompt to ~/.config/opencode/AGENTS.md
- Add GET/PUT /api/behavior/agents-md endpoints with 1MB size limit
- Add AbortController guards and parallel fetches in BehaviorPage
- Add i18n translations for en, es, ko, pt-BR, uk, zh-CN
- Add globalBehaviorPrompt to DesktopSettings type and sanitizer
- Add /api/behavior to express.json() body-parser whitelist
- Ensure atomic save: AGENTS.md written before settings updated

* fix: address Greptile review feedback

- Rename misleading 'trimmed' variable to 'value' in settings-helpers.js
- Add Content-Length guard for /api/behavior before 50mb JSON parser
- Use express.json({ limit: '1mb' }) for behavior endpoints
- Add actual translations for es, ko, pt-BR, uk, zh-CN locales

* fix(vscode): support behavior settings endpoint

* fix(behavior): wait for settings persistence

* fix(behavior): end agents file with newline

* fix(behavior): avoid duplicate textarea resize handles

* fix(behavior): clarify global rules copy

* fix(behavior): move rules note into tooltip

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-01 00:39:55 +03:00
ricautomation 56d27ed5d3 fix(opencodeConfig): retain headers for remote MCP configurations (#1072)
Resolves issue #1033 where remote GitHub MCP setups failed to work in OpenChamber because the `headers` property (which contains authorization credentials) was being dropped during configuration parsing in `packages/vscode/src/opencodeConfig.ts`.
2026-04-30 23:34:12 +03:00
Bohdan Triapitsyn bbd83d60c6 fix: use valid Zen summaries for notes 2026-04-30 13:07:37 +03:00
Bohdan Triapitsyn 90c8c948f8 chore: update changelogs with unreleased changes 2026-04-30 12:22:49 +03:00
Islam NoflandBohdan Triapitsyn 21253d7fc2 feat: fork-aware issue/PR listing & OpenCode startup loading indicator (#1061)
* Add design spec: OpenCode readiness loading indicator

* Add implementation plan: OpenCode readiness loading indicator

* feat: add useOpenCodeReadiness hook

* feat: add i18n keys for common.loading

* feat: add loading state to ModelSelector

* feat: add loading state to AgentSelector

* feat: add loading state to ModelControls chat selectors

* update package-lock

* feat(github): add shared fork detection utility

* feat(github): make issue listing fork-aware

* feat(github): make PR listing fork-aware

* feat(types): add sourceRepo to issue/PR summary types

* feat(ui): add source badges to GitHub integration dialog

* feat(ui): add source badges to issue/PR picker dialogs

* feat(github): pass headRemote in PR creation for fork support

* feat(ui): add source→target label in PR tab for fork workflows

* fix(github): allow PR section on base branch when upstream remote exists

* fix(github): show PR section on any branch including main for fork→upstream PRs

* fix(github): allow PullRequestSection to render on base branch when upstream remote exists

* feat(github): auto-detect upstream repo for fork→upstream PR creation

- Add GET /api/github/repo/upstream endpoint to discover fork's upstream
- Fix PullRequestSection canShow to allow PR creation on base branch when repo is a fork
- Add virtual upstream target in remote dropdown (no explicit upstream remote needed)
- Add targetRepo parameter to /api/github/pr/create for direct upstream targeting
- Add repoUpstream() API client method and GitHubRepoUpstreamResult type

* feat(github): auto-detect upstream repo for fork→upstream PR creation

- Add GET /api/github/repo/upstream endpoint to discover fork's upstream
- Fix PullRequestSection canShow to allow PR creation on base branch when repo is a fork
- Add virtual upstream target in remote dropdown (no explicit upstream remote needed)
- Add targetRepo parameter to /api/github/pr/create for direct upstream targeting
- Add repoUpstream() API client method and GitHubRepoUpstreamResult type

* fix: complete fork→upstream PR workflow

- Server: return defaultBranch from /api/github/repo/upstream endpoint
- Server: fix cross-repo head ref construction (compare repos, not remote names)
- Server: filterActiveRemoteBranches checks all remotes, not just origin
- UI: set targetBaseBranch to upstream's default branch when using detected upstream
- UI: include all remote branches in base branch dropdown when using detected upstream
- UI: skip base===head check for cross-repo PRs (same branch name on different repos is valid)
- Types: add defaultBranch to GitHubRepoUpstreamResult

* chore: delete superpowers folder

* feat: add (local)/(remote) labels to PR branch display and adapt Repository button to selected remote

* feat: Repository button adapts to selected remote (upstream vs origin)

* fix: complete fork→upstream PR feature gaps

Server:
- Extend /api/github/repo/upstream to return defaultBranchSha and remoteName
- Reuse headRepo result instead of redundant resolveGitHubRepoFromDirectory call
- Return clear error when headRepo is null (invalid GitHub URL)

UI:
- Add upstream's default branch to availableBaseBranches when using detected upstream
- Use upstream's default branch SHA in git log for generate description (fixes 'No commits found in range main...main')
- Show qualified names (owner/repo · branch) in base branch dropdown when using detected upstream

Types:
- Add defaultBranchSha and remoteName to GitHubRepoUpstreamResult

* fix: move detectedUpstream state before availableBaseBranches to fix temporal dead zone

* fix: fetch upstream branches from GitHub API for base branch dropdown

- Add GET /api/github/repo/branches endpoint to fetch branches via Octokit
- Add repoBranches() to GitHub API client and interface
- Fetch upstream branches on detection and store in upstreamBranches state
- Include upstreamBranches in availableBaseBranches when using detected upstream
- Re-add availableBaseBranches memo and auto-correction effect that were lost
- Remove unnecessary qualified names from dropdown (upstream is already selected)

* fix: restore prStatusKey and statusEntry declarations lost during refactor

* fix: cleanly re-apply all fork→upstream PR UI changes

Restored PullRequestSection.tsx from clean base and re-applied:
- Expand detectedUpstream type with defaultBranch, defaultBranchSha, remoteName
- Add upstreamBranches state and fetch on upstream detection
- Include upstream branches in availableBaseBranches when using detected upstream
- Use upstream default branch SHA in generate description (fixes 'No commits found')
- Adapt Repository button URL to selected remote
- Add (local)/(remote)/(upstream) labels to branch display

* fix: move detectedUpstream/upstreamBranches before availableBaseBranches to fix TDZ

* style: add pill badge styling to upstream repo source labels

* fix: don't cache error PR status responses, allow force-bypass of server cache

* fix: resolve PR status cache bugs, stale directory fallback, and upstream re-detection

* fix: keep collapse button visible when scrolling long user messages

- Collapse button now sticks to top of scrollable user message content instead of scrolling away

* fix: checkbox focus ring blends into sidebar background

* fix: polish fork PR follow-ups

* fix: remove user message collapse artifact

* fix: tighten fork PR internals

* fix: check all remotes for fork PR status

* fix: recover sidebar PR status misses

---------

Signed-off-by: Islam Nofl <islamnofl.official@gmail.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-04-29 12:03:39 +03:00
Bohdan Triapitsyn 17650becc0 release v1.9.10 2026-04-28 17:45:58 +03:00
Bohdan Triapitsyn 390db58cc8 fix: add VS Code quota support for MiniMax and Ollama (fix for #1051)
Adds MiniMax coding plan quota support
Adds Ollama Cloud quota support
Detects configured providers in VS Code
2026-04-27 18:44:05 +03:00
Dolphin 25c6e79be7 Fix: normalize Windows drive letter in VS Code extension webview paths (#1052)
Extract normalizeWindowsDriveLetter to shared pathUtils module

Normalize workspaceFolder to uppercase drive letter to match OpenCode
server's path normalization. This fixes session visibility issues
where VS Code extension sessions don't appear in CLI/desktop and vice
versa due to case-sensitive directory comparison on Windows.

Changes:
- Create pathUtils.ts with shared normalizeWindowsDriveLetter function
- Update opencode.ts to import from pathUtils instead of inline definition
- Update ChatViewProvider.ts, AgentManagerPanelProvider.ts,
  SessionEditorPanelProvider.ts to import from pathUtils
2026-04-27 18:34:50 +03:00
Bohdan Triapitsyn 67f082988c release v1.9.9 2026-04-26 20:49:28 +03:00
Bohdan Triapitsyn a2dc5021bc fix: stabilize model and task UI hints
Keep thinking shortcut hint visible without layout shift
Restore JSON file icons across shared file lists
Use task status icons in the input status row
2026-04-26 14:27:06 +03:00
Bohdan Triapitsyn c94da0c1a0 release v1.9.8 2026-04-22 22:15:23 +03:00
Bohdan Triapitsyn dcd68baa09 fix: cross-client settings sync and sidebar session pagination
- Paginate /experimental/session via time.updated fallback so sidebar
  loads past the 200-item first page when server omits x-next-cursor.
- VSCode extension persists all settings in shared
  ~/.config/openchamber/settings.json (not only opencodeBinary),
  matching Desktop and Web. Canonical read from disk with globalState
  fallback for eager migration of pre-existing users.
- Desktop settings sync: guard the contextBridge read-only
  __OPENCHAMBER_HOME__ assignment that was silently throwing a TypeError
  and skipping the whole applySettings chain — leaving server-synced
  values (autoDeleteAfterDays, autoDeleteEnabled, sessionRetentionAction)
  stuck at local defaults. Also wait for Zustand persist hydration before
  applying server settings to avoid overwrite races.
2026-04-22 15:43:15 +03:00
Bohdan Triapitsyn 2a0aef89d5 release v1.9.7 2026-04-22 00:36:25 +03:00
cyanandBohdan Triapitsyn a8719f0a8e Match Opencode Config Resolution Behavior (#949)
* fix(config): match opencode config resolution behavior

* fix(config): use primary opencode config file

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-04-21 22:47:42 +03:00
jwcrystal 2f5912c287 fix(files): refresh open file content after external changes (#967)
* fix(files): refresh open file content after external edits

Previously, opening a file in the Files view and then editing it externally
(e.g. via CLI or another editor) would show stale content. Even closing and
reopening the file returned cached content — a full page reload was required.

Root causes:
1. The in-memory readFile cache used path-only hits, with no metadata
   validation. External edits were invisible until the cache was evicted.
2. No polling mechanism existed to detect external changes to the open file.

Fix:
- Add mtimeMs to statFile across all runtimes (web, VS Code, desktop).
- Cache layer (RuntimeAPIProvider): validate cache hits against current stat
  metadata (mtimeMs + size). On miss, use stat→read→stat to avoid TOCTOU.
- UI layer (FilesView): poll the open file every 2s; on detected change, set
  loadedFilePath=null to trigger the existing load effect once (no double
  reload). Skip polling when tab is hidden or editor has unsaved changes.
- After save, refresh the stat ref so the next poll doesn't see a spurious
  change from the save itself.

Addresses review feedback from PR #827 (double reload + TOCTOU).

* fix(files): address P2 review findings

- readFreshFile retry now uses stat→read→stat to maintain TOCTOU
  protection during the retry path (not just the initial read).
- Replace isDirty in polling effect deps with isDirtyRef to avoid
  unnecessary interval teardown/restart on every edit/save cycle.
2026-04-21 18:04:24 +03:00