github / github/copilot-cli

$TOOL_INPUT_FILE_PATH for chat hooks doesn't work

オープン
#3,223 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:plugins
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

https://code.visualstudio.com/docs/copilot/customization/hooks#_quick-start-your-first-hook

I tested the exact script provided there (prettier) and it complains
`2026-05-10 19:33:34.811 [info] [#38] [PostToolUse] Output: [error] No parser and no file path given, couldn't infer a parser.`

So I did a print of that variable, it doesn't seem to parse/pass correctly.

```
{
"hooks": {
"PostToolUse": [
{
"type": "command",
"command": "echo \"file path is $TOOL_INPUT_FILE_PATH\"",
}
]
}
}
```

2026-05-10 20:24:19.441 [info] [#42] [PostToolUse] Output: file path is

### Affected version

VS 1.119.0

### Steps to reproduce the behavior

Literally https://code.visualstudio.com/docs/copilot/customization/hooks#_quick-start-your-first-hook
And then tell copilot to make an edit and watch the github copilot chat hooks output

### Expected behavior

$TOOL_INPUT_FILE_PATH to be populated with the path of the file edited by copilot.

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。