@next-bricks/ai-portal 0.42.0 → 0.43.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.
- package/dist/bricks.json +27 -20
- package/dist/chunks/6754.7bcec0be.js +2 -0
- package/dist/chunks/6754.7bcec0be.js.map +1 -0
- package/dist/chunks/7493.76f316f5.js +2 -0
- package/dist/chunks/7493.76f316f5.js.map +1 -0
- package/dist/chunks/7520.3cec74b9.js +2 -0
- package/dist/chunks/7520.3cec74b9.js.map +1 -0
- package/dist/chunks/9965.6e6bda17.js +2 -0
- package/dist/chunks/9965.6e6bda17.js.map +1 -0
- package/dist/chunks/chat-box.864bf43b.js +2 -0
- package/dist/chunks/chat-box.864bf43b.js.map +1 -0
- package/dist/chunks/chat-stream.9c05bfdd.js +2 -0
- package/dist/chunks/chat-stream.9c05bfdd.js.map +1 -0
- package/dist/chunks/cruise-canvas.259aabf0.js +2 -0
- package/dist/chunks/cruise-canvas.259aabf0.js.map +1 -0
- package/dist/chunks/main.68f962c7.js +2 -0
- package/dist/chunks/{main.40e44ee2.js.map → main.68f962c7.js.map} +1 -1
- package/dist/chunks/show-case.2e705d81.js +2 -0
- package/dist/chunks/show-case.2e705d81.js.map +1 -0
- package/dist/chunks/show-cases.b26fafd9.js +2 -0
- package/dist/chunks/show-cases.b26fafd9.js.map +1 -0
- package/dist/examples.json +17 -14
- package/dist/images/3e0f6758.png +0 -0
- package/dist/images/69cf3ae2.png +0 -0
- package/dist/images/b567cca3.png +0 -0
- package/dist/images/e15a6988.png +0 -0
- package/dist/index.7be70cad.js +2 -0
- package/dist/index.7be70cad.js.map +1 -0
- package/dist/manifest.json +188 -148
- package/dist/types.json +550 -347
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/chat-stream/ChatStream.d.ts +1 -1
- package/dist-types/chat-stream/index.d.ts +2 -0
- package/dist-types/chat-stream/useConversationStream.d.ts +3 -1
- package/dist-types/cruise-canvas/CruiseCanvas.d.ts +1 -1
- package/dist-types/cruise-canvas/NodeEnd/NodeEnd.d.ts +1 -4
- package/dist-types/cruise-canvas/NodeReplay/NodeReplay.d.ts +5 -0
- package/dist-types/cruise-canvas/NodeReplay/i18n.d.ts +24 -0
- package/dist-types/cruise-canvas/constants.d.ts +1 -0
- package/dist-types/cruise-canvas/index.d.ts +9 -1
- package/dist-types/cruise-canvas/interfaces.d.ts +6 -1
- package/dist-types/cruise-canvas/reducers/interfaces.d.ts +4 -1
- package/dist-types/cruise-canvas/useConversationGraph.d.ts +1 -0
- package/dist-types/cruise-canvas/useLayout.d.ts +3 -1
- package/dist-types/shared/TaskContext.d.ts +8 -1
- package/dist-types/shared/bricks.d.ts +2 -0
- package/dist-types/shared/interfaces.d.ts +15 -0
- package/dist-types/show-case/i18n.d.ts +15 -0
- package/dist-types/show-case/index.d.ts +17 -0
- package/dist-types/show-case/index.spec.d.ts +1 -0
- package/dist-types/show-cases/index.d.ts +3 -11
- package/docs/show-case.md +13 -0
- package/docs/show-cases.md +9 -1
- package/package.json +2 -2
- package/dist/chunks/453.e2767a6d.js +0 -2
- package/dist/chunks/453.e2767a6d.js.map +0 -1
- package/dist/chunks/6754.9dfa5269.js +0 -2
- package/dist/chunks/6754.9dfa5269.js.map +0 -1
- package/dist/chunks/7493.6f9d9ca0.js +0 -2
- package/dist/chunks/7493.6f9d9ca0.js.map +0 -1
- package/dist/chunks/9749.cfb84a2f.js +0 -2
- package/dist/chunks/9749.cfb84a2f.js.map +0 -1
- package/dist/chunks/chat-box.4f6d3704.js +0 -2
- package/dist/chunks/chat-box.4f6d3704.js.map +0 -1
- package/dist/chunks/chat-stream.a2e40a99.js +0 -2
- package/dist/chunks/chat-stream.a2e40a99.js.map +0 -1
- package/dist/chunks/cruise-canvas.77318b42.js +0 -2
- package/dist/chunks/cruise-canvas.77318b42.js.map +0 -1
- package/dist/chunks/main.40e44ee2.js +0 -2
- package/dist/chunks/show-cases.5d37311e.js +0 -2
- package/dist/chunks/show-cases.5d37311e.js.map +0 -1
- package/dist/index.ad4c133a.js +0 -2
- package/dist/index.ad4c133a.js.map +0 -1
|
@@ -10,5 +10,5 @@ interface ChatStreamComponentProps extends ChatStreamProps {
|
|
|
10
10
|
onFeedbackOnView: (viewId: string) => void;
|
|
11
11
|
onDetailChange: (detail: ConversationDetail) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare function ChatStreamComponent({ conversationId, initialRequest, replay, replayDelay, supports, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToCanvas, onFeedbackOnView, onDetailChange, }: ChatStreamComponentProps, ref: React.Ref<ChatStreamRef>): React.JSX.Element;
|
|
13
|
+
export declare function ChatStreamComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHumanActions, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToCanvas, onFeedbackOnView, onDetailChange, }: ChatStreamComponentProps, ref: React.Ref<ChatStreamRef>): React.JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -9,6 +9,7 @@ export interface ChatStreamProps {
|
|
|
9
9
|
replay?: boolean;
|
|
10
10
|
replayDelay?: number;
|
|
11
11
|
supports?: Record<string, boolean>;
|
|
12
|
+
showHumanActions?: boolean;
|
|
12
13
|
showFeedback?: boolean;
|
|
13
14
|
showFeedbackAfterFailed?: boolean;
|
|
14
15
|
showFeedbackOnView?: boolean;
|
|
@@ -36,6 +37,7 @@ export declare class ChatStream extends ReactNextElement implements ChatStreamPr
|
|
|
36
37
|
*/
|
|
37
38
|
accessor replayDelay: number | undefined;
|
|
38
39
|
accessor supports: Record<string, boolean> | undefined;
|
|
40
|
+
accessor showHumanActions: boolean | undefined;
|
|
39
41
|
accessor showFeedback: boolean | undefined;
|
|
40
42
|
accessor showFeedbackAfterFailed: boolean | undefined;
|
|
41
43
|
accessor showFeedbackOnView: boolean | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ChatMessage } from "./interfaces.js";
|
|
2
2
|
import type { ConversationBaseDetail, Task } from "../shared/interfaces.js";
|
|
3
|
-
export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], error: string | null | undefined
|
|
3
|
+
export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], error: string | null | undefined, options?: {
|
|
4
|
+
showHumanActions?: boolean;
|
|
5
|
+
}): {
|
|
4
6
|
messages: never[];
|
|
5
7
|
lastToolCallJobId: null;
|
|
6
8
|
jobMap?: undefined;
|
|
@@ -17,5 +17,5 @@ export interface CruiseCanvasRef {
|
|
|
17
17
|
feedbackSubmitFailed: () => void;
|
|
18
18
|
feedbackOnViewDone: (viewId: string) => void;
|
|
19
19
|
}
|
|
20
|
-
export declare function CruiseCanvasComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHiddenJobs, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, showJsxEditor, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToChat, onFeedbackOnView, onDetailChange, }: CruiseCanvasComponentProps, ref: React.Ref<CruiseCanvasRef>): React.JSX.Element;
|
|
20
|
+
export declare function CruiseCanvasComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHiddenJobs, showHumanActions, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, showJsxEditor, previewUrlTemplate, showCases, exampleProjects, tryItOutUrl, onShare, onTerminate, onSubmitFeedback, onSwitchToChat, onFeedbackOnView, onDetailChange, }: CruiseCanvasComponentProps, ref: React.Ref<CruiseCanvasRef>): React.JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum K {
|
|
2
|
+
WATCH_AGAIN = "WATCH_AGAIN",
|
|
3
|
+
TRY_IT_OUT = "TRY_IT_OUT",
|
|
4
|
+
CASE_REPLAYING = "CASE_REPLAYING",
|
|
5
|
+
CASE_REPLAY_FINISHED = "CASE_REPLAY_FINISHED",
|
|
6
|
+
SKIP_TO_RESULTS = "SKIP_TO_RESULTS",
|
|
7
|
+
OTHER_CASES = "OTHER_CASES",
|
|
8
|
+
PROJECT_TIPS = "PROJECT_TIPS",
|
|
9
|
+
GET_STARTED_WITH_PROJECTS_PREFIX = "GET_STARTED_WITH_PROJECTS_PREFIX",
|
|
10
|
+
PROJECTS = "PROJECTS",
|
|
11
|
+
GET_STARTED_WITH_PROJECTS_SUFFIX = "GET_STARTED_WITH_PROJECTS_SUFFIX"
|
|
12
|
+
}
|
|
13
|
+
export declare const NS = "bricks/ai-portal/NodeReplay";
|
|
14
|
+
export declare const locales: {
|
|
15
|
+
en: Locale;
|
|
16
|
+
zh: Locale;
|
|
17
|
+
};
|
|
18
|
+
export declare const t: any;
|
|
19
|
+
type Locale = {
|
|
20
|
+
[k in K]: string;
|
|
21
|
+
} & {
|
|
22
|
+
[k in K as `${k}_plural`]?: string;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -6,6 +6,7 @@ export declare const FEEDBACK_NODE_ID = "<FEEDBACK>";
|
|
|
6
6
|
export declare const REQUIREMENT_NODE_ID = "<REQUIREMENT>";
|
|
7
7
|
export declare const LOADING_NODE_ID = "<LOADING>";
|
|
8
8
|
export declare const ERROR_NODE_ID = "<ERROR>";
|
|
9
|
+
export declare const REPLAY_NODE_ID = "<REPLAY>";
|
|
9
10
|
export declare const CANVAS_PADDING_TOP = 20;
|
|
10
11
|
export declare const CANVAS_PADDING_RIGHT = 20;
|
|
11
12
|
export declare const CANVAS_PADDING_BOTTOM = 122;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
4
|
import type { Job, TaskBaseDetail } from "./interfaces.js";
|
|
5
|
-
import type { RequestStore } from "../shared/interfaces.js";
|
|
5
|
+
import type { ExampleProject, RequestStore, ShowCaseType } from "../shared/interfaces.js";
|
|
6
6
|
export interface CruiseCanvasProps {
|
|
7
7
|
conversationId?: string;
|
|
8
8
|
initialRequest?: RequestStore | null;
|
|
@@ -13,12 +13,16 @@ export interface CruiseCanvasProps {
|
|
|
13
13
|
replayDelay?: number;
|
|
14
14
|
supports?: Record<string, boolean>;
|
|
15
15
|
showHiddenJobs?: boolean;
|
|
16
|
+
showHumanActions?: boolean;
|
|
16
17
|
showFeedback?: boolean;
|
|
17
18
|
showFeedbackAfterFailed?: boolean;
|
|
18
19
|
showUiSwitch?: boolean;
|
|
19
20
|
showFeedbackOnView?: boolean;
|
|
20
21
|
showJsxEditor?: boolean;
|
|
21
22
|
previewUrlTemplate?: string;
|
|
23
|
+
showCases?: ShowCaseType[];
|
|
24
|
+
exampleProjects?: ExampleProject[];
|
|
25
|
+
tryItOutUrl?: string;
|
|
22
26
|
}
|
|
23
27
|
export interface ConversationDetail {
|
|
24
28
|
projectId?: string;
|
|
@@ -44,6 +48,7 @@ export declare class CruiseCanvas extends ReactNextElement implements CruiseCanv
|
|
|
44
48
|
accessor replayDelay: number | undefined;
|
|
45
49
|
accessor supports: Record<string, boolean> | undefined;
|
|
46
50
|
accessor showHiddenJobs: boolean | undefined;
|
|
51
|
+
accessor showHumanActions: boolean | undefined;
|
|
47
52
|
accessor showFeedback: boolean | undefined;
|
|
48
53
|
accessor showFeedbackAfterFailed: boolean | undefined;
|
|
49
54
|
accessor showFeedbackOnView: boolean | undefined;
|
|
@@ -51,6 +56,9 @@ export declare class CruiseCanvas extends ReactNextElement implements CruiseCanv
|
|
|
51
56
|
accessor hideMermaid: boolean | undefined;
|
|
52
57
|
accessor showJsxEditor: boolean | undefined;
|
|
53
58
|
accessor previewUrlTemplate: string | undefined;
|
|
59
|
+
accessor showCases: ShowCaseType[] | undefined;
|
|
60
|
+
accessor exampleProjects: ExampleProject[] | undefined;
|
|
61
|
+
accessor tryItOutUrl: string | undefined;
|
|
54
62
|
resumed(): void;
|
|
55
63
|
feedbackSubmitDone(): void;
|
|
56
64
|
feedbackSubmitFailed(): void;
|
|
@@ -11,7 +11,7 @@ export interface TransformLiteral {
|
|
|
11
11
|
x: number;
|
|
12
12
|
y: number;
|
|
13
13
|
}
|
|
14
|
-
export type GraphNode = RequirementGraphNode | LoadingGraphNode | InstructionGraphNode | JobGraphNode | ViewGraphNode | StartGraphNode | EndGraphNode | ErrorGraphNode | FeedbackGraphNode;
|
|
14
|
+
export type GraphNode = RequirementGraphNode | LoadingGraphNode | InstructionGraphNode | JobGraphNode | ViewGraphNode | StartGraphNode | EndGraphNode | ErrorGraphNode | FeedbackGraphNode | ReplayGraphNode;
|
|
15
15
|
export interface RequirementGraphNode extends BaseGraphNode {
|
|
16
16
|
type: "requirement";
|
|
17
17
|
content: string;
|
|
@@ -44,6 +44,9 @@ export interface ErrorGraphNode extends BaseGraphNode {
|
|
|
44
44
|
export interface FeedbackGraphNode extends BaseGraphNode {
|
|
45
45
|
type: "feedback";
|
|
46
46
|
}
|
|
47
|
+
export interface ReplayGraphNode extends BaseGraphNode {
|
|
48
|
+
type: "replay";
|
|
49
|
+
}
|
|
47
50
|
export interface BaseGraphNode {
|
|
48
51
|
id: string;
|
|
49
52
|
type: string;
|
|
@@ -71,6 +74,7 @@ export interface Task {
|
|
|
71
74
|
jobs: Job[];
|
|
72
75
|
startTime: number;
|
|
73
76
|
endTime?: number;
|
|
77
|
+
aiEmployeeId?: string;
|
|
74
78
|
}
|
|
75
79
|
export interface Step {
|
|
76
80
|
id: string;
|
|
@@ -95,6 +99,7 @@ export interface Job {
|
|
|
95
99
|
level?: number;
|
|
96
100
|
requestHumanAction?: HumanAction;
|
|
97
101
|
humanAction?: string;
|
|
102
|
+
aiEmployeeId?: string;
|
|
98
103
|
}
|
|
99
104
|
export interface TaskPatch extends Omit<Partial<Task>, "jobs"> {
|
|
100
105
|
jobs?: JobPatch[];
|
|
@@ -4,7 +4,7 @@ export interface CruiseCanvasState {
|
|
|
4
4
|
tasks: Task[];
|
|
5
5
|
error: string | null;
|
|
6
6
|
}
|
|
7
|
-
export type CruiseCanvasAction = ConversationSSEAction | ConversationResetAction;
|
|
7
|
+
export type CruiseCanvasAction = ConversationSSEAction | ConversationResetAction | ConversationFinishedAction;
|
|
8
8
|
export interface ConversationSSEAction {
|
|
9
9
|
type: "sse";
|
|
10
10
|
payload: ConversationPatch;
|
|
@@ -13,3 +13,6 @@ export interface ConversationSSEAction {
|
|
|
13
13
|
export interface ConversationResetAction {
|
|
14
14
|
type: "reset";
|
|
15
15
|
}
|
|
16
|
+
export interface ConversationFinishedAction {
|
|
17
|
+
type: "finished";
|
|
18
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { GraphEdge, GraphNode, GraphNavItem, GraphGeneratedView } from "./i
|
|
|
2
2
|
import type { ConversationBaseDetail, Task } from "../shared/interfaces";
|
|
3
3
|
export declare function useConversationGraph(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], options?: {
|
|
4
4
|
showHiddenJobs?: boolean;
|
|
5
|
+
showHumanActions?: boolean;
|
|
5
6
|
}): {
|
|
6
7
|
nodes: GraphNode[];
|
|
7
8
|
edges: GraphEdge[];
|
|
@@ -5,11 +5,13 @@ export interface UseLayoutOptions {
|
|
|
5
5
|
sizeMap: Map<string, SizeTuple> | null;
|
|
6
6
|
completed?: boolean;
|
|
7
7
|
failed?: boolean;
|
|
8
|
+
finished?: boolean;
|
|
8
9
|
error?: string | null;
|
|
9
10
|
showFeedback?: boolean;
|
|
10
11
|
showFeedbackAfterFailed?: boolean;
|
|
12
|
+
replay?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare function useLayout({ rawNodes: _rawNodes, rawEdges: _rawEdges, sizeMap, completed, failed, error, showFeedback, showFeedbackAfterFailed, }: UseLayoutOptions): {
|
|
14
|
+
export declare function useLayout({ rawNodes: _rawNodes, rawEdges: _rawEdges, sizeMap, completed, failed, finished, error, showFeedback, showFeedbackAfterFailed, replay, }: UseLayoutOptions): {
|
|
13
15
|
sizeReady: boolean;
|
|
14
16
|
nodes: GraphNode[];
|
|
15
17
|
edges: {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { type Dispatch } from "react";
|
|
2
2
|
import type { FeedbackDetail, Job } from "../cruise-canvas/interfaces";
|
|
3
|
-
import type { GeneratedView } from "./interfaces";
|
|
3
|
+
import type { ExampleProject, GeneratedView, ShowCaseType } from "./interfaces";
|
|
4
4
|
export interface TaskContextValue {
|
|
5
|
+
conversationId?: string;
|
|
5
6
|
workspace?: string;
|
|
6
7
|
previewUrlTemplate?: string;
|
|
8
|
+
replay?: boolean;
|
|
9
|
+
showCases?: ShowCaseType[];
|
|
10
|
+
exampleProjects?: ExampleProject[];
|
|
7
11
|
humanInput: (jobId: string, input: string | null, action?: string) => void;
|
|
8
12
|
onShare: () => void;
|
|
9
13
|
onTerminate: () => void;
|
|
@@ -24,5 +28,8 @@ export interface TaskContextValue {
|
|
|
24
28
|
showFeedbackOnView?: boolean;
|
|
25
29
|
onFeedbackOnView?: (viewId: string) => void;
|
|
26
30
|
feedbackDoneViews?: Set<string>;
|
|
31
|
+
skipToResults?: () => void;
|
|
32
|
+
watchAgain?: () => void;
|
|
33
|
+
tryItOut?: () => void;
|
|
27
34
|
}
|
|
28
35
|
export declare const TaskContext: React.Context<TaskContextValue>;
|
|
@@ -8,6 +8,7 @@ import { PopoverProps, Popover } from "@next-bricks/basic/popover";
|
|
|
8
8
|
import { EoNextTable, NextTableProps } from "@next-bricks/advanced/next-table";
|
|
9
9
|
import type { IconButton, IconButtonProps } from "../icon-button";
|
|
10
10
|
import type { ChatInput, ChatInputEvents, ChatInputMapEvents, ChatInputProps } from "../chat-input";
|
|
11
|
+
import type { ShowCase, ShowCaseProps } from "../show-case";
|
|
11
12
|
export declare const WrappedIcon: import("@next-core/react-element").WrappedBrick<GeneralIcon, GeneralIconProps>;
|
|
12
13
|
export declare const WrappedButton: import("@next-core/react-element").WrappedBrick<Button, ButtonProps>;
|
|
13
14
|
export declare const WrappedLink: import("@next-core/react-element").WrappedBrick<Link, LinkProps>;
|
|
@@ -18,6 +19,7 @@ export declare const WrappedDrawer: import("@next-core/react-element").WrappedBr
|
|
|
18
19
|
}, DrawerEvents, DrawerMapEvents>;
|
|
19
20
|
export declare const WrappedIconButton: import("@next-core/react-element").WrappedBrick<IconButton, IconButtonProps>;
|
|
20
21
|
export declare const WrappedChatInput: import("@next-core/react-element").WrappedBrickWithEventsMap<ChatInput, ChatInputProps, ChatInputEvents, ChatInputMapEvents>;
|
|
22
|
+
export declare const WrappedShowCase: import("@next-core/react-element").WrappedBrick<ShowCase, ShowCaseProps>;
|
|
21
23
|
export declare const showDialog: (options: import("@next-bricks/basic/data-providers/show-dialog/show-dialog").DialogOptions) => Promise<void>;
|
|
22
24
|
export declare const copyToClipboard: (text: string) => Promise<void>;
|
|
23
25
|
export declare const AsyncWrappedTable: React.LazyExoticComponent<import("@next-core/react-element").WrappedBrick<EoNextTable, NextTableProps>>;
|
|
@@ -7,6 +7,7 @@ export interface Conversation {
|
|
|
7
7
|
tasks: Task[];
|
|
8
8
|
startTime: number;
|
|
9
9
|
endTime?: number;
|
|
10
|
+
finished?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface Task {
|
|
12
13
|
id: string;
|
|
@@ -17,6 +18,7 @@ export interface Task {
|
|
|
17
18
|
jobs: Job[];
|
|
18
19
|
startTime: number;
|
|
19
20
|
endTime?: number;
|
|
21
|
+
aiEmployeeId?: string;
|
|
20
22
|
}
|
|
21
23
|
export type ConversationState = "working" | "completed" | "failed" | "input-required" | "terminated";
|
|
22
24
|
export type TaskState = "free" | "confirming" | "executing" | "completed" | "failed";
|
|
@@ -36,6 +38,7 @@ export interface Job {
|
|
|
36
38
|
generatedView?: GeneratedView;
|
|
37
39
|
requestHumanAction?: HumanAction;
|
|
38
40
|
humanAction?: string;
|
|
41
|
+
aiEmployeeId?: string;
|
|
39
42
|
}
|
|
40
43
|
export type HumanAction = HumanActionConfirm | HumanActionSelect;
|
|
41
44
|
export interface HumanActionConfirm {
|
|
@@ -109,3 +112,15 @@ export interface GeneratedView {
|
|
|
109
112
|
withContexts?: Record<string, unknown>;
|
|
110
113
|
asyncConstructedView?: Promise<ParseResult | null>;
|
|
111
114
|
}
|
|
115
|
+
export interface ShowCaseType {
|
|
116
|
+
conversationId: string;
|
|
117
|
+
title: string;
|
|
118
|
+
summary: string;
|
|
119
|
+
scenario: string;
|
|
120
|
+
url?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface ExampleProject {
|
|
123
|
+
instanceId: string;
|
|
124
|
+
name: string;
|
|
125
|
+
url?: string;
|
|
126
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum K {
|
|
2
|
+
WATCH_REPLAY = "WATCH_REPLAY"
|
|
3
|
+
}
|
|
4
|
+
export declare const NS = "bricks/ai-portal/show-case";
|
|
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,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface ShowCaseProps {
|
|
5
|
+
caseTitle?: string;
|
|
6
|
+
summary?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 构件 `ai-portal.show-case`
|
|
11
|
+
*/
|
|
12
|
+
export declare class ShowCase extends ReactNextElement implements ShowCaseProps {
|
|
13
|
+
accessor caseTitle: string | undefined;
|
|
14
|
+
accessor summary: string | undefined;
|
|
15
|
+
accessor url: string | undefined;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
|
+
import type { ShowCaseType } from "../shared/interfaces.js";
|
|
4
5
|
export interface ShowCasesProps {
|
|
5
|
-
list?:
|
|
6
|
-
taskUrlTemplate?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ShowCase {
|
|
9
|
-
taskId: string;
|
|
10
|
-
title: string;
|
|
11
|
-
summary: string;
|
|
12
|
-
scenario: string;
|
|
13
|
-
thumbUrl?: string;
|
|
6
|
+
list?: ShowCaseType[];
|
|
14
7
|
}
|
|
15
8
|
/**
|
|
16
9
|
* 构件 `ai-portal.show-cases`
|
|
17
10
|
*/
|
|
18
11
|
export declare class ShowCases extends ReactNextElement implements ShowCasesProps {
|
|
19
|
-
accessor list:
|
|
20
|
-
accessor taskUrlTemplate: string | undefined;
|
|
12
|
+
accessor list: ShowCaseType[] | undefined;
|
|
21
13
|
render(): React.JSX.Element;
|
|
22
14
|
}
|
package/docs/show-cases.md
CHANGED
|
@@ -7,5 +7,13 @@
|
|
|
7
7
|
```yaml preview
|
|
8
8
|
brick: ai-portal.show-cases
|
|
9
9
|
properties:
|
|
10
|
-
|
|
10
|
+
list:
|
|
11
|
+
- conversationId: c-1
|
|
12
|
+
title: 故障排查-操作系统内存高
|
|
13
|
+
summary: 服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行
|
|
14
|
+
scenario: 主机故障排查
|
|
15
|
+
- conversationId: c-2
|
|
16
|
+
title: Hi
|
|
17
|
+
summary: There
|
|
18
|
+
scenario: 主机巡检
|
|
11
19
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.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": "
|
|
51
|
+
"gitHead": "56a058a187eae4d1277fd8ce6bbb7e73b75c61b9"
|
|
52
52
|
}
|