@blueking/ai-blueking 0.3.22 → 0.3.24
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 +10 -3
- package/dist/ai-blueking.vue.d.ts +8 -5
- package/dist/types/index.d.ts +5 -0
- package/dist/vue2/index.es.min.js +2709 -2694
- package/dist/vue2/index.iife.min.js +47 -47
- package/dist/vue2/index.umd.min.js +28 -28
- package/dist/vue3/index.es.min.js +352 -337
- package/dist/vue3/index.iife.min.js +45 -45
- package/dist/vue3/index.umd.min.js +7 -7
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -567,13 +567,20 @@ npm i @blueking/bkui-library
|
|
|
567
567
|
1. 安装依赖
|
|
568
568
|
|
|
569
569
|
```bash
|
|
570
|
-
|
|
570
|
+
pnpm install
|
|
571
571
|
```
|
|
572
572
|
|
|
573
573
|
2. 启动开发服务器
|
|
574
574
|
|
|
575
575
|
```bash
|
|
576
|
-
|
|
576
|
+
pnpm run dev
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
3. 配置 hosts,以.woa.com 结尾的域名,以正常获取cookie
|
|
580
|
+
|
|
581
|
+
```bash
|
|
582
|
+
# 配置 hosts
|
|
583
|
+
echo "127.0.0.1 local.dev.woa.com" >> /etc/hosts
|
|
577
584
|
```
|
|
578
585
|
|
|
579
586
|
### Demo 运行模式
|
|
@@ -599,7 +606,7 @@ npm run dev
|
|
|
599
606
|
1. 配置本地 hosts
|
|
600
607
|
|
|
601
608
|
|
|
602
|
-
2. 设置必要的变量
|
|
609
|
+
2. 设置必要的变量 (不需要手动修改,playground 中已经存在)
|
|
603
610
|
|
|
604
611
|
```bash
|
|
605
612
|
# 网站前缀
|
|
@@ -25,7 +25,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
25
25
|
enablePopup: boolean;
|
|
26
26
|
}>, {
|
|
27
27
|
setInputMessage: (val: string) => void;
|
|
28
|
+
quickActions: (type: "translate" | "explanation", content: string) => void;
|
|
28
29
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
send: (data: {
|
|
31
|
+
content?: string | undefined;
|
|
32
|
+
cite?: string | undefined;
|
|
33
|
+
prompt?: string | undefined;
|
|
34
|
+
}) => void;
|
|
29
35
|
close: () => void;
|
|
30
36
|
stop: () => void;
|
|
31
37
|
clear: () => void;
|
|
@@ -34,10 +40,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
34
40
|
"ai-click": (val: string) => void;
|
|
35
41
|
"update:model": (val: string) => void;
|
|
36
42
|
"choose-prompt": (prompt: IPrompt) => void;
|
|
37
|
-
send: (data: {
|
|
38
|
-
content: string;
|
|
39
|
-
cite?: string | undefined;
|
|
40
|
-
}) => void;
|
|
41
43
|
"update:isShow": (val: boolean) => void;
|
|
42
44
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
|
|
43
45
|
enablePopup: boolean;
|
|
@@ -48,8 +50,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
48
50
|
onClear?: (() => any) | undefined;
|
|
49
51
|
onStop?: (() => any) | undefined;
|
|
50
52
|
onSend?: ((data: {
|
|
51
|
-
content
|
|
53
|
+
content?: string | undefined;
|
|
52
54
|
cite?: string | undefined;
|
|
55
|
+
prompt?: string | undefined;
|
|
53
56
|
}) => any) | undefined;
|
|
54
57
|
"onAi-click"?: ((val: string) => any) | undefined;
|
|
55
58
|
"onScroll-load"?: (() => any) | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -35,9 +35,14 @@ export interface IModel {
|
|
|
35
35
|
export interface IShortCut {
|
|
36
36
|
label: string;
|
|
37
37
|
prompt: string;
|
|
38
|
+
key?: string;
|
|
38
39
|
}
|
|
39
40
|
export interface ISendData {
|
|
40
41
|
content: string;
|
|
41
42
|
cite?: string;
|
|
42
43
|
prompt?: string;
|
|
43
44
|
}
|
|
45
|
+
export interface AIBluekingExpose {
|
|
46
|
+
setInputMessage: (val: string) => void;
|
|
47
|
+
quickActions: (type: 'explanation' | 'translate', content: string) => void;
|
|
48
|
+
}
|