File tree Expand file tree Collapse file tree 3 files changed +3
-18
lines changed
site/src/modules/resources Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 1
- import type { Meta , StoryObj } from "@storybook/react-vite" ;
2
1
import { chromatic } from "testHelpers/chromatic" ;
3
2
import { MockWorkspace , MockWorkspaceAgent } from "testHelpers/entities" ;
4
3
import { withDashboardProvider } from "testHelpers/storybook" ;
4
+ import type { Meta , StoryObj } from "@storybook/react-vite" ;
5
5
import { AgentExternal } from "./AgentExternal" ;
6
6
7
7
const meta : Meta < typeof AgentExternal > = {
8
8
title : "modules/resources/AgentExternal" ,
9
9
component : AgentExternal ,
10
10
args : {
11
- isExternalAgent : true ,
12
11
agent : {
13
12
...MockWorkspaceAgent ,
14
13
status : "connecting" ,
@@ -61,7 +60,6 @@ export const DifferentOS: Story = {
61
60
62
61
export const NotExternalAgent : Story = {
63
62
args : {
64
- isExternalAgent : false ,
65
63
agent : {
66
64
...MockWorkspaceAgent ,
67
65
status : "connecting" ,
Original file line number Diff line number Diff line change @@ -7,20 +7,11 @@ import type { FC } from "react";
7
7
import { useQuery } from "react-query" ;
8
8
9
9
interface AgentExternalProps {
10
- isExternalAgent : boolean ;
11
10
agent : WorkspaceAgent ;
12
11
workspace : Workspace ;
13
12
}
14
13
15
- export const AgentExternal : FC < AgentExternalProps > = ( {
16
- isExternalAgent,
17
- agent,
18
- workspace,
19
- } ) => {
20
- if ( ! isExternalAgent ) {
21
- return null ;
22
- }
23
-
14
+ export const AgentExternal : FC < AgentExternalProps > = ( { agent, workspace } ) => {
24
15
const {
25
16
data : credentials ,
26
17
error,
Original file line number Diff line number Diff line change @@ -298,11 +298,7 @@ export const AgentRow: FC<AgentRowProps> = ({
298
298
{ isExternalAgent &&
299
299
( agent . status === "timeout" || agent . status === "connecting" ) &&
300
300
workspace_external_agent && (
301
- < AgentExternal
302
- isExternalAgent = { isExternalAgent }
303
- agent = { agent }
304
- workspace = { workspace }
305
- />
301
+ < AgentExternal agent = { agent } workspace = { workspace } />
306
302
) }
307
303
308
304
< AgentMetadata initialMetadata = { initialMetadata } agent = { agent } />
You can’t perform that action at this time.
0 commit comments