AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

fix(platform): Make LibraryAgent image as initial StoreListing image

Open majdyz opened this issue 9 months ago β€’ 4 comments

Changes πŸ—οΈ

We've been auto-generating the thumbnail image for the agent in the library, this PR is propagating that image as an initial image for the store listing. This PR also removes the fetch all query for getting the count for paginating library agent.

Checklist πŸ“‹

For code changes:

  • [x] I have clearly listed my changes in the PR description
  • [x] I have made a test plan
  • [x] I have tested my changes according to the test plan:
    • [x] Create an library agent and try to create a store listing.
image

majdyz avatar Mar 10 '25 12:03 majdyz

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
πŸ§ͺΒ No relevant tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Parameter Mismatch

The function call to generate_agent_image has been updated to use 'graph' as parameter name, but the function signature in image_gen.py expects 'agent'. This could cause confusion or errors.

image = await store_image_gen.generate_agent_image(graph)
Fallback Image

The code still uses a hardcoded fallback image URL (picsum.photos) when agent_image is null. Consider using a more appropriate default image or handling this case differently.

imageSrc:
  agent.agent_image || "https://picsum.photos/300/200",

qodo-code-review[bot] avatar Mar 10 '25 12:03 qodo-code-review[bot]

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
Latest commit 473a217ea7661a4e46728af23f9bb1f22a4d6943
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67d114af5f447b0008008234

netlify[bot] avatar Mar 10 '25 12:03 netlify[bot]

Here's the code health analysis summary for commits f37d4c2..473a217. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β Success
❗ 1 occurence introduced
🎯 2 occurences resolved
View CheckΒ β†—
DeepSource Python LogoPythonβœ…Β Success
❗ 70 occurences introduced
🎯 68 occurences resolved
View CheckΒ β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.

deepsource-io[bot] avatar Mar 10 '25 12:03 deepsource-io[bot]

Deploy Preview for auto-gpt-docs canceled.

Name Link
Latest commit 473a217ea7661a4e46728af23f9bb1f22a4d6943
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67d114afd8cc3200088659fe

netlify[bot] avatar Mar 10 '25 12:03 netlify[bot]