fix(hooks): settle idle prompt continuations
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
isUnstableTask,
|
||||
THINKING_SUMMARY_MAX_CHARS,
|
||||
} from "./task-message-analyzer"
|
||||
import { settleAfterSessionIdle } from "../shared/session-idle-settle"
|
||||
|
||||
const HOOK_NAME = "unstable-agent-babysitter"
|
||||
const DEFAULT_TIMEOUT_MS = 120000
|
||||
@@ -54,6 +55,7 @@ type BabysitterContext = {
|
||||
type BabysitterOptions = {
|
||||
backgroundManager: Pick<BackgroundManager, "getTasksByParentSession">
|
||||
config?: BabysittingConfig
|
||||
idleSettleMs?: number
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +214,7 @@ export function createUnstableAgentBabysitterHook(ctx: BabysitterContext, option
|
||||
? { providerID: model.providerID, modelID: model.modelID }
|
||||
: undefined
|
||||
const launchVariant = model?.variant
|
||||
await settleAfterSessionIdle(options.idleSettleMs)
|
||||
|
||||
await ctx.client.session.promptAsync({
|
||||
path: { id: mainSessionID },
|
||||
|
||||
Reference in New Issue
Block a user