vite-plugin-opencode-assistant 1.0.93 → 1.1.0
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/core/opencode-web.mjs
CHANGED
|
@@ -115,6 +115,7 @@ function startOpenCodeWeb(options) {
|
|
|
115
115
|
(_b = proc.stderr) == null ? void 0 : _b.on("data", (data) => {
|
|
116
116
|
const output = data.toString().trim();
|
|
117
117
|
if (output) {
|
|
118
|
+
if (output.includes("MaxListenersExceededWarning")) return;
|
|
118
119
|
log.warn("[OpenCode stderr]", { output });
|
|
119
120
|
getProcessLogBuffer().addOpenCodeStderr(output);
|
|
120
121
|
}
|
package/es/core/proxy-server.mjs
CHANGED
|
@@ -261,7 +261,11 @@ function generateBridgeScript(options) {
|
|
|
261
261
|
flex-direction: column !important;
|
|
262
262
|
z-index: 600 !important;
|
|
263
263
|
border-radius: 12px !important;
|
|
264
|
-
box-shadow:
|
|
264
|
+
box-shadow:
|
|
265
|
+
0 0 0 1px rgba(0, 0, 0, 0.04),
|
|
266
|
+
0 2px 4px rgba(0, 0, 0, 0.04),
|
|
267
|
+
0 8px 16px rgba(0, 0, 0, 0.08),
|
|
268
|
+
0 16px 40px rgba(0, 0, 0, 0.12) !important;
|
|
265
269
|
overflow: hidden !important;
|
|
266
270
|
transition: none;
|
|
267
271
|
}
|
|
@@ -269,6 +273,11 @@ function generateBridgeScript(options) {
|
|
|
269
273
|
max-width: none !important;
|
|
270
274
|
}
|
|
271
275
|
|
|
276
|
+
/* \u4F1A\u8BDD\u6D6E\u7A97\u5185\u5C42\u80CC\u666F\u62AC\u9AD8\uFF0C\u4E0E\u5BA1\u67E5\u9762\u677F\u5E95\u8272\u5F62\u6210\u5C42\u6B21 */
|
|
277
|
+
.opencode-review-panel-overlay [data-ref="session-panel"] [class*="bg-v2-background-bg-base"] {
|
|
278
|
+
background: color-mix(in srgb, var(--v2-background-bg-base, #1e1e1e) 96%, #fff) !important;
|
|
279
|
+
}
|
|
280
|
+
|
|
272
281
|
/* \u9690\u85CF\u4F1A\u8BDD\u9762\u677F\u5185\u7684\u6807\u9898 */
|
|
273
282
|
.opencode-review-panel-overlay [data-ref="session-panel"] [data-session-title] {
|
|
274
283
|
display: none !important;
|
|
@@ -390,10 +399,21 @@ function generateBridgeScript(options) {
|
|
|
390
399
|
btn.className = 'opencode-chat-toggle-btn';
|
|
391
400
|
btn.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>';
|
|
392
401
|
btn.title = '\u5C55\u5F00\u804A\u5929\u9762\u677F';
|
|
402
|
+
// \u4ECE localStorage \u6062\u590D\u4E0A\u6B21\u7684\u5C55\u5F00/\u6536\u8D77\u72B6\u6001\uFF0C\u9ED8\u8BA4\u6536\u8D77
|
|
403
|
+
var chatVisible = localStorage.getItem('opencode-review-chat-visible');
|
|
404
|
+
if (chatVisible === 'true') {
|
|
405
|
+
document.documentElement.classList.remove('hide-chat');
|
|
406
|
+
btn.classList.add('active');
|
|
407
|
+
btn.title = '\u9690\u85CF\u804A\u5929\u9762\u677F';
|
|
408
|
+
} else {
|
|
409
|
+
document.documentElement.classList.add('hide-chat');
|
|
410
|
+
}
|
|
393
411
|
btn.onclick = function() {
|
|
394
412
|
document.documentElement.classList.toggle('hide-chat');
|
|
395
413
|
btn.classList.toggle('active');
|
|
396
|
-
|
|
414
|
+
var isVisible = btn.classList.contains('active');
|
|
415
|
+
btn.title = isVisible ? '\u9690\u85CF\u804A\u5929\u9762\u677F' : '\u5C55\u5F00\u804A\u5929\u9762\u677F';
|
|
416
|
+
localStorage.setItem('opencode-review-chat-visible', isVisible ? 'true' : 'false');
|
|
397
417
|
};
|
|
398
418
|
document.body.appendChild(btn);
|
|
399
419
|
}
|
|
@@ -419,7 +439,7 @@ function generateBridgeScript(options) {
|
|
|
419
439
|
var attempts = 0;
|
|
420
440
|
function tryApply() {
|
|
421
441
|
if (ensureReviewPanelRefs()) {
|
|
422
|
-
document.documentElement.classList.add('opencode-review-panel-overlay'
|
|
442
|
+
document.documentElement.classList.add('opencode-review-panel-overlay');
|
|
423
443
|
injectChatToggleBtn();
|
|
424
444
|
return;
|
|
425
445
|
}
|
|
@@ -146,6 +146,7 @@ function startOpenCodeWeb(options) {
|
|
|
146
146
|
(_b = proc.stderr) == null ? void 0 : _b.on("data", (data) => {
|
|
147
147
|
const output = data.toString().trim();
|
|
148
148
|
if (output) {
|
|
149
|
+
if (output.includes("MaxListenersExceededWarning")) return;
|
|
149
150
|
log.warn("[OpenCode stderr]", { output });
|
|
150
151
|
(0, import_shared.getProcessLogBuffer)().addOpenCodeStderr(output);
|
|
151
152
|
}
|
|
@@ -285,7 +285,11 @@ function generateBridgeScript(options) {
|
|
|
285
285
|
flex-direction: column !important;
|
|
286
286
|
z-index: 600 !important;
|
|
287
287
|
border-radius: 12px !important;
|
|
288
|
-
box-shadow:
|
|
288
|
+
box-shadow:
|
|
289
|
+
0 0 0 1px rgba(0, 0, 0, 0.04),
|
|
290
|
+
0 2px 4px rgba(0, 0, 0, 0.04),
|
|
291
|
+
0 8px 16px rgba(0, 0, 0, 0.08),
|
|
292
|
+
0 16px 40px rgba(0, 0, 0, 0.12) !important;
|
|
289
293
|
overflow: hidden !important;
|
|
290
294
|
transition: none;
|
|
291
295
|
}
|
|
@@ -293,6 +297,11 @@ function generateBridgeScript(options) {
|
|
|
293
297
|
max-width: none !important;
|
|
294
298
|
}
|
|
295
299
|
|
|
300
|
+
/* \u4F1A\u8BDD\u6D6E\u7A97\u5185\u5C42\u80CC\u666F\u62AC\u9AD8\uFF0C\u4E0E\u5BA1\u67E5\u9762\u677F\u5E95\u8272\u5F62\u6210\u5C42\u6B21 */
|
|
301
|
+
.opencode-review-panel-overlay [data-ref="session-panel"] [class*="bg-v2-background-bg-base"] {
|
|
302
|
+
background: color-mix(in srgb, var(--v2-background-bg-base, #1e1e1e) 96%, #fff) !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
296
305
|
/* \u9690\u85CF\u4F1A\u8BDD\u9762\u677F\u5185\u7684\u6807\u9898 */
|
|
297
306
|
.opencode-review-panel-overlay [data-ref="session-panel"] [data-session-title] {
|
|
298
307
|
display: none !important;
|
|
@@ -414,10 +423,21 @@ function generateBridgeScript(options) {
|
|
|
414
423
|
btn.className = 'opencode-chat-toggle-btn';
|
|
415
424
|
btn.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>';
|
|
416
425
|
btn.title = '\u5C55\u5F00\u804A\u5929\u9762\u677F';
|
|
426
|
+
// \u4ECE localStorage \u6062\u590D\u4E0A\u6B21\u7684\u5C55\u5F00/\u6536\u8D77\u72B6\u6001\uFF0C\u9ED8\u8BA4\u6536\u8D77
|
|
427
|
+
var chatVisible = localStorage.getItem('opencode-review-chat-visible');
|
|
428
|
+
if (chatVisible === 'true') {
|
|
429
|
+
document.documentElement.classList.remove('hide-chat');
|
|
430
|
+
btn.classList.add('active');
|
|
431
|
+
btn.title = '\u9690\u85CF\u804A\u5929\u9762\u677F';
|
|
432
|
+
} else {
|
|
433
|
+
document.documentElement.classList.add('hide-chat');
|
|
434
|
+
}
|
|
417
435
|
btn.onclick = function() {
|
|
418
436
|
document.documentElement.classList.toggle('hide-chat');
|
|
419
437
|
btn.classList.toggle('active');
|
|
420
|
-
|
|
438
|
+
var isVisible = btn.classList.contains('active');
|
|
439
|
+
btn.title = isVisible ? '\u9690\u85CF\u804A\u5929\u9762\u677F' : '\u5C55\u5F00\u804A\u5929\u9762\u677F';
|
|
440
|
+
localStorage.setItem('opencode-review-chat-visible', isVisible ? 'true' : 'false');
|
|
421
441
|
};
|
|
422
442
|
document.body.appendChild(btn);
|
|
423
443
|
}
|
|
@@ -443,7 +463,7 @@ function generateBridgeScript(options) {
|
|
|
443
463
|
var attempts = 0;
|
|
444
464
|
function tryApply() {
|
|
445
465
|
if (ensureReviewPanelRefs()) {
|
|
446
|
-
document.documentElement.classList.add('opencode-review-panel-overlay'
|
|
466
|
+
document.documentElement.classList.add('opencode-review-panel-overlay');
|
|
447
467
|
injectChatToggleBtn();
|
|
448
468
|
return;
|
|
449
469
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-opencode-assistant",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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/
|
|
42
|
-
"@vite-plugin-opencode-assistant/
|
|
40
|
+
"@vite-plugin-opencode-assistant/opencode": "1.1.0",
|
|
41
|
+
"@vite-plugin-opencode-assistant/shared": "1.1.0",
|
|
42
|
+
"@vite-plugin-opencode-assistant/components": "1.1.0"
|
|
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.1.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "pagoda-cli build && vite build -c vite.client.config.ts",
|