Skip to content

Commit b808ee2

Browse files
committed
Truncate long context keyword text using ellipses to prevent prompt field overflow
1 parent f816985 commit b808ee2

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎packages/ui/src/components/editor/panel/PromptField/PromptField.module.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
align-items: center;
157157
line-height: 1.2;
158158
transform: translateY(1.5px);
159+
max-width: 100%;
159160

160161
&__icon {
161162
display: flex;
@@ -182,6 +183,9 @@
182183
}
183184

184185
&__text {
186+
white-space: nowrap;
187+
overflow: hidden;
188+
text-overflow: ellipsis;
185189
border-radius: 4px;
186190
padding-right: 4px;
187191
padding-left: 4px;

‎packages/ui/src/components/editor/panel/PromptField/PromptField.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,23 +435,23 @@ export const PromptField: React.FC<PromptFieldProps> = (props) => {
435435
}}
436436
onMouseLeave={() => set_show_at_sign_tooltip(false)}
437437
className={cn(styles['footer__left__button'])}
438-
title="Reference file"
438+
title="Reference File"
439439
>
440440
<Icon variant="AT_SIGN" />
441441
</button>
442442
{!props.is_in_code_completions_mode && (
443443
<button
444444
onClick={props.on_hash_sign_click}
445445
className={cn(styles['footer__left__button'])}
446-
title="Insert symbol"
446+
title="Insert Symbol"
447447
>
448448
<Icon variant="HASH_SIGN" />
449449
</button>
450450
)}
451451
<button
452452
onClick={props.on_curly_braces_click}
453453
className={cn(styles['footer__left__button'])}
454-
title="Prompt templates"
454+
title="Prompt Templates"
455455
>
456456
<Icon variant="CURLY_BRACES" />
457457
</button>

0 commit comments

Comments
 (0)