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
+2 -41
View File
@@ -43,34 +43,14 @@ export async function streamChat(message, context, history, handlers) {
const onChunk = typeof handlers === 'function' ? handlers : handlers?.onChunk
const onMeta = typeof handlers === 'function' ? null : handlers?.onMeta
const onDone = typeof handlers === 'function' ? null : handlers?.onDone
const traceId = `chat-${Date.now()}`
// #region debug-point A:frontend-request
fetch('http://127.0.0.1:7777/event', {
method: 'POST',
body: JSON.stringify({
sessionId: 'knowledge-chat-401',
runId: 'pre-fix',
hypothesisId: 'A',
location: 'frontend/src/api/ai.js:streamChat:request',
traceId,
msg: '[DEBUG] streamChat request',
data: {
hasToken: Boolean(token),
url: '/api/ai-chat/message',
messagePreview: String(message || '').slice(0, 80),
spaceKey: context?.knowledge_space_key || '',
},
ts: Date.now(),
}),
}).catch(() => {})
// #endregion
const aiRouteId = typeof handlers === 'function' ? '' : (handlers?.aiRouteId || '')
const resp = await fetch('/api/ai-chat/message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({ message, context, history }),
body: JSON.stringify({ message, context, history, ai_route_id: aiRouteId }),
})
if (!resp.ok) {
@@ -83,25 +63,6 @@ export async function streamChat(message, context, history, handlers) {
} catch {
/* ignore */
}
// #region debug-point A:frontend-non200
fetch('http://127.0.0.1:7777/event', {
method: 'POST',
body: JSON.stringify({
sessionId: 'knowledge-chat-401',
runId: 'pre-fix',
hypothesisId: 'A',
location: 'frontend/src/api/ai.js:streamChat:non200',
traceId,
msg: '[DEBUG] streamChat non-200 response',
data: {
status: resp.status,
statusText: resp.statusText,
bodyPreview: String(raw || '').slice(0, 240),
},
ts: Date.now(),
}),
}).catch(() => {})
// #endregion
throw new Error(msg)
}