@danieltmn/openbridge 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/LICENSE +21 -0
- package/README.md +143 -0
- package/bin/openbridge.js +18 -0
- package/docs/ARCHITECTURE.md +77 -0
- package/package.json +54 -0
- package/src/auth.js +204 -0
- package/src/bridge/bridge.js +2280 -0
- package/src/cli.js +791 -0
- package/src/config.js +108 -0
- package/src/log.js +22 -0
- package/src/paths.js +152 -0
- package/src/push.js +85 -0
- package/src/store/index.js +930 -0
- package/src/store/jsonfile.js +54 -0
- package/src/tunnel/index.js +141 -0
- package/src/web/assets/app.js +3939 -0
- package/src/web/assets/icons/icon-128x128.png +0 -0
- package/src/web/assets/icons/icon-144x144.png +0 -0
- package/src/web/assets/icons/icon-152x152.png +0 -0
- package/src/web/assets/icons/icon-192x192.png +0 -0
- package/src/web/assets/icons/icon-384x384.png +0 -0
- package/src/web/assets/icons/icon-512x512.png +0 -0
- package/src/web/assets/icons/icon-72x72.png +0 -0
- package/src/web/assets/icons/icon-96x96.png +0 -0
- package/src/web/assets/manifest.webmanifest +24 -0
- package/src/web/assets/sw.js +85 -0
- package/src/web/assets/themes/dark-plus.css +19 -0
- package/src/web/assets/themes/dark-red.css +18 -0
- package/src/web/assets/themes/default.css +18 -0
- package/src/web/assets/themes/github-light.css +19 -0
- package/src/web/assets/themes/high-contrast.css +18 -0
- package/src/web/assets/themes/index.json +15 -0
- package/src/web/assets/themes/light-plus.css +19 -0
- package/src/web/assets/themes/light.css +18 -0
- package/src/web/assets/themes/monokai.css +19 -0
- package/src/web/assets/themes/one-dark.css +19 -0
- package/src/web/assets/themes/solarized.css +18 -0
- package/src/web/assets/themes/terminal.css +28 -0
- package/src/web/assets/themes/themes.css +2 -0
- package/src/web/routes.js +871 -0
- package/src/web/server.js +130 -0
- package/src/web/templates/chat.html +1296 -0
- package/src/web/templates/login.html +144 -0
|
@@ -0,0 +1,1296 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="es">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
6
|
+
<meta name="theme-color" content="#0a0d12" id="themeColor">
|
|
7
|
+
<title>OpenBridge</title>
|
|
8
|
+
<link rel="manifest" href="manifest.webmanifest">
|
|
9
|
+
<link rel="icon" href="icons/icon-192x192.png">
|
|
10
|
+
<link rel="apple-touch-icon" href="icons/icon-192x192.png">
|
|
11
|
+
<link rel="apple-touch-icon" sizes="152x152" href="icons/icon-152x152.png">
|
|
12
|
+
<link rel="stylesheet" href="themes/themes.css" id="themeStylesheet">
|
|
13
|
+
<style>
|
|
14
|
+
:root {
|
|
15
|
+
--font: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", "Fira Code", Consolas, "Roboto Mono", monospace;
|
|
16
|
+
/* Resaltado de código (paleta VSCode dark) */
|
|
17
|
+
--hl-cm: #6a9955;
|
|
18
|
+
--hl-kw: #569cd6;
|
|
19
|
+
--hl-k2: #c586c9;
|
|
20
|
+
--hl-st: #ce9178;
|
|
21
|
+
--hl-nu: #b5cea8;
|
|
22
|
+
--hl-fn: #dcdcaa;
|
|
23
|
+
--hl-ty: #4ec9b0;
|
|
24
|
+
--hl-pr: #9cdcfe;
|
|
25
|
+
}
|
|
26
|
+
body[data-theme="light"], body[data-theme="solarized"],
|
|
27
|
+
body[data-theme="light-plus"], body[data-theme="github-light"] {
|
|
28
|
+
--hl-cm: #008000;
|
|
29
|
+
--hl-kw: #0000ff;
|
|
30
|
+
--hl-k2: #af00db;
|
|
31
|
+
--hl-st: #a31515;
|
|
32
|
+
--hl-nu: #098658;
|
|
33
|
+
--hl-fn: #795e26;
|
|
34
|
+
--hl-ty: #267f79;
|
|
35
|
+
--hl-pr: #001080;
|
|
36
|
+
}
|
|
37
|
+
* { box-sizing: border-box; }
|
|
38
|
+
html, body { height: 100%; }
|
|
39
|
+
body {
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-family: var(--font);
|
|
42
|
+
font-size: 15px;
|
|
43
|
+
line-height: 1.55;
|
|
44
|
+
background: var(--bg);
|
|
45
|
+
color: var(--text);
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
min-height: 100vh;
|
|
49
|
+
min-height: 100dvh;
|
|
50
|
+
}
|
|
51
|
+
a { color: var(--accent); }
|
|
52
|
+
b { font-weight: 600; }
|
|
53
|
+
::selection { background: var(--accent-soft); }
|
|
54
|
+
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
55
|
+
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
56
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
57
|
+
.code { font-family: var(--font); }
|
|
58
|
+
|
|
59
|
+
/* ----- Sidebar: navegador de proyectos y sesiones ----- */
|
|
60
|
+
#sidebar {
|
|
61
|
+
width: var(--sb-w, 264px);
|
|
62
|
+
position: relative;
|
|
63
|
+
background: var(--rail, var(--panel));
|
|
64
|
+
border-right: 1px solid var(--border);
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
transition: transform .22s ease;
|
|
69
|
+
z-index: 30;
|
|
70
|
+
}
|
|
71
|
+
#sidebar .brand {
|
|
72
|
+
padding: 12px 14px 10px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 10px;
|
|
76
|
+
border-bottom: 1px solid var(--border);
|
|
77
|
+
}
|
|
78
|
+
#sidebar .brand .logo {
|
|
79
|
+
font-family: var(--font);
|
|
80
|
+
color: var(--mine);
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
font-size: 15px;
|
|
83
|
+
letter-spacing: -.05em;
|
|
84
|
+
}
|
|
85
|
+
#sidebar .brand .name { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
|
|
86
|
+
#sidebar .brand .ver { margin-left: auto; font-size: 11px; color: var(--muted); }
|
|
87
|
+
#sidebar .brand { cursor: pointer; }
|
|
88
|
+
#sidebar .brand:hover { background: var(--accent-soft); }
|
|
89
|
+
#sidebar .sbhide {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
background: transparent; border: 0; color: var(--muted); cursor: pointer;
|
|
92
|
+
font: inherit; font-size: 13px; line-height: 1; padding: 5px 7px;
|
|
93
|
+
border-radius: 6px; flex-shrink: 0;
|
|
94
|
+
}
|
|
95
|
+
#sidebar .sbhide:hover { color: var(--text); background: var(--accent-soft); }
|
|
96
|
+
#sidebar .resizer {
|
|
97
|
+
display: none;
|
|
98
|
+
position: absolute; top: 0; bottom: 0; right: -3px; width: 6px;
|
|
99
|
+
cursor: col-resize; z-index: 31; touch-action: none;
|
|
100
|
+
}
|
|
101
|
+
#sidebar .resizer:hover, #sidebar .resizer.dragging { background: var(--accent-soft); }
|
|
102
|
+
.sb-reveal {
|
|
103
|
+
display: none;
|
|
104
|
+
position: fixed; top: 50%; left: 0; transform: translateY(-50%);
|
|
105
|
+
background: var(--panel); border: 1px solid var(--border); border-left: 0;
|
|
106
|
+
color: var(--muted); border-radius: 0 8px 8px 0;
|
|
107
|
+
padding: 16px 5px; font: inherit; font-size: 12px; line-height: 1;
|
|
108
|
+
cursor: pointer; z-index: 31;
|
|
109
|
+
}
|
|
110
|
+
.sb-reveal:hover { color: var(--accent); background: var(--accent-soft); }
|
|
111
|
+
.newsession {
|
|
112
|
+
margin: 10px 10px 8px;
|
|
113
|
+
padding: 9px 12px;
|
|
114
|
+
background: transparent;
|
|
115
|
+
border: 1px dashed var(--mine);
|
|
116
|
+
color: var(--mine);
|
|
117
|
+
border-radius: 8px;
|
|
118
|
+
font: inherit;
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
text-align: left;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
.newsession:hover { background: var(--mine-soft, var(--accent-soft)); }
|
|
124
|
+
.sidesearch { padding: 0 10px 8px; }
|
|
125
|
+
.sidesearch input {
|
|
126
|
+
width: 100%;
|
|
127
|
+
padding: 7px 10px;
|
|
128
|
+
background: var(--bg);
|
|
129
|
+
border: 1px solid var(--border);
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
color: var(--text);
|
|
132
|
+
font: inherit;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
outline: none;
|
|
135
|
+
}
|
|
136
|
+
.sidesearch input:focus { border-color: var(--accent); }
|
|
137
|
+
.sidesearch input::placeholder { color: var(--muted); }
|
|
138
|
+
/* ----- Selector de puente (computadora) ----- */
|
|
139
|
+
#bridgeBar { display: none; padding: 0 10px 8px; gap: 6px; }
|
|
140
|
+
#bridgeBar.show { display: flex; flex-wrap: wrap; }
|
|
141
|
+
#bridgeBar .bb {
|
|
142
|
+
flex: 1 1 auto; min-width: 0;
|
|
143
|
+
display: flex; align-items: center; gap: 6px;
|
|
144
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
145
|
+
border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 11.5px; cursor: pointer;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
}
|
|
148
|
+
#bridgeBar .bb:hover { color: var(--text); }
|
|
149
|
+
#bridgeBar .bb.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
|
|
150
|
+
#bridgeBar .bb .bdot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
|
|
151
|
+
#bridgeBar .bb .bdot.on { background: var(--ok, #22c55e); box-shadow: 0 0 4px var(--ok, #22c55e); }
|
|
152
|
+
#bridgeBar .bb .bname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
153
|
+
#bridgeBar .bb .bbusy { font-size: 10px; color: var(--accent); flex-shrink: 0; }
|
|
154
|
+
#sessionTree { flex: 1; overflow-y: auto; padding: 2px 6px 10px; min-height: 0; }
|
|
155
|
+
.utilities { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
|
|
156
|
+
.utilities button {
|
|
157
|
+
flex: 1 1 64px;
|
|
158
|
+
min-width: 64px;
|
|
159
|
+
background: transparent;
|
|
160
|
+
border: 1px solid var(--border);
|
|
161
|
+
color: var(--muted);
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
padding: 6px 4px;
|
|
164
|
+
font: inherit;
|
|
165
|
+
font-size: 11.5px;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
}
|
|
169
|
+
.utilities button:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
|
|
170
|
+
.proj { margin-top: 2px; }
|
|
171
|
+
.prow { display: flex; align-items: center; }
|
|
172
|
+
.prow .proj-head { flex: 1; min-width: 0; width: auto; padding: 6px 4px 6px 8px; }
|
|
173
|
+
.prow .proj-head .chev { width: 12px; }
|
|
174
|
+
.prow.active .proj-head .pname { color: var(--accent); }
|
|
175
|
+
.prow .padd {
|
|
176
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
177
|
+
border-radius: 6px; width: 22px; height: 22px; line-height: 1;
|
|
178
|
+
font: inherit; font-size: 14px; cursor: pointer; flex-shrink: 0; padding: 0;
|
|
179
|
+
margin-right: 8px;
|
|
180
|
+
}
|
|
181
|
+
.prow .padd:hover { color: var(--mine); border-color: var(--mine); background: var(--mine-soft, var(--accent-soft)); }
|
|
182
|
+
.proj-head {
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
gap: 7px;
|
|
186
|
+
width: 100%;
|
|
187
|
+
background: transparent;
|
|
188
|
+
border: 0;
|
|
189
|
+
color: var(--muted);
|
|
190
|
+
font: inherit;
|
|
191
|
+
font-size: 12.5px;
|
|
192
|
+
letter-spacing: .04em;
|
|
193
|
+
padding: 8px 8px 6px;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
text-align: left;
|
|
196
|
+
}
|
|
197
|
+
.proj-head:hover { color: var(--text); }
|
|
198
|
+
.proj-head .chev { width: 10px; display: inline-block; transition: transform .12s ease; }
|
|
199
|
+
.proj-head.open .chev { transform: rotate(90deg); }
|
|
200
|
+
.proj-head .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
|
|
201
|
+
.proj-head .pcount { font-size: 11.5px; color: var(--muted); }
|
|
202
|
+
.proj-sessions { display: none; }
|
|
203
|
+
.proj.open .proj-sessions { display: block; }
|
|
204
|
+
.proj-head .padd {
|
|
205
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
206
|
+
border-radius: 6px; width: 22px; height: 22px; line-height: 1;
|
|
207
|
+
font: inherit; font-size: 14px; cursor: pointer; flex-shrink: 0; padding: 0;
|
|
208
|
+
}
|
|
209
|
+
.proj-head .padd:hover { color: var(--mine); border-color: var(--mine); background: var(--mine-soft, var(--accent-soft)); }
|
|
210
|
+
.sitem {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
gap: 8px;
|
|
214
|
+
width: 100%;
|
|
215
|
+
background: transparent;
|
|
216
|
+
border: 0;
|
|
217
|
+
border-left: 2px solid transparent;
|
|
218
|
+
color: var(--text);
|
|
219
|
+
font: inherit;
|
|
220
|
+
font-size: 12.5px;
|
|
221
|
+
padding: 8px 8px 8px 12px;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
text-align: left;
|
|
224
|
+
border-radius: 0 8px 8px 0;
|
|
225
|
+
}
|
|
226
|
+
.sitem:hover { background: var(--accent-soft); }
|
|
227
|
+
.sitem.active {
|
|
228
|
+
background: var(--accent-soft);
|
|
229
|
+
border-left-color: var(--accent);
|
|
230
|
+
color: var(--accent);
|
|
231
|
+
font-weight: 600;
|
|
232
|
+
}
|
|
233
|
+
.sitem .sname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .78; }
|
|
234
|
+
.sitem.active .sname { opacity: 1; }
|
|
235
|
+
.sitem .stok { font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
|
|
236
|
+
.sitem .stime { font-size: 11px; color: var(--muted); flex-shrink: 0; }
|
|
237
|
+
.sitem .spen { width: 6px; height: 6px; border-radius: 50%; background: var(--mine); flex-shrink: 0; }
|
|
238
|
+
.sdot {
|
|
239
|
+
display: inline-block; width: 6px; height: 6px; border-radius: 50%;
|
|
240
|
+
background: var(--mine); flex-shrink: 0; vertical-align: middle;
|
|
241
|
+
}
|
|
242
|
+
.sbusy {
|
|
243
|
+
display: inline-block; width: 7px; height: 7px; border-radius: 50%;
|
|
244
|
+
background: var(--accent);
|
|
245
|
+
box-shadow: 0 0 5px var(--accent);
|
|
246
|
+
vertical-align: middle;
|
|
247
|
+
animation: sbusyPulse 1.1s ease-in-out infinite;
|
|
248
|
+
}
|
|
249
|
+
@keyframes sbusyPulse {
|
|
250
|
+
0%, 100% { opacity: 1; }
|
|
251
|
+
50% { opacity: .3; }
|
|
252
|
+
}
|
|
253
|
+
.sitem .sfolder {
|
|
254
|
+
font-size: 9.5px; color: var(--muted);
|
|
255
|
+
border: 1px solid var(--border); border-radius: 3px;
|
|
256
|
+
padding: 1px 4px; flex-shrink: 0; max-width: 92px;
|
|
257
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
258
|
+
}
|
|
259
|
+
.sitem.active .sfolder { color: var(--accent); border-color: var(--accent); }
|
|
260
|
+
.proj.todas .pname { text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; }
|
|
261
|
+
.tree-empty { color: var(--muted); font-size: 12.5px; padding: 14px 10px; text-align: center; }
|
|
262
|
+
#sidebar .footer {
|
|
263
|
+
padding: 10px 12px;
|
|
264
|
+
border-top: 1px solid var(--border);
|
|
265
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
266
|
+
font-size: 11.5px;
|
|
267
|
+
color: var(--muted);
|
|
268
|
+
}
|
|
269
|
+
#sidebar .footer .row { display: flex; align-items: center; gap: 8px; }
|
|
270
|
+
#sidebar .footer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
|
|
271
|
+
#sidebar .footer .dot.on { background: var(--ok, #22c55e); }
|
|
272
|
+
#sidebar .footer .dot.off { background: var(--danger); }
|
|
273
|
+
#sidebar .footer a.logout {
|
|
274
|
+
color: var(--danger);
|
|
275
|
+
text-decoration: none;
|
|
276
|
+
padding: 6px 10px;
|
|
277
|
+
border-radius: 8px;
|
|
278
|
+
text-align: center;
|
|
279
|
+
border: 1px solid var(--border);
|
|
280
|
+
}
|
|
281
|
+
#scrim {
|
|
282
|
+
display: none;
|
|
283
|
+
position: fixed; inset: 0;
|
|
284
|
+
background: rgba(0, 0, 0, .6);
|
|
285
|
+
z-index: 25;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* ----- Main ----- */
|
|
289
|
+
main {
|
|
290
|
+
flex: 1; min-width: 0;
|
|
291
|
+
display: flex; flex-direction: column;
|
|
292
|
+
background: var(--bg);
|
|
293
|
+
}
|
|
294
|
+
header {
|
|
295
|
+
display: flex; align-items: center; gap: 10px;
|
|
296
|
+
padding: 8px 14px;
|
|
297
|
+
min-height: 46px;
|
|
298
|
+
background: var(--panel);
|
|
299
|
+
border-bottom: 1px solid var(--border);
|
|
300
|
+
position: sticky; top: 0; z-index: 10;
|
|
301
|
+
}
|
|
302
|
+
header .burger {
|
|
303
|
+
background: transparent;
|
|
304
|
+
color: var(--text);
|
|
305
|
+
border: 1px solid var(--border);
|
|
306
|
+
border-radius: 8px;
|
|
307
|
+
padding: 5px 10px;
|
|
308
|
+
font-size: 16px; line-height: 1.2;
|
|
309
|
+
cursor: pointer;
|
|
310
|
+
display: none;
|
|
311
|
+
}
|
|
312
|
+
header .back {
|
|
313
|
+
background: transparent; color: var(--text); border: 1px solid var(--border);
|
|
314
|
+
border-radius: 8px; padding: 4px 10px; font-size: 14px; cursor: pointer; font-family: var(--font);
|
|
315
|
+
}
|
|
316
|
+
header .back:hover { background: var(--accent-soft); }
|
|
317
|
+
header .left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
|
|
318
|
+
header .titles { min-width: 0; }
|
|
319
|
+
header .title { font-weight: 600; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
320
|
+
header .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden;
|
|
321
|
+
text-overflow: ellipsis; max-width: 58vw; }
|
|
322
|
+
header .actions { display: flex; align-items: center; gap: 8px; }
|
|
323
|
+
header .icbtn {
|
|
324
|
+
background: transparent; color: var(--text); border: 1px solid var(--border);
|
|
325
|
+
border-radius: 8px; padding: 5px 10px; font-size: 13px;
|
|
326
|
+
cursor: pointer; line-height: 1.2; font-family: var(--font);
|
|
327
|
+
min-width: 34px; min-height: 32px;
|
|
328
|
+
}
|
|
329
|
+
header .icbtn:hover { background: var(--accent-soft); color: var(--accent); }
|
|
330
|
+
#btnPush { display: none; align-items: center; justify-content: center; }
|
|
331
|
+
#btnPush svg { display: block; width: 16px; height: 16px; }
|
|
332
|
+
#btnPush.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
|
|
333
|
+
#btnPush.denied { color: var(--danger); border-color: var(--danger); }
|
|
334
|
+
header a.logout {
|
|
335
|
+
display: none;
|
|
336
|
+
color: var(--danger); text-decoration: none; font-size: 12px;
|
|
337
|
+
padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
#cmdsPanel {
|
|
341
|
+
display: none; position: fixed; top: 54px; right: 12px; z-index: 40;
|
|
342
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
|
|
343
|
+
min-width: 280px; max-width: 92vw; max-height: 72vh; overflow-y: auto; padding: 8px;
|
|
344
|
+
box-shadow: var(--shadow);
|
|
345
|
+
}
|
|
346
|
+
#cmdsPanel.open { display: block; }
|
|
347
|
+
#cmdsPanel h4 { margin: 4px 6px 8px; font-size: 11px; color: var(--muted); letter-spacing: .06em; font-weight: 600; }
|
|
348
|
+
#cmdsPanel .item { padding: 7px 8px; border-radius: 8px; cursor: pointer; }
|
|
349
|
+
#cmdsPanel .item:hover { background: var(--accent-soft); }
|
|
350
|
+
#cmdsPanel .item b { color: var(--mine); font-size: 13px; font-weight: 600; }
|
|
351
|
+
#cmdsPanel .item span { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
|
|
352
|
+
|
|
353
|
+
#skinPanel {
|
|
354
|
+
display: none; position: fixed; top: 54px; right: 12px; z-index: 40;
|
|
355
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
|
|
356
|
+
min-width: 220px; padding: 8px;
|
|
357
|
+
box-shadow: var(--shadow);
|
|
358
|
+
}
|
|
359
|
+
#skinPanel.open { display: block; }
|
|
360
|
+
#skinPanel h4 { margin: 4px 6px 8px; font-size: 11px; color: var(--muted); letter-spacing: .06em; font-weight: 600; }
|
|
361
|
+
#skinPanel .item {
|
|
362
|
+
padding: 8px 10px; border-radius: 8px; cursor: pointer;
|
|
363
|
+
display: flex; align-items: center; gap: 10px;
|
|
364
|
+
}
|
|
365
|
+
#skinPanel .item:hover { background: var(--accent-soft); }
|
|
366
|
+
#skinPanel .item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
|
|
367
|
+
#skinPanel .sw {
|
|
368
|
+
width: 20px; height: 20px; border-radius: 5px;
|
|
369
|
+
border: 1px solid var(--border);
|
|
370
|
+
background: linear-gradient(135deg, var(--swatch-a, var(--bg)) 0 50%, var(--swatch-b, var(--mine)) 50% 100%);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* ----- Tab de procesos (dev servers de la sesión activa) ----- */
|
|
374
|
+
#viewProcs .pp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
|
|
375
|
+
#viewProcs .pp-head b { font-size: 16px; font-weight: 600; }
|
|
376
|
+
#viewProcs .pp-head b::before { content: "❯ "; color: var(--mine); }
|
|
377
|
+
#viewProcs .pp-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
378
|
+
#viewProcs .pp-back { margin-left: auto; flex-shrink: 0; }
|
|
379
|
+
#procStatus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
|
|
380
|
+
#procStatus .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
|
|
381
|
+
#procStatus .dot.on { background: var(--ok, #22c55e); }
|
|
382
|
+
#procStatus .dot.off { background: var(--danger); }
|
|
383
|
+
#procStatus .pp-cmd { font-family: var(--font); color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
384
|
+
#procStatus .linkbtn { flex-shrink: 0; }
|
|
385
|
+
.pp-warn {
|
|
386
|
+
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
|
|
387
|
+
padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px;
|
|
388
|
+
color: var(--warn-text, #fbbf24); background: var(--warn-bg);
|
|
389
|
+
border: 1px solid var(--warn-border); border-radius: 10px;
|
|
390
|
+
}
|
|
391
|
+
.pp-warn b { color: var(--warn-text, #fbbf24); font-family: var(--font); }
|
|
392
|
+
.pp-warn .linkbtn { margin-left: auto; }
|
|
393
|
+
#procLog {
|
|
394
|
+
margin: 0; padding: 12px 14px; height: 46vh; overflow: auto;
|
|
395
|
+
background: var(--code-bg, var(--bg));
|
|
396
|
+
border: 1px solid var(--border); border-radius: 10px;
|
|
397
|
+
font-family: var(--font); font-size: 12px; line-height: 1.55; color: var(--text);
|
|
398
|
+
white-space: pre-wrap; word-break: break-word; user-select: text;
|
|
399
|
+
}
|
|
400
|
+
#procLog .pl-empty { color: var(--muted); font-style: italic; }
|
|
401
|
+
.pp-form { display: flex; gap: 6px; margin-top: 10px; }
|
|
402
|
+
.pp-form input[type="text"] {
|
|
403
|
+
flex: 1 1 160px; padding: 9px 10px; background: var(--bg); border: 1px solid var(--border);
|
|
404
|
+
border-radius: 8px; color: var(--text); font: inherit; font-size: 13px; outline: none; min-width: 0;
|
|
405
|
+
}
|
|
406
|
+
.pp-form input[type="text"]:focus { border-color: var(--accent); }
|
|
407
|
+
.pp-form input:disabled, .pp-form button:disabled { opacity: .5; cursor: default; }
|
|
408
|
+
.pp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
|
|
409
|
+
.pp-chips .chip {
|
|
410
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
411
|
+
border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 11.5px; cursor: pointer;
|
|
412
|
+
}
|
|
413
|
+
.pp-chips .chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
|
|
414
|
+
.pp-chips .chip:disabled { opacity: .5; cursor: default; }
|
|
415
|
+
.pp-msg { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
|
|
416
|
+
#viewProcs .pp-tunnel { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 10px; }
|
|
417
|
+
#viewProcs .pp-tunhead { font-size: 11px; color: var(--muted); letter-spacing: .05em; margin-bottom: 6px; }
|
|
418
|
+
.pp-tunform { display: flex; gap: 6px; margin-bottom: 6px; }
|
|
419
|
+
.pp-tunform input[type="text"] {
|
|
420
|
+
flex: 1 1 120px; min-width: 0; padding: 7px 10px; background: var(--bg);
|
|
421
|
+
border: 1px solid var(--border); border-radius: 8px; color: var(--text);
|
|
422
|
+
font: inherit; font-size: 13px; outline: none;
|
|
423
|
+
}
|
|
424
|
+
.pp-tunform input[type="text"]:focus { border-color: var(--accent); }
|
|
425
|
+
#ppTunList .tunnel { margin-bottom: 6px; padding: 8px 10px; }
|
|
426
|
+
#ppTunList .tunnel:last-child { margin-bottom: 0; }
|
|
427
|
+
|
|
428
|
+
#offline {
|
|
429
|
+
text-align: center; font-size: 12.5px; color: var(--warn-text, #fbbf24); line-height: 1.4;
|
|
430
|
+
background: var(--warn-bg); border-bottom: 1px solid var(--warn-border);
|
|
431
|
+
padding: 7px 12px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/* ----- Statusbar (estilo TUI) ----- */
|
|
435
|
+
#statusbar {
|
|
436
|
+
display: flex; align-items: center; gap: 10px;
|
|
437
|
+
padding: 4px 14px calc(4px + env(safe-area-inset-bottom));
|
|
438
|
+
background: var(--panel);
|
|
439
|
+
border-top: 1px solid var(--border);
|
|
440
|
+
font-size: 12.5px;
|
|
441
|
+
color: var(--muted);
|
|
442
|
+
white-space: nowrap; overflow: hidden;
|
|
443
|
+
flex-shrink: 0;
|
|
444
|
+
}
|
|
445
|
+
#statusbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
|
|
446
|
+
#statusbar .dot.on { background: var(--ok, #22c55e); }
|
|
447
|
+
#statusbar .dot.off { background: var(--danger); }
|
|
448
|
+
#statusbar .sep { color: var(--border); }
|
|
449
|
+
#statusbar .seg { overflow: hidden; text-overflow: ellipsis; }
|
|
450
|
+
#statusbar .seg.mode { color: var(--mine); font-weight: 600; }
|
|
451
|
+
#statusbar .seg.mode.remoto { color: var(--accent); }
|
|
452
|
+
#sbModel {
|
|
453
|
+
background: transparent; border: 0; padding: 2px 0;
|
|
454
|
+
font: inherit; color: var(--muted); cursor: pointer;
|
|
455
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
456
|
+
border-bottom: 1px dotted var(--border);
|
|
457
|
+
}
|
|
458
|
+
#sbModel:hover { color: var(--accent); border-bottom-color: var(--accent); }
|
|
459
|
+
#sbModel.flash { animation: sbflash 1.4s ease; }
|
|
460
|
+
@keyframes sbflash {
|
|
461
|
+
0% { color: var(--mine); border-bottom-color: var(--mine); }
|
|
462
|
+
100% { color: var(--muted); border-bottom-color: var(--border); }
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/* ----- Home ----- */
|
|
466
|
+
#home { flex: 1; overflow-y: auto; padding: 18px 16px; max-width: 980px; margin: 0 auto; width: 100%; min-height: 0; }
|
|
467
|
+
#home .hero { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
|
|
468
|
+
#home .hero h1 { margin: 0; font-size: 18px; font-weight: 600; }
|
|
469
|
+
#home .hero h1::before { content: "❯ "; color: var(--mine); }
|
|
470
|
+
#home .hero p { margin: 0; color: var(--muted); font-size: 12.5px; }
|
|
471
|
+
#home .bridge-status {
|
|
472
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
473
|
+
padding: 3px 9px; border-radius: 999px;
|
|
474
|
+
background: var(--accent-soft);
|
|
475
|
+
color: var(--accent); font-size: 11.5px;
|
|
476
|
+
}
|
|
477
|
+
#home .bridge-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
|
|
478
|
+
#home .bridge-status.off { background: var(--warn-bg); color: var(--danger); }
|
|
479
|
+
#home .bridge-status.off .dot { background: var(--danger); }
|
|
480
|
+
.newbtn {
|
|
481
|
+
width: 100%; padding: 12px; border: 1px dashed var(--mine); border-radius: 10px;
|
|
482
|
+
background: transparent; color: var(--mine); font: inherit; font-size: 14px; font-weight: 600;
|
|
483
|
+
cursor: pointer; margin-bottom: 16px;
|
|
484
|
+
}
|
|
485
|
+
.newbtn:hover { background: var(--mine-soft, var(--accent-soft)); }
|
|
486
|
+
.projsec { margin-bottom: 18px; }
|
|
487
|
+
.projsec .pshead {
|
|
488
|
+
display: flex; align-items: center; gap: 7px;
|
|
489
|
+
width: 100%; margin: 0 0 8px; padding: 7px 2px;
|
|
490
|
+
background: transparent; border: 0; border-bottom: 1px solid var(--border);
|
|
491
|
+
color: var(--text); font: inherit; cursor: pointer; text-align: left;
|
|
492
|
+
}
|
|
493
|
+
.projsec .pshead .chev { width: 13px; font-size: 10px; color: var(--muted); flex-shrink: 0; }
|
|
494
|
+
.projsec .pshead .psname { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: .03em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
495
|
+
.projsec .pshead .pscount { font-size: 11px; color: var(--muted); flex-shrink: 0; }
|
|
496
|
+
.projsec .pbody { display: none; }
|
|
497
|
+
.projsec.open .pbody { display: block; }
|
|
498
|
+
.histbtn {
|
|
499
|
+
width: 100%; margin-top: 6px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px;
|
|
500
|
+
background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer;
|
|
501
|
+
}
|
|
502
|
+
.histbtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
|
|
503
|
+
@keyframes secflash {
|
|
504
|
+
0% { background: var(--accent-soft); }
|
|
505
|
+
100% { background: transparent; }
|
|
506
|
+
}
|
|
507
|
+
.projsec.flash .pshead { animation: secflash 1.5s ease-out; }
|
|
508
|
+
.cards { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
|
|
509
|
+
.card {
|
|
510
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
|
|
511
|
+
padding: 10px 12px; cursor: pointer; display: flex; gap: 12px; align-items: center;
|
|
512
|
+
transition: border-color .15s ease;
|
|
513
|
+
position: relative;
|
|
514
|
+
}
|
|
515
|
+
.card:hover { border-color: var(--accent); }
|
|
516
|
+
.card:active { transform: scale(.995); }
|
|
517
|
+
.card .grow { flex: 1; min-width: 0; padding-right: 30px; }
|
|
518
|
+
.card .cname { font-weight: 600; font-size: 15px; }
|
|
519
|
+
.card .cmeta { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap;
|
|
520
|
+
overflow: hidden; text-overflow: ellipsis; }
|
|
521
|
+
.card .cpreview { font-size: 13.5px; color: var(--text); margin-top: 4px; opacity: .75;
|
|
522
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
523
|
+
/* Menú de opciones de la tarjeta (⋮): acciones fuera del golpe principal */
|
|
524
|
+
.card .kebab {
|
|
525
|
+
position: absolute; top: 4px; right: 6px;
|
|
526
|
+
background: transparent; border: 0; color: var(--muted);
|
|
527
|
+
font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
|
|
528
|
+
padding: 7px 8px; border-radius: 6px;
|
|
529
|
+
}
|
|
530
|
+
.card .kebab:hover { color: var(--text); background: var(--accent-soft); }
|
|
531
|
+
#cardMenu {
|
|
532
|
+
display: none; position: fixed; z-index: 55;
|
|
533
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
|
|
534
|
+
min-width: 170px; padding: 6px; box-shadow: var(--shadow);
|
|
535
|
+
}
|
|
536
|
+
#cardMenu.open { display: block; }
|
|
537
|
+
#cardMenu .item {
|
|
538
|
+
padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
|
|
539
|
+
display: flex; align-items: center; gap: 8px;
|
|
540
|
+
}
|
|
541
|
+
#cardMenu .item:hover { background: var(--accent-soft); }
|
|
542
|
+
#cardMenu .item.danger { color: var(--danger); }
|
|
543
|
+
#cardMenu .item.danger:hover { background: rgba(239, 68, 68, .12); }
|
|
544
|
+
.empty { text-align: center; color: var(--muted); margin-top: 40px; font-size: 13px; }
|
|
545
|
+
|
|
546
|
+
.fab {
|
|
547
|
+
display: none;
|
|
548
|
+
position: fixed;
|
|
549
|
+
right: calc(16px + env(safe-area-inset-right));
|
|
550
|
+
bottom: calc(56px + env(safe-area-inset-bottom));
|
|
551
|
+
width: 52px; height: 52px;
|
|
552
|
+
border-radius: 50%;
|
|
553
|
+
border: 1px solid var(--mine);
|
|
554
|
+
background: var(--panel);
|
|
555
|
+
color: var(--mine);
|
|
556
|
+
font-size: 24px; line-height: 1;
|
|
557
|
+
cursor: pointer;
|
|
558
|
+
z-index: 20;
|
|
559
|
+
box-shadow: var(--shadow);
|
|
560
|
+
}
|
|
561
|
+
.fab:active { transform: scale(.96); }
|
|
562
|
+
|
|
563
|
+
/* ----- Chat: bloques de terminal ----- */
|
|
564
|
+
#chat { display: none; flex-direction: column; flex: 1; min-height: 0; position: relative; }
|
|
565
|
+
#messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-height: 0; }
|
|
566
|
+
.msg {
|
|
567
|
+
max-width: 100%;
|
|
568
|
+
background: var(--panel);
|
|
569
|
+
border: 1px solid var(--border);
|
|
570
|
+
border-left: 2px solid var(--border);
|
|
571
|
+
border-radius: 8px;
|
|
572
|
+
padding: 9px 13px 10px;
|
|
573
|
+
font-size: 15px;
|
|
574
|
+
word-wrap: break-word; overflow-wrap: break-word;
|
|
575
|
+
}
|
|
576
|
+
.msg .role {
|
|
577
|
+
display: flex; align-items: baseline; gap: 8px;
|
|
578
|
+
font-size: 11px; letter-spacing: .05em;
|
|
579
|
+
margin-bottom: 5px;
|
|
580
|
+
}
|
|
581
|
+
.msg .role .who { font-weight: 700; }
|
|
582
|
+
.msg .role .rmeta { color: var(--muted); margin-left: auto; font-size: 10.5px; flex-shrink: 0; }
|
|
583
|
+
.msg .role .genbadge { color: var(--warn-text, #fbbf24); }
|
|
584
|
+
.msg .abadge {
|
|
585
|
+
font-size: 9.5px;
|
|
586
|
+
padding: 1px 7px;
|
|
587
|
+
border-radius: 4px;
|
|
588
|
+
border: 1px solid var(--border);
|
|
589
|
+
color: var(--muted);
|
|
590
|
+
letter-spacing: .06em;
|
|
591
|
+
line-height: 1.5;
|
|
592
|
+
flex-shrink: 0;
|
|
593
|
+
}
|
|
594
|
+
.msg .abadge.plan { color: var(--warn-text, #d29922); border-color: var(--warn-text, #d29922); background: var(--warn-bg, transparent); }
|
|
595
|
+
.msg .abadge.build { color: #f472b6; border-color: #f472b6; background: rgba(244, 114, 182, .10); }
|
|
596
|
+
.msg .body { white-space: pre-wrap; word-break: break-word; }
|
|
597
|
+
.msg.mine { border-left-color: var(--mine); background: var(--mine-soft, var(--panel)); }
|
|
598
|
+
.msg.mine .who { color: var(--mine); }
|
|
599
|
+
.msg.theirs { border-left-color: var(--accent); }
|
|
600
|
+
.msg.theirs .who { color: var(--accent); }
|
|
601
|
+
.msg.error { border-left-color: var(--danger); }
|
|
602
|
+
/* Aire extra en el cambio de turno: lo tuyo ↔ lo que responde el agente */
|
|
603
|
+
.msg.mine + .msg.theirs,
|
|
604
|
+
.msg.theirs + .msg.mine { margin-top: 10px; }
|
|
605
|
+
pre.codeblock {
|
|
606
|
+
background: var(--code-bg, var(--bg));
|
|
607
|
+
border: 1px solid var(--border);
|
|
608
|
+
border-radius: 6px;
|
|
609
|
+
padding: 10px 12px;
|
|
610
|
+
margin: 8px 0 2px;
|
|
611
|
+
overflow-x: auto;
|
|
612
|
+
font-size: 13.5px;
|
|
613
|
+
line-height: 1.55;
|
|
614
|
+
white-space: pre;
|
|
615
|
+
}
|
|
616
|
+
.msg code.inl {
|
|
617
|
+
background: var(--code-bg, var(--bg));
|
|
618
|
+
border: 1px solid var(--border);
|
|
619
|
+
border-radius: 4px;
|
|
620
|
+
padding: 0 4px;
|
|
621
|
+
font-size: .92em;
|
|
622
|
+
}
|
|
623
|
+
/* ----- Markdown ligero ----- */
|
|
624
|
+
.msg .body strong { color: var(--text); font-weight: 700; }
|
|
625
|
+
.msg .body em { font-style: italic; }
|
|
626
|
+
.msg .body del { opacity: .65; }
|
|
627
|
+
.msg .body a { color: var(--accent); text-decoration: underline; word-break: break-all; }
|
|
628
|
+
.msg .body .md-p { margin: 2px 0; }
|
|
629
|
+
.msg .body .md-h { font-weight: 700; color: var(--text); margin: 10px 0 3px; }
|
|
630
|
+
.msg .body .md-h1 { font-size: 16px; }
|
|
631
|
+
.msg .body .md-h2 { font-size: 15px; }
|
|
632
|
+
.msg .body .md-h3, .msg .body .md-h4 { font-size: 14px; }
|
|
633
|
+
.msg .body ul.md-ul, .msg .body ol.md-ol { margin: 4px 0 4px; padding-left: 22px; }
|
|
634
|
+
.msg .body .md-ul li, .msg .body .md-ol li { margin: 2px 0; }
|
|
635
|
+
.msg .body .md-quote {
|
|
636
|
+
border-left: 3px solid var(--border);
|
|
637
|
+
padding: 2px 0 2px 10px;
|
|
638
|
+
margin: 4px 0;
|
|
639
|
+
color: var(--muted);
|
|
640
|
+
}
|
|
641
|
+
.msg .body .md-hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
|
|
642
|
+
/* ----- Franja "opencode trabajando…" (KITT), fija sobre la barra de envío ----- */
|
|
643
|
+
.typing {
|
|
644
|
+
display: flex; align-items: center; gap: 10px;
|
|
645
|
+
font-size: 13px; color: var(--muted);
|
|
646
|
+
min-width: 0; max-width: 100%;
|
|
647
|
+
}
|
|
648
|
+
.typing.warn { color: var(--warn-text, #fbbf24); }
|
|
649
|
+
.procrow {
|
|
650
|
+
display: none; align-items: center; gap: 10px;
|
|
651
|
+
padding: 7px 14px; min-width: 0;
|
|
652
|
+
background: var(--panel); border-top: 1px solid var(--border);
|
|
653
|
+
flex-shrink: 0;
|
|
654
|
+
}
|
|
655
|
+
.procrow.open { display: flex; animation: procIn .18s ease-out; }
|
|
656
|
+
@keyframes procIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
|
657
|
+
.procrow .typing { flex: 1 1 auto; }
|
|
658
|
+
.proc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
659
|
+
.proc-time {
|
|
660
|
+
flex-shrink: 0; min-width: 30px; text-align: right;
|
|
661
|
+
font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
|
|
662
|
+
}
|
|
663
|
+
.procrow.warn .proc-time { color: var(--warn-text, #fbbf24); }
|
|
664
|
+
.kitt {
|
|
665
|
+
--kitt-w: 22%;
|
|
666
|
+
--kitt-color: var(--accent);
|
|
667
|
+
position: relative; flex: 0 0 auto;
|
|
668
|
+
width: clamp(60px, 16vw, 120px); height: 16px;
|
|
669
|
+
border: 1px solid var(--border);
|
|
670
|
+
border-radius: 4px;
|
|
671
|
+
background: rgba(127, 127, 127, .07);
|
|
672
|
+
overflow: hidden;
|
|
673
|
+
}
|
|
674
|
+
@supports (color: color-mix(in srgb, red 50%, blue)) {
|
|
675
|
+
.kitt { background: color-mix(in srgb, var(--muted) 7%, transparent); }
|
|
676
|
+
}
|
|
677
|
+
/* La luz es una estela simetrica (gradiente) con una cabeza luminosa. */
|
|
678
|
+
.kitt-scan {
|
|
679
|
+
position: absolute; top: 0; bottom: 0; left: 0;
|
|
680
|
+
width: var(--kitt-w);
|
|
681
|
+
background: linear-gradient(90deg, transparent, var(--kitt-color) 50%, transparent);
|
|
682
|
+
animation: kittScan 1.5s ease-in-out infinite alternate;
|
|
683
|
+
}
|
|
684
|
+
.kitt-scan::after {
|
|
685
|
+
content: ''; position: absolute; top: 50%; left: 50%;
|
|
686
|
+
width: 2px; height: 8px; margin: -4px 0 0 -1px;
|
|
687
|
+
border-radius: 1px; background: var(--kitt-color);
|
|
688
|
+
box-shadow: 0 0 8px 2px var(--kitt-color);
|
|
689
|
+
}
|
|
690
|
+
@keyframes kittScan {
|
|
691
|
+
from { left: 0; }
|
|
692
|
+
to { left: calc(100% - var(--kitt-w)); }
|
|
693
|
+
}
|
|
694
|
+
@keyframes kittPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
|
|
695
|
+
/* Sin puente: gris y lenta. Alerta (>4 min): ámbar y palpitando. */
|
|
696
|
+
.typing.pause .kitt { --kitt-color: var(--muted); }
|
|
697
|
+
.typing.pause .kitt-scan { animation-duration: 3.5s; }
|
|
698
|
+
.typing.pause .kitt-scan::after { box-shadow: none; }
|
|
699
|
+
.typing.warn .kitt { --kitt-color: var(--warn-text, #fbbf24); }
|
|
700
|
+
.typing.warn .kitt-scan {
|
|
701
|
+
animation: kittScan 1s ease-in-out infinite alternate, kittPulse 1.4s ease-in-out infinite;
|
|
702
|
+
}
|
|
703
|
+
@media (prefers-reduced-motion: reduce) {
|
|
704
|
+
.kitt-scan { animation: none; left: 50%; transform: translateX(-50%); }
|
|
705
|
+
.typing.warn .kitt-scan { animation: kittPulse 1.4s ease-in-out infinite; }
|
|
706
|
+
.sbusy { animation: none; opacity: 1; }
|
|
707
|
+
.procrow.open { animation: none; }
|
|
708
|
+
}
|
|
709
|
+
.stopbtn {
|
|
710
|
+
background: transparent; color: var(--danger); border: 1px solid var(--danger);
|
|
711
|
+
border-radius: 8px; padding: 7px 11px; font: inherit; font-size: 12.5px; font-weight: 600;
|
|
712
|
+
cursor: pointer; flex-shrink: 0; min-height: 38px; min-width: 38px;
|
|
713
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 5px;
|
|
714
|
+
}
|
|
715
|
+
.stopbtn:hover { background: rgba(239, 68, 68, .12); }
|
|
716
|
+
.stopbtn:disabled { opacity: .55; cursor: default; }
|
|
717
|
+
.stopbadge {
|
|
718
|
+
color: var(--danger); border: 1px solid var(--danger); border-radius: 5px;
|
|
719
|
+
font-size: 10px; padding: 1px 6px; letter-spacing: .04em;
|
|
720
|
+
}
|
|
721
|
+
.msg.canceled { opacity: .55; }
|
|
722
|
+
details.reasoning {
|
|
723
|
+
margin: 0 0 8px; border: 1px dashed var(--border); border-radius: 8px;
|
|
724
|
+
background: rgba(128, 128, 128, .08); overflow: hidden;
|
|
725
|
+
}
|
|
726
|
+
details.reasoning summary {
|
|
727
|
+
cursor: pointer; padding: 6px 10px; font-size: 12px; color: var(--muted);
|
|
728
|
+
user-select: none; list-style-position: inside;
|
|
729
|
+
}
|
|
730
|
+
details.reasoning summary .rsize { font-size: 10.5px; opacity: .75; }
|
|
731
|
+
details.reasoning .rbody {
|
|
732
|
+
padding: 4px 12px 10px; font-size: 13px; color: var(--muted);
|
|
733
|
+
border-top: 1px dashed var(--border);
|
|
734
|
+
}
|
|
735
|
+
details.reasoning .rbody p { margin: 6px 0; }
|
|
736
|
+
|
|
737
|
+
form.sendbar {
|
|
738
|
+
display: flex; align-items: flex-end; gap: 8px;
|
|
739
|
+
padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
|
|
740
|
+
background: var(--panel); border-top: 1px solid var(--border);
|
|
741
|
+
position: relative;
|
|
742
|
+
}
|
|
743
|
+
form.sendbar .prompt {
|
|
744
|
+
color: var(--mine); font-weight: 700; font-size: 15px; user-select: none; flex-shrink: 0;
|
|
745
|
+
}
|
|
746
|
+
form.sendbar textarea {
|
|
747
|
+
flex: 1; min-width: 0; resize: none;
|
|
748
|
+
padding: 10px 2px; border: 0; border-bottom: 1px solid var(--border);
|
|
749
|
+
background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.45;
|
|
750
|
+
outline: none; max-height: 148px; overflow-y: hidden;
|
|
751
|
+
}
|
|
752
|
+
form.sendbar textarea:focus { border-bottom-color: var(--mine); }
|
|
753
|
+
form.sendbar textarea::placeholder { color: var(--muted); }
|
|
754
|
+
form.sendbar .prompt { padding-bottom: 11px; }
|
|
755
|
+
form.sendbar .imgbtn { margin-bottom: 3px; }
|
|
756
|
+
.slash-panel {
|
|
757
|
+
display: none; position: absolute; bottom: 100%; left: 10px; right: 10px;
|
|
758
|
+
margin-bottom: 8px; background: var(--panel); border: 1px solid var(--border);
|
|
759
|
+
border-radius: 10px; box-shadow: var(--shadow); max-height: 44vh; overflow-y: auto;
|
|
760
|
+
padding: 6px; z-index: 35;
|
|
761
|
+
}
|
|
762
|
+
.slash-panel .item { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
|
|
763
|
+
.slash-panel .item.sel, .slash-panel .item:hover { background: var(--accent-soft); }
|
|
764
|
+
.slash-panel .item b { color: var(--mine); font-weight: 600; }
|
|
765
|
+
.slash-panel .item span { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
|
|
766
|
+
form.sendbar button {
|
|
767
|
+
padding: 9px 16px; border: 1px solid var(--mine); border-radius: 8px; background: transparent; color: var(--mine);
|
|
768
|
+
font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
|
|
769
|
+
min-height: 40px;
|
|
770
|
+
}
|
|
771
|
+
form.sendbar button:hover { background: var(--mine-soft, var(--accent-soft)); }
|
|
772
|
+
form.sendbar button:disabled { opacity: .4; cursor: not-allowed; }
|
|
773
|
+
form.sendbar .imgbtn {
|
|
774
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
775
|
+
border-radius: 8px; width: 36px; height: 34px; font-size: 14px; line-height: 1;
|
|
776
|
+
cursor: pointer; flex-shrink: 0; font-family: var(--font);
|
|
777
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
778
|
+
}
|
|
779
|
+
form.sendbar .imgbtn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
|
|
780
|
+
form.sendbar .imgbtn svg { flex-shrink: 0; display: block; }
|
|
781
|
+
/* ----- Botón que abre la hoja de escritura (móvil) ----- */
|
|
782
|
+
.composeopen {
|
|
783
|
+
display: none; align-items: center; gap: 10px; width: 100%;
|
|
784
|
+
padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
|
|
785
|
+
background: var(--panel); border-top: 1px solid var(--border);
|
|
786
|
+
color: var(--muted); font: inherit; font-size: 15px;
|
|
787
|
+
cursor: pointer; text-align: left; flex-shrink: 0;
|
|
788
|
+
}
|
|
789
|
+
.composeopen .prompt { color: var(--mine); font-weight: 700; font-size: 15px; user-select: none; flex-shrink: 0; }
|
|
790
|
+
.composeopen.show { display: flex; }
|
|
791
|
+
@media (min-width: 1024px) { .composeopen.show { display: none; } }
|
|
792
|
+
form.sendbar .shead { display: none; }
|
|
793
|
+
/* ----- Móvil: la barra de envío es una hoja que emerge desde abajo ----- */
|
|
794
|
+
@media (max-width: 1023px) {
|
|
795
|
+
form.sendbar {
|
|
796
|
+
position: fixed; left: 0; right: 0; bottom: 0;
|
|
797
|
+
z-index: 46; flex-wrap: wrap;
|
|
798
|
+
border-radius: 14px 14px 0 0;
|
|
799
|
+
padding: 0 14px calc(12px + env(safe-area-inset-bottom));
|
|
800
|
+
transform: translateY(105%); visibility: hidden;
|
|
801
|
+
transition: transform .2s ease, visibility .2s;
|
|
802
|
+
box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
|
|
803
|
+
}
|
|
804
|
+
form.sendbar.open { transform: none; visibility: visible; }
|
|
805
|
+
form.sendbar .shead {
|
|
806
|
+
display: flex; align-items: center; justify-content: center;
|
|
807
|
+
position: relative; flex: 1 1 100%; order: -3;
|
|
808
|
+
padding: 8px 0 6px; cursor: pointer;
|
|
809
|
+
}
|
|
810
|
+
form.sendbar .shead .handle { width: 44px; height: 4px; border-radius: 2px; background: var(--border); }
|
|
811
|
+
form.sendbar .shead .cclose {
|
|
812
|
+
position: absolute; right: -8px; top: 2px;
|
|
813
|
+
background: transparent; border: 0; color: var(--muted);
|
|
814
|
+
font: inherit; font-size: 15px; padding: 6px 8px; cursor: pointer;
|
|
815
|
+
}
|
|
816
|
+
form.sendbar .shead .cclose:hover { color: var(--text); }
|
|
817
|
+
#imgPreview { order: -2; flex: 1 1 100%; padding: 6px 0 0; }
|
|
818
|
+
form.sendbar textarea { order: -1; flex: 1 1 100%; min-height: 58px; max-height: 38vh; padding-top: 4px; }
|
|
819
|
+
form.sendbar .imgbtn { margin-bottom: 0; }
|
|
820
|
+
form.sendbar button[type="submit"] { margin-left: auto; }
|
|
821
|
+
body.compose-open #scrim { display: block; z-index: 45; }
|
|
822
|
+
}
|
|
823
|
+
#imgPreview {
|
|
824
|
+
display: flex; align-items: center; gap: 10px;
|
|
825
|
+
padding: 8px 14px 0; font-size: 11.5px; color: var(--muted);
|
|
826
|
+
}
|
|
827
|
+
#imgPreview img {
|
|
828
|
+
max-height: 64px; max-width: 120px; object-fit: cover;
|
|
829
|
+
border-radius: 8px; border: 1px solid var(--border);
|
|
830
|
+
}
|
|
831
|
+
#imgPreview button {
|
|
832
|
+
background: transparent; border: 1px solid var(--border); color: var(--muted);
|
|
833
|
+
border-radius: 6px; width: 22px; height: 22px; line-height: 1; cursor: pointer; font: inherit;
|
|
834
|
+
}
|
|
835
|
+
#imgPreview button:hover { color: var(--danger); border-color: var(--danger); }
|
|
836
|
+
.msg .body .msg-img {
|
|
837
|
+
display: block; max-width: 100%; max-height: 420px;
|
|
838
|
+
border-radius: 8px; border: 1px solid var(--border);
|
|
839
|
+
margin: 2px 0 8px;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* Copiar mensajes y bloques de código */
|
|
843
|
+
.copybtn {
|
|
844
|
+
background: transparent; border: 0; color: var(--muted); cursor: pointer;
|
|
845
|
+
font: inherit; font-size: 11px; padding: 0 2px; flex-shrink: 0; line-height: 1.4;
|
|
846
|
+
}
|
|
847
|
+
.copybtn:hover { color: var(--accent); }
|
|
848
|
+
.msg .role .copybtn { margin-left: 6px; }
|
|
849
|
+
.codewrap {
|
|
850
|
+
margin: 8px 0 2px; border: 1px solid var(--border); border-radius: 6px;
|
|
851
|
+
background: var(--code-bg, var(--bg)); overflow: hidden;
|
|
852
|
+
}
|
|
853
|
+
.codehead {
|
|
854
|
+
display: flex; align-items: center; justify-content: space-between; gap: 8px;
|
|
855
|
+
padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--border);
|
|
856
|
+
background: var(--rail, rgba(255, 255, 255, .03));
|
|
857
|
+
font-size: 11px; color: var(--muted);
|
|
858
|
+
}
|
|
859
|
+
.codehead .lang { letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
860
|
+
.codewrap pre.codeblock { border: 0; border-radius: 0; margin: 0; background: transparent; }
|
|
861
|
+
.hl-cm { color: var(--hl-cm); font-style: italic; }
|
|
862
|
+
.hl-kw { color: var(--hl-kw); }
|
|
863
|
+
.hl-k2 { color: var(--hl-k2); }
|
|
864
|
+
.hl-st { color: var(--hl-st); }
|
|
865
|
+
.hl-nu { color: var(--hl-nu); }
|
|
866
|
+
.hl-fn { color: var(--hl-fn); }
|
|
867
|
+
.hl-ty { color: var(--hl-ty); }
|
|
868
|
+
.hl-pr { color: var(--hl-pr); }
|
|
869
|
+
|
|
870
|
+
/* Separadores: días en el chat, buckets de fecha en la lista */
|
|
871
|
+
.daysep, .dsep {
|
|
872
|
+
display: flex; align-items: center; gap: 10px;
|
|
873
|
+
color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
|
|
874
|
+
}
|
|
875
|
+
.daysep::before, .daysep::after, .dsep::before, .dsep::after {
|
|
876
|
+
content: ""; flex: 1; border-top: 1px solid var(--border);
|
|
877
|
+
}
|
|
878
|
+
.daysep { margin: 6px 0 0; }
|
|
879
|
+
.dsep { margin: 8px 4px 4px; }
|
|
880
|
+
|
|
881
|
+
/* Cursor de streaming */
|
|
882
|
+
.stream-cursor { color: var(--accent); animation: curblink 1.05s steps(1) infinite; }
|
|
883
|
+
@keyframes curblink { 50% { opacity: 0; } }
|
|
884
|
+
|
|
885
|
+
/* Botón flotante: ir al último mensaje */
|
|
886
|
+
.jumpbtn {
|
|
887
|
+
display: none; position: absolute; right: 16px; bottom: 74px; z-index: 15;
|
|
888
|
+
background: var(--panel); border: 1px solid var(--accent); color: var(--accent);
|
|
889
|
+
border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 600;
|
|
890
|
+
cursor: pointer; box-shadow: var(--shadow);
|
|
891
|
+
}
|
|
892
|
+
.jumpbtn.show { display: inline-flex; }
|
|
893
|
+
|
|
894
|
+
/* Toast estilo TUI */
|
|
895
|
+
#toast {
|
|
896
|
+
position: fixed; left: 50%; transform: translateX(-50%) translateY(8px);
|
|
897
|
+
bottom: calc(84px + env(safe-area-inset-bottom));
|
|
898
|
+
background: var(--panel); border: 1px solid var(--border); color: var(--text);
|
|
899
|
+
padding: 8px 14px; border-radius: 8px; font-size: 12.5px;
|
|
900
|
+
opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
|
|
901
|
+
z-index: 60; max-width: 88vw; box-shadow: var(--shadow);
|
|
902
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
903
|
+
}
|
|
904
|
+
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
905
|
+
#toast.ok { border-color: var(--mine); color: var(--mine); }
|
|
906
|
+
#toast.error { border-color: var(--danger); color: var(--danger); }
|
|
907
|
+
|
|
908
|
+
/* ----- Modal ----- */
|
|
909
|
+
#overlay, #modelOverlay {
|
|
910
|
+
display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50;
|
|
911
|
+
align-items: center; justify-content: center; padding: 16px;
|
|
912
|
+
}
|
|
913
|
+
#overlay.show, #modelOverlay.show { display: flex; }
|
|
914
|
+
.modal {
|
|
915
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
|
|
916
|
+
padding: 18px 16px; width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
|
|
917
|
+
box-shadow: var(--shadow);
|
|
918
|
+
}
|
|
919
|
+
.modal h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
|
|
920
|
+
.modal h2::before { content: "❯ "; color: var(--mine); }
|
|
921
|
+
.modal label { display: block; font-size: 12px; color: var(--muted); margin: 11px 0 5px; }
|
|
922
|
+
.modal input[type="text"], .modal select, .modal textarea {
|
|
923
|
+
width: 100%; padding: 11px; border-radius: 8px; border: 1px solid var(--border);
|
|
924
|
+
background: var(--bg); color: var(--text); font: inherit; font-size: 15px; outline: none;
|
|
925
|
+
}
|
|
926
|
+
.modal textarea { resize: vertical; min-height: 74px; }
|
|
927
|
+
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--accent); }
|
|
928
|
+
.modal select optgroup { color: var(--muted); font-style: normal; }
|
|
929
|
+
.modal select optgroup option { color: var(--text); }
|
|
930
|
+
.modal .row { display: flex; gap: 10px; margin-top: 12px; }
|
|
931
|
+
.modal button {
|
|
932
|
+
flex: 1; padding: 11px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
|
|
933
|
+
min-height: 44px;
|
|
934
|
+
}
|
|
935
|
+
.modal .save { background: transparent; color: var(--mine); border: 1px solid var(--mine); }
|
|
936
|
+
.modal .save:hover { background: var(--mine-soft, var(--accent-soft)); }
|
|
937
|
+
.modal .cancel { background: transparent; color: var(--muted); border: 1px solid var(--border); }
|
|
938
|
+
.warn { font-size: 12.5px; color: var(--warn-text, #fbbf24); margin-top: 8px; }
|
|
939
|
+
|
|
940
|
+
/* ----- Vistas ----- */
|
|
941
|
+
.view { flex: 1; overflow-y: auto; padding: 18px 16px; max-width: 980px; margin: 0 auto; width: 100%; min-height: 0; }
|
|
942
|
+
.view h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
|
|
943
|
+
.view h2::before { content: "❯ "; color: var(--mine); }
|
|
944
|
+
.view .placeholder {
|
|
945
|
+
color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.view-head { margin-bottom: 12px; }
|
|
949
|
+
.view-head h2 { margin: 0 0 4px; font-size: 16px; }
|
|
950
|
+
.view-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
951
|
+
.files-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
|
|
952
|
+
.files-path { font-size: 11.5px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
953
|
+
.linkbtn { background: transparent; border: 1px solid var(--border); color: var(--accent); padding: 5px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12.5px; }
|
|
954
|
+
.linkbtn:hover { background: var(--accent-soft); }
|
|
955
|
+
.files-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
|
|
956
|
+
.files-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 9px 12px; cursor: pointer; align-items: center; border-bottom: 1px solid var(--border); }
|
|
957
|
+
.files-row:last-child { border-bottom: 0; }
|
|
958
|
+
.files-row:hover { background: var(--accent-soft); }
|
|
959
|
+
.files-row .ic { text-align: center; }
|
|
960
|
+
.files-row .name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
961
|
+
.files-row .size { font-size: 11px; color: var(--muted); }
|
|
962
|
+
.filemeta { font-size: 11.5px; color: var(--muted); padding: 4px 0 8px; }
|
|
963
|
+
.fileview {
|
|
964
|
+
background: var(--code-bg, var(--bg));
|
|
965
|
+
border: 1px solid var(--border);
|
|
966
|
+
border-radius: 8px;
|
|
967
|
+
padding: 12px;
|
|
968
|
+
margin: 0 0 20px;
|
|
969
|
+
overflow: auto;
|
|
970
|
+
max-height: 72vh;
|
|
971
|
+
font-size: 12.5px;
|
|
972
|
+
line-height: 1.5;
|
|
973
|
+
white-space: pre;
|
|
974
|
+
word-break: normal;
|
|
975
|
+
overflow-wrap: normal;
|
|
976
|
+
}
|
|
977
|
+
/* ----- Lector de archivos (código estilo editor, markdown, imágenes) ----- */
|
|
978
|
+
.fviewer {
|
|
979
|
+
background: var(--panel);
|
|
980
|
+
border: 1px solid var(--border);
|
|
981
|
+
border-radius: 10px;
|
|
982
|
+
overflow: hidden;
|
|
983
|
+
margin: 0 0 20px;
|
|
984
|
+
}
|
|
985
|
+
.fbar {
|
|
986
|
+
display: flex; align-items: center; gap: 10px;
|
|
987
|
+
padding: 7px 12px;
|
|
988
|
+
border-bottom: 1px solid var(--border);
|
|
989
|
+
background: var(--code-bg, var(--bg));
|
|
990
|
+
}
|
|
991
|
+
.fbar .fname { font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
992
|
+
.fbar .fsize { font-size: 11px; color: var(--muted); flex-shrink: 0; }
|
|
993
|
+
.fbar .fro { margin-left: auto; font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; flex-shrink: 0; }
|
|
994
|
+
.fbar .copybtn {
|
|
995
|
+
border: 0; background: transparent; color: var(--muted); cursor: pointer;
|
|
996
|
+
font: inherit; font-size: 12.5px; padding: 2px 6px; border-radius: 6px; flex-shrink: 0;
|
|
997
|
+
}
|
|
998
|
+
.fbar .copybtn:hover { color: var(--accent); background: var(--accent-soft); }
|
|
999
|
+
.fscroll { overflow: auto; max-height: 74vh; }
|
|
1000
|
+
.fcodewrap {
|
|
1001
|
+
min-width: max-content; width: max-content;
|
|
1002
|
+
background: var(--code-bg, var(--bg));
|
|
1003
|
+
padding: 8px 0;
|
|
1004
|
+
font-family: var(--font);
|
|
1005
|
+
font-size: 13px;
|
|
1006
|
+
line-height: 1.55;
|
|
1007
|
+
}
|
|
1008
|
+
.frow { display: flex; white-space: pre; }
|
|
1009
|
+
.frow:hover { background: rgba(128, 128, 128, .06); }
|
|
1010
|
+
.frow .fg {
|
|
1011
|
+
flex: 0 0 auto; min-width: 3.4em;
|
|
1012
|
+
padding: 0 12px 0 10px; text-align: right;
|
|
1013
|
+
color: var(--muted); opacity: .72; user-select: none;
|
|
1014
|
+
}
|
|
1015
|
+
.frow .fc { flex: 1; min-width: 0; padding-right: 16px; white-space: pre; color: var(--text); }
|
|
1016
|
+
.fimgwrap {
|
|
1017
|
+
padding: 18px; display: flex; justify-content: center;
|
|
1018
|
+
background: var(--code-bg, var(--bg));
|
|
1019
|
+
}
|
|
1020
|
+
.fimgwrap img {
|
|
1021
|
+
max-width: 100%; max-height: 74vh; object-fit: contain;
|
|
1022
|
+
border-radius: 6px; box-shadow: var(--shadow);
|
|
1023
|
+
}
|
|
1024
|
+
/* Markdown dentro del lector (mismas reglas que el chat, sin `.msg .body`) */
|
|
1025
|
+
.mdview { padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--text); background: var(--panel); }
|
|
1026
|
+
.mdview strong { color: var(--text); font-weight: 700; }
|
|
1027
|
+
.mdview em { font-style: italic; }
|
|
1028
|
+
.mdview del { opacity: .65; }
|
|
1029
|
+
.mdview a { color: var(--accent); text-decoration: underline; word-break: break-all; }
|
|
1030
|
+
.mdview code.inl {
|
|
1031
|
+
background: var(--code-bg, var(--bg)); border: 1px solid var(--border); border-radius: 4px;
|
|
1032
|
+
padding: 0 5px; font-size: .9em;
|
|
1033
|
+
}
|
|
1034
|
+
.mdview .md-p { margin: 4px 0; }
|
|
1035
|
+
.mdview .md-h { font-weight: 700; color: var(--text); margin: 14px 0 6px; }
|
|
1036
|
+
.mdview .md-h1 { font-size: 19px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
|
|
1037
|
+
.mdview .md-h2 { font-size: 17px; }
|
|
1038
|
+
.mdview .md-h3, .mdview .md-h4 { font-size: 15px; }
|
|
1039
|
+
.mdview ul.md-ul, .mdview ol.md-ol { margin: 4px 0 6px; padding-left: 24px; }
|
|
1040
|
+
.mdview .md-ul li, .mdview .md-ol li { margin: 2px 0; }
|
|
1041
|
+
.mdview .md-quote {
|
|
1042
|
+
border-left: 3px solid var(--border); padding: 2px 0 2px 12px; margin: 6px 0;
|
|
1043
|
+
color: var(--muted);
|
|
1044
|
+
}
|
|
1045
|
+
.mdview .md-hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
|
|
1046
|
+
.mdview .codewrap { margin: 10px 0; }
|
|
1047
|
+
.search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
|
|
1048
|
+
.search-bar input { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
|
|
1049
|
+
.search-bar span { font-size: 13px; color: var(--muted); }
|
|
1050
|
+
.search-bar button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 17px; padding: 0 6px; }
|
|
1051
|
+
.search-summary { font-size: 11.5px; color: var(--muted); margin: 8px 0 12px; }
|
|
1052
|
+
.search-group { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
|
|
1053
|
+
.search-group-head { font-size: 12.5px; margin-bottom: 6px; }
|
|
1054
|
+
.search-group-head .link { color: var(--accent); text-decoration: none; }
|
|
1055
|
+
.search-match { font-size: 12.5px; padding: 6px 0; border-top: 1px solid var(--border); }
|
|
1056
|
+
.search-match:first-of-type { border-top: 0; }
|
|
1057
|
+
.search-match .role { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; }
|
|
1058
|
+
.sessions-list .card .icbtn { padding: 8px 12px; }
|
|
1059
|
+
|
|
1060
|
+
/* Vista: vista previa del proyecto vía túnel (TunnelMole en la PC) */
|
|
1061
|
+
.tunnel-form { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
|
|
1062
|
+
.tunnel-form input[type="text"] {
|
|
1063
|
+
width: 170px; flex-shrink: 0; padding: 10px 12px;
|
|
1064
|
+
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
|
|
1065
|
+
color: var(--text); font: inherit; font-size: 15px; outline: none;
|
|
1066
|
+
}
|
|
1067
|
+
.tunnel-form input[type="text"]:focus { border-color: var(--accent); }
|
|
1068
|
+
.tunnel {
|
|
1069
|
+
background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
|
|
1070
|
+
padding: 12px; margin-bottom: 10px;
|
|
1071
|
+
}
|
|
1072
|
+
.tunnel .thead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
|
|
1073
|
+
.tunnel .thead b { font-size: 13.5px; }
|
|
1074
|
+
.tunnel .thead .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #22c55e); flex-shrink: 0; }
|
|
1075
|
+
.tunnel .thead .tnote { font-size: 11px; color: var(--muted); }
|
|
1076
|
+
.tunnel .thead .linkbtn { margin-left: auto; }
|
|
1077
|
+
.tunnel .turl {
|
|
1078
|
+
display: flex; align-items: center; gap: 8px; padding: 7px 9px;
|
|
1079
|
+
background: var(--code-bg, var(--bg)); border: 1px solid var(--border); border-radius: 8px;
|
|
1080
|
+
margin-bottom: 6px; font-size: 12.5px; overflow: hidden;
|
|
1081
|
+
}
|
|
1082
|
+
.tunnel .turl a { color: var(--accent); text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1083
|
+
.tunnel .tnote-sec { font-size: 11px; color: var(--muted); margin-top: 4px; }
|
|
1084
|
+
mark { background: var(--accent); color: var(--bg); padding: 0 2px; border-radius: 3px; }
|
|
1085
|
+
|
|
1086
|
+
/* ----- Responsive ----- */
|
|
1087
|
+
@media (max-width: 1023px) {
|
|
1088
|
+
#sidebar {
|
|
1089
|
+
position: fixed; top: 0; bottom: 0; left: 0;
|
|
1090
|
+
width: min(var(--sb-w, 264px), 90vw);
|
|
1091
|
+
transform: translateX(-100%);
|
|
1092
|
+
box-shadow: var(--shadow);
|
|
1093
|
+
}
|
|
1094
|
+
body.sidebar-open #sidebar { transform: translateX(0); }
|
|
1095
|
+
body.sidebar-open #scrim { display: block; }
|
|
1096
|
+
header .burger { display: inline-flex; }
|
|
1097
|
+
.fab.show { display: block; }
|
|
1098
|
+
.sb-reveal { display: none !important; }
|
|
1099
|
+
}
|
|
1100
|
+
@media (min-width: 1024px) {
|
|
1101
|
+
header .burger { display: none; }
|
|
1102
|
+
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1103
|
+
.fab { display: none !important; }
|
|
1104
|
+
#sidebar .resizer { display: block; }
|
|
1105
|
+
body.sb-hide #sidebar { display: none; }
|
|
1106
|
+
body.sb-hide .sb-reveal { display: block; }
|
|
1107
|
+
}
|
|
1108
|
+
@media (min-width: 720px) {
|
|
1109
|
+
header a.logout { display: inline-flex; }
|
|
1110
|
+
}
|
|
1111
|
+
@media (max-width: 479px) {
|
|
1112
|
+
body { font-size: 14.5px; }
|
|
1113
|
+
header .sub { max-width: 44vw; }
|
|
1114
|
+
#messages { padding: 10px; gap: 8px; }
|
|
1115
|
+
.msg { font-size: 14.5px; }
|
|
1116
|
+
form.sendbar textarea { font-size: 16px; } /* evita zoom iOS */
|
|
1117
|
+
.sitem { padding: 11px 8px 11px 12px; font-size: 13.5px; }
|
|
1118
|
+
.proj-head { font-size: 13px; }
|
|
1119
|
+
.utilities button { padding: 9px 4px; font-size: 12px; }
|
|
1120
|
+
.procrow { padding: 7px 10px; gap: 8px; }
|
|
1121
|
+
.stopbtn .stoptxt { display: none; } /* en pantallas chicas, solo el ícono */
|
|
1122
|
+
}
|
|
1123
|
+
</style>
|
|
1124
|
+
</head>
|
|
1125
|
+
<body data-theme="{{THEME}}">
|
|
1126
|
+
<div id="scrim"></div>
|
|
1127
|
+
<button type="button" class="sb-reveal" id="sbReveal" title="Mostrar panel" aria-label="Mostrar panel">»</button>
|
|
1128
|
+
|
|
1129
|
+
<aside id="sidebar" aria-label="Proyectos y sesiones">
|
|
1130
|
+
<div class="brand" id="brandHome" title="Ir al inicio">
|
|
1131
|
+
<div class="logo">❯_</div>
|
|
1132
|
+
<div class="name">OpenBridge</div>
|
|
1133
|
+
<div class="ver">v3</div>
|
|
1134
|
+
<button type="button" class="sbhide" id="btnSbHide" title="Ocultar panel" aria-label="Ocultar panel">«</button>
|
|
1135
|
+
</div>
|
|
1136
|
+
<button class="newsession" id="btnNewSession" type="button">+ nueva sesión</button>
|
|
1137
|
+
<div class="sidesearch">
|
|
1138
|
+
<input type="text" id="sideSearch" placeholder="filtrar proyectos…" autocomplete="off">
|
|
1139
|
+
</div>
|
|
1140
|
+
<div id="bridgeBar" title="Computadora conectada: sus carpetas, modelos y chats"></div>
|
|
1141
|
+
<div id="sessionTree"></div>
|
|
1142
|
+
<div class="utilities">
|
|
1143
|
+
<button data-view="home" type="button" title="Chats">chats</button>
|
|
1144
|
+
<button data-view="files" type="button" title="Archivos">archivos</button>
|
|
1145
|
+
<button data-view="sessions" type="button" title="Sesiones opencode">sesiones</button>
|
|
1146
|
+
<button data-view="search" type="button" title="Buscar">buscar</button>
|
|
1147
|
+
<button data-view="preview" type="button" title="Vista previa del proyecto (túnel)">preview</button>
|
|
1148
|
+
<button data-view="procs" type="button" title="Procesos de la sesión">procs</button>
|
|
1149
|
+
</div>
|
|
1150
|
+
<div class="footer">
|
|
1151
|
+
<div class="row" id="bridgeStatusRow">
|
|
1152
|
+
<span class="dot" id="bridgeDot"></span>
|
|
1153
|
+
<span id="bridgeStatusText">puente: desconocido</span>
|
|
1154
|
+
</div>
|
|
1155
|
+
<a class="logout" href="logout.php">salir</a>
|
|
1156
|
+
</div>
|
|
1157
|
+
<div class="resizer" id="sbResizer" title="Arrastrá para ajustar · doble clic para restablecer"></div>
|
|
1158
|
+
</aside>
|
|
1159
|
+
|
|
1160
|
+
<main>
|
|
1161
|
+
<header>
|
|
1162
|
+
<button class="burger" id="btnBurger" aria-label="Menú">☰</button>
|
|
1163
|
+
<button class="back" id="btnBack" style="display:none" aria-label="Volver">←</button>
|
|
1164
|
+
<div class="left">
|
|
1165
|
+
<div class="titles">
|
|
1166
|
+
<div class="title" id="hTitle">OpenBridge</div>
|
|
1167
|
+
<div class="sub" id="hSub">conectando…</div>
|
|
1168
|
+
</div>
|
|
1169
|
+
</div>
|
|
1170
|
+
<div class="actions">
|
|
1171
|
+
<button class="icbtn" id="btnPush" type="button" title="Activar avisos en este dispositivo" aria-label="Activar avisos" aria-pressed="false"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"/></svg></button>
|
|
1172
|
+
<button class="icbtn" id="btnSkin" title="Cambiar tema" aria-label="Cambiar tema">◍</button>
|
|
1173
|
+
<button class="icbtn" id="btnCmds" title="Comandos" aria-label="Comandos disponibles">/</button>
|
|
1174
|
+
</div>
|
|
1175
|
+
</header>
|
|
1176
|
+
|
|
1177
|
+
<div id="cmdsPanel" class="cmds"></div>
|
|
1178
|
+
<div id="skinPanel"></div>
|
|
1179
|
+
<div id="cardMenu"></div>
|
|
1180
|
+
|
|
1181
|
+
<div id="home"></div>
|
|
1182
|
+
|
|
1183
|
+
<div id="chat">
|
|
1184
|
+
<div id="offline" style="display:none">⚠ el puente de la computadora seleccionada está apagado · iniciá “OpenBridge” en esa PC</div>
|
|
1185
|
+
<div id="messages" aria-live="polite"></div>
|
|
1186
|
+
<button type="button" id="jumpBtn" class="jumpbtn" aria-label="Ir al último mensaje">↓ final</button>
|
|
1187
|
+
<div id="imgPreview" style="display:none">
|
|
1188
|
+
<img id="imgThumb" alt="imagen adjunta">
|
|
1189
|
+
<button type="button" id="imgRemove" title="Quitar imagen" aria-label="Quitar imagen">✕</button>
|
|
1190
|
+
<span id="imgMeta"></span>
|
|
1191
|
+
</div>
|
|
1192
|
+
<div id="procrow" class="procrow" role="status">
|
|
1193
|
+
<div class="typing proc" id="proc-ind">
|
|
1194
|
+
<span class="kitt" aria-hidden="true"><span class="kitt-scan"></span></span>
|
|
1195
|
+
<span class="proc-label" id="proc-label"></span>
|
|
1196
|
+
</div>
|
|
1197
|
+
<span class="proc-time" id="proc-time"></span>
|
|
1198
|
+
<button type="button" class="stopbtn" id="btnStop" title="Corta la ejecución en la PC" aria-label="Detener"><span aria-hidden="true">⏹</span><span class="stoptxt">detener</span></button>
|
|
1199
|
+
</div>
|
|
1200
|
+
<button type="button" id="composeOpen" class="composeopen" aria-label="Escribir mensaje">
|
|
1201
|
+
<span class="prompt" aria-hidden="true">❯</span>
|
|
1202
|
+
<span class="cph">escribí un mensaje…</span>
|
|
1203
|
+
</button>
|
|
1204
|
+
<form class="sendbar" id="sendForm" style="display:none">
|
|
1205
|
+
<div class="shead" id="composeClose" title="Cerrar">
|
|
1206
|
+
<span class="handle" aria-hidden="true"></span>
|
|
1207
|
+
<button type="button" class="cclose" aria-label="Cerrar">✕</button>
|
|
1208
|
+
</div>
|
|
1209
|
+
<span class="prompt">❯</span>
|
|
1210
|
+
<textarea id="input" rows="1" placeholder="escribí un mensaje…" autocomplete="off"></textarea>
|
|
1211
|
+
<button type="button" class="imgbtn" id="btnImg" title="Adjuntar imagen (modelos con visión)" aria-label="Adjuntar imagen"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"/></svg></button>
|
|
1212
|
+
<input type="file" id="imgInput" accept="image/png,image/jpeg,image/webp,image/gif" style="display:none">
|
|
1213
|
+
<button type="submit" id="sendBtn">enviar</button>
|
|
1214
|
+
<div id="slashPanel" class="slash-panel"></div>
|
|
1215
|
+
</form>
|
|
1216
|
+
</div>
|
|
1217
|
+
|
|
1218
|
+
<div id="viewFiles" class="view" style="display:none"></div>
|
|
1219
|
+
<div id="viewSessions" class="view" style="display:none"></div>
|
|
1220
|
+
<div id="viewSearch" class="view" style="display:none"></div>
|
|
1221
|
+
<div id="viewHistory" class="view" style="display:none"></div>
|
|
1222
|
+
<div id="viewPreview" class="view" style="display:none"></div>
|
|
1223
|
+
<div id="viewProcs" class="view" style="display:none"></div>
|
|
1224
|
+
|
|
1225
|
+
<footer id="statusbar">
|
|
1226
|
+
<span class="dot" id="sbDot"></span>
|
|
1227
|
+
<span class="seg mode" id="sbMode">…</span>
|
|
1228
|
+
<span class="sep">│</span>
|
|
1229
|
+
<button type="button" id="sbModel" title="Cambiar modelo / agente de este chat">sin modelo</button>
|
|
1230
|
+
<span class="sep" id="sbSep2">│</span>
|
|
1231
|
+
<span class="seg" id="sbExtra"></span>
|
|
1232
|
+
</footer>
|
|
1233
|
+
</main>
|
|
1234
|
+
|
|
1235
|
+
<button class="fab" id="fabNew" title="Nueva sesión" aria-label="Nueva sesión">+</button>
|
|
1236
|
+
|
|
1237
|
+
<div id="overlay">
|
|
1238
|
+
<div class="modal">
|
|
1239
|
+
<h2>nueva sesión</h2>
|
|
1240
|
+
<label for="fFolder">Carpeta de trabajo</label>
|
|
1241
|
+
<select id="fFolder"></select>
|
|
1242
|
+
<div id="fFolderCreate" style="display:none; margin-top:6px">
|
|
1243
|
+
<div style="font-size:12px; color:var(--muted)">¿no está tu carpeta?</div>
|
|
1244
|
+
<div style="display:flex; gap:6px; margin-top:4px">
|
|
1245
|
+
<input type="text" id="fNewFolder" placeholder="nombre de la carpeta" style="flex:1">
|
|
1246
|
+
<button type="button" id="btnNewFolder" style="flex:0 0 auto; padding:11px 14px; border:1px solid var(--mine); border-radius:8px; background:transparent; color:var(--mine); font-family:var(--font); font-weight:600; cursor:pointer">crear</button>
|
|
1247
|
+
</div>
|
|
1248
|
+
<div id="fNewFolderMsg" style="font-size:11.5px; color:var(--muted); margin-top:4px"></div>
|
|
1249
|
+
</div>
|
|
1250
|
+
<label for="fModel">Modelo de IA (todos los proveedores)</label>
|
|
1251
|
+
<input type="text" id="fModelSearch" placeholder="buscar modelo… (ej: glm, deepseek)" autocomplete="off">
|
|
1252
|
+
<select id="fModel"></select>
|
|
1253
|
+
<label for="fAgent">Cómo debe actuar</label>
|
|
1254
|
+
<select id="fAgent"></select>
|
|
1255
|
+
<label for="fMsg">Mensaje (opcional — vacío = solo crear el chat)</label>
|
|
1256
|
+
<textarea id="fMsg" rows="3" placeholder="escribí tu pedido… (enter = crear · shift+enter = salto de línea)"></textarea>
|
|
1257
|
+
<div class="warn" id="fWarn" style="display:none">el puente aún no sincronizó carpetas/modelos.</div>
|
|
1258
|
+
<div class="row">
|
|
1259
|
+
<button type="button" class="cancel" id="btnCancel">cancelar</button>
|
|
1260
|
+
<button type="button" class="save" id="btnSave">crear</button>
|
|
1261
|
+
</div>
|
|
1262
|
+
</div>
|
|
1263
|
+
</div>
|
|
1264
|
+
|
|
1265
|
+
<div id="modelOverlay">
|
|
1266
|
+
<div class="modal">
|
|
1267
|
+
<h2>cambiar modelo</h2>
|
|
1268
|
+
<div class="msub" id="mTitle" style="font-size:11.5px;color:var(--muted);margin:-6px 0 4px"></div>
|
|
1269
|
+
<label for="fModel2">Modelo de IA (todos los proveedores)</label>
|
|
1270
|
+
<input type="text" id="mSearch" placeholder="buscar modelo… (ej: glm, deepseek)" autocomplete="off">
|
|
1271
|
+
<select id="fModel2"></select>
|
|
1272
|
+
<label for="fAgent2">Cómo debe actuar</label>
|
|
1273
|
+
<select id="fAgent2"></select>
|
|
1274
|
+
<div class="warn" id="mWarn" style="display:none">el puente aún no sincronizó modelos.</div>
|
|
1275
|
+
<div class="hint" style="font-size:11px;color:var(--muted);margin-top:8px">aplica desde el próximo mensaje · la conversación continúa igual</div>
|
|
1276
|
+
<div class="row">
|
|
1277
|
+
<button type="button" class="cancel" id="btnModelCancel">cancelar</button>
|
|
1278
|
+
<button type="button" class="save" id="btnModelSave">aplicar</button>
|
|
1279
|
+
</div>
|
|
1280
|
+
</div>
|
|
1281
|
+
</div>
|
|
1282
|
+
|
|
1283
|
+
<script>
|
|
1284
|
+
window.APP_CONFIG = {
|
|
1285
|
+
csrf: "{{CSRF}}",
|
|
1286
|
+
initialSession: {{INITIAL_SESSION}},
|
|
1287
|
+
theme: "{{THEME}}",
|
|
1288
|
+
themes: {{THEMES_JSON}},
|
|
1289
|
+
sseDisabled: {{SSE_DISABLED}},
|
|
1290
|
+
pushEnabled: {{PUSH_ENABLED}},
|
|
1291
|
+
pushKey: "{{PUSH_KEY}}"
|
|
1292
|
+
};
|
|
1293
|
+
</script>
|
|
1294
|
+
<script src="app.js?v={{APPJS_VER}}" defer></script>
|
|
1295
|
+
</body>
|
|
1296
|
+
</html>
|