dhalsim 2.3.0 → 2.3.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/dist/index.cjs +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -15962,7 +15962,7 @@ function createGadgetsByName(names, config2) {
|
|
|
15962
15962
|
}
|
|
15963
15963
|
|
|
15964
15964
|
// src/subagents/dhalsim.ts
|
|
15965
|
-
import { Gadget as Gadget13, z as z14, getHostExports, resolveSubagentModel, resolveValue } from "llmist";
|
|
15965
|
+
import { Gadget as Gadget13, z as z14, getHostExports, resolveSubagentModel, resolveValue, TaskCompletionSignal } from "llmist";
|
|
15966
15966
|
|
|
15967
15967
|
// src/state/page-state.ts
|
|
15968
15968
|
var DEFAULT_CONFIG = {
|
|
@@ -16660,10 +16660,8 @@ var ReportResult = class extends Gadget13({
|
|
|
16660
16660
|
)
|
|
16661
16661
|
})
|
|
16662
16662
|
}) {
|
|
16663
|
-
result = null;
|
|
16664
16663
|
execute(params) {
|
|
16665
|
-
|
|
16666
|
-
return "Result reported successfully.";
|
|
16664
|
+
throw new TaskCompletionSignal(params.result);
|
|
16667
16665
|
}
|
|
16668
16666
|
};
|
|
16669
16667
|
var Dhalsim = class extends Gadget13({
|
|
@@ -16844,6 +16842,7 @@ Use this for web research, data extraction, form filling, or any web-based task.
|
|
|
16844
16842
|
Task: ${task}`);
|
|
16845
16843
|
logger13?.debug(`[BrowseWeb] Starting agent loop model=${model} maxIterations=${maxIterations}`);
|
|
16846
16844
|
let finalResult = "";
|
|
16845
|
+
let reportedResult;
|
|
16847
16846
|
for await (const event of agent.run()) {
|
|
16848
16847
|
if (ctx?.signal?.aborted) {
|
|
16849
16848
|
break;
|
|
@@ -16854,15 +16853,15 @@ Task: ${task}`);
|
|
|
16854
16853
|
collectedMedia.push(media);
|
|
16855
16854
|
}
|
|
16856
16855
|
}
|
|
16857
|
-
if (
|
|
16858
|
-
|
|
16856
|
+
if (event.result.gadgetName === "ReportResult" && event.result.breaksLoop) {
|
|
16857
|
+
reportedResult = event.result.result;
|
|
16859
16858
|
}
|
|
16860
16859
|
} else if (event.type === "text") {
|
|
16861
16860
|
finalResult = event.content;
|
|
16862
16861
|
}
|
|
16863
16862
|
}
|
|
16864
16863
|
return {
|
|
16865
|
-
result:
|
|
16864
|
+
result: reportedResult || finalResult || "Task completed but no result text was generated.",
|
|
16866
16865
|
media: collectedMedia.length > 0 ? collectedMedia : void 0
|
|
16867
16866
|
};
|
|
16868
16867
|
} finally {
|