Commit 58c3095
committed
chore(llm): drop unused inputTokens/outputTokens from ChatResult (review #11)
The `chatFn` adapter wired in `runtime-container.ts` returned hardcoded
zero token counts for every call. `LLMProvider.chat()` returns
`Promise<string>` (no usage), so threading real counts here would require
widening that interface across every adapter. Nothing in the
`FirstMentionService` path actually consumed the fields — they only
existed to satisfy the local `ChatResult` shape — so dropping them is
strictly safer than leaving misleading zeros in place. Per-call cost
telemetry continues to flow from `LLMProvider.chat` -> `writeCostEvent`
unchanged.
Updated:
- `ChatResult` in `first-mention-service.ts` -> `{ text: string }` only,
with a comment documenting the deliberate decision.
- `runtime-container.ts` adapter no longer fabricates zero usage.
- `first-mention-service.test.ts` fixture updated to match.1 parent ba0db16 commit 58c3095
3 files changed
Lines changed: 18 additions & 10 deletions
File tree
- src
- app
- services
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 29 | + | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | | - | |
27 | | - | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
| |||
0 commit comments