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'; } `; }