@asteby/metacore-runtime-react 37.6.0 → 38.1.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.
- package/CHANGELOG.md +19 -0
- package/dist/action-modal-dispatcher.d.ts.map +1 -1
- package/dist/action-modal-dispatcher.js +2 -3
- package/dist/assist-interview.d.ts +67 -0
- package/dist/assist-interview.d.ts.map +1 -0
- package/dist/assist-interview.js +214 -0
- package/dist/dialogs/dynamic-record.d.ts.map +1 -1
- package/dist/dialogs/dynamic-record.js +5 -1
- package/dist/dynamic-form.d.ts.map +1 -1
- package/dist/dynamic-form.js +2 -1
- package/dist/form-layout-ui.d.ts +8 -4
- package/dist/form-layout-ui.d.ts.map +1 -1
- package/dist/form-layout-ui.js +9 -7
- package/dist/form-layout.d.ts +18 -0
- package/dist/form-layout.d.ts.map +1 -1
- package/dist/form-layout.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +3 -3
- package/src/action-modal-dispatcher.tsx +11 -20
- package/src/assist-interview.tsx +411 -0
- package/src/dialogs/dynamic-record.tsx +31 -8
- package/src/dynamic-form.tsx +13 -2
- package/src/form-layout-ui.tsx +13 -22
- package/src/form-layout.ts +20 -0
- package/src/index.ts +2 -0
package/src/form-layout.ts
CHANGED
|
@@ -31,6 +31,23 @@ export interface FormSection {
|
|
|
31
31
|
* Tolerates the camelCase alias, same as fields. */
|
|
32
32
|
visible_when?: VisibleWhen
|
|
33
33
|
visibleWhen?: VisibleWhen
|
|
34
|
+
/** AI-assisted step (kernel v0.141.0): the SDK renders an interview panel
|
|
35
|
+
* driven by the host's assist provider inside this section. */
|
|
36
|
+
assist?: FormAssist
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Declaration of an AI-assisted step (`form_layout.sections[].assist`). */
|
|
40
|
+
export interface FormAssist {
|
|
41
|
+
/** Host-registered provider key, e.g. `brand.website_dna`. */
|
|
42
|
+
provider: string
|
|
43
|
+
label?: string
|
|
44
|
+
description?: string
|
|
45
|
+
/** Form fields sent to the provider when the session starts. */
|
|
46
|
+
input?: string[]
|
|
47
|
+
/** Form fields the provider may fill when it finishes. */
|
|
48
|
+
output?: string[]
|
|
49
|
+
/** `button` (default) or `auto` (start as soon as every input has a value). */
|
|
50
|
+
trigger?: 'button' | 'auto'
|
|
34
51
|
}
|
|
35
52
|
|
|
36
53
|
/** Model-level layout directive. `mode` defaults to `"sections"`. */
|
|
@@ -50,6 +67,8 @@ export interface FieldGroup<F> {
|
|
|
50
67
|
/** True for the synthetic group holding section-less / unknown-section fields. */
|
|
51
68
|
isDefault: boolean
|
|
52
69
|
fields: F[]
|
|
70
|
+
/** AI-assisted step declaration, when the section has one. */
|
|
71
|
+
assist?: FormAssist
|
|
53
72
|
}
|
|
54
73
|
|
|
55
74
|
/** The synthetic key of the orphan group (fields with no / unknown `section`). */
|
|
@@ -141,6 +160,7 @@ export function groupFieldsBySection<F extends { section?: string }>(
|
|
|
141
160
|
collapsed: s.collapsed,
|
|
142
161
|
isDefault: false,
|
|
143
162
|
fields: secFields,
|
|
163
|
+
assist: s.assist,
|
|
144
164
|
})
|
|
145
165
|
}
|
|
146
166
|
return groups
|
package/src/index.ts
CHANGED
|
@@ -475,3 +475,5 @@ export {
|
|
|
475
475
|
type AccentClasses,
|
|
476
476
|
type WidgetFormatCtx,
|
|
477
477
|
} from './widgets/widget-format'
|
|
478
|
+
export { AssistInterview, AssistCardView } from './assist-interview'
|
|
479
|
+
export type { AssistSession, AssistTurn, AssistQuestion, AssistCard, AssistProgressStep } from './assist-interview'
|