// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { TerminalTarget } from "./TerminalTarget";

/**
 * Open request payload for `terminal_open`. Cols/rows match
 * xterm.js's initial fit; the supervisor sends them straight
 * through to `PtySize` on the backend.
 */
export type TerminalOpenRequest = { target: TerminalTarget, cols: number, rows: number, 
/**
 * Command to prefill at the fresh shell's prompt right after
 * spawn — typed in as if the user had typed it, but NOT
 * executed (no trailing newline is sent; the user reviews it
 * and presses Enter). Used by "restart" on an exited tab and
 * by session replay on IDE launch — the frontend seeds it
 * from the shell-history line it captured when the terminal
 * was last used. Once the user runs it, the line lands in
 * the shell's own history and up-arrow keeps walking the
 * same session.
 */
command: string | null, 
/**
 * Absolute **host** path of the bound folder this terminal is
 * being opened for — the project the user was in when they hit
 * `+ Terminal`. Recorded in
 * [`moon_terminal::TerminalRegistry`] so the coder's
 * `list_terminals` / `read_terminal` tools can scope
 * themselves to the session's own project or worktree
 * (ADR 0048).
 *
 * Passed explicitly rather than derived from `cwd`: a worktree
 * rides its parent's bind mount, so its container `cwd` is a
 * path *under* the parent's folder, and any user `cd` makes
 * the shell's live cwd a lie about which project the terminal
 * belongs to. `None` for a terminal with no project behind it
 * (a `$HOME` shell in a folder-less workspace); those never
 * match a folder-scoped listing.
 */
folder: string | null, };
