refactor(plugin): use unified internal prompt dispatch

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-17 17:01:50 +09:00
parent fee515c5ac
commit dd3fecaf40
2 changed files with 12 additions and 7 deletions
+5 -3
View File
@@ -3,7 +3,7 @@ import type { PluginContext } from "./types"
import { createUnstableAgentBabysitterHook } from "../hooks"
import type { BackgroundManager } from "../features/background-agent"
import { promptAsyncAfterSessionIdle } from "../hooks/shared/prompt-async-gate"
import { dispatchInternalPrompt } from "../hooks/shared/prompt-async-gate"
export function createUnstableAgentBabysitter(args: {
ctx: PluginContext
@@ -27,7 +27,8 @@ export function createUnstableAgentBabysitter(args: {
},
status: async () => ctx.client.session.status(),
prompt: async (promptArgs) => {
const promptResult = await promptAsyncAfterSessionIdle({
const promptResult = await dispatchInternalPrompt({
mode: "async",
client: ctx.client,
sessionID: promptArgs.path.id,
source: "unstable-agent-babysitter",
@@ -38,7 +39,8 @@ export function createUnstableAgentBabysitter(args: {
}
},
promptAsync: async (promptArgs) => {
const promptResult = await promptAsyncAfterSessionIdle({
const promptResult = await dispatchInternalPrompt({
mode: "async",
client: ctx.client,
sessionID: promptArgs.path.id,
source: "unstable-agent-babysitter",