API: Add API to minimize and expand tail windows (#2556)

This commit is contained in:
catloversg
2026-03-09 04:00:06 +07:00
committed by GitHub
parent 342dea77fa
commit 9eb2863e48
11 changed files with 175 additions and 12 deletions

View File

@@ -210,8 +210,10 @@ interface TailProperties {
width: number;
/** Height of the log window content area */
height: number;
/** The font size of the tail window. Defaults to the font size set in the style editor. */
/** The font size of the log window. Defaults to the font size set in the style editor. */
fontSize: number;
/** Whether the log window is minimized. */
minimized: boolean;
}
/**
@@ -6809,6 +6811,21 @@ interface UserInterface {
*/
setTailFontSize(pixel?: number, fn?: FilenameOrPID, host?: string, ...args: ScriptArg[]): void;
/**
* Minimize or expand the tail window of a script.
*
* @remarks
* RAM cost: 0 GB
*
* Equivalent to pressing the "Minimize"/"Expand" button on the tail window.
*
* If called without arguments, this function minimizes/expands the tail window of the current script. If a PID is
* provided, it minimizes/expands the tail window of the specified script instead.
*
* @param pid - Optional. The PID of the script. If omitted, the current script is used.
*/
setTailMinimized(minimized: boolean, pid?: number): void;
/**
* Get the current window size
* @remarks