feat: 添加Gemini定价功能和界面优化

- 实现Gemini定价查询服务,支持实时计算token成本
- 改进API Key管理界面,添加模型快速选择功能
- 优化账户表单组件的渲染性能
- 更新Gemini账户服务,增强token刷新和错误处理

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shaw
2025-08-06 18:09:19 +08:00
parent d6ba97381d
commit b1ea32caba
5 changed files with 214 additions and 14 deletions

View File

@@ -1288,9 +1288,13 @@ const handleGroupRefresh = async () => {
}
// 监听平台变化,重置表单
watch(() => form.value.platform, (newPlatform) => {
watch(() => form.value.platform, (newPlatform, oldPlatform) => {
// 处理添加方式的自动切换
if (newPlatform === 'claude-console') {
form.value.addType = 'manual' // Claude Console 只支持手动模式
} else if (oldPlatform === 'claude-console' && (newPlatform === 'claude' || newPlatform === 'gemini')) {
// 从 Claude Console 切换到其他平台时,恢复为 OAuth
form.value.addType = 'oauth'
}
// 平台变化时,清空分组选择