pai-agent-ui 0.1.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.
Files changed (63) hide show
  1. package/README.md +57 -0
  2. package/dist/components/AgentChatPanel.d.ts +8 -0
  3. package/dist/components/AgentChatPanel.d.ts.map +1 -0
  4. package/dist/components/AgentChatPanel.js +88 -0
  5. package/dist/components/AgentChatPanel.js.map +1 -0
  6. package/dist/components/AgentWidgetRenderer.d.ts +3 -0
  7. package/dist/components/AgentWidgetRenderer.d.ts.map +1 -0
  8. package/dist/components/AgentWidgetRenderer.js +40 -0
  9. package/dist/components/AgentWidgetRenderer.js.map +1 -0
  10. package/dist/components/ChatComposer.d.ts +9 -0
  11. package/dist/components/ChatComposer.d.ts.map +1 -0
  12. package/dist/components/ChatComposer.js +138 -0
  13. package/dist/components/ChatComposer.js.map +1 -0
  14. package/dist/components/EntityTreeEditor.d.ts +22 -0
  15. package/dist/components/EntityTreeEditor.d.ts.map +1 -0
  16. package/dist/components/EntityTreeEditor.js +178 -0
  17. package/dist/components/EntityTreeEditor.js.map +1 -0
  18. package/dist/components/JobStatusLine.d.ts +13 -0
  19. package/dist/components/JobStatusLine.d.ts.map +1 -0
  20. package/dist/components/JobStatusLine.js +32 -0
  21. package/dist/components/JobStatusLine.js.map +1 -0
  22. package/dist/components/widgets/AgentPlanWidget.d.ts +6 -0
  23. package/dist/components/widgets/AgentPlanWidget.d.ts.map +1 -0
  24. package/dist/components/widgets/AgentPlanWidget.js +42 -0
  25. package/dist/components/widgets/AgentPlanWidget.js.map +1 -0
  26. package/dist/components/widgets/ClarificationRequestWidget.d.ts +6 -0
  27. package/dist/components/widgets/ClarificationRequestWidget.d.ts.map +1 -0
  28. package/dist/components/widgets/ClarificationRequestWidget.js +49 -0
  29. package/dist/components/widgets/ClarificationRequestWidget.js.map +1 -0
  30. package/dist/components/widgets/ExecutionActionWidget.d.ts +6 -0
  31. package/dist/components/widgets/ExecutionActionWidget.d.ts.map +1 -0
  32. package/dist/components/widgets/ExecutionActionWidget.js +320 -0
  33. package/dist/components/widgets/ExecutionActionWidget.js.map +1 -0
  34. package/dist/components/widgets/PaceFileViewWidget.d.ts +6 -0
  35. package/dist/components/widgets/PaceFileViewWidget.d.ts.map +1 -0
  36. package/dist/components/widgets/PaceFileViewWidget.js +78 -0
  37. package/dist/components/widgets/PaceFileViewWidget.js.map +1 -0
  38. package/dist/components/widgets/PacePatchFormWidget.d.ts +6 -0
  39. package/dist/components/widgets/PacePatchFormWidget.d.ts.map +1 -0
  40. package/dist/components/widgets/PacePatchFormWidget.js +112 -0
  41. package/dist/components/widgets/PacePatchFormWidget.js.map +1 -0
  42. package/dist/components/widgets/ProjectMemoryReviewWidget.d.ts +6 -0
  43. package/dist/components/widgets/ProjectMemoryReviewWidget.d.ts.map +1 -0
  44. package/dist/components/widgets/ProjectMemoryReviewWidget.js +50 -0
  45. package/dist/components/widgets/ProjectMemoryReviewWidget.js.map +1 -0
  46. package/dist/index.d.ts +7 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +7 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/styles.css +643 -0
  51. package/dist/types.d.ts +317 -0
  52. package/dist/types.d.ts.map +1 -0
  53. package/dist/types.js +2 -0
  54. package/dist/types.js.map +1 -0
  55. package/dist/utils/jsonPointer.d.ts +20 -0
  56. package/dist/utils/jsonPointer.d.ts.map +1 -0
  57. package/dist/utils/jsonPointer.js +220 -0
  58. package/dist/utils/jsonPointer.js.map +1 -0
  59. package/dist/utils/workerTask.d.ts +30 -0
  60. package/dist/utils/workerTask.d.ts.map +1 -0
  61. package/dist/utils/workerTask.js +90 -0
  62. package/dist/utils/workerTask.js.map +1 -0
  63. package/package.json +40 -0
@@ -0,0 +1,643 @@
1
+ .pai-card {
2
+ position: relative;
3
+ border: 1px solid rgba(148, 163, 184, 0.18);
4
+ border-radius: 18px;
5
+ background: rgba(15, 23, 42, 0.72);
6
+ box-shadow: 0 18px 70px rgba(15, 23, 42, 0.3);
7
+ }
8
+
9
+ .pai-agent-chat-panel {
10
+ display: grid;
11
+ grid-template-rows: minmax(0, 1fr) auto;
12
+ gap: 16px;
13
+ min-height: 0;
14
+ height: 100%;
15
+ }
16
+
17
+ .pai-messages-container {
18
+ display: grid;
19
+ gap: 12px;
20
+ min-height: 0;
21
+ overflow: auto;
22
+ }
23
+
24
+ .pai-message-card {
25
+ border: 1px solid rgba(148, 163, 184, 0.18);
26
+ border-radius: 16px;
27
+ background: rgba(24, 34, 59, 0.9);
28
+ padding: 14px;
29
+ }
30
+
31
+ .pai-message-card.user {
32
+ border-color: rgba(124, 156, 255, 0.45);
33
+ background: rgba(26, 37, 69, 0.92);
34
+ }
35
+
36
+ .pai-message-role {
37
+ margin-bottom: 8px;
38
+ color: #7df0d4;
39
+ font-size: 12px;
40
+ letter-spacing: 0.06em;
41
+ text-transform: uppercase;
42
+ }
43
+
44
+ .pai-message-content,
45
+ .pai-assistant-summary {
46
+ white-space: pre-wrap;
47
+ overflow-wrap: anywhere;
48
+ word-break: break-word;
49
+ }
50
+
51
+ .pai-message-meta {
52
+ margin-top: 10px;
53
+ color: rgba(226, 232, 240, 0.62);
54
+ font-size: 12px;
55
+ }
56
+
57
+ .pai-assistant-block {
58
+ display: grid;
59
+ gap: 12px;
60
+ }
61
+
62
+ .pai-warning-list {
63
+ margin: 0;
64
+ padding-left: 18px;
65
+ color: #ffd59a;
66
+ }
67
+
68
+ .pai-subtle-label,
69
+ .pai-agent-run-divider {
70
+ color: rgba(226, 232, 240, 0.62);
71
+ font-size: 12px;
72
+ letter-spacing: 0.05em;
73
+ text-transform: uppercase;
74
+ }
75
+
76
+ .pai-agent-run-divider {
77
+ margin: 4px 0;
78
+ }
79
+
80
+ .pai-agent-run-header {
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ gap: 8px;
85
+ margin-bottom: 10px;
86
+ color: rgba(226, 232, 240, 0.62);
87
+ font-size: 12px;
88
+ }
89
+
90
+ .pai-agent-run-projection {
91
+ display: flex;
92
+ flex-wrap: wrap;
93
+ gap: 6px;
94
+ margin: 0 0 10px;
95
+ }
96
+
97
+ .pai-details {
98
+ display: grid;
99
+ gap: 8px;
100
+ }
101
+
102
+ .pai-empty-state {
103
+ color: rgba(226, 232, 240, 0.62);
104
+ }
105
+
106
+ .pai-storyboard-img {
107
+ max-width: 100%;
108
+ max-height: 420px;
109
+ border: 1px solid rgba(148, 163, 184, 0.18);
110
+ border-radius: 12px;
111
+ background: rgba(7, 12, 26, 0.95);
112
+ }
113
+
114
+ .pai-widget-card,
115
+ .pai-chat-composer {
116
+ padding: 14px;
117
+ }
118
+
119
+ .pai-widget-subcard {
120
+ margin-top: 12px;
121
+ padding: 12px;
122
+ background: rgba(15, 23, 42, 0.46);
123
+ }
124
+
125
+ .pai-widget-stack {
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: 12px;
129
+ margin-top: 12px;
130
+ }
131
+
132
+ .pai-widget-title {
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: space-between;
136
+ gap: 12px;
137
+ color: #f8fafc;
138
+ font-size: 14px;
139
+ font-weight: 700;
140
+ letter-spacing: 0.01em;
141
+ }
142
+
143
+ .pai-muted {
144
+ color: rgba(226, 232, 240, 0.68);
145
+ font-size: 12px;
146
+ line-height: 1.55;
147
+ }
148
+
149
+ .pai-error {
150
+ margin-top: 8px;
151
+ color: #fecaca;
152
+ font-size: 12px;
153
+ line-height: 1.5;
154
+ }
155
+
156
+ .pai-actions {
157
+ display: flex;
158
+ flex-wrap: wrap;
159
+ justify-content: flex-end;
160
+ gap: 8px;
161
+ margin-top: 12px;
162
+ }
163
+
164
+ .pai-button {
165
+ height: 32px;
166
+ border: 1px solid rgba(148, 163, 184, 0.26);
167
+ border-radius: 10px;
168
+ padding: 0 12px;
169
+ color: #e2e8f0;
170
+ background: rgba(15, 23, 42, 0.72);
171
+ font: inherit;
172
+ font-size: 12px;
173
+ cursor: pointer;
174
+ transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
175
+ }
176
+
177
+ .pai-button:hover:not(:disabled) {
178
+ border-color: rgba(125, 154, 255, 0.62);
179
+ transform: translateY(-1px);
180
+ }
181
+
182
+ .pai-button:disabled {
183
+ cursor: not-allowed;
184
+ opacity: 0.5;
185
+ }
186
+
187
+ .pai-button-primary {
188
+ border-color: rgba(125, 154, 255, 0.52);
189
+ background: linear-gradient(135deg, #6f8fff, #4f46e5);
190
+ color: #fff;
191
+ }
192
+
193
+ .pai-button-secondary {
194
+ background: rgba(30, 41, 59, 0.72);
195
+ }
196
+
197
+ .pai-button-ghost,
198
+ .pai-icon-button {
199
+ border-color: transparent;
200
+ background: transparent;
201
+ box-shadow: none;
202
+ }
203
+
204
+ .pai-icon-button {
205
+ height: 26px;
206
+ padding: 0 8px;
207
+ color: rgba(226, 232, 240, 0.7);
208
+ font-size: 11px;
209
+ }
210
+
211
+ .pai-input,
212
+ .pai-textarea {
213
+ width: 100%;
214
+ border: 1px solid rgba(148, 163, 184, 0.26);
215
+ border-radius: 10px;
216
+ outline: none;
217
+ color: #f8fafc;
218
+ background: rgba(15, 23, 42, 0.72);
219
+ font: inherit;
220
+ font-size: 13px;
221
+ }
222
+
223
+ .pai-input {
224
+ min-height: 34px;
225
+ padding: 0 10px;
226
+ }
227
+
228
+ .pai-textarea {
229
+ resize: vertical;
230
+ padding: 9px 10px;
231
+ line-height: 1.45;
232
+ }
233
+
234
+ .pai-input:focus,
235
+ .pai-textarea:focus {
236
+ border-color: rgba(125, 154, 255, 0.72);
237
+ box-shadow: 0 0 0 3px rgba(125, 154, 255, 0.12);
238
+ }
239
+
240
+ .pai-pre {
241
+ overflow: auto;
242
+ max-height: 260px;
243
+ margin: 8px 0 0;
244
+ border: 1px solid rgba(148, 163, 184, 0.16);
245
+ border-radius: 12px;
246
+ padding: 10px;
247
+ color: rgba(226, 232, 240, 0.82);
248
+ background: rgba(2, 6, 23, 0.42);
249
+ font-size: 12px;
250
+ line-height: 1.45;
251
+ white-space: pre-wrap;
252
+ }
253
+
254
+ .pai-chat-composer {
255
+ position: relative;
256
+ }
257
+
258
+ .pai-chat-composer-row {
259
+ display: grid;
260
+ grid-template-columns: minmax(0, 1fr) 92px;
261
+ gap: 10px;
262
+ align-items: stretch;
263
+ }
264
+
265
+ .pai-chat-input {
266
+ min-height: 54px;
267
+ max-height: 86px;
268
+ }
269
+
270
+ .pai-send-button {
271
+ height: auto;
272
+ min-height: 54px;
273
+ }
274
+
275
+ .pai-mention-popover {
276
+ position: absolute;
277
+ right: 14px;
278
+ bottom: calc(100% + 8px);
279
+ left: 14px;
280
+ z-index: 20;
281
+ overflow: hidden;
282
+ border: 1px solid rgba(148, 163, 184, 0.24);
283
+ border-radius: 14px;
284
+ background: rgba(15, 23, 42, 0.96);
285
+ box-shadow: 0 22px 80px rgba(2, 6, 23, 0.48);
286
+ }
287
+
288
+ .pai-mention-item {
289
+ display: flex;
290
+ width: 100%;
291
+ align-items: flex-start;
292
+ gap: 10px;
293
+ border: 0;
294
+ padding: 9px 11px;
295
+ color: #e2e8f0;
296
+ background: transparent;
297
+ text-align: left;
298
+ cursor: pointer;
299
+ }
300
+
301
+ .pai-mention-item.is-active,
302
+ .pai-mention-item:hover {
303
+ background: rgba(125, 154, 255, 0.16);
304
+ }
305
+
306
+ .pai-mention-type {
307
+ flex: 0 0 auto;
308
+ border-radius: 999px;
309
+ padding: 2px 7px;
310
+ color: #dbeafe;
311
+ background: rgba(59, 130, 246, 0.18);
312
+ font-size: 11px;
313
+ }
314
+
315
+ .pai-mention-body {
316
+ display: flex;
317
+ min-width: 0;
318
+ flex-direction: column;
319
+ gap: 2px;
320
+ }
321
+
322
+ .pai-mention-id {
323
+ color: #f8fafc;
324
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
325
+ font-size: 12px;
326
+ }
327
+
328
+ .pai-mention-context,
329
+ .pai-mention-empty {
330
+ overflow: hidden;
331
+ color: rgba(226, 232, 240, 0.62);
332
+ font-size: 12px;
333
+ text-overflow: ellipsis;
334
+ white-space: nowrap;
335
+ }
336
+
337
+ .pai-mention-empty {
338
+ padding: 12px;
339
+ }
340
+
341
+ .pai-tree-card {
342
+ margin-top: 10px;
343
+ }
344
+
345
+ .pai-tree {
346
+ display: flex;
347
+ flex-direction: column;
348
+ gap: 3px;
349
+ }
350
+
351
+ .pai-tree-node {
352
+ display: flex;
353
+ flex-direction: column;
354
+ }
355
+
356
+ .pai-tree-row {
357
+ display: grid;
358
+ grid-template-columns: 24px minmax(120px, 0.5fr) minmax(120px, 1fr) auto;
359
+ gap: 8px;
360
+ align-items: center;
361
+ min-height: 32px;
362
+ border-radius: 10px;
363
+ padding: 3px 6px;
364
+ }
365
+
366
+ .pai-tree-row:hover {
367
+ background: rgba(148, 163, 184, 0.08);
368
+ }
369
+
370
+ .pai-tree-leaf {
371
+ grid-template-columns: 24px minmax(120px, 0.5fr) minmax(120px, 1fr) auto;
372
+ }
373
+
374
+ .pai-tree-leaf::before {
375
+ content: "";
376
+ }
377
+
378
+ .pai-tree-toggle {
379
+ display: inline-flex;
380
+ width: 22px;
381
+ height: 22px;
382
+ align-items: center;
383
+ justify-content: center;
384
+ border: 0;
385
+ border-radius: 7px;
386
+ color: rgba(226, 232, 240, 0.8);
387
+ background: transparent;
388
+ cursor: pointer;
389
+ }
390
+
391
+ .pai-tree-toggle:hover {
392
+ background: rgba(148, 163, 184, 0.14);
393
+ }
394
+
395
+ .pai-tree-label {
396
+ overflow: hidden;
397
+ color: rgba(248, 250, 252, 0.86);
398
+ font-size: 12px;
399
+ font-weight: 600;
400
+ text-overflow: ellipsis;
401
+ white-space: nowrap;
402
+ }
403
+
404
+ .pai-tree-value {
405
+ overflow: hidden;
406
+ color: rgba(226, 232, 240, 0.72);
407
+ font-size: 12px;
408
+ text-overflow: ellipsis;
409
+ white-space: nowrap;
410
+ }
411
+
412
+ .pai-tree-control {
413
+ min-width: 0;
414
+ }
415
+
416
+ .pai-tree-children {
417
+ margin-left: 18px;
418
+ border-left: 1px solid rgba(148, 163, 184, 0.14);
419
+ padding-left: 10px;
420
+ }
421
+
422
+ .pai-array-add {
423
+ margin: 6px 0 8px;
424
+ }
425
+
426
+ .pai-form-grid,
427
+ .pai-dynamic-fields {
428
+ display: flex;
429
+ flex-direction: column;
430
+ gap: 10px;
431
+ margin-top: 10px;
432
+ }
433
+
434
+ .pai-field {
435
+ display: grid;
436
+ grid-template-columns: 108px minmax(0, 1fr);
437
+ gap: 10px;
438
+ align-items: start;
439
+ }
440
+
441
+ .pai-field-label {
442
+ padding-top: 8px;
443
+ color: rgba(226, 232, 240, 0.68);
444
+ font-size: 12px;
445
+ }
446
+
447
+ .pai-checkbox,
448
+ .pai-choice-item {
449
+ display: flex;
450
+ align-items: center;
451
+ gap: 8px;
452
+ color: #e2e8f0;
453
+ font-size: 13px;
454
+ }
455
+
456
+ .pai-choice-list,
457
+ .pai-plan-list,
458
+ .pai-memory-list {
459
+ display: flex;
460
+ flex-direction: column;
461
+ gap: 8px;
462
+ margin-top: 12px;
463
+ }
464
+
465
+ .pai-choice-item,
466
+ .pai-plan-item,
467
+ .pai-memory-item {
468
+ border: 1px solid rgba(148, 163, 184, 0.14);
469
+ border-radius: 12px;
470
+ padding: 10px;
471
+ background: rgba(15, 23, 42, 0.42);
472
+ }
473
+
474
+ .pai-plan-item {
475
+ display: flex;
476
+ align-items: center;
477
+ gap: 10px;
478
+ }
479
+
480
+ .pai-plan-index {
481
+ display: inline-flex;
482
+ width: 24px;
483
+ height: 24px;
484
+ align-items: center;
485
+ justify-content: center;
486
+ border-radius: 999px;
487
+ color: #dbeafe;
488
+ background: rgba(59, 130, 246, 0.18);
489
+ font-size: 12px;
490
+ }
491
+
492
+ .pai-plan-title {
493
+ flex: 1;
494
+ color: #f8fafc;
495
+ font-size: 13px;
496
+ font-weight: 600;
497
+ }
498
+
499
+ .pai-tag,
500
+ .pai-status-chip {
501
+ display: inline-flex;
502
+ align-items: center;
503
+ gap: 6px;
504
+ border-radius: 999px;
505
+ padding: 2px 8px;
506
+ color: #dbeafe;
507
+ background: rgba(59, 130, 246, 0.18);
508
+ font-size: 11px;
509
+ }
510
+
511
+ .pai-status-chip.is-done {
512
+ color: #bbf7d0;
513
+ background: rgba(34, 197, 94, 0.16);
514
+ }
515
+
516
+ .pai-status-chip.is-failed {
517
+ color: #fecaca;
518
+ background: rgba(239, 68, 68, 0.16);
519
+ }
520
+
521
+ .pai-spinner {
522
+ width: 11px;
523
+ height: 11px;
524
+ border: 2px solid rgba(219, 234, 254, 0.35);
525
+ border-top-color: #dbeafe;
526
+ border-radius: 999px;
527
+ animation: pai-spin 0.8s linear infinite;
528
+ }
529
+
530
+ @keyframes pai-spin {
531
+ to {
532
+ transform: rotate(360deg);
533
+ }
534
+ }
535
+
536
+ .pai-job-status-block {
537
+ display: flex;
538
+ flex-direction: column;
539
+ gap: 8px;
540
+ margin-top: 12px;
541
+ }
542
+
543
+ .pai-job-status-line {
544
+ display: flex;
545
+ flex-wrap: wrap;
546
+ align-items: center;
547
+ gap: 8px;
548
+ color: rgba(226, 232, 240, 0.78);
549
+ font-size: 12px;
550
+ }
551
+
552
+ .pai-job-status-label {
553
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
554
+ }
555
+
556
+ .pai-progress {
557
+ position: relative;
558
+ overflow: hidden;
559
+ height: 16px;
560
+ border-radius: 999px;
561
+ background: rgba(148, 163, 184, 0.16);
562
+ }
563
+
564
+ .pai-progress-bar {
565
+ height: 100%;
566
+ border-radius: inherit;
567
+ background: linear-gradient(90deg, #6f8fff, #22d3ee);
568
+ transition: width 0.24s ease;
569
+ }
570
+
571
+ .pai-progress-text {
572
+ position: absolute;
573
+ inset: 0;
574
+ display: flex;
575
+ align-items: center;
576
+ justify-content: center;
577
+ color: #fff;
578
+ font-size: 10px;
579
+ }
580
+
581
+ .pai-result {
582
+ margin-top: 12px;
583
+ }
584
+
585
+ .pai-result-body {
586
+ margin-top: 8px;
587
+ }
588
+
589
+ .pai-execution-images {
590
+ display: grid;
591
+ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
592
+ gap: 10px;
593
+ margin-top: 12px;
594
+ }
595
+
596
+ .pai-execution-images img {
597
+ width: 100%;
598
+ border-radius: 12px;
599
+ object-fit: cover;
600
+ }
601
+
602
+ .pai-memory-item {
603
+ display: grid;
604
+ grid-template-columns: minmax(0, 1fr) 120px;
605
+ gap: 12px;
606
+ align-items: start;
607
+ }
608
+
609
+ .pai-memory-title {
610
+ color: #f8fafc;
611
+ font-size: 13px;
612
+ font-weight: 700;
613
+ }
614
+
615
+ .pai-memory-text,
616
+ .pai-memory-meta {
617
+ margin-top: 4px;
618
+ color: rgba(226, 232, 240, 0.72);
619
+ font-size: 12px;
620
+ line-height: 1.5;
621
+ }
622
+
623
+ .pai-memory-meta {
624
+ display: flex;
625
+ flex-wrap: wrap;
626
+ gap: 8px;
627
+ }
628
+
629
+ @media (max-width: 720px) {
630
+ .pai-chat-composer-row,
631
+ .pai-field,
632
+ .pai-memory-item {
633
+ grid-template-columns: 1fr;
634
+ }
635
+
636
+ .pai-send-button {
637
+ min-height: 42px;
638
+ }
639
+
640
+ .pai-tree-row {
641
+ grid-template-columns: 24px minmax(86px, 0.7fr) minmax(100px, 1fr) auto;
642
+ }
643
+ }