diff --git a/web/components/layout/side-bar.tsx b/web/components/layout/side-bar.tsx index 77cf93ef4..eaee795fa 100644 --- a/web/components/layout/side-bar.tsx +++ b/web/components/layout/side-bar.tsx @@ -1,7 +1,7 @@ import { ChatContext } from '@/app/chat-context'; import { delDialogue, getDialogueList } from '@/client/api/request'; import { apiInterceptors } from '@/client/api/tools/interceptors'; -import { DarkSvg, SunnySvg } from '@/components/icons'; +import { DarkSvg, ModelSvg, SunnySvg } from '@/components/icons'; import UserBar from '@/new-components/layout/UserBar'; import type { IChatDialogueSchema } from '@/types/chat'; import { STORAGE_LANG_KEY, STORAGE_THEME_KEY } from '@/utils/constants/index'; @@ -68,6 +68,7 @@ function SideBar() { pathname.startsWith('/construct/flow') || pathname.startsWith('/construct/prompt') || pathname.startsWith('/construct/dbgpts') || + pathname.startsWith('/construct/models') || pathname === '/models_evaluation'; const { t, i18n } = useTranslation(); const [logo, setLogo] = useState('/logo_zh_latest.png'); @@ -192,6 +193,21 @@ function SideBar() { {t('app_management')} +
{ + router.push('/construct/models'); + setSettingsOpen(false); + }} + className={cls( + 'flex items-center gap-3 px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer transition-colors', + { + 'bg-blue-50 text-blue-600 dark:bg-blue-900/20 dark:text-blue-400': pathname.startsWith('/construct/models'), + }, + )} + > + + {t('model_manage')} +
{ router.push('/construct/flow'); diff --git a/web/locales/en/common.ts b/web/locales/en/common.ts index 6f5abc51b..aa1ad6f47 100644 --- a/web/locales/en/common.ts +++ b/web/locales/en/common.ts @@ -485,4 +485,13 @@ export const CommonEn = { skills_github_importing: 'Importing skill...', skills_github_import_success: 'Skill imported successfully', skills_github_import_failed: 'Failed to import skill', + skills_import_hint: 'The import address should be the folder directory containing', + skills_import_hint_suffix: '. The system will automatically pull all files in the directory and package them.', + skills_import_folder_label: 'Skill folder address', + skills_import_folder_hint: '— If SKILL.md is in a subdirectory, enter the full path', + skills_import_url_required: 'Please enter the GitHub repository URL', + skills_import_example_label: 'Example:', + skills_import_url_valid: 'URL format is correct, click "Import" to start pulling', + skills_import_url_invalid: 'Please enter a valid GitHub URL', + skills_updated_at: 'Updated on {{date}}', } as const; diff --git a/web/locales/zh/common.ts b/web/locales/zh/common.ts index caf479ab8..689a65959 100644 --- a/web/locales/zh/common.ts +++ b/web/locales/zh/common.ts @@ -488,4 +488,13 @@ export const CommonZh: Resources['translation'] = { skills_github_importing: '正在导入技能...', skills_github_import_success: '技能导入成功', skills_github_import_failed: '技能导入失败', + skills_import_hint: '导入地址为包含', + skills_import_hint_suffix: '的文件夹目录地址。系统会自动拉取该目录下的所有文件并打包。', + skills_import_folder_label: 'Skill 文件夹地址', + skills_import_folder_hint: '— 若 SKILL.md 在子目录中,需填写完整路径', + skills_import_url_required: '请输入 GitHub 仓库地址', + skills_import_example_label: '例如:', + skills_import_url_valid: '链接格式正确,点击「导入」开始拉取', + skills_import_url_invalid: '请输入有效的 GitHub 地址', + skills_updated_at: '更新于 {{date}}', } as const; diff --git a/web/pages/construct/skills/index.tsx b/web/pages/construct/skills/index.tsx index 02dca6878..5bc0245b1 100644 --- a/web/pages/construct/skills/index.tsx +++ b/web/pages/construct/skills/index.tsx @@ -422,7 +422,7 @@ function Skills() { @{skill.author || 'unknown'} )} · - {'更新于 2026年2月6日'} + {t('skills_updated_at', { date: '2026-02-06' })}
- 导入地址为包含{' '} + {t('skills_import_hint')}{' '} SKILL.md {' '} - 的文件夹目录地址。系统会自动拉取该目录下的所有文件并打包。 + {t('skills_import_hint_suffix')}
@@ -613,17 +613,17 @@ function Skills() { name='github_url' label={ - Skill 文件夹地址 + {t('skills_import_folder_label')} - — 若 SKILL.md 在子目录中,需填写完整路径 + {t('skills_import_folder_hint')} } - rules={[{ required: true, message: '请输入 GitHub 仓库地址' }]} + rules={[{ required: true, message: t('skills_import_url_required') }]} className='mb-2' extra={
- 例如: + {t('skills_import_example_label')} - 链接格式正确,点击「导入」开始拉取 + {t('skills_import_url_valid')} ) : ( <> - 请输入有效的 GitHub 地址 + {t('skills_import_url_invalid')} )}