diff --git a/.github/workflows/preview-admin-build.yml b/.github/workflows/preview-admin-build.yml
index b9cdca30af..739af02ce2 100644
--- a/.github/workflows/preview-admin-build.yml
+++ b/.github/workflows/preview-admin-build.yml
@@ -2,22 +2,22 @@ name: Preview Admin Image - Build
on:
pull_request_target:
- types: [opened, synchronize, reopened]
+ types: [ opened, synchronize, reopened ]
paths:
- - 'pro'
- - 'pro/**'
- - 'packages/**'
- - 'sdk/**'
- - 'pnpm-lock.yaml'
- - 'pnpm-workspace.yaml'
- - 'turbo.json'
- - '.gitmodules'
- - '.github/workflows/preview-admin-build.yml'
- - '.github/workflows/preview-admin-push.yml'
+ - "pro"
+ - "pro/**"
+ - "packages/**"
+ - "sdk/**"
+ - "pnpm-lock.yaml"
+ - "pnpm-workspace.yaml"
+ - "turbo.json"
+ - ".gitmodules"
+ - ".github/workflows/preview-admin-build.yml"
+ - ".github/workflows/preview-admin-push.yml"
workflow_dispatch:
concurrency:
- group: 'preview-admin-build-${{ github.event.pull_request.number || github.ref }}'
+ group: "preview-admin-build-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true
permissions:
@@ -31,8 +31,11 @@ jobs:
- name: Checkout PR code
uses: actions/checkout@v4
with:
- ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
- repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
+ ref: ${{ github.event_name == 'pull_request_target' &&
+ github.event.pull_request.head.sha || github.ref }}
+ repository: ${{ github.event_name == 'pull_request_target' &&
+ github.event.pull_request.head.repo.full_name || github.repository
+ }}
fetch-depth: 1
- name: Update submodules
@@ -60,7 +63,8 @@ jobs:
file: pro/admin/Dockerfile
platforms: linux/amd64
push: false
- tags: fastgpt-pro-pr:${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
+ tags: fastgpt-pro-pr:${{ github.event_name == 'pull_request_target' &&
+ github.event.pull_request.head.sha || github.sha }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT
org.opencontainers.image.description=fastgpt-pro admin image
diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx
index f766ac11de..e0dce145fe 100644
--- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx
+++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx
@@ -254,13 +254,22 @@ const Provider = ({
getHistoryResponseData,
chatType
};
+ const runtimeFileSelectConfig = useMemo(() => {
+ if (chatType === ChatTypeEnumValue.test) {
+ return fileSelectConfig;
+ }
+ if (chatType === ChatTypeEnumValue.home && !props.currentQuickAppId) {
+ return fileSelectConfig;
+ }
+ return undefined;
+ }, [chatType, fileSelectConfig, props.currentQuickAppId]);
return (
{children}
diff --git a/projects/app/src/pages/api/core/chat/file/presignChatFilePostUrl.ts b/projects/app/src/pages/api/core/chat/file/presignChatFilePostUrl.ts
index 8c63046b3f..cf5a14e593 100644
--- a/projects/app/src/pages/api/core/chat/file/presignChatFilePostUrl.ts
+++ b/projects/app/src/pages/api/core/chat/file/presignChatFilePostUrl.ts
@@ -12,6 +12,7 @@ import { getTeamPlanStatus } from '@fastgpt/service/support/wallet/sub/utils';
import { authApp } from '@fastgpt/service/support/permission/app/auth';
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
import { S3ErrEnum } from '@fastgpt/global/common/error/code/s3';
+import { MongoChatSetting } from '@fastgpt/service/core/chat/setting/schema';
async function handler(req: ApiRequestProps): Promise {
const { filename, appId, chatId, outLinkAuthData, fileSelectConfig } =
@@ -31,12 +32,16 @@ async function handler(req: ApiRequestProps): Promise {
- await authApp({
- req,
- authToken: true,
- appId,
- per: WritePermissionVal
- });
+ const isHomeApp = await MongoChatSetting.exists({ teamId, appId });
+
+ if (!isHomeApp) {
+ await authApp({
+ req,
+ authToken: true,
+ appId,
+ per: WritePermissionVal
+ });
+ }
return fileSelectConfig;
})()
: app?.chatConfig?.fileSelectConfig;
diff --git a/turbo.json b/turbo.json
index df222891fb..c94142cd3e 100644
--- a/turbo.json
+++ b/turbo.json
@@ -11,6 +11,11 @@
"cache": false,
"persistent": true
},
+ "dev:pro": {
+ "with": ["@fastgpt/admin#dev"],
+ "cache": false,
+ "persistent": true
+ },
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "dist/**", "worker/**"]