CreateTerminal

Function CreateTerminal 

Source
pub fn CreateTerminal(
    OptionsValue: Value,
) -> ActionEffect<Arc<dyn TerminalProvider>, CommonError, Value>
Expand description

Creates an effect that, when executed, will create a new terminal instance based on the provided options.

The effect will use the TerminalProvider capability from the environment to perform the actual creation, which typically involves spawning a new pseudo-terminal (PTY) process.

§Parameters

  • OptionsValue: A serde_json::Value representing the TerminalOptions DTO, containing properties like the name, shell path, and arguments for the terminal.

§Returns

An ActionEffect that resolves with a JSON Value containing details of the newly created terminal, such as its ID and process ID (PID).