-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidepanel.html
More file actions
218 lines (208 loc) · 9.51 KB
/
Copy pathsidepanel.html
File metadata and controls
218 lines (208 loc) · 9.51 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
<script src="theme-init.js"></script>
</head>
<body>
<!-- Toast container -->
<div id="toast-container" class="toast-container"></div>
<!-- Title bar (always visible when app is shown) -->
<div id="title-bar" class="title-bar" style="display:none">
<div class="title-bar-row">
<span id="title-connection" class="title-connection">
<span class="status-dot"></span>
<span id="title-cluster" class="title-cluster"></span>
</span>
<span class="title-bar-spacer"></span>
<span id="version-server" class="version-tag" title="Click to copy full server URL"></span>
<span id="version-client" class="version-tag" title="Open on GitHub"></span>
</div>
</div>
<!-- Setup Wizard (shown when not authenticated or no project) -->
<div id="wizard" class="wizard" style="display:none">
<div class="wizard-steps-indicator">
<span class="step-dot active" data-step="1"></span>
<span class="step-dot" data-step="2"></span>
</div>
<!-- Step 1: Server URL + Login -->
<div id="wizard-step-1" class="wizard-step active">
<div class="wizard-header">
<h2>Connect to ACP</h2>
<button id="wizard-reset-1" class="btn-icon" title="Reset connection">✕</button>
</div>
<div class="form-group">
<label for="wizard-url">Server URL</label>
<input type="url" id="wizard-url" placeholder="https://api.ambient-code.com" list="url-history">
<datalist id="url-history"></datalist>
</div>
<div class="wizard-divider"><span>Sign in with</span></div>
<button id="wizard-login-btn" class="btn btn-primary" style="width:100%">Red Hat SSO</button>
<div id="wizard-login-status"></div>
<div class="wizard-divider"><span>OR</span></div>
<div class="form-group">
<label for="wizard-token">Access Token</label>
<input type="password" id="wizard-token" placeholder="From: acpctl config get access_token">
</div>
<button id="wizard-token-btn" class="btn btn-secondary" style="width:100%">Use Token</button>
</div>
<!-- Step 2: Select Workspace -->
<div id="wizard-step-2" class="wizard-step">
<div class="wizard-header">
<h2>Select Workspace</h2>
<button id="wizard-back-to-login" class="btn-icon" title="Back to login">←</button>
</div>
<p class="text-secondary">Choose a project workspace</p>
<div class="form-group">
<label for="wizard-workspace">Workspace</label>
<select id="wizard-workspace"><option value="">Select...</option></select>
</div>
<button id="wizard-go-btn" class="btn btn-primary" style="width:100%">Go</button>
<p class="text-muted" style="margin:12px 0 0;text-align:center">Or create a new one:</p>
<div class="form-group" style="display:flex;gap:8px;margin-top:4px">
<input type="text" id="wizard-new-workspace" placeholder="workspace-name" style="flex:1">
<button id="wizard-create-workspace-btn" class="btn btn-secondary">Create</button>
</div>
</div>
</div>
<!-- Main App (shown when authenticated + project selected) -->
<div id="app" style="display:none">
<!-- Toolbar -->
<div class="toolbar">
<div class="toolbar-left">
<span class="toolbar-label">Sessions</span>
<select id="toolbar-project" class="toolbar-project-select" title="Switch workspace"></select>
</div>
<div class="toolbar-actions">
<button id="btn-refresh" class="btn-icon btn-icon-toolbar" title="Refresh">↻</button>
<button id="btn-create" class="btn-icon btn-icon-toolbar" title="New Session">+</button>
<button id="btn-settings" class="btn-icon btn-icon-toolbar" title="Settings">⚙</button>
</div>
</div>
<!-- Session List -->
<div id="session-list" class="session-list">
<div class="empty-state">
<p>No sessions yet</p>
</div>
</div>
<!-- Chat Panel (overlay) -->
<div id="chat-panel" class="overlay-panel">
<div class="panel-header">
<button id="chat-back" class="btn-icon">←</button>
<span id="chat-title" class="panel-title"></span>
<span id="chat-phase" class="phase-badge"></span>
<button id="chat-download" class="btn-icon" title="Download transcript">⤓</button>
</div>
<div id="chat-messages" class="chat-messages"></div>
<div id="chat-input-area" class="chat-input-area">
<input type="text" id="chat-input" placeholder="Send a message..." autocomplete="off">
<button id="chat-send" class="btn btn-primary">Send</button>
</div>
</div>
<!-- Create Session Panel (overlay) -->
<div id="create-panel" class="overlay-panel">
<div class="panel-header">
<button id="create-back" class="btn-icon">←</button>
<span class="panel-title">New Session</span>
</div>
<div class="panel-body">
<div class="form-group">
<label for="create-name">Session Name</label>
<input type="text" id="create-name" placeholder="my-session">
</div>
<div class="form-group">
<label for="create-prompt">Initial Prompt</label>
<textarea id="create-prompt" rows="3" placeholder="What should the agent work on?"></textarea>
</div>
<div class="form-group">
<label for="create-repo">Repository URL<br><span class="text-muted" style="font-weight:400;text-transform:none;font-size:12px">Cloned into workspace for context (optional)</span></label>
<input type="text" id="create-repo" placeholder="https://github.com/org/repo" list="repo-history">
<datalist id="repo-history"></datalist>
</div>
<div class="form-group">
<label for="create-model">Model</label>
<select id="create-model">
<option value="claude-sonnet-4-6" selected>Claude Sonnet 4.6</option>
<option value="claude-opus-4-6">Claude Opus 4.6</option>
<option value="claude-haiku-4-5">Claude Haiku 4.5</option>
</select>
</div>
<button id="create-submit" class="btn btn-primary" style="width:100%">Create Session</button>
</div>
</div>
<!-- Settings Panel (overlay) -->
<div id="settings-panel" class="overlay-panel">
<div class="panel-header">
<button id="settings-back" class="btn-icon">←</button>
<span class="panel-title">Settings</span>
</div>
<div class="panel-body">
<div class="form-group">
<label>Account</label>
<div id="auth-status" class="auth-status"></div>
</div>
<div class="form-group">
<label for="settings-workspace">Workspace</label>
<select id="settings-workspace"></select>
</div>
<div class="form-group" style="display:flex;gap:8px">
<input type="text" id="settings-new-workspace" placeholder="New workspace" style="flex:1">
<button id="settings-create-workspace" class="btn btn-secondary">Create</button>
</div>
<button id="settings-delete-workspace" class="btn btn-danger" style="width:100%">Delete Current Workspace</button>
<div class="form-group">
<label for="settings-theme">Theme</label>
<select id="settings-theme">
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</div>
<div class="form-group">
<label>Server</label>
<div id="settings-server-url" class="text-muted"></div>
</div>
</div>
</div>
<!-- Help Panel (overlay) -->
<div id="help-panel" class="overlay-panel">
<div class="panel-header">
<button id="help-back" class="btn-icon">←</button>
<span class="panel-title">Help</span>
<button id="help-download" class="btn-icon" title="Download transcript">⤓</button>
</div>
<div class="panel-body">
<div class="help-welcome">
<div class="help-greeting">How can we help?</div>
<p class="text-secondary">Ask questions about the Ambient Code Platform or browse resources below.</p>
</div>
<div class="help-chat-area">
<div id="help-messages" class="help-messages"></div>
<div class="help-input-area">
<input type="text" id="help-input" placeholder="Ask a question..." autocomplete="off">
<button id="help-send" class="btn btn-primary">Send</button>
</div>
<div id="help-status" class="help-status"></div>
</div>
<div class="help-links">
<div class="help-links-title">Resources</div>
<a class="help-link" href="https://github.com/ambient-code/platform#readme" target="_blank">
<span>Documentation</span><span class="help-link-icon">↗</span>
</a>
<a class="help-link" href="https://github.com/ambient-code/platform/issues" target="_blank">
<span>Report an issue</span><span class="help-link-icon">↗</span>
</a>
<a class="help-link" href="https://github.com/ambient-code/platform/discussions" target="_blank">
<span>Community discussions</span><span class="help-link-icon">↗</span>
</a>
</div>
</div>
</div>
</div>
<script src="utils.js"></script>
<script src="oauth.js"></script>
<script src="api-client.js"></script>
<script src="help-prompt.js"></script>
<script src="sidepanel.js"></script>
</body>
</html>