From f5dd7534f08cd3d658012da7a890306a57848010 Mon Sep 17 00:00:00 2001 From: Roe-xin Date: Tue, 10 Mar 2026 14:13:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B0=86=E6=A8=A1=E5=9E=8B=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E5=9B=BA=E5=AE=9A=E4=B8=BAmax=E6=A8=A1=E5=9E=8B=20-?= =?UTF-8?q?=20=E5=B9=B6=E4=B8=94=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E4=B8=8A=E5=8E=BB=E6=98=BE=E7=A4=BA=E2=80=9CIC=20Coder?= =?UTF-8?q?=E8=87=AA=E7=A0=94=E9=A1=B6=E5=B0=96=E5=BE=AE=E8=B0=83=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modelSelector.ts | 189 ++----------------------------------- 1 file changed, 10 insertions(+), 179 deletions(-) diff --git a/src/views/modelSelector.ts b/src/views/modelSelector.ts index fdd7a37..e6ba9c1 100644 --- a/src/views/modelSelector.ts +++ b/src/views/modelSelector.ts @@ -9,66 +9,16 @@ export function getModelSelectorContent( autoIcon: string = "", liteIcon: string = "", syIcon: string = "", - maxIcon: string = "" + maxIcon: string = "", ): string { return `
-
-
- Auto - - - -
-
-
- ${ - autoIcon - ? `Auto` - : "" - } -
- Auto - 智能匹配最优模型 -
-
-
- ${ - liteIcon - ? `Lite` - : "" - } -
- Lite - 基础模型,快速相应,适合简单任务 -
-
-
- ${ - syIcon - ? `Syntaxic` - : "" - } -
- Syntaxic - 均衡成本和性能,节省credits同时保持可靠输出 -
-
-
- ${ - maxIcon - ? `Max` - : "" - } -
- Max - 最强性能,质量优先,适合复杂任务 -
-
-
+
+ Max + Max
- 选择模型 + IC Coder自研顶尖微调模型
`; } @@ -78,72 +28,16 @@ export function getModelSelectorContent( */ export function getModelSelectorStyles(): string { return ` - /* 自定义下拉框样式 */ - .custom-select { - position: relative; - user-select: none; - } - .select-trigger { + .model-display { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--vscode-input-background); color: var(--vscode-foreground); - border: none; border-radius: 4px; - cursor: pointer; font-size: 12px; - transition: background 0.2s ease; - } - .select-trigger:hover { - background: var(--vscode-list-hoverBackground); - } - .select-value { - white-space: nowrap; - } - .select-arrow { - width: 12px; - height: 12px; - flex-shrink: 0; - transition: transform 0.2s ease; - } - .custom-select.active .select-arrow { - transform: rotate(180deg); - } - .select-dropdown { - position: absolute; - bottom: calc(100% + 2px); - left: 0; - min-width: 100%; - background: var(--vscode-dropdown-background); - border: 1px solid var(--vscode-dropdown-border); - border-radius: 4px; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); - z-index: 1100; - display: none; - overflow: visible; - } - .custom-select.active .select-dropdown { - display: block; - } - /* 模型选择器的选项样式 */ - #modelDropdown .select-option { - position: relative; - padding: 8px 12px; - cursor: pointer; - transition: background 0.2s ease; - display: flex; - flex-direction: row; - align-items: center; - gap: 10px; - } - #modelDropdown .select-option:hover { - background: rgba(128, 128, 128, 0.3); - } - #modelDropdown .select-option.selected { - background: rgba(128, 128, 128, 0.5); - color: var(--vscode-foreground); + cursor: default; } .model-icon { width: 16px; @@ -151,21 +45,7 @@ export function getModelSelectorStyles(): string { flex-shrink: 0; object-fit: contain; } - .option-content { - display: flex; - flex-direction: column; - gap: 2px; - flex: 1; - } - .option-label { - font-size: 13px; - color: var(--vscode-foreground); - font-weight: 500; - white-space: nowrap; - } - .option-desc { - font-size: 11px; - color: var(--vscode-descriptionForeground); + .model-label { white-space: nowrap; } `; @@ -176,58 +56,9 @@ export function getModelSelectorStyles(): string { */ export function getModelSelectorScript(): string { return ` - // 模型选择相关变量 - let currentModel = 'auto'; - - // 切换模型下拉框显示/隐藏 - function toggleModelDropdown() { - const modelSelect = document.getElementById('modelSelect'); - const customSelect = document.getElementById('customSelect'); - if (modelSelect) { - modelSelect.classList.toggle('active'); - // 关闭模式下拉框 - if (customSelect) { - customSelect.classList.remove('active'); - } - } - } - - // 选择模型 - function selectModel(value, label) { - currentModel = value; - const modelValue = document.getElementById('modelValue'); - if (modelValue) { - modelValue.textContent = label; - } - - // 更新选中状态 - const options = document.querySelectorAll('#modelDropdown .select-option'); - options.forEach(option => { - if (option.getAttribute('data-value') === value) { - option.classList.add('selected'); - } else { - option.classList.remove('selected'); - } - }); - - // 关闭下拉框 - const modelSelect = document.getElementById('modelSelect'); - if (modelSelect) { - modelSelect.classList.remove('active'); - } - } - - // 点击外部关闭模型下拉框 - document.addEventListener('click', (event) => { - const modelSelect = document.getElementById('modelSelect'); - if (modelSelect && !modelSelect.contains(event.target)) { - modelSelect.classList.remove('active'); - } - }); - - // 获取当前选中的模型 + // 获取当前选中的模型(固定为 max) function getCurrentModel() { - return currentModel; + return 'max'; } `; }