char-slop/berry
multipurpose self-modifiable agentic harness
git clone https://git.t4t.associates/char-slop/berry
51288b6
main
1import { defineRenderers } from "@berry/api/web.ts" ; 2import { Ghostty } from "./ghostty.ts" ; 3import { terminalView } from "./view.tsx" ; 4import "./web.css" ; 5 6let loaded :Promise < Ghostty > | undefined ; 7// one module for every terminal on the page; it is fetched once something opens one 8const load = () => 9loaded ??= fetch ( new URL ( "./ghostty-vt.wasm" , import . meta. url )) 10. then (( response ) => { 11if ( ! response . ok ) throw new Error ( `the terminal's module did not load ( ${ response . status } )` ); 12return Ghostty . load ( response ); 13}) 14. catch (( error ) => { 15loaded = undefined ; 16throw error ; 17}); 18 19export default defineRenderers ({ view :{ label :"term" , create :() => terminalView ( load ) } });