refactor(stream-parsing): restructured stream utilities to use Web standard APIs and generic SSE parsing
- Refactored SSE stream parsing to use generic `readSseJson` utility instead of domain-specific handlers across multiple packages. - Migrated from Node.js Buffer API to Web standard APIs (Uint8Array, TextDecoder, DataView) for cross-platform compatibility. - Simplified stream transformation pipeline by consolidating multiple stream operations into unified `createTextLineSplitter` utility. - Refactored `ptree.ts` to remove complex stream pumping infrastructure and simplify stderr handling with direct async iteration. - Rewrote stream utilities to operate at binary level with byte-level parsing for improved efficiency and reduced string allocations. - Updated TypeScript configuration to include DOM.AsyncIterable type definitions for async iterable DOM API support.
This commit is contained in:
@@ -49,7 +49,7 @@ export async function processFileArguments(fileArgs: string[], options?: Process
|
||||
|
||||
if (mimeType) {
|
||||
// Handle image file
|
||||
const base64Content = buffer.toString("base64");
|
||||
const base64Content = buffer.toBase64();
|
||||
let attachment: ImageContent;
|
||||
let dimensionNote: string | undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user