@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.
@@ -28,14 +28,15 @@ function AgentInputField(_a) {
28
28
  if (parameter.key === 'datasetId') {
29
29
  return null;
30
30
  }
31
- const Field = {
31
+ const FIELDS = {
32
32
  number: NumberField_1.default,
33
33
  string: StringField_1.default,
34
34
  select: parameter.type === 'select' && ((_b = parameter.options) === null || _b === void 0 ? void 0 : _b.length) && parameter.options.length <= 8
35
35
  ? RadioField_1.default
36
36
  : SelectField_1.default,
37
37
  language: LanguageField_1.default,
38
- }[parameter.type || 'string'] || StringField_1.default;
38
+ };
39
+ const Field = FIELDS[parameter.type || 'string'] || StringField_1.default;
39
40
  return ((0, jsx_runtime_1.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)));
40
41
  }
41
42
  exports.default = AgentInputField;
@@ -223,7 +223,7 @@ exports.translations = {
223
223
  showSlider: '显示版本历史',
224
224
  retryTip: 'Agent 算力不足,请稍后重试...',
225
225
  retry: '重试',
226
- errorCodeTip: 'Agent 发现代码存在一些语法错误,请求重试...',
226
+ errorCodeTip: 'Agent 发现代码存在一些语法问题,请求重试...',
227
227
  },
228
228
  },
229
229
  };
@@ -59,7 +59,7 @@ function RetryComponent({ message, tip }) {
59
59
  } }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h6", sx: {
60
60
  display: 'flex',
61
61
  alignItems: 'center',
62
- }, children: [tip || t('v0.retryTip'), (0, jsx_runtime_1.jsx)(TransparentTooltip_1.default, { arrow: true, placement: "top", title: (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Empty response from AI or Code not found'), sx: {
62
+ }, children: [tip || t('v0.retryTip'), (0, jsx_runtime_1.jsx)(TransparentTooltip_1.default, { arrow: true, placement: "top", title: (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Code syntax errors'), sx: {
63
63
  mr: 0,
64
64
  } }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { component: react_1.Icon, icon: "akar-icons:info", sx: {
65
65
  ml: 1,
@@ -33,7 +33,6 @@ const utils_1 = require("../utils");
33
33
  const BASE_QUESTION_SX = {
34
34
  fontWeight: 500,
35
35
  fontSize: 13,
36
- lineHeight: 1.6,
37
36
  };
38
37
  function UserQuestion({ question }) {
39
38
  var _a;
@@ -57,7 +56,7 @@ function UserQuestion({ question }) {
57
56
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { ref: containerRef, display: "flex", alignItems: "center", sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'textColor' }), children: (0, jsx_runtime_1.jsx)(ClickToCopy_1.default, { locale: locale, unstyled: true, disableHoverListener: true, disableFocusListener: true, disableTouchListener: true, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { placement: "bottom", arrow: true, title: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
58
57
  display: 'flex',
59
58
  alignItems: 'center',
60
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { lineHeight: 1, color: 'white' }), children: question }), (0, jsx_runtime_1.jsx)(material_1.Box, { id: "copy-button-wrapper", component: "span", sx: {
59
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'white' }), children: question }), (0, jsx_runtime_1.jsx)(material_1.Box, { id: "copy-button-wrapper", component: "span", sx: {
61
60
  ml: 0.5,
62
61
  mt: 0.25,
63
62
  fontSize: 14,
@@ -42,7 +42,7 @@ function CustomComponentRenderer(_a) {
42
42
  var { dev } = _a, props = __rest(_a, ["dev"]);
43
43
  const inheritedDev = (0, DevProvider_1.useDev)();
44
44
  const BuiltinComponent = BuiltinComponents[props.componentId];
45
- return ((0, jsx_runtime_1.jsx)(react_error_boundary_1.ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, resetKeys: [Date.now()], children: (0, jsx_runtime_1.jsx)(DevProvider_1.DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? ((0, jsx_runtime_1.jsx)(BuiltinComponent, Object.assign({}, props))) : ((0, jsx_runtime_1.jsx)(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
45
+ return ((0, jsx_runtime_1.jsx)(react_error_boundary_1.ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, children: (0, jsx_runtime_1.jsx)(DevProvider_1.DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? ((0, jsx_runtime_1.jsx)(BuiltinComponent, Object.assign({}, props))) : ((0, jsx_runtime_1.jsx)(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
46
46
  }
47
47
  exports.default = CustomComponentRenderer;
48
48
  const BuiltinComponents = {