vite-plugin-opencode-assistant 1.0.84 → 1.0.86
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/es/index.mjs +6 -1
- package/lib/client.js +1854 -1837
- package/lib/index.cjs +6 -1
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -69,6 +69,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
69
69
|
const log = createLogger("Plugin");
|
|
70
70
|
let actualWebPort = config.webPort;
|
|
71
71
|
let actualProxyPort = (_a = config.proxyPort) != null ? _a : DEFAULT_PROXY_PORT;
|
|
72
|
+
let projectRoot = "";
|
|
72
73
|
let pageContext = { url: "", title: "" };
|
|
73
74
|
const serviceInstanceId = crypto.randomUUID();
|
|
74
75
|
const sseClients = /* @__PURE__ */ new Set();
|
|
@@ -100,6 +101,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
100
101
|
return __async(this, null, function* () {
|
|
101
102
|
var _a2, _b2;
|
|
102
103
|
const timer = log.timer("configureServer");
|
|
104
|
+
projectRoot = server.config.root;
|
|
103
105
|
let viteOrigin = "";
|
|
104
106
|
const getViteOrigin = () => viteOrigin;
|
|
105
107
|
setupMiddlewares(server, {
|
|
@@ -196,7 +198,10 @@ function createOpenCodePlugin(options = {}) {
|
|
|
196
198
|
proxyPort: actualProxyPort,
|
|
197
199
|
proxyHost: config.hostname,
|
|
198
200
|
displayMode: config.displayMode === "extension" ? "extension-selector" : config.displayMode,
|
|
199
|
-
splitMode: config.splitMode
|
|
201
|
+
splitMode: config.splitMode,
|
|
202
|
+
serviceInstanceId,
|
|
203
|
+
webPort: actualWebPort,
|
|
204
|
+
projectRoot
|
|
200
205
|
});
|
|
201
206
|
timer.end();
|
|
202
207
|
return html.replace("</body>", `${widget}</body>`);
|