mirror of
https://github.com/cline/cline.git
synced 2026-09-01 15:11:04 +08:00
e215d3d91c
* 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>
17 lines
516 B
Bash
Executable File
17 lines
516 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Cline Hook: PreToolUse
|
|
# Logs every tool call before it executes
|
|
# Copy to ~/.cline/hooks/PreToolUse.sh and chmod +x
|
|
|
|
input=$(cat)
|
|
tool=$(echo "$input" | jq -r '.tool_call.name // "unknown"')
|
|
args=$(echo "$input" | jq -r '.preToolUse.parameters | to_entries | map("\(.key)=\(.value)") | join(", ")' 2>/dev/null || echo "")
|
|
|
|
echo "🔧 Tool: $tool" >&2
|
|
if [ -n "$args" ] && [ "$args" != "null" ]; then
|
|
echo " Args: $args" >&2
|
|
fi
|
|
|
|
# Return empty object to allow the call to proceed
|
|
echo '{}'
|