@becrafter/prompt-manager 0.1.9 → 0.1.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.
Files changed (36) hide show
  1. package/env.example +1 -1
  2. package/package.json +4 -1
  3. package/packages/admin-ui/admin.html +49 -0
  4. package/packages/admin-ui/css/codemirror-theme_xq-light.css +43 -0
  5. package/packages/admin-ui/css/codemirror.css +344 -0
  6. package/packages/admin-ui/css/main.css +4485 -0
  7. package/packages/admin-ui/css/markdown.css +468 -0
  8. package/packages/admin-ui/css/optimization.css +1015 -0
  9. package/packages/admin-ui/css/recommended-prompts.css +610 -0
  10. package/packages/admin-ui/css/terminal-fix.css +571 -0
  11. package/packages/admin-ui/package-lock.json +8287 -0
  12. package/packages/admin-ui/package.json +46 -0
  13. package/packages/admin-ui/src/codemirror.js +53 -0
  14. package/packages/admin-ui/src/components/ArgumentModal.js +53 -0
  15. package/packages/admin-ui/src/components/DeletePromptModal.js +30 -0
  16. package/packages/admin-ui/src/components/HeaderView.js +40 -0
  17. package/packages/admin-ui/src/components/LoadingOverlay.js +12 -0
  18. package/packages/admin-ui/src/components/LoginView.js +22 -0
  19. package/packages/admin-ui/src/components/ModelConfigModal.js +103 -0
  20. package/packages/admin-ui/src/components/NewFolderModal.js +58 -0
  21. package/packages/admin-ui/src/components/OptimizationConfigModal.js +36 -0
  22. package/packages/admin-ui/src/components/OptimizationDrawer.js +135 -0
  23. package/packages/admin-ui/src/components/PrimaryNav.js +34 -0
  24. package/packages/admin-ui/src/components/PromptsArea.js +140 -0
  25. package/packages/admin-ui/src/components/RecommendedPromptModal.js +37 -0
  26. package/packages/admin-ui/src/components/SidebarView.js +24 -0
  27. package/packages/admin-ui/src/components/SyncPromptModal.js +44 -0
  28. package/packages/admin-ui/src/components/TemplateEditorModal.js +75 -0
  29. package/packages/admin-ui/src/components/TemplateListModal.js +30 -0
  30. package/packages/admin-ui/src/components/TerminalComponent.js +995 -0
  31. package/packages/admin-ui/src/components/TerminalView.js +25 -0
  32. package/packages/admin-ui/src/components/ToolDetailModal.js +23 -0
  33. package/packages/admin-ui/src/components/ToolsArea.js +119 -0
  34. package/packages/admin-ui/src/components/ToolsUploadModal.js +59 -0
  35. package/packages/admin-ui/src/index.js +6766 -0
  36. package/packages/server/utils/config.js +1 -1
@@ -0,0 +1,468 @@
1
+ /* Markdown 内容样式 */
2
+ .markdown-body {
3
+ font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
4
+ font-size: 15px;
5
+ line-height: 1.7;
6
+ color: #24292f;
7
+ background: white;
8
+ padding: 24px;
9
+ border-radius: 12px;
10
+ }
11
+
12
+ .markdown-body h1,
13
+ .markdown-body h2,
14
+ .markdown-body h3,
15
+ .markdown-body h4,
16
+ .markdown-body h5,
17
+ .markdown-body h6 {
18
+ margin-top: 24px;
19
+ margin-bottom: 16px;
20
+ font-weight: 600;
21
+ line-height: 1.25;
22
+ color: #1a1a1a;
23
+ }
24
+
25
+ .markdown-body h1 {
26
+ font-size: 2em;
27
+ padding-bottom: 0.3em;
28
+ border-bottom: 2px solid #e0e0e0;
29
+ }
30
+
31
+ .markdown-body h2 {
32
+ font-size: 1.5em;
33
+ padding-bottom: 0.3em;
34
+ border-bottom: 1px solid #e0e0e0;
35
+ }
36
+
37
+ .markdown-body h3 {
38
+ font-size: 1.25em;
39
+ }
40
+
41
+ .markdown-body h4 {
42
+ font-size: 1em;
43
+ }
44
+
45
+ .markdown-body h5 {
46
+ font-size: 0.875em;
47
+ }
48
+
49
+ .markdown-body h6 {
50
+ font-size: 0.85em;
51
+ color: #6c757d;
52
+ }
53
+
54
+ .markdown-body p {
55
+ margin-top: 0;
56
+ margin-bottom: 16px;
57
+ }
58
+
59
+ .markdown-body a {
60
+ color: #0969da;
61
+ text-decoration: none;
62
+ transition: color 0.2s ease;
63
+ }
64
+
65
+ .markdown-body a:hover {
66
+ color: #0550ae;
67
+ text-decoration: underline;
68
+ }
69
+
70
+ .markdown-body ul,
71
+ .markdown-body ol {
72
+ margin-top: 0;
73
+ margin-bottom: 16px;
74
+ padding-left: 2em;
75
+ }
76
+
77
+ .markdown-body li {
78
+ margin-top: 0.25em;
79
+ }
80
+
81
+ .markdown-body li + li {
82
+ margin-top: 0.5em;
83
+ }
84
+
85
+ .markdown-body blockquote {
86
+ margin: 0 0 16px 0;
87
+ padding: 0 1em;
88
+ color: #6c757d;
89
+ border-left: 4px solid #dee2e6;
90
+ background: rgba(0, 0, 0, 0.02);
91
+ border-radius: 4px;
92
+ }
93
+
94
+ .markdown-body blockquote > :first-child {
95
+ margin-top: 0;
96
+ }
97
+
98
+ .markdown-body blockquote > :last-child {
99
+ margin-bottom: 0;
100
+ }
101
+
102
+ .markdown-body code {
103
+ padding: 0.2em 0.4em;
104
+ margin: 0;
105
+ font-size: 85%;
106
+ background-color: rgba(175, 184, 193, 0.2);
107
+ border-radius: 6px;
108
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
109
+ }
110
+
111
+ .markdown-body pre {
112
+ margin-top: 0;
113
+ margin-bottom: 16px;
114
+ padding: 16px;
115
+ overflow: auto;
116
+ font-size: 85%;
117
+ line-height: 1.45;
118
+ background-color: #f6f8fa;
119
+ border-radius: 8px;
120
+ border: 1px solid #e0e0e0;
121
+ }
122
+
123
+ .markdown-body pre code {
124
+ display: block;
125
+ padding: 0;
126
+ margin: 0;
127
+ overflow: visible;
128
+ line-height: inherit;
129
+ word-wrap: normal;
130
+ background-color: transparent;
131
+ border: 0;
132
+ font-size: 100%;
133
+ }
134
+
135
+ .markdown-body table {
136
+ border-spacing: 0;
137
+ border-collapse: collapse;
138
+ display: block;
139
+ width: max-content;
140
+ max-width: 100%;
141
+ overflow: auto;
142
+ margin-top: 0;
143
+ margin-bottom: 16px;
144
+ }
145
+
146
+ .markdown-body table th {
147
+ font-weight: 600;
148
+ background-color: #f6f8fa;
149
+ }
150
+
151
+ .markdown-body table th,
152
+ .markdown-body table td {
153
+ padding: 8px 13px;
154
+ border: 1px solid #dee2e6;
155
+ }
156
+
157
+ .markdown-body table tr {
158
+ background-color: #ffffff;
159
+ border-top: 1px solid #dee2e6;
160
+ }
161
+
162
+ .markdown-body table tr:nth-child(2n) {
163
+ background-color: #f6f8fa;
164
+ }
165
+
166
+ .markdown-body img {
167
+ max-width: 100%;
168
+ height: auto;
169
+ border-radius: 8px;
170
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
171
+ margin: 16px 0;
172
+ }
173
+
174
+ .markdown-body video {
175
+ max-width: 100%;
176
+ height: auto;
177
+ border-radius: 8px;
178
+ margin: 16px 0;
179
+ }
180
+
181
+ .markdown-body hr {
182
+ height: 0.25em;
183
+ padding: 0;
184
+ margin: 24px 0;
185
+ background-color: #e0e0e0;
186
+ border: 0;
187
+ }
188
+
189
+ /* Mermaid 图表样式 */
190
+ .mermaid-wrapper {
191
+ margin: 24px 0;
192
+ padding: 20px;
193
+ background: #fafbfc;
194
+ border-radius: 12px;
195
+ border: 1px solid #e0e0e0;
196
+ overflow-x: auto;
197
+ }
198
+
199
+ .mermaid-wrapper .mermaid {
200
+ display: flex;
201
+ justify-content: center;
202
+ align-items: center;
203
+ min-height: 200px;
204
+ }
205
+
206
+ .mermaid-error {
207
+ padding: 16px;
208
+ background: #fff3cd;
209
+ border: 1px solid #ffc107;
210
+ border-radius: 8px;
211
+ color: #856404;
212
+ text-align: center;
213
+ }
214
+
215
+ .markdown-error {
216
+ padding: 24px;
217
+ background: #f8d7da;
218
+ border: 1px solid #dc3545;
219
+ border-radius: 8px;
220
+ color: #721c24;
221
+ text-align: center;
222
+ }
223
+
224
+ /* 代码高亮主题 */
225
+ .hljs {
226
+ background: #f6f8fa;
227
+ color: #24292f;
228
+ }
229
+
230
+ .hljs-comment,
231
+ .hljs-quote {
232
+ color: #6a737d;
233
+ font-style: italic;
234
+ }
235
+
236
+ .hljs-keyword,
237
+ .hljs-selector-tag,
238
+ .hljs-subst {
239
+ color: #d73a49;
240
+ font-weight: bold;
241
+ }
242
+
243
+ .hljs-number,
244
+ .hljs-literal,
245
+ .hljs-variable,
246
+ .hljs-template-variable,
247
+ .hljs-tag .hljs-attr {
248
+ color: #005cc5;
249
+ }
250
+
251
+ .hljs-string,
252
+ .hljs-doctag {
253
+ color: #032f62;
254
+ }
255
+
256
+ .hljs-title,
257
+ .hljs-section,
258
+ .hljs-selector-id {
259
+ color: #6f42c1;
260
+ font-weight: bold;
261
+ }
262
+
263
+ .hljs-type,
264
+ .hljs-class .hljs-title {
265
+ color: #22863a;
266
+ font-weight: bold;
267
+ }
268
+
269
+ .hljs-tag,
270
+ .hljs-name,
271
+ .hljs-attribute {
272
+ color: #22863a;
273
+ font-weight: normal;
274
+ }
275
+
276
+ .hljs-regexp,
277
+ .hljs-link {
278
+ color: #032f62;
279
+ }
280
+
281
+ .hljs-symbol,
282
+ .hljs-bullet {
283
+ color: #e36209;
284
+ }
285
+
286
+ .hljs-built_in,
287
+ .hljs-builtin-name {
288
+ color: #005cc5;
289
+ }
290
+
291
+ .hljs-meta {
292
+ color: #005cc5;
293
+ font-weight: bold;
294
+ }
295
+
296
+ .hljs-deletion {
297
+ background: #ffeef0;
298
+ }
299
+
300
+ .hljs-addition {
301
+ background: #e6ffed;
302
+ }
303
+
304
+ .hljs-emphasis {
305
+ font-style: italic;
306
+ }
307
+
308
+ .hljs-strong {
309
+ font-weight: bold;
310
+ }
311
+
312
+ /* 工具详情弹窗优化 */
313
+ .tool-detail-modal {
314
+ position: fixed;
315
+ top: 0;
316
+ left: 0;
317
+ right: 0;
318
+ bottom: 0;
319
+ background: rgba(0, 0, 0, 0.6);
320
+ backdrop-filter: blur(4px);
321
+ display: flex;
322
+ align-items: center;
323
+ justify-content: center;
324
+ z-index: 9999;
325
+ opacity: 0;
326
+ visibility: hidden;
327
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
328
+ }
329
+
330
+ .tool-detail-modal.show {
331
+ opacity: 1;
332
+ visibility: visible;
333
+ }
334
+
335
+ .tool-detail-content {
336
+ background: white;
337
+ border-radius: 16px;
338
+ width: 90%;
339
+ max-width: 1000px;
340
+ max-height: 85vh;
341
+ display: flex;
342
+ flex-direction: column;
343
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
344
+ transform: scale(0.9) translateY(20px);
345
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
346
+ }
347
+
348
+ .tool-detail-modal.show .tool-detail-content {
349
+ transform: scale(1) translateY(0);
350
+ }
351
+
352
+ .tool-detail-header {
353
+ padding: 24px 32px;
354
+ border-bottom: 1px solid #e0e0e0;
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: space-between;
358
+ flex-shrink: 0;
359
+ /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
360
+ background: linear-gradient(135deg, #696b75 0%, #a9a5a5 100%);
361
+ color: white;
362
+ border-radius: 16px 16px 0 0;
363
+ }
364
+
365
+ .tool-detail-title {
366
+ font-size: 24px;
367
+ font-weight: 600;
368
+ margin: 0;
369
+ display: flex;
370
+ align-items: center;
371
+ gap: 12px;
372
+ }
373
+
374
+ .tool-detail-close {
375
+ width: 32px;
376
+ height: 32px;
377
+ border: none;
378
+ background: rgba(255, 255, 255, 0.2);
379
+ color: white;
380
+ border-radius: 50%;
381
+ cursor: pointer;
382
+ display: flex;
383
+ align-items: center;
384
+ justify-content: center;
385
+ font-size: 20px;
386
+ transition: all 0.2s ease;
387
+ padding-bottom: 3px;
388
+ }
389
+
390
+ .tool-detail-close:hover {
391
+ background: rgba(255, 255, 255, 0.3);
392
+ transform: rotate(90deg);
393
+ }
394
+
395
+ .tool-detail-body {
396
+ padding: 0;
397
+ overflow-y: auto;
398
+ flex: 1;
399
+ min-height: 0;
400
+ }
401
+
402
+ .tool-detail-info {
403
+ padding: 24px 32px;
404
+ background: #f8f9fa;
405
+ border-bottom: 1px solid #e0e0e0;
406
+ }
407
+
408
+ .tool-detail-info strong {
409
+ color: #1a1a1a;
410
+ font-weight: 600;
411
+ }
412
+
413
+ .tool-detail-markdown {
414
+ padding: 32px;
415
+ }
416
+
417
+ .tool-detail-loading {
418
+ text-align: center;
419
+ padding: 60px 20px;
420
+ color: #6c757d;
421
+ font-size: 16px;
422
+ }
423
+
424
+ .tool-detail-loading::before {
425
+ content: '';
426
+ display: inline-block;
427
+ width: 40px;
428
+ height: 40px;
429
+ border: 4px solid #f3f3f3;
430
+ border-top: 4px solid #667eea;
431
+ border-radius: 50%;
432
+ animation: spin 1s linear infinite;
433
+ margin-bottom: 16px;
434
+ }
435
+
436
+ @keyframes spin {
437
+ 0% { transform: rotate(0deg); }
438
+ 100% { transform: rotate(360deg); }
439
+ }
440
+
441
+ /* 响应式设计 */
442
+ @media (max-width: 768px) {
443
+ .tool-detail-content {
444
+ width: 95%;
445
+ max-height: 90vh;
446
+ }
447
+
448
+ .tool-detail-header {
449
+ padding: 16px 20px;
450
+ }
451
+
452
+ .tool-detail-title {
453
+ font-size: 20px;
454
+ }
455
+
456
+ .tool-detail-info {
457
+ padding: 16px 20px;
458
+ }
459
+
460
+ .tool-detail-markdown {
461
+ padding: 20px;
462
+ }
463
+
464
+ .markdown-body {
465
+ padding: 16px;
466
+ font-size: 14px;
467
+ }
468
+ }