- 26 Dec, 2025 37 commits
-
-
ianshaw authored
CreateAccountModal: - 检测 AI Studio OAuth 是否可用(服务器配置了自定义 OAuth 客户端) - 未配置时禁用 AI Studio 选项并显示提示 - 添加悬停提示说明配置要求 ReAuthAccountModal: - 同步 AI Studio OAuth 可用性检测逻辑 - 未配置时自动回退到 Code Assist
-
ianshaw authored
- 添加 GeminiOAuthCapabilities 类型定义 - 添加 getCapabilities API 函数 - useGeminiOAuth composable 导出 getCapabilities 方法
-
ianshaw authored
Handler 改进: - 添加 GET /api/v1/admin/gemini/oauth/capabilities 接口 - 简化 GenerateAuthURL,redirect_uri 由服务层决定 Repository 改进: - ExchangeCode/RefreshToken 根据 oauthType 选择正确的 OAuth 客户端 - Code Assist 始终使用内置客户端,AI Studio 使用用户配置的客户端
-
ianshaw authored
OAuth 服务改进: - 添加 GetOAuthConfig 返回 AI Studio OAuth 可用性 - Code Assist 强制使用内置 Gemini CLI 客户端 - AI Studio OAuth 要求用户配置自定义 OAuth 客户端 - ExchangeCode/RefreshToken 接口添加 oauthType 参数 - 添加 unauthorized_client 错误的向后兼容重试逻辑 兼容层改进: - 403 重试逻辑仅对 Code Assist OAuth 生效 - 添加 insufficient-scope 错误检测,避免无效重试 - 上游错误消息脱敏处理(隐藏 API key 等敏感信息) - 改进错误提示,显示更多上游错误详情
-
ianshaw authored
- 添加 GeminiCLIOAuthClientID/Secret 常量(Gemini CLI 公开 OAuth 客户端) - 更新 DefaultAIStudioScopes 使用 generative-language.retriever(符合 Google 文档) - EffectiveOAuthConfig 支持自动回退到内置客户端 - 内置客户端自动过滤受限 scope(如 generative-language) - 添加 scope 向后兼容性处理
-
ianshaw authored
适配 main 分支的 ports 目录删除重构: - 将 ports 包中的接口移至 service 包 - 更新 repository 层的导入路径
-
ianshaw authored
- gofmt: 修复 account_handler.go, models.go, gemini_messages_compat_service.go 的格式 - staticcheck ST1005: 将 error strings 改为小写开头
-
ianshaw authored
- gofmt: 修复代码格式问题 - errcheck: 处理 WriteString 和 Close 返回值 - staticcheck: 错误信息改为小写开头 - staticcheck: 移除无效的 nil 检查 - staticcheck: 使用 append 替换循环 - staticcheck: 使用无条件的 TrimPrefix - ineffassign: 移除无效赋值 - unused: 移除未使用的 geminiOAuthService 字段 - 重新生成 wire_gen.go
-
ianshaw authored
- .env.example: 新增 Gemini OAuth 环境变量配置示例 - config.example.yaml: 新增 Gemini OAuth 配置示例 - README.md: 更新部署文档 - docker-compose.yml: 添加 Gemini OAuth 环境变量传递
-
ianshaw authored
- zh.ts: 添加中文翻译(Code Assist/AI Studio 选择等) - en.ts: 添加英文翻译
-
ianshaw authored
- CreateAccountModal.vue: 新增 OAuth 类型选择 UI - ReAuthAccountModal.vue: 重授权支持选择类型 - OAuthAuthorizationFlow.vue: 新增 Project ID 输入框 - AccountTestModal.vue: Gemini 模型默认选择优化 - useGeminiOAuth.ts: OAuth 逻辑参数变更 - gemini.ts: API 调用更新
-
ianshaw authored
- 新增 gemini_v1beta_handler.go: 代理原生 Google API 格式 - 更新 gemini_oauth_handler.go: 移除 redirectUri,新增 oauthType - 更新 account_handler.go: 账户 Handler 增强 - 更新 router.go: 注册 v1beta 路由 - 更新 config.go: Gemini OAuth 通过环境变量配置 - 更新 wire_gen.go: 依赖注入
-
ianshaw authored
- gemini_oauth_service.go: 新增 AI Studio OAuth 类型支持 - gemini_token_provider.go: Token 提供器增强 - gemini_messages_compat_service.go: 支持 AI Studio 端点 - account_test_service.go: Gemini 账户可用性检测 - gateway_service.go: 网关服务适配 - openai_gateway_service.go: OpenAI 兼容层调整
-
ianshaw authored
- 更新 gemini_oauth_client.go: 支持 AI Studio OAuth 客户端 - 更新 geminicli_codeassist_client.go: 适配新的认证流程
-
ianshaw authored
- 新增 api_key_auth_google.go: 支持 x-goog-api-key 格式认证 - 更新 api_key_auth.go: 适配 Gemini 原生 API 格式
-
ianshaw authored
- 新增 pkg/gemini: 模型定义与回退列表 - 新增 pkg/googleapi: Google API 错误状态处理 - 新增 pkg/geminicli/models.go: CLI 模型结构 - 更新 constants.go: AI Studio 相关常量 - 更新 oauth.go: 支持 AI Studio OAuth 流程,凭据通过环境变量配置
-
ianshaw authored
添加 backend/.gocache/ 到忽略列表
-
ianshaw authored
- 更新 package-lock.json 依赖版本 - 优化 Vite、PostCSS、Tailwind 配置 - 更新入口 HTML 文件 - 更新 TypeScript 构建缓存
-
ianshaw authored
- Composables: 优化 OAuth 相关 hooks 代码格式 - Stores: 规范状态管理模块格式 - Types: 统一类型定义格式 - Utils: 优化工具函数格式 - App.vue & style.css: 调整全局样式和主组件格式
-
ianshaw authored
- 移除语句末尾分号,规范代码格式 - 优化组件结构和类型定义 - 改进视图文档和示例 - 提升代码一致性
-
ianshaw authored
- 移除所有语句末尾分号 - 统一对象属性尾随逗号格式 - 优化类型定义导入顺序 - 提升代码一致性和可读性
-
ianshaw authored
- 新增 /auth/callback 路由用于接收 OAuth 授权回调 - 优化路由配置和文档 - 统一代码格式
-
ianshaw authored
- 新增中文 Gemini OAuth 相关翻译(步骤说明、错误提示等) - 新增英文 Gemini OAuth 相关翻译 - 添加 Gemini 账号类型、平台名称等基础翻译 - 优化代码格式
-
ianshaw authored
- 统一移除语句末尾分号,规范代码格式 - 优化组件类型定义和 props 声明 - 改进组件文档和示例代码 - 提升代码可读性和一致性
-
ianshaw authored
- CreateAccountModal: 添加 Gemini 平台选项和 OAuth 授权流程 - EditAccountModal: 支持 Gemini 账号编辑 - OAuthAuthorizationFlow: 新增 Gemini 平台 OAuth 流程处理(支持 state 参数) - ReAuthAccountModal: 支持 Gemini 账号重新授权 - 优化代码格式和组件逻辑
-
ianshaw authored
- 新增 /admin/gemini API 接口封装(generateAuthUrl, exchangeCode) - 新增 useGeminiOAuth composable 处理 Gemini OAuth 流程 - 新增 OAuthCallbackView 视图用于接收 OAuth 回调 - 支持 code/state 参数提取和 credentials 构建
-
ianshaw authored
- 修复 account_handler 中 token 字段类型转换(int64 转 string) - 增强 Account.GetCredential 支持多种数值类型(float64, int, json.Number 等) - 添加 Account.IsGemini() 方法用于平台判断 - 优化 refresh_token 和 scope 的空值处理
-
ianshaw authored
- 新增 Gemini OAuth 授权处理器 - 扩展账号和网关处理器支持 Gemini - 注册 Gemini 相关路由 - 更新 Wire 依赖注入配置(所有层) - 更新 Docker Compose 配置
-
ianshaw authored
- CRS 同步服务新增 Gemini 账号同步逻辑(+273行) - 定价服务扩展 Gemini 模型定价计算(+99行) - 更新 Token 刷新服务集成 Gemini - 更新相关单元测试
-
ianshaw authored
- 实现 OAuth 授权流程服务 - 添加 Token 提供者和自动刷新机制 - 实现 Gemini Messages API 兼容层 - 更新服务容器注册
-
ianshaw authored
- 定义 OAuth 服务接口 - 定义 Token 缓存服务接口 - 定义 Code Assist 服务接口
-
ianshaw authored
- 添加 Gemini OAuth 客户端实现 - 实现 Redis 基础的 Token 缓存 - 添加 gemini-cli Code Assist 客户端封装
-
ianshaw authored
- 添加 Gemini OAuth 配置结构 - 实现 geminicli 包(OAuth、Token、CodeAssist 类型) - 更新配置示例文件
-
shaw authored
-
shaw authored
-
Forest authored
-
NepetaLemon authored
* refactor: 自定义业务错误 * refactor: 隐藏服务器错误与统一 panic 响应
-
- 25 Dec, 2025 3 commits