@tangle-network/create-agent-app 0.46.46 → 0.46.47
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/template-chat/src/sandbox.ts +10 -7
package/package.json
CHANGED
|
@@ -123,13 +123,15 @@ export function createSandboxProduce(env: AppEnv) {
|
|
|
123
123
|
// that actually served, and the transcript gets a visible notice.
|
|
124
124
|
// Opt out with `modelFailover: false` (or empty `fallbacks`).
|
|
125
125
|
fallbackModels: config.model.fallbacks,
|
|
126
|
-
openEvents: ({ model: attemptModel, attempt, signal }) =>
|
|
127
|
-
|
|
126
|
+
openEvents: ({ model: attemptModel, attempt, signal }) => {
|
|
127
|
+
// A failover attempt is a NEW dispatch, not a reconnect to the dead
|
|
128
|
+
// one — it needs its own execution identity or the platform would
|
|
129
|
+
// resume the failed execution instead of starting a fresh run.
|
|
130
|
+
const attemptExecutionId = attempt === 1 ? executionId : `${executionId}-f${attempt}`
|
|
131
|
+
return streamSandboxPrompt(shell, box, normalizeChatPromptForSandbox(prompt), {
|
|
128
132
|
sessionId: identity.sessionId,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
// resume the failed execution instead of starting a fresh run.
|
|
132
|
-
executionId: attempt === 1 ? executionId : `${executionId}-f${attempt}`,
|
|
133
|
+
executionId: attemptExecutionId,
|
|
134
|
+
turnId: attemptExecutionId,
|
|
133
135
|
model: attemptModel,
|
|
134
136
|
signal,
|
|
135
137
|
// A zero reasoning allowance maps to the profile's supported
|
|
@@ -159,7 +161,8 @@ export function createSandboxProduce(env: AppEnv) {
|
|
|
159
161
|
// closes (e.g. a throwaway preview).
|
|
160
162
|
detach: true,
|
|
161
163
|
interactions: config.interactions,
|
|
162
|
-
})
|
|
164
|
+
})
|
|
165
|
+
},
|
|
163
166
|
})
|
|
164
167
|
}
|
|
165
168
|
}
|