mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-05 00:34:22 +08:00
feat: update project structure for Vite and React Router, remove deprecated sources, and enhance Docker deployment
This commit is contained in:
@@ -377,8 +377,9 @@ function consumeResponseStreamText(state: ResponseStreamState, text: string, onD
|
||||
for (;;) {
|
||||
const match = state.buffer.match(/\r?\n\r?\n/);
|
||||
if (!match) break;
|
||||
consumeResponseStreamBlock(state.buffer.slice(0, match.index), state, onDelta);
|
||||
state.buffer = state.buffer.slice(match.index + match[0].length);
|
||||
const index = match.index ?? 0;
|
||||
consumeResponseStreamBlock(state.buffer.slice(0, index), state, onDelta);
|
||||
state.buffer = state.buffer.slice(index + match[0].length);
|
||||
}
|
||||
if (flush && state.buffer.trim()) {
|
||||
consumeResponseStreamBlock(state.buffer, state, onDelta);
|
||||
@@ -525,8 +526,9 @@ function consumeGeminiStreamText(state: GeminiStreamState, text: string, onDelta
|
||||
for (;;) {
|
||||
const match = state.buffer.match(/\r?\n\r?\n/);
|
||||
if (!match) break;
|
||||
consumeGeminiStreamBlock(state.buffer.slice(0, match.index), state, onDelta);
|
||||
state.buffer = state.buffer.slice(match.index + match[0].length);
|
||||
const index = match.index ?? 0;
|
||||
consumeGeminiStreamBlock(state.buffer.slice(0, index), state, onDelta);
|
||||
state.buffer = state.buffer.slice(index + match[0].length);
|
||||
}
|
||||
if (flush && state.buffer.trim()) {
|
||||
consumeGeminiStreamBlock(state.buffer, state, onDelta);
|
||||
|
||||
Reference in New Issue
Block a user