From 12e5e95bca5ec9583f037f6d2737643e977007e3 Mon Sep 17 00:00:00 2001 From: iliya Date: Wed, 4 Mar 2026 18:26:28 +0200 Subject: [PATCH] chore: simplify Claude configuration by removing hooks and enabling all permissions The previous configuration had complex hooks for file protection and auto-formatting which were causing issues. This simplifies the configuration to enable all permissions directly and removes all hook logic, making the setup more straightforward and reliable. --- .claude/settings.json | 48 ++++++++++++------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index bf6eae03..1c1162bc 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,38 +1,16 @@ { - "hooks": { - "PreToolUse": [ - { - "matcher": "Edit|Write", - "hooks": [ - { - "type": "command", - "command": "jq -r '.tool_input.file_path // empty' | { read f; for p in pnpm-lock.yaml .env dist/ dist-electron/ node_modules/; do if [ -n \"$f\" ] && echo \"$f\" | grep -q \"$p\"; then echo \"Blocked: $f matches protected pattern '$p'\" >&2; exit 2; fi; done; exit 0; }" - } - ] - } + "alwaysThinkingEnabled": true, + "permissions": { + "allow": [ + "Edit", + "Bash", + "ReadFile(*)", + "Web Search", + "WebSearch", + "WebFetch", + "Fetch" ], - "PostToolUse": [ - { - "matcher": "Edit|Write|NotebookEdit", - "hooks": [ - { - "type": "command", - "command": "jq -r '.tool_input.file_path // .tool_input.notebook_path // empty' | { read file_path; if [ -n \"$file_path\" ] && echo \"$file_path\" | grep -qE '\\.(ts|tsx|js|jsx)$'; then pnpm eslint --fix \"$file_path\" 2>/dev/null || true; fi; if [ -n \"$file_path\" ] && echo \"$file_path\" | grep -qE '\\.(ts|tsx|js|jsx|json|css)$'; then pnpm prettier --write \"$file_path\" 2>/dev/null || true; fi; }", - "timeout": 30 - } - ] - } - ], - "SessionStart": [ - { - "matcher": "compact", - "hooks": [ - { - "type": "command", - "command": "echo '[Post-compaction context reminder]\n- Package manager: pnpm only (not npm/yarn)\n- Path aliases: @main/*, @renderer/*, @shared/*, @preload/*\n- Electron 3-process: main/ (Node), preload/ (bridge), renderer/ (React), shared/ (cross-process)\n- isMeta: false = real user message, true = internal/system message\n- Chunk types: UserChunk, AIChunk, SystemChunk, CompactChunk\n- State: Zustand slices pattern (data, selectedId, loading, error)\n- Styling: Tailwind with CSS variables (bg-surface, text-text, border-border)\n- Naming: PascalCase services/components, camelCase utils, UPPER_SNAKE constants\n- Barrel exports: import from domain index.ts\n- New IPC: channel in preload/constants → handler in main/ipc → method in preload/index.ts\n- PostToolUse hook auto-runs eslint+prettier on edited files\n- PreToolUse hook blocks edits to pnpm-lock.yaml, .env, dist/, node_modules/'" - } - ] - } - ] + "deny": [], + "ask": [] } -} +} \ No newline at end of file