@blueking/ai-blueking 0.3.25 → 0.3.26

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/README.md CHANGED
@@ -442,7 +442,10 @@ AI 小鲸支持渲染可点击的交互式 HTML 元素。以下是如何实现
442
442
  Vue2 下,需要安装 npm 包,里面是 vue3 资源
443
443
 
444
444
  ```bash
445
- npm i @blueking/bkui-library
445
+ npm i @blueking/ai-blueking
446
+ ```
447
+
448
+ ```vue
446
449
  <template>
447
450
  <AIBlueking
448
451
  :background="background"
@@ -1,4 +1,5 @@
1
- import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition, IModel, IShortCut } from './types';
1
+ import { Alert } from 'bkui-vue';
2
+ import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition, IModel, ISendData, IShortCut } from './types';
2
3
  interface IProps {
3
4
  messages: IMessage[];
4
5
  prompts?: IPrompt[];
@@ -14,7 +15,7 @@ interface IProps {
14
15
  logo?: string;
15
16
  scrollLoading?: boolean;
16
17
  scrollLoadingEnd?: boolean;
17
- alert?: string;
18
+ alert?: InstanceType<typeof Alert>['$props'] | string;
18
19
  models?: IModel[];
19
20
  model?: string;
20
21
  isShow?: boolean;
@@ -27,11 +28,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
27
28
  setInputMessage: (val: string) => void;
28
29
  quickActions: (type: "translate" | "explanation", content: string) => void;
29
30
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
- send: (data: {
31
- content?: string | undefined;
32
- cite?: string | undefined;
33
- prompt?: string | undefined;
34
- }) => void;
31
+ send: (data: ISendData) => void;
35
32
  close: () => void;
36
33
  stop: () => void;
37
34
  clear: () => void;
@@ -49,11 +46,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
49
46
  "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
50
47
  onClear?: (() => any) | undefined;
51
48
  onStop?: (() => any) | undefined;
52
- onSend?: ((data: {
53
- content?: string | undefined;
54
- cite?: string | undefined;
55
- prompt?: string | undefined;
56
- }) => any) | undefined;
49
+ onSend?: ((data: ISendData) => any) | undefined;
57
50
  "onAi-click"?: ((val: string) => any) | undefined;
58
51
  "onScroll-load"?: (() => any) | undefined;
59
52
  "onUpdate:model"?: ((val: string) => any) | undefined;
@@ -1,3 +1,4 @@
1
+ import { Alert } from 'bkui-vue';
1
2
  import type { IMessage, IPrompt, IShortCut, ISendData } from '../types/index';
2
3
  interface IProps {
3
4
  messages: IMessage[];
@@ -8,7 +9,7 @@ interface IProps {
8
9
  placeholder?: string;
9
10
  scrollLoading?: boolean;
10
11
  scrollLoadingEnd?: boolean;
11
- alert?: string;
12
+ alert?: InstanceType<typeof Alert>['$props'] | string;
12
13
  shortcuts?: IShortCut[];
13
14
  }
14
15
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {