Skip to content

Commit f55a7f1

Browse files
Changed Enter button icon and fixed sensitivity issues
1 parent 8a688cd commit f55a7f1

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

gui/src/components/mainInput/InputToolbar.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AtSymbolIcon, PhotoIcon } from "@heroicons/react/24/outline";
1+
import { AtSymbolIcon, PaperAirplaneIcon, PhotoIcon } from "@heroicons/react/24/outline";
22
import { InputModifiers } from "core";
33
import { modelSupportsImages, modelSupportsTools } from "core/llm/autodetect";
44
import { useRef } from "react";
@@ -50,7 +50,8 @@ const StyledDiv = styled.div<{ isHidden?: boolean }>`
5050

5151
const EnterButton = styled.button<{ isPrimary?: boolean }>`
5252
all: unset;
53-
padding: 2px 4px;
53+
padding: 3px 4px;
54+
padding-bottom: 0px;
5455
display: flex;
5556
align-items: center;
5657
background-color: ${(props) =>
@@ -83,6 +84,7 @@ interface InputToolbarProps {
8384
toolbarOptions?: ToolbarOptions;
8485
disabled?: boolean;
8586
isMainInput?: boolean;
87+
hasText?: boolean;
8688
}
8789

8890
function InputToolbar(props: InputToolbarProps) {
@@ -223,10 +225,18 @@ function InputToolbar(props: InputToolbarProps) {
223225
}}
224226
disabled={isEnterDisabled}
225227
>
226-
<span className="hidden md:inline">
227-
{props.toolbarOptions?.enterText ?? "Enter"}
228-
</span>
229-
<span className="md:hidden"></span>
228+
<div data-tooltip-id="submit-tooltip">
229+
<PaperAirplaneIcon
230+
className={`h-4 w-4 ${
231+
props.hasText
232+
? "text-[var(--vscode-editorForeground)]"
233+
: "text-[var(--vscode-descriptionForeground)]"
234+
} transition duration-150 ease-in-out`}
235+
/>
236+
</div>
237+
<ToolTip id="submit-tooltip" place="top-middle">
238+
Send (Enter)
239+
</ToolTip>
230240
</EnterButton>
231241
</div>
232242
</StyledDiv>

gui/src/components/mainInput/TipTapEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@ function TipTapEditor(props: TipTapEditorProps) {
10151015
});
10161016
}}
10171017
disabled={isStreaming}
1018+
hasText={editor ? editor.getText().trim().length > 0 : false}
10181019
/>
10191020
</div>
10201021

0 commit comments

Comments
 (0)