claude-code: add PostToolUse hook for session rename suggestion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,19 @@
|
|||||||
"Read(~/.ssh/*)"
|
"Read(~/.ssh/*)"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
hooks = {
|
||||||
|
PostToolUse = [
|
||||||
|
{
|
||||||
|
matcher = "EnterPlanMode";
|
||||||
|
hooks = [
|
||||||
|
{
|
||||||
|
type = "command";
|
||||||
|
command = "echo 'A plan is being created. If this session has not been renamed yet, suggest a concise, descriptive session name based on the conversation so far and ask the user to run /rename <suggested-name>.'";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
statusLine = {
|
statusLine = {
|
||||||
type = "command";
|
type = "command";
|
||||||
command = ''input=$(cat); echo "$(basename "$(echo "$input" | jq -r '.workspace.current_dir')") | $(echo "$input" | jq -r '.model.display_name')"'';
|
command = ''input=$(cat); echo "$(basename "$(echo "$input" | jq -r '.workspace.current_dir')") | $(echo "$input" | jq -r '.model.display_name')"'';
|
||||||
|
|||||||
Reference in New Issue
Block a user