This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Commit b23effd
authored
fix: only record db content if it is the last chunk in stream (#1091)
For copilot chat, we are actually receiving multiple streams, and
we were recording entries and alerts for each one, repeating those.
So detect if we are in the last chunk and propagate it to the
pipeline, so we can record it only in this case, avoiding dupes.
In the case of other providers, we only receive one request, so
always force saving it
Closes: #9361 parent 8d738a4 commit b23effd
File tree
3 files changed
+18
-5
lines changed- src/codegate
- db
- pipeline
- providers/copilot
3 files changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | | - | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
170 | | - | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
197 | | - | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
908 | 914 | | |
909 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
910 | 918 | | |
911 | 919 | | |
912 | 920 | | |
| |||
0 commit comments