mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 13:30:52 +00:00
fix session is busy error
This commit is contained in:
parent
6d393759e1
commit
1515efc77c
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,6 @@ export namespace Session {
|
|||
mode?: string
|
||||
parts: MessageV2.UserPart[]
|
||||
}) {
|
||||
using abort = lock(input.sessionID)
|
||||
const l = log.clone().tag("session", input.sessionID)
|
||||
l.info("chatting")
|
||||
|
||||
|
@ -338,6 +337,8 @@ export namespace Session {
|
|||
}
|
||||
}
|
||||
|
||||
using abort = lock(input.sessionID)
|
||||
|
||||
const lastSummary = msgs.findLast((msg) => msg.role === "assistant" && msg.summary === true)
|
||||
if (lastSummary) msgs = msgs.filter((msg) => msg.id >= lastSummary.id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue