Repository navigation
1.0.59
What's Changed
Show response size in WebFetch tool output (#123)
- add byte-accurate response size formatting to
WebFetchToolViewusingTextEncoder, with human-readablebytes,KB, andMBoutput - display the formatted response size above successful web fetch content so users can quickly gauge payload size while keeping the existing URL, prompt, and output rendering intact
- add renderer tests that cover small, medium, and large responses to verify the new size display across unit boundaries
Add GitHub Pages favicon assets (#122)
This adds proper favicon support to the GitHub Pages site so browsers, bookmarks, and home screen shortcuts use Hive branding instead of a generic icon.
feat: image preview and side-by-side image diff support (#120)
- Shared image utilities (
src/shared/types/file-utils.ts): AddedisImageFile,isSvgFile,isBinaryImageFile, andgetImageMimeTypehelpers with MIME type mapping for png, jpg, jpeg, gif, svg, webp, ico, and bmp formats. Exported fromsrc/shared/types/index.tsfor use across all processes. - Base64 file reading in main process (
src/main/services/file-ops.ts): NewreadFileAsBase64function reads files from disk as base64 with validation (existence, size limit, directory check) and automatic MIME type detection. - Git ref base64 content (
src/main/services/git-service.ts): NewgetRefContentBase64method onGitServiceretrieves binary file content from any git ref (HEAD, index, branch) as base64 usinggit showwith buffer encoding to avoid corrupting binary data. - New IPC channels: Added
file:readImageAsBase64,git:getFileContentBase64, andgit:getRefContentBase64handlers in main process, with corresponding preload bridge methods and TypeScript declarations (window.fileOps.readImageAsBase64,window.gitOps.getFileContentBase64,window.gitOps.getRefContentBase64). - ImagePreview component (
src/renderer/src/components/file-viewer/ImagePreview.tsx): Reusable image preview with checkerboard transparency background, natural dimension display, and stale dimension reset on source change. - FileViewer image support (
src/renderer/src/components/file-viewer/FileViewer.tsx): Binary image files (png, jpg, gif, webp, etc.) now render as visual previews instead of showing garbled text. SVG files support a preview/source toggle — preview renders the SVG visually, source shows XML with syntax highlighting. - ImageDiffView component (
src/renderer/src/components/diff/ImageDiffView.tsx): Side-by-side "Before / After" image comparison for git diffs. Handles all diff contexts: staged vs HEAD, unstaged vs index, branch comparisons, and new/untracked files. SVGs use text-based content withencodeURIComponent+ base64 encoding for proper Unicode handling; binary images use the new base64 IPC channels. - MainPane routing (
src/renderer/src/components/layout/MainPane.tsx): Image file diffs are now routed toImageDiffViewinstead of the text-based Monaco diff editor, which cannot display binary content.
fix: clear original session state and track send time on supercharge (#119)
Fixes two issues with the supercharge/handoff flow in SessionView:
-
Elapsed timer not firing on supercharge auto-sends: When a supercharge auto-sends a pending message to a new session,
userExplicitSendTimeswas not being set alongsidemessageSendTimesinsendPendingMessage. This caused the elapsed timer to never start for the new session. Now both maps are updated so the timer fires correctly. -
Original session stuck in
plan_readystate after handoff: After launching a supercharge (creating a new session and handing off the plan), the originating session retained its pending plan and worktree status, causing it to re-derive asplan_ready. All three supercharge/handoff handlers (handlePlanReady,handlePlanReadySuperpowers,handlePlanReadySuperpowersLocal) now clearpendingPlanandsessionStatuson the original session before creating the new one. -
Missing
sessionIdin dependency arrays: AddedsessionIdto theuseCallbackdependency arrays of the three handoff handlers to ensure they reference the correct session when clearing state.
Fix command filter bash chain splitting and pattern matching (#118)
Fixes critical issues in the command filter service where bash commands with quoted strings containing operators (|, &&, ||, ;) were incorrectly split into multiple sub-commands. This caused legitimate commands like git commit -m "message with | or && chars" to fail allowlist validation.
Key Changes
- Improved bash chain splitting: Rewrote
splitBashChain()to properly handle quotes (single and double) and escape sequences, ensuring operators inside quoted strings are not treated as command separators - Enhanced pattern matching logging: Added comprehensive debug logging throughout the matching process to help diagnose allowlist/blocklist issues
- Better allowlist debugging: Now logs the full allowlist and each sub-command check to make troubleshooting easier
- Comprehensive test coverage: Added 178 lines of tests covering edge cases including:
- Git commit commands with long messages containing special characters
- Heredocs with operators inside
- Mixed quote types and escaped quotes
- Complex chained commands
Technical Details
The old implementation used regex splitting:
command.split(/\s+&&\s+|\s+\|\|\s+|\s+\|\s+|\s*;\s+/)This naively split on all operators regardless of context. The new implementation uses a character-by-character parser that tracks quote state and only splits on operators outside of quoted strings.
Example Issue Fixed
Before this fix, the command:
git commit -m "Fix: using | int filter to convert port"Would be incorrectly split into multiple commands because of the | character in the commit message, causing it to fail allowlist validation even when bash: git commit * was allowed.
Fix Vite dev server URL detection through ANSI escape codes (#116)
- Fix ANSI code stripping in dev server URL extraction:
extractDevServerUrl()informat-utils.tsnow strips ANSI escape codes from terminal output before matching against the dev server URL pattern. Vite wraps its "Local: http://localhost:5173/" output in ANSI color codes (\x1b[36m,\x1b[1m, etc.), which previously prevented the regex from matching the URL. - Import
stripAnsifromansi-utils: Added the import toformat-utils.tsso the existing ANSI-stripping utility is applied to each output line before regex matching. - Add test case for Vite-formatted output: A new test in
open-in-chrome-ui.test.tsverifies thatextractDevServerUrlcorrectly findshttp://localhost:5173/when the output contains Vite's typical ANSI-colored lines.
Fix documentation issues in merged PR #108 (#113)
This PR fixes several documentation issues that were identified after PR #108 was merged. These fixes address keyboard shortcut conflicts, inconsistencies, and broken links.
Add copy command and bash command display to tool cards (#110)
Enhances the tool card user experience in OpenCode sessions with two key features:
- Copy Command context menu: Right-click on any tool card to access a new "Copy Command" option that intelligently extracts the most relevant information based on tool type
- Bash command display: Bash tool cards now show the full command in a terminal-style format (with green
$prompt) before the output, making it easier to see what was executed