@oh-my-pi/pi-tui 3.15.1 → 3.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/terminal.ts CHANGED
@@ -51,6 +51,9 @@ export interface Terminal {
51
51
  clearLine(): void; // Clear current line
52
52
  clearFromCursor(): void; // Clear from cursor to end of screen
53
53
  clearScreen(): void; // Clear entire screen and move cursor to (0,0)
54
+
55
+ // Title operations
56
+ setTitle(title: string): void; // Set terminal window title
54
57
  }
55
58
 
56
59
  /**
@@ -160,4 +163,9 @@ export class ProcessTerminal implements Terminal {
160
163
  clearScreen(): void {
161
164
  process.stdout.write("\x1b[2J\x1b[H"); // Clear screen and move to home (1,1)
162
165
  }
166
+
167
+ setTitle(title: string): void {
168
+ // OSC 0;title BEL - set terminal window title
169
+ process.stdout.write(`\x1b]0;${title}\x07`);
170
+ }
163
171
  }