|
| 1 | +import { Column, Row, Text, Button, TextInput } from "@w3cos/std" |
| 2 | + |
| 3 | +const agentStatus = signal(0) |
| 4 | +const taskCount = signal(3) |
| 5 | + |
| 6 | +export default |
| 7 | +<Column style={{ background: "#0a0a12", gap: 0 }}> |
| 8 | + {/* Header */} |
| 9 | + <Row style={{ |
| 10 | + padding: 16, |
| 11 | + background: "#12121f", |
| 12 | + justifyContent: "spaceBetween", |
| 13 | + alignItems: "center" |
| 14 | + }}> |
| 15 | + <Row style={{ gap: 10, alignItems: "center" }}> |
| 16 | + <Text style={{ fontSize: 22, color: "#6c5ce7" }}>🤖</Text> |
| 17 | + <Text style={{ fontSize: 18, color: "#e0e0f0", fontWeight: 700 }}>AI Agent Hub</Text> |
| 18 | + </Row> |
| 19 | + <Row style={{ gap: 12, alignItems: "center" }}> |
| 20 | + <Text style={{ fontSize: 13, color: "#00b894" }}>● Connected</Text> |
| 21 | + <Text style={{ fontSize: 13, color: "#808090" }}>DOM Access: Layer 1</Text> |
| 22 | + </Row> |
| 23 | + </Row> |
| 24 | + |
| 25 | + <Row style={{ flexGrow: 1, gap: 0 }}> |
| 26 | + {/* Sidebar: Agent list */} |
| 27 | + <Column style={{ width: "240", padding: 16, gap: 8, background: "#10101c" }}> |
| 28 | + <Text style={{ fontSize: 11, color: "#505070", fontWeight: 700 }}>ACTIVE AGENTS</Text> |
| 29 | + |
| 30 | + <Column style={{ padding: 12, background: "#1c1c34", borderRadius: 8, gap: 6 }}> |
| 31 | + <Row style={{ justifyContent: "spaceBetween", alignItems: "center" }}> |
| 32 | + <Text style={{ fontSize: 13, color: "#d0d0e0", fontWeight: 600 }}>Code Agent</Text> |
| 33 | + <Text style={{ fontSize: 11, color: "#00b894" }}>Running</Text> |
| 34 | + </Row> |
| 35 | + <Text style={{ fontSize: 11, color: "#606080" }}>Writing filesystem module...</Text> |
| 36 | + <Row style={{ height: "4", borderRadius: 2, background: "#1e1e38" }}> |
| 37 | + <Column style={{ width: "65%", height: "4", borderRadius: 2, background: "#6c5ce7" }} /> |
| 38 | + </Row> |
| 39 | + </Column> |
| 40 | + |
| 41 | + <Column style={{ padding: 12, background: "#1c1c34", borderRadius: 8, gap: 6 }}> |
| 42 | + <Row style={{ justifyContent: "spaceBetween", alignItems: "center" }}> |
| 43 | + <Text style={{ fontSize: 13, color: "#d0d0e0", fontWeight: 600 }}>Review Agent</Text> |
| 44 | + <Text style={{ fontSize: 11, color: "#fdcb6e" }}>Waiting</Text> |
| 45 | + </Row> |
| 46 | + <Text style={{ fontSize: 11, color: "#606080" }}>Queued: PR #42 review</Text> |
| 47 | + </Column> |
| 48 | + |
| 49 | + <Column style={{ padding: 12, background: "#1c1c34", borderRadius: 8, gap: 6 }}> |
| 50 | + <Row style={{ justifyContent: "spaceBetween", alignItems: "center" }}> |
| 51 | + <Text style={{ fontSize: 13, color: "#d0d0e0", fontWeight: 600 }}>Test Agent</Text> |
| 52 | + <Text style={{ fontSize: 11, color: "#00b894" }}>Running</Text> |
| 53 | + </Row> |
| 54 | + <Text style={{ fontSize: 11, color: "#606080" }}>47/52 tests passed</Text> |
| 55 | + <Row style={{ height: "4", borderRadius: 2, background: "#1e1e38" }}> |
| 56 | + <Column style={{ width: "90%", height: "4", borderRadius: 2, background: "#00b894" }} /> |
| 57 | + </Row> |
| 58 | + </Column> |
| 59 | + |
| 60 | + <Text style={{ fontSize: 11, color: "#505070", fontWeight: 700 }}>CAPABILITIES</Text> |
| 61 | + <Column style={{ gap: 4 }}> |
| 62 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 63 | + <Text style={{ fontSize: 11, color: "#00b894" }}>✓</Text> |
| 64 | + <Text style={{ fontSize: 11, color: "#a0a0c0" }}>DOM Read (Layer 1)</Text> |
| 65 | + </Row> |
| 66 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 67 | + <Text style={{ fontSize: 11, color: "#00b894" }}>✓</Text> |
| 68 | + <Text style={{ fontSize: 11, color: "#a0a0c0" }}>DOM Write (Layer 2)</Text> |
| 69 | + </Row> |
| 70 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 71 | + <Text style={{ fontSize: 11, color: "#00b894" }}>✓</Text> |
| 72 | + <Text style={{ fontSize: 11, color: "#a0a0c0" }}>A11y Tree</Text> |
| 73 | + </Row> |
| 74 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 75 | + <Text style={{ fontSize: 11, color: "#00b894" }}>✓</Text> |
| 76 | + <Text style={{ fontSize: 11, color: "#a0a0c0" }}>Screenshot + Annotations</Text> |
| 77 | + </Row> |
| 78 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 79 | + <Text style={{ fontSize: 11, color: "#fdcb6e" }}>○</Text> |
| 80 | + <Text style={{ fontSize: 11, color: "#808090" }}>File System (restricted)</Text> |
| 81 | + </Row> |
| 82 | + <Row style={{ gap: 6, alignItems: "center" }}> |
| 83 | + <Text style={{ fontSize: 11, color: "#e94560" }}>✕</Text> |
| 84 | + <Text style={{ fontSize: 11, color: "#606080" }}>Network (denied)</Text> |
| 85 | + </Row> |
| 86 | + </Column> |
| 87 | + </Column> |
| 88 | + |
| 89 | + {/* Main: Agent conversation */} |
| 90 | + <Column style={{ flexGrow: 1, padding: 20, gap: 16 }}> |
| 91 | + <Text style={{ fontSize: 18, color: "#e0e0f0", fontWeight: 700 }}>Agent Conversation</Text> |
| 92 | + |
| 93 | + <Column style={{ flexGrow: 1, gap: 12, overflow: "scroll" }}> |
| 94 | + {/* System message */} |
| 95 | + <Row style={{ gap: 12 }}> |
| 96 | + <Column style={{ |
| 97 | + width: "32", height: "32", |
| 98 | + background: "#1c1c34", |
| 99 | + borderRadius: 16, |
| 100 | + alignItems: "center", |
| 101 | + justifyContent: "center" |
| 102 | + }}> |
| 103 | + <Text style={{ fontSize: 14 }}>🖥</Text> |
| 104 | + </Column> |
| 105 | + <Column style={{ |
| 106 | + flexGrow: 1, |
| 107 | + padding: 12, |
| 108 | + background: "#141428", |
| 109 | + borderRadius: 8, |
| 110 | + gap: 4 |
| 111 | + }}> |
| 112 | + <Text style={{ fontSize: 11, color: "#606080" }}>System</Text> |
| 113 | + <Text style={{ fontSize: 13, color: "#a0a0c0" }}>Agent connected. DOM access granted (Layer 1: read, Layer 2: write). Permission model: interactive.</Text> |
| 114 | + </Column> |
| 115 | + </Row> |
| 116 | + |
| 117 | + {/* Agent message */} |
| 118 | + <Row style={{ gap: 12 }}> |
| 119 | + <Column style={{ |
| 120 | + width: "32", height: "32", |
| 121 | + background: "#6c5ce7", |
| 122 | + borderRadius: 16, |
| 123 | + alignItems: "center", |
| 124 | + justifyContent: "center" |
| 125 | + }}> |
| 126 | + <Text style={{ fontSize: 14 }}>🤖</Text> |
| 127 | + </Column> |
| 128 | + <Column style={{ |
| 129 | + flexGrow: 1, |
| 130 | + padding: 12, |
| 131 | + background: "#1c1c34", |
| 132 | + borderRadius: 8, |
| 133 | + gap: 4 |
| 134 | + }}> |
| 135 | + <Text style={{ fontSize: 11, color: "#6c5ce7" }}>Code Agent</Text> |
| 136 | + <Text style={{ fontSize: 13, color: "#d0d0e0" }}>I can see the DOM tree of the current application. There are 47 elements, 12 interactive buttons, and 3 text inputs. The accessibility tree shows all elements are properly labeled.</Text> |
| 137 | + </Column> |
| 138 | + </Row> |
| 139 | + |
| 140 | + {/* User message */} |
| 141 | + <Row style={{ gap: 12, justifyContent: "flexEnd" }}> |
| 142 | + <Column style={{ |
| 143 | + padding: 12, |
| 144 | + background: "#6c5ce7", |
| 145 | + borderRadius: 8, |
| 146 | + gap: 4, |
| 147 | + maxWidth: "70%" |
| 148 | + }}> |
| 149 | + <Text style={{ fontSize: 13, color: "#ffffff" }}>Build a file manager component with tree view for the sidebar and list view for the main content.</Text> |
| 150 | + </Column> |
| 151 | + <Column style={{ |
| 152 | + width: "32", height: "32", |
| 153 | + background: "#2a2a3e", |
| 154 | + borderRadius: 16, |
| 155 | + alignItems: "center", |
| 156 | + justifyContent: "center" |
| 157 | + }}> |
| 158 | + <Text style={{ fontSize: 14 }}>👤</Text> |
| 159 | + </Column> |
| 160 | + </Row> |
| 161 | + |
| 162 | + {/* Agent response */} |
| 163 | + <Row style={{ gap: 12 }}> |
| 164 | + <Column style={{ |
| 165 | + width: "32", height: "32", |
| 166 | + background: "#6c5ce7", |
| 167 | + borderRadius: 16, |
| 168 | + alignItems: "center", |
| 169 | + justifyContent: "center" |
| 170 | + }}> |
| 171 | + <Text style={{ fontSize: 14 }}>🤖</Text> |
| 172 | + </Column> |
| 173 | + <Column style={{ |
| 174 | + flexGrow: 1, |
| 175 | + padding: 12, |
| 176 | + background: "#1c1c34", |
| 177 | + borderRadius: 8, |
| 178 | + gap: 8 |
| 179 | + }}> |
| 180 | + <Text style={{ fontSize: 11, color: "#6c5ce7" }}>Code Agent</Text> |
| 181 | + <Text style={{ fontSize: 13, color: "#d0d0e0" }}>I'll create the file manager now. Using the DOM API to build the component tree:</Text> |
| 182 | + <Column style={{ padding: 8, background: "#0f0f1a", borderRadius: 4 }}> |
| 183 | + <Text style={{ fontSize: 12, color: "#74b9ff" }}>document.createElement("div") // sidebar</Text> |
| 184 | + <Text style={{ fontSize: 12, color: "#74b9ff" }}>document.createElement("div") // file list</Text> |
| 185 | + <Text style={{ fontSize: 12, color: "#74b9ff" }}>element.style.display = "flex"</Text> |
| 186 | + <Text style={{ fontSize: 12, color: "#74b9ff" }}>element.appendChild(sidebar)</Text> |
| 187 | + <Text style={{ fontSize: 12, color: "#00b894" }}>✓ 24 DOM operations completed in 0.3ms</Text> |
| 188 | + </Column> |
| 189 | + </Column> |
| 190 | + </Row> |
| 191 | + </Column> |
| 192 | + |
| 193 | + {/* Input */} |
| 194 | + <Row style={{ gap: 8, alignItems: "center" }}> |
| 195 | + <TextInput value="" placeholder="Ask the AI agent..." style={{ |
| 196 | + flexGrow: 1, |
| 197 | + fontSize: 14, |
| 198 | + color: "#d0d0e0", |
| 199 | + background: "#1c1c34", |
| 200 | + borderRadius: 8 |
| 201 | + }} /> |
| 202 | + <Button style={{ |
| 203 | + background: "#6c5ce7", |
| 204 | + borderRadius: 8, |
| 205 | + fontSize: 14, |
| 206 | + color: "#ffffff" |
| 207 | + }}>Send</Button> |
| 208 | + </Row> |
| 209 | + </Column> |
| 210 | + </Row> |
| 211 | +</Column> |
0 commit comments