diff --git a/packages/web/src/components/file-manager/index.vue b/packages/web/src/components/file-manager/index.vue index 20c38daf..bdfa127b 100644 --- a/packages/web/src/components/file-manager/index.vue +++ b/packages/web/src/components/file-manager/index.vue @@ -28,21 +28,25 @@ import { pathSegments, joinPath } from './utils' import FileList from './file-list.vue' import FileViewer from './file-viewer.vue' -const props = defineProps<{ +const props = withDefaults(defineProps<{ botId: string -}>() + syncUrl?: boolean +}>(), { + syncUrl: true, +}) const { t } = useI18n() const route = useRoute() const router = useRouter() -const currentPath = useSyncedQueryParam('path', '/data') +const currentPath = props.syncUrl ? useSyncedQueryParam('path', '/data') : ref('/data') const entries = ref([]) const listLoading = ref(false) const openFile = ref(null) function syncFileToUrl(filePath: string | null) { + if (!props.syncUrl) return const current = route.query.file as string | undefined const next = filePath || undefined if (current !== next) { @@ -51,6 +55,7 @@ function syncFileToUrl(filePath: string | null) { } function restoreFileFromUrl() { + if (!props.syncUrl) return const filePath = route.query.file as string | undefined if (filePath && !openFile.value) { const name = filePath.split('/').pop() ?? '' diff --git a/packages/web/src/components/monaco-editor/index.vue b/packages/web/src/components/monaco-editor/index.vue index 61bc8a75..4b72a1a4 100644 --- a/packages/web/src/components/monaco-editor/index.vue +++ b/packages/web/src/components/monaco-editor/index.vue @@ -39,7 +39,7 @@ function resolveLanguage(): string { } function resolveTheme(): string { - return settings.theme === 'dark' ? 'vs-dark' : 'vs' + return settings.theme === 'dark' ? 'vitesse-dark' : 'vitesse-light' } onMounted(() => { diff --git a/packages/web/src/i18n/locales/en.json b/packages/web/src/i18n/locales/en.json index 742b28f8..0ea52568 100644 --- a/packages/web/src/i18n/locales/en.json +++ b/packages/web/src/i18n/locales/en.json @@ -135,7 +135,8 @@ "toolRunning": "Running", "toolInput": "Input", "toolResult": "Result", - "unknownUser": "{platform} User" + "unknownUser": "{platform} User", + "files": "Files" }, "models": { "title": "Models", diff --git a/packages/web/src/i18n/locales/zh.json b/packages/web/src/i18n/locales/zh.json index a77a3c0c..9ff122e3 100644 --- a/packages/web/src/i18n/locales/zh.json +++ b/packages/web/src/i18n/locales/zh.json @@ -131,7 +131,8 @@ "toolRunning": "运行中", "toolInput": "输入", "toolResult": "结果", - "unknownUser": "{platform}用户" + "unknownUser": "{platform}用户", + "files": "文件管理" }, "models": { "title": "模型", diff --git a/packages/web/src/main.ts b/packages/web/src/main.ts index a54efafd..834ed00e 100644 --- a/packages/web/src/main.ts +++ b/packages/web/src/main.ts @@ -54,6 +54,7 @@ import { faVideo, faEnvelope, faChartLine, + faFolderOpen, } from '@fortawesome/free-solid-svg-icons' import { faRectangleList, @@ -110,6 +111,7 @@ library.add( faMicrosoft, faEnvelope, faChartLine, + faFolderOpen, faYandex, ...customSearchIcons, ) diff --git a/packages/web/src/pages/chat/components/chat-area.vue b/packages/web/src/pages/chat/components/chat-area.vue index 1071b218..4a1d84f6 100644 --- a/packages/web/src/pages/chat/components/chat-area.vue +++ b/packages/web/src/pages/chat/components/chat-area.vue @@ -153,28 +153,64 @@ class="size-3.5 animate-spin" /> + + + + + + + {{ $t('chat.files') }} + + {{ $t('chat.files') }} + + + + +