Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(chat): prevent tool titles from clipping (#18215)

AmAzing-10f24d7ade75
diff --git a/packages/shared-tool-ui/src/components/FilePathDisplay.tsx b/packages/shared-tool-ui/src/components/FilePathDisplay.tsx
index fedf5b4dba1..1c816150d30 100644
--- a/packages/shared-tool-ui/src/components/FilePathDisplay.tsx
+++ b/packages/shared-tool-ui/src/components/FilePathDisplay.tsx
@@ -11,10 +11,8 @@ const styles = createStaticStyles(({ css }) => ({
margin-inline-end: 4px;
`,
text: css`
- overflow: hidden;
+ padding-block: 1px;
color: ${cssVar.colorText};
- text-overflow: ellipsis;
- white-space: nowrap;
`,
}));
diff --git a/src/features/Conversation/Messages/AssistantGroup/Tool/Inspector/ToolTitle.tsx b/src/features/Conversation/Messages/AssistantGroup/Tool/Inspector/ToolTitle.tsx
index 8200c91bcfc..c3bdb9fdfb0 100644
--- a/src/features/Conversation/Messages/AssistantGroup/Tool/Inspector/ToolTitle.tsx
+++ b/src/features/Conversation/Messages/AssistantGroup/Tool/Inspector/ToolTitle.tsx
@@ -34,6 +34,8 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
+ padding-block: 1px;
+
color: ${cssVar.colorTextDescription};
`,
}));
diff --git a/src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx b/src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx
index f9a01e56c61..852b0e5074c 100644
--- a/src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx
+++ b/src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx
@@ -469,7 +469,6 @@ const WorkflowCollapse = memo<WorkflowCollapseProps>(
style={{
minHeight: WORKFLOW_STREAMING_TITLE_MIN_HEIGHT_PX,
minWidth: 0,
- overflow: 'hidden',
}}
>
<div style={{ minWidth: 0, overflow: 'hidden' }}>
@@ -491,6 +490,7 @@ const WorkflowCollapse = memo<WorkflowCollapseProps>(
style={{
color: pendingInterventionPresent ? cssVar.colorInfo : undefined,
overflow: 'hidden',
+ paddingBlock: 1,
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
@@ -508,12 +508,13 @@ const WorkflowCollapse = memo<WorkflowCollapseProps>(
)}
</Flexbox>
) : (
- <Flexbox horizontal align="center" gap={6} style={{ minWidth: 0, overflow: 'hidden' }}>
+ <Flexbox horizontal align="center" gap={6} style={{ minWidth: 0 }}>
<Text
type="secondary"
style={{
minWidth: 0,
overflow: 'hidden',
+ paddingBlock: 1,
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}