-
Notifications
You must be signed in to change notification settings - Fork 6.8k
4.14.4 test feature #6073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.14.4 test feature #6073
Conversation
* fix: publish channel doc link * fix: checkbox disable hover style * fix: huggingface.svg missing; update doc * chore: update doc * fix: typo
* fix: export log dateend * feat: file selector render
|
There is too much information in the pull request to test. |
Preview sandbox Image: |
Preview mcp_server Image: |
Docs Preview:🚀 FastGPT Document Preview Ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements version 4.14.4 development changes, focusing on S3 infrastructure refactoring, improved null safety, and i18n standardization.
Key Changes:
- Refactored S3 source classes to use inheritance instead of composition, consolidating common methods in
S3BaseBucket - Renamed S3 methods from
getObjecttogetFileStreamand standardized metadata retrieval with null safety - Standardized locale handling by removing locale parameters from API calls and using centralized
getLocale()function - Added file input support for workflow tools with new
FileSelectcomponent
Reviewed changes
Copilot reviewed 52 out of 56 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mocks/common/s3.ts | Updated mock methods to match refactored S3 API (getObject → getFileStream) |
| projects/app/src/pages/api/system/file/[jwt].ts | Added null check for metadata before setting response headers |
| projects/app/src/pages/api/core/dataset/data/v2/list.ts | Added null check for S3 file metadata before accessing properties |
| projects/app/src/pages/api/core/app/getChatLogs.ts | Removed locale parameter, now using centralized getLocale() function |
| projects/app/src/pages/api/core/app/exportChatLogs.ts | Standardized locale retrieval using getLocale() instead of parameter |
| projects/app/src/pages/api/common/file/read/[filename].ts | Updated to use renamed getFileStream method |
| projects/app/src/pages/account/customDomain/index.tsx | Added type property to delete confirmation modal |
| projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx | New component for file URL input in workflows |
| projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/index.tsx | Updated to use FileSelect component instead of Reference |
| projects/app/src/pageComponents/app/detail/Publish/OffiAccount/*.tsx | Simplified documentation links by removing conditional fallback logic |
| projects/app/src/pageComponents/app/detail/Publish/FeiShu/*.tsx | Simplified documentation links |
| projects/app/src/pageComponents/app/detail/Publish/DingTalk/*.tsx | Simplified documentation links |
| projects/app/src/pageComponents/app/detail/Logs/LogTable.tsx | Removed locale parameter from API calls and translation file references |
| projects/app/src/global/core/api/appReq.d.ts | Removed locale property from GetAppChatLogsProps type |
| projects/app/src/components/core/chat/components/WholeResponseModal.tsx | Split plugin output into separate tool input and output rows |
| projects/app/src/components/core/app/FileSelector/index.tsx | Added safe translation hook and error message translation |
| projects/app/public/imgs/modal/huggingface.svg | Added missing HuggingFace icon SVG file |
| packages/web/styles/theme.ts | Enhanced checkbox disabled state styling to prevent hover effects |
| packages/web/i18n/*/common.json | Removed obsolete "plugin output" translation key |
| packages/web/i18n/*/chat.json | Added tool_input/tool_output translations and reordered entries |
| packages/web/i18n/*/app.json | Added export_log_filename translation with template variable |
| packages/web/components/core/workflow/NodeInputSelect.tsx | Added fileSelect input type option and cleaned up formatting |
| packages/service/support/permission/auth/file.ts | Changed file existence check from getDatasetFileStat to isObjectExists |
| packages/service/core/workflow/dispatch/tools/readFiles.ts | Refactored to use S3RawTextSource instead of S3DatasetSource for raw text buffer |
| packages/service/core/workflow/dispatch/plugin/*.ts | Added toolInput to response objects for better debugging |
| packages/service/core/workflow/dispatch/child/runTool.ts | Added toolInput tracking across all tool execution paths |
| packages/service/core/dataset/controller.ts | Added batched deletion with timeout controls for dataset cleanup |
| packages/service/core/dataset/apiDataset/custom/api.ts | Updated to use S3RawTextSource for raw text operations |
| packages/service/common/s3/sources/rawText/*.ts | New dedicated source class for raw text buffer operations |
| packages/service/common/s3/sources/dataset/*.ts | Refactored to extend S3PrivateBucket and delegate raw text operations |
| packages/service/common/s3/sources/chat/index.ts | Refactored to extend S3PrivateBucket, removing duplicate methods |
| packages/service/common/s3/sources/avatar.ts | Refactored to extend S3PublicBucket |
| packages/service/common/s3/buckets/*.ts | Added getFileMetadata, renamed methods, improved error handling |
| packages/service/common/geo/index.ts | Updated to use standardized localeType and formatting function |
| packages/global/core/workflow/runtime/type.d.ts | Removed duplicate pluginOutput property, added toolInput |
| packages/global/common/i18n/utils.ts | Added formatI18nLocationToZhEn utility function |
| document/* | Updated documentation with spelling corrections and timestamp updates |
Comments suppressed due to low confidence (5)
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx:5
- Unused import Avatar.
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx:6 - Unused import SelectAppModal.
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx:9 - Unused import useRequest2.
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx:10 - Unused import getAppDetailById.
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/FileSelect.tsx:12 - Unused import AppContext.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (!RenderItem) return null; | ||
|
|
||
| console.log(renderType, input); |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug console.log statement should be removed before merging to production. This appears to be leftover debugging code.
| "start_chat": "Start", | ||
| "stream_output": "Stream Output", | ||
| "task_has_continued": "Task has continued running", | ||
| "tool_input": "tool input", |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The traditional Chinese translation has inconsistent capitalization for "tool input". It should be "工具輸入" (with capital case consistency matching "tool_output" on line 171 which shows "工具輸出").
| "tool_input": "tool input", | |
| "tool_input": "Tool input", |
| // Delete dataset_data_texts in batches by datasetId | ||
| for (const datasetId of datasetIds) { | ||
| await MongoDatasetDataText.deleteMany({ | ||
| teamId, | ||
| datasetId | ||
| }).maxTimeMS(300000); // Reduce timeout for single batch | ||
| } | ||
| // Delete dataset_datas in batches by datasetId | ||
| for (const datasetId of datasetIds) { | ||
| await MongoDatasetData.deleteMany({ | ||
| teamId, | ||
| datasetId | ||
| }).maxTimeMS(300000); | ||
| } | ||
|
|
||
| await delCollectionRelatedSource({ collections }); | ||
| // Delete vector data | ||
| await deleteDatasetDataVector({ teamId, datasetIds }); |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate deletion logic detected. Lines 99-116 appear to be duplicated from lines 118-135. The first block (99-116) deletes dataset_data_texts and dataset_datas, then calls delCollectionRelatedSource and deleteDatasetDataVector. However, lines 118-120 then attempt to delete dataset_data_texts again. This duplication is unnecessary and could cause performance issues.
| import type { SelectAppItemType } from '@fastgpt/global/core/workflow/template/system/abandoned/runApp/type'; | ||
| import Avatar from '@fastgpt/web/components/common/Avatar'; | ||
| import SelectAppModal from '../../../../SelectAppModal'; | ||
| import { useTranslation } from 'next-i18next'; | ||
| import { useContextSelector } from 'use-context-selector'; | ||
| import { useRequest2 } from '@fastgpt/web/hooks/useRequest'; | ||
| import { getAppDetailById } from '@/web/core/app/api'; | ||
| import { WorkflowActionsContext } from '@/pageComponents/app/detail/WorkflowComponents/context/workflowActionsContext'; | ||
| import { AppContext } from '@/pageComponents/app/detail/context'; | ||
| import MyIcon from '@fastgpt/web/components/common/Icon'; | ||
| import MyDivider from '@fastgpt/web/components/common/MyDivider'; | ||
| import { getFileIcon } from '@fastgpt/global/common/file/icon'; | ||
| import MyAvatar from '@fastgpt/web/components/common/Avatar'; | ||
| import IconButton from '@/pageComponents/account/team/OrgManage/IconButton'; | ||
| import MyIconButton from '@fastgpt/web/components/common/Icon/button'; |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused imports should be removed:
SelectAppItemType(line 4) - type not usedAvatar(line 5) - imported butMyAvatar(line 16) is used insteadSelectAppModal(line 6) - component not useduseRequest2(line 9) - hook not usedgetAppDetailById(line 10) - API function not usedAppContext(line 12) - context not usedIconButton(line 17) - component not used,MyIconButton(line 18) is used instead
Only remove the actually unused ones to keep imports clean.
| 1. ### 当前分组上游负载已饱和,请稍后再试(request id:202407100753411462086782835521) | ||
|
|
||
| 是oneapi渠道的问题,可以换个模型用or换一家中转站 | ||
| 是oneapi渠道的问题,可以换个模型用或者换一家中转站 |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Missing space in Chinese text. The phrase "换个模型用或者换一家中转站" should have a space or punctuation between "用" and "或者" for better readability. Consider: "换个模型用,或者换一家中转站"
| 是oneapi渠道的问题,可以换个模型用或者换一家中转站 | |
| 是oneapi渠道的问题,可以换个模型用,或者换一家中转站 |
| feConfigs.openAPIDocUrl || | ||
| getDocPath('/docs/use-cases/external-integration/official_account/') | ||
| } | ||
| href={getDocPath('/docs/use-cases/external-integration/official_account')} |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent URL path: Line 78 uses /docs/use-cases/external-integration/official_account without a trailing slash, while line 99 in OffiAccountEditModal.tsx uses /docs/use-cases/external-integration/official_account/ with a trailing slash. URLs should be consistent across the codebase.
| feConfigs.openAPIDocUrl || | ||
| getDocPath('/docs/use-cases/external-integration/feishu/') | ||
| } | ||
| href={getDocPath('/docs/use-cases/external-integration/feishu')} |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent URL paths for FeiShu documentation. The index file uses /docs/use-cases/external-integration/feishu (no trailing slash) while FeiShuEditModal.tsx line 93 uses /docs/use-cases/external-integration/feishu/ (with trailing slash). These should be consistent.
| @@ -0,0 +1,127 @@ | |||
| import React, { useCallback, useMemo, useState } from 'react'; | |||
| import type { RenderInputProps } from '../type'; | |||
| import { Box, Button, HStack, Input, InputGroup, useDisclosure, VStack } from '@chakra-ui/react'; | |||
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused imports Button, useDisclosure.
| import MyDivider from '@fastgpt/web/components/common/MyDivider'; | ||
| import { getFileIcon } from '@fastgpt/global/common/file/icon'; | ||
| import MyAvatar from '@fastgpt/web/components/common/Avatar'; | ||
| import IconButton from '@/pageComponents/account/team/OrgManage/IconButton'; |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import IconButton.
| import MyAvatar from '@fastgpt/web/components/common/Avatar'; | ||
| import IconButton from '@/pageComponents/account/team/OrgManage/IconButton'; | ||
| import MyIconButton from '@fastgpt/web/components/common/Icon/button'; | ||
| import MyTooltip from '@fastgpt/web/components/common/MyTooltip'; |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import MyTooltip.
* team qpm limit & plan tracks * api entry qpm * perf: computed days * Revert "api entry qpm" This reverts commit 1210c07. * perf: code * system qpm limit * system qpm limit --------- Co-authored-by: archer <545436317@qq.com>
No description provided.