Spaces:
Sleeping
Sleeping
Andrew
commited on
Commit
·
8d64b56
1
Parent(s):
346fcd8
feat(utils): add message update handler for SSE stream
Browse files
src/lib/utils/messageUpdates.ts
CHANGED
|
@@ -15,6 +15,10 @@ type MessageUpdateRequestOptions = {
|
|
| 15 |
isContinue: boolean;
|
| 16 |
files?: MessageFile[];
|
| 17 |
personaId?: string; // Optional: specific persona to regenerate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
};
|
| 19 |
export async function fetchMessageUpdates(
|
| 20 |
conversationId: string,
|
|
@@ -32,6 +36,7 @@ export async function fetchMessageUpdates(
|
|
| 32 |
is_retry: opts.isRetry,
|
| 33 |
is_continue: opts.isContinue,
|
| 34 |
persona_id: opts.personaId,
|
|
|
|
| 35 |
});
|
| 36 |
|
| 37 |
opts.files?.forEach((file) => {
|
|
|
|
| 15 |
isContinue: boolean;
|
| 16 |
files?: MessageFile[];
|
| 17 |
personaId?: string; // Optional: specific persona to regenerate
|
| 18 |
+
branchedFrom?: {
|
| 19 |
+
messageId: string;
|
| 20 |
+
personaId: string;
|
| 21 |
+
}; // Optional: branch metadata
|
| 22 |
};
|
| 23 |
export async function fetchMessageUpdates(
|
| 24 |
conversationId: string,
|
|
|
|
| 36 |
is_retry: opts.isRetry,
|
| 37 |
is_continue: opts.isContinue,
|
| 38 |
persona_id: opts.personaId,
|
| 39 |
+
branched_from: opts.branchedFrom,
|
| 40 |
});
|
| 41 |
|
| 42 |
opts.files?.forEach((file) => {
|