Skip to content

feat(flow-chat): increase expanded preview max height for file operat…#530

Merged
limityan merged 2 commits intoGCWing:mainfrom
limityan:yanzhn/fix
Apr 25, 2026
Merged

feat(flow-chat): increase expanded preview max height for file operat…#530
limityan merged 2 commits intoGCWing:mainfrom
limityan:yanzhn/fix

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

Split single preview max-height constants into streaming vs expanded variants:

FileOperationToolCard:

  • FILE_OPERATION_STREAMING_MAX_HEIGHT (88px) for compact streaming preview
  • FILE_OPERATION_DIFF_MAX_HEIGHT (330px) for comfortable diff reading when manually expanded after completion

TerminalToolCard:

  • TERMINAL_OUTPUT_STREAMING_MAX_HEIGHT (88px) for compact live output during execution
  • TERMINAL_OUTPUT_EXPANDED_MAX_HEIGHT (286px) for comfortable output reading when manually expanded after completion/cancellation

Also fix TerminalToolCard extra prop to conditionally render only when there is actual content, preventing empty DOM elements from breaking card layout (border/width).

Both use max-height (not fixed height) so content shorter than the limit shrinks naturally without blank space.

…ion and terminal tool cards

Split single preview max-height constants into streaming vs expanded variants:

FileOperationToolCard:
- FILE_OPERATION_STREAMING_MAX_HEIGHT (88px) for compact streaming preview
- FILE_OPERATION_DIFF_MAX_HEIGHT (330px) for comfortable diff reading when manually expanded after completion

TerminalToolCard:
- TERMINAL_OUTPUT_STREAMING_MAX_HEIGHT (88px) for compact live output during execution
- TERMINAL_OUTPUT_EXPANDED_MAX_HEIGHT (286px) for comfortable output reading when manually expanded after completion/cancellation

Also fix TerminalToolCard extra prop to conditionally render only when there is actual content, preventing empty DOM elements from breaking card layout (border/width).

Both use max-height (not fixed height) so content shorter than the limit shrinks naturally without blank space.
… guidance

- Add WHEN TO USE / WHEN NOT TO USE sections to tool description
- Add recommendation guidelines (first option + \
@limityan limityan merged commit eb17d1d into GCWing:main Apr 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant