Skip to content
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

fix(store) : Download agent from store if user is not logged in #9121

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Abhi1992002
Copy link
Contributor

Changes

  • Added a new endpoint to download agent files as JSON, allowing users to retrieve agent data by store listing version ID and version number.
  • Introduced a new get_agent function in the database module to fetch agent details and prepare the graph data for download.
  • Enhanced the frontend AgentInfo component to include a download button, which triggers the download of the agent file.
  • Integrated loading state and user feedback via toast notifications during the download process.
  • Updated the API client to support the new download functionality.

Demo video

Untitled.video.-.Made.with.Clipchamp.3.mp4

Example Json

{
  "id": "14378095-4cc5-41ea-975e-bd0bce010bea",
  "version": 1,
  "is_active": true,
  "is_template": false,
  "name": "something",
  "description": "1",
  "nodes": [
    {
      "id": "6914efa0-e4fa-4ce8-802c-d5577cf061b6",
      "block_id": "aeb08fc1-2fc1-4141-bc8e-f758f183a822",
      "input_default": {},
      "metadata": {
        "position": {
          "x": 756,
          "y": 452.5
        }
      },
      "input_links": [],
      "output_links": [],
      "webhook_id": null,
      "graph_id": "14378095-4cc5-41ea-975e-bd0bce010bea",
      "graph_version": 1,
      "webhook": null
    }
  ],
  "links": [],
  "input_schema": {
    "type": "object",
    "properties": {},
    "required": []
  },
  "output_schema": {
    "type": "object",
    "properties": {},
    "required": []
  }
}

- Added a new endpoint to download agent files as JSON, allowing users to retrieve agent data by store listing version ID and version number.
- Introduced a new `get_agent` function in the database module to fetch agent details and prepare the graph data for download.
- Enhanced the frontend `AgentInfo` component to include a download button, which triggers the download of the agent file.
- Integrated loading state and user feedback via toast notifications during the download process.
- Updated the API client to support the new download functionality.
@Abhi1992002 Abhi1992002 requested a review from a team as a code owner December 23, 2024 04:44
@Abhi1992002 Abhi1992002 requested review from ntindle and Swiftyos and removed request for a team December 23, 2024 04:44
Copy link

supabase bot commented Dec 23, 2024

This pull request has been ignored for the connected project bgwpwdsxblryihinutbx because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Dec 23, 2024
Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev December 23, 2024 04:44
Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 50b713b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6768f831f1fd9100086bd1a3

Copy link

netlify bot commented Dec 23, 2024

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

Name Link
🔨 Latest commit 50b713b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/6768f831989e4000088a82ef

@Abhi1992002 Abhi1992002 marked this pull request as draft December 23, 2024 05:27
@Abhi1992002 Abhi1992002 marked this pull request as ready for review December 23, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant