-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
176 lines (167 loc) · 8.21 KB
/
Copy pathindex.html
File metadata and controls
176 lines (167 loc) · 8.21 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{AGENT_NAME}}</title>
<style>
/* Tokens taken from assemblyai.com. The three typefaces are licensed and
not bundled here, so each falls back the same way the site's own stack
does: Georgia for display, system-ui for body, JetBrains Mono for mono. */
:root {
--page-bg: #fdfcf8;
--surface: #fff;
--surface-alt: #f5f3eb;
--border: #dad7cb;
--border-strong: #c7c3b2;
--text: #4a4945;
--text-dark: #1d1b16;
--text-muted: #777673;
--text-faint: #a5a4a2;
--cobolt-500: #3923c7;
--cobolt-300: #887bdd;
--cobolt-100: #d7d3f4;
--green-500: #01762f;
--error: #f04438;
--radius-sm: 4px;
--radius-lg: 12px;
--font-display: "Oceanic Text", Georgia, serif;
--font-body: "UN 11ST", system-ui, -apple-system, sans-serif;
--font-mono: "Modern Gothic Mono", "JetBrains Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
font-family: var(--font-body); font-size: 16px; line-height: 1.3;
color: var(--text); background: var(--page-bg); display: flex;
flex-direction: column; align-items: center; padding: 24px 20px 20px;
}
main { width: 100%; max-width: 1088px; flex: 1; display: flex;
flex-direction: column; min-height: 0; gap: 16px; }
/* .eyebrow on the site: mono, 12px, uppercase, 1.2px tracking. */
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.2px;
text-transform: uppercase; font-feature-settings: "ss09" 1; }
header { display: flex; align-items: center; gap: 16px;
padding-bottom: 16px; border-bottom: 1px solid var(--border); }
h1 { font-family: var(--font-display); font-size: 24px; font-weight: 400;
letter-spacing: -1.2px; line-height: 1; color: var(--text-dark);
margin-right: auto; }
.status { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
background: currentColor; flex-shrink: 0; }
.status.listening { color: var(--green-500); }
.status.speaking { color: var(--cobolt-500); }
.status.error { color: var(--error); text-transform: none; letter-spacing: 0;
font-family: var(--font-body); font-size: 14px; }
.status.listening::before, .status.speaking::before {
animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.meter { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 12px;
color: var(--text-faint); }
#elapsed { min-width: 34px; text-align: right; }
#cost { min-width: 48px; text-align: right; }
.panes { flex: 1; min-height: 0; display: grid; gap: 16px;
grid-template-columns: 1fr 360px; }
body.no-side .panes { grid-template-columns: 1fr; }
body.no-side #side { display: none; }
[hidden] { display: none !important; }
@media (max-width: 880px) {
.panes { grid-template-columns: 1fr; grid-template-rows: 1fr 176px; }
body.no-side .panes { grid-template-rows: 1fr; }
}
.pane { display: flex; flex-direction: column; min-height: 0;
background: var(--surface); border: 1px solid var(--border);
border-radius: var(--radius-lg); overflow: hidden; }
.pane-head { display: flex; align-items: center; justify-content: space-between;
gap: 16px; padding: 10px 16px; background: var(--surface-alt);
border-bottom: 1px solid var(--border); color: var(--text-muted); }
.pane-body { flex: 1; overflow-y: auto; padding: 16px; }
.empty { color: var(--text-faint); font-size: 14px; line-height: 1.4; }
#transcript { display: flex; flex-direction: column; gap: 12px; }
.line { display: flex; gap: 12px; font-size: 16px; line-height: 1.4; }
.who { color: var(--text-faint); padding-top: 3px; flex-shrink: 0; width: 88px;
overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.line.agent .said { color: var(--text-dark); }
.line.partial .said { color: var(--text-muted); }
.line.tool { font-family: var(--font-mono); font-size: 13px;
color: var(--cobolt-500); }
.line.tool .said { word-break: break-all; }
#events-body { font-family: var(--font-mono); font-size: 12px; line-height: 1.8; }
.event { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.event .at { color: var(--text-faint); min-width: 44px; text-align: right;
flex-shrink: 0; }
.event .dir, .event .count { color: var(--text-faint); flex-shrink: 0; }
.event .count:empty, .event .detail:empty { display: none; }
.event .type { flex-shrink: 0; color: var(--text-dark); }
.event.up .type { color: var(--text-muted); }
.event .detail { color: var(--text-faint); overflow: hidden; white-space: nowrap;
text-overflow: ellipsis; }
.pane-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px;
background: var(--surface-alt); border-top: 1px solid var(--border); }
/* .cta-primary on the site: cobolt fill, mono uppercase 14px, 1.4px
tracking, 40px tall, 4px radius, lightening on hover. */
button { height: 40px; padding: 0 24px; margin-left: auto; border: none;
border-radius: var(--radius-sm); background: var(--cobolt-500);
color: #fff; font-family: var(--font-mono); font-size: 14px;
letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap;
cursor: pointer; transition: background-color .2s; }
button:hover:not(:disabled) { background: var(--cobolt-300); }
button:disabled { opacity: .55; cursor: default; }
button.live { background: var(--error); }
button.live:hover { background: #f4695f; }
select { flex: 0 1 220px; min-width: 0; height: 40px; padding: 0 8px;
font-family: var(--font-body); font-size: 13px; color: var(--text-muted);
background: var(--surface); border: 1px solid var(--border);
border-radius: var(--radius-sm); }
select:disabled { color: var(--text-faint); }
/* Text button, sized to sit inside the pane header. */
.ghost { height: auto; margin-left: 0; padding: 0; background: transparent;
color: var(--text-faint); font-size: 12px; letter-spacing: 1.2px; }
.ghost:hover:not(:disabled) { background: transparent; color: var(--cobolt-500); }
.tabs { display: flex; gap: 16px; }
.tab.on { color: var(--text-dark); }
/* Read-only view of the agent as the API stored it. */
#agent-body pre { font-family: var(--font-mono); font-size: 12px;
line-height: 1.6; color: var(--text); white-space: pre-wrap;
word-break: break-word; }
</style>
</head>
<body>
<main>
<header>
<h1>{{AGENT_NAME}}</h1>
<span class="status idle" id="status"><span id="status-text">idle</span></span>
<span class="meter"><span id="elapsed">0:00</span><span id="cost">$0.000</span></span>
</header>
<div class="panes">
<section class="pane">
<div class="pane-head"><span>Transcript</span></div>
<div class="pane-body" id="transcript">
<div class="empty">Start the call and talk. Partial transcripts appear as they stream, and tool calls show up inline.</div>
</div>
<div class="pane-foot">
<select id="mic" aria-label="Microphone"><option value="">Default microphone</option></select>
<button id="btn">Start call</button>
</div>
</section>
<section class="pane" id="side">
<div class="pane-head">
<span class="tabs">
<button class="ghost tab on" id="tab-events">Events</button>
<button class="ghost tab" id="tab-agent">Agent</button>
</span>
<button class="ghost" id="log-toggle">Hide</button>
</div>
<div class="pane-body" id="events-body">
<div class="empty">Every websocket frame, both directions. Repeats collapse into a count.</div>
</div>
<div class="pane-body" id="agent-body" hidden>
<div class="empty">Loading the published agent.</div>
</div>
</section>
</div>
</main>
<script>window.AGENT = {{AGENT_JSON}}</script>
<script src="/app.js"></script>
</body>
</html>