claude-opencode-viewer 2.6.14 → 2.6.15
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/index.html +12 -1
- package/package.json +1 -1
- package/server.js +1 -1
package/index.html
CHANGED
|
@@ -707,7 +707,7 @@
|
|
|
707
707
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
708
708
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
709
709
|
</svg>
|
|
710
|
-
<span
|
|
710
|
+
<span>复制</span>
|
|
711
711
|
</button>
|
|
712
712
|
</div>
|
|
713
713
|
<div id="mode-switcher">
|
|
@@ -804,6 +804,7 @@
|
|
|
804
804
|
<div class="virtual-key" data-key="tab">Tab</div>
|
|
805
805
|
<div class="virtual-key" data-key="esc">Esc</div>
|
|
806
806
|
<div class="virtual-key" data-key="ctrlc">Ctrl+C</div>
|
|
807
|
+
<div class="virtual-key" data-key="paste">Ctrl+V</div>
|
|
807
808
|
</div>
|
|
808
809
|
</div>
|
|
809
810
|
</div>
|
|
@@ -1430,6 +1431,16 @@
|
|
|
1430
1431
|
};
|
|
1431
1432
|
|
|
1432
1433
|
function sendKey(keyName) {
|
|
1434
|
+
if (keyName === 'paste') {
|
|
1435
|
+
if (navigator.clipboard && navigator.clipboard.readText) {
|
|
1436
|
+
navigator.clipboard.readText().then(function(text) {
|
|
1437
|
+
if (text && ws && ws.readyState === 1 && !isTransitioning) {
|
|
1438
|
+
ws.send(JSON.stringify({ type: 'input', data: text }));
|
|
1439
|
+
}
|
|
1440
|
+
}).catch(function() {});
|
|
1441
|
+
}
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1433
1444
|
var seq = KEY_MAP[keyName];
|
|
1434
1445
|
if (seq && ws && ws.readyState === 1 && !isTransitioning) {
|
|
1435
1446
|
ws.send(JSON.stringify({ type: 'input', data: seq }));
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -15,8 +15,8 @@ import Database from 'better-sqlite3';
|
|
|
15
15
|
process.title = 'claude-opencode-viewer';
|
|
16
16
|
|
|
17
17
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
-
let PORT = parseInt(process.argv[2]) || 7008;
|
|
19
18
|
const IS_PC = process.argv.includes('--pc');
|
|
19
|
+
let PORT = parseInt(process.argv[2]) || (IS_PC ? 19200 : 7008);
|
|
20
20
|
const USE_HTTPS = process.argv.includes('--https');
|
|
21
21
|
const JSON_OUTPUT = process.argv.includes('--json');
|
|
22
22
|
|