names
This commit is contained in:
parent
00e035c853
commit
75fca493e5
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user