@blocklet/pages-kit 0.2.345 → 0.2.347

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.
@@ -51,6 +51,7 @@ const types_1 = require("@blocklet/ai-runtime/types");
51
51
  const react_1 = require("@iconify/react");
52
52
  const material_1 = require("@mui/material");
53
53
  const file_saver_1 = require("file-saver");
54
+ const lodash_1 = __importDefault(require("lodash"));
54
55
  const react_2 = require("react");
55
56
  const ufo_1 = require("ufo");
56
57
  const locale_1 = require("../../../../locale");
@@ -58,21 +59,31 @@ const CurrentAgent_1 = require("../../contexts/CurrentAgent");
58
59
  const CurrentMessage_1 = require("../../contexts/CurrentMessage");
59
60
  const use_appearances_1 = require("../../hooks/use-appearances");
60
61
  const runtime_1 = require("../../state/runtime");
62
+ const agent_inputs_1 = require("../../utils/agent-inputs");
61
63
  const download_image_1 = require("../../utils/download-image");
62
64
  const ActionButton_1 = __importDefault(require("../ActionButton"));
63
65
  function ShareActions(_a) {
64
66
  var _b;
65
67
  var props = __rest(_a, []);
66
68
  const { agent } = (0, CurrentAgent_1.useCurrentAgent)();
69
+ const { message } = (0, CurrentMessage_1.useCurrentMessage)();
67
70
  const sharing = (0, react_2.useMemo)(() => {
68
71
  var _a, _b;
69
72
  return (_b = (_a = agent.outputVariables) === null || _a === void 0 ? void 0 : _a.find((i) => i.name === types_1.RuntimeOutputVariable.share)) === null || _b === void 0 ? void 0 : _b.initialValue;
70
73
  }, [agent]);
74
+ const params = (0, react_2.useMemo)(() => {
75
+ var _a;
76
+ return (_a = agent.parameters) === null || _a === void 0 ? void 0 : _a.filter(agent_inputs_1.isValidInput).map((i) => { var _a, _b; return [((_a = i.label) === null || _a === void 0 ? void 0 : _a.trim()) || i.key, (_b = message.inputs) === null || _b === void 0 ? void 0 : _b[i.key]]; }).filter((i) => i[1]);
77
+ }, [agent.parameters, message.inputs]);
71
78
  const items = (_b = sharing === null || sharing === void 0 ? void 0 : sharing.items) === null || _b === void 0 ? void 0 : _b.map((item) => {
79
+ var _a, _b;
72
80
  const C = ShareActionsMap[item.to];
73
81
  if (!C)
74
82
  return null;
75
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(C, {}) }));
83
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(C, { inputs: JSON.stringify(lodash_1.default.fromPairs(params), null, 2), shareAttach: {
84
+ shareAttachInputs: (_a = sharing === null || sharing === void 0 ? void 0 : sharing.shareAttachInputs) !== null && _a !== void 0 ? _a : false,
85
+ shareAttachUrl: (_b = sharing === null || sharing === void 0 ? void 0 : sharing.shareAttachUrl) !== null && _b !== void 0 ? _b : false,
86
+ } }) }));
76
87
  }).filter((i) => !!i);
77
88
  if (!(items === null || items === void 0 ? void 0 : items.length))
78
89
  return null;
@@ -83,30 +94,40 @@ const ShareActionsMap = {
83
94
  twitter: ShareTwitter,
84
95
  copy: ShareCopy,
85
96
  saveAs: ShareSave,
97
+ community: ShareCommunity,
86
98
  };
87
- function ShareTwitter() {
99
+ function ShareTwitter({ inputs, shareAttach, }) {
88
100
  var _a, _b, _c, _d, _e, _f, _g, _h;
89
101
  const { t } = (0, locale_1.useLocaleContext)();
90
102
  const { message } = (0, CurrentMessage_1.useCurrentMessage)();
91
- const content = ((_c = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((i) => i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.text])) === null || _c === void 0 ? void 0 : _c[types_1.RuntimeOutputVariable.text]) ||
103
+ let content = ((_c = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((i) => i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.text])) === null || _c === void 0 ? void 0 : _c[types_1.RuntimeOutputVariable.text]) ||
92
104
  ((_h = (_g = (_f = (_e = (_d = message.outputs) === null || _d === void 0 ? void 0 : _d.objects) === null || _e === void 0 ? void 0 : _e.find((i) => { var _a; return (_a = i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.images]) === null || _a === void 0 ? void 0 : _a.length; })) === null || _f === void 0 ? void 0 : _f[types_1.RuntimeOutputVariable.images]) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.url);
93
105
  if (!content)
94
106
  return null;
95
- return ((0, jsx_runtime_1.jsx)(StyledActionButton, { tip: t('socialShare.shareToX'), title: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:brand-x" }), href: (0, ufo_1.withQuery)('https://twitter.com/intent/tweet', {
107
+ if (shareAttach.shareAttachInputs) {
108
+ content += `\nInputs: ${inputs}`;
109
+ }
110
+ return ((0, jsx_runtime_1.jsx)(StyledActionButton, { tip: t('socialShare.shareToX'), title: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:brand-x" }), target: "_blank", href: (0, ufo_1.withQuery)('https://twitter.com/intent/tweet', {
96
111
  text: content,
97
- url: window.location.href,
98
- }), target: '_blank' }));
112
+ url: shareAttach.shareAttachUrl ? window.location.href : undefined,
113
+ }) }));
99
114
  }
100
- function ShareCopy() {
115
+ function ShareCopy({ inputs, shareAttach, }) {
101
116
  var _a, _b, _c, _d, _e, _f, _g, _h;
102
117
  const { t } = (0, locale_1.useLocaleContext)();
103
118
  const { message } = (0, CurrentMessage_1.useCurrentMessage)();
104
- const content = (_c = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((i) => i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.text])) === null || _c === void 0 ? void 0 : _c[types_1.RuntimeOutputVariable.text];
119
+ let content = (_c = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((i) => i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.text])) === null || _c === void 0 ? void 0 : _c[types_1.RuntimeOutputVariable.text];
105
120
  const image = (_h = (_g = (_f = (_e = (_d = message.outputs) === null || _d === void 0 ? void 0 : _d.objects) === null || _e === void 0 ? void 0 : _e.find((i) => { var _a; return (_a = i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.images]) === null || _a === void 0 ? void 0 : _a.length; })) === null || _f === void 0 ? void 0 : _f[types_1.RuntimeOutputVariable.images]) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.url;
106
121
  if (!content && !image)
107
122
  return null;
108
123
  return ((0, jsx_runtime_1.jsx)(StyledActionButton, { autoReset: true, tip: t('copy'), tipSucceed: t('copied'), title: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:copy" }), titleSucceed: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:copy-check" }), onClick: () => __awaiter(this, void 0, void 0, function* () {
109
124
  if (content) {
125
+ if (shareAttach.shareAttachInputs) {
126
+ content += `\nInputs: ${inputs}`;
127
+ }
128
+ if (shareAttach.shareAttachUrl) {
129
+ content += `\nURL: ${window.location.href}`;
130
+ }
110
131
  window.navigator.clipboard.writeText(content);
111
132
  }
112
133
  else if (image) {
@@ -115,7 +136,7 @@ function ShareCopy() {
115
136
  }
116
137
  }) }));
117
138
  }
118
- function ShareSave() {
139
+ function ShareSave({ inputs, shareAttach, }) {
119
140
  var _a, _b, _c, _d, _e, _f, _g, _h;
120
141
  const { t } = (0, locale_1.useLocaleContext)();
121
142
  const { message } = (0, CurrentMessage_1.useCurrentMessage)();
@@ -130,7 +151,13 @@ function ShareSave() {
130
151
  const { default: html2pdf } = yield Promise.resolve().then(() => __importStar(require('html2pdf.js')));
131
152
  if (content) {
132
153
  const element = document.createElement('div');
133
- element.innerText = content;
154
+ element.innerHTML = content;
155
+ if (shareAttach.shareAttachInputs) {
156
+ element.innerHTML += `<br/>Inputs: ${inputs}`;
157
+ }
158
+ if (shareAttach.shareAttachUrl) {
159
+ element.innerHTML += `<br/>URL: ${window.location.href}`;
160
+ }
134
161
  yield html2pdf()
135
162
  .set({
136
163
  margin: 1,
@@ -147,9 +174,30 @@ function ShareSave() {
147
174
  }
148
175
  }) }));
149
176
  }
177
+ function ShareCommunity({ inputs, shareAttach, }) {
178
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
179
+ const { t } = (0, locale_1.useLocaleContext)();
180
+ const { message } = (0, CurrentMessage_1.useCurrentMessage)();
181
+ let content = (_d = (_c = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((i) => i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.text])) === null || _c === void 0 ? void 0 : _c[types_1.RuntimeOutputVariable.text]) !== null && _d !== void 0 ? _d : '';
182
+ const image = ((_k = (_j = (_h = (_g = (_f = (_e = message.outputs) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.find) === null || _g === void 0 ? void 0 : _g.call(_f, (i) => { var _a; return (_a = i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.images]) === null || _a === void 0 ? void 0 : _a.length; })) === null || _h === void 0 ? void 0 : _h[types_1.RuntimeOutputVariable.images]) === null || _j === void 0 ? void 0 : _j.map((i) => i.url)) !== null && _k !== void 0 ? _k : []).join(',');
183
+ if (!content && !image)
184
+ return null;
185
+ if (shareAttach.shareAttachInputs) {
186
+ content += `\nInputs: ${inputs}`;
187
+ }
188
+ if (shareAttach.shareAttachUrl) {
189
+ content += `\nURL: ${window.location.href}`;
190
+ }
191
+ return ((0, jsx_runtime_1.jsx)(StyledActionButton, { tip: t('share to community'), title: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:share-2" }), target: "_blank", href: (0, ufo_1.withQuery)('https://community.arcblock.io/discussions/add?', {
192
+ boardId: 'aigne',
193
+ title: '[Share the generation from Aigne](Give your post a title...)',
194
+ content,
195
+ images: image,
196
+ }) }));
197
+ }
150
198
  const StyledActionButton = (0, material_1.styled)(ActionButton_1.default)(({ theme }) => theme.unstable_sx({
151
199
  fontSize: 'inherit',
152
200
  p: 0.5,
153
- minWidth: 0,
154
- minHeight: 0,
201
+ minWidth: '0 !important',
202
+ minHeight: '0 !important',
155
203
  }));
@@ -142,7 +142,7 @@ function AgentMessage({ message, hideAvatar }) {
142
142
  p: 0.25,
143
143
  } })), children: (0, jsx_runtime_1.jsx)(material_1.Stack, { gap: 1, className: "message-response", children: ((_d = message.outputs) === null || _d === void 0 ? void 0 : _d.content) && ((0, jsx_runtime_1.jsx)(MarkdownRenderer_1.default, { className: isMessageLoading ? 'writing' : '', children: message.outputs.content })) }) })) : (isMessageLoading && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 24 + 8 + 8,
144
144
  // only response with loading
145
- className: "message-response" }))), (_f = (_e = message.outputs) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.map((object) => ((0, jsx_runtime_1.jsx)(MessageMetadataRenderer_1.default, { object: object.data }, object.taskId))), message.error && (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: message.error })] })] })] }));
145
+ className: "message-response" }))), (_f = (_e = message.outputs) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.map((object, index) => (0, jsx_runtime_1.jsx)(MessageMetadataRenderer_1.default, { object: object }, index)), message.error && (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: message.error })] })] })] }));
146
146
  }
147
147
  function MessageItemWrapper(_a) {
148
148
  var _b;
@@ -42,7 +42,7 @@ function PhotoGalleryItem() {
42
42
  const { message } = (0, CurrentMessage_1.useCurrentMessage)();
43
43
  const [openDialog, setOpenDialog] = (0, react_2.useState)(false);
44
44
  const objects = (_b = (_a = message.outputs) === null || _a === void 0 ? void 0 : _a.objects) !== null && _b !== void 0 ? _b : [];
45
- const images = objects.flatMap((i) => { var _a; return (_a = i.data[types_1.RuntimeOutputVariable.images]) !== null && _a !== void 0 ? _a : []; });
45
+ const images = objects.flatMap((i) => { var _a, _b; return (_b = (_a = i.data) === null || _a === void 0 ? void 0 : _a[types_1.RuntimeOutputVariable.images]) !== null && _b !== void 0 ? _b : []; });
46
46
  if (!images.length && message.error) {
47
47
  return ((0, jsx_runtime_1.jsx)(material_1.Stack, { alignItems: "center", justifyContent: "center", sx: {
48
48
  aspectRatio: 1,
@@ -230,7 +230,7 @@ function V0Output() {
230
230
  overflowY: 'auto',
231
231
  scrollbarWidth: 'thin',
232
232
  scrollbarColor: 'grey transparent',
233
- }, propertiesValueMap: propertiesValueMap }) }), objects === null || objects === void 0 ? void 0 : objects.map((item, index) => (0, jsx_runtime_1.jsx)(MessageMetadataRenderer_1.default, { object: item.data }, index)), !isMessageLoading && ((_b = message.outputs) === null || _b === void 0 ? void 0 : _b.content) && ((0, jsx_runtime_1.jsx)(ShareActions_1.default, { direction: "row", justifyContent: "flex-end", sx: { mt: 2 } })), (0, jsx_runtime_1.jsxs)(react_2.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Loading_1.default, {}), children: [(0, jsx_runtime_1.jsx)(material_1.Drawer, { anchor: isMobile ? 'bottom' : 'right', open: !!code, onClose: onCloseCode, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: Object.assign({ p: 2, pt: 0 }, (isMobile ? { maxHeight: '70vh' } : { maxWidth: '70vw' })), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
233
+ }, propertiesValueMap: propertiesValueMap }) }), objects === null || objects === void 0 ? void 0 : objects.map((item, index) => (0, jsx_runtime_1.jsx)(MessageMetadataRenderer_1.default, { object: item }, index)), !isMessageLoading && ((_b = message.outputs) === null || _b === void 0 ? void 0 : _b.content) && ((0, jsx_runtime_1.jsx)(ShareActions_1.default, { direction: "row", justifyContent: "flex-end", sx: { mt: 2 } })), (0, jsx_runtime_1.jsxs)(react_2.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Loading_1.default, {}), children: [(0, jsx_runtime_1.jsx)(material_1.Drawer, { anchor: isMobile ? 'bottom' : 'right', open: !!code, onClose: onCloseCode, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: Object.assign({ p: 2, pt: 0 }, (isMobile ? { maxHeight: '70vh' } : { maxWidth: '70vw' })), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
234
234
  py: 2,
235
235
  position: 'sticky',
236
236
  top: 0,
@@ -8,17 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
13
  };
@@ -297,19 +286,17 @@ function V0DetailRender() {
297
286
  backgroundColor: 'background.block',
298
287
  flex: 1,
299
288
  maxWidth: isMobile ? '100%' : `calc(100% - ${sliderWidth}px - 16px)`,
300
- }, children: (0, jsx_runtime_1.jsx)(AgentOutputRender, { message: currentMessage }) })] }));
289
+ }, children: currentMessage && (0, jsx_runtime_1.jsx)(AgentOutputRender, { message: currentMessage }) })] }));
301
290
  }
302
- function AgentInputRender(_a) {
303
- var props = __rest(_a, []);
291
+ function AgentInputRender() {
304
292
  const { appearanceInput } = (0, use_appearances_1.default)();
305
293
  if (!(appearanceInput === null || appearanceInput === void 0 ? void 0 : appearanceInput.componentId))
306
294
  return null;
307
- return ((0, jsx_runtime_1.jsx)(react_2.Suspense, { children: (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: appearanceInput.componentId, properties: appearanceInput.componentProperties, props: props }) }));
295
+ return ((0, jsx_runtime_1.jsx)(react_2.Suspense, { children: (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: appearanceInput.componentId, properties: appearanceInput.componentProperties }) }));
308
296
  }
309
- function AgentOutputRender(_a) {
310
- var { message } = _a, props = __rest(_a, ["message"]);
297
+ function AgentOutputRender({ message }) {
311
298
  const { appearanceOutput } = (0, use_appearances_1.default)();
312
299
  if (!(appearanceOutput === null || appearanceOutput === void 0 ? void 0 : appearanceOutput.componentId) || !message)
313
300
  return null;
314
- return ((0, jsx_runtime_1.jsx)(CurrentAgent_1.default, { agentId: message.assistantId, children: (0, jsx_runtime_1.jsx)(CurrentMessage_1.default, { message: message, children: (0, jsx_runtime_1.jsx)(react_2.Suspense, { children: (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: appearanceOutput.componentId, properties: appearanceOutput.componentProperties, props: props }) }) }) }));
301
+ return ((0, jsx_runtime_1.jsx)(CurrentAgent_1.default, { agentId: message.agentId, children: (0, jsx_runtime_1.jsx)(CurrentMessage_1.default, { message: message, children: (0, jsx_runtime_1.jsx)(react_2.Suspense, { children: (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: appearanceOutput.componentId, properties: appearanceOutput.componentProperties }) }) }) }));
315
302
  }
@@ -134,11 +134,11 @@ function CodeRenderByMessage({ zoom, message, minHeight = 200, sx, propertiesVal
134
134
  return (0, jsx_runtime_1.jsx)(RetryComponent, { message: message });
135
135
  }
136
136
  return (_d = (_c = message === null || message === void 0 ? void 0 : message.outputs) === null || _c === void 0 ? void 0 : _c.objects) === null || _d === void 0 ? void 0 : _d.map((item) => {
137
- var _a, _b, _c;
137
+ var _a, _b;
138
138
  const { taskId } = item;
139
139
  // @ts-ignore
140
- const code = (_a = item === null || item === void 0 ? void 0 : item.data) === null || _a === void 0 ? void 0 : _a[codeField];
141
- return ((0, jsx_runtime_1.jsx)(exports.CodePreviewMemo, { componentId: `code-preview-${taskId}`, code: code, propertiesValue: ((_b = propertiesValueMap === null || propertiesValueMap === void 0 ? void 0 : propertiesValueMap[taskId]) === null || _b === void 0 ? void 0 : _b[locale]) || ((_c = propertiesValueMap === null || propertiesValueMap === void 0 ? void 0 : propertiesValueMap[taskId]) === null || _c === void 0 ? void 0 : _c.en) || {}, message: message }, item.taskId));
140
+ const code = item === null || item === void 0 ? void 0 : item[codeField];
141
+ return ((0, jsx_runtime_1.jsx)(exports.CodePreviewMemo, { componentId: `code-preview-${taskId}`, code: code, propertiesValue: ((_a = propertiesValueMap === null || propertiesValueMap === void 0 ? void 0 : propertiesValueMap[taskId]) === null || _a === void 0 ? void 0 : _a[locale]) || ((_b = propertiesValueMap === null || propertiesValueMap === void 0 ? void 0 : propertiesValueMap[taskId]) === null || _b === void 0 ? void 0 : _b.en) || {}, message: message }, item.taskId));
142
142
  });
143
143
  // eslint-disable-next-line react-hooks/exhaustive-deps
144
144
  }, [isMessageLoading, (_a = message === null || message === void 0 ? void 0 : message.outputs) === null || _a === void 0 ? void 0 : _a.objects, propertiesValueMap, locale]);
@@ -149,8 +149,8 @@ function CodeRenderByMessage({ zoom, message, minHeight = 200, sx, propertiesVal
149
149
  exports.CodeRenderByMessage = CodeRenderByMessage;
150
150
  exports.CodeRenderByMessageMemo = (0, react_2.memo)(CodeRenderByMessage);
151
151
  function getCurrentCodeByTaskId(message, taskId) {
152
- var _a, _b, _c, _d;
152
+ var _a, _b, _c;
153
153
  // @ts-ignore
154
- return (_d = (_c = (_b = (_a = message === null || message === void 0 ? void 0 : message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((item) => item.taskId === taskId)) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d[codeField];
154
+ return (_c = (_b = (_a = message === null || message === void 0 ? void 0 : message.outputs) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b.find((item) => item.taskId === taskId)) === null || _c === void 0 ? void 0 : _c[codeField];
155
155
  }
156
156
  exports.getCurrentCodeByTaskId = getCurrentCodeByTaskId;