Files
MyAiConfiguration/shared/hooks/scripts/Record-Compact.ps1
T
Julian lechner 13eefe3309
CI / Capabilities and shell quality (push) Successful in 11s
CI / Python tests and compilation (push) Successful in 11s
CI / PowerShell tests on Ubuntu (push) Successful in 27s
CI / CI configuration security checks (push) Successful in 4s
CI / Build and inspect generated packages (push) Successful in 6s
CI / Qwen retrieval integration (push) Successful in 14m17s
CI / Bash integration and installation guards (push) Successful in 16s
CI / Installed client configuration smoke tests (push) Successful in 13s
fix(hooks): ignore optional hook failures
2026-09-18 16:17:21 +02:00

16 lines
648 B
PowerShell

[CmdletBinding()]
param()
try {
$ErrorActionPreference = 'Stop'
$root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
$stateDir = Join-Path $root '.ai-session'
if ($env:AI_CONFIG_TELEMETRY -ne '0') {
New-Item $stateDir -ItemType Directory -Force | Out-Null
$path = Join-Path $stateDir 'telemetry.jsonl'
('{"event":"compact","timestamp":"' + (Get-Date).ToUniversalTime().ToString('o') + '"}') | Add-Content $path
if ((Get-Item $path).Length -gt 1048576) { Move-Item $path ($path + '.1') -Force }
}
& python (Join-Path $PSScriptRoot 'session-state.py') --hook 2>$null
} catch {}
exit 0