需求:
使用hook功能,当对话结束或通知时播放音频文件提醒
我。
在Claude code 设定类似hook后能进行提醒。
当前iflow配置片段:
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "sh ~/.iflow/hooks/stop.sh"
}
]
}
],
"Notification": [
{
"matcher": ".*permission.*",
"hooks": [
{
"type": "command",
"command": "sh ~/.iflow/hooks/notification.sh"
}
]
}
]
}
脚本比较简单内容就是播放音频:
more ~/.iflow/hooks/notification.sh
#!/bin/bash
afplay /Users/chenweilong/Music/bell/mixkit-flute-mobile-phone-notification-alert-2316.wav
权限+x ,执行可播放。但是对话完没有提示。
一直不理解哪里出问题了。 ![]()