diff --git a/config/scripts/agent-inspection-cadence-batching-benchmark.mjs b/config/scripts/agent-inspection-cadence-batching-benchmark.mjs index 128627676c4..bdcd9c62fd0 100644 --- a/config/scripts/agent-inspection-cadence-batching-benchmark.mjs +++ b/config/scripts/agent-inspection-cadence-batching-benchmark.mjs @@ -12,7 +12,7 @@ import fs from 'node:fs' import nodeModule from 'node:module' import path from 'node:path' import process from 'node:process' -import { fileURLToPath } from 'node:url' +import { fileURLToPath, pathToFileURL } from 'node:url' if (!process.execArgv.includes('--experimental-transform-types')) { const result = spawnSync( @@ -51,13 +51,17 @@ for (const paneCount of PANE_COUNTS) { } const { nextCadenceInspectionDelayMs } = await import( - path.join(ROOT, 'src/renderer/src/components/terminal-pane/agent-completion-poll-interval.ts') + pathToFileURL( + path.join(ROOT, 'src/renderer/src/components/terminal-pane/agent-completion-poll-interval.ts') + ).href ) const { POLL_TIER_INTERVAL_MS } = await import( - path.join(ROOT, 'src/renderer/src/components/terminal-pane/agent-completion-poll-cadence.ts') + pathToFileURL( + path.join(ROOT, 'src/renderer/src/components/terminal-pane/agent-completion-poll-cadence.ts') + ).href ) const { PROCESS_TABLE_SNAPSHOT_MAX_STALENESS_MS } = await import( - path.join(ROOT, 'src/shared/process-table-snapshot-reader.ts') + pathToFileURL(path.join(ROOT, 'src/shared/process-table-snapshot-reader.ts')).href ) // Pre-change: independent ±10% jitter per pane, re-rolled on every reschedule. diff --git a/config/scripts/session-write-hot-path-benchmark.mjs b/config/scripts/session-write-hot-path-benchmark.mjs index 361e7eb7098..e76ec607f0b 100644 --- a/config/scripts/session-write-hot-path-benchmark.mjs +++ b/config/scripts/session-write-hot-path-benchmark.mjs @@ -15,7 +15,7 @@ import fs from 'node:fs' import nodeModule from 'node:module' import path from 'node:path' import process from 'node:process' -import { fileURLToPath } from 'node:url' +import { fileURLToPath, pathToFileURL } from 'node:url' if (!process.execArgv.includes('--experimental-transform-types')) { const result = spawnSync( @@ -55,19 +55,20 @@ for (const [name, value] of [ } const { capTerminalScrollbackSessionBuffer } = await import( - path.join(ROOT, 'src/shared/workspace-session-terminal-buffers.ts') + pathToFileURL(path.join(ROOT, 'src/shared/workspace-session-terminal-buffers.ts')).href ) const { TERMINAL_SCROLLBACK_SESSION_BUFFER_BYTE_LIMIT } = await import( - path.join(ROOT, 'src/shared/terminal-scrollback-limits.ts') + pathToFileURL(path.join(ROOT, 'src/shared/terminal-scrollback-limits.ts')).href ) const { remapAcknowledgedAgentPaneKeys } = await import( - path.join(ROOT, 'src/main/persistence/restoring-sessions/pane-key-remapping.ts') + pathToFileURL(path.join(ROOT, 'src/main/persistence/restoring-sessions/pane-key-remapping.ts')) + .href ) const { clampUtf8TextTail, measureUtf8ByteLength } = await import( - path.join(ROOT, 'src/shared/utf8-byte-limits.ts') + pathToFileURL(path.join(ROOT, 'src/shared/utf8-byte-limits.ts')).href ) const { isTerminalLeafId, makePaneKey, parsePaneKey } = await import( - path.join(ROOT, 'src/shared/stable-pane-id.ts') + pathToFileURL(path.join(ROOT, 'src/shared/stable-pane-id.ts')).href ) function median(samples) { diff --git a/tests/tools/fish-mode2031-repro/capture-fish-mode2031-trace.mjs b/tests/tools/fish-mode2031-repro/capture-fish-mode2031-trace.mjs index 1b2cbcae38c..d3bb775cf61 100644 --- a/tests/tools/fish-mode2031-repro/capture-fish-mode2031-trace.mjs +++ b/tests/tools/fish-mode2031-repro/capture-fish-mode2031-trace.mjs @@ -33,13 +33,16 @@ import { mkdtempSync, writeFileSync, mkdirSync, rmSync } from 'node:fs' import { tmpdir } from 'node:os' import path from 'node:path' import { createRequire } from 'node:module' +import { pathToFileURL } from 'node:url' const require = createRequire(import.meta.url) const REPO_ROOT = path.resolve(import.meta.dirname, '../../..') const pty = require(path.join(REPO_ROOT, 'node_modules/node-pty')) const { INITIAL_MODE_2031_REPLY_SCAN_STATE, mode2031SequenceFor, scanMode2031ReplyDecision } = - await import(path.join(REPO_ROOT, 'src/shared/terminal-color-scheme-protocol.ts')) + await import( + pathToFileURL(path.join(REPO_ROOT, 'src/shared/terminal-color-scheme-protocol.ts')).href + ) // ---------------------------------------------------------------- args