Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 24 Apr 18:58
· 78 commits to main since this release

PrimeCode 1.4.0

Highlights

  • Migrated chat to the native OpenCode SDK event flow: the webview now receives sdk_event / sdk_event_batch directly 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: SubtaskManager was replaced with a flat SessionGraph and 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 eventReducer for predictable Zustand state updates.
  • Added SessionGraph for 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/client types.
  • Updated OutboundBridge to 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 /compact tool 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 ToolCard rendering 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 /compact and 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 ToolCard and QuestionCard.
  • Added proper AbortController support for proxyFetch.
  • Added exponential backoff for health polling and SSE reconnects.
  • Tightened slash command and @mention detection to respect word boundaries.
  • Removed speculative FIFO-based subtask linking that could mix parallel task sessions.
  • Fixed partId -> callID resolution for tool deltas using toolPartIdToCallId.
  • Prevented unnecessary controlled editor sync updates from overwriting input state.

Removed

  • Removed SubtaskManager and the legacy subtask event/proxy accumulation flow.
  • Removed OpenCodeEventMapper and legacy CLI normalization code.
  • Removed legacy checkpoint emission from the session dump player.
  • Removed revert-related state from the chat store.
  • Removed the deprecated accessAutoApprove setting 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.