Skip to content

Feature/transcript tool outputs toggle#73

Open
manthanabc wants to merge 2 commits intomainfrom
feature/transcript-tool-outputs-toggle
Open

Feature/transcript tool outputs toggle#73
manthanabc wants to merge 2 commits intomainfrom
feature/transcript-tool-outputs-toggle

Conversation

@manthanabc
Copy link
Owner

No description provided.

manthanabc and others added 2 commits January 26, 2026 19:57
- Add show_tool_outputs field to TranscriptRenderer (default: false)
- Add 'o' key binding to toggle tool outputs visibility in transcript mode
- Render tool outputs dimmed when shown
- Update footer to show tool outputs toggle state
- Add hint about Ctrl+O in conversation summary

Co-Authored-By: Paws <noreply@pawscode.dev>
Copilot AI review requested due to automatic review settings January 26, 2026 20:43
@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Jan 26, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a toggle feature for displaying tool outputs in the transcript view, complementing the existing thinking toggle functionality.

Changes:

  • Added a user hint in the UI to inform users about the transcript mode keyboard shortcut (Ctrl+O)
  • Implemented a new show_tool_outputs toggle feature in the transcript renderer with 'o' key binding
  • Extended the transcript renderer to display tool result outputs (text, images, and AI results) when enabled

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/paws_main/src/ui.rs Added hint message to guide users to transcript mode using Ctrl+O
crates/paws_main/src/transcript.rs Added show_tool_outputs field, 'o' key toggle handler, tool output rendering logic, and updated help text
Comments suppressed due to low confidence (1)

crates/paws_main/src/transcript.rs:705

  • The code in this block is duplicated from the 't' key handler above (lines 662-683). Consider extracting the common re-rendering logic into a helper method to reduce duplication and improve maintainability. The only difference between these two blocks is which flag is being toggled.
                            KeyCode::Char('o') => {
                                // Toggle tool outputs visibility
                                show_tool_outputs = !show_tool_outputs;
                                // Re-render content with new tool outputs visibility
                                lines = self.render_content_with_options(
                                    &conversation,
                                    show_thinking,
                                    show_tool_outputs,
                                );
                                let header = self.render_header(&conversation);
                                lines.splice(0..0, header);
                                lines.push(String::new());
                                lines.extend(self.render_summary(&conversation));
                                // Adjust scroll offset if needed
                                let content_height = height.saturating_sub(1) as usize;
                                if lines.len() > content_height {
                                    scroll_offset = scroll_offset
                                        .min(lines.len().saturating_sub(content_height));
                                } else {
                                    scroll_offset = 0;
                                }
                            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +49 to +50
show_tool_outputs: false,
}
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a public setter method similar to show_thinking to allow programmatic control of the show_tool_outputs flag. This would maintain consistency with the existing API pattern for the show_thinking field.

Copilot uses AI. Check for mistakes.
Comment on lines +268 to +299
ContextMessage::Tool(tool_result) => {
// Render tool results to show tool outputs in place (only if enabled)
if show_tool_outputs {
lines.push(format!("{}: {}", "Tool Result".dimmed(), tool_result.name));
for value in &tool_result.output.values {
match value {
ToolValue::Text(text) => {
for line in text.lines() {
lines.push(line.dimmed().to_string());
}
}
ToolValue::Image(image) => {
lines.push(
format!("[Image: {}]", image.mime_type())
.dimmed()
.to_string(),
);
}
ToolValue::AI { value, conversation_id } => {
lines.push(
format!("AI Result ({conversation_id}):")
.dimmed()
.to_string(),
);
for line in value.lines() {
lines.push(line.dimmed().to_string());
}
}
ToolValue::Empty => {}
}
}
}
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider checking tool_result.output.is_error and displaying error outputs with a different style (e.g., red text) instead of dimmed text to make tool errors more visible to users.

Copilot uses AI. Check for mistakes.
@manthanabc manthanabc mentioned this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant