Commit Graph

1078 Commits (5fea7a1695febf50942e5e8fac5b71d4e41e75f6)

Author SHA1 Message Date
lyingbug 5fea7a1695 feat(knowledge): browse folders like a file manager and allow re-filing
The scope switch is gone. It existed because "select a folder" was ambiguous
in a list that could not show folders, and turning that ambiguity into a
control just moved the problem onto the user.

The list now shows what a folder contains: its sub-folders as entries first,
then the documents directly inside it. So the mode follows what the user is
already doing instead of a switch - browsing shows one level, and any active
filter searches the whole subtree flat, with a breadcrumb note saying so. A
document uploaded on its own needs no special row either: it sits at the top
level next to the folders, exactly where it is.

Folders can also be adjusted now, which they could not before - a mis-filed
upload previously had to be deleted and re-uploaded. Documents move via the
row menu or the batch bar into an existing or newly typed folder, and a
folder can be renamed in place, carrying its subtree. Both are plain
folder_path updates: nothing is re-parsed, re-chunked or re-embedded.
2026-08-04 20:45:29 +08:00
lyingbug b3e31a24d9 fix(knowledge): give individually uploaded documents a visible home in the tree
A folder-only tree cannot show a node for a document that is not in any
folder, so single-file uploads were unreachable from the sidebar: a base
with 5 documents and one 3-document folder just left two of them
unaccounted for.

Rather than add a second pseudo-folder row for them (the ambiguity the
previous commit removed), the one existing mechanism is made visible: the
scope switch is now a labeled segmented control instead of an icon behind a
tooltip, and the root row is named after whatever the current scope makes it
list - the whole base, or exactly the unfiled documents. The breadcrumb's
leading crumb follows the same rule.
2026-08-04 20:45:29 +08:00
lyingbug d6083c6c98 fix(knowledge): make the folder tree root a real parent node
The sidebar listed "all documents" and "root" as two rows sitting next to
the top-level folders, but those folders are inside the root, so the three
rows contradicted each other and reaching the top level for an upload meant
selecting a row that did not look like a parent.

There is now a single root row with every folder nested beneath it, and what
a row lists is decided by one uniform rule at every level: the direct
documents, or the whole subtree when the scope toggle is on. "Documents not
in any folder" is the root with the toggle off, which is also why the toggle
now defaults to on.

The upload destination is no longer implied by the sidebar selection either:
the confirmation dialog shows which folder the batch lands in, lets it be
switched back to the top level, and lists each file's own sub-directory.
2026-08-04 20:45:29 +08:00
lyingbug 27efebbd1c refactor(knowledge): extract folder tree helpers and unit-test them
The upload-path builder, breadcrumb/ancestor derivation, folder lookup and
tree flattening were inline in the view and the sidebar component. Moving
them into folderTree.ts follows the convention of kbListMerge.ts and
wikiStatusRefresh.ts, removes the duplicated webkitRelativePath handling,
and makes the folder navigation logic directly testable.
2026-08-04 20:45:29 +08:00
lyingbug f747d390a8 feat(knowledge): show uploaded folder structure as a sidebar tree
The documents tab gains a left folder column built from the folder_path
now stored on each knowledge entry. Selecting a folder filters the
existing document list (so search, tags, type, status and date filters
all keep working), a breadcrumb above the list shows where you are, and
uploads made while browsing a folder land in that folder. A per-row
folder chip appears only when the list can span folders.
2026-08-04 20:45:29 +08:00
lyingbug fcc4cd6a9f fix(frontend): announce RAG wait status from a persistent live region
role="status" lived on the wait row itself, so the live region was inserted
together with its own text and screen readers had nothing to announce. Move the
announcement to an sr-only region that stays mounted for the whole turn, which
also covers the pre-pipeline wait row that had no announcement at all.

Co-authored-by: lyingbug <lyingbug@users.noreply.github.com>
2026-08-04 13:21:23 +08:00
lyingbug 2454eaf253 fix(frontend): cover attachment-only turns and stalled streams in the RAG wait row
The wait row only appeared once a completed knowledge_search step existed, so
attachment-only turns (attachment_parsing / image_analysis with no KB hit) still
showed nothing between the last step and the first answer token. Model waiting is
now a three-state kind: 'model' after retrieval finished, the neutral 'preparing'
row otherwise.

A dropped SSE connection never sets is_completed (the stream layer only raises a
toast), so the row used to promise an answer forever. It now stops claiming
progress after RAG_WAIT_STALL_DELAY_MS and drops the shimmer.

Also share RAG_RETRIEVAL_TOOL_NAMES instead of repeating the knowledge_search /
search_knowledge alias check, name the reveal delay, and move the reveal/stall
timers into a controller with an injectable scheduler so the timing is covered by
tests instead of by source-matching alone.

Co-authored-by: lyingbug <lyingbug@users.noreply.github.com>
2026-08-04 13:21:23 +08:00
ttommybot 747cbcbc02 fix: show answer generation status after retrieval 2026-08-04 13:21:23 +08:00
ttommybot 91b2d31cd4 fix: unify organization settings modal scrolling 2026-08-03 23:54:10 +08:00
shangfeng-liu 583b87b1b9 fix: preserve MinerU automatic PDF parsing 2026-08-03 15:37:07 +08:00
ttommybot d3055ae068 fix: count skipped stages in parsing progress 2026-08-03 15:20:16 +08:00
jacentsao cbac06564d fix(chat): keep attachment upload status reactive 2026-08-03 15:01:57 +08:00
wizardchen 0d58af8d82 fix(frontend): route embed protected images through channel file proxy
Embed visitors have no Bearer token, so resource:// images must be fetched
via /api/v1/embed/:channelId/files. Centralize proxy selection in a
protected-file access context and register the embed plane at EmbedPage so
deep renderers like AgentStreamDisplay no longer fall back to /files (401).
2026-07-31 13:29:34 +08:00
wizardchen e99a4dd498 fix(frontend): restore audit and KB activity i18n after locale prune
Re-add flat-key translations for audit log and knowledge-base activity events
that were dropped or nested incorrectly during i18n pruning. Add a shared
action registry, English defaults, and prune safeguards so regenerate-i18n-locales
reads the working tree and cannot strip these runtime keys again.
2026-07-31 11:57:36 +08:00
wizardchen a1a07a52eb fix(frontend): satisfy KB editor type-check after create save
Use a narrowed createdKbId local when reloading data and emitting success
so vue-tsc accepts the post-create flow.
2026-07-31 11:54:20 +08:00
wizardchen 23ae5e179c fix(frontend): close editor on save and guide post-create setup
Align agent and knowledge base editors so edit saves close the modal,
first-time create stays open with contextual footer hints, and follow-up
actions point users to sharing/integration or data-source configuration.
2026-07-31 11:54:20 +08:00
ttommybot f7ef782d58 fix: preserve wiki folder path after creation 2026-07-30 21:02:06 +08:00
wizardchen 25f3751138 fix(frontend): prune i18n locales, add audit tooling, and fix UI warnings
Regenerate four locale bundles from static usage analysis (6024 -> 4592 keys),
align translations across locales, escape vue-i18n @ syntax, and add check-i18n
plus gap-scan tooling. Also fix TDesign drawer/textarea teardown warnings and
add missing tenantOthers section labels.
2026-07-30 20:58:00 +08:00
wizardchen 2611babfef ci(frontend): remove docs terminology coupling 2026-07-30 17:32:44 +08:00
wizardchen a52137d450 ci: add app frontend and docreader checks 2026-07-30 14:13:15 +08:00
wizardchen cc846d8e29 fix: harden shared agent source selector validation
Reject invalid agent_source_tenant_id instead of silently falling back, fix a resolveAgent nil panic when a shared selector fails, and add regression tests for wiki write-tool filtering and agent resolution.
2026-07-30 12:28:23 +08:00
wizardchen ab9f705843 fix: harden shared agent source permissions 2026-07-30 12:28:23 +08:00
wizardchen 57fb1de45d fix(knowledge): harden batch tag dialog submit and list refresh
Keep the batch tag dialog open until the API succeeds, reset pagination
after batch updates, and add structural tests for BatchTagDialog.
2026-07-30 12:04:38 +08:00
Binks Riverton de262ba6dd fix(knowledge): pre-select common tags in batch tag dialog 2026-07-30 12:04:38 +08:00
Binks Riverton 0f667e0fd8 feat(knowledge): add batch tag dialog for selected documents 2026-07-30 12:04:38 +08:00
Binks Riverton 3f94895d60 fix(organization): pass avatar when creating shared space
The create flow was missing the avatar field in both the store's create() function signature and the modal's create call, while the update flow correctly passed it. Added avatar parameter to orgStore.create() and included formData.avatar in the create invocation.
2026-07-30 11:57:53 +08:00
wizardchen 123f2d6349 fix(session): include external users in API session group 2026-07-30 11:56:05 +08:00
xiaowang f3cd3d9724 fix(knowledge): support local HTML uploads
English: Accept .html and .htm knowledge uploads across frontend, Go, and DocReader. Parse static HTML with charset-aware decoding, preserve document structure and local links, and keep scripts/network execution disabled. Add regression coverage for validation, engine registration, encoding, and parser behavior.

中文:打通知识库本地 .html 与 .htm 文件从前端、Go 服务到 DocReader 的完整上传链路。使用可识别字符编码的静态解析,保留文档结构和本地链接,不执行脚本或发起网络请求,并补充文件校验、引擎注册、编码及解析行为的回归测试。
2026-07-29 20:11:17 +08:00
wizardchen f0b7618721 refactor(frontend): redesign upload confirmation dialog
Restructure the upload confirm modal into a three-column layout with file list, settings navigation, and KB-editor-aligned configuration panels. Add per-section status summaries, polish parser Excel option alignment, and hide graph settings when unavailable.
2026-07-29 19:39:13 +08:00
wizardchen b581094c7b fix(web_fetch): address review follow-ups for structured fetch results
Restore HTTP-only 15s pipeline fetching, reject SPA shell pages when
browser rendering fails, surface per-URL failure fields in the UI, and
keep structured model output when all URLs fail.
2026-07-28 22:17:31 +08:00
chenjunhong 595d19a806 fix(docreader): restore optional XLSX header context 2026-07-28 22:00:36 +08:00
nullkey 4e3b512af6 fix(im): render resource:// images in IM channels (nginx /r/ + config guards)
IM channels (DingTalk/Feishu) showed broken images because resource://
image references resolve to WeKnora capability links that were neither
reachable nor renderable:

- nginx never proxied /r/, so <APP_EXTERNAL_URL>/r/<token> links fell into
  the SPA fallback and returned a blank page. Add a /r/ proxy block
  mirroring /files, using the ${APP_SCHEME}/${APP_HOST}/${APP_PORT} vars.
- rewriteStorageURLs treated any "dst != src" as success and emitted
  non-HTTP results (e.g. an internal storage:// path when APP_EXTERNAL_URL
  is unset) that IM clients cannot fetch. Only substitute http(s) URLs;
  otherwise leave the reference unchanged and log an actionable WARN.
- Warn once at startup when IM channels are active but APP_EXTERNAL_URL is
  unset — the config state that silently breaks resource:// images on the
  default MinIO/local deployment.
- Document that IM knowledge-base images need an IM-reachable http URL via
  one of two paths: a publicly reachable storage backend, or APP_EXTERNAL_URL
  routing resource:// through nginx /r/.
2026-07-28 21:25:12 +08:00
zhangzherui b4b7509e3a fix(frontend): clarify processing timeline status 2026-07-28 20:45:59 +08:00
wizardchen c3b08d6c26 fix(ui): harden chunk editor feedback after code review
Surface index-sync warnings instead of false save success, sync generated-question metadata after inline edits, and reload chunks on 409 revision conflicts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 20:23:48 +08:00
wizardchen 497e8312e3 fix(knowledge): harden summary refresh after review feedback
Discard stale async refreshes without clobbering newer summaries, queue manual refreshes instead of blocking HTTP, sort edited chunks by index for summaries, escape document metadata in chat headers, and distinguish lookup failures from true staleness.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 20:23:48 +08:00
wizardchen 76b3256497 fix(ui): refresh document summary state 2026-07-28 20:23:48 +08:00
wizardchen 431d6ab269 fix(ui): refresh chunk history after edits 2026-07-28 20:23:48 +08:00
wizardchen 48b661134b fix(chunks): retain questions across content edits 2026-07-28 20:23:48 +08:00
wizardchen 6a439a4c3b fix(chunks): keep edited retrieval content consistent 2026-07-28 20:23:48 +08:00
wizardchen 1b9858ecb8 fix(knowledge): enqueue stale summary refreshes 2026-07-28 20:23:48 +08:00
wizardchen 9a37f01325 refactor(knowledge): streamline chunk history legend 2026-07-28 20:23:48 +08:00
wizardchen c3bb3ff822 refactor(knowledge): tighten chunk popup layout 2026-07-28 20:23:48 +08:00
wizardchen 378523c497 refactor(knowledge): move chunk details into header popups 2026-07-28 20:23:48 +08:00
wizardchen 1a26265611 refactor(knowledge): simplify chunk detail controls 2026-07-28 20:23:48 +08:00
wizardchen 6d39fc7551 refactor(knowledge): refine document chunk interactions 2026-07-28 20:23:48 +08:00
wizardchen ac3eccddf5 feat(knowledge): support editable chunks and metadata 2026-07-28 20:23:48 +08:00
wizardchen ffff3fe181 feat(knowledge): configure tags during upload confirmation 2026-07-28 11:23:25 +08:00
wizardchen e88564a7db Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
wizardchen 6cebaa66f4 feat(frontend): refine user settings menu 2026-07-28 11:16:13 +08:00
Binks Riverton cb6e18b952 fix(i18n): remove duplicate 'members' key in organization locale objects
The string-form 'members' key (unused dead code) conflicted with the
nested object form used by OrganizationSettingsModal. Removed the dead
string entries from en-US, ko-KR, and ru-RU locale files to fix esbuild
duplicate key warnings.
2026-07-27 16:09:45 +08:00