@blocklet/pages-kit 0.2.331 → 0.2.333
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/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/index.js +3 -2
- package/lib/cjs/builtin/async/ai-runtime/locales/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +1 -2
- package/lib/cjs/components/CustomComponentRenderer/index.js +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/index.js +3 -2
- package/lib/esm/builtin/async/ai-runtime/locales/index.js +1 -1
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +1 -1
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +1 -2
- package/lib/esm/components/CustomComponentRenderer/index.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -23,13 +23,14 @@ export default function AgentInputField(_a) {
|
|
|
23
23
|
if (parameter.key === 'datasetId') {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const FIELDS = {
|
|
27
27
|
number: NumberField,
|
|
28
28
|
string: StringField,
|
|
29
29
|
select: parameter.type === 'select' && ((_b = parameter.options) === null || _b === void 0 ? void 0 : _b.length) && parameter.options.length <= 8
|
|
30
30
|
? RadioField
|
|
31
31
|
: SelectField,
|
|
32
32
|
language: LanguageField,
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
const Field = FIELDS[parameter.type || 'string'] || StringField;
|
|
34
35
|
return (_jsx(Field, Object.assign({ label: parameter === null || parameter === void 0 ? void 0 : parameter.label, helperText: parameter === null || parameter === void 0 ? void 0 : parameter.helper, placeholder: parameter === null || parameter === void 0 ? void 0 : parameter.placeholder }, { parameter }, { size: "small" }, props)));
|
|
35
36
|
}
|
|
@@ -53,7 +53,7 @@ function RetryComponent({ message, tip }) {
|
|
|
53
53
|
} }), _jsxs(Typography, { variant: "h6", sx: {
|
|
54
54
|
display: 'flex',
|
|
55
55
|
alignItems: 'center',
|
|
56
|
-
}, children: [tip || t('v0.retryTip'), _jsx(TransparentTooltip, { arrow: true, placement: "top", title: _jsx(MessageErrorView, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('
|
|
56
|
+
}, children: [tip || t('v0.retryTip'), _jsx(TransparentTooltip, { arrow: true, placement: "top", title: _jsx(MessageErrorView, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Code syntax errors'), sx: {
|
|
57
57
|
mr: 0,
|
|
58
58
|
} }), children: _jsx(Box, { component: Icon, icon: "akar-icons:info", sx: {
|
|
59
59
|
ml: 1,
|
|
@@ -8,7 +8,6 @@ import { getLineClamp } from '../utils';
|
|
|
8
8
|
const BASE_QUESTION_SX = {
|
|
9
9
|
fontWeight: 500,
|
|
10
10
|
fontSize: 13,
|
|
11
|
-
lineHeight: 1.6,
|
|
12
11
|
};
|
|
13
12
|
export default function UserQuestion({ question }) {
|
|
14
13
|
var _a;
|
|
@@ -32,7 +31,7 @@ export default function UserQuestion({ question }) {
|
|
|
32
31
|
return (_jsx(Box, { ref: containerRef, display: "flex", alignItems: "center", sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'textColor' }), children: _jsx(ClickToCopy, { locale: locale, unstyled: true, disableHoverListener: true, disableFocusListener: true, disableTouchListener: true, children: _jsx(Tooltip, { placement: "bottom", arrow: true, title: _jsxs(Box, { sx: {
|
|
33
32
|
display: 'flex',
|
|
34
33
|
alignItems: 'center',
|
|
35
|
-
}, children: [_jsx(Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), {
|
|
34
|
+
}, children: [_jsx(Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'white' }), children: question }), _jsx(Box, { id: "copy-button-wrapper", component: "span", sx: {
|
|
36
35
|
ml: 0.5,
|
|
37
36
|
mt: 0.25,
|
|
38
37
|
fontSize: 14,
|
|
@@ -23,7 +23,7 @@ export default function CustomComponentRenderer(_a) {
|
|
|
23
23
|
var { dev } = _a, props = __rest(_a, ["dev"]);
|
|
24
24
|
const inheritedDev = useDev();
|
|
25
25
|
const BuiltinComponent = BuiltinComponents[props.componentId];
|
|
26
|
-
return (_jsx(ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView,
|
|
26
|
+
return (_jsx(ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, children: _jsx(DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? (_jsx(BuiltinComponent, Object.assign({}, props))) : (_jsx(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
|
|
27
27
|
}
|
|
28
28
|
const BuiltinComponents = {
|
|
29
29
|
'blocklet-react-component': BlockletReactComponentRenderer,
|