Skip to content

feat(tui): add BTW OpenCode community plugin #995

Description

@pabloXDXDXD

Pre-flight Checklist

  • I have searched existing issues and this is not a duplicate
  • I understand that PRs will be rejected if the linked issue does not have status:approved

Affected Area

TUI (terminal UI)

Problem Statement

Gentle AI supports community OpenCode plugins (sub-agent-statusline, sdd-engram-plugin), but there's no plugin for parallel/background questions. When working in OpenCode, users often need to ask a follow-up question without derailing their main session — currently there's no way to do that non-blocking.

The btw-opencode plugin fills this gap: it intercepts /btw <question>, spawns a child session, fires the question in the background, and lets the user keep typing. It includes a TUI companion with /btw-list and a sidebar slot.

Proposed Solution

Add btw-opencode as a community plugin option in gentle-ai's OpenCode Plugins screen.

Changes required (3 files, ~30 lines total):

  1. internal/model/types.go — add new constant:

    OpenCodePluginBtwOpenCode OpenCodeCommunityPluginID = "btw-opencode"
  2. internal/components/opencodeplugin/plugin.go — add definition:

    {
        ID:          model.OpenCodePluginBtwOpenCode,
        Name:        "BTW Plugin",
        PackageName: "pabloXDXDXD/btw-opencode",
        RepoURL:     "https://github.com/pabloXDXDXD/btw-opencode",
        Owner:       "pabloXDXDXD",
        Repo:        "btw-opencode",
        Description: "Parallel /btw questions without interrupting your main session",
    }
  3. internal/tui/model.go — add to plugin list and repo URLs:

    // in opencodepluginDefinitions()
    model.OpenCodePluginBtwOpenCode,
    
    // in opencodepluginRepoURLs()
    "https://github.com/pabloXDXDXD/btw-opencode"

The plugin installs via GitHub shorthand (npm install pabloXDXDXD/btw-opencode) — no npm registry auth needed. No dependencies on other plugins.

Alternatives Considered

  • Manual config: users can add it to tui.json and opencode.json by hand, but gentle-ai's TUI makes discovery and registration much smoother
  • Forking/inlining the plugin into gentle-ai: unnecessary, the plugin is self-contained and updates independently

Additional Context

The plugin was tested on Windows with OpenCode. Install completes in ~31s via GitHub shorthand. The gentle-ai TUI correctly lists it, registers it, and OpenCode activates both the server hook (/btw) and TUI (/btw-list) plugins. A pre-compiled binary with these changes exists for testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions