feat: add download instance log button

This commit is contained in:
jialin
2025-02-27 18:03:28 +08:00
parent 4b73457f7f
commit 8464e0ea3f
8 changed files with 201 additions and 35 deletions
-16
View File
@@ -314,19 +314,3 @@ export const readLargeStreamData = async (
}
}
};
export const readTextEventStreamData = async (
reader: any,
decoder: TextDecoder,
callback: (data: any) => void
) => {
const { done, value } = await reader.read();
if (done) {
return;
}
let chunk = decoder.decode(value, { stream: true });
callback(chunk);
await readTextEventStreamData(reader, decoder, callback);
};