test(coding-agent): implemented guest reconciliation and expanded testing for collaboration
- Introduced guest snapshot reconciliation to maintain host state consistency during session switching. - Improved yield tool reliability by implementing incremental schema validation and strict parameter enforcement. - Fixed a calculation edge case in the status line to prevent negative time values during activity tracking. - Expanded the test suite with new validation for session interruption, collab state synchronization, and process error handling.
This commit is contained in:
@@ -1112,6 +1112,7 @@ function createSubagentRunMonitor(args: RunMonitorArgs): SubagentRunMonitor {
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
totalTokens: 0,
|
||||
reasoningTokens: 0,
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
||||
};
|
||||
let hasUsage = false;
|
||||
@@ -1502,6 +1503,8 @@ function createSubagentRunMonitor(args: RunMonitorArgs): SubagentRunMonitor {
|
||||
accumulatedUsage.cacheRead += getNumberField(usageRecord, "cacheRead") ?? 0;
|
||||
accumulatedUsage.cacheWrite += getNumberField(usageRecord, "cacheWrite") ?? 0;
|
||||
accumulatedUsage.totalTokens += getNumberField(usageRecord, "totalTokens") ?? 0;
|
||||
accumulatedUsage.reasoningTokens =
|
||||
(accumulatedUsage.reasoningTokens ?? 0) + (getNumberField(usageRecord, "reasoningTokens") ?? 0);
|
||||
if (costRecord) {
|
||||
accumulatedUsage.cost.input += getNumberField(costRecord, "input") ?? 0;
|
||||
accumulatedUsage.cost.output += getNumberField(costRecord, "output") ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user