@quidgest/chatbot 0.5.9 → 0.6.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.
@@ -6,22 +6,29 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6
6
  userImage: undefined;
7
7
  date: () => Date;
8
8
  fields: () => never[];
9
+ isLastMessage: boolean;
9
10
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
11
  "apply-fields": (fields: AppliedFieldData[]) => void;
11
12
  regenerate: (fieldName: string) => void;
13
+ "send-message": (prompt: string) => void;
14
+ "cancel-execution": () => void;
12
15
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChatBotMessageProps>, {
13
16
  sender: string;
14
17
  userImage: undefined;
15
18
  date: () => Date;
16
19
  fields: () => never[];
20
+ isLastMessage: boolean;
17
21
  }>>> & Readonly<{
22
+ "onSend-message"?: ((prompt: string) => any) | undefined;
18
23
  onRegenerate?: ((fieldName: string) => any) | undefined;
19
24
  "onApply-fields"?: ((fields: AppliedFieldData[]) => any) | undefined;
25
+ "onCancel-execution"?: (() => any) | undefined;
20
26
  }>, {
21
27
  date: Date;
22
28
  sender: import('../ChatBot/types').ChatBotMessageSender;
23
29
  userImage: string;
24
30
  fields: FieldData[];
31
+ isLastMessage: boolean;
25
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
26
33
  export default _default;
27
34
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -4,10 +4,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
4
4
  "submit-feedback": (feedback: number, comment: string) => void;
5
5
  "copy-response": () => void;
6
6
  "apply-all": () => void;
7
+ "approve-proceed-plan": () => void;
8
+ "cancel-execution": () => void;
7
9
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ChatBotMessageButtonsProps>>> & Readonly<{
10
+ "onCancel-execution"?: (() => any) | undefined;
8
11
  "onSubmit-feedback"?: ((feedback: number, comment: string) => any) | undefined;
9
12
  "onCopy-response"?: (() => any) | undefined;
10
13
  "onApply-all"?: (() => any) | undefined;
14
+ "onApprove-proceed-plan"?: (() => any) | undefined;
11
15
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
16
  export default _default;
13
17
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -38,10 +38,31 @@ export type ChatBotMessageProps = {
38
38
  * Additional fields for the message
39
39
  */
40
40
  fields?: FieldData[];
41
+ /**
42
+ * Flag to indicate if this is the last message
43
+ */
44
+ isLastMessage?: boolean;
45
+ /**
46
+ * Flag to indicate if message is currently streaming
47
+ */
48
+ isStreaming?: boolean;
49
+ /**
50
+ * Flag to show cancel execution button
51
+ */
52
+ showCancelExecution?: boolean;
53
+ /**
54
+ * Flag to disable cancel execution button
55
+ */
56
+ cancelExecutionDisabled?: boolean;
41
57
  };
42
58
  export type ChatBotMessageButtonsProps = {
43
59
  loading: boolean;
44
60
  showButtons: boolean;
45
61
  dateFormat: string;
46
62
  date?: Date;
63
+ isLastMessage?: boolean;
64
+ isExecutionPlan?: boolean;
65
+ isStreaming?: boolean;
66
+ showCancelExecution?: boolean;
67
+ cancelExecutionDisabled?: boolean;
47
68
  };
@@ -1,2 +1,17 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ /** Text to display above the pulsing dots; if omitted, a default is used. */
3
+ text?: string;
4
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ /** Text to display above the pulsing dots; if omitted, a default is used. */
6
+ text?: string;
7
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
8
  export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToRuntimeProps<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: import('vue').PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
@@ -14,14 +14,17 @@ export declare function useChatApi(apiEndpoint: string): {
14
14
  clearChatData: (username: string, project: string, agentID: string, formId: string) => Promise<RequestResponse<{
15
15
  success: boolean;
16
16
  }>>;
17
- getJobResultData: (jobId: string, onChunk: (chunk: string) => void, onMetaData: (metadata: Record<string, unknown>) => void, onRequestError?: (error: Error) => void) => Promise<void>;
18
- sendPrompt: (formData: FormData, onChunk: (chunk: string) => void, onStatus?: (payload: {
17
+ getJobResultData: (jobId: string, onMessage: (chunk: string) => void, onMetaData: (metadata: Record<string, unknown>) => void, onRequestError?: (error: Error) => void) => Promise<void>;
18
+ sendPrompt: (formData: FormData, onMessage: (chunk: string) => void, onToolStatus?: (payload: {
19
19
  event: string;
20
20
  data: {
21
21
  id: string;
22
22
  html: string;
23
23
  };
24
- }) => void, onError?: (error: Error) => void) => Promise<void>;
24
+ }) => void, onError?: (error: Error) => void, onDone?: () => void) => Promise<void>;
25
+ cancelExecution: (sessionId: string) => Promise<RequestResponse<{
26
+ success: boolean;
27
+ }>>;
25
28
  handleFeedback: (feedback: number, comment: string, sessionID: string) => Promise<RequestResponse<{
26
29
  success: boolean;
27
30
  }>>;
@@ -29,4 +29,6 @@ export declare function useTexts(): {
29
29
  generatingResponse: string;
30
30
  suggestionsForField: string;
31
31
  fileUpload: string;
32
+ approveProceed: string;
33
+ approveProceedPlan: string;
32
34
  };