Skip to content

perf(core): reduce prompt traversals and optimize base64 conversion#163

Merged
jakobhoeg merged 3 commits intomainfrom
refactor/remove-sanitize-options
Mar 3, 2026
Merged

perf(core): reduce prompt traversals and optimize base64 conversion#163
jakobhoeg merged 3 commits intomainfrom
refactor/remove-sanitize-options

Conversation

@jakobhoeg
Copy link
Owner

@jakobhoeg jakobhoeg commented Mar 3, 2026

  • Replace hasMultimodalContent + getExpectedInputs (two prompt traversals) with a single-pass getMultimodalInfo that returns both values at once
  • Use Uint8Array.from(str, c => c.charCodeAt(0)) instead of a manual loop in convertBase64ToUint8Array
  • Remove redundant unused code sanitizeOptions

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
built-in-ai Error Error Mar 3, 2026 7:09pm

Request Review

@jakobhoeg jakobhoeg changed the title refactor(core): remove empty sanitizeOptions method perf(core): reduce prompt traversals and optimize base64 conversion Mar 3, 2026
@jakobhoeg jakobhoeg merged commit b3f53a8 into main Mar 3, 2026
1 check passed
@jakobhoeg jakobhoeg deleted the refactor/remove-sanitize-options branch March 3, 2026 19:06
@jakobhoeg jakobhoeg mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant