@embrs/user-feedback 1.0.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.
@@ -0,0 +1,421 @@
1
+ /* 基礎樣式 */
2
+ * {
3
+ margin: 0;
4
+ padding: 0;
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ :root {
9
+ --bg-primary: #1e1e1e;
10
+ --bg-secondary: #252526;
11
+ --bg-tertiary: #2d2d30;
12
+ --text-primary: #cccccc;
13
+ --text-secondary: #9cdcfe;
14
+ --accent: #0e639c;
15
+ --accent-hover: #1177bb;
16
+ --border: #3c3c3c;
17
+ --success: #4ec9b0;
18
+ --error: #f14c4c;
19
+ --warning: #cca700;
20
+ }
21
+
22
+ body {
23
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
24
+ background-color: var(--bg-primary);
25
+ color: var(--text-primary);
26
+ min-height: 100vh;
27
+ }
28
+
29
+ /* 容器佈局 */
30
+ .container {
31
+ display: flex;
32
+ height: 100vh;
33
+ overflow: hidden;
34
+ }
35
+
36
+ /* 面板樣式 */
37
+ .panel {
38
+ display: flex;
39
+ flex-direction: column;
40
+ border-right: 1px solid var(--border);
41
+ }
42
+
43
+ .panel-left {
44
+ flex: 6;
45
+ background-color: var(--bg-secondary);
46
+ }
47
+
48
+ .panel-right {
49
+ flex: 4;
50
+ background-color: var(--bg-primary);
51
+ }
52
+
53
+ .panel-header {
54
+ padding: 16px 20px;
55
+ background-color: var(--bg-tertiary);
56
+ border-bottom: 1px solid var(--border);
57
+ }
58
+
59
+ .panel-header h2 {
60
+ font-size: 14px;
61
+ font-weight: 600;
62
+ text-transform: uppercase;
63
+ letter-spacing: 0.5px;
64
+ color: var(--text-secondary);
65
+ }
66
+
67
+ .panel-content {
68
+ flex: 1;
69
+ padding: 20px;
70
+ overflow-y: auto;
71
+ }
72
+
73
+ /* 工作彙報區域 */
74
+ #work-summary {
75
+ line-height: 1.6;
76
+ white-space: pre-wrap;
77
+ font-size: 14px;
78
+ }
79
+
80
+ #work-summary .loading {
81
+ color: var(--text-secondary);
82
+ text-align: center;
83
+ padding: 40px;
84
+ }
85
+
86
+ /* 圖片上傳區域 */
87
+ .image-section {
88
+ margin-bottom: 16px;
89
+ }
90
+
91
+ .drop-zone {
92
+ border: 2px dashed var(--border);
93
+ border-radius: 8px;
94
+ padding: 24px;
95
+ text-align: center;
96
+ cursor: pointer;
97
+ transition: all 0.2s ease;
98
+ background-color: var(--bg-secondary);
99
+ }
100
+
101
+ .drop-zone:hover,
102
+ .drop-zone.drag-over {
103
+ border-color: var(--accent);
104
+ background-color: var(--bg-tertiary);
105
+ }
106
+
107
+ .drop-zone p {
108
+ color: var(--text-secondary);
109
+ font-size: 13px;
110
+ }
111
+
112
+ /* 圖片預覽 */
113
+ .image-preview {
114
+ display: grid;
115
+ grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
116
+ gap: 8px;
117
+ margin-top: 12px;
118
+ }
119
+
120
+ .preview-item {
121
+ position: relative;
122
+ aspect-ratio: 1;
123
+ border-radius: 6px;
124
+ overflow: hidden;
125
+ cursor: grab;
126
+ border: 2px solid transparent;
127
+ transition: border-color 0.2s;
128
+ }
129
+
130
+ .preview-item:hover {
131
+ border-color: var(--accent);
132
+ }
133
+
134
+ .preview-item.dragging {
135
+ opacity: 0.5;
136
+ }
137
+
138
+ .preview-item img {
139
+ width: 100%;
140
+ height: 100%;
141
+ object-fit: cover;
142
+ }
143
+
144
+ .preview-item .remove-btn {
145
+ position: absolute;
146
+ top: 4px;
147
+ right: 4px;
148
+ width: 20px;
149
+ height: 20px;
150
+ background: var(--error);
151
+ border: none;
152
+ border-radius: 50%;
153
+ color: white;
154
+ font-size: 12px;
155
+ cursor: pointer;
156
+ opacity: 0;
157
+ transition: opacity 0.2s;
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: center;
161
+ }
162
+
163
+ .preview-item:hover .remove-btn {
164
+ opacity: 1;
165
+ }
166
+
167
+ /* 文字輸入區域 */
168
+ .text-section {
169
+ margin-bottom: 16px;
170
+ }
171
+
172
+ #feedback-text {
173
+ width: 100%;
174
+ padding: 12px;
175
+ background-color: var(--bg-secondary);
176
+ border: 1px solid var(--border);
177
+ border-radius: 6px;
178
+ color: var(--text-primary);
179
+ font-size: 14px;
180
+ resize: vertical;
181
+ min-height: 120px;
182
+ font-family: inherit;
183
+ }
184
+
185
+ #feedback-text:focus {
186
+ outline: none;
187
+ border-color: var(--accent);
188
+ }
189
+
190
+ #feedback-text::placeholder {
191
+ color: #6a6a6a;
192
+ }
193
+
194
+ /* 罐頭語按鈕 */
195
+ .quick-replies {
196
+ display: flex;
197
+ flex-wrap: wrap;
198
+ gap: 8px;
199
+ margin-bottom: 16px;
200
+ align-items: center;
201
+ min-height: 40px; /* 確保即使沒有罐頭語也有足夠高度 */
202
+ padding: 4px 0; /* 添加一些內邊距 */
203
+ }
204
+
205
+ .quick-reply-btn {
206
+ padding: 8px 14px 8px 14px;
207
+ background-color: var(--bg-tertiary);
208
+ border: 1px solid var(--border);
209
+ border-radius: 16px;
210
+ color: var(--text-primary);
211
+ font-size: 13px;
212
+ cursor: pointer;
213
+ transition: all 0.2s;
214
+ position: relative;
215
+ margin-right: 8px;
216
+ margin-bottom: 4px;
217
+ display: inline-flex;
218
+ align-items: center;
219
+ gap: 4px;
220
+ }
221
+
222
+ .quick-reply-btn:hover {
223
+ background-color: var(--accent);
224
+ border-color: var(--accent);
225
+ }
226
+
227
+ .quick-reply-btn.editing {
228
+ background-color: var(--bg-secondary);
229
+ border-color: var(--accent);
230
+ }
231
+
232
+ .quick-reply-btn span {
233
+ pointer-events: none;
234
+ }
235
+
236
+ .quick-reply-btn .delete-btn {
237
+ position: absolute;
238
+ top: -8px;
239
+ right: -8px;
240
+ width: 18px;
241
+ height: 18px;
242
+ background: var(--error);
243
+ border: 2px solid var(--bg-primary);
244
+ border-radius: 50%;
245
+ color: white;
246
+ font-size: 11px;
247
+ cursor: pointer;
248
+ opacity: 0;
249
+ transition: opacity 0.2s;
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: center;
253
+ line-height: 1;
254
+ z-index: 10;
255
+ flex-shrink: 0;
256
+ }
257
+
258
+ .quick-reply-btn:hover .delete-btn {
259
+ opacity: 1;
260
+ }
261
+
262
+ .add-reply-btn {
263
+ padding: 8px 12px;
264
+ background-color: var(--bg-secondary);
265
+ border: 1px dashed var(--accent);
266
+ border-radius: 16px;
267
+ color: var(--accent);
268
+ font-size: 16px;
269
+ cursor: pointer;
270
+ transition: all 0.2s;
271
+ min-width: 32px;
272
+ height: 32px;
273
+ display: flex;
274
+ align-items: center;
275
+ justify-content: center;
276
+ flex-shrink: 0;
277
+ margin-left: 8px;
278
+ order: 999; /* 確保始終在最後 */
279
+ position: relative; /* 確保可見性 */
280
+ z-index: 1;
281
+ }
282
+
283
+ .add-reply-btn:hover {
284
+ background-color: var(--accent);
285
+ color: white;
286
+ }
287
+
288
+ /* 提交按鈕 */
289
+ .submit-section {
290
+ margin-top: auto;
291
+ }
292
+
293
+ .submit-btn {
294
+ width: 100%;
295
+ padding: 14px;
296
+ background-color: var(--accent);
297
+ border: none;
298
+ border-radius: 6px;
299
+ color: white;
300
+ font-size: 14px;
301
+ font-weight: 600;
302
+ cursor: pointer;
303
+ transition: background-color 0.2s;
304
+ }
305
+
306
+ .submit-btn:hover {
307
+ background-color: var(--accent-hover);
308
+ }
309
+
310
+ .submit-btn:disabled {
311
+ background-color: var(--bg-tertiary);
312
+ color: #6a6a6a;
313
+ cursor: not-allowed;
314
+ }
315
+
316
+ /* 圖片彈窗 */
317
+ .modal {
318
+ display: none;
319
+ position: fixed;
320
+ top: 0;
321
+ left: 0;
322
+ width: 100%;
323
+ height: 100%;
324
+ background-color: rgba(0, 0, 0, 0.9);
325
+ z-index: 1000;
326
+ justify-content: center;
327
+ align-items: center;
328
+ }
329
+
330
+ .modal.show {
331
+ display: flex;
332
+ }
333
+
334
+ .modal-content {
335
+ position: relative;
336
+ max-width: 90%;
337
+ max-height: 90%;
338
+ }
339
+
340
+ .modal-content img {
341
+ max-width: 100%;
342
+ max-height: 90vh;
343
+ border-radius: 8px;
344
+ }
345
+
346
+ .modal-close {
347
+ position: absolute;
348
+ top: -40px;
349
+ right: 0;
350
+ font-size: 32px;
351
+ color: white;
352
+ cursor: pointer;
353
+ }
354
+
355
+ /* Toast 提示 */
356
+ .toast {
357
+ position: fixed;
358
+ bottom: 24px;
359
+ left: 50%;
360
+ transform: translateX(-50%) translateY(100px);
361
+ padding: 12px 24px;
362
+ background-color: var(--bg-tertiary);
363
+ border: 1px solid var(--border);
364
+ border-radius: 8px;
365
+ color: var(--text-primary);
366
+ font-size: 14px;
367
+ opacity: 0;
368
+ transition: all 0.3s ease;
369
+ z-index: 1001;
370
+ }
371
+
372
+ .toast.show {
373
+ transform: translateX(-50%) translateY(0);
374
+ opacity: 1;
375
+ }
376
+
377
+ .toast.success {
378
+ border-color: var(--success);
379
+ background-color: rgba(78, 201, 176, 0.1);
380
+ }
381
+
382
+ .toast.error {
383
+ border-color: var(--error);
384
+ background-color: rgba(241, 76, 76, 0.1);
385
+ }
386
+
387
+ /* 響應式設計 */
388
+ @media (max-width: 768px) {
389
+ .container {
390
+ flex-direction: column;
391
+ }
392
+
393
+ .panel {
394
+ flex: none;
395
+ height: 50vh;
396
+ border-right: none;
397
+ border-bottom: 1px solid var(--border);
398
+ }
399
+
400
+ .panel-right {
401
+ border-bottom: none;
402
+ }
403
+ }
404
+
405
+ /* 滾動條樣式 */
406
+ ::-webkit-scrollbar {
407
+ width: 8px;
408
+ }
409
+
410
+ ::-webkit-scrollbar-track {
411
+ background: var(--bg-primary);
412
+ }
413
+
414
+ ::-webkit-scrollbar-thumb {
415
+ background: var(--bg-tertiary);
416
+ border-radius: 4px;
417
+ }
418
+
419
+ ::-webkit-scrollbar-thumb:hover {
420
+ background: #4a4a4a;
421
+ }
@@ -0,0 +1,105 @@
1
+ /**
2
+ * MCP Feedback Collector - 類型定義
3
+ */
4
+ export interface Config {
5
+ apiKey?: string | undefined;
6
+ apiBaseUrl: string;
7
+ defaultModel: string;
8
+ webPort: number;
9
+ dialogTimeout: number;
10
+ corsOrigin: string;
11
+ maxFileSize: number;
12
+ logLevel: string;
13
+ serverHost?: string | undefined;
14
+ serverBaseUrl?: string | undefined;
15
+ forcePort?: boolean | undefined;
16
+ useFixedUrl?: boolean | undefined;
17
+ enableImageToText?: boolean | undefined;
18
+ imageToTextPrompt?: string | undefined;
19
+ }
20
+ export interface FeedbackData {
21
+ text?: string;
22
+ images?: ImageData[];
23
+ imageDescriptions?: string[];
24
+ timestamp: number;
25
+ sessionId: string;
26
+ }
27
+ export interface ImageData {
28
+ name: string;
29
+ data: string;
30
+ size: number;
31
+ type: string;
32
+ }
33
+ export interface WorkSummary {
34
+ content: string;
35
+ timestamp: number;
36
+ sessionId: string;
37
+ }
38
+ export interface CollectFeedbackParams {
39
+ work_summary: string;
40
+ timeout_seconds?: number;
41
+ }
42
+ export interface TextContent {
43
+ type: 'text';
44
+ text: string;
45
+ }
46
+ export interface ImageContent {
47
+ type: 'image';
48
+ data: string;
49
+ mimeType: string;
50
+ }
51
+ export type MCPContent = TextContent | ImageContent;
52
+ export interface CollectFeedbackResult {
53
+ [x: string]: unknown;
54
+ content: MCPContent[];
55
+ isError?: boolean;
56
+ }
57
+ export interface SocketEvents {
58
+ connect: () => void;
59
+ disconnect: () => void;
60
+ start_feedback_session: (data: {
61
+ sessionId: string;
62
+ workSummary: string;
63
+ }) => void;
64
+ submit_feedback: (data: FeedbackData) => void;
65
+ feedback_submitted: (data: {
66
+ success: boolean;
67
+ message?: string;
68
+ }) => void;
69
+ feedback_error: (data: {
70
+ error: string;
71
+ }) => void;
72
+ work_summary_data: (data: {
73
+ work_summary: string;
74
+ }) => void;
75
+ }
76
+ export interface ServerStatus {
77
+ running: boolean;
78
+ webPort: number;
79
+ startTime: number;
80
+ activeSessions: number;
81
+ }
82
+ export interface Session {
83
+ id: string;
84
+ workSummary?: string;
85
+ feedback?: FeedbackData;
86
+ startTime: number;
87
+ timeout: number;
88
+ status: 'pending' | 'active' | 'completed' | 'timeout' | 'error';
89
+ resolve?: (feedback: FeedbackData) => void;
90
+ reject?: (error: Error) => void;
91
+ }
92
+ export declare class MCPError extends Error {
93
+ code: string;
94
+ details?: unknown | undefined;
95
+ constructor(message: string, code: string, details?: unknown | undefined);
96
+ }
97
+ export type LogLevel = 'error' | 'warn' | 'info' | 'debug' | 'silent';
98
+ export interface APIConfig {
99
+ apiKey?: string;
100
+ apiBaseUrl: string;
101
+ model: string;
102
+ temperature?: number;
103
+ maxTokens?: number;
104
+ }
105
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,E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AAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * MCP Feedback Collector - 類型定義
3
+ */
4
+ // 錯誤類型
5
+ export class MCPError extends Error {
6
+ code;
7
+ details;
8
+ constructor(message, code, details) {
9
+ super(message);
10
+ this.code = code;
11
+ this.details = details;
12
+ this.name = 'MCPError';
13
+ }
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuGH,OAAO;AACP,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGxB;IACA;IAHT,YACE,OAAe,EACR,IAAY,EACZ,OAAiB;QAExB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAU;QAGxB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * MCP Feedback Collector - 日誌工具
3
+ */
4
+ import { LogLevel } from '../types/index.js';
5
+ declare class Logger {
6
+ private currentLevel;
7
+ private logFile?;
8
+ private fileLoggingEnabled;
9
+ private colorsDisabled;
10
+ /**
11
+ * 設置日誌級別
12
+ */
13
+ setLevel(level: LogLevel): void;
14
+ /**
15
+ * 獲取當前日誌級別
16
+ */
17
+ getLevel(): LogLevel;
18
+ /**
19
+ * 禁用顏色輸出(用於 MCP 模式)
20
+ */
21
+ disableColors(): void;
22
+ /**
23
+ * 啟用檔案日誌記錄
24
+ */
25
+ enableFileLogging(logDir?: string): void;
26
+ /**
27
+ * 檢查是否應該輸出指定級別的日誌
28
+ */
29
+ private shouldLog;
30
+ /**
31
+ * 格式化時間戳
32
+ */
33
+ private formatTimestamp;
34
+ /**
35
+ * 格式化日誌訊息
36
+ */
37
+ private formatMessage;
38
+ /**
39
+ * 輸出日誌
40
+ */
41
+ private log;
42
+ /**
43
+ * 移除顏色代碼
44
+ */
45
+ private removeColorCodes;
46
+ /**
47
+ * 錯誤日誌
48
+ */
49
+ error(message: string, ...args: unknown[]): void;
50
+ /**
51
+ * 警告日誌
52
+ */
53
+ warn(message: string, ...args: unknown[]): void;
54
+ /**
55
+ * 資訊日誌
56
+ */
57
+ info(message: string, ...args: unknown[]): void;
58
+ /**
59
+ * 除錯日誌
60
+ */
61
+ debug(message: string, ...args: unknown[]): void;
62
+ /**
63
+ * 記錄 HTTP 請求
64
+ */
65
+ request(method: string, url: string, statusCode?: number, duration?: number): void;
66
+ /**
67
+ * 記錄 WebSocket 事件
68
+ */
69
+ socket(event: string, sessionId?: string, data?: unknown): void;
70
+ /**
71
+ * 記錄 MCP 工具調用
72
+ */
73
+ mcp(tool: string, params?: unknown, result?: unknown): void;
74
+ }
75
+ export declare const logger: Logger;
76
+ export type { LogLevel };
77
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAsB7C,cAAM,MAAM;IACV,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,cAAc,CAAS;IAE/B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B;;OAEG;IACH,QAAQ,IAAI,QAAQ;IAIpB;;OAEG;IACH,aAAa,IAAI,IAAI;IAIrB;;OAEG;IACH,iBAAiB,CAAC,MAAM,GAAE,MAAe,GAAG,IAAI;IAuBhD;;OAEG;IACH,OAAO,CAAC,SAAS;IAOjB;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAuBrB;;OAEG;IACH,OAAO,CAA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