@slopus/happy-terminal 0.3.1 → 0.3.2

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/README.md CHANGED
@@ -43,7 +43,8 @@ await runHappyTerminal({
43
43
  ```
44
44
 
45
45
  Embedded sessions use `happy` in resume instructions by default. A different host command can be
46
- provided with `commandName`.
46
+ provided with `commandName`. An embedded host may also provide `version` to replace the installed
47
+ Happy Terminal package version in the startup UI.
47
48
 
48
49
  Run only one inline terminal at a time because each instance owns the process terminal while it is
49
50
  active. Happy Terminal requires Node.js 24 or newer.
@@ -17,6 +17,8 @@ export interface RunAppOptions {
17
17
  sessionSelection?: StartupSessionSelection;
18
18
  showReasoning?: boolean;
19
19
  showUsage?: boolean;
20
+ /** Version displayed by the host, defaulting to the installed Happy Terminal package. */
21
+ version?: string;
20
22
  }
21
23
  export type RunAppResult = {
22
24
  action: "exit";
package/dist/index.js CHANGED
@@ -9346,76 +9346,26 @@ function renderPendingSteeringMessages(messages, width) {
9346
9346
 
9347
9347
  // sources/app/renderHappyTerminalBanner.ts
9348
9348
  import { truncateToWidth as truncateToWidth20 } from "@earendil-works/pi-tui";
9349
-
9350
- // sources/app/renderHappyTerminalVersion.ts
9351
- var VERSION_GLYPHS = {
9352
- "0": [" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2588\u2588\u2588\u2588\u2557", "\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
9353
- "1": [" \u2588\u2588\u2557", "\u2588\u2588\u2588\u2551", "\u255A\u2588\u2588\u2551", " \u2588\u2588\u2551", " \u2588\u2588\u2551", " \u255A\u2550\u255D"],
9354
- "2": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2557", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u2588\u2588\u2554\u2550\u2550\u2550\u255D ", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"],
9355
- "3": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2557", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2588\u2588\u2557", "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
9356
- "4": ["\u2588\u2588\u2557 \u2588\u2588\u2557", "\u2588\u2588\u2551 \u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2551", " \u255A\u2550\u255D"],
9357
- "5": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"],
9358
- "6": [" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D ", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
9359
- "7": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2554\u255D", " \u2588\u2588\u2554\u255D ", " \u2588\u2588\u2551 ", " \u255A\u2550\u255D "],
9360
- "8": [" \u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u255D "],
9361
- "9": [" \u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2551", " \u255A\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u255D "],
9362
- ".": [" ", " ", " ", " ", "\u2588\u2588\u2557", "\u255A\u2550\u255D"]
9363
- };
9364
- function renderHappyTerminalVersion(version, width) {
9365
- const glyphs = [...version].map((character) => VERSION_GLYPHS[character]);
9366
- if (width < 40 || glyphs.some((glyph) => glyph === void 0)) {
9367
- return [version.slice(0, width)];
9368
- }
9369
- const chunks = [];
9370
- let chunk = [];
9371
- for (const glyph of glyphs) {
9372
- const candidate = [...chunk, glyph];
9373
- const candidateWidth = Math.max(
9374
- ...Array.from(
9375
- { length: 6 },
9376
- (_, rowIndex) => candidate.reduce((rowWidth, item) => rowWidth + (item[rowIndex]?.length ?? 0), 0)
9377
- )
9378
- );
9379
- if (chunk.length > 0 && candidateWidth > width) {
9380
- chunks.push(chunk);
9381
- chunk = [glyph];
9382
- } else {
9383
- chunk = candidate;
9384
- }
9385
- }
9386
- if (chunk.length > 0) chunks.push(chunk);
9387
- return chunks.flatMap((items) => {
9388
- const rows = Array.from(
9389
- { length: 6 },
9390
- (_, rowIndex) => items.map((glyph) => glyph[rowIndex] ?? "").join("").trimEnd()
9391
- );
9392
- while (rows[0] === "") rows.shift();
9393
- while (rows.at(-1) === "") rows.pop();
9394
- return rows;
9395
- });
9396
- }
9397
-
9398
- // sources/app/renderHappyTerminalBanner.ts
9399
9349
  var RESET19 = "\x1B[0m";
9400
- var HAPPY_TERMINAL_LOGO = [
9350
+ var HAPPY_LOGO = [
9401
9351
  "\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557",
9402
9352
  "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D",
9403
9353
  "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D ",
9404
9354
  "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u255A\u2588\u2588\u2554\u255D ",
9405
- "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
9406
- "\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D TERMINAL"
9355
+ "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
9356
+ "\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "
9407
9357
  ];
9408
- var HAPPY_TERMINAL_LOGO_WIDTH = 54;
9358
+ var HAPPY_LOGO_WIDTH = Math.max(...HAPPY_LOGO.map((line) => line.length));
9409
9359
  var BANNER_GAP = " ";
9410
9360
  var BANNER_PADDING = " ";
9411
9361
  function renderHappyTerminalBanner(options) {
9412
9362
  const width = Math.max(1, options.width);
9413
9363
  const contentWidth = width - BANNER_PADDING.length * 2;
9414
9364
  if (contentWidth <= 0) return [" ".repeat(width)];
9415
- if (contentWidth < HAPPY_TERMINAL_LOGO_WIDTH + BANNER_GAP.length + options.version.length) {
9365
+ if (contentWidth < HAPPY_LOGO_WIDTH + BANNER_GAP.length + options.version.length) {
9416
9366
  const lines3 = [
9417
9367
  truncateToWidth20(
9418
- `${options.brand}Happy Terminal${RESET19} ${options.secondary}${options.version}${RESET19}`,
9368
+ `${options.brand}HAPPY${RESET19} ${options.secondary}${options.version}${RESET19}`,
9419
9369
  contentWidth,
9420
9370
  "",
9421
9371
  false
@@ -9423,17 +9373,9 @@ function renderHappyTerminalBanner(options) {
9423
9373
  ];
9424
9374
  return padBannerLines(lines3);
9425
9375
  }
9426
- const versionWidth = contentWidth - HAPPY_TERMINAL_LOGO_WIDTH - BANNER_GAP.length;
9427
- const versionLines = renderHappyTerminalVersion(options.version, versionWidth);
9428
- if (versionLines.length === HAPPY_TERMINAL_LOGO.length) {
9429
- const lines3 = HAPPY_TERMINAL_LOGO.map(
9430
- (line, index) => `${options.brand}${line.padEnd(HAPPY_TERMINAL_LOGO_WIDTH)}${RESET19}${BANNER_GAP}${options.secondary}${versionLines[index]}${RESET19}`
9431
- );
9432
- return padBannerLines(lines3);
9433
- }
9434
- const lines2 = HAPPY_TERMINAL_LOGO.map((line, index) => {
9435
- const version = index === HAPPY_TERMINAL_LOGO.length - 1 ? `${BANNER_GAP}${options.secondary}${versionLines[0]}${RESET19}` : "";
9436
- return `${options.brand}${line.padEnd(HAPPY_TERMINAL_LOGO_WIDTH)}${RESET19}${version}`;
9376
+ const lines2 = HAPPY_LOGO.map((line, index) => {
9377
+ const version = index === HAPPY_LOGO.length - 1 ? `${BANNER_GAP}${options.secondary}${options.version}${RESET19}` : "";
9378
+ return `${options.brand}${line.padEnd(HAPPY_LOGO_WIDTH)}${RESET19}${version}`;
9437
9379
  });
9438
9380
  return padBannerLines(lines2);
9439
9381
  }
@@ -16604,6 +16546,7 @@ var StartupStatusApp = class {
16604
16546
  var INITIAL_TUI_MESSAGE_LIMIT = 30;
16605
16547
  async function runApp(ctx, options = {}) {
16606
16548
  const requestedCwd = options.cwd ?? process.cwd();
16549
+ const version = options.version ?? readPackageVersion();
16607
16550
  const loadedConfig = await loadConfig({ cwd: requestedCwd });
16608
16551
  let compactCompletedTurns = options.compactCompletedTurns ?? loadedConfig.config.settings.compactCompletedTurns;
16609
16552
  let completionChime = loadedConfig.config.settings.completionChime;
@@ -16620,7 +16563,7 @@ async function runApp(ctx, options = {}) {
16620
16563
  rows: () => terminal.rows,
16621
16564
  theme: startupTheme,
16622
16565
  tui,
16623
- version: readPackageVersion()
16566
+ version
16624
16567
  });
16625
16568
  const terminalCrashCleanup = installTerminalCrashCleanup({ terminal, tui });
16626
16569
  let terminalAppearance;
@@ -16743,7 +16686,6 @@ async function runApp(ctx, options = {}) {
16743
16686
  if (loadedConfig.config.defaults.serviceTier !== void 0) {
16744
16687
  agent.setServiceTier(loadedConfig.config.defaults.serviceTier);
16745
16688
  }
16746
- const version = readPackageVersion();
16747
16689
  const tuiInspectorUrl = getNodeInspectorUrl();
16748
16690
  const startupQuotas = await resolveStartupProviderQuota(() => agent.providerQuotas());
16749
16691
  const startupUsage = providerQuotaToStartupStatusUsage(
package/dist/main.js CHANGED
@@ -11020,76 +11020,26 @@ function renderPendingSteeringMessages(messages, width) {
11020
11020
 
11021
11021
  // sources/app/renderHappyTerminalBanner.ts
11022
11022
  import { truncateToWidth as truncateToWidth20 } from "@earendil-works/pi-tui";
11023
-
11024
- // sources/app/renderHappyTerminalVersion.ts
11025
- var VERSION_GLYPHS = {
11026
- "0": [" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2588\u2588\u2588\u2588\u2557", "\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
11027
- "1": [" \u2588\u2588\u2557", "\u2588\u2588\u2588\u2551", "\u255A\u2588\u2588\u2551", " \u2588\u2588\u2551", " \u2588\u2588\u2551", " \u255A\u2550\u255D"],
11028
- "2": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2557", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u2588\u2588\u2554\u2550\u2550\u2550\u255D ", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"],
11029
- "3": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2557", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2588\u2588\u2557", "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
11030
- "4": ["\u2588\u2588\u2557 \u2588\u2588\u2557", "\u2588\u2588\u2551 \u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2551", " \u255A\u2550\u255D"],
11031
- "5": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"],
11032
- "6": [" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D ", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u2550\u255D "],
11033
- "7": ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2554\u255D", " \u2588\u2588\u2554\u255D ", " \u2588\u2588\u2551 ", " \u255A\u2550\u255D "],
11034
- "8": [" \u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u255D "],
11035
- "9": [" \u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2551", " \u255A\u2550\u2550\u2550\u2588\u2588\u2551", " \u2588\u2588\u2588\u2588\u2588\u2554\u255D", " \u255A\u2550\u2550\u2550\u2550\u255D "],
11036
- ".": [" ", " ", " ", " ", "\u2588\u2588\u2557", "\u255A\u2550\u255D"]
11037
- };
11038
- function renderHappyTerminalVersion(version, width) {
11039
- const glyphs = [...version].map((character) => VERSION_GLYPHS[character]);
11040
- if (width < 40 || glyphs.some((glyph) => glyph === void 0)) {
11041
- return [version.slice(0, width)];
11042
- }
11043
- const chunks = [];
11044
- let chunk = [];
11045
- for (const glyph of glyphs) {
11046
- const candidate = [...chunk, glyph];
11047
- const candidateWidth = Math.max(
11048
- ...Array.from(
11049
- { length: 6 },
11050
- (_, rowIndex) => candidate.reduce((rowWidth, item) => rowWidth + (item[rowIndex]?.length ?? 0), 0)
11051
- )
11052
- );
11053
- if (chunk.length > 0 && candidateWidth > width) {
11054
- chunks.push(chunk);
11055
- chunk = [glyph];
11056
- } else {
11057
- chunk = candidate;
11058
- }
11059
- }
11060
- if (chunk.length > 0) chunks.push(chunk);
11061
- return chunks.flatMap((items) => {
11062
- const rows = Array.from(
11063
- { length: 6 },
11064
- (_, rowIndex) => items.map((glyph) => glyph[rowIndex] ?? "").join("").trimEnd()
11065
- );
11066
- while (rows[0] === "") rows.shift();
11067
- while (rows.at(-1) === "") rows.pop();
11068
- return rows;
11069
- });
11070
- }
11071
-
11072
- // sources/app/renderHappyTerminalBanner.ts
11073
11023
  var RESET19 = "\x1B[0m";
11074
- var HAPPY_TERMINAL_LOGO = [
11024
+ var HAPPY_LOGO = [
11075
11025
  "\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557",
11076
11026
  "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D",
11077
11027
  "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D ",
11078
11028
  "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u255A\u2588\u2588\u2554\u255D ",
11079
- "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
11080
- "\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D TERMINAL"
11029
+ "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
11030
+ "\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "
11081
11031
  ];
11082
- var HAPPY_TERMINAL_LOGO_WIDTH = 54;
11032
+ var HAPPY_LOGO_WIDTH = Math.max(...HAPPY_LOGO.map((line) => line.length));
11083
11033
  var BANNER_GAP = " ";
11084
11034
  var BANNER_PADDING = " ";
11085
11035
  function renderHappyTerminalBanner(options) {
11086
11036
  const width = Math.max(1, options.width);
11087
11037
  const contentWidth = width - BANNER_PADDING.length * 2;
11088
11038
  if (contentWidth <= 0) return [" ".repeat(width)];
11089
- if (contentWidth < HAPPY_TERMINAL_LOGO_WIDTH + BANNER_GAP.length + options.version.length) {
11039
+ if (contentWidth < HAPPY_LOGO_WIDTH + BANNER_GAP.length + options.version.length) {
11090
11040
  const lines3 = [
11091
11041
  truncateToWidth20(
11092
- `${options.brand}Happy Terminal${RESET19} ${options.secondary}${options.version}${RESET19}`,
11042
+ `${options.brand}HAPPY${RESET19} ${options.secondary}${options.version}${RESET19}`,
11093
11043
  contentWidth,
11094
11044
  "",
11095
11045
  false
@@ -11097,17 +11047,9 @@ function renderHappyTerminalBanner(options) {
11097
11047
  ];
11098
11048
  return padBannerLines(lines3);
11099
11049
  }
11100
- const versionWidth = contentWidth - HAPPY_TERMINAL_LOGO_WIDTH - BANNER_GAP.length;
11101
- const versionLines = renderHappyTerminalVersion(options.version, versionWidth);
11102
- if (versionLines.length === HAPPY_TERMINAL_LOGO.length) {
11103
- const lines3 = HAPPY_TERMINAL_LOGO.map(
11104
- (line, index) => `${options.brand}${line.padEnd(HAPPY_TERMINAL_LOGO_WIDTH)}${RESET19}${BANNER_GAP}${options.secondary}${versionLines[index]}${RESET19}`
11105
- );
11106
- return padBannerLines(lines3);
11107
- }
11108
- const lines2 = HAPPY_TERMINAL_LOGO.map((line, index) => {
11109
- const version = index === HAPPY_TERMINAL_LOGO.length - 1 ? `${BANNER_GAP}${options.secondary}${versionLines[0]}${RESET19}` : "";
11110
- return `${options.brand}${line.padEnd(HAPPY_TERMINAL_LOGO_WIDTH)}${RESET19}${version}`;
11050
+ const lines2 = HAPPY_LOGO.map((line, index) => {
11051
+ const version = index === HAPPY_LOGO.length - 1 ? `${BANNER_GAP}${options.secondary}${options.version}${RESET19}` : "";
11052
+ return `${options.brand}${line.padEnd(HAPPY_LOGO_WIDTH)}${RESET19}${version}`;
11111
11053
  });
11112
11054
  return padBannerLines(lines2);
11113
11055
  }
@@ -18281,6 +18223,7 @@ var StartupStatusApp = class {
18281
18223
  var INITIAL_TUI_MESSAGE_LIMIT = 30;
18282
18224
  async function runApp(ctx, options = {}) {
18283
18225
  const requestedCwd = options.cwd ?? process.cwd();
18226
+ const version = options.version ?? readPackageVersion();
18284
18227
  const loadedConfig = await loadConfig({ cwd: requestedCwd });
18285
18228
  let compactCompletedTurns = options.compactCompletedTurns ?? loadedConfig.config.settings.compactCompletedTurns;
18286
18229
  let completionChime = loadedConfig.config.settings.completionChime;
@@ -18297,7 +18240,7 @@ async function runApp(ctx, options = {}) {
18297
18240
  rows: () => terminal.rows,
18298
18241
  theme: startupTheme,
18299
18242
  tui,
18300
- version: readPackageVersion()
18243
+ version
18301
18244
  });
18302
18245
  const terminalCrashCleanup = installTerminalCrashCleanup({ terminal, tui });
18303
18246
  let terminalAppearance;
@@ -18420,7 +18363,6 @@ async function runApp(ctx, options = {}) {
18420
18363
  if (loadedConfig.config.defaults.serviceTier !== void 0) {
18421
18364
  agent.setServiceTier(loadedConfig.config.defaults.serviceTier);
18422
18365
  }
18423
- const version = readPackageVersion();
18424
18366
  const tuiInspectorUrl = getNodeInspectorUrl();
18425
18367
  const startupQuotas = await resolveStartupProviderQuota(() => agent.providerQuotas());
18426
18368
  const startupUsage = providerQuotaToStartupStatusUsage(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slopus/happy-terminal",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Happy Terminal, the embeddable terminal client for Happy Agent.",
5
5
  "keywords": [
6
6
  "coding-agent",
@@ -63,7 +63,7 @@
63
63
  "@sinclair/typebox": "^0.34.49",
64
64
  "@slopus/ghostty-wasm": "1.3.6",
65
65
  "@slopus/ghostty-web": "0.1.3",
66
- "@slopus/happy-agent-client": "0.0.13",
66
+ "@slopus/happy-agent-client": "0.0.17",
67
67
  "@slopus/happy-providers": "0.0.11",
68
68
  "@slopus/murmur": "0.4.4",
69
69
  "@steve.kite/stdlib": "0.0.12",
@@ -1 +0,0 @@
1
- export declare function renderHappyTerminalVersion(version: string, width: number): string[];