opencode
opencode copied to clipboard
feat: Dynamic Details - compact tool output with click-to-expand enhancing navigation and workflow
Summary
Keeps vital tool output compact but fully accessible with a mouse click to quickly view the entire output. Click anywhere on the tool block to expand/collapse making navigating more efficient and easier to follow instead of pages of tool outputs speeding by.
Features
- Tool outputs are compact showing first 15 lines
- Click anywhere to easily expand/collapse
- Configurable threshold via
tui.dynamic_details_max_lines(default: 15) - Configurable arrow indicators via
tui.dynamic_details_show_arrows(default: true) - Toggle via Ctrl+P -> "Enable/Disable dynamic details"
- Persisted in KV store as
dynamic_details(default: disabled)
Configuration
{
"tui": {
"dynamic_details_max_lines": 15,
"dynamic_details_show_arrows": true
}
}
Applies To
Block-container tools (bash, write, edit, patch) when:
- Output exceeds configured line threshold
- Tool has completed (not pending/error states)
Changes
-
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx- Add dynamicDetails state, toggle command, and collapse logic in ToolPart -
packages/opencode/src/config/config.ts- Addtui.dynamic_details_max_linesandtui.dynamic_details_show_arrowsconfig options
Rebase Notes
Rebased onto latest dev and updated for API compatibility:
- Updated
PermissionRequest.callIDtoPermissionRequest.tool?.callID(permission API change) - Added
showAssistantMetadatasignal (new upstream feature) - Updated
DialogExportOptions.showcall to include new parameters