Repository navigation
Description
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 (
Lines 294 to 300 in 129f621
| app.slots.threadPanelAction({ | |
| id: PANEL_ACTION_ID, | |
| title: "Start side chat", | |
| icon: "SideChat", | |
| component: SideChatPanel, | |
| layout: "flush", | |
| async run(context: PluginThreadPanelActionContext) { |
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 (
bb/apps/app/src/hooks/useCommandSuggestions.ts
Lines 186 to 189 in 129f621
| return mergeCommandSuggestions( | |
| promptActionSuggestions, | |
| discoveredSuggestions, | |
| ); |
Proposed behavior
- Typing
/sidein the main thread composer shows asideentry in the command menu, described with the panel action's title ("Start side chat"). - Selecting it runs the side-chat
threadPanelActionfor 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/sidetext 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
isForkAvailablecheck (unarchived, has an environment, provider advertisessupportsFork;) and only when the side-chat panel action is registered. If the plugin is disabled or the provider cannot fork,bb/apps/app/src/views/thread-detail/ThreadDetailView.tsx
Lines 986 to 989 in 129f621
const isForkAvailable = isThreadForkable( thread ?? null, threadProviderInfo?.capabilities.supportsFork ?? false, ); /sideis not offered.
Prototype in a fork
Compare links (the second branch is stacked on the first; together they are one feature):
- desktop-v0.45.0...hxy91819:bb:feature/side-chat-command
- desktop-v0.45.0...hxy91819:bb:fix/side-chat-main-composer
Combined against desktop-v0.45.0: 14 files, +593 / -16 (about 400 of the added lines are tests).
How it works:
ProviderCommandSuggestiongains an optionalpanelAction: { pluginId, actionId }(packages/client-core/src/prompt/mentions/types.ts).useCommandSuggestionsacceptspanelCommandsand merges them with prompt-action suggestions before discovered commands.useComposerTypeaheadbuilds thesidepanel command whensideChatCommand.enabledis true and theside-chat/side-chatthread panel action exists in plugin slots; it handles selection by calling the panel action through the existingPluginPanelActionsrunner (extracted asinvokePluginThreadPanelActionfromrunPluginPanelAction,) and the thread panel open handler.bb/apps/app/src/components/plugin/PluginPanelActions.tsx
Lines 82 to 107 in 129f621
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); } } PromptBoxInternalchecksitem.panelActionon selection; when the handler returnstrueit deletes the trigger range, clears the composer menu and query state, and re-focuses the editor instead of inserting a pill.ThreadDetailViewpassesisForkAvailabletoThreadDetailPromptArea, 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.mddocuments 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
mainatcd12e7a9d: nopanelActionon command suggestions, no/sideinPLUGIN_OVERVIEW.md. - Searched open and closed issues for "side chat command", "side chat slash", "/side composer", "slash command open panel" and the
side-chatlabel; 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
Record upstream issues get-bb#4807-get-bb#4810 and the get-bb#3182 pr…
bb-slop-cop commentedon Oct 3, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied 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.
Record upstream issues get-bb#4807-get-bb#4810 and the get-bb#3182 pr…