-
Notifications
You must be signed in to change notification settings - Fork 9
Summarize completedTx in tool calll response
#1985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Summarize completedTx in tool calll response
#1985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 5 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 5 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="packages/runner/src/storage/transaction-summary.ts">
<violation number="1" location="packages/runner/src/storage/transaction-summary.ts:131">
When a space is provided but no write details are available (writes occurred elsewhere or produced no novelty), this branch ladder returns an empty string and hides the summary from summarizeTransaction. Fall back to summary.summary so the caller still gets a description.</violation>
</file>
<file name="packages/runner/src/builtins/llm-dialog.ts">
<violation number="1" location="packages/runner/src/builtins/llm-dialog.ts:823">
Handler tool results are now double-wrapped, so LLM/tool consumers receive `{ value: { value, summary } }` instead of the handler output.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| const summary = formatTransactionSummary(completedTx, space); | ||
| const value = result.withTx(completedTx).get(); | ||
|
|
||
| resolve({ value, summary }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handler tool results are now double-wrapped, so LLM/tool consumers receive { value: { value, summary } } instead of the handler output.
Prompt for AI agents
Address the following comment on packages/runner/src/builtins/llm-dialog.ts at line 823:
<comment>Handler tool results are now double-wrapped, so LLM/tool consumers receive `{ value: { value, summary } }` instead of the handler output.</comment>
<file context>
@@ -811,8 +815,13 @@ async function invokeToolCall(
+ const summary = formatTransactionSummary(completedTx, space);
+ const value = result.withTx(completedTx).get();
+
+ resolve({ value, summary });
+ });
} else {
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
* WIP tx-analysis * Add real implementation * Remove test data and scripts * Refine tx summary * Remove long pointless README * Remove accidental `mise.toml` * Remove JournalMock from tests * Remove unused analysis * Format and lint * PR feedback
Summary by cubic
Return a concise transaction summary alongside tool call results to help LLMs debug without large payloads. The result now includes { value, summary } built from the completed transaction.
New Features
Migration