refactor(effect): extract session run state service (#21744)
This commit is contained in:
parent
3199383eef
commit
10441efad1
1 changed files with 186 additions and 113 deletions
|
|
@ -6,6 +6,7 @@ import z from "zod"
|
|||
import { Session } from "../../session"
|
||||
import { MessageV2 } from "../../session/message-v2"
|
||||
import { SessionPrompt } from "../../session/prompt"
|
||||
import { SessionRunState } from "@/session/run-state"
|
||||
import { SessionCompaction } from "../../session/compaction"
|
||||
import { SessionRevert } from "../../session/revert"
|
||||
import { SessionStatus } from "@/session/status"
|
||||
|
|
@ -698,7 +699,7 @@ export const SessionRoutes = lazy(() =>
|
|||
),
|
||||
async (c) => {
|
||||
const params = c.req.valid("param")
|
||||
await SessionPrompt.assertNotBusy(params.sessionID)
|
||||
await SessionRunState.assertNotBusy(params.sessionID)
|
||||
await Session.removeMessage({
|
||||
sessionID: params.sessionID,
|
||||
messageID: params.messageID,
|
||||
|
|
|
|||
Loading…
Reference in a new issue