pentesting 0.8.37 → 0.8.39
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/index.js +23 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7122,6 +7122,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
7122
7122
|
const wireLoggerRef = useRef(null);
|
|
7123
7123
|
const keyboardListenerRef = useRef(getKeyboardListener());
|
|
7124
7124
|
const isProcessingRef = useRef(false);
|
|
7125
|
+
const handleSubmitRef = useRef(null);
|
|
7125
7126
|
useEffect(() => {
|
|
7126
7127
|
isProcessingRef.current = isProcessing;
|
|
7127
7128
|
}, [isProcessing]);
|
|
@@ -7360,15 +7361,10 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
7360
7361
|
const next = inputQueue.dequeue();
|
|
7361
7362
|
if (next) {
|
|
7362
7363
|
setQueuedCount(inputQueue.length);
|
|
7363
|
-
addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
try {
|
|
7368
|
-
await agent.chat(next.content);
|
|
7369
|
-
} catch (err) {
|
|
7370
|
-
addMessage(MESSAGE_TYPE.ERROR, err instanceof Error ? err.message : String(err));
|
|
7371
|
-
setIsProcessing(false);
|
|
7364
|
+
addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
|
|
7365
|
+
setTimeout(() => {
|
|
7366
|
+
if (handleSubmitRef.current) {
|
|
7367
|
+
handleSubmitRef.current(next.content);
|
|
7372
7368
|
}
|
|
7373
7369
|
}, 100);
|
|
7374
7370
|
}
|
|
@@ -7378,6 +7374,19 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
7378
7374
|
stopTimer();
|
|
7379
7375
|
addMessage(MESSAGE_TYPE.ERROR, error.message);
|
|
7380
7376
|
setIsProcessing(false);
|
|
7377
|
+
const inputQueue = getInputQueue();
|
|
7378
|
+
if (inputQueue.hasPending()) {
|
|
7379
|
+
const next = inputQueue.dequeue();
|
|
7380
|
+
if (next) {
|
|
7381
|
+
setQueuedCount(inputQueue.length);
|
|
7382
|
+
addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
|
|
7383
|
+
setTimeout(() => {
|
|
7384
|
+
if (handleSubmitRef.current) {
|
|
7385
|
+
handleSubmitRef.current(next.content);
|
|
7386
|
+
}
|
|
7387
|
+
}, 100);
|
|
7388
|
+
}
|
|
7389
|
+
}
|
|
7381
7390
|
});
|
|
7382
7391
|
approvalManager2.on(APPROVAL_EVENT.REQUEST, (req) => {
|
|
7383
7392
|
setPendingApproval({
|
|
@@ -7428,12 +7437,12 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
7428
7437
|
exit();
|
|
7429
7438
|
return;
|
|
7430
7439
|
}
|
|
7431
|
-
if (isProcessing
|
|
7440
|
+
if (isProcessing) {
|
|
7432
7441
|
const inputQueue = getInputQueue();
|
|
7433
7442
|
inputQueue.enqueue(trimmed);
|
|
7434
7443
|
setQueuedCount(inputQueue.length);
|
|
7435
7444
|
setInput("");
|
|
7436
|
-
addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending): ${trimmed.slice(0, 50)}
|
|
7445
|
+
addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending): ${trimmed.slice(0, 50)}${trimmed.length > 50 ? "..." : ""}`);
|
|
7437
7446
|
return;
|
|
7438
7447
|
}
|
|
7439
7448
|
setInput("");
|
|
@@ -7973,6 +7982,9 @@ ${list}`);
|
|
|
7973
7982
|
setIsProcessing(false);
|
|
7974
7983
|
setCurrentStatus("");
|
|
7975
7984
|
}, [agent, isProcessing, pendingApproval, addMessage, exit, startTimer, stopTimer, sessionManager2, approvalManager2, mode]);
|
|
7985
|
+
useEffect(() => {
|
|
7986
|
+
handleSubmitRef.current = handleSubmit;
|
|
7987
|
+
}, [handleSubmit]);
|
|
7976
7988
|
const approvalOptions = [
|
|
7977
7989
|
{ label: "\u2713 Approve once", decision: "approve" },
|
|
7978
7990
|
{ label: "\u2713 Approve always (this session)", decision: "approve_always" },
|