Skip to content

Commit cffea36

Browse files
committed
Empty state for no cloud agents
1 parent 3d7debb commit cffea36

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

webview-ui/src/components/cloud/CloudAgents.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useState } from "react"
2-
import { Button } from "@/components/ui"
32
import { Brain, Plus } from "lucide-react"
43
import type { CloudAgent } from "@roo-code/types"
54

@@ -81,24 +80,29 @@ const CloudAgents: React.FC<CloudAgentsProps> = ({ cloudApiUrl, sessionToken })
8180

8281
return (
8382
<div className="flex flex-col gap-3 mt-6 w-full">
84-
<div className="flex flex-wrap items-center justify-between mt-4 mb-2">
83+
<div className="flex flex-wrap items-center justify-between mt-4 mb-1">
8584
<h2 className="font-semibold text-lg shrink-0 m-0">Cloud Agents</h2>
86-
<button
87-
onClick={handleCreateClick}
88-
className="text-base flex items-center gap-1 text-vscode-descriptionForeground hover:text-vscode-textLink-foreground transition-colors cursor-pointer"
89-
title="Create new agent">
90-
<Plus className="h-4 w-4" />
91-
Create
92-
</button>
85+
{agents.length > 0 && (
86+
<button
87+
onClick={handleCreateClick}
88+
className="text-base flex items-center gap-1 text-vscode-descriptionForeground hover:text-vscode-textLink-foreground transition-colors cursor-pointer"
89+
title="Create new agent">
90+
<Plus className="h-4 w-4" />
91+
Create
92+
</button>
93+
)}
9394
</div>
9495

9596
{agents.length === 0 ? (
96-
<div className="flex flex-col items-center justify-center py-8 text-center">
97-
<p className="text-sm text-vscode-descriptionForeground mb-4">Create your first cloud agent</p>
98-
<Button variant="outline" size="sm" onClick={handleCreateClick}>
99-
<Plus className="h-3 w-3 mr-1" />
100-
Create Agent
101-
</Button>
97+
<div className="items-center gap-3 px-4 py-1 rounded-xl bg-vscode-editor-background">
98+
<p className="text-base text-vscode-descriptionForeground mb-4">
99+
No Cloud agents yes?
100+
<button
101+
className="inline-flex ml-1 cursor-pointer text-vscode-textLink-foreground hover:underline"
102+
onClick={handleCreateClick}>
103+
Create your first.
104+
</button>
105+
</p>
102106
</div>
103107
) : (
104108
<div className="flex flex-col gap-1">

0 commit comments

Comments
 (0)