mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: add session_diffs to share
This commit is contained in:
parent
5c0acc0bdb
commit
ad000ca8ed
1 changed files with 5 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ export namespace ShareNext {
|
|||
|
||||
async function fullSync(sessionID: string) {
|
||||
const session = await Session.get(sessionID)
|
||||
const diffs = await Session.diff(sessionID)
|
||||
const messages = await Array.fromAsync(MessageV2.stream(sessionID))
|
||||
await sync(sessionID, [
|
||||
{
|
||||
|
|
@ -113,6 +114,10 @@ export namespace ShareNext {
|
|||
data: x.info,
|
||||
})),
|
||||
...messages.flatMap((x) => x.parts.map((y) => ({ type: "part" as const, data: y }))),
|
||||
{
|
||||
type: "session_diff",
|
||||
data: diffs,
|
||||
},
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue