Skip to content

Commit 4806ab5

Browse files
dleffeldleffel
authored andcommitted
Fix missing tooltips in several components.
1 parent 4430863 commit 4806ab5

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

webview-ui/src/components/chat/Announcement.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
2525
<VSCodeButton
2626
appearance="icon"
2727
onClick={hideAnnouncement}
28+
title="Hide announcement"
2829
style={{ position: "absolute", top: "8px", right: "8px" }}>
2930
<span className="codicon codicon-close"></span>
3031
</VSCodeButton>

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
798798
<select
799799
value={mode}
800800
disabled={textAreaDisabled}
801+
title="Select mode for interaction"
801802
onChange={(e) => {
802803
const value = e.target.value
803804
if (value === "prompts-action") {
@@ -849,6 +850,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
849850
<select
850851
value={currentApiConfigName || ""}
851852
disabled={textAreaDisabled}
853+
title="Select API configuration"
852854
onChange={(e) => {
853855
const value = e.target.value
854856
if (value === "settings-action") {
@@ -915,6 +917,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
915917
role="button"
916918
aria-label="enhance prompt"
917919
data-testid="enhance-prompt-button"
920+
title="Enhance prompt with additional context"
918921
className={`input-icon-button ${
919922
textAreaDisabled ? "disabled" : ""
920923
} codicon codicon-sparkle`}
@@ -927,11 +930,13 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
927930
className={`input-icon-button ${
928931
shouldDisableImages ? "disabled" : ""
929932
} codicon codicon-device-camera`}
933+
title="Add images to message"
930934
onClick={() => !shouldDisableImages && onSelectImages()}
931935
style={{ fontSize: 16.5 }}
932936
/>
933937
<span
934938
className={`input-icon-button ${textAreaDisabled ? "disabled" : ""} codicon codicon-send`}
939+
title="Send message"
935940
onClick={() => !textAreaDisabled && onSend()}
936941
style={{ fontSize: 15 }}
937942
/>

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,8 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
10771077
onClick={() => {
10781078
scrollToBottomSmooth()
10791079
disableAutoScrollRef.current = false
1080-
}}>
1080+
}}
1081+
title="Scroll to bottom of chat">
10811082
<span className="codicon codicon-chevron-down" style={{ fontSize: "18px" }}></span>
10821083
</ScrollToBottomButton>
10831084
</div>
@@ -1101,6 +1102,25 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
11011102
flex: secondaryButtonText ? 1 : 2,
11021103
marginRight: secondaryButtonText ? "6px" : "0",
11031104
}}
1105+
title={
1106+
primaryButtonText === "Retry"
1107+
? "Try the operation again"
1108+
: primaryButtonText === "Save"
1109+
? "Save the file changes"
1110+
: primaryButtonText === "Approve"
1111+
? "Approve this action"
1112+
: primaryButtonText === "Run Command"
1113+
? "Execute this command"
1114+
: primaryButtonText === "Start New Task"
1115+
? "Begin a new task"
1116+
: primaryButtonText === "Resume Task"
1117+
? "Continue the current task"
1118+
: primaryButtonText === "Proceed Anyways"
1119+
? "Continue despite warnings"
1120+
: primaryButtonText === "Proceed While Running"
1121+
? "Continue while command executes"
1122+
: undefined
1123+
}
11041124
onClick={(e) => handlePrimaryButtonClick(inputValue, selectedImages)}>
11051125
{primaryButtonText}
11061126
</VSCodeButton>
@@ -1113,6 +1133,17 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
11131133
flex: isStreaming ? 2 : 1,
11141134
marginLeft: isStreaming ? 0 : "6px",
11151135
}}
1136+
title={
1137+
isStreaming
1138+
? "Cancel the current operation"
1139+
: secondaryButtonText === "Start New Task"
1140+
? "Begin a new task"
1141+
: secondaryButtonText === "Reject"
1142+
? "Reject this action"
1143+
: secondaryButtonText === "Terminate"
1144+
? "End the current task"
1145+
: undefined
1146+
}
11161147
onClick={(e) => handleSecondaryButtonClick(inputValue, selectedImages)}>
11171148
{isStreaming ? "Cancel" : secondaryButtonText}
11181149
</VSCodeButton>

webview-ui/src/components/chat/TaskHeader.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
180180
${totalCost?.toFixed(4)}
181181
</div>
182182
)}
183-
<VSCodeButton appearance="icon" onClick={onClose} style={{ marginLeft: 6, flexShrink: 0 }}>
183+
<VSCodeButton
184+
appearance="icon"
185+
onClick={onClose}
186+
style={{ marginLeft: 6, flexShrink: 0 }}
187+
title="Close task and start a new one">
184188
<span className="codicon codicon-close"></span>
185189
</VSCodeButton>
186190
</div>
@@ -348,13 +352,18 @@ export const highlightMentions = (text?: string, withShadow = true) => {
348352

349353
const TaskActions = ({ item }: { item: HistoryItem | undefined }) => (
350354
<div className="flex flex-row gap-1">
351-
<Button variant="ghost" size="sm" onClick={() => vscode.postMessage({ type: "exportCurrentTask" })}>
355+
<Button
356+
variant="ghost"
357+
size="sm"
358+
title="Export task history"
359+
onClick={() => vscode.postMessage({ type: "exportCurrentTask" })}>
352360
<span className="codicon codicon-cloud-download" />
353361
</Button>
354362
{!!item?.size && item.size > 0 && (
355363
<Button
356364
variant="ghost"
357365
size="sm"
366+
title="Delete task from history"
358367
onClick={() => vscode.postMessage({ type: "deleteTaskWithId", text: item.id })}>
359368
<span className="codicon codicon-trash" />
360369
{prettyBytes(item.size)}

0 commit comments

Comments
 (0)