@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
@@ -8,7 +8,7 @@ type __VLS_Slots = {
8
8
  status: MessageStatus;
9
9
  }) => VNode;
10
10
  };
11
- type __VLS_Props = Partial<UserMessageActionsProps> & Pick<MessageToolsProps, 'onAction'> & {
11
+ type __VLS_Props = Partial<UserMessageActionsProps> & Pick<MessageToolsProps, 'onAction' | 'tippyOptions'> & {
12
12
  message: Partial<Message>;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -6,7 +6,7 @@ export type UserMessageActionsProps = {
6
6
  onInputConfirm?: (content: UserMessage['content'], docSchema: TagSchema) => Promise<void>;
7
7
  onShortcutConfirm?: (formModel: Record<string, unknown>) => Promise<void>;
8
8
  };
9
- type __VLS_Props = Partial<UserMessage> & Pick<MessageToolsProps, 'onAction'> & UserMessageActionsProps;
9
+ type __VLS_Props = Partial<UserMessage> & Pick<MessageToolsProps, 'onAction' | 'tippyOptions'> & UserMessageActionsProps;
10
10
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import type { Token } from '../../../markdown-it';
2
+ import 'highlight.js/styles/github-dark.css';
2
3
  type __VLS_Props = {
3
4
  token: Token[];
4
5
  };
@@ -0,0 +1,19 @@
1
+ import { type TippyOptions } from 'vue-tippy';
2
+ import type { IToolBtn } from '../../../types';
3
+ export type DeleteToolProps = IToolBtn & {
4
+ disabled?: boolean;
5
+ tippyOptions?: Partial<Omit<TippyOptions, 'getReferenceClientRect' | 'triggerTarget'>>;
6
+ };
7
+ type __VLS_Props = IToolBtn & {
8
+ disabled?: boolean;
9
+ tippyOptions?: Partial<Omit<TippyOptions, 'getReferenceClientRect' | 'triggerTarget'>>;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ cancel: () => any;
13
+ confirm: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onCancel?: (() => any) | undefined;
16
+ onConfirm?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -2,11 +2,12 @@ import { type TippyOptions } from 'vue-tippy';
2
2
  import { MessageToolsStatus } from '../../types/tool';
3
3
  import type { UserMessage } from '../../ag-ui/types/messages';
4
4
  import type { IToolBtn, TagSchema } from '../../types';
5
+ import 'tippy.js/dist/tippy.css';
5
6
  export type MessageToolsProps = {
6
7
  messageTools?: IToolBtn[];
7
8
  messageToolsStatus?: MessageToolsStatus;
8
9
  onAction?: (tool: IToolBtn, content?: UserMessage['content'], docSchema?: TagSchema) => Promise<string[] | void>;
9
- tippyOptions?: Partial<Omit<TippyOptions, 'content' | 'getReferenceClientRect' | 'triggerTarget'>>;
10
+ tippyOptions?: Partial<Omit<TippyOptions, 'getReferenceClientRect' | 'triggerTarget'>>;
10
11
  updateTools?: IToolBtn[];
11
12
  };
12
13
  declare const __VLS_export: import("vue").DefineComponent<MessageToolsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -1,15 +1,19 @@
1
1
  import { type ComputedRef, type MaybeRef } from 'vue';
2
2
  export declare const CONTAINER_SCROLL_TOKEN: unique symbol;
3
+ export declare const SHOW_SCROLL_BOTTOM_BTN_DISTANCE = 100;
3
4
  export type ContainerScrollData = {
5
+ autoScrollEnabled: boolean;
4
6
  isScrollBottom: boolean;
5
7
  scrollBottomHeight: number;
6
8
  toScrollBottom: () => void;
7
9
  toScrollTop: () => void;
8
10
  };
9
11
  export declare const useContainerScrollProvider: (containerRef: MaybeRef<HTMLElement | null>, bottomRef: MaybeRef<HTMLElement | null>) => {
12
+ autoScrollEnabled: import("vue").ShallowRef<boolean, boolean>;
10
13
  isScrollBottom: import("vue").ShallowRef<boolean, boolean>;
11
14
  scrollBottomHeight: import("vue").ShallowRef<number, number>;
12
15
  toScrollBottom: () => void;
13
16
  toScrollTop: () => void;
17
+ debouncedShowScrollBottomBtn: import("vue").Ref<boolean, boolean>;
14
18
  };
15
19
  export declare const useContainerScrollConsumer: () => ComputedRef<ContainerScrollData> | undefined;
@@ -1,8 +1,8 @@
1
- import { type ShallowRef, type TemplateRef } from 'vue';
1
+ import { type ComputedRef, type ShallowRef, type TemplateRef } from 'vue';
2
2
  import type { ShortcutBtn } from '../components';
3
3
  export declare const useObserverVisibleList: <T>(containerRef: TemplateRef<HTMLElement>, itemRefs: ShallowRef<(HTMLElement | null)[]>, params: {
4
4
  gap: number;
5
- items: T[];
5
+ items: ComputedRef<T[]>;
6
6
  moreItemRef?: TemplateRef<InstanceType<typeof ShortcutBtn>>;
7
7
  }) => {
8
8
  visibleItems: ShallowRef<T[], T[]>;