Files
cline-multi-mirror/sdk/examples/hooks/PostToolUse.sh
T
HybridTalentComputing 8d519391b1 Sync with upstream v3.83.0
Replace all files with clean upstream Cline v3.83.0 content.
ShengSuanYun provider code automatically removed.
2026-05-15 13:02:01 +08:00

18 lines
532 B
Bash
Executable File

#!/usr/bin/env bash
# Cline Hook: PostToolUse
# Logs tool results after execution
# Copy to ~/.cline/hooks/PostToolUse.sh and chmod +x
input=$(cat)
tool=$(echo "$input" | jq -r '.tool_result.name // "unknown"')
success=$(echo "$input" | jq -r '.postToolUse.success // false')
duration=$(echo "$input" | jq -r '.postToolUse.executionTimeMs // 0')
status="✅"
[ "$success" != "true" ] && status="❌"
echo "$status Tool completed: $tool (${duration}ms)" >&2
# Return empty object (PostToolUse events are informational)
echo '{}'