mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
- bash-guard: block awk (was missing from blocked commands) - post-compact: replace fragile sed JSON escaping with jq -n --arg - track-read: deduplicate entries before appending to .read-tracker - settings: remove redundant Edit→require-read hook (built-in handles it) - settings: add ENABLE_LSP_TOOL=1 for inline LSP diagnostics
11 lines
379 B
Bash
Executable file
11 lines
379 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# PostToolUse hook: Track Read calls for the require-read guard.
|
|
|
|
INPUT=$(cat 2>/dev/null || true)
|
|
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty' 2>/dev/null || true)
|
|
|
|
[ -z "$FILE_PATH" ] && exit 0
|
|
|
|
TRACKER="$CLAUDE_PROJECT_DIR/.claude/.read-tracker"
|
|
grep -qxF "$FILE_PATH" "$TRACKER" 2>/dev/null || echo "$FILE_PATH" >> "$TRACKER"
|
|
exit 0
|