@quidgest/chatbot 0.6.0 → 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.
@@ -11,6 +11,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
11
11
  "apply-fields": (fields: AppliedFieldData[]) => void;
12
12
  regenerate: (fieldName: string) => void;
13
13
  "send-message": (prompt: string) => void;
14
+ "cancel-execution": () => void;
14
15
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChatBotMessageProps>, {
15
16
  sender: string;
16
17
  userImage: undefined;
@@ -21,6 +22,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
21
22
  "onSend-message"?: ((prompt: string) => any) | undefined;
22
23
  onRegenerate?: ((fieldName: string) => any) | undefined;
23
24
  "onApply-fields"?: ((fields: AppliedFieldData[]) => any) | undefined;
25
+ "onCancel-execution"?: (() => any) | undefined;
24
26
  }>, {
25
27
  date: Date;
26
28
  sender: import('../ChatBot/types').ChatBotMessageSender;
@@ -5,7 +5,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
5
5
  "copy-response": () => void;
6
6
  "apply-all": () => void;
7
7
  "approve-proceed-plan": () => void;
8
+ "cancel-execution": () => void;
8
9
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ChatBotMessageButtonsProps>>> & Readonly<{
10
+ "onCancel-execution"?: (() => any) | undefined;
9
11
  "onSubmit-feedback"?: ((feedback: number, comment: string) => any) | undefined;
10
12
  "onCopy-response"?: (() => any) | undefined;
11
13
  "onApply-all"?: (() => any) | undefined;
@@ -42,12 +42,27 @@ export type ChatBotMessageProps = {
42
42
  * Flag to indicate if this is the last message
43
43
  */
44
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;
45
57
  };
46
58
  export type ChatBotMessageButtonsProps = {
47
59
  loading: boolean;
48
60
  showButtons: boolean;
49
61
  dateFormat: string;
50
62
  date?: Date;
51
- isExecutionPlan?: boolean;
52
63
  isLastMessage?: boolean;
64
+ isExecutionPlan?: boolean;
65
+ isStreaming?: boolean;
66
+ showCancelExecution?: boolean;
67
+ cancelExecutionDisabled?: boolean;
53
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
  }>>;