@next-bricks/ai-portal 0.43.1 → 0.44.1

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 (135) hide show
  1. package/dist/bricks.json +19 -19
  2. package/dist/chunks/103.8b767f50.js +3 -0
  3. package/dist/chunks/103.8b767f50.js.map +1 -0
  4. package/dist/chunks/1306.56ebf388.js +3 -0
  5. package/dist/chunks/{3689.2a3f6d8c.js.LICENSE.txt → 1306.56ebf388.js.LICENSE.txt} +0 -2
  6. package/dist/chunks/1306.56ebf388.js.map +1 -0
  7. package/dist/chunks/{9828.6afc1a0f.js → 3971.8fbc97d3.js} +2 -3
  8. package/dist/chunks/3971.8fbc97d3.js.map +1 -0
  9. package/dist/chunks/495.27e0d477.js +2 -0
  10. package/dist/chunks/495.27e0d477.js.map +1 -0
  11. package/dist/chunks/7954.a92311a2.js +2 -0
  12. package/dist/chunks/7954.a92311a2.js.map +1 -0
  13. package/dist/chunks/9146.40d628b8.js +2 -0
  14. package/dist/chunks/9146.40d628b8.js.map +1 -0
  15. package/dist/chunks/chat-box.0e8ed3b2.js +2 -0
  16. package/dist/chunks/chat-box.0e8ed3b2.js.map +1 -0
  17. package/dist/chunks/chat-input.2bf76ff7.js +3 -0
  18. package/dist/chunks/chat-input.2bf76ff7.js.map +1 -0
  19. package/dist/chunks/chat-stream.40fc8941.js +2 -0
  20. package/dist/chunks/chat-stream.40fc8941.js.map +1 -0
  21. package/dist/chunks/cruise-canvas.f9ae5c01.js +2 -0
  22. package/dist/chunks/cruise-canvas.f9ae5c01.js.map +1 -0
  23. package/dist/chunks/elevo-sidebar.6f74b954.js +3 -0
  24. package/dist/chunks/elevo-sidebar.6f74b954.js.LICENSE.txt +9 -0
  25. package/dist/chunks/elevo-sidebar.6f74b954.js.map +1 -0
  26. package/dist/chunks/goal-card-list.2ab94b5f.js +3 -0
  27. package/dist/chunks/{goal-card-list.fcce68bd.js.map → goal-card-list.2ab94b5f.js.map} +1 -1
  28. package/dist/chunks/main.3ee2ddf3.js +2 -0
  29. package/dist/chunks/main.3ee2ddf3.js.map +1 -0
  30. package/dist/examples.json +10 -13
  31. package/dist/index.b8ca0997.js +2 -0
  32. package/dist/index.b8ca0997.js.map +1 -0
  33. package/dist/manifest.json +116 -140
  34. package/dist/types.json +432 -1442
  35. package/dist-types/chat-stream/Aside/Aside.d.ts +1 -1
  36. package/dist-types/chat-stream/AssistantMessage/AssistantMessage.d.ts +1 -2
  37. package/dist-types/chat-stream/NodeJob/NodeJob.d.ts +1 -2
  38. package/dist-types/chat-stream/NodeView/NodeView.d.ts +1 -1
  39. package/dist-types/chat-stream/i18n.d.ts +0 -1
  40. package/dist-types/chat-stream/index.d.ts +0 -2
  41. package/dist-types/chat-stream/interfaces.d.ts +1 -1
  42. package/dist-types/chat-stream/useConversationStream.d.ts +2 -2
  43. package/dist-types/cruise-canvas/CanvasContext.d.ts +2 -1
  44. package/dist-types/cruise-canvas/FileList/FileList.d.ts +1 -1
  45. package/dist-types/cruise-canvas/FilePreview/FilePreview.d.ts +1 -1
  46. package/dist-types/cruise-canvas/Nav/Nav.d.ts +2 -2
  47. package/dist-types/cruise-canvas/NodeJob/NodeJob.d.ts +1 -1
  48. package/dist-types/cruise-canvas/NodeReplay/NodeReplay.d.ts +2 -1
  49. package/dist-types/cruise-canvas/NodeView/NodeView.d.ts +1 -1
  50. package/dist-types/cruise-canvas/ToolCallDetail/ToolCallDetail.d.ts +1 -1
  51. package/dist-types/cruise-canvas/ToolCallStatus/ToolCallStatus.d.ts +1 -1
  52. package/dist-types/cruise-canvas/ToolProgressLine/ToolProgressLine.d.ts +1 -1
  53. package/dist-types/cruise-canvas/getFlatOrderedJobs.d.ts +3 -2
  54. package/dist-types/cruise-canvas/i18n.d.ts +0 -11
  55. package/dist-types/cruise-canvas/index.d.ts +0 -7
  56. package/dist-types/cruise-canvas/interfaces.d.ts +1 -99
  57. package/dist-types/cruise-canvas/reducers/errors.d.ts +4 -0
  58. package/dist-types/cruise-canvas/reducers/interfaces.d.ts +2 -2
  59. package/dist-types/cruise-canvas/useConversationDetail.d.ts +1 -1
  60. package/dist-types/cruise-canvas/useConversationGraph.d.ts +2 -2
  61. package/dist-types/cruise-canvas/useLayout.d.ts +1 -2
  62. package/dist-types/cruise-canvas/utils/getToolDataProgress.d.ts +1 -1
  63. package/dist-types/elevo-sidebar/ChatHistory.d.ts +2 -2
  64. package/dist-types/elevo-sidebar/index.d.ts +0 -4
  65. package/dist-types/shared/ChatBox/ChatBox.d.ts +1 -2
  66. package/dist-types/shared/CreatedView/CreatedView.d.ts +1 -1
  67. package/dist-types/shared/TaskContext.d.ts +2 -2
  68. package/dist-types/shared/constants.d.ts +3 -4
  69. package/dist-types/shared/interfaces.d.ts +4 -0
  70. package/package.json +2 -3
  71. package/dist/chunks/3689.2a3f6d8c.js +0 -3
  72. package/dist/chunks/3689.2a3f6d8c.js.map +0 -1
  73. package/dist/chunks/453.657c389e.js +0 -2
  74. package/dist/chunks/453.657c389e.js.map +0 -1
  75. package/dist/chunks/6754.a5405189.js +0 -2
  76. package/dist/chunks/6754.a5405189.js.map +0 -1
  77. package/dist/chunks/9535.ff0f82a1.js +0 -3
  78. package/dist/chunks/9535.ff0f82a1.js.map +0 -1
  79. package/dist/chunks/98.9cf438cf.js +0 -2
  80. package/dist/chunks/98.9cf438cf.js.map +0 -1
  81. package/dist/chunks/9828.6afc1a0f.js.LICENSE.txt +0 -1
  82. package/dist/chunks/9828.6afc1a0f.js.map +0 -1
  83. package/dist/chunks/9965.9f32c070.js +0 -2
  84. package/dist/chunks/9965.9f32c070.js.map +0 -1
  85. package/dist/chunks/chat-box.864bf43b.js +0 -2
  86. package/dist/chunks/chat-box.864bf43b.js.map +0 -1
  87. package/dist/chunks/chat-input.679aec70.js +0 -3
  88. package/dist/chunks/chat-input.679aec70.js.map +0 -1
  89. package/dist/chunks/chat-stream.fe9bdede.js +0 -2
  90. package/dist/chunks/chat-stream.fe9bdede.js.map +0 -1
  91. package/dist/chunks/cruise-canvas.22d578c0.js +0 -2
  92. package/dist/chunks/cruise-canvas.22d578c0.js.map +0 -1
  93. package/dist/chunks/elevo-sidebar.08b20757.js +0 -3
  94. package/dist/chunks/elevo-sidebar.08b20757.js.map +0 -1
  95. package/dist/chunks/goal-card-list.fcce68bd.js +0 -3
  96. package/dist/chunks/goal-card-list.fcce68bd.js.LICENSE.txt +0 -5
  97. package/dist/chunks/main.bfbc8871.js +0 -2
  98. package/dist/chunks/main.bfbc8871.js.map +0 -1
  99. package/dist/index.07b86656.js +0 -2
  100. package/dist/index.07b86656.js.map +0 -1
  101. package/dist-types/chat-stream/HumanAdjustPlanResult/HumanAdjustPlanResult.d.ts +0 -5
  102. package/dist-types/chat-stream/LegacyChatStream.d.ts +0 -13
  103. package/dist-types/chat-stream/useTaskStream.d.ts +0 -6
  104. package/dist-types/cruise-canvas/AlertEvents/AlertEvents.d.ts +0 -13
  105. package/dist-types/cruise-canvas/DeploymentChanges/DeploymentChanges.d.ts +0 -12
  106. package/dist-types/cruise-canvas/HumanAdjustPlanResult/HumanAdjustPlanResult.d.ts +0 -5
  107. package/dist-types/cruise-canvas/HumanConfirm/HumanConfirm.d.ts +0 -5
  108. package/dist-types/cruise-canvas/LegacyCruiseCanvas.d.ts +0 -20
  109. package/dist-types/cruise-canvas/PlanProgress/PlanProgress.d.ts +0 -7
  110. package/dist-types/cruise-canvas/ReplayToolbar/ReplayToolbar.d.ts +0 -7
  111. package/dist-types/cruise-canvas/Topology/Topology.d.ts +0 -7
  112. package/dist-types/cruise-canvas/TraceList/TraceList.d.ts +0 -13
  113. package/dist-types/cruise-canvas/cmdb.d.ts +0 -14
  114. package/dist-types/cruise-canvas/diagram.d.ts +0 -3
  115. package/dist-types/cruise-canvas/legacy-reducers/error.d.ts +0 -3
  116. package/dist-types/cruise-canvas/legacy-reducers/error.spec.d.ts +0 -1
  117. package/dist-types/cruise-canvas/legacy-reducers/index.d.ts +0 -3
  118. package/dist-types/cruise-canvas/legacy-reducers/interfaces.d.ts +0 -15
  119. package/dist-types/cruise-canvas/legacy-reducers/jobs.d.ts +0 -4
  120. package/dist-types/cruise-canvas/legacy-reducers/jobs.spec.d.ts +0 -1
  121. package/dist-types/cruise-canvas/legacy-reducers/task.d.ts +0 -4
  122. package/dist-types/cruise-canvas/legacy-reducers/task.spec.d.ts +0 -1
  123. package/dist-types/cruise-canvas/reducers/error.d.ts +0 -3
  124. package/dist-types/cruise-canvas/reducers/error.spec.d.ts +0 -1
  125. package/dist-types/cruise-canvas/useTaskDetail.d.ts +0 -9
  126. package/dist-types/cruise-canvas/useTaskGraph.d.ts +0 -11
  127. package/dist-types/elevo-sidebar/LegacyChatHistory.d.ts +0 -24
  128. package/dist-types/shared/HumanAdjustPlan/HumanAdjustPlan.d.ts +0 -5
  129. package/dist-types/shared/HumanAdjustPlan/i18n.d.ts +0 -17
  130. package/dist-types/shared/ReplayToolbar/ReplayToolbar.d.ts +0 -7
  131. package/dist-types/shared/ReplayToolbar/i18n.d.ts +0 -18
  132. package/docs/cruise-canvas.md +0 -366
  133. /package/dist/chunks/{9535.ff0f82a1.js.LICENSE.txt → 103.8b767f50.js.LICENSE.txt} +0 -0
  134. /package/dist/chunks/{chat-input.679aec70.js.LICENSE.txt → chat-input.2bf76ff7.js.LICENSE.txt} +0 -0
  135. /package/dist/chunks/{elevo-sidebar.08b20757.js.LICENSE.txt → goal-card-list.2ab94b5f.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { Job } from "../../cruise-canvas/interfaces";
2
+ import type { Job } from "../../shared/interfaces";
3
3
  export interface AsideProps {
4
4
  job: Job;
5
5
  }
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import type { Job, TaskState } from "../../cruise-canvas/interfaces.js";
3
- import type { ConversationState } from "../../shared/interfaces.js";
2
+ import type { ConversationState, Job, TaskState } from "../../shared/interfaces.js";
4
3
  export interface AssistantMessageProps {
5
4
  jobs: Job[];
6
5
  taskState: TaskState | ConversationState | undefined;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import type { Job, TaskState } from "../../cruise-canvas/interfaces.js";
3
- import type { ConversationState } from "../../shared/interfaces.js";
2
+ import type { ConversationState, Job, TaskState } from "../../shared/interfaces.js";
4
3
  export interface NodeJobProps {
5
4
  job: Job;
6
5
  taskState: TaskState | ConversationState | undefined;
@@ -1,4 +1,4 @@
1
- import type { Job } from "../../cruise-canvas/interfaces";
1
+ import type { Job } from "../../shared/interfaces";
2
2
  export interface NodeViewProps {
3
3
  job: Job;
4
4
  }
@@ -1,5 +1,4 @@
1
1
  export declare enum K {
2
- CONFIRMING_PLAN_TIPS = "CONFIRMING_PLAN_TIPS",
3
2
  SWITCH_TO_CANVAS = "SWITCH_TO_CANVAS"
4
3
  }
5
4
  export declare const NS = "bricks/ai-portal/chat-stream";
@@ -5,7 +5,6 @@ import type { ExampleProject, RequestStore, ShowCaseType } from "../shared/inter
5
5
  export interface ChatStreamProps {
6
6
  conversationId?: string;
7
7
  initialRequest?: RequestStore | null;
8
- taskId?: string;
9
8
  replay?: boolean;
10
9
  replayDelay?: number;
11
10
  supports?: Record<string, boolean>;
@@ -30,7 +29,6 @@ export declare class ChatStream extends ReactNextElement implements ChatStreamPr
30
29
  accessor conversationId: string | undefined;
31
30
  /** 初始请求数据。仅初始设置有效。 */
32
31
  accessor initialRequest: RequestStore | undefined | null;
33
- accessor taskId: string | undefined;
34
32
  /** 是否启用回放。仅初始设置有效。 */
35
33
  accessor replay: boolean | undefined;
36
34
  /**
@@ -1,4 +1,4 @@
1
- import type { Job } from "../cruise-canvas/interfaces.js";
1
+ import type { Job } from "../shared/interfaces.js";
2
2
  export type ChatMessage = MessageFromUser | MessageFromAssistant;
3
3
  export interface MessageFromUser {
4
4
  role: "user";
@@ -1,6 +1,6 @@
1
1
  import type { ChatMessage } from "./interfaces.js";
2
- import type { ConversationBaseDetail, Task } from "../shared/interfaces.js";
3
- export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], error: string | null | undefined, options?: {
2
+ import type { ConversationBaseDetail, ConversationError, Task } from "../shared/interfaces.js";
3
+ export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], errors: ConversationError[], options?: {
4
4
  showHumanActions?: boolean;
5
5
  }): {
6
6
  messages: never[];
@@ -1,5 +1,6 @@
1
1
  import { type Dispatch } from "react";
2
- import type { FileInfo, SizeTuple } from "./interfaces";
2
+ import type { SizeTuple } from "./interfaces";
3
+ import type { FileInfo } from "../shared/interfaces";
3
4
  export interface CanvasContextValue {
4
5
  onNodeResize: (id: string, size: SizeTuple | null) => void;
5
6
  setActiveNodeId: Dispatch<React.SetStateAction<string | null>>;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { FileInfo } from "../interfaces";
2
+ import type { FileInfo } from "../../shared/interfaces";
3
3
  export interface FileListProps {
4
4
  files: FileInfo[];
5
5
  large?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { FileInfo } from "../interfaces";
2
+ import type { FileInfo } from "../../shared/interfaces";
3
3
  export interface FilePreviewProps {
4
4
  file: FileInfo;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { GraphNavItem, Job, Step, TaskState } from "../interfaces";
3
- import type { ConversationState } from "../../shared/interfaces";
2
+ import type { GraphNavItem, Step } from "../interfaces";
3
+ import type { ConversationState, Job, TaskState } from "../../shared/interfaces";
4
4
  export interface NavProps {
5
5
  nav: GraphNavItem[] | undefined;
6
6
  plan: Step[] | undefined;
@@ -1,4 +1,4 @@
1
- import type { Job, JobState } from "../interfaces";
1
+ import { Job, JobState } from "../../shared/interfaces";
2
2
  export interface NodeJobProps {
3
3
  job: Job;
4
4
  state?: JobState;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  export interface NodeReplayProps {
3
3
  finished?: boolean;
4
+ ui?: "chat" | "canvas";
4
5
  }
5
- export declare function NodeReplay({ finished }: NodeReplayProps): React.JSX.Element;
6
+ export declare function NodeReplay({ finished, ui }: NodeReplayProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Job } from "../interfaces";
1
+ import type { Job } from "../../shared/interfaces";
2
2
  export interface NodeViewProps {
3
3
  job: Job;
4
4
  active?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Job } from "../interfaces";
1
+ import type { Job } from "../../shared/interfaces";
2
2
  export interface ToolCallDetailProps {
3
3
  job: Job;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { Job } from "../interfaces";
1
+ import type { Job } from "../../shared/interfaces";
2
2
  export interface NodeJobToolCallProps {
3
3
  job: Job;
4
4
  variant?: "default" | "read-only";
@@ -1,4 +1,4 @@
1
- import { DataPart } from "../interfaces";
1
+ import { DataPart } from "../../shared/interfaces";
2
2
  export interface ToolProgressLineProps {
3
3
  progress: DataPart;
4
4
  /**
@@ -1,5 +1,5 @@
1
- import type { Task, Job } from "../shared/interfaces";
2
- export declare function getFlatOrderedJobs(tasks: Task[] | null | undefined, options?: {
1
+ import type { Task, Job, ConversationError } from "../shared/interfaces";
2
+ export declare function getFlatOrderedJobs(tasks: Task[] | null | undefined, errors: ConversationError[], options?: {
3
3
  showHiddenJobs?: boolean;
4
4
  }): {
5
5
  list: string[];
@@ -7,4 +7,5 @@ export declare function getFlatOrderedJobs(tasks: Task[] | null | undefined, opt
7
7
  roots: string[];
8
8
  levels: Map<string, number>;
9
9
  downstreamMap: Map<string, string[]>;
10
+ jobsWithFollowingErrors: Map<string, string>;
10
11
  };
@@ -1,28 +1,17 @@
1
1
  export declare enum K {
2
2
  YES = "YES",
3
3
  NO = "NO",
4
- PLAN_COMPLETED = "PLAN_COMPLETED",
5
4
  TASK_COMPLETED = "TASK_COMPLETED",
6
5
  SHARE = "SHARE",
7
6
  TYPE_YOUR_MESSAGE_HERE = "TYPE_YOUR_MESSAGE_HERE",
8
7
  ARGUMENTS = "ARGUMENTS",
9
8
  PROCESS = "PROCESS",
10
9
  RESPONSE = "RESPONSE",
11
- CONFIRMING_PLAN_TIPS = "CONFIRMING_PLAN_TIPS",
12
- PAUSE_THE_TASK = "PAUSE_THE_TASK",
13
- RESUME_THE_TASK = "RESUME_THE_TASK",
14
- TERMINATE_THE_TASK = "TERMINATE_THE_TASK",
15
- CONFIRM_TO_TERMINATE_THE_TASK_TITLE = "CONFIRM_TO_TERMINATE_THE_TASK_TITLE",
16
- CONFIRM_TO_TERMINATE_THE_TASK_CONTENT = "CONFIRM_TO_TERMINATE_THE_TASK_CONTENT",
17
10
  SWITCH_TO_CHAT = "SWITCH_TO_CHAT",
18
11
  BACK_TO_CENTER = "BACK_TO_CENTER",
19
12
  ZOOM_IN = "ZOOM_IN",
20
13
  ZOOM_OUT = "ZOOM_OUT",
21
14
  FULLSCREEN = "FULLSCREEN",
22
- REPLAYING = "REPLAYING",
23
- REPLAY_COMPLETED = "REPLAY_COMPLETED",
24
- SKIP_TO_RESULTS = "SKIP_TO_RESULTS",
25
- WATCH_AGAIN = "WATCH_AGAIN",
26
15
  SEND_MESSAGE = "SEND_MESSAGE",
27
16
  UNTITLED = "UNTITLED",
28
17
  FILE_PREVIEW_UNPREVIEWABLE_TIP_PREFIX = "FILE_PREVIEW_UNPREVIEWABLE_TIP_PREFIX",
@@ -1,14 +1,10 @@
1
1
  import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
- import type { Job, TaskBaseDetail } from "./interfaces.js";
5
4
  import type { ExampleProject, RequestStore, ShowCaseType } from "../shared/interfaces.js";
6
5
  export interface CruiseCanvasProps {
7
6
  conversationId?: string;
8
7
  initialRequest?: RequestStore | null;
9
- taskId?: string;
10
- task?: TaskBaseDetail;
11
- jobs?: Job[];
12
8
  replay?: boolean;
13
9
  replayDelay?: number;
14
10
  supports?: Record<string, boolean>;
@@ -35,9 +31,6 @@ export declare class CruiseCanvas extends ReactNextElement implements CruiseCanv
35
31
  accessor conversationId: string | undefined;
36
32
  /** 初始请求数据。仅初始设置有效。 */
37
33
  accessor initialRequest: RequestStore | undefined | null;
38
- accessor taskId: string | undefined;
39
- accessor task: TaskBaseDetail | undefined;
40
- accessor jobs: Job[] | undefined;
41
34
  /** 是否启用回放。仅初始设置有效。 */
42
35
  accessor replay: boolean | undefined;
43
36
  /**
@@ -1,5 +1,5 @@
1
1
  import type { JSONSchema } from "./json-schema";
2
- import type { GeneratedView, HumanAction } from "../shared/interfaces";
2
+ import type { GeneratedView, Job, JobState } from "../shared/interfaces";
3
3
  export type RangeTuple = [min: number, max: number];
4
4
  export type SizeTuple = [width: number, height: number];
5
5
  export interface NodePosition {
@@ -64,108 +64,10 @@ export interface NodeRect extends NodePosition {
64
64
  export interface Edge {
65
65
  points: NodePosition[];
66
66
  }
67
- export type TaskBaseDetail = Omit<Task, "jobs">;
68
- export interface Task {
69
- id: string;
70
- title: string;
71
- requirement: string;
72
- state: TaskState;
73
- plan: Step[];
74
- jobs: Job[];
75
- startTime: number;
76
- endTime?: number;
77
- aiEmployeeId?: string;
78
- }
79
67
  export interface Step {
80
68
  id: string;
81
69
  instruction: string;
82
70
  }
83
- export interface StepWithState extends Step {
84
- state?: JobState;
85
- }
86
- export interface Job {
87
- id: string;
88
- upstream?: string[];
89
- parent?: string;
90
- instruction?: string;
91
- state: JobState;
92
- toolCall?: ToolCall;
93
- messages?: Message[];
94
- isError?: boolean;
95
- hidden?: boolean;
96
- startTime: number;
97
- endTime?: number;
98
- generatedView?: GeneratedView;
99
- level?: number;
100
- requestHumanAction?: HumanAction;
101
- humanAction?: string;
102
- aiEmployeeId?: string;
103
- }
104
- export interface TaskPatch extends Omit<Partial<Task>, "jobs"> {
105
- jobs?: JobPatch[];
106
- error?: string;
107
- time?: number;
108
- }
109
- export interface JobPatch extends Partial<Job> {
110
- id: string;
111
- }
112
- export type BaseState = "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "unknown";
113
- export type JobState = BaseState | "skipped";
114
- export type TaskState = JobState | "paused" | "confirming-plan";
115
- export interface Message {
116
- role: string;
117
- parts: Part[];
118
- }
119
- export type Part = TextPart | FilePart | DataPart;
120
- export interface TextPart {
121
- type: "text";
122
- text: string;
123
- }
124
- export interface FilePart {
125
- type: "file";
126
- file: FileInfo;
127
- }
128
- export interface FileInfo {
129
- name?: string;
130
- mimeType?: string;
131
- size?: number;
132
- bytes?: string;
133
- uri?: string;
134
- }
135
- export interface DataPart {
136
- type: "data";
137
- data: Record<string, any>;
138
- }
139
- export interface ToolCall {
140
- name: string;
141
- arguments?: Record<string, unknown>;
142
- argumentsParseFailed?: boolean;
143
- argumentsParseError?: unknown;
144
- originalArguments?: string;
145
- annotations?: {
146
- title?: string;
147
- };
148
- }
149
- export interface RawComponentGraphNode {
150
- id: string;
151
- name: string;
152
- description?: string;
153
- status?: "trouble" | "ok";
154
- children?: string[];
155
- }
156
- export interface ComponentGraph {
157
- initial: boolean;
158
- nodes: ComponentGraphNode[];
159
- edges: ComponentGraphEdge[];
160
- }
161
- export interface ComponentGraphNode {
162
- type: "node";
163
- id: string;
164
- data: RawComponentGraphNode;
165
- }
166
- export interface ComponentGraphEdge extends GraphEdge {
167
- type: "edge";
168
- }
169
71
  export interface GraphNavItem {
170
72
  id: string;
171
73
  title: string;
@@ -0,0 +1,4 @@
1
+ import type { Reducer } from "react";
2
+ import type { CruiseCanvasAction } from "./interfaces";
3
+ import type { ConversationError } from "../../shared/interfaces";
4
+ export declare const errors: Reducer<ConversationError[], CruiseCanvasAction>;
@@ -1,8 +1,8 @@
1
- import type { ConversationBaseDetail, ConversationPatch, Task } from "../../shared/interfaces";
1
+ import type { ConversationBaseDetail, ConversationPatch, ConversationError, Task } from "../../shared/interfaces";
2
2
  export interface CruiseCanvasState {
3
3
  conversation: ConversationBaseDetail | null;
4
4
  tasks: Task[];
5
- error: string | null;
5
+ errors: ConversationError[];
6
6
  }
7
7
  export type CruiseCanvasAction = ConversationSSEAction | ConversationResetAction | ConversationFinishedAction;
8
8
  export interface ConversationSSEAction {
@@ -2,7 +2,7 @@ import type { RequestStore } from "../shared/interfaces";
2
2
  export declare function useConversationDetail(conversationId: string, initialRequest?: RequestStore | null, replay?: boolean, replayDelay?: number): {
3
3
  conversation: import("../shared/interfaces").ConversationBaseDetail | null;
4
4
  tasks: import("../shared/interfaces").Task[];
5
- error: string | null;
5
+ errors: import("../shared/interfaces").ConversationError[];
6
6
  humanInputRef: React.MutableRefObject<((jobId: string, input: string | null, action?: string) => void) | undefined>;
7
7
  skipToResults: () => void;
8
8
  watchAgain: () => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import type { GraphEdge, GraphNode, GraphNavItem, GraphGeneratedView } from "./interfaces";
2
- import type { ConversationBaseDetail, Task } from "../shared/interfaces";
3
- export declare function useConversationGraph(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], options?: {
2
+ import type { ConversationBaseDetail, ConversationError, Task } from "../shared/interfaces";
3
+ export declare function useConversationGraph(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], errors: ConversationError[], options?: {
4
4
  showHiddenJobs?: boolean;
5
5
  showHumanActions?: boolean;
6
6
  }): {
@@ -6,12 +6,11 @@ export interface UseLayoutOptions {
6
6
  completed?: boolean;
7
7
  failed?: boolean;
8
8
  finished?: boolean;
9
- error?: string | null;
10
9
  showFeedback?: boolean;
11
10
  showFeedbackAfterFailed?: boolean;
12
11
  replay?: boolean;
13
12
  }
14
- export declare function useLayout({ rawNodes: _rawNodes, rawEdges: _rawEdges, sizeMap, completed, failed, finished, error, showFeedback, showFeedbackAfterFailed, replay, }: UseLayoutOptions): {
13
+ export declare function useLayout({ rawNodes: _rawNodes, rawEdges: _rawEdges, sizeMap, completed, failed, finished, showFeedback, showFeedbackAfterFailed, replay, }: UseLayoutOptions): {
15
14
  sizeReady: boolean;
16
15
  nodes: GraphNode[];
17
16
  edges: {
@@ -1,2 +1,2 @@
1
- import type { DataPart, Message } from "../interfaces";
1
+ import type { DataPart, Message } from "../../shared/interfaces";
2
2
  export declare const getToolDataProgress: (toolCallMessages: Message[] | undefined) => DataPart | undefined;
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
2
  import type { ActionType, SimpleActionType } from "@next-bricks/basic/mini-actions";
3
- import type { TaskState } from "../cruise-canvas/interfaces.js";
3
+ import type { ConversationState } from "../shared/interfaces.js";
4
4
  export interface HistoryItem {
5
5
  conversationId: string;
6
6
  title: string;
7
7
  startTime: number;
8
- state?: TaskState;
8
+ state?: ConversationState;
9
9
  }
10
10
  export interface GroupedHistory {
11
11
  title: string;
@@ -5,8 +5,6 @@ import type { ActionType } from "@next-bricks/basic/mini-actions";
5
5
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
6
6
  import { type Project } from "./ChatHistory.js";
7
7
  export interface ElevoSidebarProps {
8
- /** @deprecated */
9
- legacy?: boolean;
10
8
  userInstanceId?: string;
11
9
  behavior?: "default" | "drawer";
12
10
  bordered?: boolean;
@@ -31,8 +29,6 @@ export interface SidebarLink {
31
29
  */
32
30
  export declare class ElevoSidebar extends ReactNextElement implements ElevoSidebarProps {
33
31
  #private;
34
- /** @deprecated */
35
- accessor legacy: boolean;
36
32
  accessor userInstanceId: string | undefined;
37
33
  accessor behavior: "default" | "drawer" | undefined;
38
34
  accessor bordered: boolean | undefined;
@@ -1,7 +1,6 @@
1
- import type { TaskState } from "../../cruise-canvas/interfaces";
2
1
  import type { ConversationState } from "../interfaces";
3
2
  export interface ChatBoxProps {
4
- state: TaskState | ConversationState | undefined;
3
+ state: ConversationState | undefined;
5
4
  canChat: boolean;
6
5
  }
7
6
  export declare function ChatBox({ state, canChat }: ChatBoxProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Job } from "../../cruise-canvas/interfaces";
1
+ import type { Job } from "../../shared/interfaces";
2
2
  export interface CreatedViewProps {
3
3
  job: Job;
4
4
  onSizeChange?: (size: "medium" | "large") => void;
@@ -1,6 +1,6 @@
1
1
  import { type Dispatch } from "react";
2
- import type { FeedbackDetail, Job } from "../cruise-canvas/interfaces";
3
- import type { ExampleProject, GeneratedView, ShowCaseType } from "./interfaces";
2
+ import type { FeedbackDetail } from "../cruise-canvas/interfaces";
3
+ import type { ExampleProject, GeneratedView, Job, ShowCaseType } from "./interfaces";
4
4
  export interface TaskContextValue {
5
5
  conversationId?: string;
6
6
  workspace?: string;
@@ -1,8 +1,7 @@
1
1
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
2
- import type { TaskState as LegacyTaskState } from "../cruise-canvas/interfaces.js";
3
- import type { ConversationState, TaskState } from "./interfaces.js";
4
- export declare const DONE_STATES: (ConversationState | TaskState | LegacyTaskState | undefined)[];
5
- export declare const GENERAL_DONE_STATES: (ConversationState | TaskState | LegacyTaskState | undefined)[];
2
+ import type { ConversationState, JobState, TaskState } from "./interfaces.js";
3
+ export declare const DONE_STATES: (ConversationState | TaskState | JobState | undefined)[];
4
+ export declare const GENERAL_DONE_STATES: (ConversationState | TaskState | JobState | undefined)[];
6
5
  export declare const NON_WORKING_STATES: (string | undefined)[];
7
6
  export declare const ICON_CLOSE: GeneralIconProps;
8
7
  export declare const ICON_LOADING: GeneralIconProps;
@@ -124,3 +124,7 @@ export interface ExampleProject {
124
124
  name: string;
125
125
  url?: string;
126
126
  }
127
+ export interface ConversationError {
128
+ jobs: string[];
129
+ error?: string;
130
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.43.1",
3
+ "version": "0.44.1",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,11 +42,10 @@
42
42
  "@next-bricks/advanced": "*",
43
43
  "@next-bricks/basic": "*",
44
44
  "@next-bricks/containers": "*",
45
- "@next-bricks/diagram": "*",
46
45
  "@next-bricks/form": "*",
47
46
  "@next-bricks/mini-chart": "*",
48
47
  "@next-bricks/presentational": "*",
49
48
  "@next-bricks/vs": "*"
50
49
  },
51
- "gitHead": "c62cf3d52e35c3fd5eb2c5dde432697e5f61602a"
50
+ "gitHead": "3c07969e6212213385dd56cb52f938c180233936"
52
51
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3689.2a3f6d8c.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[3689],{26785:(e,t,i)=>{i.d(t,{Y:()=>f});var a=i(89575),n=i(18769),o=i.n(n),r=i(21302),l=i.n(r),s=i(53373),c=i.n(s),d=i(57372);const p=async(e,t)=>(await d.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data;var m=i(41030),u=i(99671),g=i(42965),h=i(97907),E=i(98343);const f=(0,n.forwardRef)(b);function b(e,t){let{activeId:i,actions:r,urlTemplate:s,onActionClick:d,onHistoryClick:f}=e;const b=(0,n.useRef)(null),[v,x]=(0,n.useState)(null),[y,k]=(0,n.useState)(),[w,T]=(0,n.useState)();(0,n.useEffect)((()=>{Promise.all([p({next_token:w},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;x((e=>[...null!=e?e:[],...t.data])),k(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[w]);const A=(0,n.useMemo)((()=>{const e=new Map,t=l()(),i=t.clone().startOf("day"),a=i.clone().subtract(1,"day"),n=i.clone().subtract(7,"days"),o=i.clone().subtract(30,"days"),r=+i/1e3,s=+a/1e3,c=+n/1e3,d=+o/1e3,p=+t.clone().startOf("year")/1e3;for(const t of null!=v?v:[]){let i;i=t.startTime>=r?(0,u.t)(u.K.TODAY):t.startTime>=s?(0,u.t)(u.K.YESTERDAY):t.startTime>=c?(0,u.t)(u.K.PREVIOUS_7_DAYS):t.startTime>=d?(0,u.t)(u.K.PREVIOUS_30_DAYS):t.startTime>=p?l()(1e3*t.startTime).format("MMMM"):l()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[v]),[O,_]=(0,n.useState)(null),N=(0,n.useRef)(null);(0,n.useEffect)((()=>{const e=N.current,t=b.current;if(!e||!y||!t)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&T(y)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[y]);const S=(0,n.useRef)(0),C=(0,n.useCallback)((async()=>{try{const e=++S.current,t=await p({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==S.current)return;x((e=>{const i=null!=e?e:[],a=t.data,n=new Set(a.map((e=>e.id))),o=new Map(a.map((e=>[e.id,e])));let r=!1,l=!1,s=!0;for(const e of i){const t=o.get(e.id);if(!t)break;if(r=!0,l=s&&t!==a[0]||!(0,m.isEqual)(t,e),l)break;s=!1}return r?l?[...a,...i.filter((e=>!n.has(e.id)))]:e:(k(t.next_token),a)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,n.useImperativeHandle)(t,(()=>({pull:C})),[C]),v?o().createElement("div",{className:"history",ref:b},o().createElement("ul",null,A.map((e=>o().createElement("li",{key:e.title,className:"group"},o().createElement("div",{className:"group-title"},e.title),o().createElement("ul",{className:"items"},e.items.map((e=>o().createElement("li",{key:e.id},o().createElement(g.EM,(0,a.A)({className:c()("item",{"actions-active":e.id===O,active:e.id===i}),onClick:f},s?{url:(0,E.Q)(s,e)}:null),o().createElement("div",{className:"item-title",title:e.title},e.title),o().createElement(g.qu,{className:"actions",actions:r,onActionClick:t=>{d({action:t.detail,item:e})},onVisibleChange:t=>{_(t.detail?e.id:null)}}),!h.QB.includes(e.state)&&o().createElement("div",{className:"working"})))))))))),y&&o().createElement("div",{className:"load-more",ref:N},o().createElement(g.Bj,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):o().createElement("div",{className:"history"},o().createElement("div",{className:"loading"},o().createElement(g.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}},42965:(e,t,i)=>{i.d(t,{Bj:()=>n,EM:()=>o,JQ:()=>l,Py:()=>c,qb:()=>r,qu:()=>s});var a=i(11280);const n=(0,a.wrapBrick)("eo-icon"),o=(0,a.wrapBrick)("eo-link"),r=(0,a.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),l=(0,a.wrapBrick)("eo-easyops-avatar"),s=(0,a.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),c=(0,a.wrapBrick)("ai-portal.icon-button")},45646:(e,t,i)=>{i.d(t,{D:()=>E});var a=i(89575),n=i(18769),o=i.n(n),r=i(53373),l=i.n(r),s=i(57372);const c=async(e,t)=>(await s.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var d=i(41030),p=i(99671),m=i(42965),u=i(97907),g=i(98343);const h={lib:"fa",icon:"plus"},E=(0,n.forwardRef)(f);function f(e,t){let{historyActiveId:i,historyActions:r,historyUrlTemplate:E,projectActiveId:f,projectUrlTemplate:b,projectActions:v,onActionClick:x,onHistoryClick:y,onProjectActionClick:k,onAddProject:w}=e;const T=(0,n.useRef)(null),[A,O]=(0,n.useState)(null),[_,N]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[I,R]=(0,n.useState)(null),[P,Y]=(0,n.useState)(!1),[U,D]=(0,n.useState)(),[j,M]=(0,n.useState)(),[B,V]=(0,n.useState)(!1),L=(0,n.useRef)(!0),[H,J]=(0,n.useState)([]),q=(0,n.useMemo)((()=>[...null!=r?r:[],{isDropdown:!0,text:(0,p.t)(p.K.MOVE_TO_PROJECT),disabled:!(null!=A&&A.length),items:null==A?void 0:A.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[r,A]);(0,n.useEffect)((()=>{(async()=>{try{const e=await(async()=>(await s.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();O(e.list)}catch(e){console.error("Error loading projects:",e),C(!0),O([])}})()}),[]),(0,n.useEffect)((()=>{Promise.all([c({token:j,limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...L.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;L.current=!1,R((e=>[...null!=e?e:[],...t.conversations])),D(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),R([]),V(!0)}))}),[j]);const[z,G]=(0,n.useState)(null),K=(0,n.useRef)(null);(0,n.useEffect)((()=>{const e=K.current,t=T.current;if(!e||!U||!t||P)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&M(U)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[U,P]);const W=(0,n.useRef)(0),Q=(0,n.useCallback)((async()=>{try{const e=++W.current,t=await c({limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==W.current)return;R((e=>{const i=null!=e?e:[],a=t.conversations,n=new Set(a.map((e=>e.conversationId))),o=new Map(a.map((e=>[e.conversationId,e])));let r=!1,l=!1,s=!0;for(const e of i){const t=o.get(e.conversationId);if(!t)break;if(r=!0,l=s&&t!==a[0]||!(0,d.isEqual)(t,e),l)break;s=!1}return r?l?[...a,...i.filter((e=>!n.has(e.conversationId)))]:e:(D(t.nextToken),a)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);(0,n.useImperativeHandle)(t,(()=>({pull:Q,removeProject:e=>{O((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{O((t=>t?[...t,e]:[e]))},moveConversation:e=>{J((t=>[...t,e]))}})),[Q]);const F=(0,n.useMemo)((()=>I&&I.length?I.filter((e=>!H.includes(e.conversationId))):I),[I,H]);return o().createElement("div",{className:"history",ref:T},o().createElement("div",{className:l()("section",{collapsed:_})},o().createElement("div",{className:"section-title"},o().createElement("div",{className:"section-label",onClick:()=>N((e=>!e))},(0,p.t)(p.K.PROJECTS),o().createElement(m.Bj,{lib:"fa",icon:"angle-down"})),o().createElement(m.Py,{icon:h,variant:"mini-light",tooltip:(0,p.t)(p.K.CREATE_PROJECT),onClick:w})),o().createElement("ul",{className:"items"},S?o().createElement("li",{className:"error"},"Failed to load project"):A?A.map((e=>o().createElement("li",{key:e.instanceId},o().createElement(m.EM,(0,a.A)({className:l()("item",{"actions-active":e.instanceId===z,active:e.instanceId===f}),onClick:y},b?{url:(0,g.Q)(b,e)}:null),o().createElement("div",{className:"item-title",title:e.name},e.name||(0,p.t)(p.K.UNNAMED)),o().createElement(m.qu,{className:"actions",actions:v,onActionClick:t=>{k({action:t.detail,project:e})},onVisibleChange:t=>{G(t.detail?e.instanceId:null)}}))))):o().createElement("li",{className:"loading"},o().createElement(m.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),o().createElement("div",{className:l()("section",{collapsed:P})},o().createElement("div",{className:"section-title"},o().createElement("div",{className:"section-label",onClick:()=>Y((e=>!e))},(0,p.t)(p.K.HISTORY),o().createElement(m.Bj,{lib:"fa",icon:"angle-down"}))),o().createElement("ul",{className:"items"},F?F.map((e=>o().createElement("li",{key:e.conversationId},o().createElement(m.EM,(0,a.A)({className:l()("item",{"actions-active":e.conversationId===z,active:e.conversationId===i}),onClick:y},E?{url:(0,g.Q)(E,e)}:null),o().createElement("div",{className:"item-title",title:e.title},e.title||(0,p.t)(p.K.UNTITLED)),o().createElement(m.qu,{className:"actions",actions:q,onActionClick:t=>{x({action:t.detail,item:e})},onVisibleChange:t=>{G(t.detail?e.conversationId:null)}}),!u.QB.includes(e.state)&&o().createElement("div",{className:"working"}))))):o().createElement("li",{className:"loading"},o().createElement(m.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),B?o().createElement("li",{className:"error"},"Failed to load chat history"):null),!P&&U&&o().createElement("div",{className:"load-more",ref:K},o().createElement(m.Bj,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}},61408:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),o=i(40935),r=i.n(o)()(n());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const l=r.toString()},99671:(e,t,i)=>{i.d(t,{I:()=>s,K:()=>n,NS:()=>l,t:()=>c});var a=i(87117);let n=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e.UNTITLED="UNTITLED",e.UNNAMED="UNNAMED",e}({});const o={[n.NEW_CHAT]:"New chat",[n.LOGOUT]:"Logout",[n.TODAY]:"Today",[n.YESTERDAY]:"Yesterday",[n.PREVIOUS_7_DAYS]:"Previous 7 days",[n.PREVIOUS_30_DAYS]:"Previous 30 days",[n.SWITCH_LANGUAGE]:"中文",[n.PROJECTS]:"Project management",[n.HISTORY]:"Chat history",[n.CREATE_PROJECT]:"Create project",[n.MOVE_TO_PROJECT]:"Move to project",[n.UNTITLED]:"Untitled",[n.UNNAMED]:"Unnamed"},r={[n.NEW_CHAT]:"新对话",[n.LOGOUT]:"登出",[n.TODAY]:"今天",[n.YESTERDAY]:"昨天",[n.PREVIOUS_7_DAYS]:"过去7天",[n.PREVIOUS_30_DAYS]:"过去30天",[n.SWITCH_LANGUAGE]:"English",[n.PROJECTS]:"项目管理",[n.HISTORY]:"历史对话",[n.CREATE_PROJECT]:"创建项目",[n.MOVE_TO_PROJECT]:"移动到项目",[n.UNTITLED]:"无标题",[n.UNNAMED]:"未命名"},l="bricks/ai-portal/elevo-sidebar",s={en:o,zh:r},c=a.i18n.getFixedT(null,l)}}]);
3
- //# sourceMappingURL=3689.2a3f6d8c.js.map