diff --git a/apps/server/src/routes/suggestions/generate-suggestions.ts b/apps/server/src/routes/suggestions/generate-suggestions.ts index c8000ce5..40e860d3 100644 --- a/apps/server/src/routes/suggestions/generate-suggestions.ts +++ b/apps/server/src/routes/suggestions/generate-suggestions.ts @@ -63,10 +63,8 @@ For each suggestion, provide: The response will be automatically formatted as structured JSON.`; - events.emit('suggestions:event', { - type: 'suggestions_progress', - content: `Starting ${suggestionType} analysis...\n`, - }); + // Don't send initial message - let the agent output speak for itself + // The first agent message will be captured as an info entry const options = createSuggestionsOptions({ cwd: projectPath, diff --git a/apps/ui/src/components/views/board-view/dialogs/feature-suggestions-dialog.tsx b/apps/ui/src/components/views/board-view/dialogs/feature-suggestions-dialog.tsx index 3af13bfa..db6187d2 100644 --- a/apps/ui/src/components/views/board-view/dialogs/feature-suggestions-dialog.tsx +++ b/apps/ui/src/components/views/board-view/dialogs/feature-suggestions-dialog.tsx @@ -21,6 +21,8 @@ import { RefreshCw, Shield, Zap, + List, + FileText, } from 'lucide-react'; import { getElectronAPI, @@ -30,6 +32,7 @@ import { } from '@/lib/electron'; import { useAppStore, Feature } from '@/store/app-store'; import { toast } from 'sonner'; +import { LogViewer } from '@/components/ui/log-viewer'; interface FeatureSuggestionsDialogProps { open: boolean; @@ -92,6 +95,7 @@ export function FeatureSuggestionsDialog({ const [expandedIds, setExpandedIds] = useState>(new Set()); const [isImporting, setIsImporting] = useState(false); const [currentSuggestionType, setCurrentSuggestionType] = useState(null); + const [viewMode, setViewMode] = useState<'parsed' | 'raw'>('parsed'); const scrollRef = useRef(null); const autoScrollRef = useRef(true); @@ -123,7 +127,9 @@ export function FeatureSuggestionsDialog({ setProgress((prev) => [...prev, event.content || '']); } else if (event.type === 'suggestions_tool') { const toolName = event.tool || 'Unknown Tool'; - setProgress((prev) => [...prev, `Using tool: ${toolName}\n`]); + const toolInput = event.input ? JSON.stringify(event.input, null, 2) : ''; + const formattedTool = `\n🔧 Tool: ${toolName}\n${toolInput ? `Input: ${toolInput}\n` : ''}`; + setProgress((prev) => [...prev, formattedTool]); } else if (event.type === 'suggestions_complete') { setIsGenerating(false); if (event.suggestions && event.suggestions.length > 0) { @@ -245,6 +251,7 @@ export function FeatureSuggestionsDialog({ id: `feature-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, category: s.category, description: s.description, + steps: [], // Required empty steps array for new features status: 'backlog' as const, skipTests: true, // As specified, testing mode true priority: s.priority, // Preserve priority from suggestion @@ -297,7 +304,7 @@ export function FeatureSuggestionsDialog({ setCurrentSuggestionType(null); }, [setSuggestions]); - const hasStarted = progress.length > 0 || suggestions.length > 0; + const hasStarted = isGenerating || progress.length > 0 || suggestions.length > 0; const hasSuggestions = suggestions.length > 0; const currentConfig = currentSuggestionType ? suggestionTypeConfig[currentSuggestionType] : null; @@ -371,19 +378,56 @@ export function FeatureSuggestionsDialog({ Analyzing project... - +
+
+ + +
+ +
-
- {progress.join('')} -
+ {progress.length === 0 ? ( +
+ + Waiting for AI response... +
+ ) : viewMode === 'parsed' ? ( + + ) : ( +
+ {progress.join('')} +
+ )}
) : hasSuggestions ? (