Skip to content

Commit e583bfd

Browse files
authored
fix: GUI polish (#7927)
* fix: assistant listbox styling * fix: replace tool truncation icon * fix: tool call ui tweaks * fix: cubic feedback
1 parent 306ed9f commit e583bfd

File tree

10 files changed

+37
-10
lines changed

10 files changed

+37
-10
lines changed

gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ export function SelectedAssistantButton({
4848
) : (
4949
<>
5050
<AssistantIcon assistant={selectedProfile} size={iconSize} />
51-
<span
52-
className={`select-none truncate text-xs ${isSidebar && "hidden md:block"}`}
53-
>
51+
<span className={`xs:line-clamp-1 hidden select-none text-xs`}>
5452
{selectedProfile.title}
5553
</span>
5654
</>

gui/src/components/AssistantAndOrgListbox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export function AssistantAndOrgListbox({
150150
/>
151151
<Transition>
152152
<ListboxOptions
153-
className="max-h-32 -translate-x-1.5 overflow-y-auto pb-0"
153+
className="max-h-32 scale-x-[97%] overflow-y-auto pb-0"
154154
style={{ zIndex: 200 }}
155155
>
156156
<div className="flex items-center justify-between px-1.5 py-1">

gui/src/components/StyledMarkdownPreview/index.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,26 @@ const StyledMarkdown = styled.div<{
8484
font-family: var(--vscode-editor-font-family);
8585
}
8686

87+
ul ul,
88+
ul ol,
89+
ol ul,
90+
ol ol {
91+
padding-left: 1.5em;
92+
margin-top: 1em;
93+
}
94+
95+
li {
96+
margin-bottom: 0.8em;
97+
}
98+
li:last-child {
99+
margin-bottom: 0;
100+
}
101+
102+
ul,
103+
ol {
104+
padding-left: 2em;
105+
}
106+
87107
code:not(pre > code) {
88108
font-family: var(--vscode-editor-font-family);
89109
}

gui/src/components/mainInput/InputToolbar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function InputToolbar(props: InputToolbarProps) {
5656
const hasReasoningEnabled = useAppSelector(
5757
(store) => store.session.hasReasoningEnabled,
5858
);
59-
6059
const isEnterDisabled =
6160
props.disabled || (isInEdit && codeToEdit.length === 0);
6261

gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function BlockSettingsTopToolbar() {
105105
};
106106

107107
return (
108-
<div className="flex flex-1 items-center justify-between gap-1.5">
108+
<div className="flex flex-1 items-center justify-between gap-3">
109109
<div className="flex items-center gap-1">
110110
{shouldShowError && (
111111
<ToolTip delayShow={700} content="View configuration errors">

gui/src/components/ui/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4040
className={cn(
4141
"cursor-pointer transition-all duration-200",
4242
"hover:enabled:cursor-pointer",
43-
"disabled:text-description-muted disabled:pointer-events-none disabled:opacity-50",
43+
"disabled:cursor-not-allowed disabled:opacity-50",
4444
buttonVariants[variant],
4545
isIcon
4646
? iconButtonSizes[size]

gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { IdeMessengerContext } from "../../../context/IdeMessenger";
88
import { ToggleWithIcon } from "./ToggleWithIcon";
99
import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
10+
import { ToolTruncateHistoryIcon } from "./ToolTruncateHistoryIcon";
1011
import { toolCallStateToContextItems } from "./utils";
1112

1213
interface SimpleToolCallUIProps {
@@ -61,6 +62,10 @@ export function SimpleToolCallUI({
6162
/>
6263
<ToolCallStatusMessage tool={tool} toolCallState={toolCallState} />
6364
</div>
65+
66+
{!!toolCallState.output?.length && (
67+
<ToolTruncateHistoryIcon historyIndex={historyIndex} />
68+
)}
6469
</div>
6570

6671
{isToggleable && (

gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Tool, ToolCallState } from "core";
22
import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
3+
import { ToolTruncateHistoryIcon } from "./ToolTruncateHistoryIcon";
34

45
interface ToolCallDisplayProps {
56
children: React.ReactNode;
@@ -19,7 +20,7 @@ export function ToolCallDisplay({
1920
return (
2021
<div className="flex flex-col justify-center px-4">
2122
<div className="mb-2 flex flex-col">
22-
<div className="flex flex-row items-center justify-between gap-1.5">
23+
<div className="flex flex-row items-start justify-between gap-1.5">
2324
<div className="flex min-w-0 flex-row items-center gap-2">
2425
<div className="mt-[1px] h-4 w-4 flex-shrink-0 font-semibold">
2526
{icon}
@@ -29,6 +30,9 @@ export function ToolCallDisplay({
2930
)}
3031
<ToolCallStatusMessage tool={tool} toolCallState={toolCallState} />
3132
</div>
33+
{!!toolCallState.output?.length && (
34+
<ToolTruncateHistoryIcon historyIndex={historyIndex} />
35+
)}
3236
</div>
3337
</div>
3438
<div>{children}</div>

gui/src/pages/gui/ToolCallDiv/ToolCallStatusMessage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function ToolCallStatusMessage({
5353

5454
return (
5555
<div
56-
className="text-description line-clamp-4 min-w-0 break-all"
56+
className="text-description line-clamp-4 min-w-0 break-words"
5757
data-testid="tool-call-title"
5858
>
5959
{`Continue ${intro} ${message}`}

gui/src/pages/gui/ToolCallDiv/ToolTruncateHistoryIcon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export function ToolTruncateHistoryIcon({
2121
const { mainEditor } = useMainEditor();
2222

2323
if (historyIndex === lastMessageIndex) {
24-
return null;
24+
// filler so doesn't jump in
25+
return <div className="h-3 w-3" />;
2526
}
2627

2728
return (

0 commit comments

Comments
 (0)