@volter/supercode-teams 0.2.75 → 0.2.76

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/terminal-look.mjs +11 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.2.75",
3
+ "version": "0.2.76",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",
package/terminal-look.mjs CHANGED
@@ -5,7 +5,7 @@
5
5
  // Basic profile (terminal-basic.mjs, the brand's terminal roles), light or dark with the system's appearance as Basic is.
6
6
  // The config is WezTerm's own file, passed with `--config-file`; the person's ~/.wezterm.lua is not read for it.
7
7
  import { execFileSync } from 'node:child_process';
8
- import { existsSync, renameSync, writeFileSync } from 'node:fs';
8
+ import { existsSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
9
9
  import { tmpdir } from 'node:os';
10
10
  import { join } from 'node:path';
11
11
  import { TERMINAL_BASIC } from './terminal-basic.mjs';
@@ -125,17 +125,25 @@ export function weztermConfig(profile, { fontDirs = existsSync(TERMINAL_FONTS) ?
125
125
  'config.enable_scroll_bar = false',
126
126
  // Terminal.app does not ask before closing a window whose process is tmux (its default "ask before closing" list).
127
127
  "config.window_close_confirmation = 'NeverPrompt'",
128
+ // A config reload re-arms WezTerm's file watcher while it holds the lock every key and mouse event takes, and
129
+ // arming the watcher waits on fseventsd: open windows stopped taking input for up to 2.3 s after each popup's
130
+ // launch (sampled on macOS 26). The file is written for each launch, so the next process takes any change.
131
+ 'config.automatically_reload_config = false',
128
132
  'return config',
129
133
  '',
130
134
  ];
131
135
  return lines.join('\n');
132
136
  }
133
137
 
134
- /** Writes the config for this machine and returns its path. */
138
+ /** Writes the config for this machine, when it differs from the one on disk, and returns its path. */
135
139
  export function weztermConfigFile(platform = process.platform) {
136
140
  const path = join(tmpdir(), `supercode-wezterm-${process.getuid?.() ?? 'user'}.lua`);
141
+ const config = weztermConfig(terminalAppProfile(platform));
142
+ let current = null;
143
+ try { current = readFileSync(path, 'utf8'); } catch { /* not written yet */ }
144
+ if (current === config) return path;
137
145
  const next = `${path}.${process.pid}`;
138
- writeFileSync(next, weztermConfig(terminalAppProfile(platform)));
146
+ writeFileSync(next, config);
139
147
  renameSync(next, path);
140
148
  return path;
141
149
  }