Skip to content

Commit 1a5c3c0

Browse files
committed
Remove unnecessary assertions
1 parent 0fa002b commit 1a5c3c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/server/api/src/app/ai/chat/model-message-converter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function createImagePart(
7272
function createToolCallPart(part: any, tools?: ToolSet): UIMessage['parts'][0] {
7373
const toolName = part.toolName;
7474
const tool = tools?.[toolName];
75-
const hasOutput = (part as any).output != null;
75+
const hasOutput = part.output != null;
7676

7777
if (tool) {
7878
// Static tool
@@ -85,7 +85,7 @@ function createToolCallPart(part: any, tools?: ToolSet): UIMessage['parts'][0] {
8585
input: part.input as Record<string, unknown>,
8686
...(hasOutput
8787
? {
88-
output: (part as any).output.value || (part as any).output,
88+
output: part.output.value || part.output,
8989
}
9090
: {}),
9191
providerExecuted: part.providerExecuted,
@@ -105,7 +105,7 @@ function createToolCallPart(part: any, tools?: ToolSet): UIMessage['parts'][0] {
105105
input: part.input as Record<string, unknown>,
106106
...(hasOutput
107107
? {
108-
output: (part as any).output.value || (part as any).output,
108+
output: part.output.value || part.output,
109109
}
110110
: {}),
111111
...(part.providerOptions != null

0 commit comments

Comments
 (0)