vite-plugin-opencode-assistant 1.1.19 → 1.1.21
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 +1 -2
- package/lib/index.cjs +1 -2
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -220,8 +220,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
220
220
|
projectRoot,
|
|
221
221
|
verbose: config.verbose
|
|
222
222
|
});
|
|
223
|
-
const
|
|
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>`;
|
|
223
|
+
const titleInject = `<script>(function(){var K="_opencode_pk",s=sessionStorage,k=s.getItem(K)||(function(){var v=Math.random().toString(36).slice(2,5);s.setItem(K,v);return v})(),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
224
|
timer.end();
|
|
226
225
|
return html.replace("</body>", `${titleInject}
|
|
227
226
|
${widget}</body>`);
|
package/lib/index.cjs
CHANGED
|
@@ -245,8 +245,7 @@ function createOpenCodePlugin(options = {}) {
|
|
|
245
245
|
projectRoot,
|
|
246
246
|
verbose: config.verbose
|
|
247
247
|
});
|
|
248
|
-
const
|
|
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>`;
|
|
248
|
+
const titleInject = `<script>(function(){var K="_opencode_pk",s=sessionStorage,k=s.getItem(K)||(function(){var v=Math.random().toString(36).slice(2,5);s.setItem(K,v);return v})(),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
249
|
timer.end();
|
|
251
250
|
return html.replace("</body>", `${titleInject}
|
|
252
251
|
${widget}</body>`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-opencode-assistant",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
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/
|
|
41
|
-
"@vite-plugin-opencode-assistant/
|
|
42
|
-
"@vite-plugin-opencode-assistant/components": "1.1.
|
|
40
|
+
"@vite-plugin-opencode-assistant/opencode": "1.1.21",
|
|
41
|
+
"@vite-plugin-opencode-assistant/shared": "1.1.21",
|
|
42
|
+
"@vite-plugin-opencode-assistant/components": "1.1.21"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"vite": ">=5.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vite-plugin-opencode-assistant/client": "1.1.
|
|
48
|
+
"@vite-plugin-opencode-assistant/client": "1.1.21"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "pagoda-cli build && vite build -c vite.client.config.ts",
|