@overmap-ai/core 1.0.48-fix-agent-errors.3 → 1.0.48-menu-improvements.0
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/overmap-core.js +71 -49
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +71 -49
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +1 -0
- package/package.json +152 -152
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @overmap-ai/core
|
|
2
|
-
|
|
3
|
-
The `core` package contains core functionality for the Overmap platform. It is a peer dependency of all other overmap
|
|
4
|
-
packages.
|
|
1
|
+
# @overmap-ai/core
|
|
2
|
+
|
|
3
|
+
The `core` package contains core functionality for the Overmap platform. It is a peer dependency of all other overmap
|
|
4
|
+
packages.
|
|
@@ -6,4 +6,4 @@ export interface ImageCardProps extends Omit<OvermapItemProps, "children" | "lef
|
|
|
6
6
|
error?: string;
|
|
7
7
|
truncateLength?: number;
|
|
8
8
|
}
|
|
9
|
-
export declare const ImageCard: import("react").MemoExoticComponent<(
|
|
9
|
+
export declare const ImageCard: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ImageCardProps & import("react").RefAttributes<HTMLDivElement>>>;
|
package/dist/overmap-core.js
CHANGED
|
@@ -4251,10 +4251,20 @@ function runMiddleware(action) {
|
|
|
4251
4251
|
var _a2;
|
|
4252
4252
|
return (_a2 = allMiddleware[0]) == null ? void 0 : _a2.run(action);
|
|
4253
4253
|
}
|
|
4254
|
-
const discardStatuses = [400, 409, 403, 404];
|
|
4254
|
+
const discardStatuses = [400, 409, 403, 404, 405, 500];
|
|
4255
4255
|
const statusMessages = {
|
|
4256
4256
|
403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
|
|
4257
|
-
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
|
|
4257
|
+
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
|
|
4258
|
+
405: {
|
|
4259
|
+
title: "Not supported",
|
|
4260
|
+
description: "It's not you. It's us. Sorry for the inconvenience.",
|
|
4261
|
+
severity: "danger"
|
|
4262
|
+
},
|
|
4263
|
+
500: {
|
|
4264
|
+
title: "Server error",
|
|
4265
|
+
description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
|
|
4266
|
+
severity: "danger"
|
|
4267
|
+
}
|
|
4258
4268
|
};
|
|
4259
4269
|
function discard(reason, action, retries = 0) {
|
|
4260
4270
|
var _a2;
|
|
@@ -7499,7 +7509,7 @@ class AgentService extends BaseApiService {
|
|
|
7499
7509
|
* @param request The message to prompt the agent with.
|
|
7500
7510
|
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
7501
7511
|
*/
|
|
7502
|
-
prompt(request2, conversationId) {
|
|
7512
|
+
async prompt(request2, conversationId) {
|
|
7503
7513
|
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
7504
7514
|
return this.enqueueRequest({
|
|
7505
7515
|
description: "Prompt agent",
|
|
@@ -7514,6 +7524,16 @@ class AgentService extends BaseApiService {
|
|
|
7514
7524
|
queryParams: conversationId ? { conversation_id: conversationId } : {}
|
|
7515
7525
|
});
|
|
7516
7526
|
}
|
|
7527
|
+
async rate(responseId, rating) {
|
|
7528
|
+
return this.enqueueRequest({
|
|
7529
|
+
description: "Rate agent response",
|
|
7530
|
+
method: HttpMethod.PUT,
|
|
7531
|
+
url: `/agents/responses/${responseId}/rate/`,
|
|
7532
|
+
payload: { rating },
|
|
7533
|
+
blockers: ["rate"],
|
|
7534
|
+
blocks: ["rate"]
|
|
7535
|
+
});
|
|
7536
|
+
}
|
|
7517
7537
|
}
|
|
7518
7538
|
class OvermapSDK {
|
|
7519
7539
|
constructor(apiUrl, store) {
|
|
@@ -13002,52 +13022,54 @@ const styles$4 = {
|
|
|
13002
13022
|
Footer,
|
|
13003
13023
|
Loading
|
|
13004
13024
|
};
|
|
13005
|
-
const ImageCard = memo(
|
|
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
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
}
|
|
13050
|
-
|
|
13025
|
+
const ImageCard = memo(
|
|
13026
|
+
forwardRef((props, forwardedRef) => {
|
|
13027
|
+
const { file, alt, error: error2, size, rightSlot, className, truncateLength, ...rest } = props;
|
|
13028
|
+
const fileCardRef = useRef(null);
|
|
13029
|
+
const imageInsetRef = useRef(null);
|
|
13030
|
+
const fileCardSize = useSize(fileCardRef);
|
|
13031
|
+
useLayoutEffect(() => {
|
|
13032
|
+
if (!imageInsetRef.current || !fileCardSize)
|
|
13033
|
+
return;
|
|
13034
|
+
imageInsetRef.current.style.height = `${fileCardSize.height * 4}px`;
|
|
13035
|
+
}, [fileCardSize]);
|
|
13036
|
+
const fileName2 = useMemo(() => {
|
|
13037
|
+
if (!file)
|
|
13038
|
+
return;
|
|
13039
|
+
return truncateLength !== void 0 ? truncate(file.name, truncateLength) : file.name;
|
|
13040
|
+
}, [file, truncateLength]);
|
|
13041
|
+
return /* @__PURE__ */ jsxs(
|
|
13042
|
+
Flex,
|
|
13043
|
+
{
|
|
13044
|
+
className: classNames$1(className, styles$4.ImageCard),
|
|
13045
|
+
width: "100%",
|
|
13046
|
+
direction: "column",
|
|
13047
|
+
position: "relative",
|
|
13048
|
+
height: "max-content",
|
|
13049
|
+
gap: "0",
|
|
13050
|
+
ref: forwardedRef,
|
|
13051
|
+
...rest,
|
|
13052
|
+
children: [
|
|
13053
|
+
!file && !error2 && /* @__PURE__ */ jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsx(Spinner, {}) }),
|
|
13054
|
+
/* @__PURE__ */ jsx(Inset, { className: styles$4.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsx("img", { className: styles$4.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
|
|
13055
|
+
/* @__PURE__ */ jsx(
|
|
13056
|
+
OvermapItem,
|
|
13057
|
+
{
|
|
13058
|
+
className: classNames$1(styles$4.Footer, {
|
|
13059
|
+
[styles$4.Loading]: !file
|
|
13060
|
+
}),
|
|
13061
|
+
size,
|
|
13062
|
+
ref: fileCardRef,
|
|
13063
|
+
leftSlot: error2 ? /* @__PURE__ */ jsx(RiIcon, { icon: "RiFileWarningLine" }) : file && /* @__PURE__ */ jsx(FileIcon, { fileType: file.type }),
|
|
13064
|
+
rightSlot,
|
|
13065
|
+
children: error2 ?? fileName2
|
|
13066
|
+
}
|
|
13067
|
+
)
|
|
13068
|
+
]
|
|
13069
|
+
}
|
|
13070
|
+
);
|
|
13071
|
+
})
|
|
13072
|
+
);
|
|
13051
13073
|
const UploadInput = memo((props) => {
|
|
13052
13074
|
var _a2;
|
|
13053
13075
|
const [{ inputId, labelId, size, severity, helpText, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|