-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
77 lines (68 loc) · 3.03 KB
/
Copy pathindex.html
File metadata and controls
77 lines (68 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A2A Agent Test Client (SDK)</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<h1>🤖 A2A Agent Test Client (SDK)</h1>
<p class="subtitle">Test OpenDirect Buyer & Seller Agents via Official @a2a-js/sdk</p>
</header>
<div class="connection-panel">
<h2>📡 Agent Connection</h2>
<div class="agent-selection">
<label>
<input type="radio" name="agent" value="buyer" checked>
<span class="agent-label">💼 Buyer Agent</span>
</label>
<label>
<input type="radio" name="agent" value="seller">
<span class="agent-label">🏪 Seller Agent</span>
</label>
</div>
<div class="server-url">
<label for="serverUrl">Server URL:</label>
<input type="text" id="serverUrl" placeholder="e.g., http://localhost:3000 or https://your-server.run.app" value="http://localhost:3000/">
<button id="connectBtn" class="btn btn-primary">Connect</button>
</div>
<div id="agentInfo" class="agent-info" style="display: none;">
<h3>✅ Connected to Agent</h3>
<div id="agentDetails"></div>
</div>
</div>
<div class="chat-panel">
<h2>💬 Chat</h2>
<div id="chatMessages" class="chat-messages"></div>
<div class="input-area">
<textarea
id="messageInput"
placeholder="Type your message here... (e.g., 'create account for Nike', 'search products')"
rows="3"
></textarea>
<button id="sendBtn" class="btn btn-primary" disabled>Send Message</button>
</div>
<div class="quick-actions">
<h3>Quick Actions:</h3>
<button class="btn btn-secondary quick-btn" data-message="create account for Nike">Create Account</button>
<button class="btn btn-secondary quick-btn" data-message="Search Products Mock">Search Products Mock</button>
<button class="btn btn-secondary quick-btn" data-message="list products">List Products</button>
<button class="btn btn-secondary quick-btn" data-message="create order">Create Order</button>
</div>
</div>
<div class="task-panel">
<h2>📋 Active Tasks</h2>
<div id="taskList" class="task-list"></div>
</div>
<div class="debug-panel">
<h2>🔍 Debug Log</h2>
<div id="debugLog" class="debug-log"></div>
<button id="clearDebugBtn" class="btn btn-secondary">Clear Log</button>
</div>
</div>
<script type="module" src="dist/bundle.js"></script>
</body>
</html>