fix(hooks): ignore optional hook failures
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
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
This commit is contained in:
1 parent
cacb41fe28
commit
13eefe3309
9 files changed
+60
-20
No files matched your search
@@ -1,12 +1,15 @@
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
$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
|
||||
exit $LASTEXITCODE
|
||||
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
|
||||
@@ -1,4 +1,7 @@
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
& python (Join-Path $PSScriptRoot 'session-state.py') --hook
|
||||
exit $LASTEXITCODE
|
||||
try {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& python (Join-Path $PSScriptRoot 'session-state.py') --hook 2>$null
|
||||
} catch {}
|
||||
exit 0
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
set -uo pipefail
|
||||
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
[ "${AI_CONFIG_TELEMETRY:-1}" = 0 ] || { mkdir -p "$root/.ai-session" && printf '{"event":"compact","timestamp":"%s"}\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$root/.ai-session/telemetry.jsonl"; [ "$(wc -c < "$root/.ai-session/telemetry.jsonl")" -le 1048576 ] || mv -f "$root/.ai-session/telemetry.jsonl" "$root/.ai-session/telemetry.jsonl.1"; }
|
||||
python3 "$root/hooks/scripts/session-state.py" --hook
|
||||
python3 "$root/hooks/scripts/session-state.py" --hook 2>/dev/null || true
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
set -uo pipefail
|
||||
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||
python3 "$script_dir/session-state.py" --hook
|
||||
python3 "$script_dir/session-state.py" --hook 2>/dev/null || true
|
||||
Reference in new issue
Block a user