-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
317 lines (273 loc) · 8.86 KB
/
index.html
File metadata and controls
317 lines (273 loc) · 8.86 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>codeContext</title>
<link rel="stylesheet" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
/* --- Tab Bar --- */
#tabBarContainer {
margin-bottom: 28px;
}
.tab-strip {
display: flex;
align-items: stretch;
gap: 4px;
border-bottom: 1px solid var(--border-subtle);
padding-bottom: 0;
overflow-x: auto;
scrollbar-width: none;
}
.tab-strip::-webkit-scrollbar { display: none; }
.tab-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
cursor: pointer;
background: transparent;
border: 1px solid transparent;
border-bottom: none;
position: relative;
bottom: -1px;
transition: background 0.15s, border-color 0.15s;
min-width: 0;
max-width: 220px;
flex-shrink: 0;
user-select: none;
}
.tab-item:hover:not(.tab-active) {
background: rgba(255,255,255,0.03);
border-color: var(--border-subtle);
}
.tab-active {
background: var(--glass-panel);
border-color: var(--border-subtle);
border-bottom-color: var(--glass-panel);
}
.tab-active .tab-label {
color: var(--text-main);
}
.tab-label {
font-size: 12px;
font-weight: 500;
color: var(--text-muted);
font-family: var(--font-mono);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 1;
}
.tab-rename-input {
font-size: 12px;
font-family: var(--font-mono);
background: var(--input-bg);
border: 1px solid var(--primary);
color: var(--text-main);
padding: 2px 6px;
border-radius: 3px;
width: 140px;
outline: none;
}
.tab-close {
background: none;
border: none;
color: var(--text-dim);
cursor: pointer;
font-size: 16px;
line-height: 1;
padding: 0 2px;
flex-shrink: 0;
transition: color 0.15s;
display: flex;
align-items: center;
}
.tab-close:hover { color: #fca5a5; }
.tab-add {
background: transparent;
border: 1px solid var(--border-subtle);
border-bottom: none;
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
color: var(--text-dim);
font-size: 20px;
line-height: 1;
padding: 4px 14px;
cursor: pointer;
transition: all 0.15s;
position: relative;
bottom: -1px;
flex-shrink: 0;
}
.tab-add:hover {
color: var(--primary);
background: var(--primary-dim);
border-color: var(--primary);
}
/* --- Repo URL row --- */
.repo-url-row {
display: flex;
align-items: center;
gap: 12px;
}
.repo-url-row input[type="text"] {
flex: 1;
}
.neurofold-toggle {
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
flex-shrink: 0;
}
.neurofold-toggle input[type="checkbox"] {
appearance: none;
width: 14px;
height: 14px;
background: var(--input-bg);
border: 1px solid var(--text-dim);
border-radius: 3px;
cursor: pointer;
position: relative;
flex-shrink: 0;
}
.neurofold-toggle input[type="checkbox"]:checked {
background: var(--primary);
border-color: var(--primary);
}
.neurofold-toggle input[type="checkbox"]:checked::after {
content: '✓';
position: absolute;
color: white;
font-size: 10px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: bold;
}
.neurofold-toggle label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--primary);
margin: 0;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h1>codeContext</h1>
<!-- Tab Bar -->
<div id="tabBarContainer"></div>
<div id="authErrorContainer" style="display: none;">
<div class="message-area error-message">
<strong>Authentication Error:</strong> <span id="authErrorMessage" style="margin-left:8px;"></span>
</div>
</div>
<div class="form-group" id="patContainer">
<label for="githubPat">GitHub Personal Access Token (Private Repos)</label>
<input type="password" id="githubPat" placeholder="ghp_..." />
</div>
<div class="grid-2-1">
<div class="form-group">
<label for="repoUrl">GitHub Repository URL</label>
<div class="repo-url-row">
<input type="text" id="repoUrl" value="https://github.com/jblarson/neurofold" />
<div class="neurofold-toggle">
<input type="checkbox" id="neurofoldSrcToggle" />
<label for="neurofoldSrcToggle">src:Neurofold</label>
</div>
</div>
</div>
<div class="form-group">
<label for="branchSelect">Branch</label>
<select id="branchSelect" disabled>
<option>Pending...</option>
</select>
<div id="commitInfo" style="margin-top: 6px; font-size: 11px; color: var(--text-dim); font-family: var(--font-mono);"></div>
</div>
</div>
<div class="button-group">
<button id="fetchFilesBtn" class="btn-primary">Fetch Files</button>
</div>
<div id="statusMessages"></div>
<div class="form-group">
<div class="utility-controls">
<label style="margin-bottom:0;">Repository Content</label>
<div class="action-bar">
<button id="selectAllBtn" class="btn-utility" disabled>Select</button>
<button id="deselectAllBtn" class="btn-utility" disabled>Deselect</button>
</div>
</div>
<div id="fileListContainer">
<div style="height:100%; display:flex; align-items:center; justify-content:center; color:var(--text-dim);">
Enter URL and fetch to load file tree.
</div>
</div>
</div>
<hr/>
<div class="form-group">
<label for="userInstructions">Instructions / Prompt Context</label>
<textarea id="userInstructions" placeholder="explain auth flow..."></textarea>
</div>
<hr/>
<div class="form-group">
<label style="display: flex; align-items: center; cursor: pointer; color: var(--text-main);">
<input type="checkbox" id="multiModeToggle" style="width: auto; margin-right: 12px;">
Multi-Message Mode
</label>
</div>
<div id="multiModeConfig" style="display: none;">
<div class="form-group">
<label for="holdingResponse">Holding Response Trigger</label>
<input type="text" id="holdingResponse" value="We are building a decentralized collective intelligence" />
</div>
<div class="form-group">
<label style="display: flex; align-items: center; cursor: pointer; color: var(--text-main);">
<input type="checkbox" id="advancedPathsToggle" style="width: auto; margin-right: 12px;">
Advanced Path Configuration
</label>
</div>
<div id="advancedPathsConfig" style="display: none; padding-left: 20px; border-left: 1px solid var(--border-subtle); margin-top: 15px;">
<div class="form-group">
<label for="frontendPath">Frontend Path</label>
<input type="text" id="frontendPath" value="frontend" />
</div>
<div class="form-group">
<label for="componentsPath">Components Path</label>
<input type="text" id="componentsPath" value="frontend/src/components" />
</div>
<div class="form-group">
<label for="graphSubdirsInput">Graph Subdirs (comma-separated, relative to components path)</label>
<input type="text" id="graphSubdirsInput" value="graph,graph2d,graph_semantic,graph_geometric" />
</div>
</div>
<div class="button-group">
<button id="generateMultiBtn" class="btn-primary">Generate Messages</button>
</div>
<div id="multiMessagesOutput"></div>
</div>
<hr/>
<div class="form-group">
<label for="outputMessage">Generated Output</label>
<textarea id="outputMessage" readonly></textarea>
</div>
<div class="button-group">
<button id="copyBtn" class="btn-primary">Copy to Clipboard</button>
</div>
</div>
<script src="token.js"></script>
<script src="github-api.js"></script>
<script src="ui-handlers.js"></script>
<script src="workspace-manager.js"></script>
<script src="tab-bar.js"></script>
<script src="scripts.js"></script>
</body>
</html>