(ctx context.Context, req *ElicitationCompleteNotificationRequest)
| 1079 | } |
| 1080 | |
| 1081 | func (c *Client) callElicitationCompleteHandler(ctx context.Context, req *ElicitationCompleteNotificationRequest) (Result, error) { |
| 1082 | // Check if there's a pending elicitation waiting for this notification. |
| 1083 | if cs, ok := req.GetSession().(*ClientSession); ok { |
| 1084 | cs.pendingElicitationsMu.Lock() |
| 1085 | if ch, exists := cs.pendingElicitations[req.Params.ElicitationID]; exists { |
| 1086 | select { |
| 1087 | case ch <- struct{}{}: |
| 1088 | default: |
| 1089 | // Channel already signaled. |
| 1090 | } |
| 1091 | } |
| 1092 | cs.pendingElicitationsMu.Unlock() |
| 1093 | } |
| 1094 | |
| 1095 | // Call the user's handler if provided. |
| 1096 | if h := c.opts.ElicitationCompleteHandler; h != nil { |
| 1097 | h(ctx, req) |
| 1098 | } |
| 1099 | return nil, nil |
| 1100 | } |
| 1101 | |
| 1102 | // NotifyProgress sends a progress notification from the client to the server |
| 1103 | // associated with this session. |
nothing calls this directly
no test coverage detected