@next-bricks/ai-portal 0.20.13 → 0.20.14

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.
package/dist/types.json CHANGED
@@ -103,12 +103,12 @@
103
103
  "events": [],
104
104
  "methods": []
105
105
  },
106
- "ai-portal.home-container": {
106
+ "ai-portal.elevo-logo": {
107
107
  "properties": [],
108
108
  "events": [],
109
109
  "methods": []
110
110
  },
111
- "ai-portal.elevo-logo": {
111
+ "ai-portal.home-container": {
112
112
  "properties": [],
113
113
  "events": [],
114
114
  "methods": []
@@ -265,7 +265,7 @@
265
265
  }
266
266
  ]
267
267
  },
268
- "ai-portal.chat-history": {
268
+ "ai-portal.mcp-tools": {
269
269
  "properties": [
270
270
  {
271
271
  "name": "list",
@@ -275,79 +275,24 @@
275
275
  "type": "reference",
276
276
  "typeName": {
277
277
  "type": "identifier",
278
- "name": "HistoryItem"
279
- }
280
- }
281
- }
282
- },
283
- {
284
- "name": "actions",
285
- "annotation": {
286
- "type": "array",
287
- "elementType": {
288
- "type": "reference",
289
- "typeName": {
290
- "type": "identifier",
291
- "name": "ActionType"
278
+ "name": "McpTool"
292
279
  }
293
280
  }
294
281
  }
295
- },
296
- {
297
- "name": "nextToken",
298
- "annotation": {
299
- "type": "keyword",
300
- "value": "string"
301
- }
302
- }
303
- ],
304
- "events": [
305
- {
306
- "name": "action.click",
307
- "detail": {
308
- "annotation": {
309
- "type": "reference",
310
- "typeName": {
311
- "type": "identifier",
312
- "name": "ActionClickDetail"
313
- }
314
- }
315
- }
316
- },
317
- {
318
- "name": "load.more",
319
- "detail": {
320
- "annotation": {
321
- "type": "typeLiteral",
322
- "members": [
323
- {
324
- "type": "propertySignature",
325
- "key": {
326
- "type": "identifier",
327
- "name": "nextToken"
328
- },
329
- "annotation": {
330
- "type": "keyword",
331
- "value": "string"
332
- },
333
- "computed": false
334
- }
335
- ]
336
- }
337
- }
338
282
  }
339
283
  ],
284
+ "events": [],
340
285
  "methods": [],
341
286
  "types": [
342
287
  {
343
288
  "type": "interface",
344
- "name": "HistoryItem",
289
+ "name": "McpTool",
345
290
  "body": [
346
291
  {
347
292
  "type": "propertySignature",
348
293
  "key": {
349
294
  "type": "identifier",
350
- "name": "id"
295
+ "name": "name"
351
296
  },
352
297
  "annotation": {
353
298
  "type": "keyword",
@@ -359,7 +304,7 @@
359
304
  "type": "propertySignature",
360
305
  "key": {
361
306
  "type": "identifier",
362
- "name": "url"
307
+ "name": "title"
363
308
  },
364
309
  "annotation": {
365
310
  "type": "keyword",
@@ -371,7 +316,7 @@
371
316
  "type": "propertySignature",
372
317
  "key": {
373
318
  "type": "identifier",
374
- "name": "title"
319
+ "name": "description"
375
320
  },
376
321
  "annotation": {
377
322
  "type": "keyword",
@@ -383,48 +328,48 @@
383
328
  "type": "propertySignature",
384
329
  "key": {
385
330
  "type": "identifier",
386
- "name": "startTime"
331
+ "name": "icon"
387
332
  },
388
333
  "annotation": {
389
- "type": "keyword",
390
- "value": "number"
334
+ "type": "reference",
335
+ "typeName": {
336
+ "type": "identifier",
337
+ "name": "GeneralIconProps"
338
+ }
391
339
  },
340
+ "optional": true,
392
341
  "computed": false
393
342
  },
394
343
  {
395
344
  "type": "propertySignature",
396
345
  "key": {
397
346
  "type": "identifier",
398
- "name": "state"
347
+ "name": "server"
399
348
  },
400
349
  "annotation": {
401
350
  "type": "reference",
402
351
  "typeName": {
403
352
  "type": "identifier",
404
- "name": "TaskState"
353
+ "name": "McpServer"
405
354
  }
406
355
  },
407
- "optional": true,
408
356
  "computed": false
409
357
  }
410
358
  ]
411
359
  },
412
360
  {
413
361
  "type": "interface",
414
- "name": "ActionClickDetail",
362
+ "name": "McpServer",
415
363
  "body": [
416
364
  {
417
365
  "type": "propertySignature",
418
366
  "key": {
419
367
  "type": "identifier",
420
- "name": "action"
368
+ "name": "id"
421
369
  },
422
370
  "annotation": {
423
- "type": "reference",
424
- "typeName": {
425
- "type": "identifier",
426
- "name": "SimpleActionType"
427
- }
371
+ "type": "keyword",
372
+ "value": "string"
428
373
  },
429
374
  "computed": false
430
375
  },
@@ -432,14 +377,11 @@
432
377
  "type": "propertySignature",
433
378
  "key": {
434
379
  "type": "identifier",
435
- "name": "item"
380
+ "name": "name"
436
381
  },
437
382
  "annotation": {
438
- "type": "reference",
439
- "typeName": {
440
- "type": "identifier",
441
- "name": "HistoryItem"
442
- }
383
+ "type": "keyword",
384
+ "value": "string"
443
385
  },
444
386
  "computed": false
445
387
  }
@@ -542,130 +484,6 @@
542
484
  }
543
485
  ]
544
486
  },
545
- "ai-portal.mcp-tools": {
546
- "properties": [
547
- {
548
- "name": "list",
549
- "annotation": {
550
- "type": "array",
551
- "elementType": {
552
- "type": "reference",
553
- "typeName": {
554
- "type": "identifier",
555
- "name": "McpTool"
556
- }
557
- }
558
- }
559
- }
560
- ],
561
- "events": [],
562
- "methods": [],
563
- "types": [
564
- {
565
- "type": "interface",
566
- "name": "McpTool",
567
- "body": [
568
- {
569
- "type": "propertySignature",
570
- "key": {
571
- "type": "identifier",
572
- "name": "name"
573
- },
574
- "annotation": {
575
- "type": "keyword",
576
- "value": "string"
577
- },
578
- "computed": false
579
- },
580
- {
581
- "type": "propertySignature",
582
- "key": {
583
- "type": "identifier",
584
- "name": "title"
585
- },
586
- "annotation": {
587
- "type": "keyword",
588
- "value": "string"
589
- },
590
- "computed": false
591
- },
592
- {
593
- "type": "propertySignature",
594
- "key": {
595
- "type": "identifier",
596
- "name": "description"
597
- },
598
- "annotation": {
599
- "type": "keyword",
600
- "value": "string"
601
- },
602
- "computed": false
603
- },
604
- {
605
- "type": "propertySignature",
606
- "key": {
607
- "type": "identifier",
608
- "name": "icon"
609
- },
610
- "annotation": {
611
- "type": "reference",
612
- "typeName": {
613
- "type": "identifier",
614
- "name": "GeneralIconProps"
615
- }
616
- },
617
- "optional": true,
618
- "computed": false
619
- },
620
- {
621
- "type": "propertySignature",
622
- "key": {
623
- "type": "identifier",
624
- "name": "server"
625
- },
626
- "annotation": {
627
- "type": "reference",
628
- "typeName": {
629
- "type": "identifier",
630
- "name": "McpServer"
631
- }
632
- },
633
- "computed": false
634
- }
635
- ]
636
- },
637
- {
638
- "type": "interface",
639
- "name": "McpServer",
640
- "body": [
641
- {
642
- "type": "propertySignature",
643
- "key": {
644
- "type": "identifier",
645
- "name": "id"
646
- },
647
- "annotation": {
648
- "type": "keyword",
649
- "value": "string"
650
- },
651
- "computed": false
652
- },
653
- {
654
- "type": "propertySignature",
655
- "key": {
656
- "type": "identifier",
657
- "name": "name"
658
- },
659
- "annotation": {
660
- "type": "keyword",
661
- "value": "string"
662
- },
663
- "computed": false
664
- }
665
- ]
666
- }
667
- ]
668
- },
669
487
  "ai-portal.elevo-sidebar": {
670
488
  "properties": [
671
489
  {
@@ -756,7 +574,21 @@
756
574
  }
757
575
  }
758
576
  ],
759
- "methods": [],
577
+ "methods": [
578
+ {
579
+ "name": "pullHistory",
580
+ "params": [
581
+ {
582
+ "name": "delay",
583
+ "annotation": {
584
+ "type": "keyword",
585
+ "value": "number"
586
+ }
587
+ }
588
+ ],
589
+ "returns": {}
590
+ }
591
+ ],
760
592
  "types": [
761
593
  {
762
594
  "type": "interface",
@@ -854,6 +686,188 @@
854
686
  }
855
687
  ]
856
688
  },
689
+ "ai-portal.chat-history": {
690
+ "properties": [
691
+ {
692
+ "name": "list",
693
+ "annotation": {
694
+ "type": "array",
695
+ "elementType": {
696
+ "type": "reference",
697
+ "typeName": {
698
+ "type": "identifier",
699
+ "name": "HistoryItem"
700
+ }
701
+ }
702
+ }
703
+ },
704
+ {
705
+ "name": "actions",
706
+ "annotation": {
707
+ "type": "array",
708
+ "elementType": {
709
+ "type": "reference",
710
+ "typeName": {
711
+ "type": "identifier",
712
+ "name": "ActionType"
713
+ }
714
+ }
715
+ }
716
+ },
717
+ {
718
+ "name": "nextToken",
719
+ "annotation": {
720
+ "type": "keyword",
721
+ "value": "string"
722
+ }
723
+ }
724
+ ],
725
+ "events": [
726
+ {
727
+ "name": "action.click",
728
+ "detail": {
729
+ "annotation": {
730
+ "type": "reference",
731
+ "typeName": {
732
+ "type": "identifier",
733
+ "name": "ActionClickDetail"
734
+ }
735
+ }
736
+ }
737
+ },
738
+ {
739
+ "name": "load.more",
740
+ "detail": {
741
+ "annotation": {
742
+ "type": "typeLiteral",
743
+ "members": [
744
+ {
745
+ "type": "propertySignature",
746
+ "key": {
747
+ "type": "identifier",
748
+ "name": "nextToken"
749
+ },
750
+ "annotation": {
751
+ "type": "keyword",
752
+ "value": "string"
753
+ },
754
+ "computed": false
755
+ }
756
+ ]
757
+ }
758
+ }
759
+ }
760
+ ],
761
+ "methods": [],
762
+ "types": [
763
+ {
764
+ "type": "interface",
765
+ "name": "HistoryItem",
766
+ "body": [
767
+ {
768
+ "type": "propertySignature",
769
+ "key": {
770
+ "type": "identifier",
771
+ "name": "id"
772
+ },
773
+ "annotation": {
774
+ "type": "keyword",
775
+ "value": "string"
776
+ },
777
+ "computed": false
778
+ },
779
+ {
780
+ "type": "propertySignature",
781
+ "key": {
782
+ "type": "identifier",
783
+ "name": "url"
784
+ },
785
+ "annotation": {
786
+ "type": "keyword",
787
+ "value": "string"
788
+ },
789
+ "computed": false
790
+ },
791
+ {
792
+ "type": "propertySignature",
793
+ "key": {
794
+ "type": "identifier",
795
+ "name": "title"
796
+ },
797
+ "annotation": {
798
+ "type": "keyword",
799
+ "value": "string"
800
+ },
801
+ "computed": false
802
+ },
803
+ {
804
+ "type": "propertySignature",
805
+ "key": {
806
+ "type": "identifier",
807
+ "name": "startTime"
808
+ },
809
+ "annotation": {
810
+ "type": "keyword",
811
+ "value": "number"
812
+ },
813
+ "computed": false
814
+ },
815
+ {
816
+ "type": "propertySignature",
817
+ "key": {
818
+ "type": "identifier",
819
+ "name": "state"
820
+ },
821
+ "annotation": {
822
+ "type": "reference",
823
+ "typeName": {
824
+ "type": "identifier",
825
+ "name": "TaskState"
826
+ }
827
+ },
828
+ "optional": true,
829
+ "computed": false
830
+ }
831
+ ]
832
+ },
833
+ {
834
+ "type": "interface",
835
+ "name": "ActionClickDetail",
836
+ "body": [
837
+ {
838
+ "type": "propertySignature",
839
+ "key": {
840
+ "type": "identifier",
841
+ "name": "action"
842
+ },
843
+ "annotation": {
844
+ "type": "reference",
845
+ "typeName": {
846
+ "type": "identifier",
847
+ "name": "SimpleActionType"
848
+ }
849
+ },
850
+ "computed": false
851
+ },
852
+ {
853
+ "type": "propertySignature",
854
+ "key": {
855
+ "type": "identifier",
856
+ "name": "item"
857
+ },
858
+ "annotation": {
859
+ "type": "reference",
860
+ "typeName": {
861
+ "type": "identifier",
862
+ "name": "HistoryItem"
863
+ }
864
+ },
865
+ "computed": false
866
+ }
867
+ ]
868
+ }
869
+ ]
870
+ },
857
871
  "ai-portal.cruise-canvas": {
858
872
  "properties": [
859
873
  {
@@ -22,4 +22,8 @@ export interface ChatHistoryProps {
22
22
  onActionClick: (detail: ActionClickDetail) => void;
23
23
  onHistoryClick: () => void;
24
24
  }
25
- export declare function ChatHistory({ activeId, actions, urlTemplate, onActionClick, onHistoryClick, }: ChatHistoryProps): React.JSX.Element;
25
+ export interface ChatHistoryRef {
26
+ pull: () => void;
27
+ }
28
+ export declare const ChatHistory: React.ForwardRefExoticComponent<ChatHistoryProps & React.RefAttributes<ChatHistoryRef>>;
29
+ export declare function LegacyChatHistory({ activeId, actions, urlTemplate, onActionClick, onHistoryClick, }: ChatHistoryProps, ref: React.Ref<ChatHistoryRef>): React.JSX.Element;
@@ -23,5 +23,9 @@ export declare class ElevoSidebar extends ReactNextElement implements ElevoSideb
23
23
  accessor historyActiveId: string | undefined;
24
24
  accessor historyUrlTemplate: string | undefined;
25
25
  accessor historyActions: ActionType[] | undefined;
26
+ /**
27
+ * @param delay Delay in milliseconds before pulling the latest chat history.
28
+ */
29
+ pullHistory(delay: number): void;
26
30
  render(): React.JSX.Element;
27
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.20.13",
3
+ "version": "0.20.14",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,5 +45,5 @@
45
45
  "@next-bricks/mini-chart": "*",
46
46
  "@next-bricks/presentational": "*"
47
47
  },
48
- "gitHead": "2b62abf943cf63cfed5fff7d0b2bc7a6ac02719f"
48
+ "gitHead": "c1ff4cb88c1975237e7d9bc18c7c0b4ca4d82b31"
49
49
  }