Releases: HALDRO/PrimeCode
Releases · HALDRO/PrimeCode
Release list
v1.5.8
PrimeCode v1.5.8
Features
- Forwarded SSE Events: Direct SSE connection from webview to OpenCode CLI, bypassing extension host for event processing — reduces latency and improves session status, permission request, and error propagation.
- RuntimeReloadService: New deferred reload mechanism with session-aware lifecycle, enabling safe configuration-dependent restarts without disrupting active sessions.
- PrimeCode Configuration Management: Persistent state management via
primecode.jsonwith schema-driven validation (Zod), atomic file writes to prevent corruption, and caching layer. - Server Management in ChatProvider: Managed runtime restart, health monitoring, and connection/disconnection state tracking in CLIExecutor and ChatProvider.
- Proxy Provider Synchronization: Enhanced provider config synchronization across ConfigFileWatcherService, OpenCodeClientService, and ProviderHandler.
- Permission & Auto-Respond Refactor: Streamlined permission handling in OpenCodeExecutor and ToolHandler with improved auto-respond logic and test coverage.
Performance & UI
- ScrollContainer Optimization: Replaced MutationObserver + polling with ResizeObserver for layout-aware scroll behavior — eliminates forced reflows during token streaming.
- SettingsPage Rendering Fix: Colocated
apiKeyInputstate to prevent full panel re-renders on keystroke; replaced JS-based ResizeObserver with CSS Container Queries. - MessageItem Re-render Reduction:
SimpleToolGroupnow queriespartsstatically from Zustand store instead of recursive re-renders of all tool groups during streaming. - Chat Input Latency: Zustand store actions skip deep Immer mutations on keystroke events, significantly reducing typing lag.
- App Exit Transitions Removed: Disabled AnimatePresence to prevent concurrent rendering of two heavy message lists during session switches.
- React Compiler: Babel plugin for React Compiler enabled in Vite config;
wdyr.tsremoved.
Robustness
- Background Process Teardown: Process group targeting on Unix/macOS for zero zombie daemon processes on extension deactivation.
- Config File Watcher Fixes: Workspace watcher lifecycle corrections to prevent memory leaks during folder changes.
- Safe Config Writes: Atomic file writes protect against corruption and Windows file-locking conflicts.
- Session Status Enhancements: Improved session status propagation, error handling, and reconnect stability.
Refactoring
- Code cleanup across
common/,core/,webview/— removed dead exports, unused schemas (normalizedTypes.ts,proxyEndpoints.ts), unused component files, andwdyr.ts. - Consolidated tool registry and token stats utilities.
- Moved volatile model selections into workspace-level state, decoupling from global config.
Chore
- Switched package scripts to
bunrunner. - Updated dependencies (package.json, bun.lock).
- Enhanced TypeScript config for webview with
vite/clienttypes. - Updated Vite configuration with Babel plugin for React Compiler.
v1.5.7
PrimeCode v1.5.7
New
- OpenAI Responses API support — Provider Manager now offers
openai-responsesprotocol option, enabling compatibility with OpenAI's Responses API format in addition to standard chat completions - Smarter tool output preview — when a bash command is running, its streaming output appears after a short delay (500ms) instead of immediately, reducing visual noise for quick commands while still showing progress for long-running ones
Changed
- Backend connection handling simplified — removed legacy reconnection and health-check logic that was superseded by SSE event bridge
- Windows paths now consistently normalized (drive letter casing) across ServiceRegistry, Settings, and runtime services
- Session diff tracking migrated from
SnapshotFileDifftoSessionDiffSnapshotwith richer metadata
Internal
- Added structured logging to ChatProvider (session lifecycle events) and Header (status transitions) for easier debugging
- Test suite updated for new diff snapshot shape and event runtime changes
v1.5.6
PrimeCode v1.5.6
Highlights
- Added improved markdown table rendering with copy support.
- Improved streaming tool card sizing and live preview behavior.
- Refined session abort and timeout handling for more reliable long-running operations.
Fixes
- Fixed tool/message grouping and generation status text behavior in chat.
- Improved stop handling for active session subtrees and queued follow-up cleanup.
- Reduced backend event noise by filtering events to the active workspace and relaxing heartbeat timing.
Technical
- Simplified chat/session runtime plumbing and bootstrap handling.
- Updated related tests for session, runtime, and event flow behavior.
v1.5.5
PrimeCode v1.5.5
Highlights
- Chat input overhaul: Rebuilt the chat input experience around CodeMirror 6, improving editing behavior, command history support, inline attachment handling, and overall input responsiveness.
- Runtime-backed commands: PrimeCode now syncs built-in OpenCode CLI commands from the runtime and surfaces them in slash-command flows and related UI.
- Generation status phases: Added clearer generation-state tracking with distinct phases like retrying, tool execution, thinking, responding, and working, improving visibility during long-running tasks.
- Merged OpenCode config alignment: PrimeCode now reads effective merged OpenCode configuration more consistently across MCP, proxy providers, permissions, and default model handling, reducing drift between project and global config behavior.
Stability & Fixes
- Restore and revert flow fixes: Fixed broken restore/revert behavior so restores target the exact selected message again, local revert state stays consistent, and edited resend flows follow the proper runtime lifecycle.
- Session error noise reduction: Improved session error handling to log richer details while suppressing noisy or irrelevant notifications from inactive sessions, abort paths, and invalid-agent edge cases.
- Chat input regression fixes: Restored correct slash-command and
@flows in edit mode, routed attach actions to the correct input instance, and made valid command mentions delete atomically. - Tool card interaction cleanup: Removed duplicate copy behavior and corrected header action alignment for tool cards.
- Tool grouping behavior improvements: Updated grouped tool rendering so shorter tool sequences can collapse more cleanly and live assistant bridge messages behave more consistently during streaming.
- Config-backed settings consistency: Fixed settings actions so config-backed resources open and edit the correct project or global OpenCode config source.
UX & UI
- Smoother motion across the app: Added and unified motion-driven transitions across chat panels, tool cards, queued messages, diffs, and question cards for a more fluid interface.
- Improved attachment actions: Replaced the old folder hover affordance with a clearer
+attachment menu for files, images, and folders. - Better search result rendering: Search and grep-style tool output now renders as structured, clickable file and line entries, making navigation much faster.
- Streaming and scrolling polish: Refined live auto-scroll behavior and card expansion/collapse handling so streaming output feels more stable and predictable.
- More consistent tool labels: Tool names now reuse the shared registry formatter so known tools preserve canonical casing and unknown tools normalize consistently across the UI.
Architecture & Refactoring
- Added runtime command discovery through the OpenCode executor and settings/resource flow.
- Consolidated generation status into a derived phase-based model used consistently by the webview.
- Refined streaming container auto-scroll internals and live tool rendering behavior to better support dynamic output.
- Extended MCP/config plumbing to support runtime-only MCP visibility, project/global config opening, and merged-config-aware reads.
Tests
- Added and expanded coverage for restore/revert flows, generation status derivation, tool grouping behavior, runtime error handling, merged revert targeting, and session error suppression edge cases.
v1.5.4
PrimeCode v1.5.4
Highlights
- Server reconnection: Implemented automatic server reconnection logic in OpenCodeExecutor with health monitoring escalation in ChatProvider — if the server drops, PrimeCode now detects the failure and re-establishes the connection without user intervention.
- Canonical SSE event pipeline: Removed the
backendRuntimeStatusside-channel entirely. Session status now flows through a single canonical path: SSE events → opencodeEvent → eventReducer → sessionStatus. Eliminates race conditions and stuck-state bugs. - Session subtree processing: Processing state is now derived across the full parent/child session tree (via
collectSessionSubtreeIds), not a single session flag. Queued follow-ups flush through the full session lineage when child work completes. - File ownership tracking: Extraction of owned file paths from mutating tool parts, filtering out files owned by sibling sessions from diffs — only relevant changes are displayed per session.
Stability & Fixes
- Fixed infinite re-render loop (React error #185) caused by
getSessionRuntimeStatus()returning a new object reference on every selector call — now uses stable constant references. - Startup no longer calls
instance.dispose()on the OpenCode server, which was destroying all active sessions (including children) on every extension reload. - Removed destructive
killZombieOpenCodeProcesses— it could kill servers used by other VS Code windows. - Fixed abort propagation: stop button now always aborts the requested session and any known processing children, regardless of child status reflection in the store.
- Fixed session stability after reconnect by bringing up the backend status bridge before webview hydration, with defensive status re-sync after hydrate/abort.
- Handle early
session.idlewhileawaitingBackendBusyto prevent stuck processing state. - Fixed agent ordering — preserve runtime agent order from OpenCode API instead of sorting alphabetically.
- Auto-scroll no longer triggers user-detach on programmatic scrolls.
Architecture & Refactoring
- Migrated permission API from deprecated
respond()toreply()with explicitsessionIdpassing instead ofactiveSessionIdfallback. - MCP management reworked: fetches tools/resources via experimental API, adds hot-add and targeted connect/disconnect to avoid full instance dispose on server changes.
- Config file changes use soft reload (cache clear + resync) instead of instance dispose. Only explicit user actions trigger dispose.
- Simplified
OutboundBridgeby removing unusedqueueUpdatemethod. - Removed
pendingPartDeltasfrom session store — event reducer no longer manages unnecessary pending delta state. - Enhanced
chatStorewith queued message management: enqueue, dequeue, cancel, and flush througheventRuntime. - Improved tool grouping logic to prevent absorption of messages containing system reminders or multiline summaries.
UX & UI
- GenerationStatus crossfade transitions: Smooth crossfade animations between generation states with stable tool activity handling during processing.
- ErrorBoundary redesign: Centered notification layout with copy-to-clipboard functionality for error details.
- Live tool output streaming: Bash/MCP output streams during execution via
state.metadata.outputwith auto-expanding tool card body while running. - Elapsed timer restore: Added
fallbackMstouseElapsedTimerfor restored completed tools showing correct elapsed time. - CopyButton extraction: Reusable
CopyButtoncomponent with copy support added to task results. - Agent toolbar: Shows effective agent (configured/primary) in toolbar; handles agent names with spaces; syncs
sessionAgentfrom first assistant message. - SimpleTool animations: Smoother transitions and animations for tool status changes.
- Edit message now validates agent against current resources before dispatch, falling back to default instead of sending invalid runtime identities.
Tests
- Added tests for
collectSessionSubtreeIds, queued message flush, file ownership extraction, tool grouping edge cases, and reconnect orchestration. - Extended
BackendStatusBridge,eventRuntime,opencodeRuntime, andchatStoretest suites with reconnect and subtree scenarios. - Added
projector.test.tsfor derived state calculations andfileOwnership.test.tsfor ownership logic. - Added
ToolHandlerpermission policy tests with project config hydration.
v1.5.3
PrimeCode v1.5.3
Highlights
- Server health monitor: Added periodic
/global/healthpolling in ChatProvider (15s interval, 3-failure threshold) for proactive server health diagnostics without intrusive reconnection. - SSE bridge reliability: Refactored backend status event stream with exponential backoff retry (250ms–30s range) and per-iteration AbortController to fix listener leakage on stream reconnects.
- Retry logic for Webview health checks: Header health checker now performs up to 2 retries with 100ms delay for transient network errors, plus 750ms promise caching to deduplicate rapid rechecks.
- Error resilience: Added
ConfigInvalidErrordetection in bootstrap — invalid project config now shows a user-facing notification instead of a generic error. Improved error logging acrossopencodeRuntime,proxyFetch, andeventRuntime. - Global ErrorBoundary: Implemented a top-level React ErrorBoundary in the Webview to catch render crashes gracefully.
Stability & Fixes
- Fixed provider model visibility so ModelDropdown and ProviderManager correctly reflect available models.
- Fixed streaming card rendering for subagent UI states.
- Removed automatic notification dismissal — users now dismiss notifications manually for better visibility.
- Fixed notification title truncation: replaced
truncatewithline-clamp-5for multi-line notification titles. - Removed unnecessary session reconcile on every
server.connectedheartbeat — session data arrives via individual SSE events. - Fixed
proxyFetchabort signal cleanup: no longer leaks'abort'listeners; properly distinguishes network failures (reject) from HTTP 4xx/5xx responses (returned as Response).
UX & UI
- Enhanced
ScrollThumbcomponent withalwaysVisibleandthumbColorprops for better scrollbar customization. - Updated
MessageItemwith pending status icon during message submission. - Improved markdown table styling for better readability.
- Added
OpencodeEventMessagetype and unified event handling across ChatProvider and eventRuntime. - Enhanced copy actions throughout header and chat components for easier content extraction.
Tests
- Added comprehensive test suites for
BackendStatusBridge,eventRuntime,proxyFetch, andopenCodeRuntime, covering lifecycle, event filtering, coalescing, error handling, and abort behavior.
v1.5.2
- fix: Fixed a bug with synchronizing models with opencode.
v1.5.1
PrimeCode v1.5.1
fix(child-cards): remove unreliable file-change counters from child sessions
OpenCode does not attribute diff/summary data per causal session owner.
Both session.summary and session.diff reflect shared worktree state
during the session's lifetime, making them misleading for child cards.
Remove the entire diffStats pipeline — type, derivation, selector, and
render — from child task cards. Token counters, timers, agent/model
badges, and depth indicators remain unchanged.
Also:
- hydrate loads
session.difffor every subtree session (not just root) - hydrate syncs
session.statusfor the full subtree dump-sessions.tsrewritten for complete recursive dumps with
raw messages, per-session diff/todo, and instance context- removed
computeSessionDiffStats()(dead code) - fix inline Attachment
v1.5.0
PrimeCode v1.5.0
This release is a major runtime and UX update focused on faster Webview rendering, more accurate OpenCode session state, improved child-session handling, better tool output display, and more consistent settings/resource management.
Highlights
- Refactored the core Webview runtime around client-side Zustand state and direct OpenCode SDK v2 interaction, removing legacy backend synchronization paths and reducing redundant session handling logic.
- Improved streaming performance with requestAnimationFrame-driven updates, cached derived session state, and incremental projection of chat sections, tool deltas, token stats, and restored diff stats.
- Added inline prompt attachments backed by OpenCode file parts and source metadata, so file and snippet references remain visible and restorable through cancel, edit, and history flows.
- Reworked child-session and task result handling with better session graph rebuilding, task call linking, nested task rendering, task result nodes, and child-session usage calculations.
- Added richer session usage tracking, including input/output tokens, reasoning tokens, cache reads/writes, cost fields, recursive session tree stats, and system event rendering.
- Improved tool output handling with sanitized history-safe tool parts, live tool output lookup, binary file handling in diffs, expandable generic tools, and better rendering for plugin/simple tools.
- Added clipboard support across UI components for easier copying of messages, tool output, prompts, and related content.
- Improved model/provider behavior with better proxy provider visibility, session model syncing, model source tracking, and protection against overwriting user-selected models during history restoration.
- Enhanced skill and agent resource management, including the Subagents → Agents rename, resource-based state handling, clearer visibility labels, segmented permission controls, and better loading/error states.
- Refined settings UI, text inputs, textarea styling, typography variables, form-control sizing, and accessibility details for a more consistent interface.
Fixes
- Fixed per-turn diff statistics so child-session and session-wide file changes no longer leak into unrelated message stats.
- Suppressed user-initiated stop/abort errors from surfacing as noisy failures.
- Fixed OpenCode config apply-flow and runtime reload consistency across resources, MCP, providers, and startup.
- Fixed project config reads/writes for both
opencode.jsonandopencode.jsonc. - Corrected subtask token usage totals and improved aggregation for assistant responses and child sessions.
- Improved error logging in chat input and event runtime paths for easier debugging.
Maintenance
- Removed obsolete LogNormalizer/webview paths and updated Vite process polyfill handling.
- Added and updated regression tests for session usage, projector behavior, model restoration, inline attachments, prompt parts, MCP grouping, resource revisions, and chat store behavior.
- Updated package and CI release plumbing for the new release.
v1.4.0
PrimeCode 1.4.0
Highlights
- Migrated chat to the native OpenCode SDK event flow: the webview now receives
sdk_event/sdk_event_batchdirectly and updates state through a unified reducer. - Significantly improved streaming UI performance with a materialized projection layer, incremental delta updates, and requestAnimationFrame batching.
- Reworked nested task/subtask handling:
SubtaskManagerwas replaced with a flatSessionGraphand native parent-child session rendering. - Added PrimeCode Workbench actions for starting a new chat, opening history, and opening settings directly from VS Code.
- Improved custom endpoint support, provider/model selection, and session-specific model state.
- Simplified restore behavior by removing legacy checkpoint/revert state and contracts.
Added
- Added VS Code commands for opening PrimeCode history/settings and starting a new chat from the Workbench UI.
- Added folder browsing support in the attach/browse flow.
- Added custom proxy endpoint normalization with protocol/base URL handling.
- Added an SDK-native
eventReducerfor predictable Zustand state updates. - Added
SessionGraphfor parent-child session linking, deferred linking, descendants/lineage lookup, and history-based graph restoration. - Added a materialized projection layer (
projector.ts) for UI-ready render nodes and incremental updates. - Added component-level subscription hooks for render nodes and materialized view state.
- Added prompt-part extraction utilities for restoring prompts from native message parts.
- Added tests for token stats, session model restoration, projector behavior, nested subtasks, and prompt extraction.
Changed
- Migrated the chat store from custom CLI event mapping to native
@opencode-ai/sdk/v2/clienttypes. - Updated
OutboundBridgeto forward SDK events directly to the webview. - Rewrote UI selectors to project native SDK messages/parts into render nodes.
- Moved message grouping and tool transcript grouping into the projection layer.
- Replaced legacy subtask cards with native nested child session rendering through
TaskCardItem. - Improved grouped tool transcripts so they collapse based on explicit boundary metadata while live trailing groups remain expanded until follow-up content appears.
- Replaced synthetic
/compacttool cards with dedicated native streaming compaction UI. - Updated provider management to present connected and popular providers in a more unified flow.
- Improved model dropdown/input behavior to respect session-specific models and the last selected model.
- Improved session creation and draft restoration so model selections are preserved more reliably.
- Simplified restore flow by removing legacy checkpoint/revert state and contracts.
- Added secondary action support to confirmation dialogs.
- Improved markdown rendering for tables and path references.
- Improved
ToolCardrendering for diagnostics, questions, and file/path display.
Fixed
- Fixed inflated or frozen token usage by converting cumulative CLI token totals into per-turn/per-message usage.
- Fixed live duration and statistics updates while a turn is still running.
- Fixed subagent token totals.
- Fixed live updates for
/compactand summarization UI during streaming. - Removed duplicated compaction assistant output.
- Fixed task child-session linking from streaming metadata.
- Fixed optimistic send behavior for first-message and failed-send flows.
- Fixed pending question and permission prompt synchronization.
- Improved pending question handling in
ToolCardandQuestionCard. - Added proper
AbortControllersupport forproxyFetch. - Added exponential backoff for health polling and SSE reconnects.
- Tightened slash command and
@mentiondetection to respect word boundaries. - Removed speculative FIFO-based subtask linking that could mix parallel task sessions.
- Fixed
partId -> callIDresolution for tool deltas usingtoolPartIdToCallId. - Prevented unnecessary controlled editor sync updates from overwriting input state.
Removed
- Removed
SubtaskManagerand the legacy subtask event/proxy accumulation flow. - Removed
OpenCodeEventMapperand legacy CLI normalization code. - Removed legacy checkpoint emission from the session dump player.
- Removed revert-related state from the chat store.
- Removed the deprecated
accessAutoApprovesetting from the settings UI. - Removed legacy restore/checkpoint methods from handler context.
Internal
- Reduced runtime/webview glue code by relying on SDK-native contracts.
- Extracted store initial state into domain factories (
storeState.ts). - Moved permission auto-approve logic into an executor interceptor before events reach the webview.
- Added event coalescing to reduce render pressure during high-speed streaming.
- Updated tests around restore behavior, projection, chat state, grouping, and nested sessions.