feat: Token映射配置增强 + 模型详情API + 编辑器布局优化

1. Token 映射下拉:
   - 新增 flattenWrappedFields 函数递归提取 { type, attrs } 结构中的叶子字段
   - 下拉选项显示 路径 — 标签 格式,选中值存完整路径
   - 同步/流式从响应映射取,异步从回调响应映射取

2. 模型详情 API:
   - 新增 getModelManage 详情接口 (/model/manage/getModelManage)
   - openDialog 改为 async,编辑时调详情接口获取完整数据
   - 修复 res.data.modelManage 取值路径

3. JSON 编辑器布局:
   - 弹窗宽度 1000px → 1200px
   - 配置侧栏 320px → 380px
   - config-summary 改用 flex:1 防止滚动条截断文本

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-17 14:45:53 +08:00
co-authored by Claude
parent 51b5008951
commit bf1e9fa89a
6 changed files with 99 additions and 35 deletions
+18
View File
@@ -174,6 +174,24 @@ export interface UpdateModelManageParams extends Partial<CreateModelManageParams
id: string;
}
/** 详情响应 */
export interface ModelManageDetailResponse {
code: number;
message: string;
data: ModelManageItem;
}
/**
* 获取模型配置详情
*/
export function getModelManage(id: string) {
return request({
url: '/model-gateway/model/manage/getModelManage',
method: 'get',
params: { id },
});
}
/**
* 创建模型配置
*/