agent-api-server 2.1.7__py3-none-any.whl

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 (52) hide show
  1. agent_api_server/__init__.py +0 -0
  2. agent_api_server/api/__init__.py +0 -0
  3. agent_api_server/api/v1/__init__.py +0 -0
  4. agent_api_server/api/v1/api.py +25 -0
  5. agent_api_server/api/v1/config.py +57 -0
  6. agent_api_server/api/v1/graph.py +59 -0
  7. agent_api_server/api/v1/schema.py +57 -0
  8. agent_api_server/api/v1/thread.py +563 -0
  9. agent_api_server/cache/__init__.py +0 -0
  10. agent_api_server/cache/redis_cache.py +385 -0
  11. agent_api_server/callback_handler.py +18 -0
  12. agent_api_server/client/css/styles.css +1202 -0
  13. agent_api_server/client/favicon.ico +0 -0
  14. agent_api_server/client/index.html +102 -0
  15. agent_api_server/client/js/app.js +1499 -0
  16. agent_api_server/client/js/index.umd.js +824 -0
  17. agent_api_server/config_center/config_center.py +239 -0
  18. agent_api_server/configs/__init__.py +3 -0
  19. agent_api_server/configs/config.py +163 -0
  20. agent_api_server/dynamic_llm/__init__.py +0 -0
  21. agent_api_server/dynamic_llm/dynamic_llm.py +331 -0
  22. agent_api_server/listener.py +530 -0
  23. agent_api_server/log/__init__.py +0 -0
  24. agent_api_server/log/formatters.py +122 -0
  25. agent_api_server/log/logging.json +50 -0
  26. agent_api_server/mcp_convert/__init__.py +0 -0
  27. agent_api_server/mcp_convert/mcp_convert.py +375 -0
  28. agent_api_server/memeory/__init__.py +0 -0
  29. agent_api_server/memeory/postgres.py +233 -0
  30. agent_api_server/register/__init__.py +0 -0
  31. agent_api_server/register/register.py +65 -0
  32. agent_api_server/service.py +354 -0
  33. agent_api_server/service_hub/service_hub.py +233 -0
  34. agent_api_server/service_hub/service_hub_test.py +700 -0
  35. agent_api_server/shared/__init__.py +0 -0
  36. agent_api_server/shared/ase.py +54 -0
  37. agent_api_server/shared/base_model.py +103 -0
  38. agent_api_server/shared/common.py +110 -0
  39. agent_api_server/shared/decode_token.py +107 -0
  40. agent_api_server/shared/detect_message.py +410 -0
  41. agent_api_server/shared/get_model_info.py +491 -0
  42. agent_api_server/shared/message.py +419 -0
  43. agent_api_server/shared/util_func.py +372 -0
  44. agent_api_server/sso_service/__init__.py +1 -0
  45. agent_api_server/sso_service/sdk/__init__.py +1 -0
  46. agent_api_server/sso_service/sdk/client.py +224 -0
  47. agent_api_server/sso_service/sdk/credential.py +11 -0
  48. agent_api_server/sso_service/sdk/encoding.py +22 -0
  49. agent_api_server/sso_service/sso_service.py +177 -0
  50. agent_api_server-2.1.7.dist-info/METADATA +130 -0
  51. agent_api_server-2.1.7.dist-info/RECORD +52 -0
  52. agent_api_server-2.1.7.dist-info/WHEEL +4 -0
@@ -0,0 +1,1202 @@
1
+ :root {
2
+ --primary: #8a2be2;
3
+ --primary-light: #9d4edd;
4
+ --primary-dark: #7b2cbf;
5
+ --secondary: #00f5d4;
6
+ --secondary-dark: #00bbf9;
7
+ --accent: #ff006e;
8
+ --dark: #0f172a;
9
+ --darker: #020617;
10
+ --light: #f8fafc;
11
+ --gray: #64748b;
12
+ --gray-light: #e2e8f0;
13
+ --success: #10b981;
14
+ --glass: rgba(255, 255, 255, 0.05);
15
+ --glass-border: rgba(255, 255, 255, 0.1);
16
+ --neon-glow: 0 0 10px rgba(138, 43, 226, 0.5), 0 0 20px rgba(138, 43, 226, 0.3);
17
+ --neon-glow-secondary: 0 0 10px rgba(0, 245, 212, 0.5), 0 0 20px rgba(0, 245, 212, 0.3);
18
+ }
19
+
20
+ * {
21
+ margin: 0;
22
+ padding: 0;
23
+ box-sizing: border-box;
24
+ }
25
+
26
+ body {
27
+ font-family: 'Inter', sans-serif;
28
+ background-color: var(--darker);
29
+ background-image:
30
+ radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.15) 0px, transparent 50%),
31
+ radial-gradient(at 0% 50%, hsla(271, 76%, 53%, 0.15) 0px, transparent 50%);
32
+ color: var(--light);
33
+ line-height: 1.6;
34
+ min-height: 100vh;
35
+ overflow-x: hidden;
36
+ }
37
+
38
+ .container {
39
+ max-width: 1400px;
40
+ margin: 0 auto;
41
+ padding: 2rem;
42
+ }
43
+
44
+ header {
45
+ text-align: center;
46
+ margin-bottom: 3rem;
47
+ position: relative;
48
+ }
49
+
50
+ h1 {
51
+ font-size: 3rem;
52
+ font-weight: 800;
53
+ margin-bottom: 0.5rem;
54
+ background: linear-gradient(90deg, var(--primary), var(--secondary));
55
+ -webkit-background-clip: text;
56
+ background-clip: text;
57
+ color: transparent;
58
+ text-shadow: var(--neon-glow);
59
+ letter-spacing: -0.05em;
60
+ }
61
+
62
+ .subtitle {
63
+ color: var(--gray-light);
64
+ font-size: 1.2rem;
65
+ max-width: 700px;
66
+ margin: 0 auto;
67
+ line-height: 1.7;
68
+ }
69
+
70
+ .card {
71
+ background: var(--glass);
72
+ backdrop-filter: blur(10px);
73
+ -webkit-backdrop-filter: blur(10px);
74
+ border: 1px solid var(--glass-border);
75
+ border-radius: 1rem;
76
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
77
+ padding: 2rem;
78
+ margin-bottom: 2rem;
79
+ transition: all 0.3s ease;
80
+ }
81
+
82
+ .card:hover {
83
+ transform: translateY(-5px);
84
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
85
+ }
86
+
87
+ .form-group {
88
+ margin-bottom: 1.75rem;
89
+ position: relative;
90
+ }
91
+
92
+ label {
93
+ display: block;
94
+ margin-bottom: 0.75rem;
95
+ font-weight: 600;
96
+ color: var(--secondary);
97
+ font-size: 0.95rem;
98
+ letter-spacing: 0.5px;
99
+ }
100
+
101
+ input, textarea, select {
102
+ width: 100%;
103
+ padding: 1rem;
104
+ background: rgba(15, 23, 42, 0.7);
105
+ border: 1px solid var(--glass-border);
106
+ border-radius: 0.75rem;
107
+ font-family: 'JetBrains Mono', monospace;
108
+ font-size: 0.95rem;
109
+ color: var(--light);
110
+ transition: all 0.3s ease;
111
+ }
112
+
113
+ input:focus, textarea:focus, select:focus {
114
+ outline: none;
115
+ border-color: var(--primary);
116
+ box-shadow: var(--neon-glow);
117
+ background: rgba(15, 23, 42, 0.9);
118
+ }
119
+
120
+ textarea {
121
+ min-height: 150px;
122
+ resize: vertical;
123
+ line-height: 1.7;
124
+ }
125
+
126
+ .btn {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ padding: 1rem 2rem;
131
+ border-radius: 0.75rem;
132
+ font-weight: 600;
133
+ cursor: pointer;
134
+ transition: all 0.3s ease;
135
+ border: none;
136
+ font-size: 1rem;
137
+ position: relative;
138
+ overflow: hidden;
139
+ z-index: 1;
140
+ }
141
+
142
+ .btn::before {
143
+ content: '';
144
+ position: absolute;
145
+ top: 0;
146
+ left: 0;
147
+ width: 100%;
148
+ height: 100%;
149
+ background: linear-gradient(45deg, var(--primary), var(--secondary-dark));
150
+ z-index: -1;
151
+ opacity: 0;
152
+ transition: opacity 0.3s ease;
153
+ }
154
+
155
+ .btn:hover::before {
156
+ opacity: 1;
157
+ }
158
+
159
+ .btn-primary {
160
+ background-color: var(--primary);
161
+ color: white;
162
+ box-shadow: var(--neon-glow);
163
+ }
164
+
165
+ .btn-primary:hover {
166
+ background-color: var(--primary-light);
167
+ transform: translateY(-2px);
168
+ box-shadow: 0 0 15px rgba(138, 43, 226, 0.7), 0 0 25px rgba(138, 43, 226, 0.4);
169
+ }
170
+
171
+ .btn-secondary {
172
+ background-color: rgba(30, 41, 59, 0.7);
173
+ color: var(--light);
174
+ border: 1px solid var(--glass-border);
175
+ }
176
+
177
+ .btn-secondary:hover {
178
+ background-color: rgba(30, 41, 59, 0.9);
179
+ transform: translateY(-2px);
180
+ box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
181
+ border-color: var(--secondary);
182
+ }
183
+
184
+ .btn i {
185
+ margin-right: 0.75rem;
186
+ font-size: 1.1rem;
187
+ }
188
+
189
+ .flex {
190
+ display: flex;
191
+ gap: 1.5rem;
192
+ }
193
+
194
+ .stream-container {
195
+ position: relative;
196
+ min-height: 500px;
197
+ max-height: 700px;
198
+ overflow-y: auto;
199
+ background: rgba(2, 6, 23, 0.7);
200
+ border-radius: 1rem;
201
+ padding: 1.5rem;
202
+ color: var(--light);
203
+ font-family: 'JetBrains Mono', monospace;
204
+ border: 1px solid var(--glass-border);
205
+ box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
206
+ scrollbar-width: thin;
207
+ scrollbar-color: var(--primary) var(--darker);
208
+ }
209
+
210
+ .stream-container::-webkit-scrollbar {
211
+ width: 10px;
212
+ }
213
+
214
+ .stream-container::-webkit-scrollbar-track {
215
+ background: var(--darker);
216
+ border-radius: 0 0.75rem 0.75rem 0;
217
+ }
218
+
219
+ .stream-container::-webkit-scrollbar-thumb {
220
+ background-color: var(--primary);
221
+ border-radius: 0.75rem;
222
+ border: 2px solid var(--darker);
223
+ }
224
+
225
+ .message {
226
+ margin-bottom: 1.75rem;
227
+ padding: 1.5rem;
228
+ border-radius: 0.75rem;
229
+ background: rgba(15, 23, 42, 0.5);
230
+ border: 1px solid rgba(138, 43, 226, 0.2);
231
+ position: relative;
232
+ animation: fadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
233
+ transition: all 0.3s ease;
234
+ }
235
+
236
+ .message:hover {
237
+ transform: translateX(5px);
238
+ border-color: rgba(138, 43, 226, 0.4);
239
+ box-shadow: var(--neon-glow);
240
+ }
241
+
242
+ @keyframes fadeIn {
243
+ from {
244
+ opacity: 0;
245
+ transform: translateY(15px) scale(0.98);
246
+ }
247
+ to {
248
+ opacity: 1;
249
+ transform: translateY(0) scale(1);
250
+ }
251
+ }
252
+
253
+ .message-header {
254
+ display: flex;
255
+ align-items: center;
256
+ margin-bottom: 1rem;
257
+ font-weight: 600;
258
+ }
259
+
260
+ .message-node {
261
+ padding: 0.35rem 0.75rem;
262
+ border-radius: 0.5rem;
263
+ font-size: 0.85rem;
264
+ margin-right: 1rem;
265
+ font-weight: 700;
266
+ letter-spacing: 0.5px;
267
+ text-transform: uppercase;
268
+ }
269
+
270
+ .node-agent {
271
+ background: linear-gradient(45deg, var(--primary), var(--primary-light));
272
+ color: white;
273
+ box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
274
+ }
275
+
276
+ .node-tools {
277
+ background: linear-gradient(45deg, var(--secondary), var(--secondary-dark));
278
+ color: var(--darker);
279
+ box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
280
+ }
281
+
282
+ .node-system {
283
+ background: linear-gradient(45deg, #64748b, #475569);
284
+ color: white;
285
+ box-shadow: 0 0 10px rgba(100, 116, 139, 0.3);
286
+ }
287
+
288
+ .message-timestamp {
289
+ color: var(--gray);
290
+ font-size: 0.85rem;
291
+ margin-left: auto;
292
+ }
293
+
294
+ .message-content {
295
+ white-space: pre-wrap;
296
+ word-break: break-word;
297
+ line-height: 1.8;
298
+ font-size: 0.95rem;
299
+ }
300
+
301
+ .tool-call {
302
+ background: rgba(0, 245, 212, 0.08);
303
+ border-left: 3px solid var(--secondary);
304
+ padding: 1rem;
305
+ margin-top: 1rem;
306
+ border-radius: 0 0.5rem 0.5rem 0;
307
+ font-family: 'JetBrains Mono', monospace;
308
+ font-size: 0.9rem;
309
+ position: relative;
310
+ overflow: hidden;
311
+ }
312
+
313
+ .tool-call::before {
314
+ content: '';
315
+ position: absolute;
316
+ top: 0;
317
+ left: 0;
318
+ width: 2px;
319
+ height: 100%;
320
+ background: var(--secondary);
321
+ }
322
+
323
+ .tool-call-name {
324
+ font-weight: 600;
325
+ color: var(--secondary);
326
+ margin-bottom: 0.5rem;
327
+ display: flex;
328
+ align-items: center;
329
+ }
330
+
331
+ .tool-call-name i {
332
+ margin-right: 0.5rem;
333
+ }
334
+
335
+ .tool-call-args {
336
+ color: var(--gray-light);
337
+ font-size: 0.85rem;
338
+ margin-top: 0.5rem;
339
+ line-height: 1.7;
340
+ }
341
+
342
+ .status {
343
+ display: flex;
344
+ align-items: center;
345
+ margin-bottom: 1.5rem;
346
+ padding: 1rem 1.5rem;
347
+ border-radius: 0.75rem;
348
+ font-weight: 600;
349
+ font-size: 1rem;
350
+ border: 1px solid transparent;
351
+ transition: all 0.3s ease;
352
+ }
353
+
354
+ .status-connecting {
355
+ background: rgba(253, 230, 138, 0.1);
356
+ color: #fcd34d;
357
+ border-color: rgba(253, 230, 138, 0.2);
358
+ }
359
+
360
+ .status-connected {
361
+ background: rgba(16, 185, 129, 0.1);
362
+ color: var(--success);
363
+ border-color: rgba(16, 185, 129, 0.2);
364
+ box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
365
+ }
366
+
367
+ .status-disconnected {
368
+ background: rgba(239, 68, 68, 0.1);
369
+ color: #ef4444;
370
+ border-color: rgba(239, 68, 68, 0.2);
371
+ }
372
+
373
+ .status i {
374
+ margin-right: 0.75rem;
375
+ font-size: 1.1rem;
376
+ }
377
+
378
+ .copy-btn {
379
+ position: absolute;
380
+ top: 1rem;
381
+ right: 1rem;
382
+ background: rgba(255, 255, 255, 0.1);
383
+ border: none;
384
+ width: 36px;
385
+ height: 36px;
386
+ border-radius: 50%;
387
+ display: flex;
388
+ align-items: center;
389
+ justify-content: center;
390
+ cursor: pointer;
391
+ transition: all 0.3s ease;
392
+ color: var(--gray);
393
+ }
394
+
395
+ .copy-btn:hover {
396
+ background: rgba(138, 43, 226, 0.3);
397
+ color: var(--primary);
398
+ transform: scale(1.1);
399
+ }
400
+
401
+ .empty-content {
402
+ color: var(--gray);
403
+ font-style: italic;
404
+ text-align: center;
405
+ padding: 2rem;
406
+ font-size: 1.1rem;
407
+ }
408
+
409
+ .token-usage {
410
+ font-size: 0.85rem;
411
+ color: var(--gray);
412
+ margin-top: 1rem;
413
+ display: flex;
414
+ align-items: center;
415
+ flex-wrap: wrap;
416
+ gap: 1.5rem;
417
+ }
418
+
419
+ .token-usage span {
420
+ display: flex;
421
+ align-items: center;
422
+ }
423
+
424
+ .token-prompt {
425
+ color: #fcd34d;
426
+ }
427
+
428
+ .token-completion {
429
+ color: var(--success);
430
+ }
431
+
432
+ .token-total {
433
+ color: var(--primary);
434
+ }
435
+
436
+ .token-usage i {
437
+ margin-right: 0.5rem;
438
+ font-size: 1rem;
439
+ }
440
+
441
+ .pulse {
442
+ animation: pulse 2s infinite;
443
+ }
444
+
445
+ @keyframes pulse {
446
+ 0% {
447
+ box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.7);
448
+ }
449
+ 70% {
450
+ box-shadow: 0 0 0 10px rgba(138, 43, 226, 0);
451
+ }
452
+ 100% {
453
+ box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
454
+ }
455
+ }
456
+
457
+ .floating {
458
+ animation: floating 6s ease-in-out infinite;
459
+ }
460
+
461
+ @keyframes floating {
462
+ 0% { transform: translateY(0px); }
463
+ 50% { transform: translateY(-15px); }
464
+ 100% { transform: translateY(0px); }
465
+ }
466
+
467
+ .gradient-text {
468
+ background: linear-gradient(90deg, var(--primary), var(--secondary));
469
+ -webkit-background-clip: text;
470
+ background-clip: text;
471
+ color: transparent;
472
+ }
473
+
474
+ .graph-selector {
475
+ display: flex;
476
+ gap: 1rem;
477
+ align-items: flex-end;
478
+ }
479
+
480
+ .refresh-graphs-btn {
481
+ padding: 0.75rem 1rem;
482
+ border-radius: 0.5rem;
483
+ background: rgba(15, 23, 42, 0.5);
484
+ border: 1px solid var(--glass-border);
485
+ cursor: pointer;
486
+ transition: all 0.3s ease;
487
+ }
488
+
489
+ .refresh-graphs-btn:hover {
490
+ background: rgba(138, 43, 226, 0.2);
491
+ transform: translateY(-2px);
492
+ }
493
+
494
+ @media (max-width: 768px) {
495
+ .container {
496
+ padding: 1.5rem;
497
+ }
498
+
499
+ h1 {
500
+ font-size: 2.25rem;
501
+ }
502
+
503
+ .subtitle {
504
+ font-size: 1rem;
505
+ }
506
+
507
+ .card {
508
+ padding: 1.5rem;
509
+ }
510
+
511
+ .flex {
512
+ flex-direction: column;
513
+ }
514
+
515
+ .btn {
516
+ width: 100%;
517
+ justify-content: center;
518
+ }
519
+
520
+ .stream-container {
521
+ min-height: 400px;
522
+ }
523
+
524
+ .graph-selector {
525
+ flex-direction: column;
526
+ align-items: stretch;
527
+ }
528
+ }
529
+ .modal {
530
+ display: none;
531
+ position: fixed;
532
+ z-index: 1000;
533
+ left: 0;
534
+ top: 0;
535
+ width: 100%;
536
+ height: 100%;
537
+ background-color: rgba(0, 0, 0, 0.7);
538
+ backdrop-filter: blur(5px);
539
+ }
540
+ .modal-content {
541
+ background: var(--darker);
542
+ border: 1px solid var(--primary);
543
+ border-radius: 1rem;
544
+ margin: 10% auto;
545
+ padding: 2rem;
546
+ width: 80%;
547
+ max-width: 600px;
548
+ box-shadow: var(--neon-glow);
549
+ animation: fadeIn 0.3s ease-out;
550
+ }
551
+ .modal h3 {
552
+ color: var(--primary);
553
+ margin-bottom: 1rem;
554
+ }
555
+ #interruptInput {
556
+ width: 100%;
557
+ min-height: 100px;
558
+ margin: 1rem 0;
559
+ background: rgba(15, 23, 42, 0.9);
560
+ }
561
+ .modal-buttons {
562
+ display: flex;
563
+ justify-content: flex-end;
564
+ gap: 1rem;
565
+ margin-top: 1.5rem;
566
+ }
567
+ .interrupt-prompt {
568
+ color: var(--primary);
569
+ margin-bottom: 1rem;
570
+ padding: 0.5rem 1rem;
571
+ background: rgba(99, 102, 241, 0.1);
572
+ border-left: 3px solid var(--primary);
573
+ border-radius: 0 4px 4px 0;
574
+ }
575
+ .modal-content {
576
+ display: flex;
577
+ flex-direction: column;
578
+ gap: 1rem;
579
+ }
580
+ .config-viewer {
581
+ background: rgba(15, 23, 42, 0.9);
582
+ border: 1px solid var(--primary);
583
+ border-radius: 0.75rem;
584
+ padding: 1.5rem;
585
+ margin-top: 1.5rem;
586
+ }
587
+
588
+ .config-viewer-header {
589
+ display: flex;
590
+ justify-content: space-between;
591
+ align-items: center;
592
+ margin-bottom: 1.5rem;
593
+ }
594
+
595
+ .config-viewer-header h3 {
596
+ color: var(--secondary);
597
+ margin: 0;
598
+ }
599
+
600
+ .config-viewer-close {
601
+ background: none;
602
+ border: none;
603
+ color: var(--gray);
604
+ font-size: 1.2rem;
605
+ cursor: pointer;
606
+ transition: color 0.3s ease;
607
+ }
608
+
609
+ .config-viewer-close:hover {
610
+ color: var(--accent);
611
+ }
612
+
613
+ .config-list {
614
+ display: flex;
615
+ flex-direction: column;
616
+ gap: 1rem;
617
+ }
618
+
619
+ .config-entry {
620
+ font-family: 'JetBrains Mono', monospace;
621
+ font-size: 0.95rem;
622
+ line-height: 1.7;
623
+ padding: 0.75rem;
624
+ background: rgba(2, 6, 23, 0.5);
625
+ border-radius: 0.5rem;
626
+ border-left: 3px solid var(--primary);
627
+ }
628
+
629
+ .config-key {
630
+ color: var(--secondary);
631
+ font-weight: 500;
632
+ }
633
+
634
+ .config-value {
635
+ color: var(--light);
636
+ }
637
+
638
+ .config-enum-hint {
639
+ color: var(--gray);
640
+ font-size: 0.85rem;
641
+ margin-left: 0.5rem;
642
+ font-style: italic;
643
+ }
644
+
645
+ .config-error {
646
+ color: #ef4444;
647
+ text-align: center;
648
+ padding: 1rem;
649
+ }
650
+ /* Input Form Styles */
651
+ #inputFormContainer {
652
+ background-color: #2a2a3a;
653
+ border-radius: 8px;
654
+ padding: 15px;
655
+ border: 1px solid #3a3a4a;
656
+ min-height: 60px;
657
+ }
658
+
659
+ .empty-form {
660
+ color: #888;
661
+ font-style: italic;
662
+ padding: 10px;
663
+ }
664
+
665
+ .form-field {
666
+ margin-bottom: 12px;
667
+ }
668
+
669
+ .form-field label {
670
+ display: block;
671
+ margin-bottom: 5px;
672
+ color: #b0b0b0;
673
+ font-size: 14px;
674
+ }
675
+
676
+ .form-field input {
677
+ width: 100%;
678
+ padding: 8px 12px;
679
+ background-color: #1e1e2a;
680
+ border: 1px solid #3a3a4a;
681
+ border-radius: 4px;
682
+ color: #e0e0e0;
683
+ font-family: 'Inter', sans-serif;
684
+ font-size: 14px;
685
+ }
686
+
687
+ .form-field input:focus {
688
+ outline: none;
689
+ border-color: #6a6a8a;
690
+ }
691
+
692
+ .form-field input.error {
693
+ border-color: #ff5555;
694
+ }
695
+
696
+ .required {
697
+ color: #ff5555;
698
+ }
699
+ /* 流式消息样式 */
700
+ .streaming-message {
701
+ background: rgba(59, 130, 246, 0.05);
702
+ border-left: 3px solid #3b82f6;
703
+ }
704
+
705
+ .streaming-content {
706
+ white-space: pre-wrap;
707
+ word-wrap: break-word;
708
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
709
+ font-size: 14px;
710
+ line-height: 1.5;
711
+ max-height: 400px;
712
+ overflow-y: auto;
713
+ padding: 8px;
714
+ background: #1e293b;
715
+ border-radius: 4px;
716
+ margin: 8px 0;
717
+ }
718
+
719
+ .streaming-indicator {
720
+ color: #10b981;
721
+ font-size: 12px;
722
+ font-weight: 500;
723
+ }
724
+
725
+ .streaming-indicator i {
726
+ color: #10b981;
727
+ animation: pulse 1.5s infinite;
728
+ }
729
+
730
+ @keyframes pulse {
731
+ 0%, 100% { opacity: 1; }
732
+ 50% { opacity: 0.5; }
733
+ }
734
+
735
+ /* 消息容器样式 */
736
+ .message {
737
+ background: #1e293b;
738
+ border: 1px solid #334155;
739
+ border-radius: 8px;
740
+ padding: 16px;
741
+ margin-bottom: 16px;
742
+ position: relative;
743
+ color: #e2e8f0;
744
+ }
745
+
746
+ .message-header {
747
+ display: flex;
748
+ align-items: center;
749
+ gap: 12px;
750
+ margin-bottom: 12px;
751
+ flex-wrap: wrap;
752
+ font-size: 14px;
753
+ }
754
+
755
+ .message-node {
756
+ padding: 4px 8px;
757
+ border-radius: 4px;
758
+ font-weight: 600;
759
+ font-size: 12px;
760
+ text-transform: uppercase;
761
+ }
762
+
763
+ .node-agent { background: #059669; color: white; }
764
+ .node-tools { background: #dc2626; color: white; }
765
+ .node-system { background: #7c3aed; color: white; }
766
+ .node-gen_mql_node { background: #ea580c; color: white; }
767
+ .node-unknown { background: #6b7280; color: white; }
768
+
769
+ .message-timestamp {
770
+ color: #94a3b8;
771
+ font-size: 12px;
772
+ margin-left: auto;
773
+ }
774
+
775
+ .message-content {
776
+ white-space: pre-wrap;
777
+ word-wrap: break-word;
778
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
779
+ font-size: 14px;
780
+ line-height: 1.5;
781
+ max-height: 400px;
782
+ overflow-y: auto;
783
+ padding: 12px;
784
+ background: #0f172a;
785
+ border-radius: 6px;
786
+ border: 1px solid #334155;
787
+ color: #e2e8f0;
788
+ }
789
+
790
+ /* 复制按钮样式 */
791
+ .copy-btn {
792
+ position: absolute;
793
+ top: 12px;
794
+ right: 12px;
795
+ background: #374151;
796
+ border: 1px solid #4b5563;
797
+ color: #d1d5db;
798
+ border-radius: 4px;
799
+ padding: 6px 8px;
800
+ cursor: pointer;
801
+ font-size: 12px;
802
+ transition: all 0.2s;
803
+ }
804
+
805
+ .copy-btn:hover {
806
+ background: #4b5563;
807
+ color: white;
808
+ }
809
+
810
+ /* 工具调用样式 */
811
+ .tool-call {
812
+ background: #0f172a;
813
+ border: 1px solid #334155;
814
+ border-radius: 6px;
815
+ padding: 12px;
816
+ margin: 8px 0;
817
+ }
818
+
819
+ .tool-call-name {
820
+ color: #f59e0b;
821
+ font-weight: 600;
822
+ margin-bottom: 8px;
823
+ font-size: 14px;
824
+ }
825
+
826
+ .tool-call-args pre {
827
+ background: #1e293b;
828
+ padding: 8px;
829
+ border-radius: 4px;
830
+ overflow-x: auto;
831
+ font-size: 12px;
832
+ color: #cbd5e1;
833
+ margin: 0;
834
+ }
835
+
836
+ /* token使用情况样式 */
837
+ .token-usage {
838
+ display: flex;
839
+ gap: 16px;
840
+ font-size: 12px;
841
+ color: #94a3b8;
842
+ margin-top: 8px;
843
+ flex-wrap: wrap;
844
+ }
845
+
846
+ .token-prompt { color: #60a5fa; }
847
+ .token-completion { color: #34d399; }
848
+ .token-total { color: #f59e0b; }
849
+
850
+ /* 引用样式 */
851
+ .references-section {
852
+ margin-top: 12px;
853
+ padding-top: 12px;
854
+ border-top: 1px solid #334155;
855
+ }
856
+
857
+ .section-title {
858
+ color: #8b5cf6;
859
+ font-weight: 600;
860
+ margin-bottom: 8px;
861
+ font-size: 14px;
862
+ }
863
+
864
+ .references-raw {
865
+ background: #1e293b;
866
+ padding: 8px;
867
+ border-radius: 4px;
868
+ overflow-x: auto;
869
+ font-size: 12px;
870
+ color: #cbd5e1;
871
+ max-height: 200px;
872
+ overflow-y: auto;
873
+ }
874
+
875
+ /* 空内容样式 */
876
+ .empty-content {
877
+ text-align: center;
878
+ color: #94a3b8;
879
+ font-style: italic;
880
+ padding: 40px 20px;
881
+ }
882
+
883
+ .empty-form {
884
+ text-align: center;
885
+ color: #94a3b8;
886
+ font-style: italic;
887
+ padding: 20px;
888
+ }
889
+
890
+ /* 滚动条样式 */
891
+ .message-content::-webkit-scrollbar,
892
+ .references-raw::-webkit-scrollbar,
893
+ .tool-call-args pre::-webkit-scrollbar {
894
+ width: 6px;
895
+ height: 6px;
896
+ }
897
+
898
+ .message-content::-webkit-scrollbar-track,
899
+ .references-raw::-webkit-scrollbar-track,
900
+ .tool-call-args pre::-webkit-scrollbar-track {
901
+ background: #1e293b;
902
+ border-radius: 3px;
903
+ }
904
+
905
+ .message-content::-webkit-scrollbar-thumb,
906
+ .references-raw::-webkit-scrollbar-thumb,
907
+ .tool-call-args pre::-webkit-scrollbar-thumb {
908
+ background: #4b5563;
909
+ border-radius: 3px;
910
+ }
911
+
912
+ .message-content::-webkit-scrollbar-thumb:hover,
913
+ .references-raw::-webkit-scrollbar-thumb:hover,
914
+ .tool-call-args pre::-webkit-scrollbar-thumb:hover {
915
+ background: #6b7280;
916
+ }
917
+
918
+ /* 状态指示器 */
919
+ .status {
920
+ padding: 8px 12px;
921
+ border-radius: 6px;
922
+ font-weight: 600;
923
+ font-size: 14px;
924
+ }
925
+
926
+ .status-connecting {
927
+ background: #fef3c7;
928
+ color: #d97706;
929
+ }
930
+
931
+ .status-connected {
932
+ background: #d1fae5;
933
+ color: #059669;
934
+ }
935
+
936
+ .status-disconnected {
937
+ background: #fee2e2;
938
+ color: #dc2626;
939
+ }
940
+
941
+ .status-connected.pulse {
942
+ animation: statusPulse 2s infinite;
943
+ }
944
+
945
+ @keyframes statusPulse {
946
+ 0%, 100% { opacity: 1; }
947
+ 50% { opacity: 0.7; }
948
+ }
949
+
950
+ /* 配置查看器样式 */
951
+ .config-viewer {
952
+ background: #1e293b;
953
+ border: 1px solid #334155;
954
+ border-radius: 8px;
955
+ padding: 0;
956
+ margin: 16px 0;
957
+ color: #e2e8f0;
958
+ }
959
+
960
+ .config-viewer-header {
961
+ display: flex;
962
+ justify-content: between;
963
+ align-items: center;
964
+ padding: 16px;
965
+ border-bottom: 1px solid #334155;
966
+ background: #0f172a;
967
+ }
968
+
969
+ .config-viewer-header h3 {
970
+ margin: 0;
971
+ color: #f8fafc;
972
+ font-size: 18px;
973
+ }
974
+
975
+ .config-viewer-close {
976
+ background: #dc2626;
977
+ border: none;
978
+ color: white;
979
+ border-radius: 4px;
980
+ padding: 6px 10px;
981
+ cursor: pointer;
982
+ font-size: 12px;
983
+ }
984
+
985
+ .config-viewer-close:hover {
986
+ background: #b91c1c;
987
+ }
988
+
989
+ .config-content {
990
+ padding: 16px;
991
+ }
992
+
993
+ .config-list {
994
+ display: flex;
995
+ flex-direction: column;
996
+ gap: 12px;
997
+ }
998
+
999
+ .config-entry {
1000
+ display: flex;
1001
+ align-items: flex-start;
1002
+ padding: 12px;
1003
+ background: #0f172a;
1004
+ border-radius: 6px;
1005
+ border: 1px solid #334155;
1006
+ flex-wrap: wrap;
1007
+ }
1008
+
1009
+ .config-key {
1010
+ font-weight: 600;
1011
+ color: #60a5fa;
1012
+ min-width: 150px;
1013
+ }
1014
+
1015
+ .config-value {
1016
+ color: #34d399;
1017
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
1018
+ font-size: 14px;
1019
+ }
1020
+
1021
+ .config-enum-hint {
1022
+ color: #f59e0b;
1023
+ font-size: 12px;
1024
+ font-style: italic;
1025
+ }
1026
+
1027
+ .config-error {
1028
+ color: #ef4444;
1029
+ text-align: center;
1030
+ padding: 20px;
1031
+ }
1032
+
1033
+ /* 主容器样式 */
1034
+ .stream-container {
1035
+ background: #0f172a;
1036
+ border: 1px solid #334155;
1037
+ border-radius: 8px;
1038
+ padding: 20px;
1039
+ min-height: 400px;
1040
+ max-height: 600px;
1041
+ overflow-y: auto;
1042
+ color: #e2e8f0;
1043
+ }
1044
+
1045
+ /* 表单样式 */
1046
+ .form-field {
1047
+ margin-bottom: 16px;
1048
+ }
1049
+
1050
+ .form-field label {
1051
+ display: block;
1052
+ margin-bottom: 6px;
1053
+ color: #e2e8f0;
1054
+ font-weight: 500;
1055
+ }
1056
+
1057
+ .form-field input {
1058
+ width: 100%;
1059
+ padding: 10px 12px;
1060
+ border: 1px solid #4b5563;
1061
+ border-radius: 6px;
1062
+ background: #1e293b;
1063
+ color: #f8fafc;
1064
+ font-size: 14px;
1065
+ }
1066
+
1067
+ .form-field input:focus {
1068
+ outline: none;
1069
+ border-color: #3b82f6;
1070
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
1071
+ }
1072
+
1073
+ .form-field input.error {
1074
+ border-color: #ef4444;
1075
+ box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
1076
+ }
1077
+
1078
+ .required {
1079
+ color: #ef4444;
1080
+ }
1081
+
1082
+ /* 按钮样式 */
1083
+ .btn {
1084
+ padding: 10px 16px;
1085
+ border: none;
1086
+ border-radius: 6px;
1087
+ font-weight: 500;
1088
+ cursor: pointer;
1089
+ transition: all 0.2s;
1090
+ font-size: 14px;
1091
+ }
1092
+
1093
+ .btn-primary {
1094
+ background: #3b82f6;
1095
+ color: white;
1096
+ }
1097
+
1098
+ .btn-primary:hover:not(:disabled) {
1099
+ background: #2563eb;
1100
+ }
1101
+
1102
+ .btn-secondary {
1103
+ background: #6b7280;
1104
+ color: white;
1105
+ }
1106
+
1107
+ .btn-secondary:hover:not(:disabled) {
1108
+ background: #4b5563;
1109
+ }
1110
+
1111
+ .btn-danger {
1112
+ background: #ef4444;
1113
+ color: white;
1114
+ }
1115
+
1116
+ .btn-danger:hover:not(:disabled) {
1117
+ background: #dc2626;
1118
+ }
1119
+
1120
+ .btn:disabled {
1121
+ opacity: 0.6;
1122
+ cursor: not-allowed;
1123
+ }
1124
+
1125
+ /* 卡片样式 */
1126
+ .card {
1127
+ background: #1e293b;
1128
+ border: 1px solid #334155;
1129
+ border-radius: 8px;
1130
+ padding: 20px;
1131
+ margin-bottom: 20px;
1132
+ color: #e2e8f0;
1133
+ }
1134
+
1135
+ .card h3 {
1136
+ margin-top: 0;
1137
+ color: #f8fafc;
1138
+ border-bottom: 1px solid #334155;
1139
+ padding-bottom: 12px;
1140
+ }
1141
+
1142
+ /* 基础重置 */
1143
+ * {
1144
+ box-sizing: border-box;
1145
+ }
1146
+
1147
+ body {
1148
+ background: #0f172a;
1149
+ color: #e2e8f0;
1150
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1151
+ margin: 0;
1152
+ padding: 20px;
1153
+ line-height: 1.5;
1154
+ }
1155
+
1156
+ /* 模态框样式 */
1157
+ .modal {
1158
+ display: none;
1159
+ position: fixed;
1160
+ z-index: 1000;
1161
+ left: 0;
1162
+ top: 0;
1163
+ width: 100%;
1164
+ height: 100%;
1165
+ background-color: rgba(0, 0, 0, 0.5);
1166
+ }
1167
+
1168
+ .modal-content {
1169
+ background: #1e293b;
1170
+ margin: 10% auto;
1171
+ padding: 20px;
1172
+ border: 1px solid #334155;
1173
+ border-radius: 8px;
1174
+ width: 90%;
1175
+ max-width: 500px;
1176
+ color: #e2e8f0;
1177
+ }
1178
+
1179
+ .interrupt-prompt {
1180
+ margin-bottom: 16px;
1181
+ color: #f8fafc;
1182
+ font-weight: 500;
1183
+ }
1184
+
1185
+ .modal-content textarea {
1186
+ width: 100%;
1187
+ min-height: 100px;
1188
+ padding: 12px;
1189
+ border: 1px solid #4b5563;
1190
+ border-radius: 6px;
1191
+ background: #0f172a;
1192
+ color: #f8fafc;
1193
+ font-family: inherit;
1194
+ resize: vertical;
1195
+ }
1196
+
1197
+ .modal-buttons {
1198
+ display: flex;
1199
+ gap: 12px;
1200
+ justify-content: flex-end;
1201
+ margin-top: 16px;
1202
+ }