@overmap-ai/core 1.0.48-fix-agent-errors.4 → 1.0.48-menu-improvements.1
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/README.md +4 -4
- package/dist/components/ImageCard/ImageCard.d.ts +1 -1
- package/dist/forms/builder/hooks.d.ts +2 -5
- package/dist/overmap-core.js +79 -61
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +78 -60
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +1 -0
- package/package.json +152 -152
|
@@ -4242,10 +4242,20 @@ var __publicField = (obj, key, value) => {
|
|
|
4242
4242
|
var _a2;
|
|
4243
4243
|
return (_a2 = allMiddleware[0]) == null ? void 0 : _a2.run(action);
|
|
4244
4244
|
}
|
|
4245
|
-
const discardStatuses = [400, 409, 403, 404];
|
|
4245
|
+
const discardStatuses = [400, 409, 403, 404, 405, 500];
|
|
4246
4246
|
const statusMessages = {
|
|
4247
4247
|
403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
|
|
4248
|
-
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
|
|
4248
|
+
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
|
|
4249
|
+
405: {
|
|
4250
|
+
title: "Not supported",
|
|
4251
|
+
description: "It's not you. It's us. Sorry for the inconvenience.",
|
|
4252
|
+
severity: "danger"
|
|
4253
|
+
},
|
|
4254
|
+
500: {
|
|
4255
|
+
title: "Server error",
|
|
4256
|
+
description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
|
|
4257
|
+
severity: "danger"
|
|
4258
|
+
}
|
|
4249
4259
|
};
|
|
4250
4260
|
function discard(reason, action, retries = 0) {
|
|
4251
4261
|
var _a2;
|
|
@@ -7490,7 +7500,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7490
7500
|
* @param request The message to prompt the agent with.
|
|
7491
7501
|
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
7492
7502
|
*/
|
|
7493
|
-
prompt(request2, conversationId) {
|
|
7503
|
+
async prompt(request2, conversationId) {
|
|
7494
7504
|
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
7495
7505
|
return this.enqueueRequest({
|
|
7496
7506
|
description: "Prompt agent",
|
|
@@ -7505,6 +7515,16 @@ var __publicField = (obj, key, value) => {
|
|
|
7505
7515
|
queryParams: conversationId ? { conversation_id: conversationId } : {}
|
|
7506
7516
|
});
|
|
7507
7517
|
}
|
|
7518
|
+
async rate(responseId, rating) {
|
|
7519
|
+
return this.enqueueRequest({
|
|
7520
|
+
description: "Rate agent response",
|
|
7521
|
+
method: HttpMethod.PUT,
|
|
7522
|
+
url: `/agents/responses/${responseId}/rate/`,
|
|
7523
|
+
payload: { rating },
|
|
7524
|
+
blockers: ["rate"],
|
|
7525
|
+
blocks: ["rate"]
|
|
7526
|
+
});
|
|
7527
|
+
}
|
|
7508
7528
|
}
|
|
7509
7529
|
class OvermapSDK {
|
|
7510
7530
|
constructor(apiUrl, store) {
|
|
@@ -12993,52 +13013,54 @@ var __publicField = (obj, key, value) => {
|
|
|
12993
13013
|
Footer,
|
|
12994
13014
|
Loading
|
|
12995
13015
|
};
|
|
12996
|
-
const ImageCard = React.memo(
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13016
|
+
const ImageCard = React.memo(
|
|
13017
|
+
React.forwardRef((props, forwardedRef) => {
|
|
13018
|
+
const { file, alt, error: error2, size, rightSlot, className, truncateLength, ...rest } = props;
|
|
13019
|
+
const fileCardRef = React.useRef(null);
|
|
13020
|
+
const imageInsetRef = React.useRef(null);
|
|
13021
|
+
const fileCardSize = blocks.useSize(fileCardRef);
|
|
13022
|
+
React.useLayoutEffect(() => {
|
|
13023
|
+
if (!imageInsetRef.current || !fileCardSize)
|
|
13024
|
+
return;
|
|
13025
|
+
imageInsetRef.current.style.height = `${fileCardSize.height * 4}px`;
|
|
13026
|
+
}, [fileCardSize]);
|
|
13027
|
+
const fileName2 = React.useMemo(() => {
|
|
13028
|
+
if (!file)
|
|
13029
|
+
return;
|
|
13030
|
+
return truncateLength !== void 0 ? truncate(file.name, truncateLength) : file.name;
|
|
13031
|
+
}, [file, truncateLength]);
|
|
13032
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13033
|
+
Flex,
|
|
13034
|
+
{
|
|
13035
|
+
className: classNames$1(className, styles$4.ImageCard),
|
|
13036
|
+
width: "100%",
|
|
13037
|
+
direction: "column",
|
|
13038
|
+
position: "relative",
|
|
13039
|
+
height: "max-content",
|
|
13040
|
+
gap: "0",
|
|
13041
|
+
ref: forwardedRef,
|
|
13042
|
+
...rest,
|
|
13043
|
+
children: [
|
|
13044
|
+
!file && !error2 && /* @__PURE__ */ jsxRuntime.jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}) }),
|
|
13045
|
+
/* @__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 }) }),
|
|
13046
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13047
|
+
blocks.OvermapItem,
|
|
13048
|
+
{
|
|
13049
|
+
className: classNames$1(styles$4.Footer, {
|
|
13050
|
+
[styles$4.Loading]: !file
|
|
13051
|
+
}),
|
|
13052
|
+
size,
|
|
13053
|
+
ref: fileCardRef,
|
|
13054
|
+
leftSlot: error2 ? /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiFileWarningLine" }) : file && /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { fileType: file.type }),
|
|
13055
|
+
rightSlot,
|
|
13056
|
+
children: error2 ?? fileName2
|
|
13057
|
+
}
|
|
13058
|
+
)
|
|
13059
|
+
]
|
|
13060
|
+
}
|
|
13061
|
+
);
|
|
13062
|
+
})
|
|
13063
|
+
);
|
|
13042
13064
|
const UploadInput = React.memo((props) => {
|
|
13043
13065
|
var _a2;
|
|
13044
13066
|
const [{ inputId, labelId, size, severity, helpText, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
@@ -14175,17 +14197,15 @@ var __publicField = (obj, key, value) => {
|
|
|
14175
14197
|
Action.key
|
|
14176
14198
|
)) }),
|
|
14177
14199
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { display: forMobile(true, "block"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14178
|
-
blocks.
|
|
14200
|
+
blocks.OvermapDropdownMenu,
|
|
14179
14201
|
{
|
|
14180
14202
|
trigger: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { variant: "ghost", "aria-label": "Actions menu", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiMore2Line" }) }),
|
|
14181
14203
|
items: actions.map((Action) => {
|
|
14182
14204
|
var _a2;
|
|
14183
14205
|
return {
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
] }, Action.key),
|
|
14188
|
-
onSelect: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14206
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Action.Icon, {}),
|
|
14207
|
+
children: Action.text,
|
|
14208
|
+
onClick: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14189
14209
|
};
|
|
14190
14210
|
})
|
|
14191
14211
|
}
|
|
@@ -14243,10 +14263,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14243
14263
|
const field = FieldTypeToClsMapping[identifier];
|
|
14244
14264
|
const Icon = field.Icon;
|
|
14245
14265
|
return {
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { children: field.fieldTypeName })
|
|
14249
|
-
] }, identifier),
|
|
14266
|
+
children: field.fieldTypeName,
|
|
14267
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}),
|
|
14250
14268
|
value: identifier,
|
|
14251
14269
|
onSelect: () => {
|
|
14252
14270
|
onSelect(identifier);
|
|
@@ -14811,7 +14829,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14811
14829
|
)),
|
|
14812
14830
|
droppableProvided.placeholder,
|
|
14813
14831
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14814
|
-
blocks.
|
|
14832
|
+
blocks.OvermapDropdownMenu,
|
|
14815
14833
|
{
|
|
14816
14834
|
trigger: /* @__PURE__ */ jsxRuntime.jsxs(blocks.Button, { type: "button", variant: "soft", children: [
|
|
14817
14835
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiAddLine" }),
|