You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Do not double count secrets on /explain copilot function
Closes: #519
When using `/explain` function in copilot we were double counting th secrets.
The problem was that we were getting several `user` messages after the last
`assistant` message. We are using the last `assistant` message as means to identify
the user messages. Here is an example of how the request looked like for `/explain`:
```
[
{"role": "assistant", "content": "some content"},
{"role": "user", "content": content_with_secrets},
{"role": "user", "content": content_with_secrets},
]
```
To avoid double counting now we check which was the secrets that matched after
the last `assistant` message and only consider the unique ones.
0 commit comments