diff --git a/.project-docs/30-worklog/tasks/20261013-chat-knowledge-import-explain-ec03b792.md b/.project-docs/30-worklog/tasks/20261013-chat-knowledge-import-explain-ec03b792.md index 24bb290b..612cc332 100644 --- a/.project-docs/30-worklog/tasks/20261013-chat-knowledge-import-explain-ec03b792.md +++ b/.project-docs/30-worklog/tasks/20261013-chat-knowledge-import-explain-ec03b792.md @@ -8,7 +8,7 @@ - Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20261013-chat-knowledge-import-explain-ec03b792 - Base commit: c634425cc669f1da66e725649a386bf09661a70c - Owner: codex -- Status: Ready for Integration +- Status: Planning ## Scope @@ -75,3 +75,13 @@ - First activation held at preflight: route `#/cloud-agents?view=mine`, unsent input and beforeunload protection were true; no unsaved configuration, background lease or trusted interaction. Pointer/compat/Main were unchanged and Inspector was closed. User then explicitly answered 「允许清除这些输入并刷新」. Added a one-run authorization flag for existing inputs and beforeunload, retaining dialog, pending-file, running-work, lease and fresh-user-interaction guards. Electron's pinned declaration confirms the one-time will-prevent-unload handler permits only this authorized reload; no business-data deletion or cloud cancellation occurs. Separate authorization/helper rebind receipt retained. - Final activation succeeded: current Renderer/effective source is 2d4e44f, Main remains 7c51bb4 / PID9968 / port58003, immutable current-stage and predecessor artifacts retained. Actual loaded JS/CSS match the new snapshot; same stable file URL, current route, profile, login, foreground PID1353 and closed Inspector verified. Application did not restore the cleared local input. `prepare.py --verify` independently reports active-verified. - Root performed an additional read-only DOM probe: authenticated My Agents list settled with five cards, mounted app, original hash, no login form or visible alert, unchanged foreground and same Main. No names, credentials or input text were read/recorded, no account/Agent/file operation occurred. The original list does not display knowledge configuration; no forced navigation was made. Knowledge layout evidence is the tested source/fixtures at four widths and exact actual loaded Renderer assets, distinct from a live cloud knowledge ingestion test. Durable receipts are overlay-manifest.json, verification-receipt.json, live-dom-probe-receipt.json and retained preflight/helper-authorization evidence. + +## Equal-height / Copy Follow-up + +- Ownership/Planning Gates Passed on same-task resume: successful bundled start and exact task/feature/branch/worktree/base verified; active record and relevant current source/runtime read. Unchanged startup/domain/decisions/evidence context retained. All peer Scope/Intent/Promotion sections read-only. The active draft-conflict task has no defined scope yet; its unknown coordination state does not establish a concrete dependency for these CSS/copy edits. Avoid its dirty source. +- User explicitly requests the top left/right knowledge cards have matching height, deletes the full right-side 「使用说明与费用」 disclosure and content, and deletes both normal multi-select and save/apply/read-only description paragraphs. Keep the actual 100-library-limit message and underlying selection/save/processing behavior. +- Current verified deployed Renderer/effective source is 2cc542f under settings-account overlay, same Main PID9968/port58003. Preserve its latest committed homepage/settings/account changes when assembling the new update; no canonical/peer-doc changes. User's instruction to update the temporary application persists. The previous clear-input authorization was for the completed prior refresh, so fresh user changes remain protected. +- Plan: restore committed current product/test state where changed, keep the owned record; apply grid stretch and remove only requested prose/disclosure/unused exclusive style. Update focused existing tests/README, run knowledge suites/typecheck/lint/build and four-width fixture geometry. Prepare a fresh task-owned overlay using the proven previous helper and fresh current pointer; root activates after quiet-state protection, verifies actual loaded assets and records the result. +- Implementation complete: grid stretches both top cards to the same row height, including creation forms and document rows; narrow cards retain independent vertical flow. The entire right help disclosure and two requested selection paragraphs are removed, while the actual full-selection limit message remains conditional. Imported current 2cc product/test/README state has no knowledge conflict; independent review confirms Main/shared/resources/package identical to 7c. +- Verification: 6 knowledge/page/guidance/workflow unit files / 100 tests, 5 headless scenarios at 375/768/1024/1440, typecheck/full build/scoped 21-file ESLint and whitespace checks passed. Geometry assertions include empty, expanded creation and ready-document equal heights; root inspected the desktop screenshot. All 66 non-Renderer artifacts are byte-identical to immutable Main snapshot. +- Fresh stage knowledge-align-20261013-ec03b792 reuses prior guards with default input-discard authorization false, unique marker/temp names and fresh predecessor binding. It recognizes implicit fieldset knowledge groups, checks equal heights and removed copy, and restores an originally selected Advanced tab without changing any field. Saved configuration TEXTAREA values are excluded from unsent-input detection only when the visible fixed saved indicator and inactive beforeunload prove the configuration is saved; new creation/chat inputs and all real pending/dirty/interaction protections remain. diff --git a/README.md b/README.md index fa404db3..45f3b925 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Code 会话保存的模型被下架后,会提示重新选择可用模型;用户可在原会话中切换,恢复时使用新选择并保留会话与历史消息。切换不会自动重发消息或自动选择替代模型。 -Makelore 是一个面向软件、视觉创作、智能机器人与个人云智能体的 AI 桌面工作台。当前版本为 `2.0.0`,首页展示 Agents、Code、Canvas 三个模块入口,Robot 入口隐藏;云智能体需配套配置 WS/Yuxi 服务。桌面采用左侧问候与标题、右侧三个横向插画卡片竖排的布局,Code 入口中心与“今天,想创作什么?”标题中心对齐,三个入口等高、间距均匀;标题组在桌面向右偏移约 1.5cm,小窗口将标题放在卡片上方;Agents 标语为“打造你想象中的AI助手”。首页左下角保留半尺寸的账户入口,向左偏移约 1.5cm(小窗口保留边距)并靠近底部;展开菜单保持原尺寸,可查看本人词元点数与预占、打开词元点数与充值、个人资料、设置和退出登录;沿用侧栏的账号、钱包和资料规则。工作区左上角入口点击后返回模块入口页: +Makelore 是一个面向软件、视觉创作、智能机器人与个人云智能体的 AI 桌面工作台。当前版本为 `2.0.0`,首页展示 Agents、Code、Canvas 三个模块入口,Robot 入口隐藏;云智能体需配套配置 WS/Yuxi 服务。桌面采用左侧问候与标题、右侧三个横向插画卡片竖排的布局,Code 入口中心与“今天,想创作什么?”标题中心对齐,三个入口等高、间距均匀;标题组在桌面向右偏移约 1.5cm,小窗口将标题放在卡片上方;Agents 标语为“打造你想象中的AI助手”。各页左下角账户按钮统一沿用 Code 的白色圆角卡片、头像、字号和右箭头,展开时跟随 Code 侧栏宽度偏好,首页和设置页与 Code 保持相同的左侧与底部边距;展开菜单保持原尺寸,可查看本人词元点数与预占、打开词元点数与充值、个人资料、设置和退出登录;沿用侧栏的账号、钱包和资料规则。设置使用独立页面,不显示编程项目栏、项目标题或工作栏收起按钮;“返回”回到打开设置前的页面(保留查询参数),直接打开设置时回模块首页,未保存设置先保存或还原。工作区左上角入口点击后返回模块入口页: - `Makelore Code|AI 编程`:管理本地项目、项目智能体、对话、文件上下文、代码变更和运行时。 会话工作台采用浅蓝项目栏、彩色通用手柄图标与卡片选中态;中间对话/作品使用圆角标签,作品预览的后退、前进、刷新与网址输入统一放在标签右侧;只在作品页显示,窄窗口自动换行。右侧智能体咨询使用奶油色标题区。沿用真实项目和会话入口、侧栏伸缩与账户菜单,样式只作用于 Code 会话工作台。可编辑的空对话在输入区上方的可用区域中央显示童趣欢迎语;「去作品广场逛逛」入口紧贴输入框上方,两者一起位于底部。老师介绍以固定宽度浮在右上角,不占用中间布局;欢迎语和底部输入区始终相对项目栏右侧的整个内容区域居中;小窗口的欢迎内容独立滚动;发送首条消息后收起欢迎区。侧栏保留「作品广场」入口,只有点击后才在系统浏览器打开公共广场,不请求、摘取或内嵌展示广场作品。打开广场保留当前项目、对话、草稿和附件,不自动发送消息;老师求助按钮保留临时应用的最新文案「帮我整体看🧠」。 @@ -16,7 +16,7 @@ Makelore 是一个面向软件、视觉创作、智能机器人与个人云智 历史待确认记录收起在智能体列表标题区的「创建记录/待处理记录」入口,只有点击后才打开记录窗口;配置、聊天和创建页不再置顶这些旧提醒。记录保留智能体名称和原请求身份,用户可明确「再试一次」或「不再提醒」,不会自动重试或清除。当前创建失败继续在创建表单内提示;关闭记录窗口保留已收到的结果和密钥,切换配置、聊天或创建页后可返回列表继续查看。密钥须明确关闭结果后,才可处理其他记录。 - 高级配置的知识库支持下拉多选,分为「MakeLore知识」和「我的知识库」,已选项可单独移除。MakeLore知识来自当前账号有权读取的 Yuxi 共享目录,只显示名称与简介;移除仅取消当前智能体选用,不删除原库。知识库区域上方左右分区:左侧「上传自己的文件」仅放「新建知识库」入口及展开的创建表单,右侧「查看我的知识库」通过下拉框查看本人知识库、从电脑追加资料和管理文件;下方独立「选择知识库」,选择智能体使用的「MakeLore知识」和「我的知识库」。小窗口按新建、查看、选用顺序纵向排列。创建成功后在右侧打开新库;新建和查看均不会自动加入智能体配置,选用上限不影响管理与新建。仅提供「从电脑上传」作为添加文件入口,未选择管理目标时上传按钮置灰;聊天文件导入入口已移除。上传后自动解析、建立索引并持续显示真实处理状态;失败可重试且保留已有可用内容。使用说明与费用以折叠说明呈现。暂不可选用的个人库仍可管理文件,已有绑定保留并提示不可用;未确认请求在当前库保留同一操作身份供重试。知识库选择只改草稿,显式保存/应用后生效;个人云端执行已自动接入所选知识库的检索,无需另外勾选 knowledge-base Skill。此交互复用现有接口,无需新增后端补丁。 + 高级配置的知识库支持下拉多选,分为「MakeLore知识」和「我的知识库」,已选项可单独移除。MakeLore知识来自当前账号有权读取的 Yuxi 共享目录,只显示名称与简介;移除仅取消当前智能体选用,不删除原库。知识库区域上方左右分区,两张卡片在并排时保持等高:左侧「上传自己的文件」仅放「新建知识库」入口及展开的创建表单,右侧「查看我的知识库」通过下拉框查看本人知识库、从电脑追加资料和管理文件;下方独立「选择知识库」,选择智能体使用的「MakeLore知识」和「我的知识库」。小窗口按新建、查看、选用顺序纵向排列。创建成功后在右侧打开新库;新建和查看均不会自动加入智能体配置,选用上限不影响管理与新建。仅提供「从电脑上传」作为添加文件入口,未选择管理目标时上传按钮置灰;聊天文件导入入口已移除。上传后自动解析、建立索引并持续显示真实处理状态;失败可重试且保留已有可用内容。暂不可选用的个人库仍可管理文件,已有绑定保留并提示不可用;未确认请求在当前库保留同一操作身份供重试。知识库选择只改草稿,显式保存/应用后生效;个人云端执行已自动接入所选知识库的检索,无需另外勾选 knowledge-base Skill。此交互复用现有接口,无需新增后端补丁。 云知识库的 embedding 模型只由平台管理员在 Yuxi 后台维护:在「智能体管理 → 模型供应商」启用供应商,按供应商要求填写有效的服务地址和 API Key,添加并启用 embedding 模型并填写实际向量维度;embedding 向量化费用由平台承担,不计入用户用量、词元点数或智能体费用上限;one-api 不参与 embedding 配置,Works Square 只负责其他应计费模型调用的创建者词元点数账本。客户端区分目录加载中、加载失败与无可用模型,空状态提供管理员配置说明;「刷新知识库与模型」保留未提交名称,未确认的创建请求沿用原操作身份。 diff --git a/src/components/account/AccountMenuTrigger.tsx b/src/components/account/AccountMenuTrigger.tsx new file mode 100644 index 00000000..88ca7bd8 --- /dev/null +++ b/src/components/account/AccountMenuTrigger.tsx @@ -0,0 +1,38 @@ +import { forwardRef, type ButtonHTMLAttributes } from 'react'; +import { ChevronRight } from 'lucide-react'; +import { UserAvatar } from '@/components/profile/UserAvatar'; +import { getAccountInitial } from '@/components/profile/user-avatar-utils'; +import { cn } from '@/lib/utils'; + +export interface AccountMenuTriggerProps extends ButtonHTMLAttributes { + accountName: string; + avatarUrl?: string | null; + collapsed?: boolean; + expandedWidth?: number; + open?: boolean; + avatarTestId?: string; + surfaceTestId?: string; +} + +/** Shared Code account appearance; the containing menu owns behavior and width preferences. */ +export const AccountMenuTrigger = forwardRef( + function AccountMenuTrigger({ + accountName, avatarUrl, collapsed = false, expandedWidth = 150, open = false, + avatarTestId, surfaceTestId, className, style, type = 'button', ...props + }, ref) { + return ; + }, +); diff --git a/src/components/account/HomeAccountMenu.tsx b/src/components/account/HomeAccountMenu.tsx index edc0b1ba..e2507b33 100644 --- a/src/components/account/HomeAccountMenu.tsx +++ b/src/components/account/HomeAccountMenu.tsx @@ -1,11 +1,16 @@ import { useEffect, useRef, useState } from 'react'; -import { ChevronUp, LogOut, Settings, UserCircle2 } from 'lucide-react'; -import { useNavigate } from 'react-router-dom'; +import { LogOut, Settings, UserCircle2 } from 'lucide-react'; +import { useLocation, useNavigate } from 'react-router-dom'; +import { toast } from 'sonner'; import { UserAvatar } from '@/components/profile/UserAvatar'; import { getAccountInitial } from '@/components/profile/user-avatar-utils'; import { DisclosureContent } from '@/components/ui/disclosure'; import { useAuthStore } from '@/stores/auth'; +import { useSettingsStore } from '@/stores/settings'; +import { normalizeClassroomSidebarWidth } from '@/lib/classroom-layout'; +import { canLeaveCurrentPage, getSettingsReturnState } from '@/lib/settings-navigation'; import { PointWallet } from './PointWallet'; +import { AccountMenuTrigger } from './AccountMenuTrigger'; export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: { accountName: string; @@ -14,7 +19,9 @@ export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: { }) { const user = useAuthStore(state => state.user); const logout = useAuthStore(state => state.logout); + const expandedWidth = useSettingsStore(state => normalizeClassroomSidebarWidth(state.classroomSidebarWidth) - 21); const navigate = useNavigate(); + const location = useLocation(); const [open, setOpen] = useState(false); const [loggingOut, setLoggingOut] = useState(false); const [error, setError] = useState(''); @@ -48,26 +55,20 @@ export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: { if (!user) return null; - return
- + }} /> { if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return; @@ -87,7 +88,10 @@ export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: { + onClick={() => { + if (!canLeaveCurrentPage()) { toast.info('请先保存当前修改,再打开设置。'); return; } + setOpen(false); navigate('/settings', { state: getSettingsReturnState(location) }); + }}>设置
); } diff --git a/src/components/layout/SettingsLayout.tsx b/src/components/layout/SettingsLayout.tsx new file mode 100644 index 00000000..16daa8e7 --- /dev/null +++ b/src/components/layout/SettingsLayout.tsx @@ -0,0 +1,11 @@ +import { Outlet } from 'react-router-dom'; +import { TitleBar } from './TitleBar'; +import { StandaloneAccountDock } from '@/components/account/StandaloneAccountDock'; + +export function SettingsLayout() { + return
+ +
+ +
; +} diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index dcd14316..a4cdc38c 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -36,6 +36,8 @@ import { subscribeCodingProjectOpenRequest, } from '@/lib/coding-project-entry'; import { PointWallet } from '@/components/account/PointWallet'; +import { AccountMenuTrigger } from '@/components/account/AccountMenuTrigger'; +import { canLeaveCurrentPage, getSettingsReturnState } from '@/lib/settings-navigation'; import { cn } from '@/lib/utils'; import { useCurrentUserProfile } from '@/hooks/use-current-user-profile'; import type { SidebarPeekSource } from './sidebar-peek'; @@ -361,8 +363,9 @@ export function Sidebar({ }; const navigateFromAccountMenu = (path: string) => { + if (path === '/settings' && !canLeaveCurrentPage()) { toast.info('请先保存当前修改,再打开设置。'); return; } setAccountMenuOpen(false); - navigate(path); + navigate(path, path === '/settings' ? { state: getSettingsReturnState(location) } : undefined); }; const openProfileDialog = () => { @@ -810,42 +813,26 @@ export function Sidebar({ onOpenChange={setProfileDialogOpen} /> -
+
-
- +
+
+ setAccountMenuOpen((open) => !open)} + /> +
void handleClick()} className={cn( - 'motion-press flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-accent/30 bg-accent text-primary-foreground shadow-soft hover:bg-accent-strong disabled:cursor-wait disabled:opacity-80', + 'motion-press flex h-10 w-10 max-w-full shrink-0 items-center justify-center rounded-full border border-accent/30 bg-accent text-primary-foreground shadow-soft hover:bg-accent-strong disabled:cursor-wait disabled:opacity-80', collapsed && 'shadow-none', )} > diff --git a/src/components/layout/TitleBar.tsx b/src/components/layout/TitleBar.tsx index 00a8ad64..043df9b1 100644 --- a/src/components/layout/TitleBar.tsx +++ b/src/components/layout/TitleBar.tsx @@ -212,6 +212,7 @@ function ProductTitleBar({ data-testid="titlebar-main-surface" className={cn( 'relative flex min-w-0 flex-1 bg-background', + nativeTrafficLights && !nativeFullscreen && !showSidebarControls && !overlay && 'pl-[88px]', overlay && 'pointer-events-none border-b-0 bg-transparent', nativeTrafficLights && 'drag-region', !overlay && (workspaceLayout || sidebarTitlebarHidden ? 'border-b-0' : 'border-b border-border/80'), diff --git a/src/lib/settings-navigation.ts b/src/lib/settings-navigation.ts new file mode 100644 index 00000000..cd54837b --- /dev/null +++ b/src/lib/settings-navigation.ts @@ -0,0 +1,30 @@ +import { AI_MODULE_SELECTION_PATH, getGuardedAiModuleForPath } from './ai-modules'; + +type SettingsLocation = { pathname: string; search?: string; hash?: string; state?: unknown }; + +function localReturnPath(value: unknown): string | null { + if (typeof value !== 'string' || !value.startsWith('/') || value.startsWith('//') || value.includes('\\')) return null; + try { + const target = new URL(value, 'https://makelore.local'); + if (target.origin !== 'https://makelore.local') return null; + if (target.pathname !== AI_MODULE_SELECTION_PATH && !getGuardedAiModuleForPath(target.pathname)) return null; + return `${target.pathname}${target.search}${target.hash}`; + } catch { return null; } +} + +export function getSettingsReturnPath(state: unknown): string { + const candidate = state && typeof state === 'object' && 'settingsReturnTo' in state + ? (state as { settingsReturnTo?: unknown }).settingsReturnTo : null; + return localReturnPath(candidate) ?? AI_MODULE_SELECTION_PATH; +} + +export function getSettingsReturnState(location: SettingsLocation): { settingsReturnTo: string } { + const inSettings = location.pathname === '/settings' || location.pathname.startsWith('/settings/'); + return { settingsReturnTo: inSettings ? getSettingsReturnPath(location.state) + : localReturnPath(`${location.pathname}${location.search ?? ''}${location.hash ?? ''}`) ?? AI_MODULE_SELECTION_PATH }; +} + +/** Honor the current page's existing unsaved-input protection before internal navigation. */ +export function canLeaveCurrentPage(): boolean { + return typeof window === 'undefined' || window.dispatchEvent(new Event('beforeunload', { cancelable: true })); +} diff --git a/src/pages/Chat/classroom-workspace.css b/src/pages/Chat/classroom-workspace.css index ec6e0d00..a562e52c 100644 --- a/src/pages/Chat/classroom-workspace.css +++ b/src/pages/Chat/classroom-workspace.css @@ -36,8 +36,7 @@ [data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row[data-selected="true"] { background: #e0ecfa; border-color: #cedef0; color: #304f75; } [data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row > button:first-child { min-height: 35px; gap: 7px; } [data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row > button:first-child > svg { color: #7891af; } -[data-testid="sidebar"][data-classroom="true"] .classroom-account-footer { padding: 10px 10px 12px; border-top: 1px solid #dde5ee; background: #edf3f9; } -[data-testid="sidebar"][data-classroom="true"] [data-testid="sidebar-member-menu-trigger"] { min-height: 42px; border: 1px solid #d9e3ee; border-radius: 11px; background: #fff; font-size: 12px; } +[data-testid="sidebar"][data-classroom="true"] .classroom-account-footer { border-top: 1px solid #dde5ee; background: #edf3f9; } .classroom-workspace [data-testid="coding-conversation-header"] { border-bottom-color: #e8edf3; background: #fff; color: #304968; } .classroom-tabs { display: flex; flex-shrink: 0; height: 46px; gap: 9px; padding: 6px 22px; border-bottom: 1px solid #e8edf3; } .classroom-workspace-toolbar { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; gap: 6px 12px; min-height: 46px; padding: 6px 22px; border-bottom: 1px solid #e8edf3; } diff --git a/src/pages/CloudAgents/CloudKnowledge.tsx b/src/pages/CloudAgents/CloudKnowledge.tsx index f3edb6cd..945cde7e 100644 --- a/src/pages/CloudAgents/CloudKnowledge.tsx +++ b/src/pages/CloudAgents/CloudKnowledge.tsx @@ -120,10 +120,6 @@ export function CloudKnowledgePanel({ slug, onCreated, onDeleted, onCatalog, ref
{documentPending && selectedKnowledge &&

有未确认的文件操作,请先在当前知识库重试或确认状态,再切换知识库。

} -
- 使用说明与费用 -

上传到知识库的文档可供获准使用此智能体的人检索。解析并建立索引后才会生效;embedding 向量化由平台承担,不计入用户用量、词元点数或智能体费用上限。知识处理如触发对话模型调用,仍按原模型实际用量计费。

-
{!catalogLoading && !catalogError && !manageable.length &&

还没有可管理的知识库,可以新建一个保存自己的文件。MakeLore知识仅供检索。

} {selectedKnowledge && selectableIds !== undefined && !bindable(selectedKnowledge.kb_id) &&

{selectableIds === null ? '知识库选用状态待确认。' : '这个知识库当前暂不可选用。'}你仍可管理自己的文件,刷新目录后再试。 diff --git a/src/pages/CloudAgents/CloudKnowledgeSelector.tsx b/src/pages/CloudAgents/CloudKnowledgeSelector.tsx index 0c78f04a..59764810 100644 --- a/src/pages/CloudAgents/CloudKnowledgeSelector.tsx +++ b/src/pages/CloudAgents/CloudKnowledgeSelector.tsx @@ -34,7 +34,7 @@ export function CloudKnowledgeSelector({ slug, options, selected, disabled, load

-

{selectionFull ? '已选满100个知识库,请先移除一个再选择。' : '可多选,每次选择一个知识库加入配置。'}

+ {selectionFull &&

已选满100个知识库,请先移除一个再选择。

} {error ?

知识库目录读取失败,请刷新重试。

: !loading && ownedIds !== null && options.every(option => ownedIds.includes(option.key)) &&

暂无可选的MakeLore知识。平台开放给你读取的知识库会出现在这里。

} {owned.error &&

我的知识库目录暂不可用,仍可选用可读取的知识;上传文件请刷新重试。

} @@ -56,7 +56,6 @@ export function CloudKnowledgeSelector({ slug, options, selected, disabled, load ; })} :

还没有选择知识库

} -

选择后保存并应用配置,智能体即可使用这些知识。MakeLore知识只可检索,无法在这里修改。

; } diff --git a/src/pages/CloudAgents/agent-config.css b/src/pages/CloudAgents/agent-config.css index 151fa693..430b1b65 100644 --- a/src/pages/CloudAgents/agent-config.css +++ b/src/pages/CloudAgents/agent-config.css @@ -43,16 +43,13 @@ .agent-config-resource-manager > details { border-radius: 14px; background: #ffffffa8; } .agent-resource-card:has(.agent-knowledge-workspace) { container-type: inline-size; } .agent-knowledge-workspace { display: grid; gap: 18px; min-width: 0; } -.agent-knowledge-owned-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: 18px; min-width: 0; } +.agent-knowledge-owned-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: stretch; gap: 18px; min-width: 0; } .agent-knowledge-upload, .agent-knowledge-management, .agent-knowledge-selection { min-width: 0; padding: 18px; border: 1px solid #dce5e0; border-radius: 17px; background: #fffdfb; overflow-wrap: anywhere; } .agent-knowledge-upload { border-color: #dce5f3; } .agent-knowledge-panel-heading { display: flex; align-items: center; gap: 9px; color: #33485c; } .agent-knowledge-panel-heading h3 { font-size: 16px; font-weight: 650; line-height: 1.5; } .agent-knowledge-panel-heading svg { flex-shrink: 0; color: #607d72; } .agent-knowledge-upload .agent-knowledge-panel-heading svg { color: #4a6e9c; } -.agent-knowledge-help { border-top: 1px solid #e8e6e1; padding-top: 12px; } -.agent-knowledge-help summary { min-height: 28px; width: fit-content; cursor: pointer; color: #606c7e; font-size: 12px; line-height: 1.7; } -.agent-knowledge-help summary:focus-visible { outline: 2px solid #9a7bb5; outline-offset: 3px; border-radius: 4px; } .agent-knowledge-selection ul { max-height: 480px; overflow: auto; overscroll-behavior: contain; } .agent-knowledge-selection button { flex-shrink: 0; } @container (max-width: 620px) { .agent-knowledge-owned-workspace { grid-template-columns: minmax(0, 1fr); } } diff --git a/src/pages/ModuleSelection/index.tsx b/src/pages/ModuleSelection/index.tsx index 9d39cd6e..1efc7209 100644 --- a/src/pages/ModuleSelection/index.tsx +++ b/src/pages/ModuleSelection/index.tsx @@ -116,7 +116,7 @@ export function ModuleSelection({ authRequired = true }: { authRequired?: boolea })}
- {authenticated && authUser &&