Skip to content

Commit 1179c99

Browse files
committed
feat(docql): pass tool result metadata to renderer
Update DocumentAgentExecutor to provide tool result metadata to the renderer, enabling richer output handling.
1 parent 18db146 commit 1179c99

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/executor/DocumentAgentExecutor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class DocumentAgentExecutor(
270270
// Update the results list with the modified execution result
271271
results[results.lastIndex] = Triple(toolName, params, finalExecutionResult)
272272

273-
renderer.renderToolResult(toolName, finalExecutionResult.isSuccess, finalExecutionResult.content, displayOutput)
273+
renderer.renderToolResult(toolName, finalExecutionResult.isSuccess, finalExecutionResult.content, displayOutput, finalExecutionResult.metadata)
274274
} catch (e: Exception) {
275275
logger.error(e) { "Tool execution failed: ${toolName}" }
276276
renderer.renderError("Tool execution failed: ${e.message}")

mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/tool/impl/DocQLTool.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ class DocQLInvocation(
377377
smartSummary = smartSummary
378378
)
379379

380-
// Return smart summary as main content (concise for LLM)
381380
return ToolResult.Success(smartSummary, stats.toMetadata())
382381
}
383382

0 commit comments

Comments
 (0)