Commit 064532c
fix(low): remove dead assistant client fn, keep route as fallback (L7)
Background: askWorkspaceAssistant (POST /workspace/assistant/answer) had no call
site — the UI talks only to the SSE sibling — and was a parallel contract that
could drift from the live stream (CONTRACT-1).
Fix: delete the dead askWorkspaceAssistant client function and drop its now-
unused WorkspaceAssistantResponse import from api.ts.
Decision (surfaced for review): the report also suggested deleting the type and
the backend route. I did NOT, because both are live/contradict the report's
"dead" framing:
- WorkspaceAssistantResponse is the streaming response shape rendered by the
live AssistantPanel (and built in useAssistantHistory), so it stays.
- The backend /assistant/answer route shares the SAME accounted path as the
stream (one monthly assistant-turn counter) and is pinned by the
quota / login-required / error-handling suites, so it can't silently drift.
Per the report's sanctioned alternative I kept it and documented it as a
tested lockstep fallback rather than deleting it plus its 5 test files
(out of scope for a Low / would touch core assistant_service).
Test: frontend vitest (33) + tsc + eslint clean; ruff clean on the backend
docstring-only change.
Fixes: L7
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7035d2f commit 064532c
2 files changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1113 | 1124 | | |
1114 | 1125 | | |
1115 | 1126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
607 | 606 | | |
608 | 607 | | |
609 | 608 | | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | 609 | | |
621 | 610 | | |
622 | 611 | | |
| |||
0 commit comments