@t2000/engine 0.5.3 → 0.5.4
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 +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1851,7 +1851,7 @@ var QueryEngine = class {
|
|
|
1851
1851
|
yield { type: "turn_complete", stopReason: "end_turn" };
|
|
1852
1852
|
return;
|
|
1853
1853
|
}
|
|
1854
|
-
yield* this.agentLoop(null, signal);
|
|
1854
|
+
yield* this.agentLoop(null, signal, false);
|
|
1855
1855
|
}
|
|
1856
1856
|
interrupt() {
|
|
1857
1857
|
this.abortController?.abort();
|
|
@@ -1881,7 +1881,7 @@ var QueryEngine = class {
|
|
|
1881
1881
|
*
|
|
1882
1882
|
* @param freshPrompt - The original user prompt (for corrupt-history retry). Null on resume.
|
|
1883
1883
|
*/
|
|
1884
|
-
async *agentLoop(freshPrompt, signal) {
|
|
1884
|
+
async *agentLoop(freshPrompt, signal, applyToolChoice = true) {
|
|
1885
1885
|
const context = {
|
|
1886
1886
|
agent: this.agent,
|
|
1887
1887
|
mcpManager: this.mcpManager,
|
|
@@ -1926,7 +1926,7 @@ ${summary.join("\n")}`);
|
|
|
1926
1926
|
model: this.model,
|
|
1927
1927
|
maxTokens: this.maxTokens,
|
|
1928
1928
|
temperature: this.temperature,
|
|
1929
|
-
toolChoice: turns === 1 ? this.toolChoice : void 0,
|
|
1929
|
+
toolChoice: applyToolChoice && turns === 1 ? this.toolChoice : void 0,
|
|
1930
1930
|
signal
|
|
1931
1931
|
});
|
|
1932
1932
|
for await (const event of stream) {
|