feat:修改日志记录时间为10分钟、永久#233
Merged
Merged
Conversation
added 2 commits
April 29, 2026 14:48
**修改功能总结** 新增从上游服务自动获取模型列表的功能,支持 openai、anthropic、gemini 等 provider,并在上游配置编辑器中添加获取按钮。 **改动文件(共4个)** - src-tauri/src/commands/proxy.rs - src-tauri/src/lib.rs - src-tauri/src/commands/mod.rs - src/features/config/cards/upstreams/editor-dialog-form.tsx **详细修改内容** **src-tauri/src/commands/proxy.rs** - 新增 `fetch_upstream_models` 异步命令函数 - 根据 provider 类型构建不同的模型列表请求 URL - 添加 Bearer token 认证支持 - 解析 openai 风格的 `data[].id` 字段 - 添加 anthropic/gemini 的 `models` 字段解析和 `modelNames` 字段解析作为备选 **src-tauri/src/lib.rs** - 导入 `fetch_upstream_models` 命令 - 在 Tauri 命令注册中添加 `fetch_upstream_models` - 格式化导入语句整理 **src-tauri/src/commands/mod.rs** - 导出 `fetch_upstream_models` 函数 **src/features/config/cards/upstreams/editor-dialog-form.tsx** - 导入 `Loader2`、`RefreshCw` 图标和 `useState` hook - 添加 `fetching` 和 `fetchError` 状态管理 - 新增 `handleFetchModels` 函数实现模型列表获取逻辑 - 在模型映射区域添加刷新按钮 - 添加错误提示显示和加载动画
Owner
|
有冲突 |
Contributor
Author
解了解了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
方便调试开发