前台8项体验修复: 知识库上传自动刷新; 资产PDF归类; Token驾驶舱媒体统计; AI模糊意图澄清选择; ChatPage增加MCP/附件上传/语音; 技能市场安装态修复+清理演示数据; MCP协议应用改名MCP应用; Agent单应用接入(名称/介绍/API Key)

This commit is contained in:
QihuAI Design committed 2026-07-15 10:33:43 +08:00
1 parent 463824480b
commit bc2899ed09
11 files changed
+945 -154

No files matched your search

+5 -1
View File
@@ -58,6 +58,7 @@ class UploadAppRequest(BaseModel):
is_member_free: Optional[bool] = False
join_promotion: Optional[bool] = False
agent_endpoint: Optional[str] = None
api_key: Optional[str] = None
class PurchaseAppRequest(BaseModel):
@@ -119,6 +120,8 @@ def list_apps(
result = []
for app in apps:
# 用户自己创建/导入的应用应始终视为已安装(避免安装记录缺失导致显示未安装)
is_user_owned = bool(user_id) and app.source == "user" and app.publisher_id == user_id
item = {
"id": app.id,
"name": app.name,
@@ -136,7 +139,7 @@ def list_apps(
"rating_avg": float(app.rating_avg) if app.rating_avg else 0,
"review_count": app.review_count or 0,
"created_at": str(app.created_at) if app.created_at else None,
"installed": app.id in installed_app_ids if user_id else False,
"installed": (app.id in installed_app_ids or is_user_owned) if user_id else False,
}
result.append(item)
@@ -222,6 +225,7 @@ def upload_app(
is_member_free=req.is_member_free if req.is_member_free is not None else False,
join_promotion=req.join_promotion if req.join_promotion is not None else False,
agent_endpoint=req.agent_endpoint,
agent_api_key=req.api_key,
status="published", # 用户创建的应用直接发布
created_at=datetime.now(),
updated_at=datetime.now(),