Archived
15 lines
470 B
TypeScript
15 lines
470 B
TypeScript
import type { WorkspacePanelTerminal } from "@jmfederico/pi-web/plugin-api";
|
|
import type { WorkspaceTask } from "./config.js";
|
|
|
|
export function runWorkspaceTaskInTerminal(terminal: WorkspacePanelTerminal, task: WorkspaceTask): ReturnType<WorkspacePanelTerminal["runCommand"]> {
|
|
return terminal.runCommand({
|
|
title: task.title,
|
|
command: task.command,
|
|
open: true,
|
|
metadata: {
|
|
"pi.plugin": "workspace-tasks",
|
|
"task.id": task.id,
|
|
},
|
|
});
|
|
}
|