@blueking/ai-blueking 0.3.23 → 0.3.25-beta.0

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.
@@ -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: string;
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;
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  click: (...args: any[]) => void;
3
+ shortcutClick: (...args: any[]) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
5
  onClick?: ((...args: any[]) => any) | undefined;
6
+ onShortcutClick?: ((...args: any[]) => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -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
+ }
@@ -23,3 +23,10 @@ export declare const throttle: <T>(fn: (t: T) => void, delay?: number) => (t: T)
23
23
  * @returns
24
24
  */
25
25
  export declare const debounce: <T, R>(fn: (P?: T) => R, delay?: number) => (params?: T) => void;
26
+ /**
27
+ * 处理提示词模板,替换模板中的变量
28
+ * @param prompt 提示词模板
29
+ * @param selectedText 选中的文本
30
+ * @returns 处理后的提示词
31
+ */
32
+ export declare const processPromptTemplate: (prompt: string, selectedText: string) => string;