This commit is contained in:
Chris Wanstrath 2025-09-26 12:15:45 -07:00
parent 00e035c853
commit 75fca493e5

View File

@ -11,7 +11,7 @@ import { ALS } from "./session"
const sessions: Map<string, Session> = new Map()
export async function runCommand(session: string, id: string, input: string): Promise<CommandResult> {
export async function runCommand(sessionId: string, taskId: string, input: string): Promise<CommandResult> {
const [cmd = "", ...args] = input.split(" ")
if (!commandExists(cmd)) {
@ -20,7 +20,7 @@ export async function runCommand(session: string, id: string, input: string): Pr
let status: "ok" | "error" = "ok"
let output: CommandOutput = ""
const state = getState(session, id)
const state = getState(sessionId, taskId)
try {
[status, output] = await ALS.run(state, async () => await exec(cmd, args))