pentesting 0.8.24 → 0.8.25
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 +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5080,6 +5080,7 @@ ${this.currentSpec.systemPrompt}`;
|
|
|
5080
5080
|
}
|
|
5081
5081
|
this.emit(AGENT_EVENT.LLM_START, { model: LLM_MODEL });
|
|
5082
5082
|
let response;
|
|
5083
|
+
let streamBuffer = "";
|
|
5083
5084
|
try {
|
|
5084
5085
|
const stream = this.client.messages.stream({
|
|
5085
5086
|
model: LLM_MODEL,
|
|
@@ -5089,8 +5090,15 @@ ${this.currentSpec.systemPrompt}`;
|
|
|
5089
5090
|
messages
|
|
5090
5091
|
});
|
|
5091
5092
|
stream.on("text", (text) => {
|
|
5092
|
-
|
|
5093
|
-
|
|
5093
|
+
streamBuffer += text;
|
|
5094
|
+
this.emit(AGENT_EVENT.THOUGHT, { type: "thinking", content: text });
|
|
5095
|
+
});
|
|
5096
|
+
stream.on("contentBlock", (block) => {
|
|
5097
|
+
if (block.type === "tool_use") {
|
|
5098
|
+
this.emit(AGENT_EVENT.THOUGHT, {
|
|
5099
|
+
type: "action",
|
|
5100
|
+
content: `Calling: ${block.name}`
|
|
5101
|
+
});
|
|
5094
5102
|
}
|
|
5095
5103
|
});
|
|
5096
5104
|
response = await stream.finalMessage();
|