Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(providers): show Grok and OpenCode skills/slash commands in the picker #5131

Closedfm1randa(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/5131/headopened View on GitHub

Populate the / and $ pickers for Grok and OpenCode by reading the catalogs those providers already expose (ACP for Grok, OpenCode SDK for OpenCode), so menus are no longer empty when the CLIs have skills installed.

Fixes https://github.com/pingdotgg/t3code/issues/4109


Open in Devin Review

Note

Medium Risk Changes provider discovery and ACP session startup behavior; OpenCode health checks may spawn a short-lived local server when CLI inventory lacks command/skill data.

Overview Fixes empty / and $ pickers for Grok and OpenCode by populating slashCommands and skills on the provider snapshot during status/discovery.

Grok maps ACP available_commands_update (and initialize _meta fallback) through a shared providerCommandCatalog mapper. AcpSessionRuntime now retains those catalogs when they arrive before session/new resolves, without adding a post-start delay.

OpenCode loads command/skill lists from the SDK inventory when present; if the CLI-only inventory leaves catalogs empty, it falls back to a short-lived SDK session via loadProviderCommandCatalog.

Tests and the ACP mock agent were extended to cover the new wire shapes.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c0045afd02a2670732fdc7b10819684238180c10. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Show Grok and OpenCode skills and slash commands in the provider picker

  • Adds mapAcpAvailableCommandsToProviderCatalog and mapOpenCodeSdkCatalogToProviderCatalog in providerCommandCatalog.ts to convert ACP and OpenCode SDK catalogs into unified slashCommands and skills arrays.
  • Updates checkGrokProviderStatus in GrokProvider.ts to extract availableCommands from ACP session start results and include them in the provider snapshot.
  • Updates checkOpenCodeProviderStatus in OpenCodeProvider.ts to map CLI inventory commands/skills and fall back to an SDK call via loadProviderCommandCatalog when the inventory is empty.
  • Extends AcpSessionRuntime.ts to capture available_commands_update notifications during session startup and expose the latest catalog on repeated start() calls.
  • Risk: OpenCode provider status may now trigger an additional SDK call (spawning a server if needed) when the CLI inventory returns no commands or skills.
Macroscope summarized c0045af.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: f4bb2778-907d-4369-90c6-856c78a14949

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. One convention issue found: a compatibility re-export shim was introduced for the relocated mapAcpAvailableCommandsToProviderCatalog helper. Everything else (namespace imports from effect/*, yield* OpenCodeRuntime for dependency acquisition, no new Layer.succeed/ManagedRuntime/runPromise seams, no new error classes) matches the conventions.

      Posted via Macroscope — Effect Service Conventions
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/be5387420321898262865fd6ba57a6fdd32b6fc1/apps/server/src/provider/acp/AcpSessionRuntime.ts#L757

      Stale available_commands_update entries from a failed startup leak into the next session. When the first startOnce attempt fails, start resets startStateRef to NotStarted but never clears availableCommandsRef, so commands captured during the failed attempt persist. A retry that emits no available_commands_update notifications then snapshots the previous failed session's commands and returns them in AcpSessionRuntimeStartResult.availableCommands, instead of falling back to initializeResult._meta or an empty catalog. Clearing availableCommandsRef when startup fails so the retry starts with a clean slate.

      ✅ Resolved in c0045afd02a2670732fdc7b10819684238180c10

    5. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).

      Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit be5387420321898262865fd6ba57a6fdd32b6fc1. Configure [here](https://www.cursor.com/dashboard/bugbot).
    6. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      1 blocking correctness issue found. This PR introduces new feature capability (surfacing provider skills/commands in pickers) with ~774 lines of new code across multiple provider files. Additionally, there is an unresolved review comment identifying a potential bug in session command handling that should be addressed before approval.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    7. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      Closing this PR after an automated pass over open pull requests. Overlaps a smaller implementation or trusted provider work already under review.

Sign in to join this conversation.