|
1 | 1 | import React, { useEffect, useState } from "react" |
2 | | -import { Button } from "@/components/ui" |
3 | 2 | import { Brain, Plus } from "lucide-react" |
4 | 3 | import type { CloudAgent } from "@roo-code/types" |
5 | 4 |
|
@@ -81,24 +80,29 @@ const CloudAgents: React.FC<CloudAgentsProps> = ({ cloudApiUrl, sessionToken }) |
81 | 80 |
|
82 | 81 | return ( |
83 | 82 | <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"> |
85 | 84 | <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 | + )} |
93 | 94 | </div> |
94 | 95 |
|
95 | 96 | {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> |
102 | 106 | </div> |
103 | 107 | ) : ( |
104 | 108 | <div className="flex flex-col gap-1"> |
|
0 commit comments