@farris/x-ui 0.0.7 → 0.0.9
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/agent-thinking/index.d.ts +7 -0
- package/agent-thinking/src/types.d.ts +7 -0
- package/attachment-file/index.d.ts +7 -0
- package/attachment-file/src/types.d.ts +10 -0
- package/bubble/src/bubble.component.d.ts +6 -0
- package/bubble/src/bubble.props.d.ts +13 -0
- package/bubble/src/components/attachment/bubble-attachment.component.d.ts +3 -0
- package/bubble/src/components/attachment/bubble-attachment.props.d.ts +5 -0
- package/bubble/src/components/bubble-think/bubble-think.props.d.ts +1 -1
- package/bubble/src/components/text-content/composition/block-type.d.ts +7 -5
- package/bubble/src/components/text-content/utils/block-renderer.d.ts +1 -1
- package/bubble/src/composition/types.d.ts +4 -2
- package/bubble/src/composition/use-widget-content.d.ts +1 -2
- package/components.d.ts +31 -2
- package/error-reminder/index.d.ts +7 -0
- package/error-reminder/src/types.d.ts +7 -0
- package/farris.x-ui.esm.js +5736 -5584
- package/farris.x-ui.umd.cjs +76 -76
- package/hitl-question/index.d.ts +7 -0
- package/hitl-question/src/types.d.ts +43 -0
- package/index.css +1 -1
- package/input-recommend/index.d.ts +7 -0
- package/input-recommend/src/types.d.ts +33 -0
- package/link-card/index.d.ts +7 -0
- package/link-card/src/types.d.ts +14 -0
- package/package.json +1 -1
- package/prompts/src/components/prompt.component.d.ts +1 -1
- package/prompts/src/prompts.component.d.ts +3 -3
- package/reference-sources/index.d.ts +7 -0
- package/reference-sources/src/types.d.ts +9 -0
- package/tool-use/index.d.ts +1 -0
- package/tool-use/src/tool-use.component.d.ts +2 -2
- package/tool-use/src/types.d.ts +22 -0
- package/unknown-enterprise/index.d.ts +7 -0
- package/unknown-enterprise/src/types.d.ts +7 -0
- package/user-auth/index.d.ts +7 -0
- package/user-auth/src/types.d.ts +13 -0
- package/bubble/src/components/text-content/renderers/a2ui-renderer.d.ts +0 -3
- package/bubble/src/components/text-content/utils/widget-to-messages.d.ts +0 -44
- package/enterprise-cloud/index.d.ts +0 -16
- package/enterprise-cloud/src/types.d.ts +0 -155
- /package/{enterprise-cloud → agent-thinking}/src/agent-thinking.component.d.ts +0 -0
- /package/{enterprise-cloud → attachment-file}/src/attachment-file.component.d.ts +0 -0
- /package/{enterprise-cloud → error-reminder}/src/error-reminder.component.d.ts +0 -0
- /package/{enterprise-cloud → hitl-question}/src/hitl-question.component.d.ts +0 -0
- /package/{enterprise-cloud → input-recommend}/src/input-recommend.component.d.ts +0 -0
- /package/{enterprise-cloud → link-card}/src/link-card.component.d.ts +0 -0
- /package/{enterprise-cloud → reference-sources}/src/reference-sources.component.d.ts +0 -0
- /package/{enterprise-cloud → unknown-enterprise}/src/unknown-enterprise.component.d.ts +0 -0
- /package/{enterprise-cloud → user-auth}/src/user-auth.component.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plugin } from '../../vue';
|
|
2
|
+
import { default as FXAgentThinking } from '../../src/agent-thinking.component';
|
|
3
|
+
|
|
4
|
+
export * from '../../src/types';
|
|
5
|
+
export { FXAgentThinking };
|
|
6
|
+
declare const _default: typeof FXAgentThinking & Plugin;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plugin } from '../../vue';
|
|
2
|
+
import { default as FXAttachmentFile } from '../../src/attachment-file.component';
|
|
3
|
+
|
|
4
|
+
export * from '../../src/types';
|
|
5
|
+
export { FXAttachmentFile };
|
|
6
|
+
declare const _default: typeof FXAttachmentFile & Plugin;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 企业云「文件」类资源消息(附件):对应文档中 category/name/size/media */
|
|
2
|
+
export interface MessageContentAttachmentFile {
|
|
3
|
+
type: 'AttachmentFile';
|
|
4
|
+
standardType?: 'resource/file' | string;
|
|
5
|
+
category: string;
|
|
6
|
+
name: string;
|
|
7
|
+
size: number;
|
|
8
|
+
/** 云盘或下载路径 id / URL,演示可写占位 */
|
|
9
|
+
media: string;
|
|
10
|
+
}
|
|
@@ -10,6 +10,8 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
10
10
|
showAvatar: boolean;
|
|
11
11
|
styles: Record<import('../../../..').AppearanceType, import('../../../vue').CSSProperties>;
|
|
12
12
|
attachments: Attachment[];
|
|
13
|
+
attachmentRowClickOpensPreview: boolean;
|
|
14
|
+
attachmentShowDownload: boolean;
|
|
13
15
|
content?: import('../../../..').BubbleContent | undefined;
|
|
14
16
|
onPreview?: ((config: import('../../../../..').PreviewConfig) => void) | undefined;
|
|
15
17
|
onUserAuthConfirm?: ((optionId: string, name: string, message?: string) => void) | undefined;
|
|
@@ -26,6 +28,8 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
26
28
|
showAvatar: boolean;
|
|
27
29
|
styles: Record<import('../../../..').AppearanceType, import('../../../vue').CSSProperties>;
|
|
28
30
|
attachments: Attachment[];
|
|
31
|
+
attachmentRowClickOpensPreview: boolean;
|
|
32
|
+
attachmentShowDownload: boolean;
|
|
29
33
|
content?: import('../../../..').BubbleContent | undefined;
|
|
30
34
|
onPreview?: ((config: import('../../../../..').PreviewConfig) => void) | undefined;
|
|
31
35
|
onUserAuthConfirm?: ((optionId: string, name: string, message?: string) => void) | undefined;
|
|
@@ -47,6 +51,8 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
47
51
|
compositeTailRender: () => import('../../../vue').VNode | null | undefined;
|
|
48
52
|
onDynamicComponentsDetected: (configs: import('../../../../..').DynamicComponentConfig[]) => void;
|
|
49
53
|
onShowDynamicComponent: (config: import('../../../../..').DynamicComponentConfig) => void;
|
|
54
|
+
attachmentRowClickOpensPreview: boolean;
|
|
55
|
+
attachmentShowDownload: boolean;
|
|
50
56
|
}, {}, {
|
|
51
57
|
'fx-user-auth-inline': import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
|
|
52
58
|
content: {
|
|
@@ -80,5 +80,18 @@ export declare const bubbleProps: {
|
|
|
80
80
|
type: PropType<(config: DynamicComponentConfig) => void>;
|
|
81
81
|
default: undefined;
|
|
82
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* 为 false 时附件主行点击不触发 `onPreview`(仍可用下载按钮下载)。
|
|
85
|
+
* 主会话助手带 `bubbleAttachments` 时宜为 false,避免与「仅下载」预期冲突。
|
|
86
|
+
*/
|
|
87
|
+
attachmentRowClickOpensPreview: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
/** 为 false 时隐藏附件下载按钮(如分栏镜像区仅保留预览)。 */
|
|
92
|
+
attachmentShowDownload: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
83
96
|
};
|
|
84
97
|
export type BubbleProps = ExtractPropTypes<typeof bubbleProps>;
|
|
@@ -4,12 +4,14 @@ declare const _default: import('../../../../../vue').DefineComponent<{
|
|
|
4
4
|
attachments: Attachment[];
|
|
5
5
|
enableBatchPreview: boolean;
|
|
6
6
|
enableFixedWidth: boolean;
|
|
7
|
+
showDownloadButton: boolean;
|
|
7
8
|
onPreview?: ((attachment: Attachment) => void) | undefined;
|
|
8
9
|
onBatchPreview?: ((attachments: Attachment[]) => void) | undefined;
|
|
9
10
|
}, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../../../vue').ComponentOptionsMixin, import('../../../../../vue').ComponentOptionsMixin, {}, string, import('../../../../../vue').PublicProps, Readonly<{
|
|
10
11
|
attachments: Attachment[];
|
|
11
12
|
enableBatchPreview: boolean;
|
|
12
13
|
enableFixedWidth: boolean;
|
|
14
|
+
showDownloadButton: boolean;
|
|
13
15
|
onPreview?: ((attachment: Attachment) => void) | undefined;
|
|
14
16
|
onBatchPreview?: ((attachments: Attachment[]) => void) | undefined;
|
|
15
17
|
}> & Readonly<{}>, {
|
|
@@ -17,6 +19,7 @@ declare const _default: import('../../../../../vue').DefineComponent<{
|
|
|
17
19
|
onPreview: (attachment: Attachment) => void;
|
|
18
20
|
enableBatchPreview: boolean;
|
|
19
21
|
enableFixedWidth: boolean;
|
|
22
|
+
showDownloadButton: boolean;
|
|
20
23
|
onBatchPreview: (attachments: Attachment[]) => void;
|
|
21
24
|
}, {}, {}, {}, string, import('../../../../../vue').ComponentProvideOptions, true, {}, any>;
|
|
22
25
|
export default _default;
|
|
@@ -14,6 +14,11 @@ export declare const bubbleAttachmentProps: {
|
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
|
+
/** 为 false 时不展示下载按钮(行点击预览仍由 onPreview 控制) */
|
|
18
|
+
showDownloadButton: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
17
22
|
/** 预览附件时触发 */
|
|
18
23
|
onPreview: {
|
|
19
24
|
type: PropType<(attachment: Attachment) => void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from '../../../../../vue';
|
|
2
2
|
import { ThinkContent } from '../../../../../../../composition/types';
|
|
3
|
-
import { OutputMode } from '
|
|
3
|
+
import { OutputMode } from '../../../../../../../../../common';
|
|
4
4
|
|
|
5
5
|
export declare const bubbleThinkProps: {
|
|
6
6
|
/** 思考内容 */
|
|
@@ -2,7 +2,8 @@ import { DynamicComponentConfig } from '../../../../../../../../../../../dynamic
|
|
|
2
2
|
|
|
3
3
|
export declare enum BlockType {
|
|
4
4
|
Text = "text",
|
|
5
|
-
|
|
5
|
+
/** @deprecated FlowUI 渲染逻辑已迁移至 Venus/x-conversation 层,此类型不再使用 */
|
|
6
|
+
FlowUIComplete = "flowui-complete",
|
|
6
7
|
AssistantWidgetComplete = "assistant-widget-complete",
|
|
7
8
|
AssistantWidgetPending = "assistant-widget-pending",
|
|
8
9
|
DynamicComponentComplete = "dynamic-component-complete",
|
|
@@ -12,10 +13,11 @@ export interface TextBlock {
|
|
|
12
13
|
type: BlockType.Text;
|
|
13
14
|
raw: string;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/** @deprecated FlowUI 渲染逻辑已迁移至 Venus/x-conversation 层,此类型不再使用 */
|
|
17
|
+
export interface FlowUICompleteBlock {
|
|
18
|
+
type: BlockType.FlowUIComplete;
|
|
17
19
|
raw: string;
|
|
18
|
-
|
|
20
|
+
flowUiData: Record<string, unknown>;
|
|
19
21
|
}
|
|
20
22
|
export interface AssistantWidgetCompleteBlock {
|
|
21
23
|
type: BlockType.AssistantWidgetComplete;
|
|
@@ -38,4 +40,4 @@ export interface DynamicComponentPendingBlock {
|
|
|
38
40
|
raw: string;
|
|
39
41
|
position: 'inline' | 'right' | null;
|
|
40
42
|
}
|
|
41
|
-
export type ParsedBlock = TextBlock |
|
|
43
|
+
export type ParsedBlock = TextBlock | FlowUICompleteBlock | AssistantWidgetCompleteBlock | AssistantWidgetPendingBlock | DynamicComponentCompleteBlock | DynamicComponentPendingBlock;
|
|
@@ -9,5 +9,5 @@ export interface RenderContext {
|
|
|
9
9
|
renderFileEmbeddedContent: (content: EmbeddedContent, ctx: EmbeddedContentRenderContext) => VNode;
|
|
10
10
|
}
|
|
11
11
|
export type BlockRenderer = (block: ParsedBlock, index: number, ctx: RenderContext) => VNode | VNode[] | null;
|
|
12
|
-
export type RendererRegistry = Record<BlockType, BlockRenderer
|
|
12
|
+
export type RendererRegistry = Partial<Record<BlockType, BlockRenderer>>;
|
|
13
13
|
export declare function createRendererRegistry(): RendererRegistry;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VNode } from '../../../../vue';
|
|
2
2
|
import { DetailViewMode, TodoItemStatus, TodoWorkItem } from '../../../../../../../todo';
|
|
3
|
-
import { MessageContentUserAuth
|
|
3
|
+
import { MessageContentUserAuth } from '../../../../../../../user-auth/src/types';
|
|
4
|
+
import { MessageContentToolUse } from '../../../../../../../tool-use/src/types';
|
|
4
5
|
import { MessageContentAppPreview } from '../../../../../../../app-preview/src/types';
|
|
5
6
|
|
|
6
7
|
/** 气泡消息文本格式化类型 */
|
|
@@ -16,7 +17,8 @@ export type BubbleCompositeInlineBlock = {
|
|
|
16
17
|
/** 文本类型消息内容 */
|
|
17
18
|
export interface BubbleContent {
|
|
18
19
|
type?: 'text';
|
|
19
|
-
|
|
20
|
+
/** 正文文本,或者预渲染好的 VNode */
|
|
21
|
+
text: string | VNode;
|
|
20
22
|
textFormat?: BubbleTextFormatType;
|
|
21
23
|
/** 正文与 footer 之间按序渲染的网关块(如 request-run 按钮、app-preview) */
|
|
22
24
|
compositeInlineBlocks?: BubbleCompositeInlineBlock[];
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function isWidgetBlock(text: string): boolean;
|
|
40
40
|
/**
|
|
41
|
-
* 解析 displayText,将包含 assistant-widget
|
|
41
|
+
* 解析 displayText,将包含 assistant-widget 代码块的内容分割成多个部分
|
|
42
42
|
* 支持完整和不完整的 widget 结构
|
|
43
43
|
* 支持 ``` 后紧跟换行符 + 空格 + widget类型 的格式
|
|
44
44
|
*/
|
|
45
45
|
export declare function formatDisplayText(displayText: string): string[];
|
|
46
46
|
export declare function parseAssistantWidget(input: string): any;
|
|
47
|
-
export declare function parseA2UIWidget(input: string): any;
|
|
48
47
|
export declare function getWidgetImplOptions(input: string): any;
|
package/components.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { MessageContentAgentThinking } from '../agent-thinking';
|
|
2
|
+
import { MessageContentAttachmentFile } from '../attachment-file';
|
|
3
|
+
import { MessageContentErrorReminder } from '../error-reminder';
|
|
4
|
+
import { MessageContentHitlQuestion } from '../hitl-question';
|
|
5
|
+
import { MessageContentInputRecommend } from '../input-recommend';
|
|
6
|
+
import { MessageContentLinkCard } from '../link-card';
|
|
7
|
+
import { MessageContentReferenceSources } from '../reference-sources';
|
|
8
|
+
import { MessageContentToolUse } from '../tool-use';
|
|
9
|
+
import { MessageContentUnknownEnterprise } from '../unknown-enterprise';
|
|
10
|
+
import { MessageContentUserAuth } from '../user-auth';
|
|
1
11
|
export { default as FXAppPreview } from '../app-preview';
|
|
2
12
|
export * from '../app-preview';
|
|
3
13
|
export { default as FXBubble, FXBubbleAction } from '../bubble';
|
|
@@ -10,8 +20,27 @@ export { default as FXConfirmDialog } from '../confirm-dialog';
|
|
|
10
20
|
export * from '../confirm-dialog';
|
|
11
21
|
export { default as FXCoding } from '../coding';
|
|
12
22
|
export * from '../coding';
|
|
13
|
-
export {
|
|
14
|
-
export * from '../
|
|
23
|
+
export { default as FXAgentThinking } from '../agent-thinking';
|
|
24
|
+
export * from '../agent-thinking';
|
|
25
|
+
export { default as FXAttachmentFile } from '../attachment-file';
|
|
26
|
+
export * from '../attachment-file';
|
|
27
|
+
export { default as FXErrorReminder } from '../error-reminder';
|
|
28
|
+
export * from '../error-reminder';
|
|
29
|
+
export { default as FXHitlQuestion } from '../hitl-question';
|
|
30
|
+
export * from '../hitl-question';
|
|
31
|
+
export { default as FXInputRecommend } from '../input-recommend';
|
|
32
|
+
export * from '../input-recommend';
|
|
33
|
+
export { default as FXLinkCard } from '../link-card';
|
|
34
|
+
export * from '../link-card';
|
|
35
|
+
export { default as FXReferenceSources } from '../reference-sources';
|
|
36
|
+
export * from '../reference-sources';
|
|
37
|
+
export { default as FXToolUse } from '../tool-use';
|
|
38
|
+
export * from '../tool-use';
|
|
39
|
+
export { default as FXUnknownEnterprise } from '../unknown-enterprise';
|
|
40
|
+
export * from '../unknown-enterprise';
|
|
41
|
+
export { default as FXUserAuth } from '../user-auth';
|
|
42
|
+
export * from '../user-auth';
|
|
43
|
+
export type EnterpriseCloudMessageContent = MessageContentAgentThinking | MessageContentToolUse | MessageContentReferenceSources | MessageContentInputRecommend | MessageContentUserAuth | MessageContentErrorReminder | MessageContentLinkCard | MessageContentUnknownEnterprise | MessageContentAttachmentFile | MessageContentHitlQuestion;
|
|
15
44
|
export { default as FXFileOperation } from '../file-operation';
|
|
16
45
|
export * from '../file-operation';
|
|
17
46
|
export { default as FXGenerateProcess } from '../generate-process';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plugin } from '../../vue';
|
|
2
|
+
import { default as FXErrorReminder } from '../../src/error-reminder.component';
|
|
3
|
+
|
|
4
|
+
export * from '../../src/types';
|
|
5
|
+
export { FXErrorReminder };
|
|
6
|
+
declare const _default: typeof FXErrorReminder & Plugin;
|
|
7
|
+
export default _default;
|