Skip to content

Side chat: open a side chat from the thread composer by typing /side #4807

Description

@hxy91819

Problem

The side-chat plugin shipped in 0.45 offers two entry points: a Reply in side chat message action and a Start side chat panel action registered through app.slots.threadPanelAction (

app.slots.threadPanelAction({
id: PANEL_ACTION_ID,
title: "Start side chat",
icon: "SideChat",
component: SideChatPanel,
layout: "flush",
async run(context: PluginThreadPanelActionContext) {
). Both are mouse targets: a hover action on a message, or the panel-action button in the thread header.

When I am typing in the composer and want to ask a quick aside without sending it to the main thread, I have to leave the keyboard, find the panel-action button, and click it. The composer's / menu already lists provider and skill commands, but it has no way to run a plugin panel action. useCommandSuggestions only merges provider prompt actions with discovered project commands (

return mergeCommandSuggestions(
promptActionSuggestions,
discoveredSuggestions,
);
), and selecting an item always inserts a command pill.

Proposed behavior

  • Typing /side in the main thread composer shows a side entry in the command menu, described with the panel action's title ("Start side chat").
  • Selecting it runs the side-chat threadPanelAction for the current thread (the same code path as the header button, so the side chat opens as a fork from the current thread state), removes the /side text from the editor, closes the command menu, and leaves focus in the composer. No pill is inserted and nothing is sent.
  • The entry appears only when the thread can fork, reusing the existing isForkAvailable check (unarchived, has an environment, provider advertises supportsFork;
    const isForkAvailable = isThreadForkable(
    thread ?? null,
    threadProviderInfo?.capabilities.supportsFork ?? false,
    );
    ) and only when the side-chat panel action is registered. If the plugin is disabled or the provider cannot fork, /side is not offered.

Prototype in a fork

Compare links (the second branch is stacked on the first; together they are one feature):

Combined against desktop-v0.45.0: 14 files, +593 / -16 (about 400 of the added lines are tests).

How it works:

  • ProviderCommandSuggestion gains an optional panelAction: { pluginId, actionId } (packages/client-core/src/prompt/mentions/types.ts).
  • useCommandSuggestions accepts panelCommands and merges them with prompt-action suggestions before discovered commands.
  • useComposerTypeahead builds the side panel command when sideChatCommand.enabled is true and the side-chat/side-chat thread panel action exists in plugin slots; it handles selection by calling the panel action through the existing PluginPanelActions runner (extracted as invokePluginThreadPanelAction from runPluginPanelAction,
    function runPluginPanelAction({
    action,
    openPluginPanel,
    threadId,
    }: RunPluginPanelActionArgs): void {
    const openPanel = createPanelActionOpenPanel({
    action,
    slot: "threadPanelAction",
    openPluginPanel,
    });
    const warn = (error: unknown) => {
    console.warn(
    `[plugin:${action.pluginId}] threadPanelAction "${action.id}" failed: ${describeError(error)}`,
    );
    };
    try {
    if (action.run === undefined) {
    openPanel();
    return;
    }
    const result = action.run({ threadId, openPanel });
    if (result instanceof Promise) result.catch(warn);
    } catch (error) {
    warn(error);
    }
    }
    ) and the thread panel open handler.
  • PromptBoxInternal checks item.panelAction on selection; when the handler returns true it deletes the trigger range, clears the composer menu and query state, and re-focuses the editor instead of inserting a pill.
  • ThreadDetailView passes isForkAvailable to ThreadDetailPromptArea, which enables the command on the main composer (the stacked branch moves the wiring from the inline queued-message composer to the main composer and adds a test).
  • plugins/side-chat/PLUGIN_OVERVIEW.md documents the command.

The plugin itself is unchanged; the command name and the plugin/action ids are constants in apps/app/src/lib/side-chat-plugin.ts. A more general version would let any plugin declare a composer command for its panel action; this prototype keeps it specific to side chat to stay small.

What I checked

  • Not on main at cd12e7a9d: no panelAction on command suggestions, no /side in PLUGIN_OVERVIEW.md.
  • Searched open and closed issues for "side chat command", "side chat slash", "/side composer", "slash command open panel" and the side-chat label; no issue asks for a composer command.

CONTRIBUTING asks for an issue before a PR for features and UI changes. If this is wanted, I will open a PR from the branches above after sign-off and contributor approval.

AGENT GENERATED

Activity

  1. added a commit that references this issue on Oct 3, 2026
  2. added
    ui
    side-chat
    on Oct 3, 2026
  3. bb-slop-cop commented on Oct 3, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied the missing classification: Type: Feature · Priority: Low · Effort: Medium. Added labels: ui, side-chat. No existing classification values were replaced.

    This adds a keyboard entry point for an existing action rather than correcting unexpected behavior. Existing panel and message actions provide workarounds; composer selection and action invocation span several modules.

    Reproduction reporting and an automatic fix PR are skipped because the verified final Type is Feature, not Bug.

  4. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    side-chatui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions