@next-bricks/ai-portal 0.65.3 → 0.65.4

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 (42) hide show
  1. package/dist/bricks.json +30 -28
  2. package/dist/chunks/1999.f9846bc3.js +2 -0
  3. package/dist/chunks/1999.f9846bc3.js.map +1 -0
  4. package/dist/chunks/{2742.3340a00e.js → 2742.64fa013f.js} +2 -2
  5. package/dist/chunks/2742.64fa013f.js.map +1 -0
  6. package/dist/chunks/3186.f231329a.js +2 -0
  7. package/dist/chunks/3186.f231329a.js.map +1 -0
  8. package/dist/chunks/4208.a1a0dfdd.js +2 -0
  9. package/dist/chunks/4208.a1a0dfdd.js.map +1 -0
  10. package/dist/chunks/4864.a9badd21.js +2 -0
  11. package/dist/chunks/4864.a9badd21.js.map +1 -0
  12. package/dist/chunks/{5452.e451b025.js → 5452.bb5140b0.js} +2 -2
  13. package/dist/chunks/5452.bb5140b0.js.map +1 -0
  14. package/dist/chunks/{chat-panel.e8afa537.js → chat-panel.3b7afbd5.js} +2 -2
  15. package/dist/chunks/chat-panel.3b7afbd5.js.map +1 -0
  16. package/dist/chunks/{chat-stream.cef88ead.js → chat-stream.393c8241.js} +2 -2
  17. package/dist/chunks/{chat-stream.cef88ead.js.map → chat-stream.393c8241.js.map} +1 -1
  18. package/dist/chunks/{main.abe54caf.js → main.ccf4635e.js} +2 -2
  19. package/dist/chunks/{main.abe54caf.js.map → main.ccf4635e.js.map} +1 -1
  20. package/dist/examples.json +12 -12
  21. package/dist/index.b10ed910.js +2 -0
  22. package/dist/{index.d03181ae.js.map → index.b10ed910.js.map} +1 -1
  23. package/dist/manifest.json +288 -288
  24. package/dist/types.json +1330 -1330
  25. package/dist-types/chat-stream/StreamContext.d.ts +1 -0
  26. package/dist-types/chat-stream/useConversationStream.d.ts +4 -1
  27. package/dist-types/shared/AskUser/AskUser.d.ts +4 -2
  28. package/dist-types/shared/AskUser/i18n.d.ts +15 -0
  29. package/dist-types/shared/getFlatChunks.d.ts +11 -3
  30. package/package.json +2 -2
  31. package/dist/chunks/2742.3340a00e.js.map +0 -1
  32. package/dist/chunks/3186.81f0a2f0.js +0 -2
  33. package/dist/chunks/3186.81f0a2f0.js.map +0 -1
  34. package/dist/chunks/4208.002ac189.js +0 -2
  35. package/dist/chunks/4208.002ac189.js.map +0 -1
  36. package/dist/chunks/4577.66294512.js +0 -2
  37. package/dist/chunks/4577.66294512.js.map +0 -1
  38. package/dist/chunks/4864.03882076.js +0 -2
  39. package/dist/chunks/4864.03882076.js.map +0 -1
  40. package/dist/chunks/5452.e451b025.js.map +0 -1
  41. package/dist/chunks/chat-panel.e8afa537.js.map +0 -1
  42. package/dist/index.d03181ae.js +0 -2
@@ -2,6 +2,7 @@ import { type Dispatch } from "react";
2
2
  import type { ActiveDetail } from "../shared/interfaces";
3
3
  export interface StreamContextValue {
4
4
  lastDetail: ActiveDetail | null;
5
+ planMap: Map<string, any> | null;
5
6
  setUserClosedAside: Dispatch<React.SetStateAction<boolean>>;
6
7
  toggleAutoScroll: (enabled: boolean) => void;
7
8
  }
@@ -6,15 +6,18 @@ export interface UseConversationStreamOptions {
6
6
  showHumanActions?: boolean;
7
7
  skipActivitySubTasks?: boolean;
8
8
  rootTaskId?: string;
9
+ expandAskUser?: boolean;
9
10
  }
10
11
  export declare function useConversationStream(conversationAvailable: boolean, state: ConversationState | TaskState | undefined, tasks: Task[], errors: ConversationError[], options?: UseConversationStreamOptions): {
11
12
  messages: never[];
12
13
  lastDetail: null;
14
+ planMap: null;
13
15
  activeAskUser: null;
14
16
  jobMap?: undefined;
15
17
  } | {
16
18
  messages: ChatMessage[];
17
19
  jobMap: Map<string, import("../shared/interfaces.js").Job>;
20
+ planMap: Map<string, import("../shared/interfaces.js").PlanStep>;
18
21
  lastDetail: ActiveDetail | null;
19
- activeAskUser: import("./interfaces.js").MessageChunkOfAskUser | null;
22
+ activeAskUser: import("../shared/getFlatChunks.js").ActiveAskUser | null;
20
23
  };
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
- import type { Task } from "../interfaces";
2
+ import type { Job, Task } from "../interfaces";
3
3
  export interface AskUserProps {
4
4
  task: Task | undefined;
5
+ parentJob: Job | undefined;
6
+ parentTask: Task;
5
7
  }
6
- export declare function AskUser({ task }: AskUserProps): React.JSX.Element | null;
8
+ export declare function AskUser({ task, parentJob, parentTask }: AskUserProps): React.JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ export declare enum K {
2
+ ASK_USER_TIPS = "ASK_USER_TIPS"
3
+ }
4
+ export declare const NS = "bricks/ai-portal/AskUser";
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 {};
@@ -1,17 +1,25 @@
1
- import type { MessageChunk, MessageChunkOfAskUser } from "../chat-stream/interfaces";
2
- import type { Task, ServiceFlowRun, ActivityWithFlow, ConversationError, Job } from "../shared/interfaces";
1
+ import type { MessageChunk } from "../chat-stream/interfaces";
2
+ import type { Task, ServiceFlowRun, ActivityWithFlow, ConversationError, Job, PlanStep } from "../shared/interfaces";
3
3
  export interface FlatChunkOptions {
4
4
  flowMap?: Map<string, ServiceFlowRun>;
5
5
  activityMap?: Map<string, ActivityWithFlow>;
6
6
  skipActivitySubTasks?: boolean;
7
7
  enablePlan?: boolean;
8
8
  rootTaskId?: string;
9
+ expandAskUser?: boolean;
10
+ }
11
+ export interface ActiveAskUser {
12
+ task?: Task;
13
+ parentJob?: Job;
14
+ parentTask: Task;
9
15
  }
10
16
  export declare function getFlatChunks(tasks: Task[], errors: ConversationError[], options?: FlatChunkOptions): {
11
17
  /** Message chunks, excluding those from skipped subtasks */
12
18
  chunks: MessageChunk[];
13
19
  /** All jobs including those nested within subtasks */
14
20
  jobMap: Map<string, Job>;
21
+ /** Map of jobId to plan step, if plan is available */
22
+ planMap: Map<string, PlanStep>;
15
23
  /** The active askUser chunk, if any */
16
- activeAskUser: MessageChunkOfAskUser | null;
24
+ activeAskUser: ActiveAskUser | null;
17
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.65.3",
3
+ "version": "0.65.4",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,5 +49,5 @@
49
49
  "@next-bricks/presentational": "*",
50
50
  "@next-bricks/vs": "*"
51
51
  },
52
- "gitHead": "ec2a2ba458f2e3123d6d5c9ddc4266c43afe0133"
52
+ "gitHead": "06027414b286e813653867149f3fc4495f077cd6"
53
53
  }