Skip to content

fix: open from sidebar with agent #99

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

Merged
merged 1 commit into from
May 10, 2023
Merged

fix: open from sidebar with agent #99

merged 1 commit into from
May 10, 2023

Conversation

rodrimaia
Copy link
Contributor

Fix open workspace from sidebar

@rodrimaia rodrimaia requested a review from BrunoQuaresma May 10, 2023 19:28
@rodrimaia rodrimaia self-assigned this May 10, 2023
@@ -57,7 +57,9 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
if (element) {
if (element instanceof WorkspaceTreeItem) {
const agents = extractAgents(element.workspace)
const agentTreeItems = agents.map((agent) => new AgentTreeItem(agent, element.watchMetadata))
const agentTreeItems = agents.map(
(agent) => new AgentTreeItem(agent, element.workspaceOwner, element.workspaceName, element.watchMetadata),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just pass element directly into the AgentTreeItem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally, you could instantiate an agentTreeItem without a WorkspaceTreeItem, but it doesn't matter in practice. Thank you for the suggestion I will squeeze this in later :)

Copy link
Contributor

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Just one minor consideration

@rodrimaia rodrimaia merged commit 9b936cd into main May 10, 2023
@rodrimaia rodrimaia deleted the fix_open_from_sidebar branch May 10, 2023 19:39
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.

2 participants