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:
eaiadmin
2026-09-17 21:32:35 +08:00
co-authored by Claude Code
parent 8b136d4a10
commit 16d63de4e1
180 changed files with 22283 additions and 13850 deletions
@@ -22,9 +22,16 @@ import (
"eai_agentplatform/backend/internal/web"
)
var allowedExt = map[string]bool{
"ppt": true, "pptx": true, "pdf": true, "doc": true, "docx": true,
"mp4": true, "png": true, "jpg": true, "jpeg": true,
var blockedUploadExt = map[string]bool{
"exe": true, "bin": true, "dll": true, "so": true, "dylib": true,
"msi": true, "apk": true, "ipa": true, "deb": true, "rpm": true, "pkg": true, "appimage": true,
"bat": true, "cmd": true, "com": true, "scr": true, "sys": true, "drv": true,
"ps1": true, "psm1": true, "vbs": true, "vbe": true, "js": true, "jse": true, "wsf": true, "wsh": true,
"reg": true, "lnk": true, "iso": true, "img": true, "dmg": true,
}
var videoExt = map[string]bool{
"mp4": true, "mov": true, "avi": true, "mkv": true, "webm": true, "m4v": true, "wmv": true, "flv": true,
}
var validBindType = map[string]bool{"company": true, "product": true, "course": true, "none": true}
@@ -44,8 +51,20 @@ func extOf(filename string) string {
return strings.ToLower(strings.TrimPrefix(filepath.Ext(filename), "."))
}
func isUploadableExt(ext string) bool {
normalized := strings.ToLower(strings.TrimSpace(ext))
if normalized == "" {
return false
}
return !blockedUploadExt[normalized]
}
func isVideoExt(ext string) bool {
return videoExt[strings.ToLower(strings.TrimSpace(ext))]
}
func sizeLimitFor(ext string) int64 {
if ext == "mp4" {
if isVideoExt(ext) {
return Cfg.FileMaxVideo
}
return Cfg.FileMaxDoc
@@ -116,11 +135,11 @@ func Upload(c *gin.Context) {
defer file.Close()
ext := extOf(header.Filename)
if !allowedExt[ext] {
if !isUploadableExt(ext) {
web.Fail(c, web.NewBadRequest("不支持的文件类型"))
return
}
if ext == "mp4" && header.Size > Cfg.ChunkThreshold {
if isVideoExt(ext) && header.Size > Cfg.ChunkThreshold {
web.Fail(c, web.NewBadRequest("视频超过 100MB 请使用分片上传"))
return
}
@@ -213,7 +232,7 @@ func UploadInit(c *gin.Context) {
return
}
ext := extOf(req.Filename)
if !allowedExt[ext] {
if !isUploadableExt(ext) {
web.Fail(c, web.NewBadRequest("不支持的文件类型"))
return
}