Add hooks, @file mentions, session search/fork/export, follow-scroll

- Hooks ([[hooks]]): pre_tool, post_tool, user_prompt, stop; sandboxed, exit 2 blocks
- @file mentions with autocomplete; mentioned files/folders are attached to the prompt
- Session full-text search in the sidebar, fork into a copy, export as Markdown/JSON
- Chat follows the newest message until the user scrolls up; jump-to-latest button
- SVG activity spark and thinking icon instead of Unicode/emoji glyphs
- File search ranks name matches first and returns relative paths

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-08 20:17:12 +01:00
1 parent ec1b9b4925
commit 013695722a
17 files changed
+911 -41

No files matched your search

+23
View File
@@ -317,6 +317,29 @@ enabled = true
# root_markers = ["build.zig"]
# -----------------------------------------------------------------------------
# Hooks – shell commands on agent events
# -----------------------------------------------------------------------------
# event: pre_tool | post_tool | user_prompt | stop
# matcher: tool name pattern for tool events ("*", "bash", "edit|write", "mcp__*")
# The hook gets the event as JSON on stdin (session_id, cwd, tool, input,
# result, prompt, last_message) and runs in the user's sandbox in the session
# directory. Exit 0: stdout is added as context (user_prompt, post_tool).
# Exit 2: block – pre_tool rejects the call, user_prompt drops the prompt,
# post_tool sends stderr to the agent as feedback, stop makes the agent
# continue with stderr as instruction (max. 3 times per turn).
# -----------------------------------------------------------------------------
# [[hooks]]
# event = "post_tool"
# matcher = "edit|write"
# command = 'f=$(jq -r .input.path); case "$f" in *.py) ruff format -q "$f";; esac; exit 0'
#
# [[hooks]]
# event = "pre_tool"
# matcher = "bash"
# command = 'jq -r .input.command | grep -q "git push" && { echo "No pushes from agents" >&2; exit 2; }; exit 0'
# -----------------------------------------------------------------------------
# Sandbox
# -----------------------------------------------------------------------------