@blueking/ai-blueking 0.2.6 → 0.2.8-beta.1

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.
@@ -1,4 +1,4 @@
1
- import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition } from './types';
1
+ import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition, IModel } from './types';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
3
  messages: IMessage[];
4
4
  prompts?: IPrompt[] | undefined;
@@ -15,12 +15,15 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
15
15
  scrollLoading?: boolean | undefined;
16
16
  scrollLoadingEnd?: boolean | undefined;
17
17
  alert?: string | undefined;
18
+ models?: IModel[] | undefined;
19
+ model?: string | undefined;
18
20
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
21
  close: () => void;
20
22
  stop: () => void;
21
23
  clear: () => void;
22
24
  "scroll-load": () => void;
23
25
  send: (val: string) => void;
26
+ "update:model": (val: string) => void;
24
27
  "choose-prompt": (prompt: IPrompt) => void;
25
28
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
26
29
  messages: IMessage[];
@@ -38,6 +41,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
38
41
  scrollLoading?: boolean | undefined;
39
42
  scrollLoadingEnd?: boolean | undefined;
40
43
  alert?: string | undefined;
44
+ models?: IModel[] | undefined;
45
+ model?: string | undefined;
41
46
  }>>> & {
42
47
  "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
43
48
  onClear?: (() => any) | undefined;
@@ -45,6 +50,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
45
50
  onSend?: ((val: string) => any) | undefined;
46
51
  "onScroll-load"?: (() => any) | undefined;
47
52
  onClose?: (() => any) | undefined;
53
+ "onUpdate:model"?: ((val: string) => any) | undefined;
48
54
  }, {}, {}>;
49
55
  export default _default;
50
56
 
@@ -1,4 +1,5 @@
1
1
  import type { IMessage } from '../types';
2
+ import 'highlight.js/styles/atom-one-dark.css';
2
3
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
4
  message: IMessage;
4
5
  userPhoto?: string | undefined;
@@ -1,4 +1,4 @@
1
- import type { IPositionLimit, ISize, IStartPosition } from '../types';
1
+ import type { IModel, IPositionLimit, ISize, IStartPosition } from '../types';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
3
  headBackground: string;
4
4
  positionLimit?: IPositionLimit | undefined;
@@ -6,6 +6,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
6
6
  logo?: string | undefined;
7
7
  name?: string | undefined;
8
8
  startPosition?: IStartPosition | undefined;
9
+ models?: IModel[] | undefined;
10
+ model?: string | undefined;
9
11
  }>, {
10
12
  headBackground: string;
11
13
  positionLimit: () => {
@@ -28,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
28
30
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
31
  close: () => void;
30
32
  clear: () => void;
33
+ "choose-model": (val: string) => void;
31
34
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
32
35
  headBackground: string;
33
36
  positionLimit?: IPositionLimit | undefined;
@@ -35,6 +38,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
35
38
  logo?: string | undefined;
36
39
  name?: string | undefined;
37
40
  startPosition?: IStartPosition | undefined;
41
+ models?: IModel[] | undefined;
42
+ model?: string | undefined;
38
43
  }>, {
39
44
  headBackground: string;
40
45
  positionLimit: () => {
@@ -57,6 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
57
62
  }>>> & {
58
63
  onClear?: (() => any) | undefined;
59
64
  onClose?: (() => any) | undefined;
65
+ "onChoose-model"?: ((val: string) => any) | undefined;
60
66
  }, {
61
67
  headBackground: string;
62
68
  positionLimit: IPositionLimit;
@@ -12,15 +12,16 @@ export declare const langData: {
12
12
  readonly 返回最新: "Latest";
13
13
  readonly 终止生成: "Stop";
14
14
  readonly 向上滚动加载更多记录: "Scroll up to load more records";
15
- readonly 日: "sunday";
16
- readonly 一: "monday";
17
- readonly 二: "tuesday";
18
- readonly 三: "wednesday";
19
- readonly 四: "thursday";
20
- readonly 五: "friday";
21
- readonly 六: "saturday";
15
+ readonly 日: " sunday";
16
+ readonly 一: " monday";
17
+ readonly 二: " tuesday";
18
+ readonly 三: " wednesday";
19
+ readonly 四: " thursday";
20
+ readonly 五: " friday";
21
+ readonly 六: " saturday";
22
22
  readonly 昨天: "yesterday";
23
23
  readonly 本周: "this week";
24
24
  readonly 上周: "last week";
25
+ readonly 复制成功: "Copy success";
25
26
  };
26
- export declare const t: (key: keyof typeof langData) => "BK GPT" | "shrink down" | "expand upward" | "Empty chat records" | "close" | "The content is being executed, please send it after the execution is completed." | "Send" | "You can type \"/\" to see more Prompts" | "Please input" | "Latest" | "Stop" | "Scroll up to load more records" | "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "yesterday" | "this week" | "last week" | "小鲸" | "向下收缩" | "向上扩展" | "清空聊天记录" | "关闭" | "内容正在执行中,请执行完成后再发送" | "发送" | "您可以键入 “/” 查看更多Prompt" | "请输入" | "返回最新" | "终止生成" | "向上滚动加载更多记录" | "日" | "一" | "二" | "三" | "四" | "五" | "六" | "昨天" | "本周" | "上周";
27
+ export declare const t: (key: keyof typeof langData) => "BK GPT" | "shrink down" | "expand upward" | "Empty chat records" | "close" | "The content is being executed, please send it after the execution is completed." | "Send" | "You can type \"/\" to see more Prompts" | "Please input" | "Latest" | "Stop" | "Scroll up to load more records" | " sunday" | " monday" | " tuesday" | " wednesday" | " thursday" | " friday" | " saturday" | "yesterday" | "this week" | "last week" | "Copy success" | "小鲸" | "向下收缩" | "向上扩展" | "清空聊天记录" | "关闭" | "内容正在执行中,请执行完成后再发送" | "发送" | "您可以键入 “/” 查看更多Prompt" | "请输入" | "返回最新" | "终止生成" | "向上滚动加载更多记录" | "日" | "一" | "二" | "三" | "四" | "五" | "六" | "昨天" | "本周" | "上周" | "复制成功";
@@ -27,3 +27,7 @@ export interface IChatHistory {
27
27
  role: RoleType;
28
28
  content: string;
29
29
  }
30
+ export interface IModel {
31
+ id: string;
32
+ name: string;
33
+ }
@@ -16,3 +16,10 @@ export declare const isJSON: (str: string) => boolean;
16
16
  * @returns
17
17
  */
18
18
  export declare const throttle: <T>(fn: (t: T) => void, delay?: number) => (t: T) => false | undefined;
19
+ /**
20
+ * 防抖,延迟一段时间执行
21
+ * @param {*} fn 需要执行的函数
22
+ * @param {*} delay 延迟时间,默认200
23
+ * @returns
24
+ */
25
+ export declare const debounce: <T, R>(fn: (P?: T) => R, delay?: number) => (params?: T) => void;