bobbai00 commented on code in PR #9432:
URL: https://github.com/apache/texera/pull/9432#discussion_r4663588841
##########
frontend/src/app/workspace/component/agent/agent-panel/react-step-detail-modal/react-step-detail-modal.component.spec.ts:
##########
@@ -225,38 +227,24 @@ describe("ReActStepDetailModalComponent", () => {
describe("getToolResultFullItems / getToolResultItems", () => {
function toolMessage(): any {
return {
+ role: "tool",
content: [
- { type: "tool-result", toolCallId: "tc1", result: "short result" },
- { type: "tool-result", toolCallId: "tc2", output: { rows: 3 } },
- { type: "tool-result", toolCallId: "tc3", content: "after context
compaction" },
+ { type: "tool-result", toolCallId: "tc1", toolName: "addOperator",
output: "short result" },
Review Comment:
The unwrap is covered now. What remains are the casts this comment tied to
the raw outputs: `] as any,` on [line
61](https://github.com/apache/texera/blob/4828fc6a6a11cf2d09949626cd5e786ee616a89d/frontend/src/app/workspace/component/agent/agent-panel/react-step-detail-modal/react-step-detail-modal.component.spec.ts#L61)
(`maximalStep().inputMessages`) and `function toolMessage(): any {` on [line
233](https://github.com/apache/texera/blob/4828fc6a6a11cf2d09949626cd5e786ee616a89d/frontend/src/app/workspace/component/agent/agent-panel/react-step-detail-modal/react-step-detail-modal.component.spec.ts#L233).
Both fixtures are valid `ModelMessage`s now and type-check without the cast or
the `any` (tsc 5.9.3 and ai 5.0.93 against this branch's `agent-types.ts`), so
dropping them keeps these shared fixtures checked against the SDK shape.
--
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]