From e02866d06fa4426118e4f2b85651b34a2c9318e6 Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Wed, 19 Nov 2025 10:40:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(vscode-ide-companion):=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E4=BB=A3=E7=A0=81=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新文件命名规则,使用小写字母和下划线 - 修复部分代码导入路径 - 删除未使用的 WEBVIEW_PIN_FEATURE.md 文件 --- WEBVIEW_PIN_FEATURE.md | 448 ------------------ .../src/WebViewProvider.ts | 8 +- .../{AcpConnection.ts => acpConnection.ts} | 11 +- .../{AcpFileHandler.ts => acpFileHandler.ts} | 0 ...MessageHandler.ts => acpMessageHandler.ts} | 7 +- ...SessionManager.ts => acpSessionManager.ts} | 2 +- .../acp/{AcpTypes.ts => connectionTypes.ts} | 0 ...wenAgentManager.ts => qwenAgentManager.ts} | 12 +- ...ionHandler.ts => qwenConnectionHandler.ts} | 6 +- ...Handler.ts => qwenSessionUpdateHandler.ts} | 0 .../src/agents/{QwenTypes.ts => qwenTypes.ts} | 0 ...uthStateManager.ts => authStateManager.ts} | 2 +- .../vscode-ide-companion/src/extension.ts | 2 +- ...nSessionReader.ts => qwenSessionReader.ts} | 2 +- .../src/shared/acpTypes.ts | 2 +- ...versationStore.ts => conversationStore.ts} | 4 +- .../utils/{CliDetector.ts => cliDetector.ts} | 0 .../vscode-ide-companion/src/webview/App.tsx | 2 +- .../src/webview/hooks/useVSCode.ts | 2 +- .../src/webview/index.tsx | 2 +- 20 files changed, 35 insertions(+), 477 deletions(-) delete mode 100644 WEBVIEW_PIN_FEATURE.md rename packages/vscode-ide-companion/src/acp/{AcpConnection.ts => acpConnection.ts} (97%) rename packages/vscode-ide-companion/src/acp/{AcpFileHandler.ts => acpFileHandler.ts} (100%) rename packages/vscode-ide-companion/src/acp/{AcpMessageHandler.ts => acpMessageHandler.ts} (97%) rename packages/vscode-ide-companion/src/acp/{AcpSessionManager.ts => acpSessionManager.ts} (99%) rename packages/vscode-ide-companion/src/acp/{AcpTypes.ts => connectionTypes.ts} (100%) rename packages/vscode-ide-companion/src/agents/{QwenAgentManager.ts => qwenAgentManager.ts} (95%) rename packages/vscode-ide-companion/src/agents/{QwenConnectionHandler.ts => qwenConnectionHandler.ts} (97%) rename packages/vscode-ide-companion/src/agents/{QwenSessionUpdateHandler.ts => qwenSessionUpdateHandler.ts} (100%) rename packages/vscode-ide-companion/src/agents/{QwenTypes.ts => qwenTypes.ts} (100%) rename packages/vscode-ide-companion/src/auth/{AuthStateManager.ts => authStateManager.ts} (98%) rename packages/vscode-ide-companion/src/services/{QwenSessionReader.ts => qwenSessionReader.ts} (99%) rename packages/vscode-ide-companion/src/storage/{ConversationStore.ts => conversationStore.ts} (96%) rename packages/vscode-ide-companion/src/utils/{CliDetector.ts => cliDetector.ts} (100%) diff --git a/WEBVIEW_PIN_FEATURE.md b/WEBVIEW_PIN_FEATURE.md deleted file mode 100644 index 773a2578..00000000 --- a/WEBVIEW_PIN_FEATURE.md +++ /dev/null @@ -1,448 +0,0 @@ -# WebView 固定功能实现说明 - -> **更新时间**: 2025-11-18 -> **功能**: WebView 右侧固定 + Pin Tab 防止意外关闭 - ---- - -## ✅ 已实现的功能 - -### 1. WebView 固定在右侧 ✅ - -**位置**: `src/WebViewProvider.ts:82-85` - -```typescript -this.panel = vscode.window.createWebviewPanel( - 'qwenCode.chat', - 'Qwen Code Chat', - { - viewColumn: vscode.ViewColumn.Beside, // 在编辑器右侧打开 - preserveFocus: true, // 不抢夺编辑器焦点 - }, - // ... -); -``` - -**功能说明**: - -- ✅ `viewColumn: vscode.ViewColumn.Beside` - WebView 始终在当前编辑器的右侧打开 -- ✅ `preserveFocus: true` - 打开 WebView 时不会夺取焦点,用户可以继续编辑代码 - -**用户体验**: - -- 打开 WebView 时,编辑器保持焦点 -- WebView 在右侧独立列中打开 -- 可以同时查看代码和聊天界面 - ---- - -### 2. WebView Tab 自动固定 ✅ - -**位置**: `src/WebViewProvider.ts:100-107` - -```typescript -// Pin the webview tab to prevent accidental closure -// Note: This is done after panel creation to ensure it takes effect -setTimeout(() => { - if (this.panel) { - // Execute VSCode command to pin the active editor - vscode.commands.executeCommand('workbench.action.pinEditor'); - } -}, 100); -``` - -**功能说明**: - -- ✅ 创建 WebView 后自动执行 pin 命令 -- ✅ 使用 100ms 延迟确保 panel 完全创建 -- ✅ 防止用户意外关闭 WebView tab - -**用户体验**: - -- WebView tab 会显示 pin 图标(📌) -- 关闭其他 tab 时,WebView 不会被关闭 -- 需要明确点击关闭按钮才能关闭 WebView - ---- - -### 3. WebView 重新打开时保持位置 ✅ - -**位置**: `src/WebViewProvider.ts:74-76` - -```typescript -if (this.panel) { - this.panel.reveal(vscode.ViewColumn.Beside, true); // preserveFocus = true - return; -} -``` - -**功能说明**: - -- ✅ 如果 WebView 已存在,调用 `reveal()` 显示 -- ✅ 参数 `vscode.ViewColumn.Beside` 确保在右侧显示 -- ✅ 参数 `true` (preserveFocus) 不夺取焦点 - -**用户体验**: - -- 关闭后重新打开,WebView 仍然在右侧 -- 多次打开不会创建多个 WebView -- 保持用户的工作流程 - ---- - -## 🎯 与 Claude Code 的对比 - -| 功能 | Claude Code | 当前实现 | 状态 | -| ------------ | ----------- | -------- | -------- | -| **右侧打开** | ✅ | ✅ | 完全对标 | -| **不抢焦点** | ✅ | ✅ | 完全对标 | -| **Pin Tab** | ✅ | ✅ | 完全对标 | -| **记住位置** | ✅ | ✅ | 完全对标 | - ---- - -## 📊 技术实现细节 - -### ViewColumn.Beside 的行为 - -```typescript -vscode.ViewColumn.Beside; -``` - -**说明**: - -- 如果当前有活动编辑器,在其右侧创建新列 -- 如果当前没有活动编辑器,在 ViewColumn.One 中打开 -- 如果已经有多列,在最右侧列的右边打开 - -**实际效果**: - -``` -┌─────────────┬─────────────┐ -│ │ │ -│ Code │ WebView │ -│ Editor │ (Pinned) │ -│ (Focus) │ │ -│ │ │ -└─────────────┴─────────────┘ -``` - ---- - -### preserveFocus 的作用 - -```typescript -{ - viewColumn: vscode.ViewColumn.Beside, - preserveFocus: true // ← 关键参数 -} -``` - -**功能**: - -- `true`: 创建 WebView 时不夺取焦点,编辑器保持活动 -- `false`: 创建 WebView 时自动切换焦点到 WebView - -**用户场景**: - -- ✅ 用户正在编辑代码时打开聊天,焦点仍在编辑器 -- ✅ 用户可以继续输入代码,不会被打断 -- ✅ 想要与 AI 交互时,手动点击 WebView 即可 - ---- - -### Pin Editor 命令的作用 - -```typescript -vscode.commands.executeCommand('workbench.action.pinEditor'); -``` - -**功能**: - -- 固定当前活动的 editor tab -- 防止被 `workbench.action.closeOtherEditors` 等命令关闭 -- 在 tab 上显示 pin 图标 - -**VSCode 原生行为**: - -- Pinned tab 会在非 pinned tab 的左侧显示 -- 关闭"其他编辑器"时,pinned 的不会被关闭 -- Pinned tab 的颜色/样式可能有所不同(取决于主题) - ---- - -## 🧪 测试建议 - -### 测试场景 1: 首次打开 - -**步骤**: - -1. 打开一个代码文件 -2. 执行命令 `qwenCode.openChat` -3. 观察 WebView 位置 - -**预期结果**: - -- ✅ WebView 在右侧打开 -- ✅ 代码编辑器保持焦点 -- ✅ WebView tab 显示 pin 图标(📌) - ---- - -### 测试场景 2: 关闭后重新打开 - -**步骤**: - -1. 关闭 WebView tab -2. 再次执行命令 `qwenCode.openChat` -3. 观察 WebView 位置 - -**预期结果**: - -- ✅ WebView 再次在右侧打开 -- ✅ WebView 再次被 pin -- ✅ 代码编辑器保持焦点 - ---- - -### 测试场景 3: 关闭其他编辑器 - -**步骤**: - -1. 打开多个代码文件和 WebView -2. 右键点击任意 tab -3. 选择 "关闭其他编辑器" - -**预期结果**: - -- ✅ 其他非 pinned tab 被关闭 -- ✅ WebView (pinned) 保持打开 -- ✅ 当前 tab 和 WebView 仍然可见 - ---- - -### 测试场景 4: 切换焦点 - -**步骤**: - -1. WebView 打开后,焦点在编辑器 -2. 点击 WebView 中的输入框 -3. 输入一些文本 -4. 按 Ctrl/Cmd + 1 切换回编辑器 - -**预期结果**: - -- ✅ WebView 输入框获得焦点 -- ✅ 可以正常输入 -- ✅ 快捷键可以切换焦点 -- ✅ WebView 保持在右侧 - ---- - -### 测试场景 5: 分屏编辑器 - -**步骤**: - -1. 已经有左右分屏的编辑器 -2. 焦点在左侧编辑器 -3. 打开 WebView - -**预期结果**: - -- ✅ WebView 在右侧编辑器的右边打开(第三列) -- ✅ 左侧编辑器保持焦点 -- ✅ WebView 被 pin - ---- - -## 🔧 故障排查 - -### 问题 1: WebView 没有被 pin - -**可能原因**: - -- setTimeout 延迟不够 -- panel 还未完全创建 - -**解决方案**: - -```typescript -// 增加延迟到 200ms -setTimeout(() => { - if (this.panel) { - vscode.commands.executeCommand('workbench.action.pinEditor'); - } -}, 200); -``` - ---- - -### 问题 2: WebView 不在右侧打开 - -**可能原因**: - -- 没有活动编辑器 -- ViewColumn 参数错误 - -**解决方案**: -确保使用正确的参数格式: - -```typescript -{ - viewColumn: vscode.ViewColumn.Beside, // ← 必须是对象属性 - preserveFocus: true -} -``` - ---- - -### 问题 3: WebView 抢夺焦点 - -**可能原因**: - -- `preserveFocus` 设置为 `false` 或未设置 -- `reveal()` 方法没有传递 `preserveFocus` 参数 - -**解决方案**: - -```typescript -// 创建时 -{ viewColumn: ..., preserveFocus: true } - -// 重新显示时 -this.panel.reveal(vscode.ViewColumn.Beside, true); -// ↑ -// preserveFocus -``` - ---- - -## 📝 代码改动总结 - -### 修改的文件 - -- `src/WebViewProvider.ts` (修改 ~30 行) - -### 主要改动 - -1. **show() 方法** (line 73-107) - - 修改 `createWebviewPanel` 参数格式 - - 添加 `preserveFocus: true` - - 添加自动 pin 逻辑 - - 修改 `reveal()` 调用参数 - -2. **构造函数** (line 27-33) - - 修复 TypeScript 警告 - - 将 `private context` 改为普通参数 - -### 新增代码 - -- 添加 10 行(pin 逻辑和注释) - ---- - -## 🚀 后续优化建议 - -### 优先级 P2 - 可选增强 - -#### 1. 添加配置选项 - -**建议**: - -```typescript -// 在 package.json 中添加配置 -"qwenCode.webview.autoPin": { - "type": "boolean", - "default": true, - "description": "Automatically pin the WebView tab" -} - -// 在代码中使用配置 -const config = vscode.workspace.getConfiguration('qwenCode'); -const autoPin = config.get('webview.autoPin', true); - -if (autoPin) { - setTimeout(() => { - vscode.commands.executeCommand('workbench.action.pinEditor'); - }, 100); -} -``` - -**好处**: - -- 用户可以选择是否自动 pin -- 更灵活的用户体验 - ---- - -#### 2. 记住 WebView 大小 - -**建议**: - -```typescript -// 在 workspace state 中保存大小 -context.workspaceState.update('webview.size', { - width: panel.viewColumn, - height: panel.visible, -}); - -// 恢复时使用保存的大小 -const savedSize = context.workspaceState.get('webview.size'); -``` - -**好处**: - -- 用户调整的 WebView 大小会被记住 -- 下次打开时恢复到相同大小 - ---- - -#### 3. 添加键盘快捷键 - -**建议**: - -```json -// package.json -"keybindings": [ - { - "command": "qwenCode.openChat", - "key": "ctrl+shift+q", - "mac": "cmd+shift+q" - }, - { - "command": "qwenCode.focusChat", - "key": "ctrl+shift+c", - "mac": "cmd+shift+c" - } -] -``` - -**好处**: - -- 快速打开/切换到 WebView -- 提高工作效率 - ---- - -## ✅ 验收标准 - -### 功能验收 - -- [x] WebView 在右侧打开 -- [x] 不夺取编辑器焦点 -- [x] Tab 自动被 pin -- [x] 重新打开时保持位置 -- [x] 构建无错误 - -### 用户体验验收 - -- [ ] 符合用户预期 -- [ ] 不干扰编码流程 -- [ ] Pin 图标可见 -- [ ] 关闭其他编辑器时不受影响 - ---- - -**文档版本**: v1.0 -**创建时间**: 2025-11-18 -**状态**: ✅ 实现完成,⏳ 等待测试 diff --git a/packages/vscode-ide-companion/src/WebViewProvider.ts b/packages/vscode-ide-companion/src/WebViewProvider.ts index 66b9278f..a11d1dcd 100644 --- a/packages/vscode-ide-companion/src/WebViewProvider.ts +++ b/packages/vscode-ide-companion/src/WebViewProvider.ts @@ -8,11 +8,11 @@ import * as vscode from 'vscode'; import { QwenAgentManager, type ChatMessage, -} from './agents/QwenAgentManager.js'; -import { ConversationStore } from './storage/ConversationStore.js'; +} from './agents/qwenAgentManager.js'; +import { ConversationStore } from './storage/conversationStore.js'; import type { AcpPermissionRequest } from './shared/acpTypes.js'; -import { CliDetector } from './utils/CliDetector.js'; -import { AuthStateManager } from './auth/AuthStateManager.js'; +import { CliDetector } from './utils/cliDetector.js'; +import { AuthStateManager } from './auth/authStateManager.js'; export class WebViewProvider { private panel: vscode.WebviewPanel | null = null; diff --git a/packages/vscode-ide-companion/src/acp/AcpConnection.ts b/packages/vscode-ide-companion/src/acp/acpConnection.ts similarity index 97% rename from packages/vscode-ide-companion/src/acp/AcpConnection.ts rename to packages/vscode-ide-companion/src/acp/acpConnection.ts index 3e4e9a81..710f3072 100644 --- a/packages/vscode-ide-companion/src/acp/AcpConnection.ts +++ b/packages/vscode-ide-companion/src/acp/acpConnection.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ @@ -14,9 +14,12 @@ import type { } from '../shared/acpTypes.js'; import type { ChildProcess, SpawnOptions } from 'child_process'; import { spawn } from 'child_process'; -import type { PendingRequest, AcpConnectionCallbacks } from './AcpTypes.js'; -import { AcpMessageHandler } from './AcpMessageHandler.js'; -import { AcpSessionManager } from './AcpSessionManager.js'; +import type { + PendingRequest, + AcpConnectionCallbacks, +} from './connectionTypes.js'; +import { AcpMessageHandler } from './acpMessageHandler.js'; +import { AcpSessionManager } from './acpSessionManager.js'; /** * ACP Connection Handler for VSCode Extension diff --git a/packages/vscode-ide-companion/src/acp/AcpFileHandler.ts b/packages/vscode-ide-companion/src/acp/acpFileHandler.ts similarity index 100% rename from packages/vscode-ide-companion/src/acp/AcpFileHandler.ts rename to packages/vscode-ide-companion/src/acp/acpFileHandler.ts diff --git a/packages/vscode-ide-companion/src/acp/AcpMessageHandler.ts b/packages/vscode-ide-companion/src/acp/acpMessageHandler.ts similarity index 97% rename from packages/vscode-ide-companion/src/acp/AcpMessageHandler.ts rename to packages/vscode-ide-companion/src/acp/acpMessageHandler.ts index 51280575..08b59346 100644 --- a/packages/vscode-ide-companion/src/acp/AcpMessageHandler.ts +++ b/packages/vscode-ide-companion/src/acp/acpMessageHandler.ts @@ -19,8 +19,11 @@ import type { AcpPermissionRequest, } from '../shared/acpTypes.js'; import { CLIENT_METHODS } from './schema.js'; -import type { PendingRequest, AcpConnectionCallbacks } from './AcpTypes.js'; -import { AcpFileHandler } from './AcpFileHandler.js'; +import type { + PendingRequest, + AcpConnectionCallbacks, +} from './connectionTypes.js'; +import { AcpFileHandler } from './acpFileHandler.js'; import type { ChildProcess } from 'child_process'; /** diff --git a/packages/vscode-ide-companion/src/acp/AcpSessionManager.ts b/packages/vscode-ide-companion/src/acp/acpSessionManager.ts similarity index 99% rename from packages/vscode-ide-companion/src/acp/AcpSessionManager.ts rename to packages/vscode-ide-companion/src/acp/acpSessionManager.ts index 4f36d12d..f3ed296d 100644 --- a/packages/vscode-ide-companion/src/acp/AcpSessionManager.ts +++ b/packages/vscode-ide-companion/src/acp/acpSessionManager.ts @@ -17,7 +17,7 @@ import type { AcpResponse, } from '../shared/acpTypes.js'; import { AGENT_METHODS, CUSTOM_METHODS } from './schema.js'; -import type { PendingRequest } from './AcpTypes.js'; +import type { PendingRequest } from './connectionTypes.js'; import type { ChildProcess } from 'child_process'; /** diff --git a/packages/vscode-ide-companion/src/acp/AcpTypes.ts b/packages/vscode-ide-companion/src/acp/connectionTypes.ts similarity index 100% rename from packages/vscode-ide-companion/src/acp/AcpTypes.ts rename to packages/vscode-ide-companion/src/acp/connectionTypes.ts diff --git a/packages/vscode-ide-companion/src/agents/QwenAgentManager.ts b/packages/vscode-ide-companion/src/agents/qwenAgentManager.ts similarity index 95% rename from packages/vscode-ide-companion/src/agents/QwenAgentManager.ts rename to packages/vscode-ide-companion/src/agents/qwenAgentManager.ts index 99d8fefd..702e0535 100644 --- a/packages/vscode-ide-companion/src/agents/QwenAgentManager.ts +++ b/packages/vscode-ide-companion/src/agents/qwenAgentManager.ts @@ -1,10 +1,10 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ -import { AcpConnection } from '../acp/AcpConnection.js'; +import { AcpConnection } from '../acp/acpConnection.js'; import type { AcpSessionUpdate, AcpPermissionRequest, @@ -12,16 +12,16 @@ import type { import { QwenSessionReader, type QwenSession, -} from '../services/QwenSessionReader.js'; -import type { AuthStateManager } from '../auth/AuthStateManager.js'; +} from '../services/qwenSessionReader.js'; +import type { AuthStateManager } from '../auth/authStateManager.js'; import type { ChatMessage, PlanEntry, ToolCallUpdateData, QwenAgentCallbacks, } from './QwenTypes.js'; -import { QwenConnectionHandler } from './QwenConnectionHandler.js'; -import { QwenSessionUpdateHandler } from './QwenSessionUpdateHandler.js'; +import { QwenConnectionHandler } from './qwenConnectionHandler.js'; +import { QwenSessionUpdateHandler } from './qwenSessionUpdateHandler.js'; // 重新导出类型以保持向后兼容 export type { ChatMessage, PlanEntry, ToolCallUpdateData }; diff --git a/packages/vscode-ide-companion/src/agents/QwenConnectionHandler.ts b/packages/vscode-ide-companion/src/agents/qwenConnectionHandler.ts similarity index 97% rename from packages/vscode-ide-companion/src/agents/QwenConnectionHandler.ts rename to packages/vscode-ide-companion/src/agents/qwenConnectionHandler.ts index efa98f29..baeec815 100644 --- a/packages/vscode-ide-companion/src/agents/QwenConnectionHandler.ts +++ b/packages/vscode-ide-companion/src/agents/qwenConnectionHandler.ts @@ -11,9 +11,9 @@ */ import * as vscode from 'vscode'; -import type { AcpConnection } from '../acp/AcpConnection.js'; -import type { QwenSessionReader } from '../services/QwenSessionReader.js'; -import type { AuthStateManager } from '../auth/AuthStateManager.js'; +import type { AcpConnection } from '../acp/acpConnection.js'; +import type { QwenSessionReader } from '../services/qwenSessionReader.js'; +import type { AuthStateManager } from '../auth/authStateManager.js'; /** * Qwen连接处理器类 diff --git a/packages/vscode-ide-companion/src/agents/QwenSessionUpdateHandler.ts b/packages/vscode-ide-companion/src/agents/qwenSessionUpdateHandler.ts similarity index 100% rename from packages/vscode-ide-companion/src/agents/QwenSessionUpdateHandler.ts rename to packages/vscode-ide-companion/src/agents/qwenSessionUpdateHandler.ts diff --git a/packages/vscode-ide-companion/src/agents/QwenTypes.ts b/packages/vscode-ide-companion/src/agents/qwenTypes.ts similarity index 100% rename from packages/vscode-ide-companion/src/agents/QwenTypes.ts rename to packages/vscode-ide-companion/src/agents/qwenTypes.ts diff --git a/packages/vscode-ide-companion/src/auth/AuthStateManager.ts b/packages/vscode-ide-companion/src/auth/authStateManager.ts similarity index 98% rename from packages/vscode-ide-companion/src/auth/AuthStateManager.ts rename to packages/vscode-ide-companion/src/auth/authStateManager.ts index 6cc056d3..23d00ae0 100644 --- a/packages/vscode-ide-companion/src/auth/AuthStateManager.ts +++ b/packages/vscode-ide-companion/src/auth/authStateManager.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ diff --git a/packages/vscode-ide-companion/src/extension.ts b/packages/vscode-ide-companion/src/extension.ts index 192b4974..8588b98d 100644 --- a/packages/vscode-ide-companion/src/extension.ts +++ b/packages/vscode-ide-companion/src/extension.ts @@ -15,7 +15,7 @@ import { type IdeInfo, } from '@qwen-code/qwen-code-core/src/ide/detect-ide.js'; import { WebViewProvider } from './WebViewProvider.js'; -import { AuthStateManager } from './auth/AuthStateManager.js'; +import { AuthStateManager } from './auth/authStateManager.js'; const CLI_IDE_COMPANION_IDENTIFIER = 'qwenlm.qwen-code-vscode-ide-companion'; const INFO_MESSAGE_SHOWN_KEY = 'qwenCodeInfoMessageShown'; diff --git a/packages/vscode-ide-companion/src/services/QwenSessionReader.ts b/packages/vscode-ide-companion/src/services/qwenSessionReader.ts similarity index 99% rename from packages/vscode-ide-companion/src/services/QwenSessionReader.ts rename to packages/vscode-ide-companion/src/services/qwenSessionReader.ts index 03bfd6db..b9c7e84e 100644 --- a/packages/vscode-ide-companion/src/services/QwenSessionReader.ts +++ b/packages/vscode-ide-companion/src/services/qwenSessionReader.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ diff --git a/packages/vscode-ide-companion/src/shared/acpTypes.ts b/packages/vscode-ide-companion/src/shared/acpTypes.ts index ad8e19af..706f4c3c 100644 --- a/packages/vscode-ide-companion/src/shared/acpTypes.ts +++ b/packages/vscode-ide-companion/src/shared/acpTypes.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ diff --git a/packages/vscode-ide-companion/src/storage/ConversationStore.ts b/packages/vscode-ide-companion/src/storage/conversationStore.ts similarity index 96% rename from packages/vscode-ide-companion/src/storage/ConversationStore.ts rename to packages/vscode-ide-companion/src/storage/conversationStore.ts index 13733595..3940d11c 100644 --- a/packages/vscode-ide-companion/src/storage/ConversationStore.ts +++ b/packages/vscode-ide-companion/src/storage/conversationStore.ts @@ -1,11 +1,11 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import type * as vscode from 'vscode'; -import type { ChatMessage } from '../agents/QwenAgentManager.js'; +import type { ChatMessage } from '../agents/qwenAgentManager.js'; export interface Conversation { id: string; diff --git a/packages/vscode-ide-companion/src/utils/CliDetector.ts b/packages/vscode-ide-companion/src/utils/cliDetector.ts similarity index 100% rename from packages/vscode-ide-companion/src/utils/CliDetector.ts rename to packages/vscode-ide-companion/src/utils/cliDetector.ts diff --git a/packages/vscode-ide-companion/src/webview/App.tsx b/packages/vscode-ide-companion/src/webview/App.tsx index ccb083bd..55bd7ad8 100644 --- a/packages/vscode-ide-companion/src/webview/App.tsx +++ b/packages/vscode-ide-companion/src/webview/App.tsx @@ -6,7 +6,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { useVSCode } from './hooks/useVSCode.js'; -import type { Conversation } from '../storage/ConversationStore.js'; +import type { Conversation } from '../storage/conversationStore.js'; import { PermissionRequest, type PermissionOption, diff --git a/packages/vscode-ide-companion/src/webview/hooks/useVSCode.ts b/packages/vscode-ide-companion/src/webview/hooks/useVSCode.ts index f9d73448..05756bda 100644 --- a/packages/vscode-ide-companion/src/webview/hooks/useVSCode.ts +++ b/packages/vscode-ide-companion/src/webview/hooks/useVSCode.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ diff --git a/packages/vscode-ide-companion/src/webview/index.tsx b/packages/vscode-ide-companion/src/webview/index.tsx index 05f49c63..b7c7a00c 100644 --- a/packages/vscode-ide-companion/src/webview/index.tsx +++ b/packages/vscode-ide-companion/src/webview/index.tsx @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */