fix(api): fix Optional not defined (#25857)

This commit is contained in:
Jyong 2025-09-17 22:41:57 +08:00 committed by GitHub
commit 4fd2f605ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class DatasourceFileMessageTransformer:
)
elif message.type == DatasourceMessage.MessageType.FILE:
meta = message.meta or {}
file: Optional[File] = meta.get("file")
file: File | None = meta.get("file")
if isinstance(file, File):
if file.transfer_method == FileTransferMethod.TOOL_FILE:
assert file.related_id is not None