(route: string, directory: string, init: RequestInit = {})
| 9 | const context = Context.empty() as Context.Context<unknown> |
| 10 | |
| 11 | function request(route: string, directory: string, init: RequestInit = {}) { |
| 12 | const headers = new Headers(init.headers) |
| 13 | headers.set("x-opencode-directory", directory) |
| 14 | return HttpApiApp.webHandler().handler( |
| 15 | new Request(`http://localhost${route}`, { |
| 16 | ...init, |
| 17 | headers, |
| 18 | }), |
| 19 | context, |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | const Event = Schema.Struct({ |
| 24 | id: EventV2.ID, |
no test coverage detected