xiaoao-chat 0.5.6 → 0.5.8

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/App.vue.d.ts CHANGED
@@ -22,39 +22,27 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
22
22
  isDownload: boolean;
23
23
  newChat: boolean;
24
24
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
25
- chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
26
- messages: {
27
- type: ArrayConstructor;
28
- default: () => never[];
29
- };
30
- isLoading: {
31
- type: BooleanConstructor;
32
- default: boolean;
33
- };
34
- isDownload: {
35
- type: BooleanConstructor;
36
- default: boolean;
37
- };
38
- autoScroll: {
39
- type: BooleanConstructor;
40
- default: boolean;
41
- };
42
- }>> & Readonly<{
43
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
44
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
45
- "onShow-references"?: ((...args: any[]) => any) | undefined;
25
+ chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
26
+ messages?: import('./components/XiaoChatPopup/types').ChatMessageItem[];
27
+ isLoading?: boolean;
28
+ isDownload?: boolean;
29
+ autoScroll?: boolean;
30
+ }> & Readonly<{
31
+ "onScroll-to-bottom"?: (() => any) | undefined;
32
+ "onScroll-to-top"?: (() => any) | undefined;
33
+ "onShow-references"?: ((references: import('./components/XiaoChatPopup/types').ChatReference[]) => any) | undefined;
46
34
  }>, {
47
35
  scrollToBottom: () => void;
48
36
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
49
- "scroll-to-bottom": (...args: any[]) => void;
50
- "scroll-to-top": (...args: any[]) => void;
51
- "show-references": (...args: any[]) => void;
37
+ "scroll-to-bottom": () => any;
38
+ "scroll-to-top": () => any;
39
+ "show-references": (references: import('./components/XiaoChatPopup/types').ChatReference[]) => any;
52
40
  }, import('vue').PublicProps, {
53
- messages: unknown[];
41
+ messages: import('./components/XiaoChatPopup/types').ChatMessageItem[];
54
42
  isLoading: boolean;
55
43
  isDownload: boolean;
56
44
  autoScroll: boolean;
57
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
45
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
58
46
  messagesContainer: HTMLDivElement;
59
47
  }, any, import('vue').ComponentProvideOptions, {
60
48
  P: {};
@@ -63,31 +51,19 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
63
51
  C: {};
64
52
  M: {};
65
53
  Defaults: {};
66
- }, Readonly<import('vue').ExtractPropTypes<{
67
- messages: {
68
- type: ArrayConstructor;
69
- default: () => never[];
70
- };
71
- isLoading: {
72
- type: BooleanConstructor;
73
- default: boolean;
74
- };
75
- isDownload: {
76
- type: BooleanConstructor;
77
- default: boolean;
78
- };
79
- autoScroll: {
80
- type: BooleanConstructor;
81
- default: boolean;
82
- };
83
- }>> & Readonly<{
84
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
85
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
86
- "onShow-references"?: ((...args: any[]) => any) | undefined;
54
+ }, Readonly<{
55
+ messages?: import('./components/XiaoChatPopup/types').ChatMessageItem[];
56
+ isLoading?: boolean;
57
+ isDownload?: boolean;
58
+ autoScroll?: boolean;
59
+ }> & Readonly<{
60
+ "onScroll-to-bottom"?: (() => any) | undefined;
61
+ "onScroll-to-top"?: (() => any) | undefined;
62
+ "onShow-references"?: ((references: import('./components/XiaoChatPopup/types').ChatReference[]) => any) | undefined;
87
63
  }>, {
88
64
  scrollToBottom: () => void;
89
65
  }, {}, {}, {}, {
90
- messages: unknown[];
66
+ messages: import('./components/XiaoChatPopup/types').ChatMessageItem[];
91
67
  isLoading: boolean;
92
68
  isDownload: boolean;
93
69
  autoScroll: boolean;
@@ -22,14 +22,14 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
22
22
  deepThinking: boolean;
23
23
  webSearch: boolean;
24
24
  }) => any;
25
- cancel: ((...args: unknown[]) => any) | (() => any);
25
+ cancel: () => any;
26
26
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
27
27
  onSend?: ((data: {
28
28
  message: string;
29
29
  deepThinking: boolean;
30
30
  webSearch: boolean;
31
31
  }) => any) | undefined;
32
- onCancel?: ((...args: unknown[] & []) => any) | undefined;
32
+ onCancel?: (() => any) | undefined;
33
33
  }>, {
34
34
  isLoading: boolean;
35
35
  inputLabel: string;
@@ -1,53 +1,26 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- messages: {
3
- type: ArrayConstructor;
4
- default: () => never[];
5
- };
6
- isLoading: {
7
- type: BooleanConstructor;
8
- default: boolean;
9
- };
10
- isDownload: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- autoScroll: {
15
- type: BooleanConstructor;
16
- default: boolean;
17
- };
18
- }>, {
1
+ import { ChatMessageItem, ChatReference } from './types';
2
+ type __VLS_Props = {
3
+ messages?: ChatMessageItem[];
4
+ isLoading?: boolean;
5
+ isDownload?: boolean;
6
+ autoScroll?: boolean;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
19
9
  scrollToBottom: () => void;
20
10
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
- "scroll-to-bottom": (...args: any[]) => void;
22
- "scroll-to-top": (...args: any[]) => void;
23
- "show-references": (...args: any[]) => void;
24
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
- messages: {
26
- type: ArrayConstructor;
27
- default: () => never[];
28
- };
29
- isLoading: {
30
- type: BooleanConstructor;
31
- default: boolean;
32
- };
33
- isDownload: {
34
- type: BooleanConstructor;
35
- default: boolean;
36
- };
37
- autoScroll: {
38
- type: BooleanConstructor;
39
- default: boolean;
40
- };
41
- }>> & Readonly<{
42
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
43
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
44
- "onShow-references"?: ((...args: any[]) => any) | undefined;
11
+ "scroll-to-bottom": () => any;
12
+ "scroll-to-top": () => any;
13
+ "show-references": (references: ChatReference[]) => any;
14
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onScroll-to-bottom"?: (() => any) | undefined;
16
+ "onScroll-to-top"?: (() => any) | undefined;
17
+ "onShow-references"?: ((references: ChatReference[]) => any) | undefined;
45
18
  }>, {
46
- messages: unknown[];
19
+ messages: ChatMessageItem[];
47
20
  isLoading: boolean;
48
21
  isDownload: boolean;
49
22
  autoScroll: boolean;
50
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
51
24
  messagesContainer: HTMLDivElement;
52
25
  }, any>;
53
26
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { ChatMessageItem, ChatReference } from './types';
1
2
  type __VLS_Props = {
2
3
  newChat?: boolean;
3
4
  isDownload?: boolean;
@@ -12,39 +13,27 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
12
13
  isDownload: boolean;
13
14
  newChat: boolean;
14
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
15
- chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
16
- messages: {
17
- type: ArrayConstructor;
18
- default: () => never[];
19
- };
20
- isLoading: {
21
- type: BooleanConstructor;
22
- default: boolean;
23
- };
24
- isDownload: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- autoScroll: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- }>> & Readonly<{
33
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
34
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
35
- "onShow-references"?: ((...args: any[]) => any) | undefined;
16
+ chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
17
+ messages?: ChatMessageItem[];
18
+ isLoading?: boolean;
19
+ isDownload?: boolean;
20
+ autoScroll?: boolean;
21
+ }> & Readonly<{
22
+ "onScroll-to-bottom"?: (() => any) | undefined;
23
+ "onScroll-to-top"?: (() => any) | undefined;
24
+ "onShow-references"?: ((references: ChatReference[]) => any) | undefined;
36
25
  }>, {
37
26
  scrollToBottom: () => void;
38
27
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
39
- "scroll-to-bottom": (...args: any[]) => void;
40
- "scroll-to-top": (...args: any[]) => void;
41
- "show-references": (...args: any[]) => void;
28
+ "scroll-to-bottom": () => any;
29
+ "scroll-to-top": () => any;
30
+ "show-references": (references: ChatReference[]) => any;
42
31
  }, import('vue').PublicProps, {
43
- messages: unknown[];
32
+ messages: ChatMessageItem[];
44
33
  isLoading: boolean;
45
34
  isDownload: boolean;
46
35
  autoScroll: boolean;
47
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
36
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
48
37
  messagesContainer: HTMLDivElement;
49
38
  }, any, import('vue').ComponentProvideOptions, {
50
39
  P: {};
@@ -53,31 +42,19 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
53
42
  C: {};
54
43
  M: {};
55
44
  Defaults: {};
56
- }, Readonly<import('vue').ExtractPropTypes<{
57
- messages: {
58
- type: ArrayConstructor;
59
- default: () => never[];
60
- };
61
- isLoading: {
62
- type: BooleanConstructor;
63
- default: boolean;
64
- };
65
- isDownload: {
66
- type: BooleanConstructor;
67
- default: boolean;
68
- };
69
- autoScroll: {
70
- type: BooleanConstructor;
71
- default: boolean;
72
- };
73
- }>> & Readonly<{
74
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
75
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
76
- "onShow-references"?: ((...args: any[]) => any) | undefined;
45
+ }, Readonly<{
46
+ messages?: ChatMessageItem[];
47
+ isLoading?: boolean;
48
+ isDownload?: boolean;
49
+ autoScroll?: boolean;
50
+ }> & Readonly<{
51
+ "onScroll-to-bottom"?: (() => any) | undefined;
52
+ "onScroll-to-top"?: (() => any) | undefined;
53
+ "onShow-references"?: ((references: ChatReference[]) => any) | undefined;
77
54
  }>, {
78
55
  scrollToBottom: () => void;
79
56
  }, {}, {}, {}, {
80
- messages: unknown[];
57
+ messages: ChatMessageItem[];
81
58
  isLoading: boolean;
82
59
  isDownload: boolean;
83
60
  autoScroll: boolean;
@@ -23,39 +23,27 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
23
23
  isDownload: boolean;
24
24
  newChat: boolean;
25
25
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
26
- chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
27
- messages: {
28
- type: ArrayConstructor;
29
- default: () => never[];
30
- };
31
- isLoading: {
32
- type: BooleanConstructor;
33
- default: boolean;
34
- };
35
- isDownload: {
36
- type: BooleanConstructor;
37
- default: boolean;
38
- };
39
- autoScroll: {
40
- type: BooleanConstructor;
41
- default: boolean;
42
- };
43
- }>> & Readonly<{
44
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
45
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
46
- "onShow-references"?: ((...args: any[]) => any) | undefined;
26
+ chatMessageRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
27
+ messages?: import('./types').ChatMessageItem[];
28
+ isLoading?: boolean;
29
+ isDownload?: boolean;
30
+ autoScroll?: boolean;
31
+ }> & Readonly<{
32
+ "onScroll-to-bottom"?: (() => any) | undefined;
33
+ "onScroll-to-top"?: (() => any) | undefined;
34
+ "onShow-references"?: ((references: import('./types').ChatReference[]) => any) | undefined;
47
35
  }>, {
48
36
  scrollToBottom: () => void;
49
37
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
50
- "scroll-to-bottom": (...args: any[]) => void;
51
- "scroll-to-top": (...args: any[]) => void;
52
- "show-references": (...args: any[]) => void;
38
+ "scroll-to-bottom": () => any;
39
+ "scroll-to-top": () => any;
40
+ "show-references": (references: import('./types').ChatReference[]) => any;
53
41
  }, import('vue').PublicProps, {
54
- messages: unknown[];
42
+ messages: import('./types').ChatMessageItem[];
55
43
  isLoading: boolean;
56
44
  isDownload: boolean;
57
45
  autoScroll: boolean;
58
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
46
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
59
47
  messagesContainer: HTMLDivElement;
60
48
  }, any, import('vue').ComponentProvideOptions, {
61
49
  P: {};
@@ -64,31 +52,19 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
64
52
  C: {};
65
53
  M: {};
66
54
  Defaults: {};
67
- }, Readonly<import('vue').ExtractPropTypes<{
68
- messages: {
69
- type: ArrayConstructor;
70
- default: () => never[];
71
- };
72
- isLoading: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
76
- isDownload: {
77
- type: BooleanConstructor;
78
- default: boolean;
79
- };
80
- autoScroll: {
81
- type: BooleanConstructor;
82
- default: boolean;
83
- };
84
- }>> & Readonly<{
85
- "onScroll-to-bottom"?: ((...args: any[]) => any) | undefined;
86
- "onScroll-to-top"?: ((...args: any[]) => any) | undefined;
87
- "onShow-references"?: ((...args: any[]) => any) | undefined;
55
+ }, Readonly<{
56
+ messages?: import('./types').ChatMessageItem[];
57
+ isLoading?: boolean;
58
+ isDownload?: boolean;
59
+ autoScroll?: boolean;
60
+ }> & Readonly<{
61
+ "onScroll-to-bottom"?: (() => any) | undefined;
62
+ "onScroll-to-top"?: (() => any) | undefined;
63
+ "onShow-references"?: ((references: import('./types').ChatReference[]) => any) | undefined;
88
64
  }>, {
89
65
  scrollToBottom: () => void;
90
66
  }, {}, {}, {}, {
91
- messages: unknown[];
67
+ messages: import('./types').ChatMessageItem[];
92
68
  isLoading: boolean;
93
69
  isDownload: boolean;
94
70
  autoScroll: boolean;
@@ -0,0 +1,36 @@
1
+ export type ChatRole = 'user' | 'agent';
2
+ export interface ChatReference {
3
+ [key: string]: unknown;
4
+ }
5
+ export interface ChatMessageAttachments {
6
+ rag_search?: {
7
+ rag_references?: ChatReference[];
8
+ };
9
+ [key: string]: unknown;
10
+ }
11
+ export interface ChatMessageItem {
12
+ role: ChatRole;
13
+ content: string;
14
+ type?: string;
15
+ attachments?: ChatMessageAttachments;
16
+ id?: string | number;
17
+ session_id?: string;
18
+ }
19
+ export interface ChatSendParam {
20
+ message: string;
21
+ deepThinking: boolean;
22
+ webSearch: boolean;
23
+ }
24
+ export interface ChatResponseChunk {
25
+ content?: string;
26
+ type?: string;
27
+ attachments?: ChatMessageAttachments;
28
+ message_id?: string | number;
29
+ session_id?: string;
30
+ }
31
+ export interface ChatErrorResponse {
32
+ code?: number;
33
+ msg?: {
34
+ detail?: string;
35
+ };
36
+ }
@@ -1,4 +1,4 @@
1
- import { c as _l, g as ku } from "./index-BwQNu1gI.js";
1
+ import { c as _l, g as ku } from "./index-CAOWstyb.js";
2
2
  function Ku(Sa, kl) {
3
3
  for (var lo = 0; lo < kl.length; lo++) {
4
4
  const ts = kl[lo];