Skip to content

feat(site): show previous agent scripts logs #12233

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 12 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify agents selection
  • Loading branch information
BrunoQuaresma committed Feb 21, 2024
commit 94a64e964bcd9a75d3eccd243509462c39ceb749
4 changes: 1 addition & 3 deletions site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ export const WorkspaceBuildPageView: FC<WorkspaceBuildPageViewProps> = ({
return <Loader />;
}

const agents = build.resources
.filter((r) => r.agents)
.flatMap((r) => r.agents) as WorkspaceAgent[];
const agents = build.resources.flatMap((r) => r.agents ?? []);
const selectedAgent = agents.find((a) => a.id === tab.value);
Copy link
Member

Choose a reason for hiding this comment

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

Could this be inlined inside the JSX, since it's only used in one spot?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeap, I just find it easier to read. Wdyt?


return (
Expand Down