@overmap-ai/core 1.0.48-activity-history.4 → 1.0.48-activity-history.6
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/dist/components/ImageCard/ImageCard.d.ts +1 -1
- package/dist/forms/builder/hooks.d.ts +2 -1
- package/dist/overmap-core.js +104 -70
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +103 -69
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +1 -0
- package/dist/typings/models/attachments.d.ts +3 -1
- package/package.json +5 -5
|
@@ -4337,10 +4337,20 @@ var __publicField = (obj, key, value) => {
|
|
|
4337
4337
|
var _a2;
|
|
4338
4338
|
return (_a2 = allMiddleware[0]) == null ? void 0 : _a2.run(action);
|
|
4339
4339
|
}
|
|
4340
|
-
const discardStatuses = [400, 409, 403, 404];
|
|
4340
|
+
const discardStatuses = [400, 409, 403, 404, 405, 500];
|
|
4341
4341
|
const statusMessages = {
|
|
4342
4342
|
403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
|
|
4343
|
-
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
|
|
4343
|
+
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
|
|
4344
|
+
405: {
|
|
4345
|
+
title: "Not supported",
|
|
4346
|
+
description: "It's not you. It's us. Sorry for the inconvenience.",
|
|
4347
|
+
severity: "danger"
|
|
4348
|
+
},
|
|
4349
|
+
500: {
|
|
4350
|
+
title: "Server error",
|
|
4351
|
+
description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
|
|
4352
|
+
severity: "danger"
|
|
4353
|
+
}
|
|
4344
4354
|
};
|
|
4345
4355
|
function discard(reason, action, retries = 0) {
|
|
4346
4356
|
var _a2;
|
|
@@ -4521,7 +4531,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4521
4531
|
...attachmentPayload,
|
|
4522
4532
|
file: attachmentPayload.file.objectURL,
|
|
4523
4533
|
file_name: attachmentPayload.file.name,
|
|
4524
|
-
file_type: attachmentPayload.file.type
|
|
4534
|
+
file_type: attachmentPayload.file.type,
|
|
4535
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4536
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4525
4537
|
};
|
|
4526
4538
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4527
4539
|
this.client.store.dispatch(addIssueAttachment(offlineAttachment));
|
|
@@ -4555,7 +4567,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4555
4567
|
...attachmentPayload,
|
|
4556
4568
|
file: attachmentPayload.file.objectURL,
|
|
4557
4569
|
file_name: attachmentPayload.file.name,
|
|
4558
|
-
file_type: attachmentPayload.file.type
|
|
4570
|
+
file_type: attachmentPayload.file.type,
|
|
4571
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4572
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4559
4573
|
};
|
|
4560
4574
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4561
4575
|
this.client.store.dispatch(addComponentAttachment(offlineAttachment));
|
|
@@ -4589,7 +4603,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4589
4603
|
...attachmentPayload,
|
|
4590
4604
|
file: attachmentPayload.file.objectURL,
|
|
4591
4605
|
file_name: attachmentPayload.file.name,
|
|
4592
|
-
file_type: attachmentPayload.file.type
|
|
4606
|
+
file_type: attachmentPayload.file.type,
|
|
4607
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4608
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4593
4609
|
};
|
|
4594
4610
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4595
4611
|
this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
|
|
@@ -4623,7 +4639,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4623
4639
|
...attachmentPayload,
|
|
4624
4640
|
file: attachmentPayload.file.objectURL,
|
|
4625
4641
|
file_name: attachmentPayload.file.name,
|
|
4626
|
-
file_type: attachmentPayload.file.type
|
|
4642
|
+
file_type: attachmentPayload.file.type,
|
|
4643
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4644
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4627
4645
|
};
|
|
4628
4646
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4629
4647
|
this.client.store.dispatch(addProjectAttachment(offlineAttachment));
|
|
@@ -4663,7 +4681,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4663
4681
|
file_name: file2.name,
|
|
4664
4682
|
file_type: file2.type,
|
|
4665
4683
|
issue: issueId,
|
|
4666
|
-
file_sha1: hash
|
|
4684
|
+
file_sha1: hash,
|
|
4685
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4686
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4667
4687
|
});
|
|
4668
4688
|
return this.addIssueAttachment(attachment);
|
|
4669
4689
|
};
|
|
@@ -4682,7 +4702,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4682
4702
|
file_name: file2.name,
|
|
4683
4703
|
file_type: file2.type,
|
|
4684
4704
|
component: componentId,
|
|
4685
|
-
file_sha1: hash
|
|
4705
|
+
file_sha1: hash,
|
|
4706
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4707
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4686
4708
|
});
|
|
4687
4709
|
return this.addComponentAttachment(attachment);
|
|
4688
4710
|
};
|
|
@@ -4701,7 +4723,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4701
4723
|
file_name: file2.name,
|
|
4702
4724
|
file_type: file2.type,
|
|
4703
4725
|
component_type: componentTypeId,
|
|
4704
|
-
file_sha1: hash
|
|
4726
|
+
file_sha1: hash,
|
|
4727
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4728
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4705
4729
|
});
|
|
4706
4730
|
return this.addComponentTypeAttachment(attachment);
|
|
4707
4731
|
};
|
|
@@ -4720,7 +4744,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4720
4744
|
file_name: file2.name,
|
|
4721
4745
|
file_type: file2.type,
|
|
4722
4746
|
project: projectId,
|
|
4723
|
-
file_sha1: hash
|
|
4747
|
+
file_sha1: hash,
|
|
4748
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4749
|
+
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
4724
4750
|
});
|
|
4725
4751
|
return this.addProjectAttachment(attachment);
|
|
4726
4752
|
};
|
|
@@ -7701,7 +7727,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7701
7727
|
* @param request The message to prompt the agent with.
|
|
7702
7728
|
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
7703
7729
|
*/
|
|
7704
|
-
prompt(request2, conversationId) {
|
|
7730
|
+
async prompt(request2, conversationId) {
|
|
7705
7731
|
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
7706
7732
|
return this.enqueueRequest({
|
|
7707
7733
|
description: "Prompt agent",
|
|
@@ -7716,6 +7742,16 @@ var __publicField = (obj, key, value) => {
|
|
|
7716
7742
|
queryParams: conversationId ? { conversation_id: conversationId } : {}
|
|
7717
7743
|
});
|
|
7718
7744
|
}
|
|
7745
|
+
async rate(responseId, rating) {
|
|
7746
|
+
return this.enqueueRequest({
|
|
7747
|
+
description: "Rate agent response",
|
|
7748
|
+
method: HttpMethod.PUT,
|
|
7749
|
+
url: `/agents/responses/${responseId}/rate/`,
|
|
7750
|
+
payload: { rating },
|
|
7751
|
+
blockers: ["rate"],
|
|
7752
|
+
blocks: ["rate"]
|
|
7753
|
+
});
|
|
7754
|
+
}
|
|
7719
7755
|
}
|
|
7720
7756
|
class OvermapSDK {
|
|
7721
7757
|
constructor(apiUrl, store) {
|
|
@@ -13205,52 +13241,54 @@ var __publicField = (obj, key, value) => {
|
|
|
13205
13241
|
Footer,
|
|
13206
13242
|
Loading
|
|
13207
13243
|
};
|
|
13208
|
-
const ImageCard = React.memo(
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13244
|
+
const ImageCard = React.memo(
|
|
13245
|
+
React.forwardRef((props, forwardedRef) => {
|
|
13246
|
+
const { file, alt, error: error2, size, rightSlot, className, truncateLength, ...rest } = props;
|
|
13247
|
+
const fileCardRef = React.useRef(null);
|
|
13248
|
+
const imageInsetRef = React.useRef(null);
|
|
13249
|
+
const fileCardSize = blocks.useSize(fileCardRef);
|
|
13250
|
+
React.useLayoutEffect(() => {
|
|
13251
|
+
if (!imageInsetRef.current || !fileCardSize)
|
|
13252
|
+
return;
|
|
13253
|
+
imageInsetRef.current.style.height = `${fileCardSize.height * 4}px`;
|
|
13254
|
+
}, [fileCardSize]);
|
|
13255
|
+
const fileName2 = React.useMemo(() => {
|
|
13256
|
+
if (!file)
|
|
13257
|
+
return;
|
|
13258
|
+
return truncateLength !== void 0 ? truncate(file.name, truncateLength) : file.name;
|
|
13259
|
+
}, [file, truncateLength]);
|
|
13260
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13261
|
+
Flex,
|
|
13262
|
+
{
|
|
13263
|
+
className: classNames$1(className, styles$4.ImageCard),
|
|
13264
|
+
width: "100%",
|
|
13265
|
+
direction: "column",
|
|
13266
|
+
position: "relative",
|
|
13267
|
+
height: "max-content",
|
|
13268
|
+
gap: "0",
|
|
13269
|
+
ref: forwardedRef,
|
|
13270
|
+
...rest,
|
|
13271
|
+
children: [
|
|
13272
|
+
!file && !error2 && /* @__PURE__ */ jsxRuntime.jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}) }),
|
|
13273
|
+
/* @__PURE__ */ jsxRuntime.jsx(Inset, { className: styles$4.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsxRuntime.jsx("img", { className: styles$4.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
|
|
13274
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13275
|
+
blocks.OvermapItem,
|
|
13276
|
+
{
|
|
13277
|
+
className: classNames$1(styles$4.Footer, {
|
|
13278
|
+
[styles$4.Loading]: !file
|
|
13279
|
+
}),
|
|
13280
|
+
size,
|
|
13281
|
+
ref: fileCardRef,
|
|
13282
|
+
leftSlot: error2 ? /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiFileWarningLine" }) : file && /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { fileType: file.type }),
|
|
13283
|
+
rightSlot,
|
|
13284
|
+
children: error2 ?? fileName2
|
|
13285
|
+
}
|
|
13286
|
+
)
|
|
13287
|
+
]
|
|
13288
|
+
}
|
|
13289
|
+
);
|
|
13290
|
+
})
|
|
13291
|
+
);
|
|
13254
13292
|
const UploadInput = React.memo((props) => {
|
|
13255
13293
|
var _a2;
|
|
13256
13294
|
const [{ inputId, labelId, size, severity, helpText, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
@@ -14387,17 +14425,15 @@ var __publicField = (obj, key, value) => {
|
|
|
14387
14425
|
Action.key
|
|
14388
14426
|
)) }),
|
|
14389
14427
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { display: forMobile(true, "block"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14390
|
-
blocks.
|
|
14428
|
+
blocks.OvermapDropdownMenu,
|
|
14391
14429
|
{
|
|
14392
14430
|
trigger: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { variant: "ghost", "aria-label": "Actions menu", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiMore2Line" }) }),
|
|
14393
14431
|
items: actions.map((Action) => {
|
|
14394
14432
|
var _a2;
|
|
14395
14433
|
return {
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
] }, Action.key),
|
|
14400
|
-
onSelect: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14434
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Action.Icon, {}),
|
|
14435
|
+
children: Action.text,
|
|
14436
|
+
onClick: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14401
14437
|
};
|
|
14402
14438
|
})
|
|
14403
14439
|
}
|
|
@@ -14455,10 +14491,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14455
14491
|
const field = FieldTypeToClsMapping[identifier];
|
|
14456
14492
|
const Icon = field.Icon;
|
|
14457
14493
|
return {
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { children: field.fieldTypeName })
|
|
14461
|
-
] }, identifier),
|
|
14494
|
+
children: field.fieldTypeName,
|
|
14495
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}),
|
|
14462
14496
|
value: identifier,
|
|
14463
14497
|
onSelect: () => {
|
|
14464
14498
|
onSelect(identifier);
|
|
@@ -14662,7 +14696,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14662
14696
|
}
|
|
14663
14697
|
),
|
|
14664
14698
|
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { align: "center", gap: "3", children: [
|
|
14665
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.
|
|
14699
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.children }),
|
|
14666
14700
|
showPopoverInputs && /* @__PURE__ */ jsxRuntime.jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors })
|
|
14667
14701
|
] }),
|
|
14668
14702
|
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -15023,7 +15057,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15023
15057
|
)),
|
|
15024
15058
|
droppableProvided.placeholder,
|
|
15025
15059
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15026
|
-
blocks.
|
|
15060
|
+
blocks.OvermapDropdownMenu,
|
|
15027
15061
|
{
|
|
15028
15062
|
trigger: /* @__PURE__ */ jsxRuntime.jsxs(blocks.Button, { type: "button", variant: "soft", children: [
|
|
15029
15063
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiAddLine" }),
|