vite-plugin-opencode-assistant 1.1.19 → 1.1.20

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 CHANGED
@@ -73,6 +73,7 @@ function createOpenCodePlugin(options = {}) {
73
73
  const DEFAULT_TAB = "default";
74
74
  const pageContexts = /* @__PURE__ */ new Map([[DEFAULT_TAB, pageContext]]);
75
75
  let activeTabId = DEFAULT_TAB;
76
+ const pageKey = Math.random().toString(36).slice(2, 5);
76
77
  const serviceInstanceId = crypto.randomUUID();
77
78
  const sseClients = /* @__PURE__ */ new Set();
78
79
  const api = new OpenCodeAPI(
@@ -220,7 +221,6 @@ function createOpenCodePlugin(options = {}) {
220
221
  projectRoot,
221
222
  verbose: config.verbose
222
223
  });
223
- const pageKey = Math.random().toString(36).slice(2, 5);
224
224
  const titleInject = `<script>(function(){var k="[${pageKey}]",d=document,p=!1,f=function(){if(p)return;var t=d.title;if(t.indexOf(k)===0)return;p=!0;d.title=k+t.replace(k,"");p=!1};f();new MutationObserver(f).observe(d.querySelector("title")||d.head,{childList:!0})})();</script>`;
225
225
  timer.end();
226
226
  return html.replace("</body>", `${titleInject}
package/lib/index.cjs CHANGED
@@ -98,6 +98,7 @@ function createOpenCodePlugin(options = {}) {
98
98
  const DEFAULT_TAB = "default";
99
99
  const pageContexts = /* @__PURE__ */ new Map([[DEFAULT_TAB, pageContext]]);
100
100
  let activeTabId = DEFAULT_TAB;
101
+ const pageKey = Math.random().toString(36).slice(2, 5);
101
102
  const serviceInstanceId = import_crypto.default.randomUUID();
102
103
  const sseClients = /* @__PURE__ */ new Set();
103
104
  const api = new import_api.OpenCodeAPI(
@@ -245,7 +246,6 @@ function createOpenCodePlugin(options = {}) {
245
246
  projectRoot,
246
247
  verbose: config.verbose
247
248
  });
248
- const pageKey = Math.random().toString(36).slice(2, 5);
249
249
  const titleInject = `<script>(function(){var k="[${pageKey}]",d=document,p=!1,f=function(){if(p)return;var t=d.title;if(t.indexOf(k)===0)return;p=!0;d.title=k+t.replace(k,"");p=!1};f();new MutationObserver(f).observe(d.querySelector("title")||d.head,{childList:!0})})();</script>`;
250
250
  timer.end();
251
251
  return html.replace("</body>", `${titleInject}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-opencode-assistant",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
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/shared": "1.1.19",
41
- "@vite-plugin-opencode-assistant/opencode": "1.1.19",
42
- "@vite-plugin-opencode-assistant/components": "1.1.19"
40
+ "@vite-plugin-opencode-assistant/opencode": "1.1.20",
41
+ "@vite-plugin-opencode-assistant/components": "1.1.20",
42
+ "@vite-plugin-opencode-assistant/shared": "1.1.20"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "vite": ">=5.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vite-plugin-opencode-assistant/client": "1.1.19"
48
+ "@vite-plugin-opencode-assistant/client": "1.1.20"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "pagoda-cli build && vite build -c vite.client.config.ts",