Commit 5cf08f9
refactor: split api.ts into domain-specific modules (#597)
* chore: move task to active
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: split api.ts (2,255 lines) into domain-specific modules
Split apps/web/src/lib/api.ts into 17 domain-specific modules under
apps/web/src/lib/api/ with a barrel index.ts re-exporting everything.
All existing imports continue to work without changes.
Modules: client, auth, credentials, providers, github, projects, tasks,
sessions, nodes, workspaces, agents, files, admin, notifications,
deployment, misc. No file exceeds 370 lines (was 2,255).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: archive completed task
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve pre-existing ChatSession.tsx type errors
- Import SessionStateMessage type from acp-client
- Move handleFirstConnect above useAcpSession call to fix used-before-declaration
- Remove unused `connected` destructuring
- Use ref pattern to break circular dependency with switchAgent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: repair broken test file syntax and unused imports
- Fix `define vi.mock` → `vi.mock` (syntax error)
- Remove unused imports (renderHook, act, useRef, useState, beforeEach, afterEach)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: trigger CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add trailing newline to api/index.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove trigger comment from index.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent f5a2cec commit 5cf08f9
21 files changed
Lines changed: 2524 additions & 2297 deletions
File tree
- apps/web
- src
- components
- lib
- api
- tests/unit/components
- tasks/archive
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
158 | 198 | | |
159 | 199 | | |
160 | 200 | | |
| |||
165 | 205 | | |
166 | 206 | | |
167 | 207 | | |
168 | | - | |
| 208 | + | |
| 209 | + | |
169 | 210 | | |
170 | 211 | | |
171 | 212 | | |
| |||
185 | 226 | | |
186 | 227 | | |
187 | 228 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
| |||
0 commit comments