Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Jan 19, 2026

Summary

Merge shuvcode-dev branch into integration with CLI branding fixes and subagent sidebar improvements.

Changes

Features

Fixes

  • Rebrand CLI command names from 'opencode' to 'shuvcode' in help output
  • Fix console anthropic stream byte decoding
  • Strip ANSI from command output in UI
  • Guard getComputedStyle on Windows for desktop
  • Publish mDNS host with port
  • Track text and reasoning by output_index for OpenAI
  • Preserve itemIds and remap options in provider
  • Route gpt-5 models to /responses
  • Simplify OAuth callback handling for MCP
  • Improve Copilot device polling
  • Keep primary model after subagent run
  • Open help dialog via route
  • Support home/end in list dialogs
  • Avoid double-decrement on session archive
  • Improve list selection scrolling

Chores

  • Update download stats
  • Add OpenWork to ecosystem docs
  • Update nix desktop packaging and hashes
  • Ignore direnv artifacts

Breaking Changes

None

Testing

Production build tested locally - CLI and App builds pass all tests.

Greptile Summary

Merges development branch with CLI branding updates and subagent sidebar enhancements. Key change generalizes TUI sidebar subagent detection to support plugin tools beyond the default task tool by checking for subagent_type property.

  • Sidebar Enhancement: Changed subagent detection from hardcoded part.tool === "task" to part.state.input?.subagent_type check, enabling plugins like oh-my-opencode with custom orchestration tools to display subagents
  • CLI Branding: Updated all command references from opencode to shuvcode across help output and auth methods
  • Usage Tracking: Added comprehensive usage tracking module with support for OpenAI and GitHub Copilot rate limits, credits, and plan types
  • Stream Decoding Fix: Fixed Anthropic stream byte decoding by properly converting base64 to Uint8Array before UTF-8 decoding
  • Provider Compatibility: Improved GitHub Copilot compatibility by tracking text/reasoning by output_index instead of rotating item_id
  • OAuth Simplification: Simplified OAuth callback to use fixed port/path configuration
  • UI Improvements: Enhanced list component with CSS.escape() for selector safety and better scrolling behavior

All changes are backward compatible and well-tested.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-scoped refactors and enhancements with clear backward compatibility. The sidebar change uses optional chaining for safety, the stream decoding fix addresses a real bug, and the provider tracking improvements handle edge cases properly. All changes follow existing patterns and maintain type safety.
  • No files require special attention

Important Files Changed

Filename Overview
packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx Generalized subagent detection from tool name check to subagent_type property check, enabling plugin extensibility; fixed comment indentation
packages/opencode/src/usage/index.ts Added new usage tracking module with support for OpenAI and GitHub Copilot rate limits, credits, and plan types
packages/opencode/src/mcp/oauth-callback.ts Simplified OAuth callback to use fixed port/path instead of dynamic configuration
packages/console/app/src/routes/zen/util/provider/anthropic.ts Fixed base64 byte decoding for Anthropic streaming by properly converting to Uint8Array before decoding
packages/opencode/src/provider/transform.ts Refactored providerOptions remapping logic to use SDK key mapping; removed OpenAI-specific itemId stripping
packages/opencode/src/provider/sdk/openai-compatible/src/responses/openai-responses-language-model.ts Improved tracking of text and reasoning parts by output_index instead of rotating item_id for GitHub Copilot compatibility

Sequence Diagram

sequenceDiagram
    participant Plugin as Plugin (oh-my-opencode)
    participant TUI as TUI Sidebar
    participant Tool as Tool Invocation
    participant Filter as taskToolParts Filter
    
    Note over Plugin,Filter: Before PR: Only tools with name "task" are detected
    
    Plugin->>Tool: Invoke delegate_task<br/>(custom tool name)
    Tool->>Tool: Include subagent_type<br/>in input parameters
    Tool->>TUI: Create ToolPart with<br/>state.input.subagent_type
    TUI->>Filter: Filter parts where<br/>part.tool === "task"
    Filter-->>TUI: No match (delegate_task ≠ task)
    Note over TUI: Subagent not shown in sidebar
    
    Note over Plugin,Filter: After PR: Any tool with subagent_type is detected
    
    Plugin->>Tool: Invoke delegate_task<br/>(custom tool name)
    Tool->>Tool: Include subagent_type<br/>in input parameters
    Tool->>TUI: Create ToolPart with<br/>state.input.subagent_type
    TUI->>Filter: Filter parts where<br/>part.state.input?.subagent_type exists
    Filter-->>TUI: Match found (has subagent_type)
    TUI->>TUI: Display subagent in sidebar
Loading

GollyJer and others added 26 commits January 18, 2026 17:26
- Change yargs scriptName to 'shuvcode' for --help display
- Update user-facing error messages to reference 'shuvcode' commands
- Update MCP auth toast to suggest 'shuvcode mcp auth'
- Update ACP login prompts to reference 'shuvcode auth login'
- Document CLI branding as fork feature in fork-features.json
@shuv1337 shuv1337 closed this in 408341b Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants