🤖 AI Summary
Cline v3.36 adds Hooks: a lightweight, file-based extension system that lets you inject custom logic into the AI workflow at defined decision points. Hooks are executable scripts (no extension) placed either globally in ~/Documents/Cline/Rules/Hooks/ or per-project in .clinerules/hooks/. Each hook receives a JSON payload on stdin with operation context (fields like clineVersion, hookName, timestamp, taskId, workspaceRoots, userId plus type-specific data) and must return JSON controlling flow—most importantly a cancel boolean and optional contextModification text. PreToolUse can block or validate planned tool actions (note: the AI has already chosen the action when PreToolUse runs), PostToolUse can learn from results, UserPromptSubmit can validate or augment prompts, and TaskStart/TaskResume/TaskCancel let you initialize state, restore context, or handle cleanup. Hooks also surface as live visual blocks in the UI showing output with expand/collapse, support mid-execution cancel/resume, and persist state across interruptions.
This introduces flexible governance, automation, telemetry and prompt-injection capabilities for workflows—useful for enforcing project rules (e.g., block .js in TypeScript projects), logging metrics, shaping future prompts, or integrating with CI/monitoring. Hooks are currently macOS/Linux only and can be enabled under Features. v3.36 also ships Moonshot’s kimi-k2-thinking model, <think> tag support for open-source model compatibility, and GLM-4.6 system-prompt refinements.
Loading comments...
login to comment
loading comments...
no comments yet