Skip to content

Commit cf1603b

Browse files
committed
🤖 fix: Remove unnecessary type assertion
ESLint flagged 'as unknown' as unnecessary since part.output is already typed as unknown. Simplified to use part.output directly.
1 parent 9f65d01 commit cf1603b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/utils/messages/StreamingMessageAggregator.status.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,5 +376,4 @@ describe("StreamingMessageAggregator - Agent Status", () => {
376376
expect(status?.emoji).toBe("🔍");
377377
expect(status?.message).toBe("Analyzing code");
378378
});
379-
380379
});

src/utils/messages/StreamingMessageAggregator.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,12 +773,11 @@ export class StreamingMessageAggregator {
773773
let status: "pending" | "executing" | "completed" | "failed" | "interrupted";
774774
if (part.state === "output-available") {
775775
// Check if result indicates failure (for tools that return { success: boolean })
776-
const output = part.output as unknown;
777776
const isFailed =
778-
typeof output === "object" &&
779-
output !== null &&
780-
"success" in output &&
781-
output.success === false;
777+
typeof part.output === "object" &&
778+
part.output !== null &&
779+
"success" in part.output &&
780+
part.output.success === false;
782781
status = isFailed ? "failed" : "completed";
783782
} else if (part.state === "input-available" && message.metadata?.partial) {
784783
status = "interrupted";

0 commit comments

Comments
 (0)