@hirohsu/user-web-feedback 2.8.9 → 2.8.11
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/README.md +953 -953
- package/dist/cli.cjs +33309 -46041
- package/dist/index.cjs +35773 -48507
- package/dist/static/app.js +385 -385
- package/dist/static/components/navbar.css +406 -406
- package/dist/static/components/navbar.html +49 -49
- package/dist/static/components/navbar.js +211 -211
- package/dist/static/dashboard.css +495 -495
- package/dist/static/dashboard.html +95 -95
- package/dist/static/dashboard.js +540 -540
- package/dist/static/favicon.svg +27 -27
- package/dist/static/index.html +541 -541
- package/dist/static/logs.html +376 -376
- package/dist/static/logs.js +442 -442
- package/dist/static/mcp-settings.html +797 -797
- package/dist/static/mcp-settings.js +884 -884
- package/dist/static/modules/app-core.js +124 -124
- package/dist/static/modules/conversation-panel.js +247 -247
- package/dist/static/modules/feedback-handler.js +1420 -1420
- package/dist/static/modules/image-handler.js +155 -155
- package/dist/static/modules/log-viewer.js +296 -296
- package/dist/static/modules/mcp-manager.js +474 -474
- package/dist/static/modules/prompt-manager.js +364 -364
- package/dist/static/modules/settings-manager.js +299 -299
- package/dist/static/modules/socket-manager.js +170 -170
- package/dist/static/modules/state-manager.js +352 -352
- package/dist/static/modules/timer-controller.js +243 -243
- package/dist/static/modules/ui-helpers.js +246 -246
- package/dist/static/settings.html +426 -426
- package/dist/static/settings.js +767 -767
- package/dist/static/style.css +2156 -2156
- package/dist/static/terminals.html +357 -357
- package/dist/static/terminals.js +321 -321
- package/package.json +95 -95
|
@@ -1,357 +1,357 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="zh-TW">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>💻 CLI 終端機 - User Feedback</title>
|
|
7
|
-
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
|
8
|
-
<script src="/socket.io.min.js"></script>
|
|
9
|
-
<!-- Navbar Component -->
|
|
10
|
-
<link rel="stylesheet" href="/components/navbar.css">
|
|
11
|
-
<link rel="stylesheet" href="style.css">
|
|
12
|
-
<link rel="stylesheet" href="dashboard.css">
|
|
13
|
-
<style>
|
|
14
|
-
.terminals-container {
|
|
15
|
-
max-width: 1400px;
|
|
16
|
-
margin: 20px auto;
|
|
17
|
-
padding: 0 20px 40px 20px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.page-header {
|
|
21
|
-
display: flex;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
align-items: center;
|
|
24
|
-
margin-bottom: 24px;
|
|
25
|
-
padding-bottom: 16px;
|
|
26
|
-
border-bottom: 1px solid var(--border-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.page-title {
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
gap: 12px;
|
|
33
|
-
font-size: 1.75rem;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
color: var(--text-primary);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.header-actions {
|
|
39
|
-
display: flex;
|
|
40
|
-
gap: 12px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.stats-bar {
|
|
44
|
-
display: flex;
|
|
45
|
-
gap: 20px;
|
|
46
|
-
margin-bottom: 24px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.stat-item {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
gap: 8px;
|
|
53
|
-
padding: 8px 16px;
|
|
54
|
-
background: var(--bg-primary);
|
|
55
|
-
border: 1px solid var(--border-color);
|
|
56
|
-
border-radius: var(--radius-sm);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.stat-item .icon {
|
|
60
|
-
font-size: 1.2rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.stat-item .value {
|
|
64
|
-
font-weight: 600;
|
|
65
|
-
color: var(--text-primary);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.stat-item .label {
|
|
69
|
-
color: var(--text-secondary);
|
|
70
|
-
font-size: 0.9rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.terminals-grid {
|
|
74
|
-
display: grid;
|
|
75
|
-
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
76
|
-
gap: 20px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.terminal-card {
|
|
80
|
-
background: var(--bg-primary);
|
|
81
|
-
border: 1px solid var(--border-color);
|
|
82
|
-
border-radius: var(--radius-md);
|
|
83
|
-
padding: 20px;
|
|
84
|
-
transition: box-shadow 0.2s ease;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.terminal-card:hover {
|
|
88
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.terminal-header {
|
|
92
|
-
display: flex;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
align-items: flex-start;
|
|
95
|
-
margin-bottom: 16px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.terminal-info h3 {
|
|
99
|
-
font-size: 1.1rem;
|
|
100
|
-
font-weight: 600;
|
|
101
|
-
color: var(--text-primary);
|
|
102
|
-
margin-bottom: 4px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.terminal-info .tool-badge {
|
|
106
|
-
display: inline-flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
gap: 4px;
|
|
109
|
-
padding: 2px 8px;
|
|
110
|
-
background: var(--bg-secondary);
|
|
111
|
-
border-radius: var(--radius-sm);
|
|
112
|
-
font-size: 0.8rem;
|
|
113
|
-
color: var(--text-secondary);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.terminal-status {
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
gap: 6px;
|
|
120
|
-
padding: 4px 10px;
|
|
121
|
-
border-radius: var(--radius-sm);
|
|
122
|
-
font-size: 0.85rem;
|
|
123
|
-
font-weight: 500;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.terminal-status.running {
|
|
127
|
-
background: rgba(59, 130, 246, 0.1);
|
|
128
|
-
color: var(--accent-blue);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.terminal-status.idle {
|
|
132
|
-
background: rgba(34, 197, 94, 0.1);
|
|
133
|
-
color: var(--accent-green);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.terminal-status.error {
|
|
137
|
-
background: rgba(239, 68, 68, 0.1);
|
|
138
|
-
color: var(--accent-red);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.terminal-status.stopped {
|
|
142
|
-
background: rgba(156, 163, 175, 0.1);
|
|
143
|
-
color: var(--text-muted);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.terminal-details {
|
|
147
|
-
margin-bottom: 16px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.detail-row {
|
|
151
|
-
display: flex;
|
|
152
|
-
justify-content: space-between;
|
|
153
|
-
padding: 8px 0;
|
|
154
|
-
border-bottom: 1px solid var(--border-color);
|
|
155
|
-
font-size: 0.9rem;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.detail-row:last-child {
|
|
159
|
-
border-bottom: none;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.detail-label {
|
|
163
|
-
color: var(--text-secondary);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.detail-value {
|
|
167
|
-
color: var(--text-primary);
|
|
168
|
-
font-family: monospace;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.terminal-actions {
|
|
172
|
-
display: flex;
|
|
173
|
-
gap: 8px;
|
|
174
|
-
justify-content: flex-end;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.btn-sm {
|
|
178
|
-
padding: 6px 12px;
|
|
179
|
-
font-size: 0.85rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.empty-state {
|
|
183
|
-
text-align: center;
|
|
184
|
-
padding: 60px 20px;
|
|
185
|
-
color: var(--text-muted);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.empty-state .icon {
|
|
189
|
-
font-size: 3rem;
|
|
190
|
-
margin-bottom: 16px;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.empty-state h3 {
|
|
194
|
-
font-size: 1.25rem;
|
|
195
|
-
margin-bottom: 8px;
|
|
196
|
-
color: var(--text-secondary);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Logs Modal */
|
|
200
|
-
.modal-overlay {
|
|
201
|
-
display: none;
|
|
202
|
-
position: fixed;
|
|
203
|
-
top: 0;
|
|
204
|
-
left: 0;
|
|
205
|
-
right: 0;
|
|
206
|
-
bottom: 0;
|
|
207
|
-
background: rgba(0, 0, 0, 0.5);
|
|
208
|
-
z-index: 1000;
|
|
209
|
-
justify-content: center;
|
|
210
|
-
align-items: center;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.modal-overlay.show {
|
|
214
|
-
display: flex;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.modal-content {
|
|
218
|
-
background: var(--bg-primary);
|
|
219
|
-
border-radius: var(--radius-lg);
|
|
220
|
-
width: 90%;
|
|
221
|
-
max-width: 800px;
|
|
222
|
-
max-height: 80vh;
|
|
223
|
-
display: flex;
|
|
224
|
-
flex-direction: column;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.modal-header {
|
|
228
|
-
display: flex;
|
|
229
|
-
justify-content: space-between;
|
|
230
|
-
align-items: center;
|
|
231
|
-
padding: 16px 20px;
|
|
232
|
-
border-bottom: 1px solid var(--border-color);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.modal-header h3 {
|
|
236
|
-
font-size: 1.2rem;
|
|
237
|
-
font-weight: 600;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.modal-close {
|
|
241
|
-
background: none;
|
|
242
|
-
border: none;
|
|
243
|
-
font-size: 1.5rem;
|
|
244
|
-
cursor: pointer;
|
|
245
|
-
color: var(--text-muted);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.modal-body {
|
|
249
|
-
flex: 1;
|
|
250
|
-
overflow-y: auto;
|
|
251
|
-
padding: 20px;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.log-entry {
|
|
255
|
-
padding: 12px;
|
|
256
|
-
margin-bottom: 8px;
|
|
257
|
-
background: var(--bg-secondary);
|
|
258
|
-
border-radius: var(--radius-sm);
|
|
259
|
-
font-family: monospace;
|
|
260
|
-
font-size: 0.85rem;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.log-entry.success {
|
|
264
|
-
border-left: 3px solid var(--accent-green);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.log-entry.error {
|
|
268
|
-
border-left: 3px solid var(--accent-red);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.log-meta {
|
|
272
|
-
display: flex;
|
|
273
|
-
justify-content: space-between;
|
|
274
|
-
margin-bottom: 8px;
|
|
275
|
-
color: var(--text-muted);
|
|
276
|
-
font-size: 0.8rem;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.log-prompt {
|
|
280
|
-
color: var(--text-secondary);
|
|
281
|
-
margin-bottom: 8px;
|
|
282
|
-
white-space: pre-wrap;
|
|
283
|
-
word-break: break-all;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.log-response {
|
|
287
|
-
color: var(--text-primary);
|
|
288
|
-
white-space: pre-wrap;
|
|
289
|
-
word-break: break-all;
|
|
290
|
-
}
|
|
291
|
-
</style>
|
|
292
|
-
</head>
|
|
293
|
-
<body>
|
|
294
|
-
<!-- Unified Navigation Bar (injected by navbar.js) -->
|
|
295
|
-
|
|
296
|
-
<div class="terminals-container">
|
|
297
|
-
<header class="page-header">
|
|
298
|
-
<h1 class="page-title">
|
|
299
|
-
<span class="icon">💻</span>
|
|
300
|
-
CLI 終端機
|
|
301
|
-
</h1>
|
|
302
|
-
<div class="header-actions">
|
|
303
|
-
<button id="refreshBtn" class="btn btn-secondary">
|
|
304
|
-
<span class="icon">🔄</span>
|
|
305
|
-
重新整理
|
|
306
|
-
</button>
|
|
307
|
-
</div>
|
|
308
|
-
</header>
|
|
309
|
-
|
|
310
|
-
<div class="stats-bar">
|
|
311
|
-
<div class="stat-item">
|
|
312
|
-
<span class="icon">📊</span>
|
|
313
|
-
<span class="value" id="totalTerminals">0</span>
|
|
314
|
-
<span class="label">總終端機</span>
|
|
315
|
-
</div>
|
|
316
|
-
<div class="stat-item">
|
|
317
|
-
<span class="icon">🟢</span>
|
|
318
|
-
<span class="value" id="activeTerminals">0</span>
|
|
319
|
-
<span class="label">運行中</span>
|
|
320
|
-
</div>
|
|
321
|
-
<div class="stat-item">
|
|
322
|
-
<span class="icon">⚠️</span>
|
|
323
|
-
<span class="value" id="errorTerminals">0</span>
|
|
324
|
-
<span class="label">錯誤</span>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
|
|
328
|
-
<div id="terminalsList" class="terminals-grid">
|
|
329
|
-
<div class="empty-state">
|
|
330
|
-
<span class="icon">💻</span>
|
|
331
|
-
<h3>尚無 CLI 終端機</h3>
|
|
332
|
-
<p>當您使用 CLI 模式與 AI 互動時,終端機將在此顯示</p>
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
</div>
|
|
336
|
-
|
|
337
|
-
<!-- Logs Modal -->
|
|
338
|
-
<div id="logsModal" class="modal-overlay">
|
|
339
|
-
<div class="modal-content">
|
|
340
|
-
<div class="modal-header">
|
|
341
|
-
<h3 id="logsModalTitle">執行日誌</h3>
|
|
342
|
-
<button class="modal-close" id="closeLogsModal">×</button>
|
|
343
|
-
</div>
|
|
344
|
-
<div class="modal-body" id="logsModalBody">
|
|
345
|
-
<!-- 日誌將由 JavaScript 動態生成 -->
|
|
346
|
-
</div>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
|
-
|
|
350
|
-
<!-- Toast Container -->
|
|
351
|
-
<div id="toastContainer" class="toast-container"></div>
|
|
352
|
-
|
|
353
|
-
<!-- Scripts -->
|
|
354
|
-
<script src="/components/navbar.js"></script>
|
|
355
|
-
<script src="terminals.js"></script>
|
|
356
|
-
</body>
|
|
357
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-TW">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>💻 CLI 終端機 - User Feedback</title>
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
|
8
|
+
<script src="/socket.io.min.js"></script>
|
|
9
|
+
<!-- Navbar Component -->
|
|
10
|
+
<link rel="stylesheet" href="/components/navbar.css">
|
|
11
|
+
<link rel="stylesheet" href="style.css">
|
|
12
|
+
<link rel="stylesheet" href="dashboard.css">
|
|
13
|
+
<style>
|
|
14
|
+
.terminals-container {
|
|
15
|
+
max-width: 1400px;
|
|
16
|
+
margin: 20px auto;
|
|
17
|
+
padding: 0 20px 40px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.page-header {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: center;
|
|
24
|
+
margin-bottom: 24px;
|
|
25
|
+
padding-bottom: 16px;
|
|
26
|
+
border-bottom: 1px solid var(--border-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.page-title {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
font-size: 1.75rem;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
color: var(--text-primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.header-actions {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: 12px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.stats-bar {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: 20px;
|
|
46
|
+
margin-bottom: 24px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.stat-item {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 8px;
|
|
53
|
+
padding: 8px 16px;
|
|
54
|
+
background: var(--bg-primary);
|
|
55
|
+
border: 1px solid var(--border-color);
|
|
56
|
+
border-radius: var(--radius-sm);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.stat-item .icon {
|
|
60
|
+
font-size: 1.2rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.stat-item .value {
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
color: var(--text-primary);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.stat-item .label {
|
|
69
|
+
color: var(--text-secondary);
|
|
70
|
+
font-size: 0.9rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.terminals-grid {
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
76
|
+
gap: 20px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.terminal-card {
|
|
80
|
+
background: var(--bg-primary);
|
|
81
|
+
border: 1px solid var(--border-color);
|
|
82
|
+
border-radius: var(--radius-md);
|
|
83
|
+
padding: 20px;
|
|
84
|
+
transition: box-shadow 0.2s ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.terminal-card:hover {
|
|
88
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.terminal-header {
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
align-items: flex-start;
|
|
95
|
+
margin-bottom: 16px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.terminal-info h3 {
|
|
99
|
+
font-size: 1.1rem;
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
color: var(--text-primary);
|
|
102
|
+
margin-bottom: 4px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.terminal-info .tool-badge {
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 4px;
|
|
109
|
+
padding: 2px 8px;
|
|
110
|
+
background: var(--bg-secondary);
|
|
111
|
+
border-radius: var(--radius-sm);
|
|
112
|
+
font-size: 0.8rem;
|
|
113
|
+
color: var(--text-secondary);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.terminal-status {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 6px;
|
|
120
|
+
padding: 4px 10px;
|
|
121
|
+
border-radius: var(--radius-sm);
|
|
122
|
+
font-size: 0.85rem;
|
|
123
|
+
font-weight: 500;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.terminal-status.running {
|
|
127
|
+
background: rgba(59, 130, 246, 0.1);
|
|
128
|
+
color: var(--accent-blue);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.terminal-status.idle {
|
|
132
|
+
background: rgba(34, 197, 94, 0.1);
|
|
133
|
+
color: var(--accent-green);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.terminal-status.error {
|
|
137
|
+
background: rgba(239, 68, 68, 0.1);
|
|
138
|
+
color: var(--accent-red);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.terminal-status.stopped {
|
|
142
|
+
background: rgba(156, 163, 175, 0.1);
|
|
143
|
+
color: var(--text-muted);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.terminal-details {
|
|
147
|
+
margin-bottom: 16px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.detail-row {
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: space-between;
|
|
153
|
+
padding: 8px 0;
|
|
154
|
+
border-bottom: 1px solid var(--border-color);
|
|
155
|
+
font-size: 0.9rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.detail-row:last-child {
|
|
159
|
+
border-bottom: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.detail-label {
|
|
163
|
+
color: var(--text-secondary);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.detail-value {
|
|
167
|
+
color: var(--text-primary);
|
|
168
|
+
font-family: monospace;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.terminal-actions {
|
|
172
|
+
display: flex;
|
|
173
|
+
gap: 8px;
|
|
174
|
+
justify-content: flex-end;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.btn-sm {
|
|
178
|
+
padding: 6px 12px;
|
|
179
|
+
font-size: 0.85rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.empty-state {
|
|
183
|
+
text-align: center;
|
|
184
|
+
padding: 60px 20px;
|
|
185
|
+
color: var(--text-muted);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.empty-state .icon {
|
|
189
|
+
font-size: 3rem;
|
|
190
|
+
margin-bottom: 16px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.empty-state h3 {
|
|
194
|
+
font-size: 1.25rem;
|
|
195
|
+
margin-bottom: 8px;
|
|
196
|
+
color: var(--text-secondary);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Logs Modal */
|
|
200
|
+
.modal-overlay {
|
|
201
|
+
display: none;
|
|
202
|
+
position: fixed;
|
|
203
|
+
top: 0;
|
|
204
|
+
left: 0;
|
|
205
|
+
right: 0;
|
|
206
|
+
bottom: 0;
|
|
207
|
+
background: rgba(0, 0, 0, 0.5);
|
|
208
|
+
z-index: 1000;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
align-items: center;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.modal-overlay.show {
|
|
214
|
+
display: flex;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.modal-content {
|
|
218
|
+
background: var(--bg-primary);
|
|
219
|
+
border-radius: var(--radius-lg);
|
|
220
|
+
width: 90%;
|
|
221
|
+
max-width: 800px;
|
|
222
|
+
max-height: 80vh;
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.modal-header {
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
align-items: center;
|
|
231
|
+
padding: 16px 20px;
|
|
232
|
+
border-bottom: 1px solid var(--border-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.modal-header h3 {
|
|
236
|
+
font-size: 1.2rem;
|
|
237
|
+
font-weight: 600;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.modal-close {
|
|
241
|
+
background: none;
|
|
242
|
+
border: none;
|
|
243
|
+
font-size: 1.5rem;
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
color: var(--text-muted);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.modal-body {
|
|
249
|
+
flex: 1;
|
|
250
|
+
overflow-y: auto;
|
|
251
|
+
padding: 20px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.log-entry {
|
|
255
|
+
padding: 12px;
|
|
256
|
+
margin-bottom: 8px;
|
|
257
|
+
background: var(--bg-secondary);
|
|
258
|
+
border-radius: var(--radius-sm);
|
|
259
|
+
font-family: monospace;
|
|
260
|
+
font-size: 0.85rem;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.log-entry.success {
|
|
264
|
+
border-left: 3px solid var(--accent-green);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.log-entry.error {
|
|
268
|
+
border-left: 3px solid var(--accent-red);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.log-meta {
|
|
272
|
+
display: flex;
|
|
273
|
+
justify-content: space-between;
|
|
274
|
+
margin-bottom: 8px;
|
|
275
|
+
color: var(--text-muted);
|
|
276
|
+
font-size: 0.8rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.log-prompt {
|
|
280
|
+
color: var(--text-secondary);
|
|
281
|
+
margin-bottom: 8px;
|
|
282
|
+
white-space: pre-wrap;
|
|
283
|
+
word-break: break-all;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.log-response {
|
|
287
|
+
color: var(--text-primary);
|
|
288
|
+
white-space: pre-wrap;
|
|
289
|
+
word-break: break-all;
|
|
290
|
+
}
|
|
291
|
+
</style>
|
|
292
|
+
</head>
|
|
293
|
+
<body>
|
|
294
|
+
<!-- Unified Navigation Bar (injected by navbar.js) -->
|
|
295
|
+
|
|
296
|
+
<div class="terminals-container">
|
|
297
|
+
<header class="page-header">
|
|
298
|
+
<h1 class="page-title">
|
|
299
|
+
<span class="icon">💻</span>
|
|
300
|
+
CLI 終端機
|
|
301
|
+
</h1>
|
|
302
|
+
<div class="header-actions">
|
|
303
|
+
<button id="refreshBtn" class="btn btn-secondary">
|
|
304
|
+
<span class="icon">🔄</span>
|
|
305
|
+
重新整理
|
|
306
|
+
</button>
|
|
307
|
+
</div>
|
|
308
|
+
</header>
|
|
309
|
+
|
|
310
|
+
<div class="stats-bar">
|
|
311
|
+
<div class="stat-item">
|
|
312
|
+
<span class="icon">📊</span>
|
|
313
|
+
<span class="value" id="totalTerminals">0</span>
|
|
314
|
+
<span class="label">總終端機</span>
|
|
315
|
+
</div>
|
|
316
|
+
<div class="stat-item">
|
|
317
|
+
<span class="icon">🟢</span>
|
|
318
|
+
<span class="value" id="activeTerminals">0</span>
|
|
319
|
+
<span class="label">運行中</span>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="stat-item">
|
|
322
|
+
<span class="icon">⚠️</span>
|
|
323
|
+
<span class="value" id="errorTerminals">0</span>
|
|
324
|
+
<span class="label">錯誤</span>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<div id="terminalsList" class="terminals-grid">
|
|
329
|
+
<div class="empty-state">
|
|
330
|
+
<span class="icon">💻</span>
|
|
331
|
+
<h3>尚無 CLI 終端機</h3>
|
|
332
|
+
<p>當您使用 CLI 模式與 AI 互動時,終端機將在此顯示</p>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
<!-- Logs Modal -->
|
|
338
|
+
<div id="logsModal" class="modal-overlay">
|
|
339
|
+
<div class="modal-content">
|
|
340
|
+
<div class="modal-header">
|
|
341
|
+
<h3 id="logsModalTitle">執行日誌</h3>
|
|
342
|
+
<button class="modal-close" id="closeLogsModal">×</button>
|
|
343
|
+
</div>
|
|
344
|
+
<div class="modal-body" id="logsModalBody">
|
|
345
|
+
<!-- 日誌將由 JavaScript 動態生成 -->
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
<!-- Toast Container -->
|
|
351
|
+
<div id="toastContainer" class="toast-container"></div>
|
|
352
|
+
|
|
353
|
+
<!-- Scripts -->
|
|
354
|
+
<script src="/components/navbar.js"></script>
|
|
355
|
+
<script src="terminals.js"></script>
|
|
356
|
+
</body>
|
|
357
|
+
</html>
|