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

feat: Agent deletion #127

Merged
merged 4 commits into from
May 11, 2023
Merged

feat: Agent deletion #127

merged 4 commits into from
May 11, 2023

Conversation

Tommylans
Copy link
Member

@Tommylans Tommylans commented May 8, 2023

I couldn't really find if it was possible to actually delete the agent from the computer soooo. This was my solution within the app.

@blu3beri Do you know if this exists and if we should even remove it from the computer.

closes #119

image

image

image

Signed-off-by: Tom Lanser <[email protected]>
@janrtvld
Copy link

janrtvld commented May 9, 2023

In other products, we use the ellipsis vertically for more options. The dropdown also feels a bit big, which doesn't bother much on the agent screen but here it's almost the size of the agent card. Maybe we can change the padding to make it a bit smaller.

@Tommylans
Copy link
Member Author

Made some changes from your comment 👍

image

@janrtvld
Copy link

janrtvld commented May 9, 2023

I meant smaller more as in less padding, primarily on the vertical sides (i think the padding is evenly on all sides now). It's also common to give it a minimal width (i think the current dropdown also has this) to make it more consistent across the app.

So a bit smaller would be like Github does it;
image

@Tommylans
Copy link
Member Author

Like this?

image
image

@Tommylans Tommylans force-pushed the feature/G-119-agent-deletion branch from f27280e to 628e9b2 Compare May 9, 2023 09:23
@codecov-commenter
Copy link

codecov-commenter commented May 9, 2023

Codecov Report

Merging #127 (de3da7c) into main (68fedd4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   76.74%   76.74%           
=======================================
  Files          11       11           
  Lines          43       43           
  Branches        3        2    -1     
=======================================
  Hits           33       33           
  Misses         10       10           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@janrtvld
Copy link

Can we make this alligned?

image

@@ -62,6 +63,14 @@ export const ConfigProvider = ({ children, configRepository }: ConfigProviderPro
setConfig(updatedConfig)
}

const removeAgent = async (agentId: string) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TimoGlastra I assume AFJ gives some utility on the wallet to be deleted, right?

If so, we might have to instantiate the agent here to be deleted.

Or, we would just remove all associated files, which is fairly easy but we can do that when we move to 0.4.0 as it changed there and it would add some useless code for now.

Copy link
Member Author

@Tommylans Tommylans May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I found the delete function on the wallet. I'm currently working on a solution to initialise the wallet for the deletion 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need to initialize the wallet, as long as it has the walletConfig. But I thin you need to initialize it to get the walletConfig in currently.

We're going to revamp the wallet interface for 0.5.0, and we'll make sure to make this easier (we're thinking about a separate wallet management API that allows to create, remove, open, etc.. wallets, that is separate from the actual wallet operations such as signing ...)

@janrtvld
Copy link

@Tommylans Looks good. Maybe we should make the dropdowns consistent and use the three dots everywhere. The agent screen now has a chevron, and the agent card has the ellipsis. What do you think?

@Tommylans
Copy link
Member Author

image
image

Copy link
Member

@berendsliedrecht berendsliedrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Tommylans Tommylans merged commit a4f0211 into main May 11, 2023
@Tommylans Tommylans deleted the feature/G-119-agent-deletion branch May 11, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to delete an agent
5 participants