Skip to main content

modules/window/terminal

Interfaces​

Terminal​

Defined in: modules/window/terminal.d.ts:24

Represents a discrete, configurable terminal workspace execution layer instance.

Properties​

creationOptions​

readonly creationOptions: Readonly<{ cwd: string; name: string; shell: string; }>

Defined in: modules/window/terminal.d.ts:44

The configuration properties utilized to initialize this terminal session.

exitStatus​

readonly exitStatus: TerminalExitStatus | undefined

Defined in: modules/window/terminal.d.ts:41

The current exit status metadata if the process has terminated.

Returns​

Object containing the exit code, or undefined if still active.

id​

readonly id: string

Defined in: modules/window/terminal.d.ts:26

The unique identifier assigned to this terminal session.

name​

readonly name: string

Defined in: modules/window/terminal.d.ts:29

The human-readable display name of the terminal tab.

processId​

readonly processId: Promise<number>

Defined in: modules/window/terminal.d.ts:35

Retrieves the system process identifier (PID) asynchronously.

Returns​

Resolves to the process ID, or -1 if unallocated.

Methods​

clear()​

clear(): void

Defined in: modules/window/terminal.d.ts:64

Requests the underlying stream engine to clear terminal screen buffers.

Returns​

void

dispose()​

dispose(): void

Defined in: modules/window/terminal.d.ts:67

Terminates the stream, triggers standard OS signaling cleanup traps, and releases store allocation.

Returns​

void

hide()​

hide(): void

Defined in: modules/window/terminal.d.ts:53

Hides the terminal panel if it is currently focused, switching view hierarchies.

Returns​

void

sendText()​

sendText(text, addNewLine?): void

Defined in: modules/window/terminal.d.ts:61

Evaluates and transmits a string command payload to the underlying shell process instance. Features built-in sequential buffering delays to gracefully support lazy booting processes. *

Parameters​
text​

string

The raw text command string payload.

addNewLine?​

boolean

Appends a carriage return (\r) execution line-break delimiter when true. Defaults to true.

Returns​

void

show()​

show(preserveFocus?): void

Defined in: modules/window/terminal.d.ts:50

Focuses and brings the terminal panel instance into view in the layout.

Parameters​
preserveFocus?​

boolean

Optional configuration parameter to retain code editor focus.

Returns​

void


TerminalExitStatus​

Defined in: modules/window/terminal.d.ts:5

Properties​

code​

readonly code: number

Defined in: modules/window/terminal.d.ts:7

The exit code of the terminal process.


TerminalOptions​

Defined in: modules/window/terminal.d.ts:10

Properties​

cwd?​

optional cwd?: string

Defined in: modules/window/terminal.d.ts:14

The target absolute working directory file path workspace root directory.

name?​

optional name?: string

Defined in: modules/window/terminal.d.ts:12

The visual display label mapping header title.

shell?​

optional shell?: string

Defined in: modules/window/terminal.d.ts:16

Overriding path specification targeting alternative binary shells (e.g., 'bash', 'sh').

show?​

optional show?: boolean

Defined in: modules/window/terminal.d.ts:18

Dictates whether layout viewports instantly focus-shift elements into place.

Default​
true

References​

ActivityBarItemOptions​

Re-exports ActivityBarItemOptions


app​

Re-exports app


authentication​

Re-exports authentication


BookmarkFolder​

Re-exports BookmarkFolder


CommandMetadata​

Re-exports CommandMetadata


commands​

Re-exports commands


CommitOptions​

Re-exports CommitOptions


ConfigurationProperty​

Re-exports ConfigurationProperty


CopyOptions​

Re-exports CopyOptions


Diagnostic​

Re-exports Diagnostic


DiagnosticCollection​

Re-exports DiagnosticCollection


DiagnosticSeverity​

Re-exports DiagnosticSeverity


Disposable​

Re-exports Disposable


DocumentSymbol​

Re-exports DocumentSymbol


ExtensionContext​

Re-exports ExtensionContext


ExtensionInfo​

Re-exports ExtensionInfo


extensions​

Re-exports extensions


FileDecoration​

Re-exports FileDecoration


FileFilter​

Re-exports FileFilter


FileStat​

Re-exports FileStat


FileSystemAPI​

Re-exports FileSystemAPI


FindOptions​

Re-exports FindOptions


fs​

Re-exports fs


git​

Re-exports git


GitBranch​

Re-exports GitBranch


GitChangedFile​

Re-exports GitChangedFile


GitCommit​

Re-exports GitCommit


GitFileStatus​

Re-exports GitFileStatus


GitHubUser​

Re-exports GitHubUser


GitRepository​

Re-exports GitRepository


GitSortMode​

Re-exports GitSortMode


GitStash​

Re-exports GitStash


IConfigurationSection​

Re-exports IConfigurationSection


IconThemeDefinition​

Re-exports IconThemeDefinition


IconThemeMap​

Re-exports IconThemeMap


InputBoxOptions​

Re-exports InputBoxOptions


languages​

Re-exports languages


lsp​

Re-exports lsp


LspServerConfig​

Re-exports LspServerConfig


Re-exports MenuItem


Re-exports menus


ModalOptions​

Re-exports ModalOptions


MSCodeUIColors​

Re-exports MSCodeUIColors


MultiPickerOptions​

Re-exports MultiPickerOptions


NotificationAction​

Re-exports NotificationAction


OutputChannel​

Re-exports OutputChannel


PickerOptions​

Re-exports PickerOptions


Position​

Re-exports Position


ProgressNotification​

Re-exports ProgressNotification


QuickPickItem​

Re-exports QuickPickItem


QuickPickOptions​

Re-exports QuickPickOptions


RecentWorkspace​

Re-exports RecentWorkspace


ReplaceOptions​

Re-exports ReplaceOptions


ResolvedIcon​

Re-exports ResolvedIcon


Re-exports search


SearchFileResult​

Re-exports SearchFileResult


SearchMatch​

Re-exports SearchMatch


Selection​

Re-exports Selection


SettingOption​

Re-exports SettingOption


SettingType​

Re-exports SettingType


SidebarPanelDef​

Re-exports SidebarPanelDef


SidebarPanelHeader​

Re-exports SidebarPanelHeader


SidebarSectionContent​

Re-exports SidebarSectionContent


SidebarSectionContext​

Re-exports SidebarSectionContext


SidebarSectionDef​

Re-exports SidebarSectionDef


SidebarState​

Re-exports SidebarState


SilentSearchOptions​

Re-exports SilentSearchOptions


StashOptions​

Re-exports StashOptions


StatusBarAlignment​

Re-exports StatusBarAlignment


StatusBarItemController​

Re-exports StatusBarItemController


StatusBarItemOptions​

Re-exports StatusBarItemOptions


SymbolKind​

Re-exports SymbolKind


SymbolProvider​

Re-exports SymbolProvider


Tab​

Re-exports Tab


TabDiffData​

Re-exports TabDiffData


TabOptions​

Re-exports TabOptions


TabType​

Re-exports TabType


TaskExecution​

Re-exports TaskExecution


TaskOptions​

Re-exports TaskOptions


tasks​

Re-exports tasks


termis​

Re-exports termis


TermisView​

Re-exports TermisView


TextDocument​

Re-exports TextDocument


TextEditor​

Re-exports TextEditor


TextEditorEdit​

Re-exports TextEditorEdit


TextEditorOptions​

Re-exports TextEditorOptions


ThemeDefinition​

Re-exports ThemeDefinition


themes​

Re-exports themes


TokenColor​

Re-exports TokenColor


TreeDataProvider​

Re-exports TreeDataProvider


TreeItem​

Re-exports TreeItem


TreeView​

Re-exports TreeView


TreeViewOptions​

Re-exports TreeViewOptions


window​

Re-exports window


workspace​

Re-exports workspace


WorkspaceConfiguration​

Re-exports WorkspaceConfiguration


WorkspaceFolder​

Re-exports WorkspaceFolder


WriteOptions​

Re-exports WriteOptions