@mcp-b/embedded-agent 1.2.0 → 1.2.2
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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/dist/web-component-standalone.iife.js +2 -2
- package/dist/web-component.d.ts +2 -0
- package/dist/web-component.d.ts.map +1 -1
- package/dist/web-component.js +8 -9
- package/dist/web-component.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ interface DevModeConfig {
|
|
|
14
14
|
anthropicApiKey: string;
|
|
15
15
|
/** Your OpenAI API key for voice mode (optional) */
|
|
16
16
|
openaiApiKey?: string;
|
|
17
|
+
/** Use window.location.origin instead of production API (for internal development) */
|
|
18
|
+
useLocalApi?: boolean;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Props for the EmbeddedAgent component
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/web-component.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/web-component.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UA8DiB,aAAA;;;;;;;;;;;UAYA,kBAAA;;;;;;;YAQN;;;;;;;;;;;;cAaE,eAAe,GAAG;;;;;;;iBAgDf,mBAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4709,7 +4709,7 @@ const ElicitationButtonBar = ({ className }) => {
|
|
|
4709
4709
|
})]
|
|
4710
4710
|
}),
|
|
4711
4711
|
toolDescription && /* @__PURE__ */ jsx("p", {
|
|
4712
|
-
className: "mt-1.5 pl-6 text-xs leading-relaxed text-white/50",
|
|
4712
|
+
className: "mt-1.5 line-clamp-3 pl-6 text-xs leading-relaxed text-white/50",
|
|
4713
4713
|
children: toolDescription
|
|
4714
4714
|
}),
|
|
4715
4715
|
formattedArgs && /* @__PURE__ */ jsx("pre", {
|
|
@@ -5724,7 +5724,7 @@ const ApprovalDialog = (t0) => {
|
|
|
5724
5724
|
let t9;
|
|
5725
5725
|
if ($[24] !== toolDescription) {
|
|
5726
5726
|
t9 = toolDescription && /* @__PURE__ */ jsx("div", {
|
|
5727
|
-
className: "mb-2 text-xs text-white/50",
|
|
5727
|
+
className: "mb-2 line-clamp-3 text-xs text-white/50",
|
|
5728
5728
|
children: toolDescription
|
|
5729
5729
|
});
|
|
5730
5730
|
$[24] = toolDescription;
|
|
@@ -8933,13 +8933,12 @@ function injectStyles() {
|
|
|
8933
8933
|
*
|
|
8934
8934
|
*/
|
|
8935
8935
|
/**
|
|
8936
|
-
* Get the default API base URL
|
|
8937
|
-
*
|
|
8938
|
-
* - Development builds: use current origin (for local dev server)
|
|
8936
|
+
* Get the default API base URL.
|
|
8937
|
+
* Always uses production unless explicitly overridden with useLocalApi.
|
|
8939
8938
|
*/
|
|
8940
|
-
const getDefaultApiBase = () => {
|
|
8941
|
-
if (
|
|
8942
|
-
return
|
|
8939
|
+
const getDefaultApiBase = (useLocalApi) => {
|
|
8940
|
+
if (useLocalApi && typeof window !== "undefined") return window.location.origin;
|
|
8941
|
+
return WEBMCP_PRODUCTION_API_BASE;
|
|
8943
8942
|
};
|
|
8944
8943
|
/**
|
|
8945
8944
|
* EmbeddedAgent - Drop-in AI chat widget
|
|
@@ -8956,7 +8955,7 @@ const EmbeddedAgent = (t0) => {
|
|
|
8956
8955
|
const { appId, devMode } = t0;
|
|
8957
8956
|
let apiBase;
|
|
8958
8957
|
if ($[0] !== appId || $[1] !== devMode) {
|
|
8959
|
-
apiBase = getDefaultApiBase();
|
|
8958
|
+
apiBase = getDefaultApiBase(devMode?.useLocalApi);
|
|
8960
8959
|
if (typeof window !== "undefined") console.debug("[WebMCP] Initialized", {
|
|
8961
8960
|
appId,
|
|
8962
8961
|
mode: devMode ? "development" : "production",
|