feat:新增会话历史列表样式 + 新开会话功能

- 还优化了页面的样式,删除了读取文件的以及没用的文本
This commit is contained in:
Roe-xin
2025-12-17 09:48:45 +08:00
parent f2382a8eed
commit f18ca4fb9c
3 changed files with 399 additions and 36 deletions

View File

@ -13,12 +13,12 @@ import { VCDViewerPanel } from "./VCDViewerPanel";
/**
* 创建并显示 IC 助手面板
*/
export function showICHelperPanel(context: vscode.ExtensionContext) {
export function showICHelperPanel(context: vscode.ExtensionContext, viewColumn?: vscode.ViewColumn) {
// 创建WebView面板
const panel = vscode.window.createWebviewPanel(
"icCoder", // 面板ID
"IC Coder", // 面板标题
vscode.ViewColumn.Beside, // 显示在旁边
viewColumn || vscode.ViewColumn.Beside, // 默认显示在旁边,但可以指定
{
enableScripts: true,
retainContextWhenHidden: true,
@ -74,6 +74,20 @@ export function showICHelperPanel(context: vscode.ExtensionContext) {
getVCDFileInfo(panel, message.vcdFilePath, message.containerId);
}
break;
case "createNewConversation":
// 创建新会话 - 在当前编辑器组中打开新标签页
showICHelperPanel(context, panel.viewColumn);
break;
case "loadConversationHistory":
// 加载会话历史(暂未实现)
panel.webview.postMessage({
command: 'conversationHistory',
history: []
});
break;
case "selectConversation":
// 选择会话(暂未实现)
break;
}
},
undefined,