@apform-ui/core 1.14.2 → 1.15.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.
- package/dist/apform-ui.css +1 -1
- package/dist/apform-ui.js +2586 -2571
- package/dist/apform-ui.umd.cjs +39 -39
- package/dist/components/NodeResultPreview/NodeResultPreview.vue.d.ts +10 -1
- package/dist/index.d.ts +2 -2
- package/dist/utils/businessResultTables.d.ts +10 -1
- package/dist/utils/resolveResultBlocks.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArtifactItem } from '../../types/artifact';
|
|
2
|
-
import { ResultBlock } from '../../utils/resolveResultBlocks';
|
|
2
|
+
import { ResolveResultOptions, ResultBlock } from '../../utils/resolveResultBlocks';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/** 已解析块;与 data 二选一 */
|
|
5
5
|
blocks?: ResultBlock[];
|
|
@@ -9,6 +9,15 @@ type __VLS_Props = {
|
|
|
9
9
|
streamingText?: string;
|
|
10
10
|
streamingReasoning?: string;
|
|
11
11
|
role?: 'input' | 'output';
|
|
12
|
+
/**
|
|
13
|
+
* 受众;默认 operator(完整调试字段)。
|
|
14
|
+
* 终端聊天气泡传 user,或用 include* 细粒度覆盖。
|
|
15
|
+
*/
|
|
16
|
+
audience?: ResolveResultOptions['audience'];
|
|
17
|
+
/** 是否输出剩余「其他字段」;未传时随 audience */
|
|
18
|
+
includeLeftoverFields?: boolean;
|
|
19
|
+
/** 是否启用 fallback 字段表;未传时随 audience */
|
|
20
|
+
includeFallbackFieldTables?: boolean;
|
|
12
21
|
/** 思考块默认折叠 */
|
|
13
22
|
thinkingCollapsed?: boolean;
|
|
14
23
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -112,8 +112,8 @@ export type { StructuredJsonKind } from './utils/structuredJson';
|
|
|
112
112
|
export { extractBusinessResultTables, extractChartOption, } from './utils/businessResultTables';
|
|
113
113
|
export type { BusinessResultTable, ChartOptionExtract, } from './utils/businessResultTables';
|
|
114
114
|
export { resolveResultBlocks } from './utils/resolveResultBlocks';
|
|
115
|
-
export type { ResultKind, ResultBlock, ResultBlockEntry, ResultHitlItem, ResolveResultOptions, } from './utils/resolveResultBlocks';
|
|
115
|
+
export type { ResultKind, ResultBlock, ResultBlockEntry, ResultHitlItem, ResultAudience, ResolveResultOptions, } from './utils/resolveResultBlocks';
|
|
116
116
|
export { COLORS, CHART_COLORS, TEXT_COLORS, SPACING, BORDER_RADIUS, SHADOWS, DURATION, Z_INDEX, FONT_SIZE, CONTROL_HEIGHT, LAYOUT_HEIGHT, ICON_SIZE, PAGE, FORM, AVATAR_SIZE, } from './tokens';
|
|
117
|
-
export declare const SCHEMA_UI_VERSION = "1.
|
|
117
|
+
export declare const SCHEMA_UI_VERSION = "1.15.1";
|
|
118
118
|
export declare const EP_FORK_BASE = "2.14.2";
|
|
119
119
|
export declare const EP_FORK_DATE = "2026-08-27";
|
|
@@ -20,12 +20,21 @@ export interface ChartOptionExtract {
|
|
|
20
20
|
chartType: string;
|
|
21
21
|
option: Record<string, unknown>;
|
|
22
22
|
}
|
|
23
|
+
/** 业务表提取选项 */
|
|
24
|
+
export interface ExtractBusinessResultTablesOptions {
|
|
25
|
+
/**
|
|
26
|
+
* 是否启用「任意对象数组字段 → 表」的 fallback。
|
|
27
|
+
* 默认 true;终端用户预览应关,避免把 images 元数据表等调试残留渲出来。
|
|
28
|
+
*/
|
|
29
|
+
includeFallbackFieldTables?: boolean;
|
|
30
|
+
}
|
|
23
31
|
/**
|
|
24
32
|
* 从节点 / 消息 output 提取业务表格
|
|
25
33
|
* @param nodeType 节点类型(可选;缺省时按字段形态推断)
|
|
26
34
|
* @param output 节点或消息输出
|
|
35
|
+
* @param options 提取选项
|
|
27
36
|
*/
|
|
28
|
-
export declare function extractBusinessResultTables(nodeType: string | undefined, output: unknown): BusinessResultTable[];
|
|
37
|
+
export declare function extractBusinessResultTables(nodeType: string | undefined, output: unknown, options?: ExtractBusinessResultTablesOptions): BusinessResultTable[];
|
|
29
38
|
/**
|
|
30
39
|
* 提取可渲染的 ECharts option(非 table)
|
|
31
40
|
* @param nodeType 节点类型;缺省时按 chartType+option 形态识别(供 Chat 消息流)
|
|
@@ -31,12 +31,33 @@ export interface ResultBlock {
|
|
|
31
31
|
/** script / storyboard 原始对象 */
|
|
32
32
|
data?: unknown;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* 结果预览受众。
|
|
36
|
+
* - operator:节点调试 / 执行详情,展示完整字段(默认)
|
|
37
|
+
* - user:终端用户气泡,只保留人读结果
|
|
38
|
+
*/
|
|
39
|
+
export type ResultAudience = 'operator' | 'user';
|
|
34
40
|
/** 解析选项 */
|
|
35
41
|
export interface ResolveResultOptions {
|
|
36
42
|
nodeType?: string;
|
|
37
43
|
streamingText?: string;
|
|
38
44
|
streamingReasoning?: string;
|
|
39
45
|
role?: 'input' | 'output';
|
|
46
|
+
/**
|
|
47
|
+
* 受众;默认 operator。
|
|
48
|
+
* user 时默认关闭剩余「其他字段」与 fallback 字段表,应用侧可再被细粒度开关覆盖。
|
|
49
|
+
*/
|
|
50
|
+
audience?: ResultAudience;
|
|
51
|
+
/**
|
|
52
|
+
* 是否输出剩余字段 keyvalue(「其他字段」/「输入字段」)。
|
|
53
|
+
* 未传时:operator → true,user → false。
|
|
54
|
+
*/
|
|
55
|
+
includeLeftoverFields?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 是否启用「任意对象数组字段 → 表」fallback(如 images 元数据表)。
|
|
58
|
+
* 未传时:operator → true,user → false。
|
|
59
|
+
*/
|
|
60
|
+
includeFallbackFieldTables?: boolean;
|
|
40
61
|
}
|
|
41
62
|
/**
|
|
42
63
|
* 解析人读结果块
|