Skip to content

wip: add Wiki source document preview - #2843

Open
amsggg wants to merge 1 commit into
Tencent:mainfrom
amsggg:main
Open

wip: add Wiki source document preview#2843
amsggg wants to merge 1 commit into
Tencent:mainfrom
amsggg:main

Conversation

@amsggg

@amsggg amsggg commented Aug 27, 2026

Copy link
Copy Markdown

feat(wiki): support source document preview

Description

  • Detects source document links based on the table column context before normal Wiki link normalization.
  • Opens authorized source documents in the existing right-side preview drawer.
  • Uses server-provided knowledge_id, knowledge_base_id, file title, and optional file_type.
  • Keeps regular summary/<uuid> links opening the Wiki page drawer.
  • Reuses allowed_tools as the single configuration source through wiki_source_preview.
  • Places “源文档预览” after “数据分析” in the Agent tool groups.
  • Keeps wiki_source_preview as an Agent capability only; it is not exposed as an LLM function tool.
  • Enables the capability by default for Wiki-related Agent presets and initialization flows.

Type of Change

  • 🐛 Bug fix
  • [✅ ] ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • [ ✅] 🎨 Refactor
  • ⚡ Performance improvement
  • [✅ ] 🧪 Test
  • [✅ ] 🔧 Configuration / Build / CI

Related Issue

Fixes #

Testing

Checklist

  • [✅ ] git diff --check origin/main...HEAD passes
  • [✅ ] Changed source files are formatted
  • [✅ ] Targeted tests for the changed packages/components pass
  • Diff-scoped lint passes where applicable (for Go: golangci-lint run --new-from-rev=origin/main ./...)
  • [✅ ] Full-repository checks were run, or any unrelated/environment-dependent failures are documented above
  • [✅ ] Self-reviewed the code
  • [✅ ] Added/updated tests covering the change
  • Updated related documentation (README, docs/, Swagger annotations, etc.)
  • [✅ ] Breaking changes are clearly called out in the description above

Screenshots / Recordings

Manual UI verification scenarios:

  1. Open a Wiki reading result containing a table with a source document link.
  2. Click the link in the source document column.
  3. Verify that the original PDF, Word, or Excel document opens in the right-side preview drawer.
  4. Click a regular Wiki/Summary link outside the source document column.
  5. Verify that it still opens the Wiki page drawer.
  6. Open the Agent editor and verify that “源文档预览” appears after “数据分析”.
  7. Verify that enabling or disabling it updates allowed_tools with wiki_source_preview.
  8. Verify that it does not appear in the LLM function tool definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant