aglinxinyuan commented on code in PR #9252:
URL: https://github.com/apache/texera/pull/9252#discussion_r4464297940
##########
agent-service/src/agent/tools/workflow-execution-tools.ts:
##########
@@ -559,7 +486,7 @@ export async function executeOperatorAndFormat(
dataString = [headerLine, ...keptRows].join("\n");
}
- const shapeLine = formatInputOutput(workflowState, operatorId, opInfo,
columns);
+ const shapeLine = formatInputOutputMetadata(workflowState, operatorId,
opInfo, columns);
Review Comment:
Thanks, good catch on the chart HTML. Done in 95b8fbe827:
- The truncation now lives in `result-formatting.ts` as a private
`truncateTable`. `formatOperatorResult` takes an optional `charLimit` and
applies it.
- `executeOperatorAndFormat` now ends with `return
formatOperatorResult(operatorId, opInfo, workflowState, charLimit)` after the
`onResult` loop. The duplicated column count, shape line, warnings, summary and
join are gone.
- Because of this, `executeOperator` now replaces `html-content` /
`json-content` with the placeholder, so the model no longer gets a chart's full
HTML.
- Added tests in `result-formatting.spec.ts`: no limit keeps every row; a
limit keeps head and tail rows and drops the middle; a limit larger than the
table changes nothing; a tiny limit still keeps one row; chart content is
skipped even when a limit is set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]