neoagent 2.1.17-beta.4 → 2.1.17-beta.5
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
CHANGED
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"052f31d115eceda8cbff1b3481fcde4330c4ae
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "4009642871" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -892,8 +892,12 @@ class AgentEngine {
|
|
|
892
892
|
return { runId, content: '', totalTokens, iterations: iteration, status: 'stopped' };
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
+
const runMeta = this.activeRuns.get(runId);
|
|
896
|
+
const messagingSent = runMeta?.messagingSent || false;
|
|
897
|
+
const lastToolWasMessaging = runMeta?.lastToolName === 'send_message' || runMeta?.lastToolName === 'make_call';
|
|
898
|
+
|
|
895
899
|
if ((iteration >= maxIterations && messages[messages.length - 1]?.role === 'tool')
|
|
896
|
-
|| (iteration < maxIterations && stepIndex > 0 && !lastContent.trim() && messages[messages.length - 1]?.role !== 'tool')) {
|
|
900
|
+
|| (iteration < maxIterations && stepIndex > 0 && !lastContent.trim() && messages[messages.length - 1]?.role !== 'tool' && !lastToolWasMessaging)) {
|
|
897
901
|
const finalResponse = await provider.chat(sanitizeConversationMessages([
|
|
898
902
|
...messages,
|
|
899
903
|
{
|
|
@@ -918,8 +922,7 @@ class AgentEngine {
|
|
|
918
922
|
totalTokens += finalResponse.usage?.totalTokens || 0;
|
|
919
923
|
}
|
|
920
924
|
|
|
921
|
-
|
|
922
|
-
const messagingSent = runMeta?.messagingSent || false;
|
|
925
|
+
// runMeta and messagingSent are now defined above the forced reply block.
|
|
923
926
|
|
|
924
927
|
if (triggerSource === 'messaging' && !normalizeOutgoingMessage(lastContent) && !messagingSent) {
|
|
925
928
|
const recovered = await this.recoverBlankMessagingReply({
|