Files
cline/sdk/examples/hooks/PostToolUse.sh
T
Renee Huangandabeatrix e215d3d91c chore: rename example folders; fix references (#60)
* rename folders

* fix examples reorg references

* move over files

* having agent fixing and validating all examples are still working

* fix sidecar paths

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2026-05-07 20:38:04 -07: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 '{}'