Conversation
|
⏳ Processing in progress |
Preview mcp_server Image: |
Preview sandbox Image: |
Docs Preview:🚀 FastGPT Document Preview Ready! |
Preview fastgpt Image: |
There was a problem hiding this comment.
Pull request overview
This PR makes several improvements to plugin refresh timing and migration behavior. The main changes ensure that plugin lists are refreshed at the correct point in the operation lifecycle and converts a slow migration function to run asynchronously.
- Moves
refreshInstalledPlugins()calls to execute before cleanup operations in the finally block, ensuring fresh data is available before resetting operation state - Removes unused
useReducerimport from marketplace component - Converts
migrateFeedbackFlags()to run asynchronously (fire-and-forget) since it's a slow operation that shouldn't block the API response - Updates documentation to explain the asynchronous migration behavior and adds a zIndex property to a button
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| projects/app/src/pages/config/tool/marketplace.tsx | Repositions refreshInstalledPlugins() calls before cleanup operations in install/update/delete handlers, removes unused useReducer import, and adds zIndex to back button |
| projects/app/src/pages/api/admin/initv4144.ts | Changes migrateFeedbackFlags() to fire-and-forget pattern (removes await) for async execution |
| projects/app/src/pages/api/admin/initFeedbackFlags.ts | Updates log message from "Migration completed!" to "Migration feedback completed!" for clarity |
| document/data/doc-last-modified.json | Updates timestamps for various documentation files |
| document/content/docs/upgrading/4-14/4144.mdx | Adds documentation explaining the async migration behavior and what log message to look for |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // 重新统计每一个 chat 的反馈情况 | ||
| await migrateFeedbackFlags(); | ||
| migrateFeedbackFlags(); |
There was a problem hiding this comment.
The fire-and-forget pattern (calling an async function without await) means that if migrateFeedbackFlags() throws an unhandled error after the handler returns, it could result in an unhandled promise rejection. Consider wrapping the call in a .catch() handler to ensure errors are logged even if they occur after the response is sent. For example: migrateFeedbackFlags().catch(err => addLog.error('Migration failed:', err));
| migrateFeedbackFlags(); | |
| migrateFeedbackFlags().catch(err => addLog.error('Migration failed:', err)); |
No description provided.