fix(stage-ui,stage-web): emit literals asap and show streaming messages#451
Merged
sumimakito merged 1 commit intomainfrom Aug 26, 2025
Merged
fix(stage-ui,stage-web): emit literals asap and show streaming messages#451sumimakito merged 1 commit intomainfrom
sumimakito merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for airi-vtuber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for airi-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
efb6b66 to
b2506a7
Compare
Contributor
|
LGTM |
nekomeowww
reviewed
Aug 26, 2025
Comment on lines
+68
to
+70
| const codeBlockSystemPrompt = '- For any programming code block, always specify the programming language that supported on @shikijs/rehype on the rendered markdown, eg. ```python ... ```\n' | ||
| const mathSyntaxSystemPrompt = '- For any math equation, use LaTeX format, eg: $ x^3 $, always escape dollar sign outside math equation\n' |
Member
There was a problem hiding this comment.
Interesting that we do prompt injecting.
Contributor
There was a problem hiding this comment.
@nekomeowww Yes, its can be omitted, its just enforcing the llm to use specific format to response with language and latex format, without that, it can be intermittence
nekomeowww
reviewed
Aug 26, 2025
Comment on lines
+43
to
+51
| const openTagIndex = buffer.indexOf(TAG_OPEN) | ||
| if (openTagIndex < 0) { | ||
| if (buffer.length - 1 >= minLiteralEmitLength) { | ||
| const emit = buffer.slice(0, -1) | ||
| buffer = buffer[buffer.length - 1] | ||
| await options.onLiteral?.(emit) | ||
| } | ||
| break | ||
| } |
nekomeowww
reviewed
Aug 26, 2025
Comment on lines
+52
to
+70
| async function handleFilePaste(files: File[]) { | ||
| for (const file of files) { | ||
| if (file.type.startsWith('image/')) { | ||
| const reader = new FileReader() | ||
| reader.onload = (e) => { | ||
| const base64Data = (e.target?.result as string)?.split(',')[1] | ||
| if (base64Data) { | ||
| attachments.value.push({ | ||
| type: 'image' as const, | ||
| data: base64Data, | ||
| mimeType: file.type, | ||
| url: URL.createObjectURL(file), | ||
| }) | ||
| } | ||
| } | ||
| reader.readAsDataURL(file) | ||
| } | ||
| } | ||
| } |
nekomeowww
approved these changes
Aug 26, 2025
Member
|
We can merge if ready. |
Member
|
I merged it. |
89b42d9 to
cfe2d89
Compare
Disqort
pushed a commit
to Disqort/airi
that referenced
this pull request
Aug 29, 2025
lucas-oma
pushed a commit
to lucas-oma/airi
that referenced
this pull request
Sep 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
useLlmmarkerParserto emit literals ASAP, otherwise they are only emitted when a complete tag is parsedllmmarkerParser.test.ts<|and|>to keep the behavior untouched