@iinm/plain-agent 1.5.0 → 1.5.1
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/src/cliInteractive.mjs +1 -12
package/package.json
CHANGED
package/src/cliInteractive.mjs
CHANGED
|
@@ -216,12 +216,11 @@ export function startInteractiveSession({
|
|
|
216
216
|
onStop,
|
|
217
217
|
claudeCodePlugins,
|
|
218
218
|
}) {
|
|
219
|
-
/** @type {{ turn: boolean, multiLineBuffer: string[] | null, subagentName: string
|
|
219
|
+
/** @type {{ turn: boolean, multiLineBuffer: string[] | null, subagentName: string }} */
|
|
220
220
|
const state = {
|
|
221
221
|
turn: true,
|
|
222
222
|
multiLineBuffer: null,
|
|
223
223
|
subagentName: "",
|
|
224
|
-
skipNextUserMessage: false,
|
|
225
224
|
};
|
|
226
225
|
|
|
227
226
|
/**
|
|
@@ -239,7 +238,6 @@ export function startInteractiveSession({
|
|
|
239
238
|
console.log(message);
|
|
240
239
|
console.log(styleText("gray", "</agent>"));
|
|
241
240
|
|
|
242
|
-
state.skipNextUserMessage = true;
|
|
243
241
|
userEventEmitter.emit("userInput", [{ type: "text", text: message }]);
|
|
244
242
|
}
|
|
245
243
|
|
|
@@ -269,7 +267,6 @@ export function startInteractiveSession({
|
|
|
269
267
|
console.log(message);
|
|
270
268
|
console.log(styleText("gray", "</prompt>"));
|
|
271
269
|
|
|
272
|
-
state.skipNextUserMessage = true;
|
|
273
270
|
userEventEmitter.emit("userInput", [{ type: "text", text: message }]);
|
|
274
271
|
}
|
|
275
272
|
|
|
@@ -436,7 +433,6 @@ export function startInteractiveSession({
|
|
|
436
433
|
|
|
437
434
|
const messageWithContext = await loadUserMessageContext(fileContent);
|
|
438
435
|
|
|
439
|
-
state.skipNextUserMessage = true;
|
|
440
436
|
userEventEmitter.emit("userInput", messageWithContext);
|
|
441
437
|
return;
|
|
442
438
|
}
|
|
@@ -570,7 +566,6 @@ export function startInteractiveSession({
|
|
|
570
566
|
console.log(styleText("gray", "</paste>"));
|
|
571
567
|
|
|
572
568
|
const messageWithContext = await loadUserMessageContext(combinedInput);
|
|
573
|
-
state.skipNextUserMessage = true;
|
|
574
569
|
userEventEmitter.emit("userInput", messageWithContext);
|
|
575
570
|
return;
|
|
576
571
|
}
|
|
@@ -591,7 +586,6 @@ export function startInteractiveSession({
|
|
|
591
586
|
}
|
|
592
587
|
|
|
593
588
|
const messageWithContext = await loadUserMessageContext(inputTrimmed);
|
|
594
|
-
state.skipNextUserMessage = true;
|
|
595
589
|
userEventEmitter.emit("userInput", messageWithContext);
|
|
596
590
|
}
|
|
597
591
|
|
|
@@ -654,11 +648,6 @@ export function startInteractiveSession({
|
|
|
654
648
|
});
|
|
655
649
|
|
|
656
650
|
agentEventEmitter.on("message", (message) => {
|
|
657
|
-
// Skip user input message (echoing back what the user just sent)
|
|
658
|
-
if (state.skipNextUserMessage) {
|
|
659
|
-
state.skipNextUserMessage = false;
|
|
660
|
-
return;
|
|
661
|
-
}
|
|
662
651
|
printMessage(message);
|
|
663
652
|
});
|
|
664
653
|
|