@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.
@@ -23,13 +23,14 @@ export default function AgentInputField(_a) {
23
23
  if (parameter.key === 'datasetId') {
24
24
  return null;
25
25
  }
26
- const Field = {
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
- }[parameter.type || 'string'] || StringField;
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
  }
@@ -220,7 +220,7 @@ export const translations = {
220
220
  showSlider: '显示版本历史',
221
221
  retryTip: 'Agent 算力不足,请稍后重试...',
222
222
  retry: '重试',
223
- errorCodeTip: 'Agent 发现代码存在一些语法错误,请求重试...',
223
+ errorCodeTip: 'Agent 发现代码存在一些语法问题,请求重试...',
224
224
  },
225
225
  },
226
226
  };
@@ -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('Empty response from AI or Code not found'), sx: {
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), { lineHeight: 1, color: 'white' }), children: question }), _jsx(Box, { id: "copy-button-wrapper", component: "span", 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, resetKeys: [Date.now()], 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 }))) }) }));
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,