diff --git a/webview-ui/src/components/history/HistoryView.tsx b/webview-ui/src/components/history/HistoryView.tsx index 2e2424c7faa..a1bbdb556f2 100644 --- a/webview-ui/src/components/history/HistoryView.tsx +++ b/webview-ui/src/components/history/HistoryView.tsx @@ -3,8 +3,8 @@ import { DeleteTaskDialog } from "./DeleteTaskDialog" import { BatchDeleteTaskDialog } from "./BatchDeleteTaskDialog" import prettyBytes from "pretty-bytes" import { Virtuoso } from "react-virtuoso" + import { - VSCodeButton, VSCodeTextField, VSCodeRadioGroup, VSCodeRadio, @@ -76,8 +76,8 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {

{t("history:history")}

- { className={`codicon ${isSelectionMode ? "codicon-check-all" : "codicon-checklist"} mr-1`} /> {isSelectionMode ? t("history:exitSelection") : t("history:selectionMode")} - - {t("history:done")} + +
@@ -427,12 +427,12 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { {t("history:selectedItems", { selected: selectedTaskIds.length, total: tasks.length })}
- setSelectedTaskIds([])}> + +
)} diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx index a262d2b5e06..48c6ee80994 100644 --- a/webview-ui/src/components/mcp/McpView.tsx +++ b/webview-ui/src/components/mcp/McpView.tsx @@ -1,6 +1,6 @@ import { useState } from "react" +import { Button } from "@/components/ui/button" import { - VSCodeButton, VSCodeCheckbox, VSCodeLink, VSCodePanels, @@ -39,7 +39,7 @@ const McpView = ({ onDone }: McpViewProps) => {

{t("mcp:title")}

- {t("mcp:done")} +
@@ -100,24 +100,24 @@ const McpView = ({ onDone }: McpViewProps) => { {/* Edit Settings Buttons */}
- { vscode.postMessage({ type: "openMcpSettings" }) }}> {t("mcp:editGlobalMCP")} - - +
)} @@ -229,19 +229,21 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
e.stopPropagation()}> - setShowDeleteConfirm(true)} style={{ marginRight: "8px" }}> - - +
{server.error}
- {server.status === "connecting" ? t("mcp:serverStatus.retrying") : t("mcp:serverStatus.retryConnection")} - +
) : ( isExpanded && ( @@ -444,12 +446,12 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM - setShowDeleteConfirm(false)}> + + diff --git a/webview-ui/src/components/prompts/PromptsView.tsx b/webview-ui/src/components/prompts/PromptsView.tsx index 62982b827c8..15044fb2f8b 100644 --- a/webview-ui/src/components/prompts/PromptsView.tsx +++ b/webview-ui/src/components/prompts/PromptsView.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useMemo, useCallback } from "react" +import { Button } from "@/components/ui/button" import { - VSCodeButton, VSCodeTextArea, VSCodeDropdown, VSCodeOption, @@ -393,7 +393,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {

{t("prompts:title")}

- {t("prompts:done")} +
@@ -401,15 +401,17 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
e.stopPropagation()} className="flex justify-between items-center mb-3">

{t("prompts:modes.title")}

- - +
- { @@ -422,7 +424,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { setTimeout(() => setShowConfigMenu(false), 200) }}> - + {showConfigMenu && (
e.stopPropagation()} @@ -512,8 +514,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { }} className="w-full" /> - { vscode.postMessage({ @@ -522,7 +525,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { }) }}> - +
@@ -531,8 +534,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
{t("prompts:roleDefinition.title")}
{!findModeBySlug(mode, customModes) && ( - { const currentMode = getCurrentMode() if (currentMode?.slug) { @@ -542,7 +546,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { title={t("prompts:roleDefinition.resetToDefault")} data-testid="role-definition-reset"> - + )}
@@ -613,17 +617,18 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
{t("prompts:tools.title")}
{findModeBySlug(mode, customModes) && ( - setIsToolsEditMode(!isToolsEditMode)} - title={ + )}
{!findModeBySlug(mode, customModes) && ( @@ -705,8 +710,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { }}>
{t("prompts:customInstructions.title")}
{!findModeBySlug(mode, customModes) && ( - { const currentMode = getCurrentMode() if (currentMode?.slug) { @@ -716,7 +722,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { title={t("prompts:customInstructions.resetToDefault")} data-testid="custom-instructions-reset"> - + )}
{ borderBottom: "1px solid var(--vscode-input-border)", }}>
- { const currentMode = getCurrentMode() if (currentMode) { @@ -827,9 +833,10 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { }} data-testid="preview-prompt-button"> {t("prompts:systemPrompt.preview")} - - +
{/* Custom System Prompt Disclosure */} @@ -1004,12 +1011,13 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { marginBottom: "4px", }}>
{t("prompts:supportPrompts.prompt")}
- handleSupportReset(activeSupportTab)} title={t("prompts:supportPrompts.resetPrompt", { promptType: activeSupportTab })}> - +
{ alignItems: "center", gap: 8, }}> - + disabled={isEnhancing}> {t("prompts:supportPrompts.enhance.previewButton")} - +
@@ -1132,8 +1140,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { overflowY: "auto", minHeight: 0, }}> - setIsCreateModeDialogOpen(false)} style={{ position: "absolute", @@ -1141,7 +1150,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { right: "20px", }}> - +

{t("prompts:createModeDialog.title")}

@@ -1328,12 +1337,12 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { borderTop: "1px solid var(--vscode-editor-lineHighlightBorder)", backgroundColor: "var(--vscode-editor-background)", }}> - setIsCreateModeDialogOpen(false)}> + +
@@ -1366,8 +1375,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { overflowY: "auto", minHeight: 0, }}> - setIsDialogOpen(false)} style={{ position: "absolute", @@ -1375,7 +1385,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { right: "20px", }}> - +

{selectedPromptTitle || t("prompts:systemPrompt.title", { modeName: getCurrentMode()?.name || "Code" })} @@ -1404,9 +1414,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { borderTop: "1px solid var(--vscode-editor-lineHighlightBorder)", backgroundColor: "var(--vscode-editor-background)", }}> - setIsDialogOpen(false)}> + diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 2ba1c348e3f..0171537b9e0 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -1,6 +1,5 @@ import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react" import { useAppTranslation } from "@/i18n/TranslationContext" -import { Button as VSCodeButton } from "vscrui" import { CheckCheck, SquareMousePointer, @@ -339,8 +338,8 @@ const SettingsView = forwardRef(({ onDone },
- (({ onDone }, disabled={!isChangeDetected || !isSettingValid} data-testid="save-button"> {t("settings:common.save")} - - +