refactor(prompt-callers): migrate shared and cli 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:09:04 +09:00
parent 989ab7171d
commit 1bbe065c60
4 changed files with 16 additions and 11 deletions
+7 -5
View File
@@ -6,8 +6,7 @@ import {
type PromptRetryOptions,
} from "./prompt-timeout-context"
import {
promptAfterSessionIdle,
promptAsyncAfterSessionIdle,
dispatchInternalPrompt,
releasePromptAsyncReservation,
} from "./prompt-async-gate"
@@ -100,7 +99,8 @@ export async function promptWithModelSuggestionRetry(
const timeoutContext = createPromptTimeoutContext(args, timeoutMs)
try {
const promptResult = await promptAsyncAfterSessionIdle({
const promptResult = await dispatchInternalPrompt({
mode: "async",
client,
sessionID: args.path.id,
input: {
@@ -140,7 +140,8 @@ export async function promptSyncWithModelSuggestionRetry(
try {
const timeoutContext = createPromptTimeoutContext(args, timeoutMs)
try {
const promptResult = await promptAfterSessionIdle({
const promptResult = await dispatchInternalPrompt({
mode: "sync",
client,
sessionID: args.path.id,
input: {
@@ -197,7 +198,8 @@ export async function promptSyncWithModelSuggestionRetry(
const timeoutContext = createPromptTimeoutContext(retryArgs, timeoutMs)
try {
const promptResult = await promptAfterSessionIdle({
const promptResult = await dispatchInternalPrompt({
mode: "sync",
client,
sessionID: retryArgs.path.id,
input: {