WeKnora/frontend/src/utils
nullptr-error 18d22b014b
feat(sandbox): expose tenant skill management over HTTP and in the console (#2789)
* feat(sandbox): enhance skill management in sandbox configurations

Updated the skill management system to allow listing, installing, and removing skills within sandbox configurations. The ListSkills function now accepts a sandboxConfigID to filter skills based on the selected configuration. Introduced a new SandboxSkillsDrawer component for managing skills through the UI, along with necessary updates to the API and localization files to support these features.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: keep skill maintenance sessions out of the console session list

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: store and expose the installer transcript locators

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: record the skill installer agent's conversation

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: stream and persist the installer transcript during a skill install

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: expose install transcript locators on the skill type

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: add the floating skill install transcript window

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: open the install transcript from the sandbox skills drawer

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(sandbox): 重构技能安装体验,支持内联时间线、编辑第4步及保留镜像指针

- 替换右下角浮窗为内联安装时间线 (SkillInstallTimeline.vue)
  - 新增 GET /api/v1/sandbox-configs/:id/skills/:skillId/transcript 接口,支持回放与追尾
  - 移除 /sessions/continue-stream 依赖,避免 404 问题
  - 事件日志以 install_prompt 开头,不再将工具调用 preamble 拼入最终答案
  - 删除 SkillInstallTranscript.vue,技能条目下可展开/折叠时间线

- 编辑向导新增第 4 步「管理技能」
  - Cube/E2B 环境:连接 → 模板 → 运行配置 → 技能(第4步)
  - Docker/Local 环境:无第4步(无快照镜像)
  - 首次创建必须按 1→2→3 顺序,第3步保存成功后自动进入第4步
  - 已有配置支持步骤条数字跳转,可直接访问任意步骤
  - 卡片菜单「管理技能」打开同一抽屉并定位至第4步
  - SandboxSkillsDrawer.vue 重命名为 SandboxSkillsPanel.vue,去除独立抽屉壳

- 修复保存运行配置时冲掉 skill_image 的问题
  - 顶部展示信息(基础模板/快照ID/版本/构建时间)读取 config.skill_image
  - 编辑器保存 payload 不再包含 skill_image,合并时保留已有 SkillImage 和 VolumeMount
  - MergeSandboxConfigForUpdate 增加对 SkillImage 和 VolumeMount 的保护
  - 已冲掉的配置需重新安装技能才能恢复镜像指针

- 「查看安装过程」在安装开始时即显示
  - 技能列表中出现「正在安装」状态即展示按钮
  - 若记录尚未写入,展示等待提示并自动重试,避免误报「没有留下记录」

* 沙盒内技能目录从 UUID 改成 SKILL.md 的 name。

* fix(sandbox): heal stuck skill rows and block planted maintenance sessions

The reaper left a mid-upgrade install spinning forever when the old snapshot was still live, and restored removals to ready after the pointer had already moved. Client session create/update can no longer hide chats behind the skill_maintenance: prefix.

* style: gofumpt the skill reaper test stubs

* style: satisfy golangci on the tenant skill admin API

* feat(sandbox): rebuild skill images at turn boundaries, not mid-exec

Hold a session turn lease through AgentQA so an install cannot tear down
the live sandbox between tool calls; the next turn's first resolve picks
up the new image. Configs can instead keep existing sandboxes and boot
the new snapshot only for new sessions.

* fix(sandbox): judge stuck skill runs from the snapshot chain

InstalledSnapshotID only records the generation that installed a skill; later
installs of other skills advance the live pointer without rewriting older rows.
Comparing those IDs made the reaper fail healthy installs and delete live
skills whose removal had stalled.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-08-25 11:28:12 +08:00
..
_repro_gap.mjs feat(frontend): enhance chat streaming visuals with shimmer effect and fade tail 2026-06-22 10:48:53 +08:00
agent-mode.test.mjs fix(agent): reconcile agent stream mode and shared-agent readiness UX 2026-06-25 23:33:39 +08:00
agent-mode.ts fix(agent): reconcile agent stream mode and shared-agent readiness UX 2026-06-25 23:33:39 +08:00
agent-readiness.test.mjs fix(agent): reconcile agent stream mode and shared-agent readiness UX 2026-06-25 23:33:39 +08:00
agent-readiness.ts fix(agent): reconcile agent stream mode and shared-agent readiness UX 2026-06-25 23:33:39 +08:00
agent-tool-display.test.mjs fix(chat): 兜底回答不再把原始命中数报成检索结果数 2026-08-13 21:34:21 +08:00
agent-tool-display.ts fix(chat): 兜底回答不再把原始命中数报成检索结果数 2026-08-13 21:34:21 +08:00
agent-tool-icons.ts feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
agentWebSearch.test.mjs fix: harden shared agent source permissions 2026-07-30 12:28:23 +08:00
agentWebSearch.ts fix: harden shared agent source permissions 2026-07-30 12:28:23 +08:00
api-base.ts feat(frontend): respect BASE_URL so the SPA works behind a path-prefix reverse proxy 2026-05-05 00:58:19 +08:00
attachmentParsingDisplay.test.mjs feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
attachmentParsingDisplay.ts feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
attachmentPreview.test.mjs feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
attachmentPreview.ts feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
card-list-badge.ts fix(frontend): hide redundant card badges when section headers apply 2026-06-26 16:55:44 +08:00
caret.ts feat: 支持输入框内选择知识库和文件,优化选择交互体验 2025-12-22 13:11:31 +08:00
chatMarkdownRenderer.test.ts fix(chat): enforce retrieved image output in answers 2026-07-15 18:10:31 +08:00
chatMarkdownRenderer.ts fix(chat): enforce retrieved image output in answers 2026-07-15 18:10:31 +08:00
chatMessageShared.ts fix(ui): 统一剪贴板复制为公共方法,HTTP 环境回退 execCommand 2026-08-12 15:38:01 +08:00
chatRequestDebug.ts feat(chat): add request info button and debug payload for stream requests 2026-06-04 15:48:04 +08:00
citationChunkCache.test.mjs feat(chat): add citation popover and chunk caching 2026-06-16 01:09:55 +08:00
citationChunkCache.ts feat(chat): add citation popover and chunk caching 2026-06-16 01:09:55 +08:00
citationMarkdown.ts feat(frontend): enhance chat markdown rendering and streaming behavior 2026-06-22 10:48:53 +08:00
clipboard.ts fix(ui): 统一剪贴板复制为公共方法,HTTP 环境回退 execCommand 2026-08-12 15:38:01 +08:00
cronHumanize.ts feat(datasource): implement data source management functionality 2026-03-30 20:46:07 +08:00
disable-autofill.ts feat(integrations): polish embed/IM channel editors and agent rebind 2026-06-24 20:09:19 +08:00
embedAllowedOrigins.ts feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
embedBaseUrl.ts feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
embedContext.ts feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
embedFile.ts feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
embedToast.ts feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
fileTypeVerification.test.ts fix(knowledge): support local HTML uploads 2026-07-29 20:11:17 +08:00
fileTypeVerification.ts fix(knowledge): support local HTML uploads 2026-07-29 20:11:17 +08:00
files.ts fix(frontend): knowledge document list layout, batch bar, and selection 2026-04-29 15:20:41 +08:00
finalAnswer.ts refactor(agent): remove final_answer tool references and update related logic 2026-06-04 15:48:04 +08:00
format-list.ts fix(agent): address readiness review findings 2026-06-25 23:33:39 +08:00
grepResultsGroup.test.mjs feat(chat): enhance references drawer behavior and citation handling 2026-07-17 10:19:43 +08:00
grepResultsGroup.ts feat(chat): enhance references drawer behavior and citation handling 2026-07-17 10:19:43 +08:00
index.ts feat(i18n): 前端默认语言支持经 DEFAULT_LOCALE 环境变量运行时配置 2026-08-12 10:49:04 +08:00
knowledgeChunksDisplay.test.mjs feat(chat): refactor agent stream display and tool result rendering 2026-06-16 01:21:19 +08:00
knowledgeChunksDisplay.ts feat(chat): refactor agent stream display and tool result rendering 2026-06-16 01:21:19 +08:00
knowledgeProcessingStatus.test.mjs fix(knowledge): align processing timeline status with knowledge row 2026-07-14 16:49:56 +08:00
knowledgeProcessingStatus.ts fix(knowledge): align processing timeline status with knowledge row 2026-07-14 16:49:56 +08:00
knowledgeTrace.test.ts fix(frontend): clarify processing timeline status 2026-07-28 20:45:59 +08:00
knowledgeTrace.ts fix(frontend): clarify processing timeline status 2026-07-28 20:45:59 +08:00
loginNotify.ts feat(auth): support tenantless provisioning and gated self-service workspace creation 2026-07-13 18:13:51 +08:00
markdownDomPurify.test.mjs fix(frontend): open chat reference links in new tabs 2026-07-14 18:13:53 +08:00
markdownDomPurify.ts feat(feishu-driver): 新增飞书云盘数据源 (#2466) 2026-08-05 19:39:49 +08:00
markdownEnhancements.ts fix(ui): 统一剪贴板复制为公共方法,HTTP 环境回退 execCommand 2026-08-12 15:38:01 +08:00
markdownTableNormalize.ts feat(parser): add OpenDataLoader, PaddleOCR-VL engines, and parser improvements 2026-06-03 12:29:13 +08:00
mermaidShared.ts feat(chat): add shared markdown rendering pipeline 2026-06-16 01:09:55 +08:00
mermaidViewer.ts feat(chat): add shared markdown rendering pipeline 2026-06-16 01:09:55 +08:00
messageTimestamp.test.ts fix(chat): insert timestamps as conversation flow dividers 2026-08-24 18:34:40 +08:00
messageTimestamp.ts fix(chat): insert timestamps as conversation flow dividers 2026-08-24 18:34:40 +08:00
modelDefaults.ts feat(agent): prefill default rerank model on agent creation 2026-08-10 17:20:01 +08:00
protectedFileAccess.test.ts feat(files): add message-scoped proxy for shared-agent chat images 2026-08-07 18:10:16 +08:00
protectedFileAccess.ts feat(files): add message-scoped proxy for shared-agent chat images 2026-08-07 18:10:16 +08:00
rag-pipeline-history.test.mjs feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
rag-pipeline-history.ts fix(frontend): cover attachment-only turns and stalled streams in the RAG wait row 2026-08-04 13:21:23 +08:00
rag-pipeline-state.test.ts fix(frontend): cover attachment-only turns and stalled streams in the RAG wait row 2026-08-04 13:21:23 +08:00
rag-pipeline-state.ts fix(frontend): cover attachment-only turns and stalled streams in the RAG wait row 2026-08-04 13:21:23 +08:00
referenceSources.test.mjs fix(chat): polish references drawer layout and web reference titles 2026-07-17 11:04:16 +08:00
referenceSources.ts fix(chat): polish references drawer layout and web reference titles 2026-07-17 11:04:16 +08:00
request.ts feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
security.test.ts feat(resource): add stable resource registry with LLM-context alias compaction 2026-07-15 17:02:43 +08:00
security.ts fix(frontend): route embed protected images through channel file proxy 2026-07-31 13:29:34 +08:00
sessionMarkdown.test.ts feat(chat): add session header actions and Markdown export 2026-07-17 16:16:35 +08:00
sessionMarkdown.ts feat(chat): add session header actions and Markdown export 2026-07-17 16:16:35 +08:00
tdesign-icon-offline.ts fix(frontend): improve offline and legacy browser support 2026-05-21 11:19:44 +08:00
tenantModelReadiness.ts feat(contextualGuides): add multiple contextual guide components for agent and knowledge base creation 2026-06-03 14:42:46 +08:00
tenantSwitch.ts docs: fix 登陆 typo to 登录 2026-08-07 17:04:49 +08:00
thinkingControl.test.ts feat(thinkingControl): implement thinking mode configuration in model editor 2026-06-05 14:56:48 +08:00
thinkingControl.ts feat(models): add model test debugger for saved model configs 2026-06-25 17:05:33 +08:00
tool-capabilities.ts refactor(agent): remove final_answer tool references and update related logic 2026-06-04 15:48:04 +08:00
tool-icons.ts feat: friendly display for MCP tool names in frontend (#715) 2026-03-21 10:22:05 +08:00
weknoraCloudModels.ts feat(i18n): update WeKnoraCloud integration and enhance model management 2026-06-10 20:52:39 +08:00
wikiLineDiff.test.ts Improve Wiki reader layout and revision history UX. 2026-08-05 18:15:11 +08:00
wikiLineDiff.ts Improve Wiki reader layout and revision history UX. 2026-08-05 18:15:11 +08:00
wikiRevisionDiff.test.ts Improve Wiki reader layout and revision history UX. 2026-08-05 18:15:11 +08:00
wikiRevisionDiff.ts Improve Wiki reader layout and revision history UX. 2026-08-05 18:15:11 +08:00
wikiToolReferences.test.ts feat(chat): show wiki tool results in the references drawer 2026-07-23 19:41:34 +08:00
wikiToolReferences.ts feat(chat): show wiki tool results in the references drawer 2026-07-23 19:41:34 +08:00
workspaceNotifyContent.ts feat(i18n): enhance notification templates with raw message handling 2026-05-18 20:37:57 +08:00
zoom.ts fix(frontend): correct floating UI positioning under root `zoom` 2026-05-24 23:03:26 +08:00