mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-09 17:16:05 -10:00
14 lines
492 B
PowerShell
14 lines
492 B
PowerShell
param([Parameter(Mandatory = $true)][string]$Fixture)
|
|
$ErrorActionPreference = 'Stop'
|
|
[Console]::WriteLine('TERMINAL_FIXTURE_READY')
|
|
while ($null -ne ($command = [Console]::ReadLine())) {
|
|
if ($command -eq 'exit') { exit 0 }
|
|
if ($command -eq 'run') {
|
|
foreach ($line in [System.IO.File]::ReadLines($Fixture)) {
|
|
[Console]::WriteLine($line)
|
|
}
|
|
[Console]::WriteLine('TERMINAL_WORKLOAD_DONE')
|
|
}
|
|
if ($command -eq 'ping') { [Console]::WriteLine('TERMINAL_PROCESS_ALIVE') }
|
|
}
|