From 3f340771e94bc79828649214f64253c1a22c1dfb Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 9 Mar 2026 11:14:47 +0800 Subject: [PATCH] feat(storage): integrate AWS S3 support in storage settings - Added support for AWS S3 as a storage engine, including configuration options for endpoint, region, access key, secret key, bucket name, and path prefix. - Updated the StorageEngineConfig interface to include S3 configuration. - Enhanced the UI components to allow users to configure S3 settings and test connections. - Updated localization files to include new S3-related labels and descriptions in multiple languages. These changes significantly enhance the storage capabilities of the application, providing users with more options for managing their data. --- frontend/src/api/system/index.ts | 13 +- .../src/components/PromptTemplateSelector.vue | 58 ++++++++- frontend/src/i18n/locales/en-US.ts | 21 ++++ frontend/src/i18n/locales/ko-KR.ts | 21 ++++ frontend/src/i18n/locales/ru-RU.ts | 25 +++- frontend/src/i18n/locales/zh-CN.ts | 21 ++++ .../chat/components/AgentStreamDisplay.vue | 8 +- .../components/tool-results/GrepResults.vue | 2 +- .../knowledge/settings/KBParserSettings.vue | 18 ++- .../knowledge/settings/KBStorageSettings.vue | 9 +- frontend/src/views/settings/Settings.vue | 1 + .../views/settings/StorageEngineSettings.vue | 117 ++++++++++++++++++ .../docparser/engine_registry.go | 8 +- 13 files changed, 303 insertions(+), 19 deletions(-) diff --git a/frontend/src/api/system/index.ts b/frontend/src/api/system/index.ts index 0bde5740..cf5337e7 100644 --- a/frontend/src/api/system/index.ts +++ b/frontend/src/api/system/index.ts @@ -173,7 +173,7 @@ export function reconnectDocReader(addr: string): Promise
- {{ template.name }} + {{ getTemplateName(template) }} {{ $t('promptTemplate.withKnowledgeBase') }} @@ -35,7 +35,7 @@ {{ $t('promptTemplate.withWebSearch') }}
-

{{ template.description }}

+

{{ getTemplateDesc(template) }}

@@ -55,8 +55,11 @@ diff --git a/internal/infrastructure/docparser/engine_registry.go b/internal/infrastructure/docparser/engine_registry.go index b289ec67..ff1f374e 100644 --- a/internal/infrastructure/docparser/engine_registry.go +++ b/internal/infrastructure/docparser/engine_registry.go @@ -43,7 +43,7 @@ type simpleEngine struct{} func (e *simpleEngine) Name() string { return SimpleEngineName } func (e *simpleEngine) Description() string { - return "简单格式 & 图片解析(无需外部服务)" + return "Simple format & image parsing (no external service required)" } func (e *simpleEngine) FileTypes(_ bool) []string { return []string{"md", "markdown", "txt", "csv", "jpg", "jpeg", "png", "gif", "bmp", "tiff", "webp"} @@ -59,14 +59,14 @@ func (e *simpleEngine) CheckAvailable(_ bool, _ map[string]string) (bool, string type mineruEngine struct{} func (e *mineruEngine) Name() string { return "mineru" } -func (e *mineruEngine) Description() string { return "MinerU 自部署服务" } +func (e *mineruEngine) Description() string { return "MinerU self-hosted service" } func (e *mineruEngine) FileTypes(_ bool) []string { return []string{"pdf", "jpg", "jpeg", "png", "bmp", "tiff", "doc", "docx", "ppt", "pptx"} } func (e *mineruEngine) CheckAvailable(_ bool, overrides map[string]string) (bool, string) { endpoint := strings.TrimSpace(overrides["mineru_endpoint"]) if endpoint == "" { - return false, "未配置 MinerU 服务" + return false, "MinerU service not configured" } return PingMinerU(endpoint) } @@ -85,7 +85,7 @@ func (e *mineruCloudEngine) FileTypes(_ bool) []string { func (e *mineruCloudEngine) CheckAvailable(_ bool, overrides map[string]string) (bool, string) { apiKey := strings.TrimSpace(overrides["mineru_api_key"]) if apiKey == "" { - return false, "未配置 MinerU API Key" + return false, "MinerU API Key not configured" } return PingMinerUCloud(apiKey) }