chore: 工作台产品化进行中的改动
把工作区里其余在制品一并入库,主要是工作台产品化的推进:
后端:新增 capability_definition / project / my_app_center / office_skill
接口与 action_definition / skill_definition / project / user_app_center
模型,config 加路由健康上报。
前端:新增 frontend/src/skills(Office 技能与 workbuddy 复刻)、
项目管理、应用中心、能力目录页,以及配套 api / store / config;
聊天侧新增 SpecialistChip / SpecialistPanel / SkillStrip / AppChatRail
等组件。
清理:移除旧 views/tools 下的单页工具(已并入工作台)、_frozen 冻结组件、
cmd/inspect_oa_debug 调试入口,以及两份调试笔记。
其它:文档与启动脚本同步。
(这批改动与上一提交的 SY23 工作并行进行,此前已在同一工作区内交织。)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
export function formatAiRouteShortLabel(aiRoute) {
|
||||
if (!aiRoute) return '未设置'
|
||||
if (aiRoute.ai_route_id === 'chat_route_auto' || aiRoute.ai_route_id === 'embed_route_auto') {
|
||||
return '自动'
|
||||
}
|
||||
|
||||
const shortRouteName = (aiRoute.short_route_name || '').trim()
|
||||
const shortModelName = (aiRoute.short_model_name || '').trim()
|
||||
if (shortRouteName && shortModelName) {
|
||||
return `${shortRouteName}/${shortModelName}`
|
||||
}
|
||||
if (shortModelName) return shortModelName
|
||||
if (shortRouteName) return shortRouteName
|
||||
|
||||
const model = (aiRoute.model || '').split('/').pop() || ''
|
||||
const modelShort = model
|
||||
.replace(/text-embedding-3-small/gi, 'Emb3')
|
||||
.replace(/deepseek-v4-flash/gi, 'DS4F')
|
||||
.replace(/deepseek-v3.2/gi, 'DSV3')
|
||||
.replace(/gpt-5.4-image-2/gi, 'G图2')
|
||||
.replace(/gpt-5.4/gi, 'GPT5')
|
||||
.replace(/grok-4.20/gi, 'Grok4')
|
||||
.replace(/qwen2.5:7b/gi, 'Qwen')
|
||||
.replace(/bge-m3/gi, 'BGE')
|
||||
.trim()
|
||||
|
||||
return modelShort || aiRoute.description || aiRoute.ai_route_id || '未设置'
|
||||
}
|
||||
|
||||
export function formatAiRouteTitle(aiRoute) {
|
||||
if (!aiRoute) return '未设置'
|
||||
if (aiRoute.ai_route_id === 'chat_route_auto' || aiRoute.ai_route_id === 'embed_route_auto') {
|
||||
const resolved = aiRoute.resolved_ai_route_id || ''
|
||||
const detail = aiRoute.description || resolved || '自动选择当前最优可用模型'
|
||||
return `自动 · ${detail}`
|
||||
}
|
||||
const shortLabel = formatAiRouteShortLabel(aiRoute)
|
||||
const detail = aiRoute.description || [aiRoute.provider, aiRoute.model].filter(Boolean).join(' / ') || aiRoute.ai_route_id
|
||||
return shortLabel === detail ? detail : `${shortLabel} · ${detail}`
|
||||
}
|
||||
Reference in New Issue
Block a user