The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(conversations): handle source command with no arguments
Steven Enamakele34f14d2a52d
diff --git a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx b/app/src/features/conversations/Conversations.processSourceCommand.test.tsxindex d2825bf8e6..210a59b92a 100644--- a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx+++ b/app/src/features/conversations/Conversations.processSourceCommand.test.tsx@@ -1,15 +1,12 @@/**- * The agent-process-source command must not be offered in voice mode.+ * The agent-process-source command is offered on every chat surface.*- * `showProcessSource` only drives `TranscriptOverlays`, and `TranscriptOverlays`- * mounts inside `assistantUiMainPanel` alone. The panel choice is an either/or -- * `composer === 'mic-cloud' ? legacyMainPanel : assistantUiMainPanel` - so in- * mic-cloud (voice/mascot) mode `legacyMainPanel` mounts instead and the state- * the command sets has no host. Registered with `enabled: () =>- * selectedThreadId !== null` alone, the palette listed a command that looked- * available and silently did nothing.- *- * Root cause: something was left pointing at the wrong half of the either/or.+ * `showProcessSource` only drives `TranscriptOverlays`, which mounts inside the+ * assistant-ui panel. That panel used to be one half of an either/or — voice+ * (`mic-cloud`) mode mounted a separate legacy transcript instead, where the+ * state the command set had no host, so the command had to be disabled there.+ * Voice mode now renders the same assistant-ui panel with only the composer+ * swapped, so the overlays (and the command) are live in both modes.*/import { combineReducers, configureStore } from '@reduxjs/toolkit';import { act, cleanup, render } from '@testing-library/react';@@ -183,14 +180,18 @@ describe('the agent-process-source command follows the panel that hosts it', ()expect(registry.runAction(ACTION_ID)).toBe(true);});- it('is disabled in mic-cloud voice mode, where nothing renders the panel', async () => {+ it('is enabled in mic-cloud voice mode too, which renders the same assistant-ui panel', async () => {await renderChat('mic-cloud');+ // Voice mode swaps only the composer: the transcript is the assistant-ui+ // viewport and the text composer is replaced by the voice composer.+ expect(document.querySelector('[data-slot="aui_thread-viewport"]')).not.toBeNull();+ expect(document.querySelector('[data-testid="voice-composer"]')).not.toBeNull();+ expect(document.querySelector('[data-slot="aui_composer-shell"]')).toBeNull();+const action = registry.getAction(ACTION_ID);- // Registered but refused - `Conversations` is mounted either way, so the- // action does not disappear; it must report itself unavailable.- expect(action, 'the command is still registered in voice mode').toBeDefined();- expect(action?.enabled?.()).toBe(false);- expect(registry.runAction(ACTION_ID)).toBe(false);+ expect(action, 'the command is registered in voice mode').toBeDefined();+ expect(action?.enabled?.()).toBe(true);+ expect(registry.runAction(ACTION_ID)).toBe(true);});});