@yeaft/webchat-agent 1.0.369 → 1.0.370
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.
|
Binary file
|
package/package.json
CHANGED
package/yeaft/llm/adapter.js
CHANGED
|
@@ -456,9 +456,9 @@ export function classifyFetchError(err, opts = {}) {
|
|
|
456
456
|
* NOTE: there is intentionally NO body / response truncation here. The whole
|
|
457
457
|
* point of the "copy request" debug feature is to capture EXACTLY what we
|
|
458
458
|
* sent to the LLM. A truncated copy is worse than useless — it lies about
|
|
459
|
-
* what the model saw.
|
|
460
|
-
*
|
|
461
|
-
*
|
|
459
|
+
* what the model saw. Full payloads therefore stay in the Agent's bounded,
|
|
460
|
+
* file-backed debug trace and are fetched for one Turn on demand; live browser
|
|
461
|
+
* events carry summary metadata only.
|
|
462
462
|
*
|
|
463
463
|
* @param {{ url: string, method: string, headers: object, body: any }} req
|
|
464
464
|
* @returns {{ url: string, method: string, headers: object, body: any }}
|
package/yeaft/web-bridge.js
CHANGED
|
@@ -4241,6 +4241,10 @@ function handleEngineEvent(event, hctx) {
|
|
|
4241
4241
|
break;
|
|
4242
4242
|
|
|
4243
4243
|
case 'tool_exec':
|
|
4244
|
+
// Full tool output is already durable in the file-backed debug trace and
|
|
4245
|
+
// is fetched on demand when the user opens this Turn. Do not mirror it
|
|
4246
|
+
// into the always-on browser store: a long-lived tab otherwise retains
|
|
4247
|
+
// every large Bash/FileRead result even while the debug panel is closed.
|
|
4244
4248
|
sendSessionEvent({
|
|
4245
4249
|
type: 'tool_exec',
|
|
4246
4250
|
turnId: event.turnId,
|
|
@@ -4249,7 +4253,6 @@ function handleEngineEvent(event, hctx) {
|
|
|
4249
4253
|
name: event.name,
|
|
4250
4254
|
durationMs: event.durationMs,
|
|
4251
4255
|
isError: event.isError,
|
|
4252
|
-
toolOutput: event.toolOutput,
|
|
4253
4256
|
}, envelope);
|
|
4254
4257
|
break;
|
|
4255
4258
|
|
|
@@ -4299,26 +4302,21 @@ function handleEngineEvent(event, hctx) {
|
|
|
4299
4302
|
break;
|
|
4300
4303
|
|
|
4301
4304
|
case 'loop':
|
|
4302
|
-
//
|
|
4303
|
-
//
|
|
4304
|
-
//
|
|
4305
|
-
//
|
|
4305
|
+
// Live clients only need bounded summary metadata. The complete request,
|
|
4306
|
+
// response, prompt, messages, and tool calls are already persisted by
|
|
4307
|
+
// DebugTrace and fetched for one Turn on demand. Forwarding those growing
|
|
4308
|
+
// snapshots on every loop made a long-lived browser tab retain hundreds
|
|
4309
|
+
// of MiB (or GiB) while the debug panel was closed.
|
|
4306
4310
|
sendSessionEvent({
|
|
4307
4311
|
type: 'loop',
|
|
4308
4312
|
turnId: event.turnId,
|
|
4309
4313
|
loopNumber: event.loopNumber,
|
|
4310
4314
|
model: event.model,
|
|
4311
|
-
systemPrompt: event.systemPrompt,
|
|
4312
|
-
messages: event.messages,
|
|
4313
|
-
response: event.response,
|
|
4314
|
-
toolCalls: event.toolCalls,
|
|
4315
4315
|
usage: event.usage,
|
|
4316
4316
|
latencyMs: event.latencyMs,
|
|
4317
4317
|
ttfbMs: event.ttfbMs,
|
|
4318
4318
|
stopReason: event.stopReason,
|
|
4319
4319
|
at: event.at,
|
|
4320
|
-
rawRequest: event.rawRequest,
|
|
4321
|
-
rawResponse: event.rawResponse,
|
|
4322
4320
|
}, envelope);
|
|
4323
4321
|
break;
|
|
4324
4322
|
|