@standardagents/builder 0.8.2 → 0.8.3
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.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6158,8 +6158,8 @@ async function serveUI(pathname, env) {
|
|
|
6158
6158
|
// Transform HTML to use configured mount point
|
|
6159
6159
|
if (response.status === 200) {
|
|
6160
6160
|
const html = await response.text();
|
|
6161
|
-
// Replace default /
|
|
6162
|
-
const modifiedHtml = html.replace(/\\/
|
|
6161
|
+
// Replace default /agents/ paths with configured mount point
|
|
6162
|
+
const modifiedHtml = html.replace(/\\/agents\\//g, \`\${MOUNT_POINT}/\`);
|
|
6163
6163
|
return new Response(modifiedHtml, {
|
|
6164
6164
|
headers: {
|
|
6165
6165
|
"Content-Type": "text/html; charset=utf-8",
|
|
@@ -6954,7 +6954,7 @@ export class DurableAgentBuilder extends _BaseDurableAgentBuilder {
|
|
|
6954
6954
|
const configScript = `<script>window.__AGENTBUILDER_CONFIG__ = { mountPoint: "${mountPoint}" };</script>`;
|
|
6955
6955
|
let htmlContent = content.toString();
|
|
6956
6956
|
const assetPrefix = mountPoint === "/" ? "/" : `${mountPoint}/`;
|
|
6957
|
-
htmlContent = htmlContent.replace(/\/
|
|
6957
|
+
htmlContent = htmlContent.replace(/\/agents\//g, assetPrefix);
|
|
6958
6958
|
htmlContent = htmlContent.replace("</head>", `${configScript}</head>`);
|
|
6959
6959
|
content = Buffer.from(htmlContent);
|
|
6960
6960
|
}
|
|
@@ -7013,7 +7013,7 @@ export class DurableAgentBuilder extends _BaseDurableAgentBuilder {
|
|
|
7013
7013
|
const configScript = `<script>window.__AGENTBUILDER_CONFIG__ = { mountPoint: "${mountPoint}" };</script>`;
|
|
7014
7014
|
let htmlContent = content.toString();
|
|
7015
7015
|
const assetPrefix = mountPoint === "/" ? "/" : `${mountPoint}/`;
|
|
7016
|
-
htmlContent = htmlContent.replace(/\/
|
|
7016
|
+
htmlContent = htmlContent.replace(/\/agents\//g, assetPrefix);
|
|
7017
7017
|
htmlContent = htmlContent.replace("</head>", `${configScript}</head>`);
|
|
7018
7018
|
content = Buffer.from(htmlContent);
|
|
7019
7019
|
}
|