@farris/x-ui 0.5.0 → 0.5.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.
@@ -1,7 +1,8 @@
1
1
  import { Plugin } from '../../vue';
2
2
  import { default as FXInputRecommend } from '../../src/input-recommend.component';
3
+ import { default as FXFollowupRecommendList } from '../../src/followup-recommend-list.component';
3
4
 
4
5
  export * from '../../src/types';
5
- export { FXInputRecommend };
6
+ export { FXInputRecommend, FXFollowupRecommendList };
6
7
  declare const _default: typeof FXInputRecommend & Plugin;
7
8
  export default _default;
@@ -0,0 +1,45 @@
1
+ import { PropType } from '../../../vue';
2
+ import { MessageContentInputRecommend } from '../../../types';
3
+
4
+ /**
5
+ * `agent/followup-suggestions` 归一化后的推荐问题列表。
6
+ * 与 {@link FXInputRecommend}(输入框上方芯片)同属 {@link MessageContentInputRecommend} 类型,
7
+ * 但以「助手回答工具栏下方列表」形态渲染,每条提供两种交互:
8
+ * - 点击左侧图标:把该问题追加到输入框(由外层 onAppend 处理);
9
+ * - 点击右侧文本:直接以该问题作为消息发送(由外层 onSend 处理)。
10
+ */
11
+ declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
12
+ content: {
13
+ type: PropType<MessageContentInputRecommend>;
14
+ required: true;
15
+ };
16
+ /** 点击文本直接发送(携带问题原文) */
17
+ onSend: {
18
+ type: PropType<(text: string) => void>;
19
+ default: undefined;
20
+ };
21
+ /** 点击图标追加到输入框(携带问题原文) */
22
+ onAppend: {
23
+ type: PropType<(text: string) => void>;
24
+ default: undefined;
25
+ };
26
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
27
+ content: {
28
+ type: PropType<MessageContentInputRecommend>;
29
+ required: true;
30
+ };
31
+ /** 点击文本直接发送(携带问题原文) */
32
+ onSend: {
33
+ type: PropType<(text: string) => void>;
34
+ default: undefined;
35
+ };
36
+ /** 点击图标追加到输入框(携带问题原文) */
37
+ onAppend: {
38
+ type: PropType<(text: string) => void>;
39
+ default: undefined;
40
+ };
41
+ }>> & Readonly<{}>, {
42
+ onSend: (text: string) => void;
43
+ onAppend: (text: string) => void;
44
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
45
+ export default _default;
@@ -18,7 +18,7 @@ export interface InputRecommendPickAction {
18
18
  }
19
19
  export interface MessageContentInputRecommend {
20
20
  type: 'InputRecommend';
21
- standardType?: 'agent/suggestions' | 'agent/input-recommend' | string;
21
+ standardType?: 'agent/suggestions' | 'agent/input-recommend' | 'agent/followup-suggestions' | string;
22
22
  title?: string;
23
23
  suggestions: string[];
24
24
  /**
@@ -30,4 +30,12 @@ export interface MessageContentInputRecommend {
30
30
  * 整卡默认点击动作。网关也可只传 `pickAction`(与该项同义,由归一化层写入)。
31
31
  */
32
32
  pickActionDefault?: InputRecommendPickAction;
33
+ /**
34
+ * `agent/followup-suggestions` 专属:本次推荐批次唯一标识,点击回传作 `fromSuggestion` 埋点。
35
+ */
36
+ suggestionId?: string;
37
+ /**
38
+ * `agent/followup-suggestions` 专属:本条建议归属的回答消息 id。
39
+ */
40
+ replyToMessageId?: string;
33
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farris/x-ui",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "可复用的 AI 对话组件",
5
5
  "type": "module",
6
6
  "main": "./farris.x-ui.umd.cjs",