From c3f7fa33866d60bec143ce5e74769a4ffd728495 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Mon, 17 Feb 2025 17:27:31 -0800 Subject: [PATCH] cleaned up unused vars --- webview-ui/src/components/mcp/McpView.tsx | 9 +----- .../mcp/marketplace/McpMarketplaceCard.tsx | 3 +- .../mcp/marketplace/McpMarketplaceView.tsx | 29 ------------------- .../mcp/marketplace/McpSubmitCard.tsx | 27 ----------------- 4 files changed, 2 insertions(+), 66 deletions(-) diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx index 3c0eef4811..4e7d2b0da9 100644 --- a/webview-ui/src/components/mcp/McpView.tsx +++ b/webview-ui/src/components/mcp/McpView.tsx @@ -1,11 +1,4 @@ -import { - VSCodeButton, - VSCodeLink, - VSCodePanels, - VSCodePanelTab, - VSCodePanelView, - VSCodeDivider, -} from "@vscode/webview-ui-toolkit/react" +import { VSCodeButton, VSCodeLink, VSCodePanels, VSCodePanelTab, VSCodePanelView } from "@vscode/webview-ui-toolkit/react" import { useState } from "react" import { vscode } from "../../utils/vscode" import { useExtensionState } from "../../context/ExtensionStateContext" diff --git a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx index b35cef80b4..18840f2b70 100644 --- a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx +++ b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx @@ -1,5 +1,4 @@ -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { CSSProperties, useCallback, useEffect, useState, useRef } from "react" +import { useCallback, useState, useRef } from "react" import styled from "styled-components" import { McpMarketplaceItem, McpServer } from "../../../../../src/shared/mcp" import { vscode } from "../../../utils/vscode" diff --git a/webview-ui/src/components/mcp/marketplace/McpMarketplaceView.tsx b/webview-ui/src/components/mcp/marketplace/McpMarketplaceView.tsx index 711530eb58..29a2502135 100644 --- a/webview-ui/src/components/mcp/marketplace/McpMarketplaceView.tsx +++ b/webview-ui/src/components/mcp/marketplace/McpMarketplaceView.tsx @@ -13,35 +13,6 @@ import { useExtensionState } from "../../../context/ExtensionStateContext" import { vscode } from "../../../utils/vscode" import McpMarketplaceCard from "./McpMarketplaceCard" import McpSubmitCard from "./McpSubmitCard" - -const controlHeight = "28px" - -const searchInputStyles = { - width: "100%", - height: controlHeight, - padding: "0 8px 0 32px", // Removed vertical padding since we're using fixed height - background: "var(--vscode-input-background)", - border: "1px solid var(--vscode-input-border)", - color: "var(--vscode-input-foreground)", - borderRadius: "2px", - outline: "none", - transition: "border-color 0.1s ease-in-out, opacity 0.1s ease-in-out", - cursor: "text", // Show text cursor for input -} as const - -const selectStyles = { - height: controlHeight, - padding: "0 12px", // Removed vertical padding since we're using fixed height - background: "var(--vscode-dropdown-background)", - border: "1px solid var(--vscode-dropdown-border)", - color: "var(--vscode-dropdown-foreground)", - borderRadius: "2px", - outline: "none", - transition: "border-color 0.1s ease-in-out, opacity 0.1s ease-in-out", - minWidth: "140px", // Ensure consistent width for dropdowns - cursor: "pointer", // Show pointer cursor on hover -} as const - const McpMarketplaceView = () => { const { mcpServers } = useExtensionState() const [items, setItems] = useState([]) diff --git a/webview-ui/src/components/mcp/marketplace/McpSubmitCard.tsx b/webview-ui/src/components/mcp/marketplace/McpSubmitCard.tsx index 717fdf4688..b00eedc5de 100644 --- a/webview-ui/src/components/mcp/marketplace/McpSubmitCard.tsx +++ b/webview-ui/src/components/mcp/marketplace/McpSubmitCard.tsx @@ -1,6 +1,3 @@ -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import styled from "styled-components" - const McpSubmitCard = () => { return (
{ ) } -const StyledGitHubButton = styled.div` - font-size: 13px; - font-weight: 500; - padding: 8px; - border-radius: 2px; - border: 1px solid var(--vscode-button-border, transparent); - cursor: pointer; - background: var(--vscode-button-background); - color: var(--vscode-button-foreground); - display: flex; - align-items: center; - justify-content: center; - width: 100%; - - &:hover { - background: var(--vscode-button-hoverBackground); - } - - &:active { - background: var(--vscode-button-background); - opacity: 0.7; - } -` - export default McpSubmitCard