**fix(runtime): simplify scanner buffer allocation in executor implementations**

This commit is contained in:
Luis Pater committed 2025-11-18 10:59:49 +08:00
1 parent 1c815c58a6
commit db2d22c978
8 files changed
+9 -18

No files matched your search

+1 -2
View File
@@ -205,8 +205,7 @@ func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Au
}
}()
scanner := bufio.NewScanner(httpResp.Body)
buf := make([]byte, 20_971_520)
scanner.Buffer(buf, 20_971_520)
scanner.Buffer(nil, 20_971_520)
var param any
for scanner.Scan() {
line := scanner.Bytes()