chore: generate
This commit is contained in:
@@ -211,7 +211,8 @@ export function Session() {
|
|||||||
|
|
||||||
const pending = createMemo(() => {
|
const pending = createMemo(() => {
|
||||||
const completed = messages().findLast((x) => x.role === "assistant" && x.time.completed)?.id
|
const completed = messages().findLast((x) => x.role === "assistant" && x.time.completed)?.id
|
||||||
return messages().findLast((x) => x.role === "assistant" && !x.time.completed && (!completed || x.id > completed))?.id
|
return messages().findLast((x) => x.role === "assistant" && !x.time.completed && (!completed || x.id > completed))
|
||||||
|
?.id
|
||||||
})
|
})
|
||||||
|
|
||||||
const lastAssistant = createMemo(() => {
|
const lastAssistant = createMemo(() => {
|
||||||
|
|||||||
@@ -257,7 +257,9 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
|
|||||||
|
|
||||||
// Verify the tool call completed (in the first assistant message)
|
// Verify the tool call completed (in the first assistant message)
|
||||||
const allMsgs = yield* MessageV2.filterCompactedEffect(session.id)
|
const allMsgs = yield* MessageV2.filterCompactedEffect(session.id)
|
||||||
const user = allMsgs.find((msg): msg is SessionLegacy.WithParts & { info: SessionLegacy.User } => msg.info.role === "user")
|
const user = allMsgs.find(
|
||||||
|
(msg): msg is SessionLegacy.WithParts & { info: SessionLegacy.User } => msg.info.role === "user",
|
||||||
|
)
|
||||||
const tool = allMsgs
|
const tool = allMsgs
|
||||||
.flatMap((m) => m.parts)
|
.flatMap((m) => m.parts)
|
||||||
.find((p): p is SessionLegacy.ToolPart => p.type === "tool" && p.tool === "bash")
|
.find((p): p is SessionLegacy.ToolPart => p.type === "tool" && p.tool === "bash")
|
||||||
|
|||||||
Reference in New Issue
Block a user