github / github/copilot-cli

Prompt ID in Hook

Đang mở
#2,815 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:plugins
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.