Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 chore: upload image generated by ai painting failed (#8792)

YuTengjing54b08fd139ae
diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml
index 5bf8ce59515..dde96fd1d2d 100644
--- a/.github/workflows/claude-code-review.yml
+++ b/.github/workflows/claude-code-review.yml
@@ -17,14 +17,14 @@ jobs:
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
-
+
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
-
+
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -39,7 +39,7 @@ jobs:
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"
-
+
# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |
Please review this pull request and provide feedback on:
@@ -48,12 +48,14 @@ jobs:
- Performance considerations
- Security concerns
- Test coverage
-
+
Be constructive and helpful in your feedback.
+ allowed_bots: 'bot'
+
# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true
-
+
# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
@@ -61,18 +63,17 @@ jobs:
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality
-
+
# Optional: Different prompts for different authors
# direct_prompt: |
- # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
+ # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
-
+
# Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
-
+
# Optional: Skip review for certain conditions
# if: |
# !contains(github.event.pull_request.title, '[skip-review]') &&
# !contains(github.event.pull_request.title, '[WIP]')
-
diff --git a/src/server/routers/async/image.ts b/src/server/routers/async/image.ts
index 31be56ff69a..899d948707d 100644
--- a/src/server/routers/async/image.ts
+++ b/src/server/routers/async/image.ts
@@ -188,6 +188,7 @@ export const imageRouter = router({
metadata: {
generationId,
height: image.height,
+ path: uploadedImageUrl,
width: image.width,
},
name: `${params.prompt.slice(0, FILENAME_MAX_LENGTH)}.${image.extension}`,
diff --git a/src/services/file/_deprecated.ts b/src/services/file/_deprecated.ts
index 6f9ef9e968a..c4430ff7b58 100644
--- a/src/services/file/_deprecated.ts
+++ b/src/services/file/_deprecated.ts
@@ -31,7 +31,7 @@ export class ClientService implements IFileService {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async checkFileHash(_hash: string) {
- return { isExist: false, metadata: {} };
+ return { isExist: false, metadata: {}, url: '' };
}
async getFile(id: string): Promise<FileItem> {
diff --git a/src/store/file/slices/upload/action.ts b/src/store/file/slices/upload/action.ts
index 8a6e191fa72..49ea424ba91 100644
--- a/src/store/file/slices/upload/action.ts
+++ b/src/store/file/slices/upload/action.ts
@@ -137,7 +137,7 @@ export const createFileUploadSlice: StateCreator<
metadata,
name: file.name,
size: file.size,
- url: metadata.path,
+ url: metadata.path || checkStatus.url,
},
knowledgeBaseId,
);