Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

849 B
Raw Blame
import { readFileSync } from 'node:fs'
import { join } from 'node:path'
import { describe, expect, it } from 'vitest'

const manager = readFileSync(join(__dirname, 'pty-manager.ts'), 'utf8')
const terminal = readFileSync(join(__dirname, '..', 'renderer', 'nodes', 'TerminalNode.tsx'), 'utf8')

describe('Windows persistent-session integration', () => {
  it('always routes Windows sessions to the packaged session host', () => {
    expect(manager).toMatch(
      /if \(os\.platform\(\) === 'win32'\) \{[\s\S]{0,500}?return null\s*\}/
    )
    expect(manager).toContain("sessionHostSupported() ? 'session-host' : null")
  })

  it('prepends the Codex launcher onto the PATH key the environment already uses', () => {
    expect(manager).toContain('const pathKey = envPathKey(env)')
    expect(manager).not.toContain("env.PATH ?? env.Path")
  })
})