Skip to content

Commit c897ae6

Browse files
committed
Revert package.json
1 parent 2e2c0a8 commit c897ae6

38 files changed

+778
-1538
lines changed

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,20 @@ const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
4242

4343
return (
4444
<div className="flex flex-col justify-center absolute top-0 bottom-0 left-0 right-0 z-50 p-10 bg-black/50">
45-
<div
46-
style={{
47-
backgroundColor: "var(--vscode-editor-background)",
48-
borderRadius: "3px",
49-
padding: "12px 16px",
50-
margin: "5px 15px 5px 15px",
51-
position: "relative",
52-
flexShrink: 0,
53-
}}>
45+
<div className="bg-vscode-editor-background rounded-[3px] p-[12px_16px] m-[5px_15px] relative flex-shrink-0">
5446
<VSCodeButton
5547
appearance="icon"
5648
onClick={hideAnnouncement}
5749
title={t("chat:announcement.hideButton")}
58-
style={{ position: "absolute", top: "8px", right: "8px" }}>
50+
className="absolute top-2 right-2">
5951
<span className="codicon codicon-close"></span>
6052
</VSCodeButton>
61-
<h2 style={{ margin: "0 0 8px" }}>{t("chat:announcement.title")}</h2>
53+
<h2 className="m-0 mb-2">{t("chat:announcement.title")}</h2>
6254

63-
<p style={{ margin: "5px 0px" }}>{t("chat:announcement.description")}</p>
55+
<p className="my-[5px]">{t("chat:announcement.description")}</p>
6456

65-
<h3 style={{ margin: "12px 0 5px", fontSize: "14px" }}>{t("chat:announcement.whatsNew")}</h3>
66-
<ul style={{ margin: "5px 0" }}>
57+
<h3 className="mt-3 mb-[5px] text-sm">{t("chat:announcement.whatsNew")}</h3>
58+
<ul className="my-[5px]">
6759
<li>
6860
{" "}
6961
<Trans
@@ -96,7 +88,7 @@ const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
9688
</li>
9789
</ul>
9890

99-
<p style={{ margin: "10px 0px 0px" }}>
91+
<p className="mt-2.5 mb-0">
10092
<Trans
10193
i18nKey="chat:announcement.detailsDiscussLinks"
10294
components={{

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

Lines changed: 14 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useCallback, useMemo, useState } from "react"
22
import { Trans } from "react-i18next"
33
import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
44

5+
import { cn } from "@/lib/utils"
56
import { vscode } from "@src/utils/vscode"
67
import { useExtensionState } from "@src/context/ExtensionStateContext"
78
import { useAppTranslation } from "@src/i18n/TranslationContext"
@@ -118,23 +119,13 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
118119

119120
return (
120121
<div
121-
style={{
122-
padding: "0 15px",
123-
userSelect: "none",
124-
borderTop: isExpanded
125-
? `0.5px solid color-mix(in srgb, var(--vscode-titleBar-inactiveForeground) 20%, transparent)`
126-
: "none",
127-
overflowY: "auto",
128-
...style,
129-
}}>
122+
className={cn(
123+
"px-[15px] select-none overflow-y-auto",
124+
isExpanded && "border-t-[0.5px] border-vscode-titleBar-inactiveForeground-20",
125+
)}
126+
style={style}>
130127
<div
131-
style={{
132-
display: "flex",
133-
alignItems: "center",
134-
gap: "8px",
135-
padding: isExpanded ? "8px 0" : "8px 0 0 0",
136-
cursor: "pointer",
137-
}}
128+
className={`flex items-center gap-2 cursor-pointer ${isExpanded ? "py-2" : "pt-2 pb-0"}`}
138129
onClick={toggleExpanded}>
139130
<div onClick={(e) => e.stopPropagation()}>
140131
<VSCodeCheckbox
@@ -146,49 +137,22 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
146137
}}
147138
/>
148139
</div>
149-
<div
150-
style={{
151-
display: "flex",
152-
alignItems: "center",
153-
gap: "4px",
154-
flex: 1,
155-
minWidth: 0,
156-
}}>
157-
<span
158-
style={{
159-
color: "var(--vscode-foreground)",
160-
flexShrink: 0,
161-
}}>
162-
{t("chat:autoApprove.title")}
163-
</span>
164-
<span
165-
style={{
166-
color: "var(--vscode-descriptionForeground)",
167-
overflow: "hidden",
168-
textOverflow: "ellipsis",
169-
whiteSpace: "nowrap",
170-
flex: 1,
171-
minWidth: 0,
172-
}}>
140+
<div className="flex items-center gap-1 flex-1 min-w-0">
141+
<span className="text-vscode-foreground flex-shrink-0">{t("chat:autoApprove.title")}</span>
142+
<span className="text-vscode-descriptionForeground overflow-hidden text-ellipsis whitespace-nowrap flex-1 min-w-0">
173143
{enabledActionsList || t("chat:autoApprove.none")}
174144
</span>
175145
<span
176-
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}
177-
style={{
178-
flexShrink: 0,
179-
marginLeft: isExpanded ? "2px" : "-2px",
180-
}}
146+
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"} flex-shrink-0 ${
147+
isExpanded ? "ml-0.5" : "ml-[-2px]"
148+
}`}
181149
/>
182150
</div>
183151
</div>
184152

185153
{isExpanded && (
186154
<div className="flex flex-col gap-2">
187-
<div
188-
style={{
189-
color: "var(--vscode-descriptionForeground)",
190-
fontSize: "12px",
191-
}}>
155+
<div className="text-vscode-descriptionForeground text-xs">
192156
<Trans
193157
i18nKey="chat:autoApprove.description"
194158
components={{

0 commit comments

Comments
 (0)