claude-remote-cli 1.9.4 → 1.9.5
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/package.json +1 -1
- package/public/app.js +25 -9
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -1286,16 +1286,32 @@
|
|
|
1286
1286
|
(function () {
|
|
1287
1287
|
if (!isMobileDevice) return;
|
|
1288
1288
|
|
|
1289
|
-
// ── Debug Panel (
|
|
1289
|
+
// ── Debug Panel (hidden by default, toggle with button) ──
|
|
1290
1290
|
var debugPanel = document.createElement('div');
|
|
1291
1291
|
debugPanel.id = 'debug-panel';
|
|
1292
|
-
debugPanel.style.cssText = 'position:fixed;top:0;left:0;right:0;height:30vh;overflow-y:auto;background:rgba(0,0,0,0.92);color:#0f0;font:11px/1.4 monospace;padding:6px;z-index:9999;
|
|
1292
|
+
debugPanel.style.cssText = 'position:fixed;top:0;left:0;right:0;height:30vh;overflow-y:auto;background:rgba(0,0,0,0.92);color:#0f0;font:11px/1.4 monospace;padding:6px 6px 6px 40px;z-index:9999;display:none;';
|
|
1293
1293
|
document.body.appendChild(debugPanel);
|
|
1294
|
+
|
|
1295
|
+
var debugToggle = document.createElement('button');
|
|
1296
|
+
debugToggle.id = 'debug-toggle';
|
|
1297
|
+
debugToggle.textContent = 'dbg';
|
|
1298
|
+
debugToggle.style.cssText = 'position:fixed;bottom:60px;right:8px;z-index:10000;background:#333;color:#0f0;border:1px solid #0f0;border-radius:6px;font:12px monospace;padding:6px 10px;opacity:0.5;min-width:44px;min-height:44px;';
|
|
1299
|
+
document.body.appendChild(debugToggle);
|
|
1300
|
+
|
|
1301
|
+
var debugVisible = false;
|
|
1302
|
+
debugToggle.addEventListener('click', function (e) {
|
|
1303
|
+
e.preventDefault();
|
|
1304
|
+
e.stopPropagation();
|
|
1305
|
+
debugVisible = !debugVisible;
|
|
1306
|
+
debugPanel.style.display = debugVisible ? 'block' : 'none';
|
|
1307
|
+
debugToggle.style.opacity = debugVisible ? '1' : '0.6';
|
|
1308
|
+
});
|
|
1309
|
+
|
|
1294
1310
|
var debugLines = [];
|
|
1295
1311
|
function dbg(msg) {
|
|
1296
1312
|
var t = performance.now().toFixed(1);
|
|
1297
1313
|
debugLines.push('[' + t + '] ' + msg);
|
|
1298
|
-
if (debugLines.length >
|
|
1314
|
+
if (debugLines.length > 200) debugLines.shift();
|
|
1299
1315
|
debugPanel.innerHTML = debugLines.join('<br>');
|
|
1300
1316
|
debugPanel.scrollTop = debugPanel.scrollHeight;
|
|
1301
1317
|
}
|
|
@@ -1347,7 +1363,7 @@
|
|
|
1347
1363
|
// Handles autocorrect expansions, deletions, and same-length replacements.
|
|
1348
1364
|
function sendInputDiff(currentValue) {
|
|
1349
1365
|
if (currentValue === lastInputValue) {
|
|
1350
|
-
dbg('
|
|
1366
|
+
dbg('sendInputDiff: NO-OP (same)');
|
|
1351
1367
|
return;
|
|
1352
1368
|
}
|
|
1353
1369
|
|
|
@@ -1356,7 +1372,7 @@
|
|
|
1356
1372
|
var charsToDelete = codepointCount(deletedSlice);
|
|
1357
1373
|
var newChars = currentValue.slice(commonLen);
|
|
1358
1374
|
|
|
1359
|
-
dbg('
|
|
1375
|
+
dbg('sendInputDiff: del=' + charsToDelete + ' "' + deletedSlice + '" add="' + newChars + '"');
|
|
1360
1376
|
|
|
1361
1377
|
for (var i = 0; i < charsToDelete; i++) {
|
|
1362
1378
|
ws.send('\x7f'); // backspace
|
|
@@ -1418,6 +1434,10 @@
|
|
|
1418
1434
|
|
|
1419
1435
|
// Handle text input with autocorrect
|
|
1420
1436
|
var clearTimer = null;
|
|
1437
|
+
mobileInput.addEventListener('beforeinput', function (e) {
|
|
1438
|
+
dbg('BEFORE_INPUT type="' + e.inputType + '" data="' + (e.data || '') + '" composing=' + isComposing);
|
|
1439
|
+
});
|
|
1440
|
+
|
|
1421
1441
|
mobileInput.addEventListener('input', function (e) {
|
|
1422
1442
|
dbg('INPUT type="' + e.inputType + '" composing=' + isComposing + ' val="' + mobileInput.value + '" last="' + lastInputValue + '"');
|
|
1423
1443
|
|
|
@@ -1441,10 +1461,6 @@
|
|
|
1441
1461
|
lastInputValue = currentValue;
|
|
1442
1462
|
});
|
|
1443
1463
|
|
|
1444
|
-
mobileInput.addEventListener('beforeinput', function (e) {
|
|
1445
|
-
dbg('BEFORE_INPUT type="' + e.inputType + '" data="' + (e.data || '') + '" composing=' + isComposing);
|
|
1446
|
-
});
|
|
1447
|
-
|
|
1448
1464
|
// Handle special keys (Enter, Backspace, Escape, arrows, Tab)
|
|
1449
1465
|
mobileInput.addEventListener('keydown', function (e) {
|
|
1450
1466
|
dbg('KEYDOWN key="' + e.key + '" shift=' + e.shiftKey + ' composing=' + isComposing + ' val="' + mobileInput.value + '"');
|