local-operator-ui 0.2.3 → 0.3.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/out/main/index.jsc
CHANGED
|
Binary file
|
package/out/preload/index.jsc
CHANGED
|
Binary file
|
|
@@ -2966,16 +2966,19 @@ var Action;
|
|
|
2966
2966
|
Action2["Replace"] = "REPLACE";
|
|
2967
2967
|
})(Action || (Action = {}));
|
|
2968
2968
|
const PopStateEventType = "popstate";
|
|
2969
|
-
function
|
|
2969
|
+
function createHashHistory(options) {
|
|
2970
2970
|
if (options === void 0) {
|
|
2971
2971
|
options = {};
|
|
2972
2972
|
}
|
|
2973
|
-
function
|
|
2973
|
+
function createHashLocation(window2, globalHistory) {
|
|
2974
2974
|
let {
|
|
2975
|
-
pathname,
|
|
2976
|
-
search: search2,
|
|
2977
|
-
hash: hash2
|
|
2978
|
-
} = window2.location;
|
|
2975
|
+
pathname = "/",
|
|
2976
|
+
search: search2 = "",
|
|
2977
|
+
hash: hash2 = ""
|
|
2978
|
+
} = parsePath(window2.location.hash.substr(1));
|
|
2979
|
+
if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
|
|
2980
|
+
pathname = "/" + pathname;
|
|
2981
|
+
}
|
|
2979
2982
|
return createLocation(
|
|
2980
2983
|
"",
|
|
2981
2984
|
{
|
|
@@ -2988,10 +2991,20 @@ function createBrowserHistory(options) {
|
|
|
2988
2991
|
globalHistory.state && globalHistory.state.key || "default"
|
|
2989
2992
|
);
|
|
2990
2993
|
}
|
|
2991
|
-
function
|
|
2992
|
-
|
|
2994
|
+
function createHashHref(window2, to) {
|
|
2995
|
+
let base = window2.document.querySelector("base");
|
|
2996
|
+
let href = "";
|
|
2997
|
+
if (base && base.getAttribute("href")) {
|
|
2998
|
+
let url = window2.location.href;
|
|
2999
|
+
let hashIndex = url.indexOf("#");
|
|
3000
|
+
href = hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
3001
|
+
}
|
|
3002
|
+
return href + "#" + (typeof to === "string" ? to : createPath(to));
|
|
3003
|
+
}
|
|
3004
|
+
function validateHashLocation(location, to) {
|
|
3005
|
+
warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
|
|
2993
3006
|
}
|
|
2994
|
-
return getUrlBasedHistory(
|
|
3007
|
+
return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
|
|
2995
3008
|
}
|
|
2996
3009
|
function invariant(value, message2) {
|
|
2997
3010
|
if (value === false || value === null || typeof value === "undefined") {
|
|
@@ -3104,6 +3117,7 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options)
|
|
|
3104
3117
|
function push2(to, state) {
|
|
3105
3118
|
action = Action.Push;
|
|
3106
3119
|
let location = createLocation(history.location, to, state);
|
|
3120
|
+
if (validateLocation) validateLocation(location, to);
|
|
3107
3121
|
index2 = getIndex() + 1;
|
|
3108
3122
|
let historyState = getHistoryState(location, index2);
|
|
3109
3123
|
let url = history.createHref(location);
|
|
@@ -3126,6 +3140,7 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options)
|
|
|
3126
3140
|
function replace2(to, state) {
|
|
3127
3141
|
action = Action.Replace;
|
|
3128
3142
|
let location = createLocation(history.location, to, state);
|
|
3143
|
+
if (validateLocation) validateLocation(location, to);
|
|
3129
3144
|
index2 = getIndex();
|
|
3130
3145
|
let historyState = getHistoryState(location, index2);
|
|
3131
3146
|
let url = history.createHref(location);
|
|
@@ -4134,16 +4149,16 @@ try {
|
|
|
4134
4149
|
}
|
|
4135
4150
|
const START_TRANSITION = "startTransition";
|
|
4136
4151
|
const startTransitionImpl = React[START_TRANSITION];
|
|
4137
|
-
function
|
|
4152
|
+
function HashRouter(_ref5) {
|
|
4138
4153
|
let {
|
|
4139
4154
|
basename: basename2,
|
|
4140
4155
|
children,
|
|
4141
4156
|
future,
|
|
4142
4157
|
window: window2
|
|
4143
|
-
} =
|
|
4158
|
+
} = _ref5;
|
|
4144
4159
|
let historyRef = reactExports.useRef();
|
|
4145
4160
|
if (historyRef.current == null) {
|
|
4146
|
-
historyRef.current =
|
|
4161
|
+
historyRef.current = createHashHistory({
|
|
4147
4162
|
window: window2,
|
|
4148
4163
|
v5Compat: true
|
|
4149
4164
|
});
|
|
@@ -34519,16 +34534,32 @@ const ChatLayout = ({ sidebar, content: content2 }) => {
|
|
|
34519
34534
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContentContainer$4, { children: content2 })
|
|
34520
34535
|
] });
|
|
34521
34536
|
};
|
|
34537
|
+
const normalizePath = (path2) => {
|
|
34538
|
+
return path2.replace(/\\/g, "/");
|
|
34539
|
+
};
|
|
34540
|
+
const getCurrentPath = () => {
|
|
34541
|
+
if (window.location.hash) {
|
|
34542
|
+
return normalizePath(window.location.hash.substring(1));
|
|
34543
|
+
}
|
|
34544
|
+
return normalizePath(window.location.pathname);
|
|
34545
|
+
};
|
|
34546
|
+
const pathIncludes = (path2, segment) => {
|
|
34547
|
+
return normalizePath(path2).includes(segment);
|
|
34548
|
+
};
|
|
34522
34549
|
const useAgentRouteParam = () => {
|
|
34523
34550
|
const { agentId } = useParams();
|
|
34524
34551
|
const navigate = useNavigate();
|
|
34552
|
+
const getCurrentBasePath = () => {
|
|
34553
|
+
const currentPath = getCurrentPath();
|
|
34554
|
+
return pathIncludes(currentPath, "/chat") ? "chat" : "agents";
|
|
34555
|
+
};
|
|
34525
34556
|
const navigateToAgent = (id, path2) => {
|
|
34526
34557
|
if (!id) return;
|
|
34527
|
-
const basePath = path2 || (
|
|
34558
|
+
const basePath = path2 || getCurrentBasePath();
|
|
34528
34559
|
navigate(`/${basePath}/${id}`);
|
|
34529
34560
|
};
|
|
34530
34561
|
const clearAgentId = (path2) => {
|
|
34531
|
-
const basePath = path2 || (
|
|
34562
|
+
const basePath = path2 || getCurrentBasePath();
|
|
34532
34563
|
navigate(`/${basePath}`);
|
|
34533
34564
|
};
|
|
34534
34565
|
return {
|
|
@@ -34538,14 +34569,14 @@ const useAgentRouteParam = () => {
|
|
|
34538
34569
|
};
|
|
34539
34570
|
};
|
|
34540
34571
|
const useCurrentView = () => {
|
|
34541
|
-
const
|
|
34542
|
-
if (
|
|
34572
|
+
const currentPath = getCurrentPath();
|
|
34573
|
+
if (pathIncludes(currentPath, "/chat")) {
|
|
34543
34574
|
return "chat";
|
|
34544
34575
|
}
|
|
34545
|
-
if (
|
|
34576
|
+
if (pathIncludes(currentPath, "/agents")) {
|
|
34546
34577
|
return "agents";
|
|
34547
34578
|
}
|
|
34548
|
-
if (
|
|
34579
|
+
if (pathIncludes(currentPath, "/settings")) {
|
|
34549
34580
|
return "settings";
|
|
34550
34581
|
}
|
|
34551
34582
|
return "chat";
|
|
@@ -111744,6 +111775,12 @@ const CREDENTIAL_MANIFEST = [
|
|
|
111744
111775
|
name: "Tavily API Key",
|
|
111745
111776
|
description: "API key for Tavily, a search API designed specifically for AI applications. Allows your agents to search the web for information.",
|
|
111746
111777
|
url: "https://tavily.com/#api"
|
|
111778
|
+
},
|
|
111779
|
+
{
|
|
111780
|
+
key: "FAL_API_KEY",
|
|
111781
|
+
name: "FAL API Key",
|
|
111782
|
+
description: "API key for FAL, used by agents for generating, interpreting, and understanding images.",
|
|
111783
|
+
url: "https://docs.fal.ai/quick-start"
|
|
111747
111784
|
}
|
|
111748
111785
|
];
|
|
111749
111786
|
const getCredentialInfo = (key) => {
|
|
@@ -112067,7 +112104,7 @@ const ModelCredentialStep = () => {
|
|
|
112067
112104
|
};
|
|
112068
112105
|
const SearchApiStep = () => {
|
|
112069
112106
|
const searchApiCredentials = CREDENTIAL_MANIFEST.filter(
|
|
112070
|
-
(cred) => cred.key === "
|
|
112107
|
+
(cred) => cred.key === "TAVILY_API_KEY" || cred.key === "SERP_API_KEY"
|
|
112071
112108
|
);
|
|
112072
112109
|
const [selectedCredential, setSelectedCredential] = reactExports.useState(
|
|
112073
112110
|
searchApiCredentials[0]?.key || ""
|
|
@@ -114865,7 +114902,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
114865
114902
|
root2.render(
|
|
114866
114903
|
/* @__PURE__ */ jsxRuntimeExports.jsx(React$1.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ThemeProvider, { children: [
|
|
114867
114904
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
|
|
114868
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
114905
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HashRouter, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) }) }),
|
|
114869
114906
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ThemedToastContainer, {}),
|
|
114870
114907
|
false
|
|
114871
114908
|
] }) }) })
|
package/out/renderer/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
9
9
|
<meta http-equiv="Content-Security-Policy"
|
|
10
10
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self'" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-BZlgXU2r.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/error-boundary-GcWSKAk-.js">
|
|
13
13
|
<link rel="stylesheet" crossorigin href="./assets/error-boundary-B9KBGB-g.css">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-94BTFuhu.css">
|