fix: onboarding upload file bug

This commit is contained in:
phact 2025-10-24 04:40:07 -04:00
parent f710c628f9
commit e0eadd25b8

View file

@ -68,6 +68,9 @@ export async function uploadFileForContext(
(uploadJson as { response_id?: string }).response_id || "uploaded"; (uploadJson as { response_id?: string }).response_id || "uploaded";
const filePath = const filePath =
(uploadJson as { filename?: string }).filename || file.name; (uploadJson as { filename?: string }).filename || file.name;
const pages = (uploadJson as { pages?: number }).pages;
const contentLength = (uploadJson as { content_length?: number }).content_length;
const confirmation = (uploadJson as { confirmation?: string }).confirmation;
const result: UploadFileResult = { const result: UploadFileResult = {
fileId, fileId,
@ -85,6 +88,11 @@ export async function uploadFileForContext(
result: { result: {
file_id: fileId, file_id: fileId,
file_path: filePath, file_path: filePath,
filename: filePath,
pages: pages,
content_length: contentLength,
confirmation: confirmation,
response_id: fileId,
run: null, run: null,
deletion: null, deletion: null,
unified: false, unified: false,