* refactor(frontend): batch 1 of style consistency cleanup
- theme.css: alias --td-font-family-mono to --app-font-family-mono so the
29 monospace call sites follow the user's code-font setting
- replace 115 hardcoded rgba(7,192,95,x) brand tints with
color-mix(in srgb, var(--td-brand-color) N%, transparent) so they track
the dark-mode brand color
- strip 358 dead var(--td-*, fallback) fallbacks (tokens are guaranteed by
theme.css); keep the 3 undefined tokens untouched
- menu.vue: drop 9 unreferenced style blocks; remove TencentSans font file
and its global import
- AgentStreamDisplay: drop 6 unused keyframes; move the teleported wiki
drawer styles into components/css/wiki-graph-drawer.less imported by
both chat and WikiBrowser so styling no longer depends on load order
- creatChat: remove four !important fixed-width media queries; chat root no
longer forces font-size: 20px
- list pages: create buttons use native theme="primary" (drops the purple
gradient on AgentList); header-action-btn no longer needs !important
- add styleGuard.test.mjs ratchet test (brand rgba, legacy blue, token
fallbacks, z-index !important, raster icons)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): unify destructive confirmations on useConfirmDelete
- useConfirmDelete now uses the danger dialog theme with a red confirm
button; it is the single entry point for delete/leave confirmations
- AgentList, KnowledgeBaseList and OrganizationList drop their hand-rolled
del-*-dialog (span-as-button, circle.png) in favour of useConfirmDelete;
circle.png asset removed
- FAQ single-entry delete gains a confirmation (it deleted immediately);
new knowledgeEditor.faq.confirmDelete key in all five locales
- VectorStore/StorageBackend delete dialogs and the generated-question
popconfirm use the danger theme like the rest of the app
- style guard raster-icon baseline lowered to 10
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(frontend): shared modal shell with Esc, overlay close and unsaved guard
Add composables/useModalShell and wire it into the four full-screen
settings-style modals (Settings, AgentEditorModal,
OrganizationSettingsModal, KnowledgeBaseEditorModal):
- Esc closes the modal everywhere (previously only Settings); it defers
to any open TDesign dialog/drawer/popup and to the agent editor's own
placeholder popups
- overlay click closes everywhere (Settings gains it)
- editors snapshot their form after load/save; closing with unsaved
changes now asks "有未保存的更改 / 放弃更改 / 继续编辑" instead of
silently discarding
- new common.unsavedChanges.* keys in all five locales
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(frontend): mark instant-effect sections in the knowledge base editor
Share, data source and activity sections apply changes immediately, but
the editor footer still showed Cancel / Save, so users either re-saved
or assumed Cancel would undo. Those sections now show an "applies
immediately" note with a single Close button; other sections keep the
Cancel / Save footer. New knowledgeEditor.footer.instantEffect key in all
five locales.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): consistent success wording and confirm labels (zh-CN)
- toasts use the "已X" form everywhere: 25 zh-CN values such as
保存成功 / 删除成功 / 智能体创建成功 become 已保存 / 已删除 / 已创建智能体;
common.copySuccess now reads the same as common.copied
- confirm buttons in dialogs and popconfirms use the bare verb
(删除 / 重置 / 移除 / 应用 ...) instead of 确认X; dialog titles keep 确认删除
- GeneralSettings no longer pops a bare "成功" toast after theme / font /
font-size changes, which are self-evident and applied instantly
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): extract SettingsModalShell for the four settings-style modals
Settings, AgentEditorModal, OrganizationSettingsModal and
KnowledgeBaseEditorModal each carried a copy of the same overlay / panel /
sidebar-nav / footer markup and ~20 CSS blocks, already drifting
(1000/1080/1100px widths, three shadows, different nav paddings).
components/SettingsModalShell.vue now owns that chrome: one 1080x780
panel, grouped nav with badges, optional loading overlay, footer with a
note slot and an actions slot. Consumers keep only their content and
wire `@close` to their useModalShell.requestClose. Settings keeps its
sub-menu nav through the `nav` slot; OrganizationSettingsModal keeps its
image icon through the `nav-icon` slot.
Net: -1025 lines across the four modals.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): shared resource-card mixins and EmptyState for list pages
KnowledgeBaseList, AgentList and OrganizationList each re-declared the
same 136px card (border, radius, shadow, hover, header/title/description/
bottom, more-button reveal, feature badges) with small drifts, plus a
copy of the empty-state block using the upload illustration for every
kind of emptiness.
- components/css/resource-card.less: .resource-card(),
.resource-card-grid() and .resource-feature-badge() mixins; the pages
keep only their own variants (type gradients, favourite star,
decoration). More-buttons stay visible on touch devices.
- components/EmptyState.vue: icon / title / description / actions; the
11 empty states now use a matching TDesign icon instead of upload.svg
- badge accent colours move from hard-coded old-blue / material orange /
pink / slate rgba to color-mix over theme tokens (new
--app-accent-purple in theme.css); style guard legacy-blue baseline
drops from 40 to 18
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): shared settings-section mixins for header, row, info, control
25 settings/system/integration pages each re-declared .section-header,
.setting-row, .setting-info and .setting-control with five different
header margins (18-32px), three description sizes and assorted paddings.
components/css/settings-section.less now provides
.settings-section-header() / .setting-row() / .setting-info() /
.setting-control() / .setting-save-state(); pages keep only their
deliberate deviations (e.g. Ollama's column control, TenantInfo's fixed
label column). PlatformAPIKeys' style block switches to less so it can
use the mixins. Net -570 lines.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): provider-card mixins, dark-safe vendor badges, one spin keyframe
- components/css/provider-card.less: .provider-card() /
-interactive() / -add() / -badge() / -badge-color() / -body() /
-header() / -title() / -subtitle() / -more() shared by the model,
vector store, web search, storage, parser and sandbox settings cards;
MCP and skill cards reuse the 26px badge variant
- vendor badge colours are now `.provider-card-badge-color(#hex)`: the
foreground is mixed 75/25 with the text colour so it stays readable in
dark mode, the background is the same colour at 12% alpha
- 18 copies of a rotate-360 keyframe (steer-spin, chat-header-spin,
sandbox-terminal-spin, ...) collapse into a global `wk-spin` in
theme.css; 23 files updated, one source test adjusted
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): use TDesign password toggle for API keys; align chat toolbar buttons
- ModelEditorDialog: the API key field is a plain t-input type="password"
and relies on TDesign's built-in show/hide eye instead of a hand-rolled
suffix toggle, matching every other secret field in the app
- chat answer toolbar buttons are 28px with 6px radius, the same size as
the user-message actions and the input control bar
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): app design tokens, tokenized literals, global TDesign overrides
theme.css gains an app-level token set derived from the de-facto scale
already used in the codebase, so values do not change:
--app-radius-{xs,sm,md,lg,xl,pill} (4/6/8/10/12/999px)
--app-text-{2xs..4xl} (10..24px)
--app-space-{1..10} (4px grid)
--app-motion-{instant,fast,base,slow} (120/150/200/300ms)
--z-{sticky,dropdown,modal,drawer,popover,toast}
A codemod mapped 675 border-radius, 1904 font-size and 551 transition
duration literals in 191 files onto those tokens (value-preserving; five
source-text tests now accept either form).
assets/theme/tdesign-overrides.less holds global-intent TDesign
overrides; its `.wk-popover` skin replaces six per-file copies of the
blurred popover panel (TenantMembers x2, UserProfile,
OrganizationSettingsModal, systemAdminDialog.less,
share-to-space-panel.overlay.less) without !important.
styleGuard ratchets now also cover radius / font-size / motion literals,
`transition: all`, total `!important` and z-index !important.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(frontend): keep symmetric side insets for the chat column on narrow viewports
.chat had padding 0 0 20px 20px so the scrollbar could sit on the content
edge, but that also left the message list and input box flush against the
right edge whenever the viewport was narrower than 960px + sidebar. The
inset now lives on .msg_list and .input-container (--chat-content-inset,
20px each side, max-width 960px + insets); the scroll container still
spans the full column so the scrollbar stays on the edge. Wide layouts are
unchanged (960px content, centered).
* chore(frontend): strip trailing whitespace flagged by pre-push
* test(frontend): accept tokenized font-size and shell-rendered loading overlay
Two source-text assertions only ran in CI (Node 24 discovers .test.ts,
local Node 20 does not):
- ChatQuestionMinimap: the 13px preview font is now var(--app-text-md)
- modelUsageDetails: the editors' loading overlay is rendered by
SettingsModalShell via :loading instead of an inline v-if
Both regexes now accept either form.
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* feat(knowledge): add batch file downloads
* fix(knowledge): harden batch file downloads
Skip entries without original files, keep folder paths in the ZIP, map
client cancel to 400, and cap concurrent archives so a full-select
download is usable without 500s or disk pile-up.
* fix(knowledge): format batch-download tests for pre-push lint
---------
Co-authored-by: wizardchen <wizardchen@tencent.com>
* feat(datasource): add Confluence sync
* fix(confluence): resume full sync and list Server pages without CQL
CQL search silently truncates large spaces and can delete pages that
dropped out of the index. Full-sync checkpoints now keep a deletion
baseline so Asynq retries continue instead of restarting.
* fix(confluence): satisfy package lint for pre-push against main
* fix(confluence): parse Server page lists and keep version expand
The default Server/DC edition unmarshaled /content/page as a nested
envelope, so sync imported zero pages. Pagination next links also drop
expand=version,space, which made later pages versionless and hid edits.
* fix(confluence): classify errors and fail closed on empty listings
Raw Confluence error bodies were copied into sync-log UI, and pagination
next links could leave the configured context path via `..`. Empty
listings against a non-empty baseline now abort instead of deleting.
---------
Co-authored-by: wizardchen <wizardchen@tencent.com>
- Added folder options to the upload confirmation dialog, allowing users to select from existing folders as upload destinations.
- Updated folder tree UI to improve folder browsing experience, displaying sub-folders and documents more intuitively.
- Enhanced folder picker functionality to support creating new sub-folders directly from the picker.
- Improved localization for folder-related strings across multiple languages.
- Refactored related components and tests to accommodate new features and ensure proper functionality.
This commit streamlines the user experience for managing folders and uploading documents, making it easier to navigate and organize content.
Two things the folder UI got wrong.
The rename state used the empty string to mean "nothing is being renamed",
but the empty string is also the root folder's own path, so the root row
matched and permanently rendered a stray rename input. The sentinel is now
null, and rename is additionally gated on the row being a real folder, so no
sentinel value can reach the root again.
Moving documents also did not deserve a modal dialog: it is one small,
reversible choice. In a row's menu the picker is now another level of the menu
that is already open, mirroring the "move to knowledge base" sub-menu right
next to it; in the batch bar it hangs off the button. Picking a folder performs
the move, since there is nothing else to confirm.
The upload destination line was also mangling folder names: truncating from the
left with direction: rtl reorders CJK text. It now shows the destination's last
segment with the full path in the title, reads as a quiet line instead of a
grey banner, and only appears when the destination is not the top level.
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.
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.
Restore onVisibleChange in card menu close handler so moveMenuMode resets correctly, and align list view popup chrome with card view via shared card-more styles.
- Add DocumentActionMenu.vue: shared component for document context menu
items (edit, view-trace, rebuild, cancel-parse, move, batch-manage,
delete) with consistent visibility conditions
- Add DocumentCardView.vue: standalone card/grid view component extracted
from KnowledgeBase.vue inline template, including hover popover, tag
chips, move sub-flow, and status display
- Update DocumentListView.vue: use shared DocumentActionMenu, add
canMutateKnowledge gating for move/batch-manage, add view-trace and
batch-manage menu items, add move sub-flow support (targets/confirm)
- Update KnowledgeBase.vue: use DocumentCardView component, add
handleCardAction bridge, remove unused helpers and imports
Both card and list views now render identical operation menus from a
single source of truth.