claude-remote-cli 2.15.6 → 2.15.8
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/dist/frontend/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
12
12
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
13
13
|
<meta name="theme-color" content="#1a1a1a" />
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DxxxVdX9.js"></script>
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-t15zfL9Q.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
@@ -30,16 +30,24 @@ function handleInsert(intent, currentValue) {
|
|
|
30
30
|
return { payload };
|
|
31
31
|
}
|
|
32
32
|
if (data) {
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
33
|
+
// Gboard cursor-0 bug: keyboard loses cursor position and prepends the
|
|
34
|
+
// replacement word at position 0 instead of replacing the last word in place.
|
|
35
|
+
// Detect by: multi-char data, cursor was at 0, and new value = data + old value.
|
|
36
|
+
const isCursor0Prepend = data.length > 1 &&
|
|
37
|
+
intent.cursorBefore === 0 &&
|
|
36
38
|
intent.valueBefore.length > 0 &&
|
|
37
|
-
currentValue === data + intent.valueBefore
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
currentValue === data + intent.valueBefore;
|
|
40
|
+
if (isCursor0Prepend) {
|
|
41
|
+
const lastSpaceIdx = intent.valueBefore.lastIndexOf(' ');
|
|
42
|
+
const lastWord = lastSpaceIdx >= 0 ? intent.valueBefore.slice(lastSpaceIdx + 1) : intent.valueBefore;
|
|
43
|
+
// Buffer ends with a space — nothing to autocorrect
|
|
44
|
+
if (lastWord.length === 0) {
|
|
45
|
+
return { payload: '', newInputValue: intent.valueBefore };
|
|
46
|
+
}
|
|
47
|
+
const prefix = lastSpaceIdx >= 0 ? intent.valueBefore.slice(0, lastSpaceIdx + 1) : '';
|
|
48
|
+
const payload = makeBackspaces(codepointCount(lastWord)) + data;
|
|
49
|
+
return { payload, newInputValue: prefix + data };
|
|
41
50
|
}
|
|
42
|
-
// Collapsed range = normal character insertion
|
|
43
51
|
return { payload: data };
|
|
44
52
|
}
|
|
45
53
|
// No data and no range — fall back to diff
|
|
@@ -87,7 +87,7 @@ describe('mobile-input-pipeline: processIntent', () => {
|
|
|
87
87
|
}, 'the');
|
|
88
88
|
assert.strictEqual(result.payload, '\x7f\x7f\x7fthe');
|
|
89
89
|
});
|
|
90
|
-
it('cursor-0 recovery
|
|
90
|
+
it('cursor-0 recovery: single word buffer', () => {
|
|
91
91
|
const result = processIntent({
|
|
92
92
|
type: 'insertText', data: 'the',
|
|
93
93
|
rangeStart: null, rangeEnd: null,
|
|
@@ -96,6 +96,24 @@ describe('mobile-input-pipeline: processIntent', () => {
|
|
|
96
96
|
assert.strictEqual(result.payload, '\x7f\x7f\x7fthe');
|
|
97
97
|
assert.strictEqual(result.newInputValue, 'the');
|
|
98
98
|
});
|
|
99
|
+
it('cursor-0 recovery: multi-word buffer only deletes last word', () => {
|
|
100
|
+
const result = processIntent({
|
|
101
|
+
type: 'insertText', data: 'mobile ',
|
|
102
|
+
rangeStart: null, rangeEnd: null,
|
|
103
|
+
valueBefore: 'and mkbijf', cursorBefore: 0,
|
|
104
|
+
}, 'mobile and mkbijf');
|
|
105
|
+
assert.strictEqual(result.payload, '\x7f\x7f\x7f\x7f\x7f\x7fmobile ');
|
|
106
|
+
assert.strictEqual(result.newInputValue, 'and mobile ');
|
|
107
|
+
});
|
|
108
|
+
it('cursor-0 recovery: trailing space means nothing to autocorrect', () => {
|
|
109
|
+
const result = processIntent({
|
|
110
|
+
type: 'insertText', data: 'the ',
|
|
111
|
+
rangeStart: null, rangeEnd: null,
|
|
112
|
+
valueBefore: 'hello ', cursorBefore: 0,
|
|
113
|
+
}, 'the hello ');
|
|
114
|
+
assert.strictEqual(result.payload, '');
|
|
115
|
+
assert.strictEqual(result.newInputValue, 'hello ');
|
|
116
|
+
});
|
|
99
117
|
it('deleteContentBackward with range', () => {
|
|
100
118
|
const result = processIntent({
|
|
101
119
|
type: 'deleteContentBackward', data: null,
|