@becrafter/prompt-manager 0.1.11 → 0.1.12

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.
Files changed (38) hide show
  1. package/env.example +1 -1
  2. package/package.json +2 -2
  3. package/packages/server/app.js +13 -3
  4. package/packages/server/utils/config.js +1 -1
  5. package/packages/server/utils/util.js +7 -7
  6. package/packages/admin-ui/admin.html +0 -49
  7. package/packages/admin-ui/css/codemirror-theme_xq-light.css +0 -43
  8. package/packages/admin-ui/css/codemirror.css +0 -344
  9. package/packages/admin-ui/css/main.css +0 -4485
  10. package/packages/admin-ui/css/markdown.css +0 -468
  11. package/packages/admin-ui/css/optimization.css +0 -1015
  12. package/packages/admin-ui/css/recommended-prompts.css +0 -610
  13. package/packages/admin-ui/css/terminal-fix.css +0 -571
  14. package/packages/admin-ui/package-lock.json +0 -8287
  15. package/packages/admin-ui/package.json +0 -46
  16. package/packages/admin-ui/src/codemirror.js +0 -53
  17. package/packages/admin-ui/src/components/ArgumentModal.js +0 -53
  18. package/packages/admin-ui/src/components/DeletePromptModal.js +0 -30
  19. package/packages/admin-ui/src/components/HeaderView.js +0 -40
  20. package/packages/admin-ui/src/components/LoadingOverlay.js +0 -12
  21. package/packages/admin-ui/src/components/LoginView.js +0 -22
  22. package/packages/admin-ui/src/components/ModelConfigModal.js +0 -103
  23. package/packages/admin-ui/src/components/NewFolderModal.js +0 -58
  24. package/packages/admin-ui/src/components/OptimizationConfigModal.js +0 -36
  25. package/packages/admin-ui/src/components/OptimizationDrawer.js +0 -135
  26. package/packages/admin-ui/src/components/PrimaryNav.js +0 -34
  27. package/packages/admin-ui/src/components/PromptsArea.js +0 -140
  28. package/packages/admin-ui/src/components/RecommendedPromptModal.js +0 -37
  29. package/packages/admin-ui/src/components/SidebarView.js +0 -24
  30. package/packages/admin-ui/src/components/SyncPromptModal.js +0 -44
  31. package/packages/admin-ui/src/components/TemplateEditorModal.js +0 -75
  32. package/packages/admin-ui/src/components/TemplateListModal.js +0 -30
  33. package/packages/admin-ui/src/components/TerminalComponent.js +0 -995
  34. package/packages/admin-ui/src/components/TerminalView.js +0 -25
  35. package/packages/admin-ui/src/components/ToolDetailModal.js +0 -23
  36. package/packages/admin-ui/src/components/ToolsArea.js +0 -119
  37. package/packages/admin-ui/src/components/ToolsUploadModal.js +0 -59
  38. package/packages/admin-ui/src/index.js +0 -6766
@@ -1,1015 +0,0 @@
1
- /* ==================== 优化抽屉样式 ==================== */
2
-
3
- .optimization-drawer {
4
- position: fixed;
5
- top: 0;
6
- right: 0;
7
- width: calc(100% - 375px);
8
- height: 100%;
9
- z-index: 1000;
10
- display: flex;
11
- }
12
-
13
- .optimization-drawer.hidden {
14
- display: none;
15
- }
16
-
17
- .drawer-overlay {
18
- position: fixed;
19
- top: 0;
20
- left: 0;
21
- width: 100%;
22
- height: 100%;
23
- background-color: rgba(0, 0, 0, 0.5);
24
- z-index: -1;
25
- }
26
-
27
- .drawer-content {
28
- width: 100%;
29
- height: 100%;
30
- background-color: #fff;
31
- display: flex;
32
- flex-direction: column;
33
- box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
34
- animation: slideIn 0.3s ease-out;
35
- }
36
-
37
- @keyframes slideIn {
38
- from {
39
- transform: translateX(100%);
40
- }
41
- to {
42
- transform: translateX(0);
43
- }
44
- }
45
-
46
- .drawer-header {
47
- padding: 8px 16px;
48
- border-bottom: 1px solid #e5e7eb;
49
- display: flex;
50
- justify-content: space-between;
51
- align-items: center;
52
- }
53
-
54
- .drawer-header h3 {
55
- margin: 0;
56
- font-size: 18px;
57
- font-weight: 600;
58
- color: #111827;
59
- }
60
-
61
- .drawer-close {
62
- background: none;
63
- border: none;
64
- font-size: 24px;
65
- color: #6b7280;
66
- cursor: pointer;
67
- padding: 0;
68
- width: 32px;
69
- height: 32px;
70
- display: flex;
71
- align-items: center;
72
- justify-content: center;
73
- border-radius: 4px;
74
- transition: background-color 0.2s;
75
- }
76
-
77
- .drawer-close:hover {
78
- background-color: #f3f4f6;
79
- color: #111827;
80
- }
81
-
82
- .drawer-body {
83
- flex: 1;
84
- overflow-y: auto;
85
- padding: 24px;
86
- background-color: #f5f5f5;
87
- }
88
-
89
- .drawer-footer {
90
- padding: 20px;
91
- border-top: 1px solid #e5e7eb;
92
- display: flex;
93
- justify-content: flex-end;
94
- gap: 12px;
95
- background-color: #fff;
96
- }
97
-
98
- /* ==================== 优化控制区域 ==================== */
99
-
100
- .optimization-controls {
101
- margin-bottom: 24px;
102
- padding: 20px;
103
- background-color: #fff;
104
- border-radius: 8px;
105
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
106
- }
107
-
108
- .control-group {
109
- margin-bottom: 0;
110
- }
111
-
112
- .optimization-controls-row {
113
- display: flex;
114
- gap: 16px;
115
- align-items: flex-end;
116
- margin-bottom: 0;
117
- }
118
-
119
- .model-selector,
120
- .template-selector {
121
- flex: 1;
122
- display: flex;
123
- gap: 0;
124
- align-items: center;
125
- }
126
-
127
- .model-selector .form-control,
128
- .template-selector .form-control {
129
- flex: 1;
130
- height: 40px;
131
- padding: 10px 14px;
132
- border: 1.5px solid #d1d5db;
133
- border-radius: 8px;
134
- font-size: 14px;
135
- color: #333;
136
- background-color: #fff;
137
- transition: all 0.2s;
138
- appearance: none;
139
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
140
- background-repeat: no-repeat;
141
- background-position: right 14px center;
142
- padding-right: 40px;
143
- cursor: pointer;
144
- }
145
-
146
- .model-selector .form-control:hover,
147
- .template-selector .form-control:hover {
148
- border-color: #9ca3af;
149
- }
150
-
151
- .model-selector .form-control:focus,
152
- .template-selector .form-control:focus {
153
- outline: none;
154
- border-color: #3b82f6;
155
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
156
- }
157
-
158
- /* 下拉选项样式 */
159
- .model-selector .form-control option,
160
- .template-selector .form-control option {
161
- padding: 8px 12px;
162
- cursor: pointer;
163
- }
164
-
165
- .model-selector .form-control option:hover,
166
- .template-selector .form-control option:hover {
167
- background-color: #e6f7ff;
168
- }
169
-
170
- .model-selector .form-control option:checked,
171
- .template-selector .form-control option:checked {
172
- background-color: #1890ff;
173
- color: white;
174
- }
175
-
176
- .model-selector .form-control option:disabled,
177
- .template-selector .form-control option:disabled {
178
- color: #999;
179
- cursor: not-allowed;
180
- }
181
-
182
- .icon-btn {
183
- background: none;
184
- border: 1px solid #e0e0e0;
185
- border-radius: 4px;
186
- padding: 8px 12px;
187
- cursor: pointer;
188
- font-size: 16px;
189
- transition: all 0.2s;
190
- height: 40px;
191
- display: flex;
192
- align-items: center;
193
- justify-content: center;
194
- }
195
-
196
- .icon-btn:hover {
197
- background-color: #f5f5f5;
198
- border-color: #d0d0d0;
199
- }
200
-
201
- /* ==================== 原始提示词区域 ==================== */
202
-
203
- .original-prompt-section {
204
- margin-bottom: 24px;
205
- padding: 20px;
206
- background-color: #fff;
207
- border-radius: 8px;
208
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
209
- }
210
-
211
- .original-prompt-section h4 {
212
- margin: 0 0 12px 0;
213
- font-size: 18px;
214
- font-weight: 600;
215
- color: #333;
216
- }
217
-
218
- .original-prompt-section textarea {
219
- width: 100%;
220
- padding: 10px 14px;
221
- border: 1.5px solid #d1d5db;
222
- border-radius: 8px;
223
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
224
- font-size: 14px;
225
- line-height: 1.6;
226
- resize: vertical;
227
- min-height: 120px;
228
- color: #333;
229
- background-color: #fff;
230
- transition: all 0.2s;
231
- }
232
-
233
- .original-prompt-section textarea:hover {
234
- border-color: #9ca3af;
235
- }
236
-
237
- .original-prompt-section textarea:focus {
238
- outline: none;
239
- border-color: #3b82f6;
240
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
241
- }
242
-
243
- .original-prompt-section textarea::placeholder {
244
- color: #999;
245
- }
246
-
247
- /* ==================== 优化结果区域 ==================== */
248
-
249
- .optimized-result-section {
250
- margin-bottom: 24px;
251
- padding: 20px;
252
- background-color: #fff;
253
- border-radius: 8px;
254
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
255
- }
256
-
257
- .result-header {
258
- display: flex;
259
- justify-content: space-between;
260
- align-items: center;
261
- margin-bottom: 16px;
262
- }
263
-
264
- .result-header h4 {
265
- margin: 0;
266
- font-size: 18px;
267
- font-weight: 600;
268
- color: #333;
269
- }
270
-
271
- .optimized-output {
272
- min-height: 300px;
273
- padding: 16px;
274
- border: 1px solid #e0e0e0;
275
- border-radius: 4px;
276
- background-color: #fafafa;
277
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
278
- font-size: 14px;
279
- line-height: 1.6;
280
- white-space: pre-wrap;
281
- word-wrap: break-word;
282
- color: #333;
283
- }
284
-
285
- .optimized-output .placeholder-text {
286
- color: #999;
287
- font-style: italic;
288
- margin: 0;
289
- text-align: center;
290
- padding: 40px 0;
291
- }
292
-
293
- .optimized-output .error-message {
294
- padding: 20px;
295
- background-color: #fef2f2;
296
- border: 1px solid #fecaca;
297
- border-radius: 8px;
298
- color: #991b1b;
299
- }
300
-
301
- .optimized-output .error-message h4 {
302
- margin: 0 0 12px 0;
303
- font-size: 16px;
304
- font-weight: 600;
305
- }
306
-
307
- .optimized-output .error-message p {
308
- margin: 0;
309
- font-size: 14px;
310
- line-height: 1.6;
311
- }
312
-
313
- /* ==================== 模板列表样式 ==================== */
314
-
315
- .template-list-header {
316
- display: flex;
317
- gap: 12px;
318
- margin-bottom: 16px;
319
- }
320
-
321
- .template-list-header .form-control {
322
- flex: 1;
323
- }
324
-
325
- .template-list {
326
- max-height: 400px;
327
- overflow-y: auto;
328
- border: 1px solid #e5e7eb;
329
- border-radius: 6px;
330
- }
331
-
332
- .template-item {
333
- padding: 12px 16px;
334
- border-bottom: 1px solid #e5e7eb;
335
- display: flex;
336
- justify-content: space-between;
337
- align-items: center;
338
- transition: background-color 0.2s;
339
- }
340
-
341
- .template-item:last-child {
342
- border-bottom: none;
343
- }
344
-
345
- .template-item:hover {
346
- background-color: #f9fafb;
347
- }
348
-
349
- .template-item-info {
350
- flex: 1;
351
- }
352
-
353
- .template-item-name {
354
- font-weight: 600;
355
- color: #111827;
356
- margin-bottom: 4px;
357
- }
358
-
359
- .template-item-description {
360
- font-size: 12px;
361
- color: #6b7280;
362
- }
363
-
364
- .template-item-actions {
365
- display: flex;
366
- gap: 8px;
367
- }
368
-
369
- .template-item-actions .btn {
370
- padding: 4px 12px;
371
- font-size: 12px;
372
- }
373
-
374
- .template-item-badge {
375
- display: inline-block;
376
- padding: 2px 8px;
377
- font-size: 10px;
378
- font-weight: 600;
379
- border-radius: 9999px;
380
- margin-left: 8px;
381
- }
382
-
383
- .template-item-badge.built-in {
384
- background-color: #dbeafe;
385
- color: #1e40af;
386
- }
387
-
388
- .template-item-badge.custom {
389
- background-color: #d1fae5;
390
- color: #065f46;
391
- }
392
-
393
- .template-item-badge.optimize {
394
- background-color: #fef3c7;
395
- color: #92400e;
396
- }
397
-
398
- .template-item-badge.iterate {
399
- background-color: #ede9fe;
400
- color: #5b21b6;
401
- }
402
-
403
- .template-item-badge.simple {
404
- background-color: #f3f4f6;
405
- color: #374151;
406
- }
407
-
408
- .template-item-badge.advanced {
409
- background-color: #fae8ff;
410
- color: #86198f;
411
- }
412
-
413
- /* ==================== 模型列表样式 ==================== */
414
-
415
- .model-list-header {
416
- margin-bottom: 16px;
417
- }
418
-
419
- .model-list {
420
- max-height: 400px;
421
- overflow-y: auto;
422
- border: 1px solid #e5e7eb;
423
- border-radius: 6px;
424
- }
425
-
426
- .model-item {
427
- padding: 12px 16px;
428
- border-bottom: 1px solid #e5e7eb;
429
- display: flex;
430
- justify-content: space-between;
431
- align-items: center;
432
- transition: background-color 0.2s;
433
- }
434
-
435
- .model-item:last-child {
436
- border-bottom: none;
437
- }
438
-
439
- .model-item:hover {
440
- background-color: #f9fafb;
441
- }
442
-
443
- .model-item-info {
444
- flex: 1;
445
- }
446
-
447
- .model-item-name {
448
- font-weight: 600;
449
- color: #111827;
450
- margin-bottom: 4px;
451
- }
452
-
453
- .model-item-details {
454
- font-size: 12px;
455
- color: #6b7280;
456
- }
457
-
458
- .model-item-status {
459
- display: inline-block;
460
- width: 8px;
461
- height: 8px;
462
- border-radius: 50%;
463
- margin-right: 8px;
464
- }
465
-
466
- .model-item-status.enabled {
467
- background-color: #10b981;
468
- }
469
-
470
- .model-item-status.disabled {
471
- background-color: #9ca3af;
472
- }
473
-
474
- .model-item-actions {
475
- display: flex;
476
- gap: 8px;
477
- }
478
-
479
- .model-item-actions .btn {
480
- padding: 4px 12px;
481
- font-size: 12px;
482
- }
483
-
484
- /* ==================== 表单样式 ==================== */
485
-
486
- .form-group {
487
- margin-bottom: 16px;
488
- }
489
-
490
- .form-group label {
491
- display: block;
492
- margin-bottom: 8px;
493
- font-size: 14px;
494
- font-weight: 500;
495
- color: #374151;
496
- }
497
-
498
- .form-group .required {
499
- color: #ef4444;
500
- }
501
-
502
- .form-control {
503
- width: 100%;
504
- padding: 10px 14px;
505
- border: 1.5px solid #d1d5db;
506
- border-radius: 8px;
507
- font-size: 14px;
508
- transition: all 0.2s;
509
- }
510
-
511
- .form-control:hover {
512
- border-color: #9ca3af;
513
- }
514
-
515
- .form-control:focus {
516
- outline: none;
517
- border-color: #3b82f6;
518
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
519
- }
520
-
521
- /* 原生select元素样式优化 */
522
- select.form-control {
523
- appearance: none;
524
- -webkit-appearance: none;
525
- -moz-appearance: none;
526
- background-color: #fff;
527
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23B3D9FF' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
528
- background-repeat: no-repeat;
529
- background-position: right 12px center;
530
- padding-right: 36px;
531
- cursor: pointer;
532
- position: relative;
533
- border-color: #B3D9FF;
534
- }
535
-
536
- select.form-control:hover {
537
- border-color: #007AFF;
538
- }
539
-
540
- /* Firefox兼容 */
541
- select.form-control::-ms-expand {
542
- display: none;
543
- }
544
-
545
- /* select下拉选项样式 */
546
- select.form-control option {
547
- padding: 12px 14px;
548
- background-color: #fff;
549
- color: #333;
550
- min-height: 48px;
551
- line-height: 1.5;
552
- }
553
-
554
- select.form-control option:hover {
555
- background-color: #f5f5f5;
556
- }
557
-
558
- select.form-control option:checked {
559
- background-color: #007AFF;
560
- color: white;
561
- font-weight: 500;
562
- }
563
-
564
- select.form-control option:disabled {
565
- color: #9ca3af;
566
- background-color: #f9fafb;
567
- }
568
-
569
- .form-text {
570
- display: block;
571
- margin-top: 4px;
572
- font-size: 12px;
573
- color: #6b7280;
574
- }
575
-
576
- .checkbox-field {
577
- display: flex;
578
- align-items: center;
579
- gap: 8px;
580
- cursor: pointer;
581
- }
582
-
583
- .checkbox-field input[type="checkbox"] {
584
- width: 16px;
585
- height: 16px;
586
- cursor: pointer;
587
- }
588
-
589
- /* 自定义模型输入样式 */
590
- .custom-model-input {
591
- margin-top: 8px;
592
- }
593
-
594
- .custom-model-input input::placeholder {
595
- color: #9ca3af;
596
- font-style: italic;
597
- }
598
-
599
- /* 表单信息框 */
600
- .form-info-box {
601
- background-color: #eff6ff;
602
- border: 1px solid #bfdbfe;
603
- border-radius: 8px;
604
- padding: 16px;
605
- margin-bottom: 20px;
606
- }
607
-
608
- .form-info-box h4 {
609
- margin: 0 0 12px 0;
610
- font-size: 14px;
611
- font-weight: 600;
612
- color: #1e40af;
613
- }
614
-
615
- .form-info-box p {
616
- margin: 0 0 8px 0;
617
- font-size: 13px;
618
- color: #1e3a8a;
619
- line-height: 1.5;
620
- }
621
-
622
- .form-info-box ul {
623
- margin: 0 0 12px 0;
624
- padding-left: 20px;
625
- }
626
-
627
- .form-info-box li {
628
- font-size: 13px;
629
- color: #1e3a8a;
630
- line-height: 1.6;
631
- margin-bottom: 4px;
632
- }
633
-
634
- .form-info-box li strong {
635
- color: #1e40af;
636
- }
637
-
638
- .form-info-box code {
639
- background-color: #dbeafe;
640
- padding: 2px 6px;
641
- border-radius: 4px;
642
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
643
- font-size: 12px;
644
- color: #1e40af;
645
- }
646
-
647
- .form-info-example {
648
- background-color: #dbeafe;
649
- padding: 8px 12px;
650
- border-radius: 4px;
651
- font-size: 12px;
652
- color: #1e40af;
653
- margin: 0;
654
- }
655
-
656
- /* ==================== 自定义下拉菜单样式 ==================== */
657
-
658
- .custom-select {
659
- position: relative;
660
- flex: 1;
661
- height: 36px;
662
- }
663
-
664
- .custom-select-trigger {
665
- width: 100%;
666
- height: 100%;
667
- padding: 8px 36px 8px 12px;
668
- border: 1px solid #d9d9d9;
669
- border-radius: 4px;
670
- font-size: 14px;
671
- color: #333;
672
- background-color: #fff;
673
- cursor: pointer;
674
- display: flex;
675
- align-items: center;
676
- justify-content: space-between;
677
- transition: all 0.2s;
678
- }
679
-
680
- .custom-select-trigger:hover {
681
- border-color: #1890ff;
682
- }
683
-
684
- .custom-select-trigger.active {
685
- border-color: #1890ff;
686
- box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
687
- }
688
-
689
- .custom-select-trigger.has-value {
690
- color: #333;
691
- }
692
-
693
- .custom-select-trigger.placeholder {
694
- color: #999;
695
- }
696
-
697
- .custom-select-arrow {
698
- position: absolute;
699
- right: 12px;
700
- top: 50%;
701
- transform: translateY(-50%);
702
- width: 12px;
703
- height: 12px;
704
- transition: transform 0.2s;
705
- }
706
-
707
- .custom-select-trigger.active .custom-select-arrow {
708
- transform: translateY(-50%) rotate(180deg);
709
- }
710
-
711
- .custom-select-options {
712
- position: absolute;
713
- top: calc(100% + 4px);
714
- left: 0;
715
- right: 0;
716
- max-height: 240px;
717
- overflow-y: auto;
718
- background-color: #fff;
719
- border: 1px solid #d9d9d9;
720
- border-radius: 4px;
721
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
722
- z-index: 100;
723
- display: none;
724
- }
725
-
726
- .custom-select-options.show {
727
- display: block;
728
- }
729
-
730
- .custom-select-option {
731
- padding: 8px 12px;
732
- font-size: 14px;
733
- color: #333;
734
- cursor: pointer;
735
- display: flex;
736
- align-items: center;
737
- justify-content: space-between;
738
- transition: background-color 0.2s;
739
- }
740
-
741
- .custom-select-option:hover {
742
- background-color: #f5f5f5;
743
- }
744
-
745
- .custom-select-option.selected {
746
- background-color: #1890ff;
747
- color: white;
748
- }
749
-
750
- .custom-select-option .check-icon {
751
- display: none;
752
- }
753
-
754
- .custom-select-option.selected .check-icon {
755
- display: inline;
756
- }
757
-
758
- .custom-select-option.disabled {
759
- color: #999;
760
- cursor: not-allowed;
761
- }
762
-
763
- .custom-select-option.disabled:hover {
764
- background-color: transparent;
765
- }
766
-
767
- /* 分隔线 */
768
- .custom-select-divider {
769
- height: 1px;
770
- background-color: #e0e0e0;
771
- margin: 4px 0;
772
- }
773
-
774
- /* 配置操作按钮 */
775
- .custom-select-action {
776
- padding: 8px 12px;
777
- font-size: 14px;
778
- color: #333;
779
- cursor: pointer;
780
- display: flex;
781
- align-items: center;
782
- gap: 6px;
783
- transition: background-color 0.2s;
784
- border-top: 1px solid #e0e0e0;
785
- }
786
-
787
- .custom-select-action:hover {
788
- background-color: #f5f5f5;
789
- }
790
-
791
- .custom-select-action:active {
792
- background-color: #e8e8e8;
793
- }
794
-
795
- /* 滚动条样式 */
796
- .custom-select-options::-webkit-scrollbar {
797
- width: 6px;
798
- }
799
-
800
- .custom-select-options::-webkit-scrollbar-track {
801
- background: #f5f5f5;
802
- }
803
-
804
- .custom-select-options::-webkit-scrollbar-thumb {
805
- background: #d9d9d9;
806
- border-radius: 3px;
807
- }
808
-
809
- .custom-select-options::-webkit-scrollbar-thumb:hover {
810
- background: #bfbfbf;
811
- }
812
-
813
- /* ==================== 按钮样式 ==================== */
814
-
815
- .btn {
816
- padding: 8px 16px;
817
- border: 1px solid transparent;
818
- border-radius: 8px;
819
- font-size: 14px;
820
- font-weight: 500;
821
- cursor: pointer;
822
- transition: all 0.2s;
823
- display: inline-flex;
824
- align-items: center;
825
- justify-content: center;
826
- gap: 6px;
827
- }
828
-
829
- .btn-icon {
830
- padding: 6px !important;
831
- width: 32px !important;
832
- height: 32px !important;
833
- min-width: 32px !important;
834
- min-height: 32px !important;
835
- }
836
-
837
- .btn:disabled {
838
- opacity: 0.5;
839
- cursor: not-allowed;
840
- }
841
-
842
- .btn-primary {
843
- background-color: #1890ff;
844
- color: white;
845
- height: 36px;
846
- padding: 8px 20px;
847
- font-size: 14px;
848
- font-weight: 500;
849
- }
850
-
851
- .btn-primary:hover:not(:disabled) {
852
- background-color: #0d7ae5;
853
- }
854
-
855
- .btn-primary:active:not(:disabled) {
856
- background-color: #0968d3;
857
- transform: translateY(1px);
858
- }
859
-
860
- .btn-outline {
861
- background-color: white;
862
- border-color: #e0e0e0;
863
- color: #333;
864
- }
865
-
866
- .btn-outline:hover:not(:disabled) {
867
- background-color: #f5f5f5;
868
- border-color: #d0d0d0;
869
- }
870
-
871
- .btn-light {
872
- background-color: #f5f5f5;
873
- color: #333;
874
- }
875
-
876
- .btn-light:hover:not(:disabled) {
877
- background-color: #e8e8e8;
878
- }
879
-
880
- .btn-sm {
881
- padding: 4px 12px;
882
- font-size: 12px;
883
- border-radius: 4px;
884
- height: 36px;
885
- }
886
-
887
- /* 开始优化按钮 */
888
- #startOptimizeBtn {
889
- min-width: 120px;
890
- height: 36px;
891
- }
892
-
893
- /* 继续优化按钮 */
894
- #iterateBtn {
895
- background-color: #e6f7ff;
896
- color: #1890ff;
897
- border: 1px solid #91d5ff;
898
- }
899
-
900
- #iterateBtn:hover:not(:disabled) {
901
- background-color: #bae7ff;
902
- border-color: #69c0ff;
903
- }
904
-
905
- #iterateBtn:active:not(:disabled) {
906
- background-color: #91d5ff;
907
- transform: translateY(1px);
908
- }
909
-
910
- /* ==================== 响应式设计 ==================== */
911
-
912
- @media (max-width: 768px) {
913
- .optimization-drawer {
914
- width: 100%;
915
- }
916
-
917
- .drawer-content {
918
- border-radius: 0;
919
- }
920
- }
921
-
922
- .template-help-text {
923
- margin-top: 10px;
924
- padding: 10px;
925
- background-color: #f8f9fa;
926
- border-radius: 6px;
927
- font-size: 12px;
928
- color: #666;
929
- }
930
-
931
- .template-help-text p {
932
- margin-bottom: 5px;
933
- font-weight: 500;
934
- }
935
-
936
- .template-help-text ul {
937
- padding-left: 20px;
938
- margin: 0;
939
- }
940
-
941
- .template-help-text code {
942
- background-color: #e9ecef;
943
- padding: 2px 4px;
944
- border-radius: 3px;
945
- color: #d63384;
946
- }
947
-
948
- /* 高级模板样式 */
949
- .advanced-message-list {
950
- display: flex;
951
- flex-direction: column;
952
- gap: 15px;
953
- margin-top: 10px;
954
- max-height: 400px;
955
- overflow-y: auto;
956
- padding-right: 5px;
957
- }
958
-
959
- .advanced-message-item {
960
- padding: 12px;
961
- background-color: #f8f9fa;
962
- border: 1px solid #dee2e6;
963
- border-radius: 8px;
964
- }
965
-
966
- .advanced-message-item .message-header {
967
- display: flex;
968
- justify-content: space-between;
969
- align-items: center;
970
- margin-bottom: 10px;
971
- }
972
-
973
- .advanced-message-item .message-role {
974
- width: 120px;
975
- height: 32px !important;
976
- padding: 2px 8px !important;
977
- font-size: 13px !important;
978
- }
979
-
980
- .btn-remove-message {
981
- width: 24px;
982
- height: 24px;
983
- display: flex;
984
- align-items: center;
985
- justify-content: center;
986
- background: none;
987
- border: none;
988
- color: #999;
989
- font-size: 20px;
990
- cursor: pointer;
991
- transition: color 0.2s;
992
- }
993
-
994
- .btn-remove-message:hover {
995
- color: #dc3545;
996
- }
997
-
998
- .advanced-message-item .message-content {
999
- font-family: inherit;
1000
- font-size: 14px;
1001
- }
1002
-
1003
- .form-row {
1004
- display: flex;
1005
- gap: 15px;
1006
- margin-bottom: 15px;
1007
- }
1008
-
1009
- .col-6 {
1010
- flex: 1;
1011
- }
1012
-
1013
- .hidden {
1014
- display: none !important;
1015
- }