Function
writeFile
(id: string, filePath: string, content: string)
Source from the content-addressed store, hash-verified
| 182 | } |
| 183 | |
| 184 | export function writeFile(id: string, filePath: string, content: string) { |
| 185 | return request<{ ok: boolean }>(`/api/projects/${id}/file`, { |
| 186 | method: 'PUT', |
| 187 | body: JSON.stringify({ path: filePath, content }) |
| 188 | }); |
| 189 | } |
| 190 | |
| 191 | export function getAllFiles(id: string) { |
| 192 | return request<{ files: { path: string; content: string; encoding?: 'utf8' | 'base64' }[] }>( |
Tested by
no test coverage detected