Files
qwen-code/packages/vscode-ide-companion/src/webview/components/EmptyState.tsx
yiliang114 5a9f5e3432 fix(vscode-ide-companion): 修复新建会话按钮,在同一 view column 创建新 tab
问题:
- 之前的实现会复用现有 panel 并清空当前会话
- 期望行为是在同一 view column(不创建分屏)中创建新的 VS Code tab

解决方案:
1. 修改 qwenCode.openNewChatTab 命令
   - 总是创建新的 WebviewProvider 和 WebviewPanel
   - PanelManager 的 findExistingQwenCodeViewColumn() 确保在同一 column 打开
2. 修改 MessageHandler 中的 openNewChatTab 处理
   - 调用 VS Code 命令创建新 panel/tab
3. 移除不再需要的 createNewSession 方法

效果:
- 点击新建会话按钮会在同一 view column 中创建新的 VS Code tab
- 类似 Claude Code 的交互方式
- 不会创建新的分屏

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 23:14:40 +08:00

36 lines
912 B
TypeScript

/**
* @license
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/
import type React from 'react';
import './EmptyState.css';
import { generateIconUrl } from '../utils/resourceUrl.js';
export const EmptyState: React.FC = () => {
// Generate icon URL using the utility function
const iconUri = generateIconUrl('icon.png');
return (
<div className="empty-state">
<div className="empty-state-content">
{/* Qwen Logo */}
<div className="empty-state-logo">
<img
src={iconUri}
alt="Qwen Logo"
className="empty-state-logo-image"
/>
<div className="empty-state-text">
<div className="empty-state-title">
What to do first? Ask about this codebase or we can start writing
code.
</div>
</div>
</div>
</div>
</div>
);
};