Commit Graph

766 Commits

Author SHA1 Message Date
wizardchen 83eeec0ddf feat(i18n): add optional embedding model descriptions for multiple locales
Enhance the internationalization support by adding optional descriptions for the embedding model in English, Korean, Russian, and Chinese. Update the UI to reflect these changes, ensuring users are informed about the optional nature of the embedding model when configuring knowledge base settings.
2026-06-16 23:51:29 +08:00
wizardchen 07e0f6f21a feat(session-sidebar): enhance menu positioning and behavior
Refactor the session sidebar menu to use a Teleport component for improved positioning and visibility. Introduce a trigger reference for dynamic menu placement based on viewport dimensions. Update event listeners for menu interactions to ensure proper opening and closing behavior, enhancing user experience. Adjust CSS for fixed positioning and z-index to prevent overlap issues.
2026-06-16 23:51:29 +08:00
wizardchen c8cb4fab39 feat(wiki): show category hierarchy and navigation in wiki browser
Render the wiki page category hierarchy in the browser, wire up the new
category-path/availability API calls, and add the corresponding i18n strings
across en-US, ko-KR, ru-RU and zh-CN locales.
2026-06-16 23:51:29 +08:00
adawang 6efd2093f5 fix(frontend): list writable shared KBs in manual knowledge editor
The "add to knowledge base" action on the chat page opens the manual
editor, whose target picker was populated only from listKnowledgeBases()
— the caller's own KBs. A user who was granted editor access to a shared
KB therefore could not select it, even though the backend
(CreateManualKnowledge) accepts editor/admin permission.

Also fetch shared knowledge bases and merge those the user can write to
(editor/admin) into the picker, de-duplicated against owned KBs and
limited to document-type KBs. Viewer-only shares stay excluded.

Fixes #1689

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:41:38 +08:00
FFFFFFpy 6d07e20204 fix(wiki): use placeholder src for protected provider images to avoid failed initial loads 2026-06-16 12:24:01 +08:00
FFFFFFpy e21a5da422 feat: add EPUB and MHTML document support 2026-06-16 11:25:27 +08:00
wizardchen fe7aded648 feat(i18n): add translations for citations, RAG progress, and tool results
Sync embed and locale strings for citation popover, pipeline progress,
agent tool status, and knowledge chunks list summaries.
2026-06-16 01:21:19 +08:00
wizardchen 283dbbd577 feat(chat): improve chat layout and suggested questions UX
Refine input field, session sidebar, suggested questions refresh, and
embed channel preview for a cleaner chat creation experience.
2026-06-16 01:21:19 +08:00
wizardchen c6f1b54f73 feat(chat): refactor agent stream display and tool result rendering
Add RagPipelineProgress timeline, simplify AgentStreamDisplay structure,
group grep hits per document, and add KnowledgeChunksList tool result UI.
2026-06-16 01:21:19 +08:00
wizardchen 05f39b859f feat(chat): add citation popover and chunk caching
Introduce ChatCitationFloat hover UI, session-scoped citation chunk cache,
and unified citation markdown handling for main chat and embed views.
2026-06-16 01:09:55 +08:00
wizardchen ee1c3c732c feat(chat): add shared markdown rendering pipeline
Extract chat markdown styles, renderer, DOMPurify config, syntax
highlighting, and mermaid support into reusable utilities with tests.
2026-06-16 01:09:55 +08:00
wizardchen 8dbc20b9b3 feat(im): enhance IMChannelPanel and SettingDrawer components
Refactor settings drawer for consistency, add role-based empty states,
and improve save loading UX for IM channel configuration.
2026-06-16 00:55:23 +08:00
wizardchen 53e0333a53 Add embedding dimension override support 2026-06-15 19:18:19 +08:00
wizardchen 90f8e8b390 feat(auth): clear session resource caches on logout to prevent data leakage 2026-06-15 17:46:08 +08:00
wizardchen f0dcf85528 feat(i18n): add 'Open documentation' string to multiple language files 2026-06-15 17:20:40 +08:00
wizardchen 20b01a6cd5 feat(embed): session sidebar grouping and embed theme alignment (#1657)
Group embed sessions in the sidebar by channel, replace session source filter
with grouping buckets, and align shared chat components with embed theme colors.
2026-06-12 23:10:39 +08:00
wizardchen 08852ab19d feat(embed): add widget, visitor chat, and management UI (#1657)
Add embed.html entrypoint, floating widget SDK, secure-mode snippets,
management panel with preview, visitor chat composables, citation rendering,
and integration docs for subdomain and server-side token exchange.
2026-06-12 23:10:39 +08:00
langcaiye d832dae818 fix(datasource): clarify edit does not sync 2026-06-12 22:49:37 +08:00
nullkey 5851c64ba1 feat(im): IM session improvements — titles, in-flight recovery, classification
Three related improvements to the IM-session experience:

- Auto-generated titles: a new IM session starts untitled and gets a
  content-based title from its first message via the same GenerateTitleAsync
  flow web sessions use, instead of an identity title like "user · dm". Falls
  back to the identity title when the first message has no text. All platforms.

- In-flight reply recovery (web chat): opening a session whose reply is still
  being generated on an IM channel made the web client attach via
  continue-stream and fail (the IM answer never streams through this server),
  flashing a "stream failed" toast and forcing a manual refresh. Treat a failed
  attach to an IM reply (channel === 'im') as recoverable — poll until it
  completes, then reload the thread; on timeout surface the standard error.
  Web/api replies keep the original behaviour, untouched.

- Source-filter classification: the sidebar filter treats "web" as sessions
  with no IM mapping, but the list join excluded soft-deleted mappings, so
  /clear'd IM sessions leaked into the user's own web chats. Include soft-deleted
  mappings so a session ever bound to an IM channel stays under its platform.
  Adds a repository regression test.
2026-06-12 17:01:28 +08:00
nullkey ac84dacc00 feat(frontend): add session source filter to sidebar (#1560)
IM-channel sessions were mixed in with the user's own chats. The sidebar
now defaults to web sessions; tenants with a configured IM channel get a
source switcher in the "对话" header to reach a specific platform.

- getSessionsList: optional `source` query param
- getMessageList: token-guarded loads (racing source switches / route
  changes can't append stale rows) + per-source pagination reset
- SourceSwitcherDropdown: scope dropdown mirroring KBSwitcherDropdown,
  scales to many platforms, reuses platform logos, closes on select
- empty state when a source has no sessions
- pure logic in sessionSourceFilter.ts with unit tests; zh/en/ko/ru i18n
2026-06-12 17:01:28 +08:00
jw_mac 232280d959 fix:lack the completed status set 2026-06-12 10:59:18 +08:00
wizardchen ebe7bfe0ae refactor(settings): unify empty state handling across settings views
- Updated McpSettings.vue, ModelSettings.vue, VectorStoreSettings.vue, and WebSearchSettings.vue to streamline the empty state display for services and models.
- Removed admin-specific add buttons from empty states, enhancing clarity for non-admin users.
- Improved consistency in the presentation of empty states across different settings components.
2026-06-11 17:18:53 +08:00
wizardchen 8112cdbf85 feat(menu): enhance menu component with new chat functionality and localization updates
- Updated the menu component to include a new chat option, improving user navigation.
- Refactored the menu layout to allow for sticky behavior during scrolling, enhancing usability.
- Added localization support for the new chat feature in English, Korean, Russian, and Chinese.
- Adjusted the menu store to reflect the new chat option and maintain consistent menu structure.
2026-06-11 16:28:16 +08:00
wizardchen 00ad8adb71 feat(menu): enhance sidebar functionality with search and toggle buttons
- Updated the menu component to include a search button alongside the sidebar toggle in the expanded view, improving accessibility to search functionality.
- Refactored the layout to maintain a consistent design for the logo actions, ensuring a seamless user experience.
- Adjusted CSS styles for the sidebar toggle and search button for better alignment and responsiveness.
- Improved tooltip handling for the search feature to provide clear user guidance.
2026-06-11 14:38:50 +08:00
wizardchen 2f1e69b0da fix knowledge timeline parser display 2026-06-10 22:40:28 +08:00
wizardchen d56f25c062 feat(settings): refactor UI components for service and store management
- Replaced toolbar layouts with a more streamlined header design in McpSettings.vue, VectorStoreSettings.vue, and WebSearchSettings.vue for improved consistency.
- Introduced new button styles for adding services and stores, enhancing visual clarity and user interaction.
- Updated empty state handling to utilize a unified design approach across settings views.
- Adjusted CSS styles for better alignment and responsiveness in service and store cards.
2026-06-10 20:52:39 +08:00
wizardchen af08a65821 feat(model-editor): enhance model type selection and localization support
- Added a new section for model type selection in ModelEditorDialog.vue, allowing users to choose between different model types with visual indicators.
- Updated the source selection logic to reflect changes in model type and ensure proper state management.
- Refactored related computed properties to utilize the active model type for better clarity and maintainability.
- Enhanced localization files (English, Korean, Russian, Chinese) to include new translations for model type and type label.
- Improved the layout and structure of ModelSettings.vue for better user experience and accessibility.
2026-06-10 20:52:39 +08:00
wizardchen ad27ed134e feat(i18n): update WeKnoraCloud integration and enhance model management
- Revised usage steps in English, Korean, Russian, and Chinese localization files for clarity on saving credentials and adding cloud models.
- Introduced a new section in WeKnoraCloudSettings.vue to display the status of cloud model integration based on credential configuration.
- Added utility functions for managing WeKnoraCloud models, including model configuration and existing model checks.
- Enhanced ModelSettings.vue to improve model management actions and confirm deletion prompts.
- Implemented logic to handle adding cloud models with success and failure notifications.
2026-06-10 20:52:39 +08:00
wizardchen bb220db4e4 feat(ui): enhance knowledge base creation with initial section support
- Updated the openCreateKB method to accept an optional initialSection parameter, allowing for targeted navigation during knowledge base creation.
- Removed the TenantModelsGuide component from KnowledgeBaseList.vue to streamline the UI.
- Adjusted logic in handleCreateKnowledgeBase to conditionally set the initial section based on model readiness, improving user experience.
2026-06-10 20:52:39 +08:00
wizardchen ba492aa9f5 style(frontend): adjust padding and margins for improved layout in AgentList, Chat, and KnowledgeBaseList components
- Removed unnecessary margins and adjusted padding in AgentList.vue, Chat.vue, and KnowledgeBaseList.vue to enhance the visual layout.
- Updated scrollbar styles to utilize system defaults for a more consistent user experience across components.
- Ensured that sticky headers align properly with the container edges by modifying padding settings.
2026-06-10 19:26:21 +08:00
wizardchen 0964b26558 feat(frontend): implement marquee selection for knowledge base
- Introduced a new `useMarqueeSelect` hook to enable marquee selection functionality in the knowledge base view.
- Integrated marquee selection with mouse events to allow users to select multiple items by dragging a selection box.
- Updated the `KnowledgeBase.vue` and `DocumentListView.vue` components to support the new selection feature, including visual indicators for selection mode.
- Enhanced user experience by providing a responsive selection interface that adapts to user interactions.
2026-06-10 11:02:57 +08:00
wizardchen ce3702b6de feat(frontend): enhance dark mode syntax highlighting for code previews
- Added global styles to remap syntax highlighting colors for dark mode in the document preview component.
- Ensured that all highlighted code blocks are visually accessible against the dark background, improving readability for users in dark mode.
2026-06-09 21:13:59 +08:00
wizardchen 2aadd61fcc feat: implement reparse functionality with process configuration support
- Enhanced the `reparseKnowledge` function to accept optional process configuration overrides, allowing users to adjust parsing settings during reparse operations.
- Updated the frontend components to integrate reparse capabilities, including the `UploadConfirmDialog` and `KnowledgeBase` views, providing a user-friendly interface for confirming reparse actions.
- Added new localization strings for reparse confirmation and process configuration details in multiple languages.
- Modified the backend API to handle reparse requests with optional configuration, ensuring proper validation and persistence of overrides.
- Introduced new types and interfaces to manage reparse-specific data structures in the store, improving type safety and clarity in the codebase.
2026-06-09 20:38:24 +08:00
wizardchen d8a26f7c23 refactor: remove enable_multimodal and adjust parent-child configuration
- Removed the `enable_multimodal` field from the `ChunkingConfigOverride` interface and related components to streamline configuration.
- Updated the logic in `UploadConfirmDialog.vue` to default `enableParentChild` to false when initializing from knowledge base info.
- Modified the `mergeChunkingConfig` function to ensure that `EnableParentChild` is authoritative, allowing explicit control over its state.
- Added a new test case in `knowledge_process_config_test.go` to verify the behavior of parent-child toggles in process configuration resolution.
2026-06-09 20:38:24 +08:00
wizardchen 76dc23226d fix: correct graph_enabled logic in process configuration
- Updated the logic for `graph_enabled` in `UploadConfirmDialog.vue` to require both `nodeExtractConfig.enabled` and `graphEnabled` to be true.
- Added a new test case in `knowledge_process_config_test.go` to ensure that `GraphEnabled` is false when `ExtractConfig.Enabled` is false.
- Adjusted the `ResolveProcessConfig` function to reflect the updated dependency between graph and extract configurations, ensuring proper behavior in the process configuration resolution.
2026-06-09 20:38:24 +08:00
wizardchen ed9e780c8c feat(client): enhance knowledge file upload with process configuration support
- Updated the `CreateKnowledgeFromFile` function to accept an optional `processConfig` parameter for per-upload parse configuration overrides.
- Introduced the `KnowledgeProcessOverrides` type to define various parsing settings, including parser engine rules and chunking configurations.
- Modified the API client and related components to handle the new process configuration, improving flexibility in knowledge file uploads.
- Updated documentation and API specifications to reflect the new `process_config` parameter in the upload process.
- Added a new `UploadConfirmHost` component to facilitate user confirmation for uploads, integrating with the updated upload logic.
- Enhanced user experience by providing detailed configuration options during the upload process.
2026-06-09 20:38:24 +08:00
wizardchen 589d2a6e52 feat(frontend): inject commit ID into frontend build for version tracking
- Added a new build argument `COMMIT_ID_ARG` to pass the commit ID during the Docker build process.
- Updated the Dockerfile to set an environment variable `VITE_FRONTEND_COMMIT` with the commit ID.
- Enhanced the Vite configuration to resolve the frontend commit ID from the environment or Git.
- Modified the SystemInfo component to display the frontend commit ID in the UI.
- Implemented a version info preparation step in the GitHub Actions workflow to capture the commit ID.
2026-06-09 18:08:57 +08:00
wizardchen 4de3c3efbd fix(frontend): harden chat resources cache invalidation and dedup
- Invalidate the single-KB detail cache when editing a KB from the list
  page, matching the detail page so the sidebar/detail no longer show a
  stale name/config for up to the cache TTL.
- Reject (instead of swallowing) listModels network failures so the
  cache layer can tell a transient failure apart from a genuinely empty
  model list and avoid caching the empty result for the whole TTL. All
  UI callers already wrap listModels in try/catch.
- Guard the kb/agent in-flight handles with a generation counter so a
  concurrent force refresh cannot null out a still-running request, and
  clear all in-flight maps on invalidate() so stale requests cannot
  repopulate the cache after invalidation.
2026-06-09 18:05:33 +08:00
wizardchen e78a9482d4 refactor(frontend): enhance chat resources store for knowledge bases and agents
- Introduced caching mechanisms for knowledge bases and agents to prevent redundant API calls during concurrent requests.
- Updated logic to handle creator-specific filtering for knowledge bases and agents, ensuring that non-'all' requests bypass caching.
- Improved session state handling in the settings store to ensure proper state restoration without overwriting user selections.
- Utilized `nextTick` to manage asynchronous state updates effectively, enhancing the reliability of the application state management.
2026-06-09 18:05:33 +08:00
wizardchen 815c72c964 refactor(frontend): streamline knowledge base and agent handling with chat resources store
- Updated components to utilize the new `useChatResourcesStore` for managing knowledge bases and agents, improving data fetching and caching mechanisms.
- Refactored `AgentSelector`, `IMChannelPanel`, `Input-field`, and `menu` components to replace direct API calls with store methods, enhancing maintainability and performance.
- Adjusted knowledge base loading logic to ensure consistency across components and reduce redundant API requests.
- Improved session state handling in `settings` store to prevent overwriting user selections during state restoration.
2026-06-09 18:05:33 +08:00
shifang 6a1d0834c4 fix: refresh wiki status after document polling completes 2026-06-08 20:15:42 +08:00
Martín Alcalá Rubí bbf7ac29bf fix(frontend): dedupe KB list to stop empty render with ≥2 knowledge bases
The "All" scope of the knowledge-base list renders every card with
`:key="kb.id"`. The same knowledge base can appear more than once in the
source data — owned *and* shared back to the caller, or shared into their
view through two different organizations (distinct share_id, identical
knowledge_base.id). Duplicate `v-for` keys corrupt Vue's virtual-DOM
patch and the list renders empty/partial. A single KB never collides, so
the page works with one KB and blanks once there are two or more — the
exact behavior reported in #795.

Extract the merge into a pure, unit-tested helper
(mergeAllScopeKnowledgeBases) that de-duplicates by knowledge-base id —
owned rows win over shared duplicates, and repeated shares of one KB keep
the most-privileged permission — while preserving the existing
pinned → mine → teammate → shared(editable-first) ordering.

Tests use the repo's existing node:test convention; a `test` script is
added so `npm test` discovers them (it also wires up the two previously
orphaned *.test.ts files).

Fixes #795

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:10:30 +08:00
wizardchen 22349055ec fix(knowledge): update doc-scroll-container class binding to account for loading state
- Modified the class binding of the doc-scroll-container to include a check for the loading state of the document list, ensuring the 'is-empty' class is applied correctly when there are no cards and documents are still loading.
2026-06-08 12:03:41 +08:00
wizardchen b820e690f0 fix(auth): allow anonymous access to share-link endpoints (#1617)
The global Auth middleware allowlist (noAuthAPI) was missing the
share-link routes, so an unauthenticated invitee opening /register?token=
hit a 401 on /auth/invitations/lookup and the frontend bounced them to
/login instead of showing the register page. Add both share-link
endpoints to the allowlist and stop the request interceptor from treating
their 401s as a session-expiry redirect.

Refs: https://github.com/Tencent/WeKnora/issues/1617
2026-06-05 18:51:32 +08:00
ruihao.li a12b6ff61b feat: support Milvus database selection for vector stores 2026-06-05 15:11:37 +08:00
wizardchen e2a41ecf0a feat(thinkingControl): implement thinking mode configuration in model editor
- Added a new thinking mode control field in the ModelEditorDialog, allowing users to specify how the agent's thinking mode is formatted for API requests.
- Introduced localization strings for thinking mode labels and descriptions in English, Korean, Russian, and Chinese, enhancing user experience across multiple languages.
- Updated the model form data structure to include thinking control settings, ensuring proper handling during model edits and saves.
- Implemented utility functions for resolving and defaulting thinking control values based on provider and model, improving backend integration.
- Added tests for the new thinking control functionality to ensure reliability and correctness in handling user configurations.
2026-06-05 14:56:48 +08:00
wizardchen 063809896a refactor(chat): improve handling of <think> tags in chat messages
- Updated logic to manage <think> and </think> tags in chat message content, ensuring accurate representation of thinking states.
- Introduced a new function to handle the closing of thinking events, enhancing clarity and reducing redundancy in event emissions.
- Adjusted event handling for reasoning content to support historical message reconstruction, improving user experience during chat interactions.
2026-06-05 14:56:48 +08:00
wizardchen 4bb8906520 feat(faq): enhance FAQ handling and localization support
- Updated the agent system prompt to clarify mandatory deep read requirements for FAQ entries, ensuring accurate retrieval and response generation.
- Added new localization strings for FAQ-related labels in English and Chinese, improving user experience and consistency across the application.
- Refactored the document and grep results components to support distinct FAQ identification, enhancing clarity in the output.
- Introduced new tests for FAQ metadata handling, ensuring robust functionality and correctness in the FAQ processing logic.
2026-06-04 21:43:16 +08:00
jackson.jia 10383c6ddd fix(frontend): pass {size} param to fileSizeExceeded i18n on Nginx 413
The Nginx 413 error handler in request.ts calls t('error.fileSizeExceeded')
without the required {size} parameter, causing the toast to display
"文件大小不能超过 M!" instead of "文件大小不能超过 50M!".

Export MAX_FILE_SIZE_MB from utils/index.ts and pass it as {size} to the
i18n call, matching the sibling call site in kbFileTypeVerification().
2026-06-04 17:23:50 +08:00
wizardchen dda16436d0 feat(lkeap): integrate Tencent Cloud LKEAP Rerank support
- Added support for Tencent Cloud LKEAP Rerank, including new configuration options for SecretId and SecretKey.
- Updated frontend components to handle LKEAP-specific fields and enhance user experience with appropriate labels and placeholders.
- Enhanced backend logic to manage LKEAP credentials and integrate with the new rerank API.
- Improved localization for LKEAP-related terms across multiple languages, ensuring clarity and consistency in user-facing messages.
- Introduced tests for LKEAP Reranker functionality to ensure reliability and correctness in handling requests.
2026-06-04 17:22:18 +08:00