From d56923b657111071ef3abf1fcfcb18e4684656cd Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Thu, 4 Dec 2025 08:29:34 +0800 Subject: [PATCH] refactor(vscode-ide-companion): remove deprecated file locations - Removed old InfoBanner.tsx file location - Removed old ReadToolCall.tsx file location These files have been moved to new directory structures. --- .../src/webview/components/InfoBanner.tsx | 109 ------------------ .../components/toolcalls/ReadToolCall.tsx | 74 ------------ 2 files changed, 183 deletions(-) delete mode 100644 packages/vscode-ide-companion/src/webview/components/InfoBanner.tsx delete mode 100644 packages/vscode-ide-companion/src/webview/components/toolcalls/ReadToolCall.tsx diff --git a/packages/vscode-ide-companion/src/webview/components/InfoBanner.tsx b/packages/vscode-ide-companion/src/webview/components/InfoBanner.tsx deleted file mode 100644 index 193bde92..00000000 --- a/packages/vscode-ide-companion/src/webview/components/InfoBanner.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @license - * Copyright 2025 Qwen Team - * SPDX-License-Identifier: Apache-2.0 - */ - -import type React from 'react'; -import { TerminalIcon, CloseIcon } from './icons/index.js'; - -interface InfoBannerProps { - /** - * Whether the banner is visible - */ - visible: boolean; - - /** - * Callback when the banner is dismissed - */ - onDismiss: () => void; - - /** - * Optional: Custom message content (if not provided, uses default) - */ - message?: React.ReactNode; - - /** - * Optional: Custom link text - */ - linkText?: string; - - /** - * Optional: Callback when the link is clicked - */ - onLinkClick?: (e: React.MouseEvent) => void; -} - -export const InfoBanner: React.FC = ({ - visible, - onDismiss, - message, - linkText = 'Switch back in Settings.', - onLinkClick, -}) => { - if (!visible) { - return null; - } - - return ( -
-
- {/* Icon */} - - - {/* Message */} - -
- - {/* Close button */} - -
- ); -}; diff --git a/packages/vscode-ide-companion/src/webview/components/toolcalls/ReadToolCall.tsx b/packages/vscode-ide-companion/src/webview/components/toolcalls/ReadToolCall.tsx deleted file mode 100644 index 0106e176..00000000 --- a/packages/vscode-ide-companion/src/webview/components/toolcalls/ReadToolCall.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @license - * Copyright 2025 Qwen Team - * SPDX-License-Identifier: Apache-2.0 - * - * Read tool call component - specialized for file reading operations - */ - -import type React from 'react'; -import type { BaseToolCallProps } from './shared/types.js'; -import { ToolCallContainer } from './shared/LayoutComponents.js'; -import { groupContent } from './shared/utils.js'; -import { FileLink } from '../ui/FileLink.js'; - -/** - * Specialized component for Read tool calls - * Optimized for displaying file reading operations - * Shows: Read filename (no content preview) - */ -export const ReadToolCall: React.FC = ({ toolCall }) => { - const { content, locations, toolCallId } = toolCall; - - // Group content by type - const { errors } = groupContent(content); - - // Error case: show error - if (errors.length > 0) { - const path = locations?.[0]?.path || ''; - return ( - - ) : undefined - } - > - {errors.join('\n')} - - ); - } - - // Success case: show which file was read with filename in label - if (locations && locations.length > 0) { - const path = locations[0].path; - return ( - - ) : undefined - } - > - {null} - - ); - } - - // No file info, don't show - return null; -};