@hirohsu/user-web-feedback 2.6.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/LICENSE +21 -0
- package/README.md +953 -0
- package/dist/cli.cjs +95778 -0
- package/dist/index.cjs +92818 -0
- package/dist/static/app.js +385 -0
- package/dist/static/components/navbar.css +406 -0
- package/dist/static/components/navbar.html +49 -0
- package/dist/static/components/navbar.js +211 -0
- package/dist/static/dashboard.css +495 -0
- package/dist/static/dashboard.html +95 -0
- package/dist/static/dashboard.js +540 -0
- package/dist/static/favicon.svg +27 -0
- package/dist/static/index.html +541 -0
- package/dist/static/logs.html +376 -0
- package/dist/static/logs.js +442 -0
- package/dist/static/mcp-settings.html +797 -0
- package/dist/static/mcp-settings.js +884 -0
- package/dist/static/modules/app-core.js +124 -0
- package/dist/static/modules/conversation-panel.js +247 -0
- package/dist/static/modules/feedback-handler.js +1420 -0
- package/dist/static/modules/image-handler.js +155 -0
- package/dist/static/modules/log-viewer.js +296 -0
- package/dist/static/modules/mcp-manager.js +474 -0
- package/dist/static/modules/prompt-manager.js +364 -0
- package/dist/static/modules/settings-manager.js +299 -0
- package/dist/static/modules/socket-manager.js +170 -0
- package/dist/static/modules/state-manager.js +352 -0
- package/dist/static/modules/timer-controller.js +243 -0
- package/dist/static/modules/ui-helpers.js +246 -0
- package/dist/static/settings.html +355 -0
- package/dist/static/settings.js +425 -0
- package/dist/static/socket.io.min.js +7 -0
- package/dist/static/style.css +2157 -0
- package/dist/static/terminals.html +357 -0
- package/dist/static/terminals.js +321 -0
- package/package.json +91 -0
|
@@ -0,0 +1,376 @@
|
|
|
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>📋 系統日誌 - 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
|
+
.logs-container {
|
|
15
|
+
max-width: 1400px;
|
|
16
|
+
margin: 20px auto;
|
|
17
|
+
padding: 0 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.page-header {
|
|
21
|
+
margin-bottom: 24px;
|
|
22
|
+
padding-bottom: 16px;
|
|
23
|
+
border-bottom: 1px solid var(--border-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.page-title {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
font-size: 1.75rem;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
color: var(--text-primary);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.logs-controls {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 12px;
|
|
38
|
+
margin-bottom: 16px;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.filter-group {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
align-items: center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.filter-label {
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
color: var(--text-secondary);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.logs-table-container {
|
|
55
|
+
background: var(--bg-primary);
|
|
56
|
+
border: 1px solid var(--border-color);
|
|
57
|
+
border-radius: var(--radius-md);
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.logs-table {
|
|
62
|
+
width: 100%;
|
|
63
|
+
border-collapse: collapse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.logs-table thead {
|
|
67
|
+
background: var(--bg-tertiary);
|
|
68
|
+
border-bottom: 2px solid var(--border-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.logs-table th {
|
|
72
|
+
padding: 12px 16px;
|
|
73
|
+
text-align: left;
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
color: var(--text-secondary);
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.logs-table td {
|
|
81
|
+
padding: 12px 16px;
|
|
82
|
+
font-size: 13px;
|
|
83
|
+
border-bottom: 1px solid var(--border-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.logs-table tbody tr:hover {
|
|
87
|
+
background: var(--bg-tertiary);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.log-level {
|
|
91
|
+
display: inline-block;
|
|
92
|
+
padding: 2px 8px;
|
|
93
|
+
border-radius: 4px;
|
|
94
|
+
font-size: 11px;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
text-transform: uppercase;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.log-level.info {
|
|
100
|
+
background: rgba(59, 130, 246, 0.1);
|
|
101
|
+
color: #3b82f6;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.log-level.warn {
|
|
105
|
+
background: rgba(251, 191, 36, 0.1);
|
|
106
|
+
color: #f59e0b;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.log-level.error {
|
|
110
|
+
background: rgba(239, 68, 68, 0.1);
|
|
111
|
+
color: #ef4444;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.log-level.debug {
|
|
115
|
+
background: rgba(139, 92, 246, 0.1);
|
|
116
|
+
color: #8b5cf6;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.log-message {
|
|
120
|
+
max-width: 600px;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.log-source {
|
|
127
|
+
font-family: 'Courier New', monospace;
|
|
128
|
+
font-size: 12px;
|
|
129
|
+
color: var(--text-muted);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.log-timestamp {
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
color: var(--text-muted);
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.empty-logs {
|
|
139
|
+
text-align: center;
|
|
140
|
+
padding: 60px 20px;
|
|
141
|
+
color: var(--text-muted);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.empty-logs .icon {
|
|
145
|
+
font-size: 48px;
|
|
146
|
+
margin-bottom: 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.pagination {
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
align-items: center;
|
|
153
|
+
gap: 8px;
|
|
154
|
+
padding: 16px;
|
|
155
|
+
border-top: 1px solid var(--border-color);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.pagination button {
|
|
159
|
+
padding: 6px 12px;
|
|
160
|
+
border: 1px solid var(--border-color);
|
|
161
|
+
background: var(--bg-primary);
|
|
162
|
+
border-radius: 4px;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.pagination button:disabled {
|
|
167
|
+
opacity: 0.5;
|
|
168
|
+
cursor: not-allowed;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.pagination .page-info {
|
|
172
|
+
font-size: 13px;
|
|
173
|
+
color: var(--text-secondary);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.logs-table-container {
|
|
177
|
+
flex: 1;
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
min-height: 0;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.logs-table-wrapper {
|
|
185
|
+
flex: 1;
|
|
186
|
+
overflow-y: auto;
|
|
187
|
+
border: 1px solid var(--border-color);
|
|
188
|
+
border-radius: 8px;
|
|
189
|
+
margin-bottom: 16px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.logs-table-wrapper::-webkit-scrollbar {
|
|
193
|
+
width: 8px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.logs-table-wrapper::-webkit-scrollbar-track {
|
|
197
|
+
background: var(--bg-secondary);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.logs-table-wrapper::-webkit-scrollbar-thumb {
|
|
201
|
+
background: var(--border-color);
|
|
202
|
+
border-radius: 4px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.logs-table-wrapper::-webkit-scrollbar-thumb:hover {
|
|
206
|
+
background: var(--text-muted);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.logs-container {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
height: calc(100vh - 60px);
|
|
213
|
+
padding: 20px;
|
|
214
|
+
box-sizing: border-box;
|
|
215
|
+
}
|
|
216
|
+
</style>
|
|
217
|
+
</head>
|
|
218
|
+
<body>
|
|
219
|
+
<!-- Unified Navigation Bar (injected by navbar.js) -->
|
|
220
|
+
|
|
221
|
+
<div class="logs-container">
|
|
222
|
+
<header class="page-header">
|
|
223
|
+
<h1 class="page-title">
|
|
224
|
+
<span class="icon">📋</span>
|
|
225
|
+
系統日誌
|
|
226
|
+
</h1>
|
|
227
|
+
</header>
|
|
228
|
+
|
|
229
|
+
<!-- 標籤切換 -->
|
|
230
|
+
<div class="tabs" style="margin-bottom: 16px; border-bottom: 1px solid var(--border-color);">
|
|
231
|
+
<button class="tab-btn active" data-tab="system" style="padding: 12px 24px; font-size: 14px; font-weight: 500; background: none; border: none; border-bottom: 2px solid var(--accent-color); color: var(--accent-color); cursor: pointer; margin-right: 8px;">
|
|
232
|
+
📋 系統日誌
|
|
233
|
+
</button>
|
|
234
|
+
<button class="tab-btn" data-tab="api-errors" style="padding: 12px 24px; font-size: 14px; font-weight: 500; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-secondary); cursor: pointer;">
|
|
235
|
+
📊 API 請求日誌
|
|
236
|
+
</button>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<!-- 系統日誌區塊 -->
|
|
240
|
+
<div id="systemLogsPanel" class="tab-panel">
|
|
241
|
+
<!-- 過濾控制 -->
|
|
242
|
+
<div class="logs-controls">
|
|
243
|
+
<div class="filter-group">
|
|
244
|
+
<span class="filter-label">級別:</span>
|
|
245
|
+
<select id="levelFilter" class="btn btn-secondary">
|
|
246
|
+
<option value="">全部</option>
|
|
247
|
+
<option value="error">錯誤</option>
|
|
248
|
+
<option value="warn">警告</option>
|
|
249
|
+
<option value="info">資訊</option>
|
|
250
|
+
<option value="debug">除錯</option>
|
|
251
|
+
</select>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="filter-group">
|
|
254
|
+
<span class="filter-label">來源:</span>
|
|
255
|
+
<select id="sourceFilter" class="btn btn-secondary">
|
|
256
|
+
<option value="">全部</option>
|
|
257
|
+
</select>
|
|
258
|
+
</div>
|
|
259
|
+
<button id="refreshBtn" class="btn btn-primary">
|
|
260
|
+
<span class="icon">🔄</span>
|
|
261
|
+
重新載入
|
|
262
|
+
</button>
|
|
263
|
+
<button id="clearBtn" class="btn btn-danger">
|
|
264
|
+
<span class="icon">🗑️</span>
|
|
265
|
+
清除日誌
|
|
266
|
+
</button>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
<!-- 日誌表格 -->
|
|
270
|
+
<div class="logs-table-container">
|
|
271
|
+
<div class="logs-table-wrapper">
|
|
272
|
+
<table class="logs-table">
|
|
273
|
+
<thead>
|
|
274
|
+
<tr>
|
|
275
|
+
<th>時間</th>
|
|
276
|
+
<th>級別</th>
|
|
277
|
+
<th>來源</th>
|
|
278
|
+
<th>訊息</th>
|
|
279
|
+
</tr>
|
|
280
|
+
</thead>
|
|
281
|
+
<tbody id="logsTableBody">
|
|
282
|
+
<tr>
|
|
283
|
+
<td colspan="4">
|
|
284
|
+
<div class="empty-logs">
|
|
285
|
+
<div class="icon">⏳</div>
|
|
286
|
+
<p>載入日誌中...</p>
|
|
287
|
+
</div>
|
|
288
|
+
</td>
|
|
289
|
+
</tr>
|
|
290
|
+
</tbody>
|
|
291
|
+
</table>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
<!-- 分頁 -->
|
|
295
|
+
<div class="pagination">
|
|
296
|
+
<button id="prevPageBtn" disabled>上一頁</button>
|
|
297
|
+
<span class="page-info" id="pageInfo">第 1 頁</span>
|
|
298
|
+
<button id="nextPageBtn">下一頁</button>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<!-- API 日誌區塊 -->
|
|
304
|
+
<div id="apiErrorsPanel" class="tab-panel" style="display: none;">
|
|
305
|
+
<!-- 過濾控制 -->
|
|
306
|
+
<div class="logs-controls">
|
|
307
|
+
<div class="filter-group">
|
|
308
|
+
<span class="filter-label">端點:</span>
|
|
309
|
+
<select id="apiEndpointFilter" class="btn btn-secondary">
|
|
310
|
+
<option value="">全部</option>
|
|
311
|
+
<option value="/api/ai-settings/validate">AI 驗證</option>
|
|
312
|
+
</select>
|
|
313
|
+
</div>
|
|
314
|
+
<div class="filter-group">
|
|
315
|
+
<span class="filter-label">類型:</span>
|
|
316
|
+
<select id="apiTypeFilter" class="btn btn-secondary">
|
|
317
|
+
<option value="all">全部</option>
|
|
318
|
+
<option value="success">成功</option>
|
|
319
|
+
<option value="errors">錯誤</option>
|
|
320
|
+
</select>
|
|
321
|
+
</div>
|
|
322
|
+
<button id="apiRefreshBtn" class="btn btn-primary">
|
|
323
|
+
<span class="icon">🔄</span>
|
|
324
|
+
重新載入
|
|
325
|
+
</button>
|
|
326
|
+
<button id="apiCleanupBtn" class="btn btn-secondary">
|
|
327
|
+
<span class="icon">🧹</span>
|
|
328
|
+
清除舊日誌
|
|
329
|
+
</button>
|
|
330
|
+
<button id="apiClearAllBtn" class="btn btn-danger">
|
|
331
|
+
<span class="icon">🗑️</span>
|
|
332
|
+
清除全部
|
|
333
|
+
</button>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<!-- API 日誌表格 -->
|
|
337
|
+
<div class="logs-table-container">
|
|
338
|
+
<div class="logs-table-wrapper">
|
|
339
|
+
<table class="logs-table">
|
|
340
|
+
<thead>
|
|
341
|
+
<tr>
|
|
342
|
+
<th>時間</th>
|
|
343
|
+
<th>端點</th>
|
|
344
|
+
<th>方法</th>
|
|
345
|
+
<th>狀態</th>
|
|
346
|
+
<th>訊息</th>
|
|
347
|
+
</tr>
|
|
348
|
+
</thead>
|
|
349
|
+
<tbody id="apiErrorsTableBody">
|
|
350
|
+
<tr>
|
|
351
|
+
<td colspan="5">
|
|
352
|
+
<div class="empty-logs">
|
|
353
|
+
<div class="icon">⏳</div>
|
|
354
|
+
<p>載入日誌中...</p>
|
|
355
|
+
</div>
|
|
356
|
+
</td>
|
|
357
|
+
</tr>
|
|
358
|
+
</tbody>
|
|
359
|
+
</table>
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
<!-- 分頁 -->
|
|
363
|
+
<div class="pagination">
|
|
364
|
+
<button id="apiPrevPageBtn" disabled>上一頁</button>
|
|
365
|
+
<span class="page-info" id="apiPageInfo">第 1 頁</span>
|
|
366
|
+
<button id="apiNextPageBtn">下一頁</button>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<!-- Scripts -->
|
|
373
|
+
<script src="/components/navbar.js"></script>
|
|
374
|
+
<script src="logs.js"></script>
|
|
375
|
+
</body>
|
|
376
|
+
</html>
|