Channel folder headers and nested session rows now share 13px type,
consistent icon sizing, and aligned indentation so the menu no longer
mixes oversized session titles with undersized folder labels.
Default unset agent thinking to explicit false so thinking_type models
receive disabled/enabled wire params. Render reasoning inside the quick-answer
pipeline timeline only when thinking events arrive, avoiding a flash of the
thinking step when thinking mode is off.
The runnable_by_viewer field was never populated for built-in agents,
so TenantRoleViewer users always hit 403 on agent-chat. Drop the field
and RBAC check so agent-chat matches knowledge-chat access for viewers.
Scope auth headers to feed fetches, use feed-scoped external IDs and
content-based incremental fingerprints, tolerate partial feed failures,
store feed URLs in settings, and fix credential configured detection.
Introduce a new feature allowing users to add custom HTTP headers for MCP requests. This includes:
- A user interface for adding and managing custom headers within the MCP service dialog.
- Localization support for custom headers in English, Korean, Russian, and Chinese.
- Updates to the form submission process to include custom headers, ensuring they are serialized correctly.
- Removal of warnings for ignored headers, as all headers are now captured in the custom headers editor.
This enhancement improves the flexibility and usability of the MCP service configuration.
Implement a new feature that allows users to import MCP service configurations via a standard JSON format. This includes:
- A toggle for importing from code with a user-friendly hint and placeholder.
- Error handling for various scenarios such as empty input, invalid JSON, and missing URLs.
- Toast notifications for successful imports and warnings about ignored headers.
- Updates to the MCP service dialog to support this new functionality, ensuring a seamless user experience during service creation and editing.
Support connecting to MCP servers that require OAuth2, with a Cursor-like
zero-config flow: the user provides only a URL and the system performs
metadata discovery, dynamic client registration (DCR), and the
authorization code flow with PKCE on first connect.
- Persist per-user access/refresh tokens and per-service DCR client
credentials, encrypted at rest (AES-256-GCM)
- Store the PKCE verifier/state during the flow via Redis with an
in-memory fallback for Lite mode
- Cache MCP clients per (service, user) so tokens stay user-isolated
- Add endpoints for authorize-url, callback, status, and token revoke;
the callback is allowlisted for unauthenticated access
- Surface a structured "authorization required" hint when a tool call
hits an unauthorized MCP service
- Frontend: add an auth-type selector with OAuth config, inline
authorization status/actions, and render the connection test result
inline in the editor drawer instead of a stacked centered dialog
Reset organizationsLoadedAt to 0 after orgStore.create() succeeds,
so that the subsequent fetchOrganizations() call from
handleSettingsSaved is not blocked by the 60-second TTL cache.
This ensures resource_counts and other aggregated fields are
refreshed immediately after creating a shared space.
When editing a data source whose tree loads one level at a time (Feishu
wiki), a saved deep-node selection was invisible: only top-level spaces
were listed, so the selected node could not be seen and its ancestor
space rendered as unchecked.
- Add Connector.ResolveResourceAncestors: given selected resource IDs,
return the ancestor IDs that must be expanded to reveal them. Feishu
walks up via GetWikiNode (O(depth) per selection, no full-tree walk);
Notion/Yuque return empty.
- Fix wikiNode.ParentNodeID JSON tag: the Feishu API field is
parent_node_token, not parent_node_id, so GetWikiNode can return the
parent and the ancestor walk works in production.
- Expose POST /datasource/{id}/resource-ancestors (service + handler +
route) and a matching frontend API client.
- Edit-mode picker reveals hidden selections by expanding and lazily
loading each ancestor level, so selections are visible and checked.
- Gate child fetching on treeFullyLoaded instead of a partial-children
heuristic, avoiding a redundant request for full-tree connectors.
Listing resources for a Feishu data source eagerly walked the entire wiki
tree (one API call per node across every space), which exceeded the request
timeout for large knowledge bases. ListResources now takes a parentID and
returns a single level at a time: empty lists the wiki spaces, a space/node
ID lists only its direct children. The frontend fetches children on demand
when a node is expanded. Notion (full tree in one call) and Yuque (flat)
keep their existing behavior by ignoring non-empty parentID.
Refs: https://github.com/Tencent/WeKnora/issues/1672
PaddleOCR-VL renders tables as HTML with per-cell text-align styles.
These waste tokens on layout markup and bypass the chunker's
table-protection logic (which only recognizes Markdown pipe tables),
causing large tables to be split mid-row.
Convert inline HTML <table> blocks to GFM Markdown tables when possible,
and strip presentational attributes (style/class/align/...) for tables
using rowspan/colspan that Markdown cannot express.
Refs: https://github.com/Tencent/WeKnora/issues/1725
GET with a JSON body was non-standard and confused integrators. Register
POST as the preferred method and keep GET for existing clients; update SDK,
MCP server, and API docs accordingly.
Refs: https://github.com/Tencent/WeKnora/issues/1727
- Add IM service dependency to CustomAgentHandler for managing agent-related IM channels.
- Implement DeleteChannelsByAgent method to stop and soft-delete IM channels associated with a custom agent upon its removal.
- Update ListChannelsByTenant to exclude soft-deleted custom agents, ensuring consistent overview lists after agent removal.
The angle-bracket image target parser declared a local variable named
`close`, which shadows Go's built-in `close` function and is flagged by
revive's redefines-builtin-id rule, breaking `make lint`. Rename it to
`closeIdx`.
- Introduce detailed descriptions for authentication, SSRF protection, tenant management, and async task worker settings in English, Korean, Russian, and Chinese localization files.
- Enhance user understanding of configuration options by providing context-sensitive help directly within the settings interface.
- Update the Settings and SystemSettings components to utilize these new descriptions for improved user experience.
DingTalk websocket (Stream) channels stopped delivering @-mentions after
a day or two and only recovered when the IM channel was toggled off/on.
The factory fired the SDK's Start once and relied entirely on the SDK's
internal auto-reconnect, with no liveness supervision on WeKnora's side.
On long-running connections the SDK can enter a zombie state where the
connection object stays alive but no longer receives messages, leaving no
way to recover automatically. The cancel func was also ineffective because
the SDK ignores the context after the initial dial, so stopping a channel
leaked the old connection.
Add a reusable RunSupervised helper that keeps a long connection alive and
proactively recycles it every 6h on top of the SDK's own reconnect, which
bounds the worst-case outage and clears stuck connections. Wire DingTalk to
it, add LongConnClient.Close (disables AutoReconnect before closing so the
SDK does not resurrect the connection), and make the cancel func actually
tear the connection down. Drop the now-unused stream client reference from
the adapter, which only sends replies via sessionWebhook or OpenAPI.
- Add dedicated MCP service configuration section in AgentEditorModal (agent mode only)
- Unify sidebar nav hover/active states across settings and editor modals
- Refine tool card and tag chip colors to use design tokens and color-mix
- Tighten suggested questions button padding and border-radius
- Update regex patterns to account for opening delimiters preceded by letters/numbers and followed by punctuation, ensuring proper rendering of emphasis in markdown.
- Add tests to validate new behavior for various edge cases, including punctuation-adjacent emphasis and exponent markers.
- Improve overall markdown rendering consistency in chat components.
- Implement `getWikiPageText` function to handle persisted slugs and JSON input for wiki page text retrieval.
- Update `getAgentToolIconName` to include mappings for `wiki_search` and `wiki_read_page` tools.
- Enhance tests to cover new functionality for wiki tools and ensure proper icon mapping in the agent stream display.
- Modify `AgentStreamDisplay` to utilize new wiki tool features and improve localization for wiki-related actions.
Add max-height: calc(100vh - 40px) to .settings-modal so it never exceeds
the viewport height minus overlay padding, keeping the close button always
visible without requiring F11 fullscreen.
fix(frontend): lower UploadConfirmDialog z-index so Settings modal appears above it
Reduce the overlay z-index from 2500 to 1000 so that the global
Settings modal (z-index: 1100) opens on top of the upload confirm
dialog instead of behind it.
Previously, when a user uploaded image files without a multimodal
model configured, clicking "前往全局设置添加模型" would open the
Settings modal behind the upload confirm dialog, forcing the user
to close the dialog first. With the z-index lowered to the
project-wide modal convention (1000), the Settings modal now
displays correctly above this dialog.
@
- Introduce a view mode toggle for directory display in the WikiBrowser component, allowing users to switch between tree and list views.
- Update localization files for English, Korean, Russian, and Chinese to include new strings for the view mode toggle and its associated labels.
- Enhance user experience by providing clear visual options for navigating directory structures.
- Introduce a shimmer effect for in-progress step titles in chat components, providing visual feedback during processing.
- Implement a trailing fade effect for the most recently streamed characters in chat markdown, enhancing the typing experience.
- Update CSS styles to support the new shimmer and fade effects, ensuring smooth transitions and visual coherence.
- Add tests to verify the functionality of the shimmer effect and the application of the fade tail in markdown rendering.
- Introduce functions to stabilize rendering of dangling inline markers during streaming, preventing flickering and layout shifts.
- Implement tagging for standalone strong paragraphs to ensure consistent styling as subtitles.
- Update CSS for chat components to improve animation smoothness and visual feedback during typing.
- Add tests for new markdown rendering features, including handling of incomplete emphasis and citation tags.
- Change background colors for hover and active states to enhance visual feedback.
- Adjust icon label colors and remove unnecessary font weight properties for better consistency.
- Refine item count background color to align with updated design standards.
- Introduce mechanisms to mark assistant messages as completed and handle in-flight messages during user queries.
- Implement functions to prepare for new outgoing messages and manage the stopping of assistant messages.
- Update chat stream handling to ensure proper message state management and prevent reuse of incomplete messages.
- Integrate new functionalities into existing composables for improved chat experience.
- Implement logic to accurately detect user scroll direction, preventing false positives during content loading.
- Update scroll handling in both `useEmbedChatSession` and chat view to maintain auto-follow functionality during streaming.
- Introduce a mechanism to differentiate between actual upward scrolls and content growth, enhancing chat usability.
- Introduce a stable skeleton box for protected images during loading to prevent flickering.
- Implement a new composable `useStickyBottomOnResize` to maintain chat scroll position as content loads.
- Add `useTypewriter` for smoother text rendering in chat, improving user experience during streaming.
- Create a directive `vStableHtml` to efficiently update HTML content without losing image states.
- Enhance chat markdown rendering to handle incomplete citation tags and trailing horizontal rules during streaming.
- Add tests for new typewriter functionality and citation handling.
- Change background colors in menu and user message components for better visual coherence
- Adjust text colors and font weights in UserMenu for improved readability
- Enhance suggested questions layout with updated spacing and alignment
- Refine chat message styles for better responsiveness and user experience
- Update hover effects and transitions for suggested question cards
- unify suggested-question styling across chat entry points
- keep citation markers inline with their preceding list content
- prevent manual editor viewport shifts and synchronize drawer motion
- align embedded preview and editor drawers in the body stacking context
- Replace manual knowledge editor dialog with SettingDrawer and refine toolbar/footer layout
- Add draft status resolution for manual knowledge items in the knowledge base
- Fix citation placement near fenced code blocks and add regression tests
- Update ChatRequestInfoButton icon and chat message/citation styles
- Add i18n strings for manual knowledge editor features
checkSQLInjectionRisks and InjectAndConditions compiled their regexps
with regexp.MustCompile on every invocation. Both run on the datasource
SQL path — InjectAndConditions is called once per security filter
(tenant, soft-delete, hidden-KB, search-scope), so a single secured query
recompiled ~20 patterns. InjectAndConditions also compiled the identical
tail-clause pattern twice.
Hoist them to package-level vars (compiled once at init). Behavior is
unchanged — same patterns, covered by the existing TestValidateSQL_*
and TestInjectAndConditions tests.
Benchmarks (apple M, -benchmem):
InjectAndConditions 4347 ns, 72 allocs -> 1023 ns, 7 allocs
checkSQLInjectionRisks 36074 ns, 560 allocs -> 12984 ns, 12 allocs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cascade soft-delete tenant_members when a workspace is removed so the
tenant switcher no longer shows ghost entries as "#<id>". Also filter
orphaned memberships in /auth/me and switch to another workspace after
delete when one remains.
Add new styles for anchored form popups in the wiki browser, improving the user interface for folder actions and confirmations. Update internationalization strings for move confirmation titles in English, Korean, Russian, and Chinese locales to enhance user experience across multiple languages. Refactor existing components to integrate the new popup styles and ensure consistent behavior.
Add new API functions for managing wiki folders, including creating, updating, deleting, and listing folders. Introduce a new WikiFolder interface to represent folder structure and enhance the WikiBrowser component with folder actions. Update internationalization strings for folder-related actions in English, Korean, Russian, and Chinese locales. Refactor existing code to accommodate folder hierarchy and improve user experience in the wiki browser.
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.
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.
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.