@next-bricks/ai-portal 0.38.1 → 0.39.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 (30) hide show
  1. package/dist/bricks.json +29 -15
  2. package/dist/chunks/1004.2c74661c.js +2 -0
  3. package/dist/chunks/1004.2c74661c.js.map +1 -0
  4. package/dist/chunks/{main.e20d5ad9.js → main.0d29ea95.js} +2 -2
  5. package/dist/chunks/{main.e20d5ad9.js.map → main.0d29ea95.js.map} +1 -1
  6. package/dist/chunks/project-conversations.8ea09318.js +3 -0
  7. package/dist/chunks/project-conversations.8ea09318.js.LICENSE.txt +5 -0
  8. package/dist/chunks/project-conversations.8ea09318.js.map +1 -0
  9. package/dist/chunks/project-knowledges.bbbed4a6.js +3 -0
  10. package/dist/chunks/project-knowledges.bbbed4a6.js.LICENSE.txt +5 -0
  11. package/dist/chunks/project-knowledges.bbbed4a6.js.map +1 -0
  12. package/dist/examples.json +14 -8
  13. package/dist/index.0ead77e3.js +2 -0
  14. package/dist/index.0ead77e3.js.map +1 -0
  15. package/dist/manifest.json +178 -110
  16. package/dist/types.json +327 -12
  17. package/dist-types/bootstrap.d.ts +2 -0
  18. package/dist-types/project-conversations/i18n.d.ts +15 -0
  19. package/dist-types/project-conversations/index.d.ts +30 -0
  20. package/dist-types/project-conversations/index.spec.d.ts +1 -0
  21. package/dist-types/project-knowledges/i18n.d.ts +15 -0
  22. package/dist-types/project-knowledges/index.d.ts +29 -0
  23. package/dist-types/project-knowledges/index.spec.d.ts +1 -0
  24. package/docs/project-conversations.md +25 -0
  25. package/docs/project-knowledges.md +24 -0
  26. package/package.json +2 -2
  27. package/dist/chunks/9981.fc6a1b64.js +0 -2
  28. package/dist/chunks/9981.fc6a1b64.js.map +0 -1
  29. package/dist/index.d30def34.js +0 -2
  30. package/dist/index.d30def34.js.map +0 -1
package/dist/types.json CHANGED
@@ -536,42 +536,150 @@
536
536
  }
537
537
  ]
538
538
  },
539
- "ai-portal.chat-box": {
539
+ "ai-portal.project-knowledges": {
540
540
  "properties": [
541
541
  {
542
- "name": "disabled",
542
+ "name": "list",
543
543
  "annotation": {
544
- "type": "keyword",
545
- "value": "boolean"
544
+ "type": "array",
545
+ "elementType": {
546
+ "type": "reference",
547
+ "typeName": {
548
+ "type": "identifier",
549
+ "name": "Knowledge"
550
+ }
551
+ }
546
552
  }
547
553
  },
548
554
  {
549
- "name": "placeholder",
555
+ "name": "urlTemplate",
550
556
  "annotation": {
551
557
  "type": "keyword",
552
558
  "value": "string"
553
559
  }
554
560
  },
555
561
  {
556
- "name": "autoFocus",
562
+ "name": "actions",
557
563
  "annotation": {
558
- "type": "keyword",
559
- "value": "boolean"
564
+ "type": "array",
565
+ "elementType": {
566
+ "type": "reference",
567
+ "typeName": {
568
+ "type": "identifier",
569
+ "name": "ActionType"
570
+ }
571
+ }
560
572
  }
561
573
  }
562
574
  ],
563
575
  "events": [
564
576
  {
565
- "name": "message.submit",
577
+ "name": "action.click",
566
578
  "detail": {
567
579
  "annotation": {
568
- "type": "keyword",
569
- "value": "string"
580
+ "type": "reference",
581
+ "typeName": {
582
+ "type": "identifier",
583
+ "name": "ActionClickDetail"
584
+ }
570
585
  }
571
586
  }
572
587
  }
573
588
  ],
574
- "methods": []
589
+ "methods": [],
590
+ "types": [
591
+ {
592
+ "type": "interface",
593
+ "name": "Knowledge",
594
+ "body": [
595
+ {
596
+ "type": "propertySignature",
597
+ "key": {
598
+ "type": "identifier",
599
+ "name": "knowledgeId"
600
+ },
601
+ "annotation": {
602
+ "type": "keyword",
603
+ "value": "string"
604
+ },
605
+ "computed": false
606
+ },
607
+ {
608
+ "type": "propertySignature",
609
+ "key": {
610
+ "type": "identifier",
611
+ "name": "title"
612
+ },
613
+ "annotation": {
614
+ "type": "keyword",
615
+ "value": "string"
616
+ },
617
+ "computed": false
618
+ },
619
+ {
620
+ "type": "propertySignature",
621
+ "key": {
622
+ "type": "identifier",
623
+ "name": "time"
624
+ },
625
+ "annotation": {
626
+ "type": "keyword",
627
+ "value": "number"
628
+ },
629
+ "computed": false
630
+ },
631
+ {
632
+ "type": "propertySignature",
633
+ "key": {
634
+ "type": "identifier",
635
+ "name": "description"
636
+ },
637
+ "annotation": {
638
+ "type": "keyword",
639
+ "value": "string"
640
+ },
641
+ "optional": true,
642
+ "computed": false
643
+ }
644
+ ]
645
+ },
646
+ {
647
+ "type": "interface",
648
+ "name": "ActionClickDetail",
649
+ "body": [
650
+ {
651
+ "type": "propertySignature",
652
+ "key": {
653
+ "type": "identifier",
654
+ "name": "action"
655
+ },
656
+ "annotation": {
657
+ "type": "reference",
658
+ "typeName": {
659
+ "type": "identifier",
660
+ "name": "SimpleActionType"
661
+ }
662
+ },
663
+ "computed": false
664
+ },
665
+ {
666
+ "type": "propertySignature",
667
+ "key": {
668
+ "type": "identifier",
669
+ "name": "item"
670
+ },
671
+ "annotation": {
672
+ "type": "reference",
673
+ "typeName": {
674
+ "type": "identifier",
675
+ "name": "Knowledge"
676
+ }
677
+ },
678
+ "computed": false
679
+ }
680
+ ]
681
+ }
682
+ ]
575
683
  },
576
684
  "ai-portal.show-cases": {
577
685
  "properties": [
@@ -1230,6 +1338,43 @@
1230
1338
  }
1231
1339
  ]
1232
1340
  },
1341
+ "ai-portal.chat-box": {
1342
+ "properties": [
1343
+ {
1344
+ "name": "disabled",
1345
+ "annotation": {
1346
+ "type": "keyword",
1347
+ "value": "boolean"
1348
+ }
1349
+ },
1350
+ {
1351
+ "name": "placeholder",
1352
+ "annotation": {
1353
+ "type": "keyword",
1354
+ "value": "string"
1355
+ }
1356
+ },
1357
+ {
1358
+ "name": "autoFocus",
1359
+ "annotation": {
1360
+ "type": "keyword",
1361
+ "value": "boolean"
1362
+ }
1363
+ }
1364
+ ],
1365
+ "events": [
1366
+ {
1367
+ "name": "message.submit",
1368
+ "detail": {
1369
+ "annotation": {
1370
+ "type": "keyword",
1371
+ "value": "string"
1372
+ }
1373
+ }
1374
+ }
1375
+ ],
1376
+ "methods": []
1377
+ },
1233
1378
  "ai-portal.preview-container": {
1234
1379
  "properties": [
1235
1380
  {
@@ -1365,6 +1510,176 @@
1365
1510
  }
1366
1511
  ]
1367
1512
  },
1513
+ "ai-portal.project-conversations": {
1514
+ "properties": [
1515
+ {
1516
+ "name": "list",
1517
+ "annotation": {
1518
+ "type": "array",
1519
+ "elementType": {
1520
+ "type": "reference",
1521
+ "typeName": {
1522
+ "type": "identifier",
1523
+ "name": "Conversation"
1524
+ }
1525
+ }
1526
+ }
1527
+ },
1528
+ {
1529
+ "name": "urlTemplate",
1530
+ "annotation": {
1531
+ "type": "keyword",
1532
+ "value": "string"
1533
+ }
1534
+ },
1535
+ {
1536
+ "name": "actions",
1537
+ "annotation": {
1538
+ "type": "array",
1539
+ "elementType": {
1540
+ "type": "reference",
1541
+ "typeName": {
1542
+ "type": "identifier",
1543
+ "name": "ActionType"
1544
+ }
1545
+ }
1546
+ }
1547
+ }
1548
+ ],
1549
+ "events": [
1550
+ {
1551
+ "name": "goal.click",
1552
+ "detail": {
1553
+ "annotation": {
1554
+ "type": "reference",
1555
+ "typeName": {
1556
+ "type": "identifier",
1557
+ "name": "Conversation"
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1562
+ {
1563
+ "name": "action.click",
1564
+ "detail": {
1565
+ "annotation": {
1566
+ "type": "reference",
1567
+ "typeName": {
1568
+ "type": "identifier",
1569
+ "name": "ActionClickDetail"
1570
+ }
1571
+ }
1572
+ }
1573
+ }
1574
+ ],
1575
+ "methods": [],
1576
+ "types": [
1577
+ {
1578
+ "type": "interface",
1579
+ "name": "Conversation",
1580
+ "body": [
1581
+ {
1582
+ "type": "propertySignature",
1583
+ "key": {
1584
+ "type": "identifier",
1585
+ "name": "conversationId"
1586
+ },
1587
+ "annotation": {
1588
+ "type": "keyword",
1589
+ "value": "string"
1590
+ },
1591
+ "computed": false
1592
+ },
1593
+ {
1594
+ "type": "propertySignature",
1595
+ "key": {
1596
+ "type": "identifier",
1597
+ "name": "title"
1598
+ },
1599
+ "annotation": {
1600
+ "type": "keyword",
1601
+ "value": "string"
1602
+ },
1603
+ "computed": false
1604
+ },
1605
+ {
1606
+ "type": "propertySignature",
1607
+ "key": {
1608
+ "type": "identifier",
1609
+ "name": "startTime"
1610
+ },
1611
+ "annotation": {
1612
+ "type": "keyword",
1613
+ "value": "number"
1614
+ },
1615
+ "computed": false
1616
+ },
1617
+ {
1618
+ "type": "propertySignature",
1619
+ "key": {
1620
+ "type": "identifier",
1621
+ "name": "description"
1622
+ },
1623
+ "annotation": {
1624
+ "type": "keyword",
1625
+ "value": "string"
1626
+ },
1627
+ "optional": true,
1628
+ "computed": false
1629
+ },
1630
+ {
1631
+ "type": "propertySignature",
1632
+ "key": {
1633
+ "type": "identifier",
1634
+ "name": "goal"
1635
+ },
1636
+ "annotation": {
1637
+ "type": "keyword",
1638
+ "value": "string"
1639
+ },
1640
+ "optional": true,
1641
+ "computed": false
1642
+ }
1643
+ ]
1644
+ },
1645
+ {
1646
+ "type": "interface",
1647
+ "name": "ActionClickDetail",
1648
+ "body": [
1649
+ {
1650
+ "type": "propertySignature",
1651
+ "key": {
1652
+ "type": "identifier",
1653
+ "name": "action"
1654
+ },
1655
+ "annotation": {
1656
+ "type": "reference",
1657
+ "typeName": {
1658
+ "type": "identifier",
1659
+ "name": "SimpleActionType"
1660
+ }
1661
+ },
1662
+ "computed": false
1663
+ },
1664
+ {
1665
+ "type": "propertySignature",
1666
+ "key": {
1667
+ "type": "identifier",
1668
+ "name": "item"
1669
+ },
1670
+ "annotation": {
1671
+ "type": "reference",
1672
+ "typeName": {
1673
+ "type": "identifier",
1674
+ "name": "Conversation"
1675
+ }
1676
+ },
1677
+ "computed": false
1678
+ }
1679
+ ]
1680
+ }
1681
+ ]
1682
+ },
1368
1683
  "ai-portal.elevo-sidebar": {
1369
1684
  "properties": [
1370
1685
  {
@@ -19,3 +19,5 @@ import "./data-providers/entity-sdk-get.js";
19
19
  import "./preview-container/index.js";
20
20
  import "./action-buttons/index.js";
21
21
  import "./goal-card-list/index.js";
22
+ import "./project-conversations/index.js";
23
+ import "./project-knowledges/index.js";
@@ -0,0 +1,15 @@
1
+ export declare enum K {
2
+ PROJECT_OVERALL = "PROJECT_OVERALL"
3
+ }
4
+ export declare const NS = "bricks/ai-portal/project-conversations";
5
+ export declare const locales: {
6
+ en: Locale;
7
+ zh: Locale;
8
+ };
9
+ export declare const t: any;
10
+ type Locale = {
11
+ [k in K]: string;
12
+ } & {
13
+ [k in K as `${k}_plural`]?: string;
14
+ };
15
+ export {};
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { ReactNextElement } from "@next-core/react-element";
3
+ import "@next-core/theme";
4
+ import type { ActionType, SimpleActionType } from "@next-bricks/basic/mini-actions";
5
+ export interface ProjectConversationsProps {
6
+ list?: Conversation[];
7
+ urlTemplate?: string;
8
+ actions?: ActionType[];
9
+ }
10
+ export interface Conversation {
11
+ conversationId: string;
12
+ title: string;
13
+ startTime: number;
14
+ description?: string;
15
+ goal?: string;
16
+ }
17
+ export interface ActionClickDetail {
18
+ action: SimpleActionType;
19
+ item: Conversation;
20
+ }
21
+ /**
22
+ * 构件 `ai-portal.project-conversations`
23
+ */
24
+ export declare class ProjectConversations extends ReactNextElement implements ProjectConversationsProps {
25
+ #private;
26
+ accessor list: Conversation[] | undefined;
27
+ accessor urlTemplate: string | undefined;
28
+ accessor actions: ActionType[] | undefined;
29
+ render(): React.JSX.Element;
30
+ }
@@ -0,0 +1 @@
1
+ import "./";
@@ -0,0 +1,15 @@
1
+ export declare enum K {
2
+ PROJECT_OVERALL = "PROJECT_OVERALL"
3
+ }
4
+ export declare const NS = "bricks/ai-portal/project-knowledges";
5
+ export declare const locales: {
6
+ en: Locale;
7
+ zh: Locale;
8
+ };
9
+ export declare const t: any;
10
+ type Locale = {
11
+ [k in K]: string;
12
+ } & {
13
+ [k in K as `${k}_plural`]?: string;
14
+ };
15
+ export {};
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { ReactNextElement } from "@next-core/react-element";
3
+ import "@next-core/theme";
4
+ import type { ActionType, SimpleActionType } from "@next-bricks/basic/mini-actions";
5
+ export interface ProjectKnowledgesProps {
6
+ list?: Knowledge[];
7
+ urlTemplate?: string;
8
+ actions?: ActionType[];
9
+ }
10
+ export interface Knowledge {
11
+ knowledgeId: string;
12
+ title: string;
13
+ time: number;
14
+ description?: string;
15
+ }
16
+ export interface ActionClickDetail {
17
+ action: SimpleActionType;
18
+ item: Knowledge;
19
+ }
20
+ /**
21
+ * 构件 `ai-portal.project-knowledges`
22
+ */
23
+ export declare class ProjectKnowledges extends ReactNextElement implements ProjectKnowledgesProps {
24
+ #private;
25
+ accessor list: Knowledge[] | undefined;
26
+ accessor urlTemplate: string | undefined;
27
+ accessor actions: ActionType[] | undefined;
28
+ render(): React.JSX.Element;
29
+ }
@@ -0,0 +1 @@
1
+ import "./";
@@ -0,0 +1,25 @@
1
+ 构件 `ai-portal.project-conversations`
2
+
3
+ ## Examples
4
+
5
+ ### Basic
6
+
7
+ ```yaml preview
8
+ brick: ai-portal.project-conversations
9
+ properties:
10
+ list:
11
+ - conversationId: "conv-a"
12
+ title: 标题一
13
+ description: 这是一段描述
14
+ startTime: 1757904096
15
+ goal: GOAL0005
16
+ - conversationId: "conv-b"
17
+ title: 标题二
18
+ startTime: 1757863597
19
+ ```
20
+
21
+ ### Loading
22
+
23
+ ```yaml preview
24
+ brick: ai-portal.project-conversations
25
+ ```
@@ -0,0 +1,24 @@
1
+ 构件 `ai-portal.project-knowledges`
2
+
3
+ ## Examples
4
+
5
+ ### Basic
6
+
7
+ ```yaml preview
8
+ brick: ai-portal.project-knowledges
9
+ properties:
10
+ list:
11
+ - knowledgeId: "knowledge-a"
12
+ title: 标题一
13
+ description: 这是一段描述
14
+ time: 1757904096
15
+ - knowledgeId: "knowledge-b"
16
+ title: 标题二
17
+ time: 1757863597
18
+ ```
19
+
20
+ ### Loading
21
+
22
+ ```yaml preview
23
+ brick: ai-portal.project-knowledges
24
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.38.1",
3
+ "version": "0.39.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "@next-bricks/presentational": "*",
49
49
  "@next-bricks/vs": "*"
50
50
  },
51
- "gitHead": "b8caa1037a67a128ed1776188ab2d6ea58f5bdc0"
51
+ "gitHead": "84f18bc78f8f819c09f5796d9fd56103b61cbadf"
52
52
  }