Commit eb0eaff
committed
fix(plugin): include reasoning bytes in projection denominator and clamp ratio
Oracle review caught that reasoningByteSize was added to the numerator
(droppable bytes) but not the denominator (total active bytes), which
could make projected post-drop usage unrealistically low. Fixed by
summing byteSize + reasoningByteSize in totalActiveBytes and clamping
dropRatio to [0, 1] as a safety bound.1 parent 0feaf50 commit eb0eaff
File tree
1 file changed
+6
-2
lines changed- packages/plugin/src/hooks/magic-context
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
0 commit comments