#[non_exhaustive]pub struct CreateTerminalRequest {
pub session_id: SessionId,
pub command: String,
pub args: Vec<String>,
pub env: Vec<EnvVariable>,
pub cwd: Option<PathBuf>,
pub output_byte_limit: Option<u64>,
pub meta: Option<Meta>,
}Expand description
Request to create a new terminal and execute a command.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: SessionIdThe session ID for this request.
command: StringThe command to execute.
args: Vec<String>Array of command arguments.
env: Vec<EnvVariable>Environment variables for the command.
cwd: Option<PathBuf>Working directory for the command (absolute path).
output_byte_limit: Option<u64>Maximum number of output bytes to retain.
When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.
The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl CreateTerminalRequest
impl CreateTerminalRequest
pub fn new(session_id: impl Into<SessionId>, command: impl Into<String>) -> Self
Sourcepub fn env(self, env: Vec<EnvVariable>) -> Self
pub fn env(self, env: Vec<EnvVariable>) -> Self
Environment variables for the command.
Sourcepub fn cwd(self, cwd: impl IntoOption<PathBuf>) -> Self
pub fn cwd(self, cwd: impl IntoOption<PathBuf>) -> Self
Working directory for the command (absolute path).
Sourcepub fn output_byte_limit(self, output_byte_limit: impl IntoOption<u64>) -> Self
pub fn output_byte_limit(self, output_byte_limit: impl IntoOption<u64>) -> Self
Maximum number of output bytes to retain.
When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.
The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for CreateTerminalRequest
impl Clone for CreateTerminalRequest
Source§fn clone(&self) -> CreateTerminalRequest
fn clone(&self) -> CreateTerminalRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateTerminalRequest
impl Debug for CreateTerminalRequest
Source§impl<'de> Deserialize<'de> for CreateTerminalRequest
impl<'de> Deserialize<'de> for CreateTerminalRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CreateTerminalRequest
impl JsonSchema for CreateTerminalRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more