diff --git a/crates/goose/src/config/experiments.rs b/crates/goose/src/config/experiments.rs index c60802e2..4a2cdfab 100644 --- a/crates/goose/src/config/experiments.rs +++ b/crates/goose/src/config/experiments.rs @@ -5,7 +5,6 @@ use std::collections::HashMap; /// It is the ground truth for init experiments. The experiment names in users' experiment list but not /// in the list will be remove from user list; The experiment names in the ground-truth list but not /// in users' experiment list will be added to user list with default value false; -/// TODO: keep this up to date with the experimental-features.md documentation page const ALL_EXPERIMENTS: &[(&str, bool)] = &[]; /// Experiment configuration management diff --git a/crates/goose/src/config/extensions.rs b/crates/goose/src/config/extensions.rs index 2f51c412..460a6e93 100644 --- a/crates/goose/src/config/extensions.rs +++ b/crates/goose/src/config/extensions.rs @@ -81,8 +81,7 @@ fn get_extensions_map() -> IndexMap { fn save_extensions_map(extensions: IndexMap) { let config = Config::global(); if let Err(e) = config.set_param(EXTENSIONS_CONFIG_KEY, &extensions) { - // TODO(jack) why is this just a debug statement? - tracing::debug!("Failed to save extensions config: {}", e); + tracing::warn!("Failed to save extensions config: {}", e); } } diff --git a/ui/desktop/src/App.tsx b/ui/desktop/src/App.tsx index bc9702d5..75367dc1 100644 --- a/ui/desktop/src/App.tsx +++ b/ui/desktop/src/App.tsx @@ -413,7 +413,6 @@ export function AppInner() { const { addExtension } = useConfig(); useEffect(() => { - console.log('Sending reactReady signal to Electron'); try { window.electron.reactReady(); } catch (error) { @@ -458,7 +457,6 @@ export function AppInner() { }, [navigate]); useEffect(() => { - console.log('Setting up keyboard shortcuts'); const handleKeyDown = (event: KeyboardEvent) => { const isMac = window.electron.platform === 'darwin'; if ((isMac ? event.metaKey : event.ctrlKey) && event.key === 'n') { @@ -537,9 +535,6 @@ export function AppInner() { const handleSetView = (_event: IpcRendererEvent, ...args: unknown[]) => { const newView = args[0] as View; const section = args[1] as string | undefined; - console.log( - `Received view change request to: ${newView}${section ? `, section: ${section}` : ''}` - ); if (section && newView === 'settings') { navigate(`/settings?section=${section}`); @@ -554,7 +549,6 @@ export function AppInner() { useEffect(() => { const handleNewChat = (_event: IpcRendererEvent, ..._args: unknown[]) => { - console.log('Received new-chat event from keyboard shortcut'); window.dispatchEvent(new CustomEvent(AppEvents.TRIGGER_NEW_CHAT)); }; @@ -581,16 +575,9 @@ export function AppInner() { useEffect(() => { const handleSetInitialMessage = async (_event: IpcRendererEvent, ...args: unknown[]) => { const initialMessage = args[0] as string; - console.log( - '[App] Received set-initial-message event:', - initialMessage, - 'isProcessing:', - isProcessingRef.current - ); if (initialMessage && !isProcessingRef.current) { isProcessingRef.current = true; - console.log('[App] Processing initial message from launcher:', initialMessage); navigate('/pair', { state: { initialMessage: { msg: initialMessage, images: [] }, @@ -599,8 +586,6 @@ export function AppInner() { setTimeout(() => { isProcessingRef.current = false; }, 1000); - } else if (initialMessage) { - console.log('[App] Ignoring duplicate initial message (already processing)'); } }; window.electron.on('set-initial-message', handleSetInitialMessage); diff --git a/ui/desktop/src/components/AnnouncementModal.tsx b/ui/desktop/src/components/AnnouncementModal.tsx index 72be7be9..b8a986aa 100644 --- a/ui/desktop/src/components/AnnouncementModal.tsx +++ b/ui/desktop/src/components/AnnouncementModal.tsx @@ -92,7 +92,7 @@ export default function AnnouncementModal() { } } } catch (error) { - console.log('No announcements found or failed to load:', error); + console.warn('No announcements found or failed to load:', error); } }; diff --git a/ui/desktop/src/components/ChatInput.tsx b/ui/desktop/src/components/ChatInput.tsx index 88438ea5..49bc25e4 100644 --- a/ui/desktop/src/components/ChatInput.tsx +++ b/ui/desktop/src/components/ChatInput.tsx @@ -412,7 +412,6 @@ export default function ChatInput({ provider = configModelAndProvider.provider; } if (!model || !provider) { - console.log('No model or provider found'); setIsTokenLimitLoaded(true); return; } diff --git a/ui/desktop/src/components/ConfigContext.tsx b/ui/desktop/src/components/ConfigContext.tsx index 05b823b0..03d90023 100644 --- a/ui/desktop/src/components/ConfigContext.tsx +++ b/ui/desktop/src/components/ConfigContext.tsx @@ -115,7 +115,7 @@ export const ConfigProvider: React.FC = ({ children }) => { } if (result.error && !result.data) { - console.log(result.error); + console.error(result.error); return extensionsList; } diff --git a/ui/desktop/src/components/ExtensionInstallModal.tsx b/ui/desktop/src/components/ExtensionInstallModal.tsx index 310fa27f..adf29cea 100644 --- a/ui/desktop/src/components/ExtensionInstallModal.tsx +++ b/ui/desktop/src/components/ExtensionInstallModal.tsx @@ -161,13 +161,11 @@ export function ExtensionInstallModal({ addExtension, setView }: ExtensionInstal const handleExtensionRequest = useCallback(async (link: string): Promise => { if (processingLinkRef.current === link) { - console.log(`Skipping duplicate extension request (already processing): ${link}`); return; } processingLinkRef.current = link; try { - console.log(`Processing extension request: ${link}`); const command = extractCommand(link); const remoteUrl = extractRemoteUrl(link); @@ -175,7 +173,6 @@ export function ExtensionInstallModal({ addExtension, setView }: ExtensionInstal const extensionsList = await getExtensionsRef.current(true); if (extensionsList?.find((ext) => ext.name === extName)) { - console.log(`Extension Already Installed: ${extName}`); toastService.success({ title: `Extension '${extName}' Already Installed`, @@ -183,7 +180,6 @@ export function ExtensionInstallModal({ addExtension, setView }: ExtensionInstal }); return; } - console.log('Extension not found, continuing to show modal'); const extensionInfo: ExtensionInfo = { name: extName, @@ -235,14 +231,12 @@ export function ExtensionInstallModal({ addExtension, setView }: ExtensionInstal setModalState((prev) => ({ ...prev, isPending: true })); try { - console.log(`Confirming installation of extension from: ${pendingLink}`); if (addExtension) { await addExtensionFromDeepLink( pendingLink, addExtension, (view: string, options?: ViewOptions) => { - console.log('Extension installation completed, navigating to:', view, options); setView(view as View, options); } ); @@ -260,7 +254,6 @@ export function ExtensionInstallModal({ addExtension, setView }: ExtensionInstal }, [pendingLink, dismissModal, addExtension, setView]); useEffect(() => { - console.log('Setting up extension install modal handler'); const handleAddExtension = async (_event: IpcRendererEvent, ...args: unknown[]) => { const link = args[0] as string; diff --git a/ui/desktop/src/components/InterruptionHandler.tsx b/ui/desktop/src/components/InterruptionHandler.tsx deleted file mode 100644 index 2fd57df1..00000000 --- a/ui/desktop/src/components/InterruptionHandler.tsx +++ /dev/null @@ -1,236 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { AlertTriangle, StopCircle, PauseCircle, RotateCcw, Zap, AlertCircle } from 'lucide-react'; -import { Button } from './ui/button'; -import { InterruptionMatch } from '../utils/interruptionDetector'; - -interface InterruptionHandlerProps { - match: InterruptionMatch | null; - onConfirmInterruption: () => void; - onCancelInterruption: () => void; - onRedirect?: (newMessage: string) => void; - className?: string; -} - -export const InterruptionHandler: React.FC = ({ - match, - onConfirmInterruption, - onCancelInterruption, - onRedirect, - className = '', -}) => { - const [redirectMessage, setRedirectMessage] = useState(''); - const [showRedirectInput, setShowRedirectInput] = useState(false); - const [isVisible, setIsVisible] = useState(false); - - useEffect(() => { - if (match) { - setIsVisible(true); - if (match.keyword.action === 'redirect') { - setShowRedirectInput(true); - } else { - setShowRedirectInput(false); - setRedirectMessage(''); - } - } else { - setIsVisible(false); - } - }, [match]); - - if (!match) { - return null; - } - - const getIcon = () => { - switch (match.keyword.action) { - case 'stop': - return ; - case 'pause': - return ; - case 'redirect': - return ; - default: - return ; - } - }; - - const getActionColor = () => { - switch (match.keyword.action) { - case 'stop': - return { - bg: 'bg-red-50 dark:bg-red-950/20', - border: 'border-red-200 dark:border-red-800/50', - text: 'text-red-800 dark:text-red-200', - accent: 'text-red-600 dark:text-red-400', - }; - case 'pause': - return { - bg: 'bg-amber-50 dark:bg-amber-950/20', - border: 'border-amber-200 dark:border-amber-800/50', - text: 'text-amber-800 dark:text-amber-200', - accent: 'text-amber-600 dark:text-amber-400', - }; - case 'redirect': - return { - bg: 'bg-blue-50 dark:bg-blue-950/20', - border: 'border-blue-200 dark:border-blue-800/50', - text: 'text-blue-800 dark:text-blue-200', - accent: 'text-blue-600 dark:text-blue-400', - }; - default: - return { - bg: 'bg-orange-50 dark:bg-orange-950/20', - border: 'border-orange-200 dark:border-orange-800/50', - text: 'text-orange-800 dark:text-orange-200', - accent: 'text-orange-600 dark:text-orange-400', - }; - } - }; - - const colors = getActionColor(); - - const handleConfirm = () => { - if (showRedirectInput && onRedirect && redirectMessage.trim()) { - onRedirect(redirectMessage.trim()); - } else { - onConfirmInterruption(); - } - }; - - const getActionTitle = () => { - switch (match.keyword.action) { - case 'stop': - return 'Stop Processing'; - case 'pause': - return 'Pause Processing'; - case 'redirect': - return 'Redirect Processing'; - default: - return 'Interrupt Processing'; - } - }; - - const getActionDescription = () => { - switch (match.keyword.action) { - case 'stop': - return 'This will immediately stop the current processing and clear any queued messages.'; - case 'pause': - return 'This will pause the current processing. Queued messages will be preserved.'; - case 'redirect': - return 'This will stop current processing and redirect to a new task.'; - default: - return 'This will interrupt the current processing.'; - } - }; - - return ( -
-
- {/* Main card */} -
- {/* Header */} -
-
-
- {getIcon()} -
-
-

{getActionTitle()}

-

Detected: "{match.matchedText}"

-
-
- {Math.round(match.confidence * 100)}% confident -
-
-
- - {/* Content */} -
-
- -

{getActionDescription()}

-
- - {/* Redirect input */} - {showRedirectInput && ( -
- -