refactor(cli/github+run): Stage 4 — drop AppRuntime.runPromise bridges (#25539)

This commit is contained in:
Kit Langton
2026-05-03 11:42:05 -04:00
committed by GitHub
parent 57d5c095d8
commit df7dd06a0f
2 changed files with 28 additions and 26 deletions

View File

@@ -27,7 +27,6 @@ import { ShellTool } from "../../tool/shell"
import { ShellID } from "../../tool/shell/id"
import { TodoWriteTool } from "../../tool/todo"
import { Locale } from "@/util/locale"
import { AppRuntime } from "@/effect/app-runtime"
type ToolProps<T> = {
input: Tool.InferParameters<T>
@@ -300,6 +299,7 @@ export const RunCommand = effectCmd({
default: false,
}),
handler: Effect.fn("Cli.run")(function* (args) {
const agentSvc = yield* Agent.Service
yield* Effect.promise(async () => {
let message = [...args.message, ...(args["--"] || [])]
.map((arg) => (arg.includes(" ") ? `"${arg.replace(/"/g, '\\"')}"` : arg))
@@ -603,7 +603,7 @@ export const RunCommand = effectCmd({
return name
}
const entry = await AppRuntime.runPromise(Agent.Service.use((svc) => svc.get(name)))
const entry = await Effect.runPromise(agentSvc.get(name))
if (!entry) {
UI.println(
UI.Style.TEXT_WARNING_BOLD + "!",