GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/packages/cli/src/tui.ts at dev · comio/opencode Expand file tree/ Copy pathtui.tsMore file actions 36 lines (33 loc) · 1.13 KB / Copy pathtui.tsFile metadata and controls36 lines (33 loc) · 1.13 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import { run } from "@opencode-ai/tui" import { TuiConfig } from "@opencode-ai/tui/config" import { Effect } from "effect" import { Global } from "@opencode-ai/core/global" export function runTui(transport: { url: string; headers: RequestInit["headers"] }) { const config = TuiConfig.resolve({}, { terminalSuspend: false }) return run({ ...transport, args: {}, config, fetch: gracefulFetch, pluginHost: { async start() {}, async dispose() {}, }, }).pipe(Effect.provide(Global.defaultLayer)) } const legacyDefaults: Record<string, unknown> = { "/config/providers": { providers: [], default: {} }, "/provider": { all: [], default: {}, connected: [] }, "/agent": [], "/config": {}, } const gracefulFetch = Object.assign( async (input: RequestInfo | URL, init?: RequestInit) => { const response = await fetch(input, init) if (response.status !== 404) return response const fallback = legacyDefaults[new URL(input instanceof Request ? input.url : input).pathname] if (fallback === undefined) return response return Response.json(fallback) }, { preconnect: fetch.preconnect }, ) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |