refactor(vscode-ide-companion): Refactoring the project structure and updating dependencies

This commit is contained in:
yiliang114
2025-11-29 13:16:58 +08:00
parent 9ae45c01a6
commit 6885138cf0
13 changed files with 84 additions and 183 deletions

View File

@@ -0,0 +1,282 @@
/**
* @license
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*
* Styles extracted from Claude Code extension (v2.0.43)
* Path: /Users/jinjing/Downloads/Anthropic.claude-code-2.0.43/extension/webview/index.css
*/
/* Import component styles */
@import '../components/SaveSessionDialog.css';
@import '../components/SessionManager.css';
@import '../components/EmptyState.css';
@import '../components/CompletionMenu.css';
@import '../components/ContextPills.css';
@import '../components/PlanDisplay.css';
@import '../components/Timeline.css';
@import '../components/shared/FileLink.css';
@import '../components/toolcalls/shared/DiffDisplay.css';
@import '../components/messages/AssistantMessage.css';
/* ===========================
Session Selector Button (from Claude Code .E)
=========================== */
.session-selector-button {
display: flex;
align-items: center;
gap: 6px;
padding: 2px 8px;
background: transparent;
border: none;
border-radius: 4px;
cursor: pointer;
outline: none;
min-width: 0;
max-width: 300px;
overflow: hidden;
font-size: var(--vscode-chat-font-size, 13px);
font-family: var(--vscode-chat-font-family);
}
.session-selector-button:focus,
.session-selector-button:hover {
background: var(--app-ghost-button-hover-background);
}
/* Session Selector Button Internal Elements */
.session-selector-button-content {
display: flex;
align-items: center;
gap: 4px;
max-width: 300px;
overflow: hidden;
}
.session-selector-button-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
}
.session-selector-button-icon {
flex-shrink: 0;
}
.session-selector-button-icon svg {
width: 16px;
height: 16px;
min-width: 16px;
}
/* ===========================
Icon Button (from Claude Code .j)
=========================== */
.icon-button {
flex: 0 0 auto;
padding: 0;
background: transparent;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
outline: none;
width: 24px;
height: 24px;
}
.icon-button:focus,
.icon-button:hover {
background: var(--app-ghost-button-hover-background);
}
/* ===========================
Session Dropdown (from Claude Code .St/.Wt)
=========================== */
.session-dropdown {
position: fixed;
background: var(--app-menu-background);
border: 1px solid var(--app-menu-border);
border-radius: var(--corner-radius-small);
width: min(400px, calc(100vw - 32px));
max-height: min(500px, 50vh);
display: flex;
flex-direction: column;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
z-index: 1000;
outline: none;
font-size: var(--vscode-chat-font-size, 13px);
font-family: var(--vscode-chat-font-family);
}
/* ===========================
Search Box Container (from Claude Code .Lt)
=========================== */
.session-search {
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
border-bottom: 1px solid var(--app-menu-border);
}
.session-search svg,
.session-search-icon {
width: 16px;
height: 16px;
opacity: 0.5;
flex-shrink: 0;
color: var(--app-primary-foreground);
}
/* Search Input (from Claude Code .U) */
.session-search-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--app-menu-foreground);
font-size: var(--vscode-chat-font-size, 13px);
font-family: var(--vscode-chat-font-family);
padding: 0;
}
.session-search-input::placeholder {
color: var(--app-input-placeholder-foreground);
opacity: 0.6;
}
/* Session List Content Area (from Claude Code .jt/.It) */
.session-list-content {
overflow-y: auto;
flex: 1;
user-select: none;
padding: 8px;
}
/* Group Label (from Claude Code .ae) */
.session-group-label {
padding: 4px 8px;
color: var(--app-primary-foreground);
opacity: 0.5;
font-size: 0.9em;
font-weight: 500;
}
.session-group-label:not(:first-child) {
margin-top: 8px;
}
/* Session Group Container (from Claude Code .At) */
.session-group {
display: flex;
flex-direction: column;
gap: 2px;
}
/* Session Item Button (from Claude Code .s) */
.session-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
background: transparent;
border: none;
border-radius: 6px;
cursor: pointer;
text-align: left;
width: 100%;
font-size: var(--vscode-chat-font-size, 13px);
font-family: var(--vscode-chat-font-family);
color: var(--app-primary-foreground);
transition: background 0.1s ease;
}
.session-item:hover {
background: var(--app-list-hover-background);
}
/* Active Session (from Claude Code .N) */
.session-item.active {
background: var(--app-list-active-background);
color: var(--app-list-active-foreground);
font-weight: 600;
}
/* Session Title (from Claude Code .ce) */
.session-item-title {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
/* Session Time (from Claude Code .Dt) */
.session-item-time {
opacity: 0.6;
font-size: 0.9em;
flex-shrink: 0;
margin-left: 12px;
}
/* Backdrop for dropdown */
.session-selector-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
background: transparent;
}
/* ===========================
CSS Variables (from Claude Code root styles)
=========================== */
:root {
/* Colors */
--app-primary-foreground: var(--vscode-foreground);
--app-secondary-foreground: var(--vscode-descriptionForeground);
--app-primary-border-color: var(--vscode-panel-border);
--app-input-placeholder-foreground: var(--vscode-input-placeholderForeground);
/* Buttons */
--app-ghost-button-hover-background: var(--vscode-toolbar-hoverBackground);
/* Border Radius */
--corner-radius-small: 6px;
/* Header */
--app-header-background: var(--vscode-sideBar-background);
/* List Styles */
--app-list-padding: 0px;
--app-list-item-padding: 4px 8px;
--app-list-border-color: transparent;
--app-list-border-radius: 4px;
--app-list-hover-background: var(--vscode-list-hoverBackground);
--app-list-active-background: var(--vscode-list-activeSelectionBackground);
--app-list-active-foreground: var(--vscode-list-activeSelectionForeground);
--app-list-gap: 2px;
/* Menu Styles */
--app-menu-background: var(--vscode-menu-background);
--app-menu-border: var(--vscode-menu-border);
--app-menu-foreground: var(--vscode-menu-foreground);
--app-menu-selection-background: var(--vscode-menu-selectionBackground);
--app-menu-selection-foreground: var(--vscode-menu-selectionForeground);
/* Tool Call Styles */
--app-tool-background: var(--vscode-editor-background);
--app-code-background: var(--vscode-textCodeBlock-background);
/* Warning/Error Styles */
--app-warning-background: var(--vscode-editorWarning-background, rgba(255, 204, 0, 0.1));
--app-warning-border: var(--vscode-editorWarning-foreground, #ffcc00);
--app-warning-foreground: var(--vscode-editorWarning-foreground, #ffcc00);
}