mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-08 01:39:12 +00:00
deprecated session.idle event
This commit is contained in:
@@ -31,6 +31,13 @@ export namespace SessionStatus {
|
||||
status: Info,
|
||||
}),
|
||||
),
|
||||
// deprecated
|
||||
Idle: Bus.event(
|
||||
"session.idle",
|
||||
z.object({
|
||||
sessionID: z.string(),
|
||||
}),
|
||||
),
|
||||
}
|
||||
|
||||
const state = Instance.state(() => {
|
||||
@@ -56,6 +63,10 @@ export namespace SessionStatus {
|
||||
status,
|
||||
})
|
||||
if (status.type === "idle") {
|
||||
// deprecated
|
||||
Bus.publish(Event.Idle, {
|
||||
sessionID,
|
||||
})
|
||||
delete state()[sessionID]
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user