github / github/copilot-cli

Prompt ID in Hook

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

説明

### Describe the feature or problem you'd like to solve

Add a Prompt ID to the payload sent for the hooks

### Proposed solution

When a hook is fired, there is a session id field, which can be used to track all events for a given session. However, there are some actions that take place in the context of a prompt. For example a stopAgent, or subAgentStart, subAgentStop, permissionRequest, notification, etc. all happen as a result of a prompt that was submitted. Without a prompt id, it's difficult to accurate relate an event to the prompt which caused the event.

My use case is for a dashboard I've built to monitor the activity of my sessions. I run multiple sessions on multiple machines, all working on different things. I built a centralized dashboard to track the status of all of them. I can drill into a session and see all the prompts that have been submitted and their state. I can then drill into a prompt and see the details of the prompt and the actions related to the prompt.

Because we don't have a prompt id, I'm having to guess by tying each notification to the last prompt that was submitted. This mostly works, but is error prone. If my system missed a "userPromptSubmitted" event, then it would tie the event to the previous prompt, incorrectly.

### Example prompts or workflows

_No response_

### Additional context

_No response_

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

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

評価

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

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

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