990441dfc1
Implemented Story 8: Collapsible Tool Outputs - Tool outputs now render in <details>/<summary> elements, collapsed by default - Summary shows tool name with key argument (e.g., ▶ read_file(src/main.rs)) - Added arrow rotation animation and scrollable content (max 300px) - Enhanced tool_calls display to show arguments inline - Added CSS styling for dark theme consistency Fixed: LLM autonomous coding behavior - Strengthened system prompt with explicit examples and directives - Implemented triple-reinforcement system (primary prompt + reminder + message prefixes) - Improved tool descriptions to be more explicit and action-oriented - Increased MAX_TURNS from 10 to 30 for complex agentic workflows - Added debug logging for Ollama requests/responses - Result: GPT-OSS (gpt-oss:20b) now successfully uses write_file autonomously Documentation improvements - Created MODEL_SELECTION.md guide with recommendations - Updated PERSONA.md spec to emphasize autonomous agent behavior - Updated UI_UX.md spec with collapsible tool output requirements - Updated SDSW workflow: LLM archives stories and performs squash merge Cleanup - Removed unused ToolTester.tsx component
1.2 KiB
1.2 KiB
Story: Collapsible Tool Outputs
User Story
As a User I want tool outputs (like long file contents or search results) to be collapsed by default So that the chat history remains readable and I can focus on the Agent's reasoning.
Acceptance Criteria
- Frontend: Render tool outputs inside a
<details>/<summary>component (or custom equivalent). - Frontend: Default state should be Closed/Collapsed.
- Frontend: The summary line should show the Tool Name + minimal args (e.g., "▶ read_file(src/main.rs)").
- Frontend: Clicking the arrow/summary expands to show the full output.
Out of Scope
- Complex syntax highlighting for tool outputs (plain text/pre is fine).
Implementation Plan
- Create a reusable component for displaying tool outputs with collapsible functionality
- Update the chat message rendering logic to use this component for tool outputs
- Ensure the summary line displays tool name and minimal arguments
- Verify that the component maintains proper styling and readability
- Test expand/collapse functionality across different tool output types
Related Functional Specs
- Functional Spec: Tool Outputs