@iaforged/context-code 1.0.86 → 1.0.89
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.
|
@@ -176,7 +176,7 @@ export function usePasteHandler({ onPaste, onInput, onImagePaste, }) {
|
|
|
176
176
|
const isAlreadyPaste = pastePendingRef.current ||
|
|
177
177
|
hasImageFilePath ||
|
|
178
178
|
isFromPaste ||
|
|
179
|
-
input.length >
|
|
179
|
+
input.length > 15;
|
|
180
180
|
if (onPaste && isAlreadyPaste) {
|
|
181
181
|
pastePendingRef.current = true;
|
|
182
182
|
// If we had buffered typing that was actually part of this paste, move it!
|
|
@@ -197,16 +197,16 @@ export function usePasteHandler({ onPaste, onInput, onImagePaste, }) {
|
|
|
197
197
|
});
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
|
-
// It might be the start of a paste! (length <=
|
|
200
|
+
// It might be the start of a paste! (length <= 15)
|
|
201
201
|
// Check if it's pure text (not a control key)
|
|
202
202
|
const isControl = key.ctrl || key.meta || key.option || key.super || key.fn ||
|
|
203
|
-
(key.name !== undefined && key.name.length > 1 &&
|
|
203
|
+
(key.name !== undefined && key.name.length > 1 && !['space', 'number', 'return', 'enter', 'tab'].includes(key.name));
|
|
204
204
|
if (onPaste && input.length > 0 && !isControl) {
|
|
205
205
|
typingQueueRef.current.push({ input, key });
|
|
206
206
|
// Calculate total length of queued typing
|
|
207
207
|
const totalLength = typingQueueRef.current.reduce((acc, q) => acc + q.input.length, 0);
|
|
208
|
-
if (totalLength >
|
|
209
|
-
// Oh! It accumulated to >
|
|
208
|
+
if (totalLength > 10) {
|
|
209
|
+
// Oh! It accumulated to > 10 within the tiny window! It IS a paste!
|
|
210
210
|
pastePendingRef.current = true;
|
|
211
211
|
const queuedText = typingQueueRef.current.map(q => q.input).join('');
|
|
212
212
|
typingQueueRef.current = [];
|
|
@@ -226,7 +226,7 @@ export function usePasteHandler({ onPaste, onInput, onImagePaste, }) {
|
|
|
226
226
|
if (!typingTimeoutRef.current) {
|
|
227
227
|
typingTimeoutRef.current = setTimeout(() => {
|
|
228
228
|
flushTypingQueue(onInput);
|
|
229
|
-
},
|
|
229
|
+
}, 40); // 40ms window to accumulate 10 chars
|
|
230
230
|
}
|
|
231
231
|
return;
|
|
232
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iaforged/context-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.89",
|
|
4
4
|
"description": "Context Code es un asistente de desarrollo para la terminal. Puede revisar tu proyecto, editar archivos, ejecutar comandos y apoyarte en tareas reales de programacion.",
|
|
5
5
|
"author": "Context AI",
|
|
6
6
|
"license": "MIT",
|