vite-plugin-opencode-assistant 1.0.84 → 1.0.85
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/lib/index.cjs
CHANGED
|
@@ -92,6 +92,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
92
92
|
const log = (0, import_shared.createLogger)("Plugin");
|
|
93
93
|
let actualWebPort = config.webPort;
|
|
94
94
|
let actualProxyPort = (_a = config.proxyPort) != null ? _a : import_shared.DEFAULT_PROXY_PORT;
|
|
95
|
+
let projectRoot = "";
|
|
95
96
|
let pageContext = { url: "", title: "" };
|
|
96
97
|
const serviceInstanceId = import_crypto.default.randomUUID();
|
|
97
98
|
const sseClients = /* @__PURE__ */ new Set();
|
|
@@ -123,6 +124,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
123
124
|
return __async(this, null, function* () {
|
|
124
125
|
var _a2, _b2;
|
|
125
126
|
const timer = log.timer("configureServer");
|
|
127
|
+
projectRoot = server.config.root;
|
|
126
128
|
let viteOrigin = "";
|
|
127
129
|
const getViteOrigin = () => viteOrigin;
|
|
128
130
|
(0, import_endpoints.setupMiddlewares)(server, {
|
|
@@ -219,7 +221,10 @@ function createOpenCodePlugin(options = {}) {
|
|
|
219
221
|
proxyPort: actualProxyPort,
|
|
220
222
|
proxyHost: config.hostname,
|
|
221
223
|
displayMode: config.displayMode === "extension" ? "extension-selector" : config.displayMode,
|
|
222
|
-
splitMode: config.splitMode
|
|
224
|
+
splitMode: config.splitMode,
|
|
225
|
+
serviceInstanceId,
|
|
226
|
+
webPort: actualWebPort,
|
|
227
|
+
projectRoot
|
|
223
228
|
});
|
|
224
229
|
timer.end();
|
|
225
230
|
return html.replace("</body>", `${widget}</body>`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-opencode-assistant",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"description": "Embed OpenCode Web UI in your Vite dev server for real-time code modification and preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"unplugin-vue-inspector": "^3.0.0",
|
|
39
39
|
"execa": "^9.6.1",
|
|
40
|
-
"@vite-plugin-opencode-assistant/opencode": "1.0.
|
|
41
|
-
"@vite-plugin-opencode-assistant/shared": "1.0.
|
|
42
|
-
"@vite-plugin-opencode-assistant/components": "1.0.
|
|
40
|
+
"@vite-plugin-opencode-assistant/opencode": "1.0.85",
|
|
41
|
+
"@vite-plugin-opencode-assistant/shared": "1.0.85",
|
|
42
|
+
"@vite-plugin-opencode-assistant/components": "1.0.85"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"vite": ">=5.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vite-plugin-opencode-assistant/client": "1.0.
|
|
48
|
+
"@vite-plugin-opencode-assistant/client": "1.0.85"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "pagoda-cli build && vite build -c vite.client.config.ts",
|