@blueking/chat-x 0.0.1-beta.8 → 0.0.2

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 (25) hide show
  1. package/dist/ag-ui/types/constants.d.ts +3 -1
  2. package/dist/ag-ui/types/messages.d.ts +2 -0
  3. package/dist/components/ai-buttons/file-upload-btn/file-upload-btn.vue.d.ts +1 -0
  4. package/dist/components/ai-buttons/tool-btn/tool-btn.vue.d.ts +3 -0
  5. package/dist/components/ai-loading/ai-loading.vue.d.ts +10 -0
  6. package/dist/components/ai-selection/ai-selection.vue.d.ts +2 -0
  7. package/dist/components/chat-content/reference-content/reference-content.vue.d.ts +1 -0
  8. package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +9 -13
  9. package/dist/components/chat-input/chat-input.vue.d.ts +8 -8
  10. package/dist/components/chat-input/input-attachment/input-attachment.vue.d.ts +1 -0
  11. package/dist/components/chat-message/loading-message/loading-message.vue.d.ts +13 -0
  12. package/dist/components/chat-message/message-container/message-container.vue.d.ts +843 -0
  13. package/dist/components/chat-message/message-render/message-render.vue.d.ts +1 -1
  14. package/dist/components/chat-message/user-message/user-message.vue.d.ts +1 -1
  15. package/dist/components/markdown-token/code-content/code-content.vue.d.ts +1 -0
  16. package/dist/components/message-tools/delete-tool/delete-tool.vue.d.ts +19 -0
  17. package/dist/components/message-tools/message-tools.vue.d.ts +2 -1
  18. package/dist/composables/use-container-scroll.d.ts +4 -0
  19. package/dist/composables/use-observer-visible-list.d.ts +2 -2
  20. package/dist/index.css +1 -1
  21. package/dist/index.js +811 -522
  22. package/dist/index.js.map +1 -1
  23. package/dist/lang/lang.d.ts +6 -1
  24. package/dist/types/shortcut.d.ts +1 -0
  25. package/package.json +11 -6
@@ -18,6 +18,7 @@ export declare enum MessageRole {
18
18
  HiddenSystem = "hidden-system",
19
19
  HiddenUser = "hidden-user",
20
20
  Info = "info",
21
+ Loading = "loading",
21
22
  Pause = "pause",
22
23
  Placeholder = "placeholder",
23
24
  Reasoning = "reasoning",
@@ -36,5 +37,6 @@ export declare enum MessageStatus {
36
37
  Error = "error",
37
38
  Pending = "pending",
38
39
  Stop = "stop",
39
- Streaming = "streaming"
40
+ Streaming = "streaming",
41
+ Success = "success"
40
42
  }
@@ -58,6 +58,7 @@ export type HiddenMessage = BaseMessage<MessageRole.Hidden, string>;
58
58
  export type HiddenSystemMessage = BaseMessage<MessageRole.HiddenSystem, string>;
59
59
  export type HiddenUserMessage = BaseMessage<MessageRole.HiddenUser, string>;
60
60
  export type InfoMessage = BaseMessage<MessageRole.Info, string>;
61
+ export type LoadingMessage = BaseMessage<MessageRole.Loading, string>;
61
62
  export type Message = MessageMap[MessageType];
62
63
  export type MessageMap = AIBluekingMessageMap & {
63
64
  [MessageRole.Activity]: ActivityMessage;
@@ -70,6 +71,7 @@ export type MessageMap = AIBluekingMessageMap & {
70
71
  [MessageRole.HiddenSystem]: HiddenSystemMessage;
71
72
  [MessageRole.HiddenUser]: HiddenUserMessage;
72
73
  [MessageRole.Info]: InfoMessage;
74
+ [MessageRole.Loading]: LoadingMessage;
73
75
  [MessageRole.Pause]: PauseMessage;
74
76
  [MessageRole.Placeholder]: PlaceholderMessage;
75
77
  [MessageRole.Reasoning]: ReasoningMessage;
@@ -1,3 +1,4 @@
1
+ import 'tippy.js/dist/tippy.css';
1
2
  export type FileUploadBtnProps = {
2
3
  accept?: string;
3
4
  maxFiles?: number;
@@ -1,7 +1,10 @@
1
+ import { type TippyOptions } from 'vue-tippy';
1
2
  import type { IToolBtn } from '../../../types';
3
+ import 'tippy.js/dist/tippy.css';
2
4
  type __VLS_Props = IToolBtn & {
3
5
  active?: boolean;
4
6
  disabled?: boolean;
7
+ tippyOptions?: Partial<Omit<TippyOptions, 'getReferenceClientRect' | 'triggerTarget'>>;
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
10
  click: (data: IToolBtn, event: MouseEvent) => any;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ size?: number;
3
+ stopLoading?: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ size: number;
7
+ stopLoading: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  maxShortcutCount?: number;
5
5
  offset?: number;
6
6
  shortcuts?: Shortcut[];
7
+ excludeSelectors?: string[];
7
8
  };
8
9
  type __VLS_ModelProps = {
9
10
  'visible': boolean;
@@ -28,6 +29,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
28
29
  offset: number;
29
30
  maxShortcutCount: number;
30
31
  shortcuts: Shortcut[];
32
+ excludeSelectors: string[];
31
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
34
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
35
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,5 @@
1
1
  import type { ReferenceDocumentContent } from '../../../ag-ui/types/contents';
2
+ import 'tippy.js/dist/tippy.css';
2
3
  type __VLS_Props = {
3
4
  content: ReferenceDocumentContent[];
4
5
  };
@@ -3,19 +3,17 @@ import type { IAiSlashMenuItem } from '../../../types/editor';
3
3
  import type { TagSchema } from '../../../types/input';
4
4
  import 'tippy.js/dist/tippy.css';
5
5
  type __VLS_Props = {
6
+ modelValue: string | TagSchema;
6
7
  placeholder?: string;
7
8
  prompts?: string[];
8
9
  resources?: IAiSlashMenuItem[];
9
10
  };
10
- type __VLS_ModelProps = {
11
- modelValue: string | TagSchema;
12
- };
13
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
15
12
  cleanup: () => void;
16
13
  focus: () => void;
17
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- "update:modelValue": (value: string | ({
14
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
+ keydown: (event: KeyboardEvent & KeyboardPayload) => any;
16
+ "update:modelValue": (value: ({
19
17
  text: string;
20
18
  type: "text";
21
19
  } | {
@@ -25,13 +23,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
25
23
  readonly type: string;
26
24
  };
27
25
  type: "tag";
28
- })[][]) => any;
29
- } & {
30
- keydown: (event: KeyboardEvent & KeyboardPayload) => any;
26
+ })[][], selectedResourceList: IAiSlashMenuItem[]) => any;
31
27
  upload: (files: File[]) => any;
32
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
33
29
  onKeydown?: ((event: KeyboardEvent & KeyboardPayload) => any) | undefined;
34
- "onUpdate:modelValue"?: ((value: string | ({
30
+ "onUpdate:modelValue"?: ((value: ({
35
31
  text: string;
36
32
  type: "text";
37
33
  } | {
@@ -41,7 +37,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
41
37
  readonly type: string;
42
38
  };
43
39
  type: "tag";
44
- })[][]) => any) | undefined;
40
+ })[][], selectedResourceList: IAiSlashMenuItem[]) => any) | undefined;
45
41
  onUpload?: ((files: File[]) => any) | undefined;
46
42
  }>, {
47
43
  placeholder: string;
@@ -4,6 +4,7 @@ export type ChatInputProps = {
4
4
  defaultUploadFiles?: UploadFile[];
5
5
  inputMaxHeight?: number;
6
6
  messageStatus?: MessageStatus;
7
+ modelValue: string | TagSchema;
7
8
  onSendMessage?: (message: UserMessage['content'], docSchema: TagSchema) => Promise<void>;
8
9
  onStopSending?: () => Promise<void>;
9
10
  onUpload?: (files: File) => Promise<{
@@ -17,7 +18,6 @@ export type ChatInputProps = {
17
18
  };
18
19
  type __VLS_Props = ChatInputProps;
19
20
  type __VLS_ModelProps = {
20
- modelValue: string | TagSchema;
21
21
  'cite'?: string;
22
22
  };
23
23
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
@@ -43,7 +43,7 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_12: {
43
43
  } | undefined;
44
44
  status?: UploadStatus | undefined;
45
45
  }[];
46
- }, __VLS_47: {}, __VLS_71: {};
46
+ }, __VLS_48: {}, __VLS_72: {};
47
47
  type __VLS_Slots = {} & {
48
48
  top?: (props: typeof __VLS_1) => any;
49
49
  } & {
@@ -51,14 +51,16 @@ type __VLS_Slots = {} & {
51
51
  } & {
52
52
  files?: (props: typeof __VLS_12) => any;
53
53
  } & {
54
- attachment?: (props: typeof __VLS_47) => any;
54
+ attachment?: (props: typeof __VLS_48) => any;
55
55
  } & {
56
- 'send-icon'?: (props: typeof __VLS_71) => any;
56
+ 'send-icon'?: (props: typeof __VLS_72) => any;
57
57
  };
58
58
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
59
59
  focus: () => void;
60
60
  triggerSendMessage: () => Promise<void>;
61
61
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
+ "update:cite": (value: string) => any;
63
+ } & {
62
64
  "update:modelValue": (value: string | ({
63
65
  text: string;
64
66
  type: "text";
@@ -69,9 +71,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
69
71
  readonly type: string;
70
72
  };
71
73
  type: "tag";
72
- })[][]) => any;
73
- "update:cite": (value: string) => any;
74
- } & {
74
+ })[][], selectedResourceList: IAiSlashMenuItem[]) => any;
75
75
  selectShortcut: (shortcut: Shortcut) => any;
76
76
  deleteShortcut: () => any;
77
77
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -85,7 +85,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
85
85
  readonly type: string;
86
86
  };
87
87
  type: "tag";
88
- })[][]) => any) | undefined;
88
+ })[][], selectedResourceList: IAiSlashMenuItem[]) => any) | undefined;
89
89
  onSelectShortcut?: ((shortcut: Shortcut) => any) | undefined;
90
90
  onDeleteShortcut?: (() => any) | undefined;
91
91
  "onUpdate:cite"?: ((value: string) => any) | undefined;
@@ -1,4 +1,5 @@
1
1
  import { MessageStatus } from '../../../ag-ui/types';
2
+ import 'tippy.js/dist/tippy.css';
2
3
  type __VLS_Props = {
3
4
  messageState?: MessageStatus;
4
5
  };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };