herm-tui 1.6.0-dev.2 → 1.6.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3668,7 +3668,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
|
|
|
3668
3668
|
`)}sid="";setSession(sid){this.sid=sid}request(method,params={}){if(!this.proc||this.proc.exitCode!==null)this.start();let stdin=this.proc?.stdin;if(!stdin||typeof stdin==="number")return Promise.reject(Error("gateway not running"));let rid=`r${++this.id}`,writer=stdin,merged=this.sid&¶ms.session_id===void 0?{session_id:this.sid,...params}:params;return new Promise((resolve4,reject)=>{let timeout=setTimeout(()=>{if(this.pending.delete(rid))reject(Error(`timeout: ${method}`))},REQUEST_MS);this.pending.set(rid,{reject:(e)=>{clearTimeout(timeout),reject(e)},resolve:(v2)=>{clearTimeout(timeout),resolve4(v2)}});try{writer.write(JSON.stringify({jsonrpc:"2.0",id:rid,method,params:merged})+`
|
|
3669
3669
|
`)}catch(e){clearTimeout(timeout),this.pending.delete(rid),reject(e instanceof Error?e:Error(String(e)))}})}kill(){this.proc?.kill()}get ready(){return this.ok}}var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE2=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;if(maybeKey!==void 0&&(key=""+maybeKey),config.key!==void 0&&(key=""+config.key),"key"in config){maybeKey={};for(var propName in config)propName!=="key"&&(maybeKey[propName]=config[propName])}else maybeKey=config;return config=maybeKey.ref,{$$typeof:REACT_ELEMENT_TYPE,type,key,ref:config!==void 0?config:null,props:maybeKey}}var $Fragment2=REACT_FRAGMENT_TYPE2,$jsx=jsxProd,$jsxs=jsxProd;var Gw=import_react13.createContext(null),GatewayProvider=({client,children})=>{let ref=import_react13.useRef(null);if(!ref.current)ref.current=client??new GatewayClient;let[ready,setReady]=import_react13.useState(ref.current.ready);import_react13.useEffect(()=>{let c=ref.current,onEvent=(ev)=>{if(ev.type==="gateway.ready"||ev.type==="session.info")setReady(!0)};return c.on("event",onEvent),c.start(),c.drain(),()=>{c.off("event",onEvent),c.removeAllListeners(),c.kill()}},[]);let restart=import_react13.useCallback(()=>{setReady(!1),ref.current.start()},[]),value=import_react13.useMemo(()=>({client:ref.current,ready,restart}),[ready,restart]);return $jsx(Gw.Provider,{value,children})};function useGateway(){let ctx=import_react13.useContext(Gw);if(!ctx)throw Error("useGateway() must be inside <GatewayProvider>");return ctx.client}function useGatewayEvent(handler){let ctx=import_react13.useContext(Gw);if(!ctx)throw Error("useGatewayEvent() must be inside <GatewayProvider>");let ref=import_react13.useRef(handler);ref.current=handler,import_react13.useEffect(()=>{let c=ctx.client,fn=(ev)=>ref.current(ev);return c.on("event",fn),c.drain(),()=>{c.off("event",fn)}},[ctx.client])}function useGatewayReady(){let ctx=import_react13.useContext(Gw);if(!ctx)throw Error("useGatewayReady() must be inside <GatewayProvider>");return ctx.ready}function useGatewayRestart(){let ctx=import_react13.useContext(Gw);if(!ctx)throw Error("useGatewayRestart() must be inside <GatewayProvider>");return ctx.restart}function text(msg){return msg.parts.filter((p)=>p.type==="text").map((p)=>p.content).join("")}function mid(){return`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var pn=0;function pid(){return`p${++pn}`}var import_react22=__toESM(require_react_production(),1);var import_react21=__toESM(require_react_production(),1);var import_react18=__toESM(require_react_production(),1);var import_react16=__toESM(require_react_production(),1);var import_react14=__toESM(require_react_production(),1);function makeUse(ctx,name){return()=>{let v2=import_react14.useContext(ctx);if(v2===null)throw Error(`${name}() must be used inside its provider`);return v2}}function resolveTheme(theme,mode){let defs=theme.defs??{};function resolve4(c,chain=[]){if(c instanceof RGBA)return c;if(typeof c==="string"){if(c==="transparent"||c==="none")return RGBA.fromInts(0,0,0,0);if(c.startsWith("#"))return RGBA.fromHex(c);if(chain.includes(c))throw Error(`Circular color reference: ${[...chain,c].join(" -> ")}`);let next=defs[c]??theme.theme[c];if(next===void 0)throw Error(`Color reference "${c}" not found in defs or theme`);return resolve4(next,[...chain,c])}if(typeof c==="number")return ansiToRgba(c);return resolve4(c[mode],chain)}let resolved=Object.fromEntries(Object.entries(theme.theme).filter(([key])=>key!=="selectedListItemText"&&key!=="backgroundMenu"&&key!=="thinkingOpacity").map(([key,value])=>[key,resolve4(value)])),hasList=theme.theme.selectedListItemText!==void 0;resolved.selectedListItemText=hasList?resolve4(theme.theme.selectedListItemText):resolved.background,resolved.backgroundMenu=theme.theme.backgroundMenu!==void 0?resolve4(theme.theme.backgroundMenu):resolved.backgroundElement;let base={...resolved,_hasSelectedListItemText:hasList,thinkingOpacity:theme.theme.thinkingOpacity??0.6},herm=resolveHermTokens(resolved.accent);return{...base,...herm}}function resolveHermTokens(accent){return{hermAvatar:accent}}function ansiToRgba(code){if(code<16){let colors=["#000000","#800000","#008000","#808000","#000080","#800080","#008080","#c0c0c0","#808080","#ff0000","#00ff00","#ffff00","#0000ff","#ff00ff","#00ffff","#ffffff"];return RGBA.fromHex(colors[code]??"#000000")}if(code<232){let idx=code-16,val=(x2)=>x2===0?0:x2*40+55;return RGBA.fromInts(val(Math.floor(idx/36)),val(Math.floor(idx/6)%6),val(idx%6))}if(code<256){let gray=(code-232)*10+8;return RGBA.fromInts(gray,gray,gray)}return RGBA.fromInts(0,0,0)}var ares_default={$schema:"https://opencode.ai/theme.json",defs:{aresBgDark:"#2A1212",aresPanelDark:"#351717",aresElemDark:"#3F1B1B",aresTextDark:"#F1E6CF",aresMutedDark:"#6E584B",aresPrimaryDark:"#C7A96B",aresAccentDark:"#DD4A3A",aresSecondaryDark:"#C7A96B",aresBorderDark:"#9F1C1C",aresBorderSubtleDark:"#6E584B",aresBgLight:"#F8F8F8",aresPanelLight:"#EFEFEF",aresElemLight:"#E4E4E4",aresTextLight:"#1A1A1A",aresMutedLight:"#5A5A5A",aresPrimaryLight:"#8D7035",aresAccentLight:"#DD4A3A",aresSecondaryLight:"#8D7035",aresBorderLight:"#D0D0D0",aresBorderSubtleLight:"#E0E0E0",aresOkDark:"#4caf50",aresErrorDark:"#ef5350",aresWarnDark:"#ffa726",aresOkLight:"#4caf50",aresErrorLight:"#ef5350",aresWarnLight:"#A56200"},theme:{primary:{dark:"aresPrimaryDark",light:"aresPrimaryLight"},secondary:{dark:"aresSecondaryDark",light:"aresSecondaryLight"},accent:{dark:"aresAccentDark",light:"aresAccentLight"},error:{dark:"aresErrorDark",light:"aresErrorLight"},warning:{dark:"aresWarnDark",light:"aresWarnLight"},success:{dark:"aresOkDark",light:"aresOkLight"},info:{dark:"aresAccentDark",light:"aresAccentLight"},text:{dark:"aresTextDark",light:"aresTextLight"},textMuted:{dark:"aresMutedDark",light:"aresMutedLight"},background:{dark:"aresBgDark",light:"aresBgLight"},backgroundPanel:{dark:"aresPanelDark",light:"aresPanelLight"},backgroundElement:{dark:"aresElemDark",light:"aresElemLight"},border:{dark:"aresBorderDark",light:"aresBorderLight"},borderActive:{dark:"aresAccentDark",light:"aresAccentLight"},borderSubtle:{dark:"aresBorderSubtleDark",light:"aresBorderSubtleLight"},diffAdded:{dark:"aresOkDark",light:"aresOkLight"},diffRemoved:{dark:"aresErrorDark",light:"aresErrorLight"},diffContext:{dark:"aresMutedDark",light:"aresMutedLight"},diffHunkHeader:{dark:"aresMutedDark",light:"aresMutedLight"},diffHighlightAdded:{dark:"aresOkDark",light:"aresOkLight"},diffHighlightRemoved:{dark:"aresErrorDark",light:"aresErrorLight"},diffAddedBg:{dark:"#302E1D",light:"#DEEDDF"},diffRemovedBg:{dark:"#4D1E1D",light:"#F7DFDF"},diffContextBg:{dark:"aresPanelDark",light:"aresPanelLight"},diffLineNumber:{dark:"aresMutedDark",light:"aresMutedLight"},diffAddedLineNumberBg:{dark:"#2D2218",light:"#EAF2EB"},diffRemovedLineNumberBg:{dark:"#3E1818",light:"#F7EBEB"},markdownText:{dark:"aresTextDark",light:"aresTextLight"},markdownHeading:{dark:"aresPrimaryDark",light:"aresPrimaryLight"},markdownLink:{dark:"aresAccentDark",light:"aresAccentLight"},markdownLinkText:{dark:"aresSecondaryDark",light:"aresSecondaryLight"},markdownCode:{dark:"aresSecondaryDark",light:"aresSecondaryLight"},markdownBlockQuote:{dark:"aresMutedDark",light:"aresMutedLight"},markdownEmph:{dark:"aresAccentDark",light:"aresAccentLight"},markdownStrong:{dark:"aresPrimaryDark",light:"aresPrimaryLight"},markdownHorizontalRule:{dark:"aresBorderDark",light:"aresBorderLight"},markdownListItem:{dark:"aresTextDark",light:"aresTextLight"},markdownListEnumeration:{dark:"aresAccentDark",light:"aresAccentLight"},markdownImage:{dark:"aresAccentDark",light:"aresAccentLight"},markdownImageText:{dark:"aresMutedDark",light:"aresMutedLight"},markdownCodeBlock:{dark:"aresTextDark",light:"aresTextLight"},syntaxComment:{dark:"aresMutedDark",light:"aresMutedLight"},syntaxKeyword:{dark:"aresAccentDark",light:"aresAccentLight"},syntaxFunction:{dark:"aresPrimaryDark",light:"aresPrimaryLight"},syntaxVariable:{dark:"aresTextDark",light:"aresTextLight"},syntaxString:{dark:"aresOkDark",light:"aresOkLight"},syntaxNumber:{dark:"aresAccentDark",light:"aresAccentLight"},syntaxType:{dark:"aresSecondaryDark",light:"aresSecondaryLight"},syntaxOperator:{dark:"aresSecondaryDark",light:"aresSecondaryLight"},syntaxPunctuation:{dark:"aresTextDark",light:"aresTextLight"}}};var aura_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#0f0f0f",darkBgPanel:"#15141b",darkBorder:"#2d2d2d",darkFgMuted:"#6d6d6d",darkFg:"#edecee",purple:"#a277ff",pink:"#f694ff",blue:"#82e2ff",red:"#ff6767",orange:"#ffca85",cyan:"#61ffca",green:"#9dff65"},theme:{primary:"purple",secondary:"pink",accent:"purple",error:"red",warning:"orange",success:"cyan",info:"purple",text:"darkFg",textMuted:"darkFgMuted",background:"darkBg",backgroundPanel:"darkBgPanel",backgroundElement:"darkBgPanel",border:"darkBorder",borderActive:"darkFgMuted",borderSubtle:"darkBorder",diffAdded:"cyan",diffRemoved:"red",diffContext:"darkFgMuted",diffHunkHeader:"darkFgMuted",diffHighlightAdded:"cyan",diffHighlightRemoved:"red",diffAddedBg:"#354933",diffRemovedBg:"#3f191a",diffContextBg:"darkBgPanel",diffLineNumber:"darkBorder",diffAddedLineNumberBg:"#162620",diffRemovedLineNumberBg:"#26161a",markdownText:"darkFg",markdownHeading:"purple",markdownLink:"pink",markdownLinkText:"purple",markdownCode:"cyan",markdownBlockQuote:"darkFgMuted",markdownEmph:"orange",markdownStrong:"purple",markdownHorizontalRule:"darkFgMuted",markdownListItem:"purple",markdownListEnumeration:"purple",markdownImage:"pink",markdownImageText:"purple",markdownCodeBlock:"darkFg",syntaxComment:"darkFgMuted",syntaxKeyword:"pink",syntaxFunction:"purple",syntaxVariable:"purple",syntaxString:"cyan",syntaxNumber:"green",syntaxType:"purple",syntaxOperator:"pink",syntaxPunctuation:"darkFg"}};var ayu_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#0B0E14",darkBgAlt:"#0D1017",darkLine:"#11151C",darkPanel:"#0F131A",darkFg:"#BFBDB6",darkFgMuted:"#565B66",darkGutter:"#6C7380",darkTag:"#39BAE6",darkFunc:"#FFB454",darkEntity:"#59C2FF",darkString:"#AAD94C",darkRegexp:"#95E6CB",darkMarkup:"#F07178",darkKeyword:"#FF8F40",darkSpecial:"#E6B673",darkComment:"#ACB6BF",darkConstant:"#D2A6FF",darkOperator:"#F29668",darkAdded:"#7FD962",darkRemoved:"#F26D78",darkAccent:"#E6B450",darkError:"#D95757",darkIndentActive:"#6C7380"},theme:{primary:"darkEntity",secondary:"darkConstant",accent:"darkAccent",error:"darkError",warning:"darkSpecial",success:"darkAdded",info:"darkTag",text:"darkFg",textMuted:"darkFgMuted",background:"darkBg",backgroundPanel:"darkPanel",backgroundElement:"darkBgAlt",border:"darkGutter",borderActive:"darkIndentActive",borderSubtle:"darkLine",diffAdded:"darkAdded",diffRemoved:"darkRemoved",diffContext:"darkComment",diffHunkHeader:"darkComment",diffHighlightAdded:"darkString",diffHighlightRemoved:"darkMarkup",diffAddedBg:"#20303b",diffRemovedBg:"#37222c",diffContextBg:"darkPanel",diffLineNumber:"darkGutter",diffAddedLineNumberBg:"#1b2b34",diffRemovedLineNumberBg:"#2d1f26",markdownText:"darkFg",markdownHeading:"darkConstant",markdownLink:"darkEntity",markdownLinkText:"darkTag",markdownCode:"darkString",markdownBlockQuote:"darkSpecial",markdownEmph:"darkSpecial",markdownStrong:"darkFunc",markdownHorizontalRule:"darkFgMuted",markdownListItem:"darkEntity",markdownListEnumeration:"darkTag",markdownImage:"darkEntity",markdownImageText:"darkTag",markdownCodeBlock:"darkFg",syntaxComment:"darkComment",syntaxKeyword:"darkKeyword",syntaxFunction:"darkFunc",syntaxVariable:"darkEntity",syntaxString:"darkString",syntaxNumber:"darkConstant",syntaxType:"darkSpecial",syntaxOperator:"darkOperator",syntaxPunctuation:"darkFg"}};var carbonfox_default={$schema:"https://opencode.ai/theme.json",defs:{bg0:"#0d0d0d",bg1:"#161616",bg1a:"#1a1a1a",bg2:"#1e1e1e",bg3:"#262626",bg4:"#303030",fg0:"#ffffff",fg1:"#f2f4f8",fg2:"#a9afbc",fg3:"#7d848f",lbg0:"#ffffff",lbg1:"#f4f4f4",lbg2:"#e8e8e8",lbg3:"#dcdcdc",lfg0:"#000000",lfg1:"#161616",lfg2:"#525252",lfg3:"#6f6f6f",red:"#ee5396",green:"#25be6a",yellow:"#08bdba",blue:"#78a9ff",magenta:"#be95ff",cyan:"#33b1ff",white:"#dfdfe0",orange:"#3ddbd9",pink:"#ff7eb6",blueBright:"#8cb6ff",cyanBright:"#52c7ff",greenBright:"#46c880",redLight:"#9f1853",greenLight:"#198038",yellowLight:"#007d79",blueLight:"#0043ce",magentaLight:"#6929c4",cyanLight:"#0072c3",warning:"#f1c21b",diffGreen:"#50fa7b",diffRed:"#ff6b6b",diffGreenBg:"#0f2418",diffRedBg:"#2a1216"},theme:{primary:{dark:"cyan",light:"blueLight"},secondary:{dark:"blue",light:"blueLight"},accent:{dark:"pink",light:"redLight"},error:{dark:"red",light:"redLight"},warning:{dark:"warning",light:"yellowLight"},success:{dark:"green",light:"greenLight"},info:{dark:"blue",light:"blueLight"},text:{dark:"fg1",light:"lfg1"},textMuted:{dark:"fg3",light:"lfg3"},background:{dark:"bg1",light:"lbg0"},backgroundPanel:{dark:"bg1a",light:"lbg1"},backgroundElement:{dark:"bg2",light:"lbg1"},border:{dark:"bg4",light:"lbg3"},borderActive:{dark:"cyan",light:"blueLight"},borderSubtle:{dark:"bg3",light:"lbg2"},diffAdded:{dark:"diffGreen",light:"greenLight"},diffRemoved:{dark:"diffRed",light:"redLight"},diffContext:{dark:"fg3",light:"lfg3"},diffHunkHeader:{dark:"blue",light:"blueLight"},diffHighlightAdded:{dark:"#7dffaa",light:"greenLight"},diffHighlightRemoved:{dark:"#ff9999",light:"redLight"},diffAddedBg:{dark:"diffGreenBg",light:"#defbe6"},diffRemovedBg:{dark:"diffRedBg",light:"#fff1f1"},diffContextBg:{dark:"bg1",light:"lbg1"},diffLineNumber:{dark:"fg3",light:"lfg3"},diffAddedLineNumberBg:{dark:"diffGreenBg",light:"#defbe6"},diffRemovedLineNumberBg:{dark:"diffRedBg",light:"#fff1f1"},markdownText:{dark:"fg1",light:"lfg1"},markdownHeading:{dark:"blueBright",light:"blueLight"},markdownLink:{dark:"blue",light:"blueLight"},markdownLinkText:{dark:"cyan",light:"cyanLight"},markdownCode:{dark:"green",light:"greenLight"},markdownBlockQuote:{dark:"fg3",light:"lfg3"},markdownEmph:{dark:"magenta",light:"magentaLight"},markdownStrong:{dark:"fg0",light:"lfg0"},markdownHorizontalRule:{dark:"bg4",light:"lbg3"},markdownListItem:{dark:"cyan",light:"cyanLight"},markdownListEnumeration:{dark:"cyan",light:"cyanLight"},markdownImage:{dark:"blue",light:"blueLight"},markdownImageText:{dark:"cyan",light:"cyanLight"},markdownCodeBlock:{dark:"fg2",light:"lfg2"},syntaxComment:{dark:"fg3",light:"lfg3"},syntaxKeyword:{dark:"magenta",light:"magentaLight"},syntaxFunction:{dark:"blueBright",light:"blueLight"},syntaxVariable:{dark:"white",light:"lfg1"},syntaxString:{dark:"green",light:"greenLight"},syntaxNumber:{dark:"orange",light:"yellowLight"},syntaxType:{dark:"yellow",light:"yellowLight"},syntaxOperator:{dark:"fg2",light:"lfg2"},syntaxPunctuation:{dark:"fg2",light:"lfg1"}}};var catppuccin_default={$schema:"https://opencode.ai/theme.json",defs:{lightRosewater:"#dc8a78",lightFlamingo:"#dd7878",lightPink:"#ea76cb",lightMauve:"#8839ef",lightRed:"#d20f39",lightMaroon:"#e64553",lightPeach:"#fe640b",lightYellow:"#df8e1d",lightGreen:"#40a02b",lightTeal:"#179299",lightSky:"#04a5e5",lightSapphire:"#209fb5",lightBlue:"#1e66f5",lightLavender:"#7287fd",lightText:"#4c4f69",lightSubtext1:"#5c5f77",lightSubtext0:"#6c6f85",lightOverlay2:"#7c7f93",lightOverlay1:"#8c8fa1",lightOverlay0:"#9ca0b0",lightSurface2:"#acb0be",lightSurface1:"#bcc0cc",lightSurface0:"#ccd0da",lightBase:"#eff1f5",lightMantle:"#e6e9ef",lightCrust:"#dce0e8",darkRosewater:"#f5e0dc",darkFlamingo:"#f2cdcd",darkPink:"#f5c2e7",darkMauve:"#cba6f7",darkRed:"#f38ba8",darkMaroon:"#eba0ac",darkPeach:"#fab387",darkYellow:"#f9e2af",darkGreen:"#a6e3a1",darkTeal:"#94e2d5",darkSky:"#89dceb",darkSapphire:"#74c7ec",darkBlue:"#89b4fa",darkLavender:"#b4befe",darkText:"#cdd6f4",darkSubtext1:"#bac2de",darkSubtext0:"#a6adc8",darkOverlay2:"#9399b2",darkOverlay1:"#7f849c",darkOverlay0:"#6c7086",darkSurface2:"#585b70",darkSurface1:"#45475a",darkSurface0:"#313244",darkBase:"#1e1e2e",darkMantle:"#181825",darkCrust:"#11111b"},theme:{primary:{dark:"darkBlue",light:"lightBlue"},secondary:{dark:"darkMauve",light:"lightMauve"},accent:{dark:"darkPink",light:"lightPink"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkTeal",light:"lightTeal"},text:{dark:"darkText",light:"lightText"},textMuted:{dark:"darkOverlay2",light:"lightOverlay2"},background:{dark:"darkBase",light:"lightBase"},backgroundPanel:{dark:"darkMantle",light:"lightMantle"},backgroundElement:{dark:"darkCrust",light:"lightCrust"},border:{dark:"darkSurface0",light:"lightSurface0"},borderActive:{dark:"darkSurface1",light:"lightSurface1"},borderSubtle:{dark:"darkSurface2",light:"lightSurface2"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkOverlay2",light:"lightOverlay2"},diffHunkHeader:{dark:"darkPeach",light:"lightPeach"},diffHighlightAdded:{dark:"darkGreen",light:"lightGreen"},diffHighlightRemoved:{dark:"darkRed",light:"lightRed"},diffAddedBg:{dark:"#24312b",light:"#d6f0d9"},diffRemovedBg:{dark:"#3c2a32",light:"#f6dfe2"},diffContextBg:{dark:"darkMantle",light:"lightMantle"},diffLineNumber:{dark:"darkSurface1",light:"lightSurface1"},diffAddedLineNumberBg:{dark:"#1e2a25",light:"#c9e3cb"},diffRemovedLineNumberBg:{dark:"#32232a",light:"#e9d3d6"},markdownText:{dark:"darkText",light:"lightText"},markdownHeading:{dark:"darkMauve",light:"lightMauve"},markdownLink:{dark:"darkBlue",light:"lightBlue"},markdownLinkText:{dark:"darkSky",light:"lightSky"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkPeach",light:"lightPeach"},markdownHorizontalRule:{dark:"darkSubtext0",light:"lightSubtext0"},markdownListItem:{dark:"darkBlue",light:"lightBlue"},markdownListEnumeration:{dark:"darkSky",light:"lightSky"},markdownImage:{dark:"darkBlue",light:"lightBlue"},markdownImageText:{dark:"darkSky",light:"lightSky"},markdownCodeBlock:{dark:"darkText",light:"lightText"},syntaxComment:{dark:"darkOverlay2",light:"lightOverlay2"},syntaxKeyword:{dark:"darkMauve",light:"lightMauve"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkPeach",light:"lightPeach"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkSky",light:"lightSky"},syntaxPunctuation:{dark:"darkText",light:"lightText"}}};var catppuccin_frappe_default={$schema:"https://opencode.ai/theme.json",defs:{frappeRosewater:"#f2d5cf",frappeFlamingo:"#eebebe",frappePink:"#f4b8e4",frappeMauve:"#ca9ee6",frappeRed:"#e78284",frappeMaroon:"#ea999c",frappePeach:"#ef9f76",frappeYellow:"#e5c890",frappeGreen:"#a6d189",frappeTeal:"#81c8be",frappeSky:"#99d1db",frappeSapphire:"#85c1dc",frappeBlue:"#8da4e2",frappeLavender:"#babbf1",frappeText:"#c6d0f5",frappeSubtext1:"#b5bfe2",frappeSubtext0:"#a5adce",frappeOverlay2:"#949cb8",frappeOverlay1:"#838ba7",frappeOverlay0:"#737994",frappeSurface2:"#626880",frappeSurface1:"#51576d",frappeSurface0:"#414559",frappeBase:"#303446",frappeMantle:"#292c3c",frappeCrust:"#232634"},theme:{primary:{dark:"frappeBlue",light:"frappeBlue"},secondary:{dark:"frappeMauve",light:"frappeMauve"},accent:{dark:"frappePink",light:"frappePink"},error:{dark:"frappeRed",light:"frappeRed"},warning:{dark:"frappeYellow",light:"frappeYellow"},success:{dark:"frappeGreen",light:"frappeGreen"},info:{dark:"frappeTeal",light:"frappeTeal"},text:{dark:"frappeText",light:"frappeText"},textMuted:{dark:"frappeOverlay2",light:"frappeOverlay2"},background:{dark:"frappeBase",light:"frappeBase"},backgroundPanel:{dark:"frappeMantle",light:"frappeMantle"},backgroundElement:{dark:"frappeCrust",light:"frappeCrust"},border:{dark:"frappeSurface0",light:"frappeSurface0"},borderActive:{dark:"frappeSurface1",light:"frappeSurface1"},borderSubtle:{dark:"frappeSurface2",light:"frappeSurface2"},diffAdded:{dark:"frappeGreen",light:"frappeGreen"},diffRemoved:{dark:"frappeRed",light:"frappeRed"},diffContext:{dark:"frappeOverlay2",light:"frappeOverlay2"},diffHunkHeader:{dark:"frappePeach",light:"frappePeach"},diffHighlightAdded:{dark:"frappeGreen",light:"frappeGreen"},diffHighlightRemoved:{dark:"frappeRed",light:"frappeRed"},diffAddedBg:{dark:"#29342b",light:"#29342b"},diffRemovedBg:{dark:"#3a2a31",light:"#3a2a31"},diffContextBg:{dark:"frappeMantle",light:"frappeMantle"},diffLineNumber:{dark:"frappeSurface1",light:"frappeSurface1"},diffAddedLineNumberBg:{dark:"#223025",light:"#223025"},diffRemovedLineNumberBg:{dark:"#2f242b",light:"#2f242b"},markdownText:{dark:"frappeText",light:"frappeText"},markdownHeading:{dark:"frappeMauve",light:"frappeMauve"},markdownLink:{dark:"frappeBlue",light:"frappeBlue"},markdownLinkText:{dark:"frappeSky",light:"frappeSky"},markdownCode:{dark:"frappeGreen",light:"frappeGreen"},markdownBlockQuote:{dark:"frappeYellow",light:"frappeYellow"},markdownEmph:{dark:"frappeYellow",light:"frappeYellow"},markdownStrong:{dark:"frappePeach",light:"frappePeach"},markdownHorizontalRule:{dark:"frappeSubtext0",light:"frappeSubtext0"},markdownListItem:{dark:"frappeBlue",light:"frappeBlue"},markdownListEnumeration:{dark:"frappeSky",light:"frappeSky"},markdownImage:{dark:"frappeBlue",light:"frappeBlue"},markdownImageText:{dark:"frappeSky",light:"frappeSky"},markdownCodeBlock:{dark:"frappeText",light:"frappeText"},syntaxComment:{dark:"frappeOverlay2",light:"frappeOverlay2"},syntaxKeyword:{dark:"frappeMauve",light:"frappeMauve"},syntaxFunction:{dark:"frappeBlue",light:"frappeBlue"},syntaxVariable:{dark:"frappeRed",light:"frappeRed"},syntaxString:{dark:"frappeGreen",light:"frappeGreen"},syntaxNumber:{dark:"frappePeach",light:"frappePeach"},syntaxType:{dark:"frappeYellow",light:"frappeYellow"},syntaxOperator:{dark:"frappeSky",light:"frappeSky"},syntaxPunctuation:{dark:"frappeText",light:"frappeText"}}};var catppuccin_macchiato_default={$schema:"https://opencode.ai/theme.json",defs:{macRosewater:"#f4dbd6",macFlamingo:"#f0c6c6",macPink:"#f5bde6",macMauve:"#c6a0f6",macRed:"#ed8796",macMaroon:"#ee99a0",macPeach:"#f5a97f",macYellow:"#eed49f",macGreen:"#a6da95",macTeal:"#8bd5ca",macSky:"#91d7e3",macSapphire:"#7dc4e4",macBlue:"#8aadf4",macLavender:"#b7bdf8",macText:"#cad3f5",macSubtext1:"#b8c0e0",macSubtext0:"#a5adcb",macOverlay2:"#939ab7",macOverlay1:"#8087a2",macOverlay0:"#6e738d",macSurface2:"#5b6078",macSurface1:"#494d64",macSurface0:"#363a4f",macBase:"#24273a",macMantle:"#1e2030",macCrust:"#181926"},theme:{primary:{dark:"macBlue",light:"macBlue"},secondary:{dark:"macMauve",light:"macMauve"},accent:{dark:"macPink",light:"macPink"},error:{dark:"macRed",light:"macRed"},warning:{dark:"macYellow",light:"macYellow"},success:{dark:"macGreen",light:"macGreen"},info:{dark:"macTeal",light:"macTeal"},text:{dark:"macText",light:"macText"},textMuted:{dark:"macOverlay2",light:"macOverlay2"},background:{dark:"macBase",light:"macBase"},backgroundPanel:{dark:"macMantle",light:"macMantle"},backgroundElement:{dark:"macCrust",light:"macCrust"},border:{dark:"macSurface0",light:"macSurface0"},borderActive:{dark:"macSurface1",light:"macSurface1"},borderSubtle:{dark:"macSurface2",light:"macSurface2"},diffAdded:{dark:"macGreen",light:"macGreen"},diffRemoved:{dark:"macRed",light:"macRed"},diffContext:{dark:"macOverlay2",light:"macOverlay2"},diffHunkHeader:{dark:"macPeach",light:"macPeach"},diffHighlightAdded:{dark:"macGreen",light:"macGreen"},diffHighlightRemoved:{dark:"macRed",light:"macRed"},diffAddedBg:{dark:"#29342b",light:"#29342b"},diffRemovedBg:{dark:"#3a2a31",light:"#3a2a31"},diffContextBg:{dark:"macMantle",light:"macMantle"},diffLineNumber:{dark:"macSurface1",light:"macSurface1"},diffAddedLineNumberBg:{dark:"#223025",light:"#223025"},diffRemovedLineNumberBg:{dark:"#2f242b",light:"#2f242b"},markdownText:{dark:"macText",light:"macText"},markdownHeading:{dark:"macMauve",light:"macMauve"},markdownLink:{dark:"macBlue",light:"macBlue"},markdownLinkText:{dark:"macSky",light:"macSky"},markdownCode:{dark:"macGreen",light:"macGreen"},markdownBlockQuote:{dark:"macYellow",light:"macYellow"},markdownEmph:{dark:"macYellow",light:"macYellow"},markdownStrong:{dark:"macPeach",light:"macPeach"},markdownHorizontalRule:{dark:"macSubtext0",light:"macSubtext0"},markdownListItem:{dark:"macBlue",light:"macBlue"},markdownListEnumeration:{dark:"macSky",light:"macSky"},markdownImage:{dark:"macBlue",light:"macBlue"},markdownImageText:{dark:"macSky",light:"macSky"},markdownCodeBlock:{dark:"macText",light:"macText"},syntaxComment:{dark:"macOverlay2",light:"macOverlay2"},syntaxKeyword:{dark:"macMauve",light:"macMauve"},syntaxFunction:{dark:"macBlue",light:"macBlue"},syntaxVariable:{dark:"macRed",light:"macRed"},syntaxString:{dark:"macGreen",light:"macGreen"},syntaxNumber:{dark:"macPeach",light:"macPeach"},syntaxType:{dark:"macYellow",light:"macYellow"},syntaxOperator:{dark:"macSky",light:"macSky"},syntaxPunctuation:{dark:"macText",light:"macText"}}};var charizard_default={$schema:"https://opencode.ai/theme.json",defs:{charizardBgDark:"#2B160E",charizardPanelDark:"#371C12",charizardElemDark:"#422216",charizardTextDark:"#FFF0D4",charizardMutedDark:"#7A3511",charizardPrimaryDark:"#FFD39A",charizardAccentDark:"#F29C38",charizardSecondaryDark:"#FFD39A",charizardBorderDark:"#C75B1D",charizardBorderSubtleDark:"#6C4724",charizardBgLight:"#F8F8F8",charizardPanelLight:"#EFEFEF",charizardElemLight:"#E4E4E4",charizardTextLight:"#1A1A1A",charizardMutedLight:"#5A5A5A",charizardPrimaryLight:"#E78200",charizardAccentLight:"#AE630B",charizardSecondaryLight:"#E78200",charizardBorderLight:"#D0D0D0",charizardBorderSubtleLight:"#E0E0E0",charizardOkDark:"#4caf50",charizardErrorDark:"#ef5350",charizardWarnDark:"#ffa726",charizardOkLight:"#4caf50",charizardErrorLight:"#ef5350",charizardWarnLight:"#A56200"},theme:{primary:{dark:"charizardPrimaryDark",light:"charizardPrimaryLight"},secondary:{dark:"charizardSecondaryDark",light:"charizardSecondaryLight"},accent:{dark:"charizardAccentDark",light:"charizardAccentLight"},error:{dark:"charizardErrorDark",light:"charizardErrorLight"},warning:{dark:"charizardWarnDark",light:"charizardWarnLight"},success:{dark:"charizardOkDark",light:"charizardOkLight"},info:{dark:"charizardAccentDark",light:"charizardAccentLight"},text:{dark:"charizardTextDark",light:"charizardTextLight"},textMuted:{dark:"charizardMutedDark",light:"charizardMutedLight"},background:{dark:"charizardBgDark",light:"charizardBgLight"},backgroundPanel:{dark:"charizardPanelDark",light:"charizardPanelLight"},backgroundElement:{dark:"charizardElemDark",light:"charizardElemLight"},border:{dark:"charizardBorderDark",light:"charizardBorderLight"},borderActive:{dark:"charizardAccentDark",light:"charizardAccentLight"},borderSubtle:{dark:"charizardBorderSubtleDark",light:"charizardBorderSubtleLight"},diffAdded:{dark:"charizardOkDark",light:"charizardOkLight"},diffRemoved:{dark:"charizardErrorDark",light:"charizardErrorLight"},diffContext:{dark:"charizardMutedDark",light:"charizardMutedLight"},diffHunkHeader:{dark:"charizardMutedDark",light:"charizardMutedLight"},diffHighlightAdded:{dark:"charizardOkDark",light:"charizardOkLight"},diffHighlightRemoved:{dark:"charizardErrorDark",light:"charizardErrorLight"},diffAddedBg:{dark:"#31321A",light:"#DEEDDF"},diffRemovedBg:{dark:"#4E211A",light:"#F7DFDF"},diffContextBg:{dark:"charizardPanelDark",light:"charizardPanelLight"},diffLineNumber:{dark:"charizardMutedDark",light:"charizardMutedLight"},diffAddedLineNumberBg:{dark:"#2E2515",light:"#EAF2EB"},diffRemovedLineNumberBg:{dark:"#3F1C15",light:"#F7EBEB"},markdownText:{dark:"charizardTextDark",light:"charizardTextLight"},markdownHeading:{dark:"charizardPrimaryDark",light:"charizardPrimaryLight"},markdownLink:{dark:"charizardAccentDark",light:"charizardAccentLight"},markdownLinkText:{dark:"charizardSecondaryDark",light:"charizardSecondaryLight"},markdownCode:{dark:"charizardSecondaryDark",light:"charizardSecondaryLight"},markdownBlockQuote:{dark:"charizardMutedDark",light:"charizardMutedLight"},markdownEmph:{dark:"charizardAccentDark",light:"charizardAccentLight"},markdownStrong:{dark:"charizardPrimaryDark",light:"charizardPrimaryLight"},markdownHorizontalRule:{dark:"charizardBorderDark",light:"charizardBorderLight"},markdownListItem:{dark:"charizardTextDark",light:"charizardTextLight"},markdownListEnumeration:{dark:"charizardAccentDark",light:"charizardAccentLight"},markdownImage:{dark:"charizardAccentDark",light:"charizardAccentLight"},markdownImageText:{dark:"charizardMutedDark",light:"charizardMutedLight"},markdownCodeBlock:{dark:"charizardTextDark",light:"charizardTextLight"},syntaxComment:{dark:"charizardMutedDark",light:"charizardMutedLight"},syntaxKeyword:{dark:"charizardAccentDark",light:"charizardAccentLight"},syntaxFunction:{dark:"charizardPrimaryDark",light:"charizardPrimaryLight"},syntaxVariable:{dark:"charizardTextDark",light:"charizardTextLight"},syntaxString:{dark:"charizardOkDark",light:"charizardOkLight"},syntaxNumber:{dark:"charizardAccentDark",light:"charizardAccentLight"},syntaxType:{dark:"charizardSecondaryDark",light:"charizardSecondaryLight"},syntaxOperator:{dark:"charizardSecondaryDark",light:"charizardSecondaryLight"},syntaxPunctuation:{dark:"charizardTextDark",light:"charizardTextLight"}}};var cobalt2_default={$schema:"https://opencode.ai/theme.json",defs:{background:"#193549",backgroundAlt:"#122738",backgroundPanel:"#1f4662",foreground:"#ffffff",foregroundMuted:"#adb7c9",yellow:"#ffc600",yellowBright:"#ffe14c",orange:"#ff9d00",orangeBright:"#ffb454",mint:"#2affdf",mintBright:"#7efff5",blue:"#0088ff",blueBright:"#5cb7ff",pink:"#ff628c",pinkBright:"#ff86a5",green:"#9eff80",greenBright:"#b9ff9f",purple:"#9a5feb",purpleBright:"#b88cfd",red:"#ff0088",redBright:"#ff5fb3"},theme:{primary:{dark:"blue",light:"#0066cc"},secondary:{dark:"purple",light:"#7c4dff"},accent:{dark:"mint",light:"#00acc1"},error:{dark:"red",light:"#e91e63"},warning:{dark:"yellow",light:"#ff9800"},success:{dark:"green",light:"#4caf50"},info:{dark:"orange",light:"#ff5722"},text:{dark:"foreground",light:"#193549"},textMuted:{dark:"foregroundMuted",light:"#5c6b7d"},background:{dark:"#193549",light:"#ffffff"},backgroundPanel:{dark:"#122738",light:"#f5f7fa"},backgroundElement:{dark:"#1f4662",light:"#e8ecf1"},border:{dark:"#1f4662",light:"#d3dae3"},borderActive:{dark:"blue",light:"#0066cc"},borderSubtle:{dark:"#0e1e2e",light:"#e8ecf1"},diffAdded:{dark:"green",light:"#4caf50"},diffRemoved:{dark:"red",light:"#e91e63"},diffContext:{dark:"foregroundMuted",light:"#5c6b7d"},diffHunkHeader:{dark:"mint",light:"#00acc1"},diffHighlightAdded:{dark:"greenBright",light:"#4caf50"},diffHighlightRemoved:{dark:"redBright",light:"#e91e63"},diffAddedBg:{dark:"#1a3a2a",light:"#e8f5e9"},diffRemovedBg:{dark:"#3a1a2a",light:"#ffebee"},diffContextBg:{dark:"#122738",light:"#f5f7fa"},diffLineNumber:{dark:"#2d5a7b",light:"#b0bec5"},diffAddedLineNumberBg:{dark:"#1a3a2a",light:"#e8f5e9"},diffRemovedLineNumberBg:{dark:"#3a1a2a",light:"#ffebee"},markdownText:{dark:"foreground",light:"#193549"},markdownHeading:{dark:"yellow",light:"#ff9800"},markdownLink:{dark:"blue",light:"#0066cc"},markdownLinkText:{dark:"mint",light:"#00acc1"},markdownCode:{dark:"green",light:"#4caf50"},markdownBlockQuote:{dark:"foregroundMuted",light:"#5c6b7d"},markdownEmph:{dark:"orange",light:"#ff5722"},markdownStrong:{dark:"pink",light:"#e91e63"},markdownHorizontalRule:{dark:"#2d5a7b",light:"#d3dae3"},markdownListItem:{dark:"blue",light:"#0066cc"},markdownListEnumeration:{dark:"mint",light:"#00acc1"},markdownImage:{dark:"blue",light:"#0066cc"},markdownImageText:{dark:"mint",light:"#00acc1"},markdownCodeBlock:{dark:"foreground",light:"#193549"},syntaxComment:{dark:"#0088ff",light:"#5c6b7d"},syntaxKeyword:{dark:"orange",light:"#ff5722"},syntaxFunction:{dark:"yellow",light:"#ff9800"},syntaxVariable:{dark:"foreground",light:"#193549"},syntaxString:{dark:"green",light:"#4caf50"},syntaxNumber:{dark:"pink",light:"#e91e63"},syntaxType:{dark:"mint",light:"#00acc1"},syntaxOperator:{dark:"orange",light:"#ff5722"},syntaxPunctuation:{dark:"foreground",light:"#193549"}}};var cursor_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#181818",darkPanel:"#141414",darkElement:"#262626",darkFg:"#e4e4e4",darkMuted:"#e4e4e45e",darkBorder:"#e4e4e413",darkBorderActive:"#e4e4e426",darkCyan:"#88c0d0",darkBlue:"#81a1c1",darkGreen:"#3fa266",darkGreenBright:"#70b489",darkRed:"#e34671",darkRedBright:"#fc6b83",darkYellow:"#f1b467",darkOrange:"#d2943e",darkPink:"#E394DC",darkPurple:"#AAA0FA",darkTeal:"#82D2CE",darkSyntaxYellow:"#F8C762",darkSyntaxOrange:"#EFB080",darkSyntaxGreen:"#A8CC7C",darkSyntaxBlue:"#87C3FF",lightBg:"#fcfcfc",lightPanel:"#f3f3f3",lightElement:"#ededed",lightFg:"#141414",lightMuted:"#141414ad",lightBorder:"#14141413",lightBorderActive:"#14141426",lightTeal:"#6f9ba6",lightBlue:"#3c7cab",lightBlueDark:"#206595",lightGreen:"#1f8a65",lightGreenBright:"#55a583",lightRed:"#cf2d56",lightRedBright:"#e75e78",lightOrange:"#db704b",lightYellow:"#c08532",lightPurple:"#9e94d5",lightPurpleDark:"#6049b3",lightPink:"#b8448b",lightMagenta:"#b3003f"},theme:{primary:{dark:"darkCyan",light:"lightTeal"},secondary:{dark:"darkBlue",light:"lightBlue"},accent:{dark:"darkCyan",light:"lightTeal"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkBlue",light:"lightBlue"},text:{dark:"darkFg",light:"lightFg"},textMuted:{dark:"darkMuted",light:"lightMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkPanel",light:"lightPanel"},backgroundElement:{dark:"darkElement",light:"lightElement"},border:{dark:"darkBorder",light:"lightBorder"},borderActive:{dark:"darkCyan",light:"lightTeal"},borderSubtle:{dark:"#0f0f0f",light:"#e0e0e0"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkMuted",light:"lightMuted"},diffHunkHeader:{dark:"darkMuted",light:"lightMuted"},diffHighlightAdded:{dark:"darkGreenBright",light:"lightGreenBright"},diffHighlightRemoved:{dark:"darkRedBright",light:"lightRedBright"},diffAddedBg:{dark:"#3fa26633",light:"#1f8a651f"},diffRemovedBg:{dark:"#b8004933",light:"#cf2d5614"},diffContextBg:{dark:"darkPanel",light:"lightPanel"},diffLineNumber:{dark:"#e4e4e442",light:"#1414147a"},diffAddedLineNumberBg:{dark:"#3fa26633",light:"#1f8a651f"},diffRemovedLineNumberBg:{dark:"#b8004933",light:"#cf2d5614"},markdownText:{dark:"darkFg",light:"lightFg"},markdownHeading:{dark:"darkPurple",light:"lightBlueDark"},markdownLink:{dark:"darkTeal",light:"lightBlueDark"},markdownLinkText:{dark:"darkBlue",light:"lightMuted"},markdownCode:{dark:"darkPink",light:"lightGreen"},markdownBlockQuote:{dark:"darkMuted",light:"lightMuted"},markdownEmph:{dark:"darkTeal",light:"lightFg"},markdownStrong:{dark:"darkSyntaxYellow",light:"lightFg"},markdownHorizontalRule:{dark:"darkMuted",light:"lightMuted"},markdownListItem:{dark:"darkFg",light:"lightFg"},markdownListEnumeration:{dark:"darkCyan",light:"lightMuted"},markdownImage:{dark:"darkCyan",light:"lightBlueDark"},markdownImageText:{dark:"darkBlue",light:"lightMuted"},markdownCodeBlock:{dark:"darkFg",light:"lightFg"},syntaxComment:{dark:"darkMuted",light:"lightMuted"},syntaxKeyword:{dark:"darkTeal",light:"lightMagenta"},syntaxFunction:{dark:"darkSyntaxOrange",light:"lightOrange"},syntaxVariable:{dark:"darkFg",light:"lightFg"},syntaxString:{dark:"darkPink",light:"lightPurple"},syntaxNumber:{dark:"darkSyntaxYellow",light:"lightPink"},syntaxType:{dark:"darkSyntaxOrange",light:"lightBlueDark"},syntaxOperator:{dark:"darkFg",light:"lightFg"},syntaxPunctuation:{dark:"darkFg",light:"lightFg"}}};var daylight_default={$schema:"https://opencode.ai/theme.json",defs:{daylightBgDark:"#101014",daylightPanelDark:"#18181F",daylightElemDark:"#1F1F28",daylightTextDark:"#E6E6E6",daylightMutedDark:"#9A9A9A",daylightPrimaryDark:"#233662",daylightAccentDark:"#597FE9",daylightSecondaryDark:"#18BAAD",daylightBorderDark:"#3C74ED",daylightBorderSubtleDark:"#4F5B6D",daylightBgLight:"#E5EDF8",daylightPanelLight:"#DCE4EE",daylightElemLight:"#D3DAE4",daylightTextLight:"#111827",daylightMutedLight:"#475569",daylightPrimaryLight:"#0F172A",daylightAccentLight:"#1D4ED8",daylightSecondaryLight:"#0F766E",daylightBorderLight:"#2563EB",daylightBorderSubtleLight:"#64748B",daylightOkDark:"#15803D",daylightErrorDark:"#B91C1C",daylightWarnDark:"#B45309",daylightOkLight:"#15803D",daylightErrorLight:"#B91C1C",daylightWarnLight:"#B45309"},theme:{primary:{dark:"daylightPrimaryDark",light:"daylightPrimaryLight"},secondary:{dark:"daylightSecondaryDark",light:"daylightSecondaryLight"},accent:{dark:"daylightAccentDark",light:"daylightAccentLight"},error:{dark:"daylightErrorDark",light:"daylightErrorLight"},warning:{dark:"daylightWarnDark",light:"daylightWarnLight"},success:{dark:"daylightOkDark",light:"daylightOkLight"},info:{dark:"daylightAccentDark",light:"daylightAccentLight"},text:{dark:"daylightTextDark",light:"daylightTextLight"},textMuted:{dark:"daylightMutedDark",light:"daylightMutedLight"},background:{dark:"daylightBgDark",light:"daylightBgLight"},backgroundPanel:{dark:"daylightPanelDark",light:"daylightPanelLight"},backgroundElement:{dark:"daylightElemDark",light:"daylightElemLight"},border:{dark:"daylightBorderDark",light:"daylightBorderLight"},borderActive:{dark:"daylightAccentDark",light:"daylightAccentLight"},borderSubtle:{dark:"daylightBorderSubtleDark",light:"daylightBorderSubtleLight"},diffAdded:{dark:"daylightOkDark",light:"daylightOkLight"},diffRemoved:{dark:"daylightErrorDark",light:"daylightErrorLight"},diffContext:{dark:"daylightMutedDark",light:"daylightMutedLight"},diffHunkHeader:{dark:"daylightMutedDark",light:"daylightMutedLight"},diffHighlightAdded:{dark:"daylightOkDark",light:"daylightOkLight"},diffHighlightRemoved:{dark:"daylightErrorDark",light:"daylightErrorLight"},diffAddedBg:{dark:"#11241B",light:"#C6DDDC"},diffRemovedBg:{dark:"#2E1215",light:"#DECED7"},diffContextBg:{dark:"daylightPanelDark",light:"daylightPanelLight"},diffLineNumber:{dark:"daylightMutedDark",light:"daylightMutedLight"},diffAddedLineNumberBg:{dark:"#101B18",light:"#D4E4E9"},diffRemovedLineNumberBg:{dark:"#211115",light:"#E1DCE6"},markdownText:{dark:"daylightTextDark",light:"daylightTextLight"},markdownHeading:{dark:"daylightPrimaryDark",light:"daylightPrimaryLight"},markdownLink:{dark:"daylightAccentDark",light:"daylightAccentLight"},markdownLinkText:{dark:"daylightSecondaryDark",light:"daylightSecondaryLight"},markdownCode:{dark:"daylightSecondaryDark",light:"daylightSecondaryLight"},markdownBlockQuote:{dark:"daylightMutedDark",light:"daylightMutedLight"},markdownEmph:{dark:"daylightAccentDark",light:"daylightAccentLight"},markdownStrong:{dark:"daylightPrimaryDark",light:"daylightPrimaryLight"},markdownHorizontalRule:{dark:"daylightBorderDark",light:"daylightBorderLight"},markdownListItem:{dark:"daylightTextDark",light:"daylightTextLight"},markdownListEnumeration:{dark:"daylightAccentDark",light:"daylightAccentLight"},markdownImage:{dark:"daylightAccentDark",light:"daylightAccentLight"},markdownImageText:{dark:"daylightMutedDark",light:"daylightMutedLight"},markdownCodeBlock:{dark:"daylightTextDark",light:"daylightTextLight"},syntaxComment:{dark:"daylightMutedDark",light:"daylightMutedLight"},syntaxKeyword:{dark:"daylightAccentDark",light:"daylightAccentLight"},syntaxFunction:{dark:"daylightPrimaryDark",light:"daylightPrimaryLight"},syntaxVariable:{dark:"daylightTextDark",light:"daylightTextLight"},syntaxString:{dark:"daylightOkDark",light:"daylightOkLight"},syntaxNumber:{dark:"daylightAccentDark",light:"daylightAccentLight"},syntaxType:{dark:"daylightSecondaryDark",light:"daylightSecondaryLight"},syntaxOperator:{dark:"daylightSecondaryDark",light:"daylightSecondaryLight"},syntaxPunctuation:{dark:"daylightTextDark",light:"daylightTextLight"}}};var default_default={$schema:"https://opencode.ai/theme.json",defs:{defaultBgDark:"#1a1a2e",defaultPanelDark:"#202038",defaultElemDark:"#252542",defaultTextDark:"#FFF8DC",defaultMutedDark:"#B8860B",defaultPrimaryDark:"#FFD700",defaultAccentDark:"#FFBF00",defaultSecondaryDark:"#DAA520",defaultBorderDark:"#CD7F32",defaultBorderSubtleDark:"#8B8682",defaultBgLight:"#F8F8F8",defaultPanelLight:"#EFEFEF",defaultElemLight:"#E4E4E4",defaultTextLight:"#1A1A1A",defaultMutedLight:"#5A5A5A",defaultPrimaryLight:"#4D4000",defaultAccentLight:"#4D3900",defaultSecondaryLight:"#785B12",defaultBorderLight:"#D0D0D0",defaultBorderSubtleLight:"#E0E0E0",defaultOkDark:"#4caf50",defaultErrorDark:"#ef5350",defaultWarnDark:"#ffa726",defaultOkLight:"#4caf50",defaultErrorLight:"#ef5350",defaultWarnLight:"#A56200"},theme:{primary:{dark:"defaultPrimaryDark",light:"defaultPrimaryLight"},secondary:{dark:"defaultSecondaryDark",light:"defaultSecondaryLight"},accent:{dark:"defaultAccentDark",light:"defaultAccentLight"},error:{dark:"defaultErrorDark",light:"defaultErrorLight"},warning:{dark:"defaultWarnDark",light:"defaultWarnLight"},success:{dark:"defaultOkDark",light:"defaultOkLight"},info:{dark:"defaultAccentDark",light:"defaultAccentLight"},text:{dark:"defaultTextDark",light:"defaultTextLight"},textMuted:{dark:"defaultMutedDark",light:"defaultMutedLight"},background:{dark:"defaultBgDark",light:"defaultBgLight"},backgroundPanel:{dark:"defaultPanelDark",light:"defaultPanelLight"},backgroundElement:{dark:"defaultElemDark",light:"defaultElemLight"},border:{dark:"defaultBorderDark",light:"defaultBorderLight"},borderActive:{dark:"defaultAccentDark",light:"defaultAccentLight"},borderSubtle:{dark:"defaultBorderSubtleDark",light:"defaultBorderSubtleLight"},diffAdded:{dark:"defaultOkDark",light:"defaultOkLight"},diffRemoved:{dark:"defaultErrorDark",light:"defaultErrorLight"},diffContext:{dark:"defaultMutedDark",light:"defaultMutedLight"},diffHunkHeader:{dark:"defaultMutedDark",light:"defaultMutedLight"},diffHighlightAdded:{dark:"defaultOkDark",light:"defaultOkLight"},diffHighlightRemoved:{dark:"defaultErrorDark",light:"defaultErrorLight"},diffAddedBg:{dark:"#233534",light:"#DEEDDF"},diffRemovedBg:{dark:"#402434",light:"#F7DFDF"},diffContextBg:{dark:"defaultPanelDark",light:"defaultPanelLight"},diffLineNumber:{dark:"defaultMutedDark",light:"defaultMutedLight"},diffAddedLineNumberBg:{dark:"#1F2931",light:"#EAF2EB"},diffRemovedLineNumberBg:{dark:"#2F2031",light:"#F7EBEB"},markdownText:{dark:"defaultTextDark",light:"defaultTextLight"},markdownHeading:{dark:"defaultPrimaryDark",light:"defaultPrimaryLight"},markdownLink:{dark:"defaultAccentDark",light:"defaultAccentLight"},markdownLinkText:{dark:"defaultSecondaryDark",light:"defaultSecondaryLight"},markdownCode:{dark:"defaultSecondaryDark",light:"defaultSecondaryLight"},markdownBlockQuote:{dark:"defaultMutedDark",light:"defaultMutedLight"},markdownEmph:{dark:"defaultAccentDark",light:"defaultAccentLight"},markdownStrong:{dark:"defaultPrimaryDark",light:"defaultPrimaryLight"},markdownHorizontalRule:{dark:"defaultBorderDark",light:"defaultBorderLight"},markdownListItem:{dark:"defaultTextDark",light:"defaultTextLight"},markdownListEnumeration:{dark:"defaultAccentDark",light:"defaultAccentLight"},markdownImage:{dark:"defaultAccentDark",light:"defaultAccentLight"},markdownImageText:{dark:"defaultMutedDark",light:"defaultMutedLight"},markdownCodeBlock:{dark:"defaultTextDark",light:"defaultTextLight"},syntaxComment:{dark:"defaultMutedDark",light:"defaultMutedLight"},syntaxKeyword:{dark:"defaultAccentDark",light:"defaultAccentLight"},syntaxFunction:{dark:"defaultPrimaryDark",light:"defaultPrimaryLight"},syntaxVariable:{dark:"defaultTextDark",light:"defaultTextLight"},syntaxString:{dark:"defaultOkDark",light:"defaultOkLight"},syntaxNumber:{dark:"defaultAccentDark",light:"defaultAccentLight"},syntaxType:{dark:"defaultSecondaryDark",light:"defaultSecondaryLight"},syntaxOperator:{dark:"defaultSecondaryDark",light:"defaultSecondaryLight"},syntaxPunctuation:{dark:"defaultTextDark",light:"defaultTextLight"}}};var dracula_default={$schema:"https://opencode.ai/theme.json",defs:{background:"#282a36",currentLine:"#44475a",selection:"#44475a",foreground:"#f8f8f2",comment:"#6272a4",cyan:"#8be9fd",green:"#50fa7b",orange:"#ffb86c",pink:"#ff79c6",purple:"#bd93f9",red:"#ff5555",yellow:"#f1fa8c"},theme:{primary:{dark:"purple",light:"purple"},secondary:{dark:"pink",light:"pink"},accent:{dark:"cyan",light:"cyan"},error:{dark:"red",light:"red"},warning:{dark:"yellow",light:"yellow"},success:{dark:"green",light:"green"},info:{dark:"orange",light:"orange"},text:{dark:"foreground",light:"#282a36"},textMuted:{dark:"comment",light:"#6272a4"},background:{dark:"#282a36",light:"#f8f8f2"},backgroundPanel:{dark:"#21222c",light:"#e8e8e2"},backgroundElement:{dark:"currentLine",light:"#d8d8d2"},border:{dark:"currentLine",light:"#c8c8c2"},borderActive:{dark:"purple",light:"purple"},borderSubtle:{dark:"#191a21",light:"#e0e0e0"},diffAdded:{dark:"green",light:"green"},diffRemoved:{dark:"red",light:"red"},diffContext:{dark:"comment",light:"#6272a4"},diffHunkHeader:{dark:"comment",light:"#6272a4"},diffHighlightAdded:{dark:"green",light:"green"},diffHighlightRemoved:{dark:"red",light:"red"},diffAddedBg:{dark:"#1a3a1a",light:"#e0ffe0"},diffRemovedBg:{dark:"#3a1a1a",light:"#ffe0e0"},diffContextBg:{dark:"#21222c",light:"#e8e8e2"},diffLineNumber:{dark:"currentLine",light:"#c8c8c2"},diffAddedLineNumberBg:{dark:"#1a3a1a",light:"#e0ffe0"},diffRemovedLineNumberBg:{dark:"#3a1a1a",light:"#ffe0e0"},markdownText:{dark:"foreground",light:"#282a36"},markdownHeading:{dark:"purple",light:"purple"},markdownLink:{dark:"cyan",light:"cyan"},markdownLinkText:{dark:"pink",light:"pink"},markdownCode:{dark:"green",light:"green"},markdownBlockQuote:{dark:"comment",light:"#6272a4"},markdownEmph:{dark:"yellow",light:"yellow"},markdownStrong:{dark:"orange",light:"orange"},markdownHorizontalRule:{dark:"comment",light:"#6272a4"},markdownListItem:{dark:"purple",light:"purple"},markdownListEnumeration:{dark:"cyan",light:"cyan"},markdownImage:{dark:"cyan",light:"cyan"},markdownImageText:{dark:"pink",light:"pink"},markdownCodeBlock:{dark:"foreground",light:"#282a36"},syntaxComment:{dark:"comment",light:"#6272a4"},syntaxKeyword:{dark:"pink",light:"pink"},syntaxFunction:{dark:"green",light:"green"},syntaxVariable:{dark:"foreground",light:"#282a36"},syntaxString:{dark:"yellow",light:"yellow"},syntaxNumber:{dark:"purple",light:"purple"},syntaxType:{dark:"cyan",light:"cyan"},syntaxOperator:{dark:"pink",light:"pink"},syntaxPunctuation:{dark:"foreground",light:"#282a36"}}};var everforest_default={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#2d353b",darkStep2:"#333c43",darkStep3:"#343f44",darkStep4:"#3d484d",darkStep5:"#475258",darkStep6:"#7a8478",darkStep7:"#859289",darkStep8:"#9da9a0",darkStep9:"#a7c080",darkStep10:"#83c092",darkStep11:"#7a8478",darkStep12:"#d3c6aa",darkRed:"#e67e80",darkOrange:"#e69875",darkGreen:"#a7c080",darkCyan:"#83c092",darkYellow:"#dbbc7f",lightStep1:"#fdf6e3",lightStep2:"#efebd4",lightStep3:"#f4f0d9",lightStep4:"#efebd4",lightStep5:"#e6e2cc",lightStep6:"#a6b0a0",lightStep7:"#939f91",lightStep8:"#829181",lightStep9:"#8da101",lightStep10:"#35a77c",lightStep11:"#a6b0a0",lightStep12:"#5c6a72",lightRed:"#f85552",lightOrange:"#f57d26",lightGreen:"#8da101",lightCyan:"#35a77c",lightYellow:"#dfa000"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"#7fbbb3",light:"#3a94c5"},accent:{dark:"#d699b6",light:"#df69ba"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep3",light:"lightStep3"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"#d699b6",light:"#df69ba"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"#d699b6",light:"#df69ba"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}};var flexoki_default={$schema:"https://opencode.ai/theme.json",defs:{black:"#100F0F",base950:"#1C1B1A",base900:"#282726",base850:"#343331",base800:"#403E3C",base700:"#575653",base600:"#6F6E69",base500:"#878580",base300:"#B7B5AC",base200:"#CECDC3",base150:"#DAD8CE",base100:"#E6E4D9",base50:"#F2F0E5",paper:"#FFFCF0",red400:"#D14D41",red600:"#AF3029",orange400:"#DA702C",orange600:"#BC5215",yellow400:"#D0A215",yellow600:"#AD8301",green400:"#879A39",green600:"#66800B",cyan400:"#3AA99F",cyan600:"#24837B",blue400:"#4385BE",blue600:"#205EA6",purple400:"#8B7EC8",purple600:"#5E409D",magenta400:"#CE5D97",magenta600:"#A02F6F"},theme:{primary:{dark:"orange400",light:"blue600"},secondary:{dark:"blue400",light:"purple600"},accent:{dark:"purple400",light:"orange600"},error:{dark:"red400",light:"red600"},warning:{dark:"orange400",light:"orange600"},success:{dark:"green400",light:"green600"},info:{dark:"cyan400",light:"cyan600"},text:{dark:"base200",light:"black"},textMuted:{dark:"base600",light:"base600"},background:{dark:"black",light:"paper"},backgroundPanel:{dark:"base950",light:"base50"},backgroundElement:{dark:"base900",light:"base100"},border:{dark:"base700",light:"base300"},borderActive:{dark:"base600",light:"base500"},borderSubtle:{dark:"base800",light:"base200"},diffAdded:{dark:"green400",light:"green600"},diffRemoved:{dark:"red400",light:"red600"},diffContext:{dark:"base600",light:"base600"},diffHunkHeader:{dark:"blue400",light:"blue600"},diffHighlightAdded:{dark:"green400",light:"green600"},diffHighlightRemoved:{dark:"red400",light:"red600"},diffAddedBg:{dark:"#1A2D1A",light:"#D5E5D5"},diffRemovedBg:{dark:"#2D1A1A",light:"#F7D8DB"},diffContextBg:{dark:"base950",light:"base50"},diffLineNumber:{dark:"base600",light:"base600"},diffAddedLineNumberBg:{dark:"#152515",light:"#C5D5C5"},diffRemovedLineNumberBg:{dark:"#251515",light:"#E7C8CB"},markdownText:{dark:"base200",light:"black"},markdownHeading:{dark:"purple400",light:"purple600"},markdownLink:{dark:"blue400",light:"blue600"},markdownLinkText:{dark:"cyan400",light:"cyan600"},markdownCode:{dark:"cyan400",light:"cyan600"},markdownBlockQuote:{dark:"yellow400",light:"yellow600"},markdownEmph:{dark:"yellow400",light:"yellow600"},markdownStrong:{dark:"orange400",light:"orange600"},markdownHorizontalRule:{dark:"base600",light:"base600"},markdownListItem:{dark:"orange400",light:"orange600"},markdownListEnumeration:{dark:"cyan400",light:"cyan600"},markdownImage:{dark:"magenta400",light:"magenta600"},markdownImageText:{dark:"cyan400",light:"cyan600"},markdownCodeBlock:{dark:"base200",light:"black"},syntaxComment:{dark:"base600",light:"base600"},syntaxKeyword:{dark:"green400",light:"green600"},syntaxFunction:{dark:"orange400",light:"orange600"},syntaxVariable:{dark:"blue400",light:"blue600"},syntaxString:{dark:"cyan400",light:"cyan600"},syntaxNumber:{dark:"purple400",light:"purple600"},syntaxType:{dark:"yellow400",light:"yellow600"},syntaxOperator:{dark:"base300",light:"base600"},syntaxPunctuation:{dark:"base300",light:"base600"}}};var github_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#0d1117",darkBgAlt:"#010409",darkBgPanel:"#161b22",darkFg:"#c9d1d9",darkFgMuted:"#8b949e",darkBlue:"#58a6ff",darkGreen:"#3fb950",darkRed:"#f85149",darkOrange:"#d29922",darkPurple:"#bc8cff",darkPink:"#ff7b72",darkYellow:"#e3b341",darkCyan:"#39c5cf",lightBg:"#ffffff",lightBgAlt:"#f6f8fa",lightBgPanel:"#f0f3f6",lightFg:"#24292f",lightFgMuted:"#57606a",lightBlue:"#0969da",lightGreen:"#1a7f37",lightRed:"#cf222e",lightOrange:"#bc4c00",lightPurple:"#8250df",lightPink:"#bf3989",lightYellow:"#9a6700",lightCyan:"#1b7c83"},theme:{primary:{dark:"darkBlue",light:"lightBlue"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkCyan",light:"lightCyan"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkOrange",light:"lightOrange"},text:{dark:"darkFg",light:"lightFg"},textMuted:{dark:"darkFgMuted",light:"lightFgMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgAlt",light:"lightBgAlt"},backgroundElement:{dark:"darkBgPanel",light:"lightBgPanel"},border:{dark:"#30363d",light:"#d0d7de"},borderActive:{dark:"darkBlue",light:"lightBlue"},borderSubtle:{dark:"#21262d",light:"#d8dee4"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkFgMuted",light:"lightFgMuted"},diffHunkHeader:{dark:"darkBlue",light:"lightBlue"},diffHighlightAdded:{dark:"#3fb950",light:"#1a7f37"},diffHighlightRemoved:{dark:"#f85149",light:"#cf222e"},diffAddedBg:{dark:"#033a16",light:"#dafbe1"},diffRemovedBg:{dark:"#67060c",light:"#ffebe9"},diffContextBg:{dark:"darkBgAlt",light:"lightBgAlt"},diffLineNumber:{dark:"#484f58",light:"#afb8c1"},diffAddedLineNumberBg:{dark:"#033a16",light:"#dafbe1"},diffRemovedLineNumberBg:{dark:"#67060c",light:"#ffebe9"},markdownText:{dark:"darkFg",light:"lightFg"},markdownHeading:{dark:"darkBlue",light:"lightBlue"},markdownLink:{dark:"darkBlue",light:"lightBlue"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkPink",light:"lightPink"},markdownBlockQuote:{dark:"darkFgMuted",light:"lightFgMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"#30363d",light:"#d0d7de"},markdownListItem:{dark:"darkBlue",light:"lightBlue"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkBlue",light:"lightBlue"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkFg",light:"lightFg"},syntaxComment:{dark:"darkFgMuted",light:"lightFgMuted"},syntaxKeyword:{dark:"darkPink",light:"lightRed"},syntaxFunction:{dark:"darkPurple",light:"lightPurple"},syntaxVariable:{dark:"darkOrange",light:"lightOrange"},syntaxString:{dark:"darkCyan",light:"lightBlue"},syntaxNumber:{dark:"darkBlue",light:"lightCyan"},syntaxType:{dark:"darkOrange",light:"lightOrange"},syntaxOperator:{dark:"darkPink",light:"lightRed"},syntaxPunctuation:{dark:"darkFg",light:"lightFg"}}};var gruvbox_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg0:"#282828",darkBg1:"#3c3836",darkBg2:"#504945",darkBg3:"#665c54",darkFg0:"#fbf1c7",darkFg1:"#ebdbb2",darkGray:"#928374",darkRed:"#cc241d",darkGreen:"#98971a",darkYellow:"#d79921",darkBlue:"#458588",darkPurple:"#b16286",darkAqua:"#689d6a",darkOrange:"#d65d0e",darkRedBright:"#fb4934",darkGreenBright:"#b8bb26",darkYellowBright:"#fabd2f",darkBlueBright:"#83a598",darkPurpleBright:"#d3869b",darkAquaBright:"#8ec07c",darkOrangeBright:"#fe8019",lightBg0:"#fbf1c7",lightBg1:"#ebdbb2",lightBg2:"#d5c4a1",lightBg3:"#bdae93",lightFg0:"#282828",lightFg1:"#3c3836",lightGray:"#7c6f64",lightRed:"#9d0006",lightGreen:"#79740e",lightYellow:"#b57614",lightBlue:"#076678",lightPurple:"#8f3f71",lightAqua:"#427b58",lightOrange:"#af3a03"},theme:{primary:{dark:"darkBlueBright",light:"lightBlue"},secondary:{dark:"darkPurpleBright",light:"lightPurple"},accent:{dark:"darkAquaBright",light:"lightAqua"},error:{dark:"darkRedBright",light:"lightRed"},warning:{dark:"darkOrangeBright",light:"lightOrange"},success:{dark:"darkGreenBright",light:"lightGreen"},info:{dark:"darkYellowBright",light:"lightYellow"},text:{dark:"darkFg1",light:"lightFg1"},textMuted:{dark:"darkGray",light:"lightGray"},background:{dark:"darkBg0",light:"lightBg0"},backgroundPanel:{dark:"darkBg1",light:"lightBg1"},backgroundElement:{dark:"darkBg2",light:"lightBg2"},border:{dark:"darkBg3",light:"lightBg3"},borderActive:{dark:"darkFg1",light:"lightFg1"},borderSubtle:{dark:"darkBg2",light:"lightBg2"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkGray",light:"lightGray"},diffHunkHeader:{dark:"darkAqua",light:"lightAqua"},diffHighlightAdded:{dark:"darkGreenBright",light:"lightGreen"},diffHighlightRemoved:{dark:"darkRedBright",light:"lightRed"},diffAddedBg:{dark:"#32302f",light:"#dcd8a4"},diffRemovedBg:{dark:"#322929",light:"#e2c7c3"},diffContextBg:{dark:"darkBg1",light:"lightBg1"},diffLineNumber:{dark:"darkBg3",light:"lightBg3"},diffAddedLineNumberBg:{dark:"#2a2827",light:"#cec99e"},diffRemovedLineNumberBg:{dark:"#2a2222",light:"#d3bdb9"},markdownText:{dark:"darkFg1",light:"lightFg1"},markdownHeading:{dark:"darkBlueBright",light:"lightBlue"},markdownLink:{dark:"darkAquaBright",light:"lightAqua"},markdownLinkText:{dark:"darkGreenBright",light:"lightGreen"},markdownCode:{dark:"darkYellowBright",light:"lightYellow"},markdownBlockQuote:{dark:"darkGray",light:"lightGray"},markdownEmph:{dark:"darkPurpleBright",light:"lightPurple"},markdownStrong:{dark:"darkOrangeBright",light:"lightOrange"},markdownHorizontalRule:{dark:"darkGray",light:"lightGray"},markdownListItem:{dark:"darkBlueBright",light:"lightBlue"},markdownListEnumeration:{dark:"darkAquaBright",light:"lightAqua"},markdownImage:{dark:"darkAquaBright",light:"lightAqua"},markdownImageText:{dark:"darkGreenBright",light:"lightGreen"},markdownCodeBlock:{dark:"darkFg1",light:"lightFg1"},syntaxComment:{dark:"darkGray",light:"lightGray"},syntaxKeyword:{dark:"darkRedBright",light:"lightRed"},syntaxFunction:{dark:"darkGreenBright",light:"lightGreen"},syntaxVariable:{dark:"darkBlueBright",light:"lightBlue"},syntaxString:{dark:"darkYellowBright",light:"lightYellow"},syntaxNumber:{dark:"darkPurpleBright",light:"lightPurple"},syntaxType:{dark:"darkAquaBright",light:"lightAqua"},syntaxOperator:{dark:"darkOrangeBright",light:"lightOrange"},syntaxPunctuation:{dark:"darkFg1",light:"lightFg1"}}};var kanagawa_default={$schema:"https://opencode.ai/theme.json",defs:{sumiInk0:"#1F1F28",sumiInk1:"#2A2A37",sumiInk2:"#363646",sumiInk3:"#54546D",fujiWhite:"#DCD7BA",oldWhite:"#C8C093",fujiGray:"#727169",oniViolet:"#957FB8",crystalBlue:"#7E9CD8",carpYellow:"#C38D9D",sakuraPink:"#D27E99",waveAqua:"#76946A",roninYellow:"#D7A657",dragonRed:"#E82424",lotusGreen:"#98BB6C",waveBlue:"#2D4F67",lightBg:"#F2E9DE",lightPaper:"#EAE4D7",lightText:"#54433A",lightGray:"#9E9389"},theme:{primary:{dark:"crystalBlue",light:"waveBlue"},secondary:{dark:"oniViolet",light:"oniViolet"},accent:{dark:"sakuraPink",light:"sakuraPink"},error:{dark:"dragonRed",light:"dragonRed"},warning:{dark:"roninYellow",light:"roninYellow"},success:{dark:"lotusGreen",light:"lotusGreen"},info:{dark:"waveAqua",light:"waveAqua"},text:{dark:"fujiWhite",light:"lightText"},textMuted:{dark:"fujiGray",light:"lightGray"},background:{dark:"sumiInk0",light:"lightBg"},backgroundPanel:{dark:"sumiInk1",light:"lightPaper"},backgroundElement:{dark:"sumiInk2",light:"#E3DCD2"},border:{dark:"sumiInk3",light:"#D4CBBF"},borderActive:{dark:"carpYellow",light:"carpYellow"},borderSubtle:{dark:"sumiInk2",light:"#DCD4C9"},diffAdded:{dark:"lotusGreen",light:"lotusGreen"},diffRemoved:{dark:"dragonRed",light:"dragonRed"},diffContext:{dark:"fujiGray",light:"lightGray"},diffHunkHeader:{dark:"waveBlue",light:"waveBlue"},diffHighlightAdded:{dark:"#A9D977",light:"#89AF5B"},diffHighlightRemoved:{dark:"#F24A4A",light:"#D61F1F"},diffAddedBg:{dark:"#252E25",light:"#EAF3E4"},diffRemovedBg:{dark:"#362020",light:"#FBE6E6"},diffContextBg:{dark:"sumiInk1",light:"lightPaper"},diffLineNumber:{dark:"sumiInk3",light:"#C7BEB4"},diffAddedLineNumberBg:{dark:"#202820",light:"#DDE8D6"},diffRemovedLineNumberBg:{dark:"#2D1C1C",light:"#F2DADA"},markdownText:{dark:"fujiWhite",light:"lightText"},markdownHeading:{dark:"oniViolet",light:"oniViolet"},markdownLink:{dark:"crystalBlue",light:"waveBlue"},markdownLinkText:{dark:"waveAqua",light:"waveAqua"},markdownCode:{dark:"lotusGreen",light:"lotusGreen"},markdownBlockQuote:{dark:"fujiGray",light:"lightGray"},markdownEmph:{dark:"carpYellow",light:"carpYellow"},markdownStrong:{dark:"roninYellow",light:"roninYellow"},markdownHorizontalRule:{dark:"fujiGray",light:"lightGray"},markdownListItem:{dark:"crystalBlue",light:"waveBlue"},markdownListEnumeration:{dark:"waveAqua",light:"waveAqua"},markdownImage:{dark:"crystalBlue",light:"waveBlue"},markdownImageText:{dark:"waveAqua",light:"waveAqua"},markdownCodeBlock:{dark:"fujiWhite",light:"lightText"},syntaxComment:{dark:"fujiGray",light:"lightGray"},syntaxKeyword:{dark:"oniViolet",light:"oniViolet"},syntaxFunction:{dark:"crystalBlue",light:"waveBlue"},syntaxVariable:{dark:"fujiWhite",light:"lightText"},syntaxString:{dark:"lotusGreen",light:"lotusGreen"},syntaxNumber:{dark:"roninYellow",light:"roninYellow"},syntaxType:{dark:"carpYellow",light:"carpYellow"},syntaxOperator:{dark:"sakuraPink",light:"sakuraPink"},syntaxPunctuation:{dark:"fujiWhite",light:"lightText"}}};var lucent_orng_default={$schema:"https://opencode.ai/theme.json",defs:{darkStep6:"#3c3c3c",darkStep11:"#808080",darkStep12:"#eeeeee",darkSecondary:"#EE7948",darkAccent:"#FFF7F1",darkRed:"#e06c75",darkOrange:"#EC5B2B",darkBlue:"#6ba1e6",darkCyan:"#56b6c2",darkYellow:"#e5c07b",darkPanelBg:"#2a1a1599",lightStep6:"#d4d4d4",lightStep11:"#8a8a8a",lightStep12:"#1a1a1a",lightSecondary:"#EE7948",lightAccent:"#c94d24",lightRed:"#d1383d",lightOrange:"#EC5B2B",lightBlue:"#0062d1",lightCyan:"#318795",lightYellow:"#b0851f",lightPanelBg:"#fff5f099"},theme:{primary:{dark:"darkOrange",light:"lightOrange"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkBlue",light:"lightBlue"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},selectedListItemText:{dark:"#0a0a0a",light:"#ffffff"},background:{dark:"transparent",light:"transparent"},backgroundPanel:{dark:"transparent",light:"transparent"},backgroundElement:{dark:"transparent",light:"transparent"},backgroundMenu:{dark:"darkPanelBg",light:"lightPanelBg"},border:{dark:"darkOrange",light:"lightOrange"},borderActive:{dark:"darkSecondary",light:"lightAccent"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"darkBlue",light:"lightBlue"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"darkBlue",light:"lightBlue"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"transparent",light:"transparent"},diffRemovedBg:{dark:"transparent",light:"transparent"},diffContextBg:{dark:"transparent",light:"transparent"},diffLineNumber:{dark:"#666666",light:"#999999"},diffAddedLineNumberBg:{dark:"transparent",light:"transparent"},diffRemovedLineNumberBg:{dark:"transparent",light:"transparent"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkOrange",light:"lightOrange"},markdownLink:{dark:"darkOrange",light:"lightOrange"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkBlue",light:"lightBlue"},markdownBlockQuote:{dark:"darkAccent",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkSecondary",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkOrange",light:"lightOrange"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkOrange",light:"lightOrange"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkOrange",light:"lightOrange"},syntaxFunction:{dark:"darkSecondary",light:"lightAccent"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkBlue",light:"lightBlue"},syntaxNumber:{dark:"darkAccent",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}};var material_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#263238",darkBgAlt:"#1e272c",darkBgPanel:"#37474f",darkFg:"#eeffff",darkFgMuted:"#546e7a",darkRed:"#f07178",darkPink:"#f78c6c",darkOrange:"#ffcb6b",darkYellow:"#ffcb6b",darkGreen:"#c3e88d",darkCyan:"#89ddff",darkBlue:"#82aaff",darkPurple:"#c792ea",darkViolet:"#bb80b3",lightBg:"#fafafa",lightBgAlt:"#f5f5f5",lightBgPanel:"#e7e7e8",lightFg:"#263238",lightFgMuted:"#90a4ae",lightRed:"#e53935",lightPink:"#ec407a",lightOrange:"#f4511e",lightYellow:"#ffb300",lightGreen:"#91b859",lightCyan:"#39adb5",lightBlue:"#6182b8",lightPurple:"#7c4dff",lightViolet:"#945eb8"},theme:{primary:{dark:"darkBlue",light:"lightBlue"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkCyan",light:"lightCyan"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkOrange",light:"lightOrange"},text:{dark:"darkFg",light:"lightFg"},textMuted:{dark:"darkFgMuted",light:"lightFgMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgAlt",light:"lightBgAlt"},backgroundElement:{dark:"darkBgPanel",light:"lightBgPanel"},border:{dark:"#37474f",light:"#e0e0e0"},borderActive:{dark:"darkBlue",light:"lightBlue"},borderSubtle:{dark:"#1e272c",light:"#eeeeee"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkFgMuted",light:"lightFgMuted"},diffHunkHeader:{dark:"darkCyan",light:"lightCyan"},diffHighlightAdded:{dark:"darkGreen",light:"lightGreen"},diffHighlightRemoved:{dark:"darkRed",light:"lightRed"},diffAddedBg:{dark:"#2e3c2b",light:"#e8f5e9"},diffRemovedBg:{dark:"#3c2b2b",light:"#ffebee"},diffContextBg:{dark:"darkBgAlt",light:"lightBgAlt"},diffLineNumber:{dark:"#37474f",light:"#cfd8dc"},diffAddedLineNumberBg:{dark:"#2e3c2b",light:"#e8f5e9"},diffRemovedLineNumberBg:{dark:"#3c2b2b",light:"#ffebee"},markdownText:{dark:"darkFg",light:"lightFg"},markdownHeading:{dark:"darkBlue",light:"lightBlue"},markdownLink:{dark:"darkCyan",light:"lightCyan"},markdownLinkText:{dark:"darkPurple",light:"lightPurple"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkFgMuted",light:"lightFgMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"#37474f",light:"#e0e0e0"},markdownListItem:{dark:"darkBlue",light:"lightBlue"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkCyan",light:"lightCyan"},markdownImageText:{dark:"darkPurple",light:"lightPurple"},markdownCodeBlock:{dark:"darkFg",light:"lightFg"},syntaxComment:{dark:"darkFgMuted",light:"lightFgMuted"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkFg",light:"lightFg"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkFg",light:"lightFg"}}};var matrix_default={$schema:"https://opencode.ai/theme.json",defs:{matrixInk0:"#0a0e0a",matrixInk1:"#0e130d",matrixInk2:"#141c12",matrixInk3:"#1e2a1b",rainGreen:"#2eff6a",rainGreenDim:"#1cc24b",rainGreenHi:"#62ff94",rainCyan:"#00efff",rainTeal:"#24f6d9",rainPurple:"#c770ff",rainOrange:"#ffa83d",alertRed:"#ff4b4b",alertYellow:"#e6ff57",alertBlue:"#30b3ff",rainGray:"#8ca391",lightBg:"#eef3ea",lightPaper:"#e4ebe1",lightInk1:"#dae1d7",lightText:"#203022",lightGray:"#748476"},theme:{primary:{dark:"rainGreen",light:"rainGreenDim"},secondary:{dark:"rainCyan",light:"rainTeal"},accent:{dark:"rainPurple",light:"rainPurple"},error:{dark:"alertRed",light:"alertRed"},warning:{dark:"alertYellow",light:"alertYellow"},success:{dark:"rainGreenHi",light:"rainGreenDim"},info:{dark:"alertBlue",light:"alertBlue"},text:{dark:"rainGreenHi",light:"lightText"},textMuted:{dark:"rainGray",light:"lightGray"},background:{dark:"matrixInk0",light:"lightBg"},backgroundPanel:{dark:"matrixInk1",light:"lightPaper"},backgroundElement:{dark:"matrixInk2",light:"lightInk1"},border:{dark:"matrixInk3",light:"lightGray"},borderActive:{dark:"rainGreen",light:"rainGreenDim"},borderSubtle:{dark:"matrixInk2",light:"lightInk1"},diffAdded:{dark:"rainGreenDim",light:"rainGreenDim"},diffRemoved:{dark:"alertRed",light:"alertRed"},diffContext:{dark:"rainGray",light:"lightGray"},diffHunkHeader:{dark:"alertBlue",light:"alertBlue"},diffHighlightAdded:{dark:"#77ffaf",light:"#5dac7e"},diffHighlightRemoved:{dark:"#ff7171",light:"#d53a3a"},diffAddedBg:{dark:"#132616",light:"#e0efde"},diffRemovedBg:{dark:"#261212",light:"#f9e5e5"},diffContextBg:{dark:"matrixInk1",light:"lightPaper"},diffLineNumber:{dark:"matrixInk3",light:"lightGray"},diffAddedLineNumberBg:{dark:"#0f1b11",light:"#d6e7d2"},diffRemovedLineNumberBg:{dark:"#1b1414",light:"#f2d2d2"},markdownText:{dark:"rainGreenHi",light:"lightText"},markdownHeading:{dark:"rainCyan",light:"rainTeal"},markdownLink:{dark:"alertBlue",light:"alertBlue"},markdownLinkText:{dark:"rainTeal",light:"rainTeal"},markdownCode:{dark:"rainGreenDim",light:"rainGreenDim"},markdownBlockQuote:{dark:"rainGray",light:"lightGray"},markdownEmph:{dark:"rainOrange",light:"rainOrange"},markdownStrong:{dark:"alertYellow",light:"alertYellow"},markdownHorizontalRule:{dark:"rainGray",light:"lightGray"},markdownListItem:{dark:"alertBlue",light:"alertBlue"},markdownListEnumeration:{dark:"rainTeal",light:"rainTeal"},markdownImage:{dark:"alertBlue",light:"alertBlue"},markdownImageText:{dark:"rainTeal",light:"rainTeal"},markdownCodeBlock:{dark:"rainGreenHi",light:"lightText"},syntaxComment:{dark:"rainGray",light:"lightGray"},syntaxKeyword:{dark:"rainPurple",light:"rainPurple"},syntaxFunction:{dark:"alertBlue",light:"alertBlue"},syntaxVariable:{dark:"rainGreenHi",light:"lightText"},syntaxString:{dark:"rainGreenDim",light:"rainGreenDim"},syntaxNumber:{dark:"rainOrange",light:"rainOrange"},syntaxType:{dark:"alertYellow",light:"alertYellow"},syntaxOperator:{dark:"rainTeal",light:"rainTeal"},syntaxPunctuation:{dark:"rainGreenHi",light:"lightText"}}};var mercury_default={$schema:"https://opencode.ai/theme.json",defs:{"purple-800":"#3442a6","purple-700":"#465bd1","purple-600":"#5266eb","purple-400":"#8da4f5","purple-300":"#a7b6f8","red-700":"#b0175f","red-600":"#d03275","red-400":"#fc92b4","green-700":"#036e43","green-600":"#188554","green-400":"#77c599","orange-700":"#a44200","orange-600":"#c45000","orange-400":"#fc9b6f","blue-600":"#007f95","blue-400":"#77becf","neutral-1000":"#10101a","neutral-950":"#171721","neutral-900":"#1e1e2a","neutral-800":"#272735","neutral-700":"#363644","neutral-600":"#535461","neutral-500":"#70707d","neutral-400":"#9d9da8","neutral-300":"#c3c3cc","neutral-200":"#dddde5","neutral-100":"#f4f5f9","neutral-050":"#fbfcfd","neutral-000":"#ffffff","neutral-150":"#ededf3","border-light":"#7073931a","border-light-subtle":"#7073930f","border-dark":"#b4b7c81f","border-dark-subtle":"#b4b7c814","diff-added-light":"#1885541a","diff-removed-light":"#d032751a","diff-added-dark":"#77c59933","diff-removed-dark":"#fc92b433"},theme:{primary:{light:"purple-600",dark:"purple-400"},secondary:{light:"purple-700",dark:"purple-300"},accent:{light:"purple-400",dark:"purple-400"},error:{light:"red-700",dark:"red-400"},warning:{light:"orange-700",dark:"orange-400"},success:{light:"green-700",dark:"green-400"},info:{light:"blue-600",dark:"blue-400"},text:{light:"neutral-700",dark:"neutral-200"},textMuted:{light:"neutral-500",dark:"neutral-400"},background:{light:"neutral-000",dark:"neutral-950"},backgroundPanel:{light:"neutral-050",dark:"neutral-1000"},backgroundElement:{light:"neutral-100",dark:"neutral-800"},border:{light:"border-light",dark:"border-dark"},borderActive:{light:"purple-600",dark:"purple-400"},borderSubtle:{light:"border-light-subtle",dark:"border-dark-subtle"},diffAdded:{light:"green-700",dark:"green-400"},diffRemoved:{light:"red-700",dark:"red-400"},diffContext:{light:"neutral-500",dark:"neutral-400"},diffHunkHeader:{light:"neutral-500",dark:"neutral-400"},diffHighlightAdded:{light:"green-700",dark:"green-400"},diffHighlightRemoved:{light:"red-700",dark:"red-400"},diffAddedBg:{light:"diff-added-light",dark:"diff-added-dark"},diffRemovedBg:{light:"diff-removed-light",dark:"diff-removed-dark"},diffContextBg:{light:"neutral-050",dark:"neutral-900"},diffLineNumber:{light:"neutral-600",dark:"neutral-300"},diffAddedLineNumberBg:{light:"diff-added-light",dark:"diff-added-dark"},diffRemovedLineNumberBg:{light:"diff-removed-light",dark:"diff-removed-dark"},markdownText:{light:"neutral-700",dark:"neutral-200"},markdownHeading:{light:"neutral-900",dark:"neutral-000"},markdownLink:{light:"purple-700",dark:"purple-400"},markdownLinkText:{light:"purple-600",dark:"purple-300"},markdownCode:{light:"green-700",dark:"green-400"},markdownBlockQuote:{light:"neutral-500",dark:"neutral-400"},markdownEmph:{light:"orange-700",dark:"orange-400"},markdownStrong:{light:"neutral-900",dark:"neutral-100"},markdownHorizontalRule:{light:"border-light",dark:"border-dark"},markdownListItem:{light:"neutral-900",dark:"neutral-000"},markdownListEnumeration:{light:"purple-600",dark:"purple-400"},markdownImage:{light:"purple-700",dark:"purple-400"},markdownImageText:{light:"purple-600",dark:"purple-300"},markdownCodeBlock:{light:"neutral-700",dark:"neutral-200"},syntaxComment:{light:"neutral-500",dark:"neutral-400"},syntaxKeyword:{light:"purple-700",dark:"purple-400"},syntaxFunction:{light:"purple-600",dark:"purple-400"},syntaxVariable:{light:"blue-600",dark:"blue-400"},syntaxString:{light:"green-700",dark:"green-400"},syntaxNumber:{light:"orange-700",dark:"orange-400"},syntaxType:{light:"blue-600",dark:"blue-400"},syntaxOperator:{light:"purple-700",dark:"purple-400"},syntaxPunctuation:{light:"neutral-700",dark:"neutral-200"}}};var mono_default={$schema:"https://opencode.ai/theme.json",defs:{monoBgDark:"#1F1F1F",monoPanelDark:"#272727",monoElemDark:"#2E2E2E",monoTextDark:"#c9d1d9",monoMutedDark:"#444444",monoPrimaryDark:"#e6edf3",monoAccentDark:"#aaaaaa",monoSecondaryDark:"#888888",monoBorderDark:"#555555",monoBorderSubtleDark:"#555555",monoBgLight:"#F8F8F8",monoPanelLight:"#EFEFEF",monoElemLight:"#E4E4E4",monoTextLight:"#1A1A1A",monoMutedLight:"#5A5A5A",monoPrimaryLight:"#6D96B9",monoAccentLight:"#727272",monoSecondaryLight:"#505050",monoBorderLight:"#D0D0D0",monoBorderSubtleLight:"#E0E0E0",monoOkDark:"#888888",monoErrorDark:"#cccccc",monoWarnDark:"#999999",monoOkLight:"#888888",monoErrorLight:"#8C8C8C",monoWarnLight:"#999999"},theme:{primary:{dark:"monoPrimaryDark",light:"monoPrimaryLight"},secondary:{dark:"monoSecondaryDark",light:"monoSecondaryLight"},accent:{dark:"monoAccentDark",light:"monoAccentLight"},error:{dark:"monoErrorDark",light:"monoErrorLight"},warning:{dark:"monoWarnDark",light:"monoWarnLight"},success:{dark:"monoOkDark",light:"monoOkLight"},info:{dark:"monoAccentDark",light:"monoAccentLight"},text:{dark:"monoTextDark",light:"monoTextLight"},textMuted:{dark:"monoMutedDark",light:"monoMutedLight"},background:{dark:"monoBgDark",light:"monoBgLight"},backgroundPanel:{dark:"monoPanelDark",light:"monoPanelLight"},backgroundElement:{dark:"monoElemDark",light:"monoElemLight"},border:{dark:"monoBorderDark",light:"monoBorderLight"},borderActive:{dark:"monoAccentDark",light:"monoAccentLight"},borderSubtle:{dark:"monoBorderSubtleDark",light:"monoBorderSubtleLight"},diffAdded:{dark:"monoOkDark",light:"monoOkLight"},diffRemoved:{dark:"monoErrorDark",light:"monoErrorLight"},diffContext:{dark:"monoMutedDark",light:"monoMutedLight"},diffHunkHeader:{dark:"monoMutedDark",light:"monoMutedLight"},diffHighlightAdded:{dark:"monoOkDark",light:"monoOkLight"},diffHighlightRemoved:{dark:"monoErrorDark",light:"monoErrorLight"},diffAddedBg:{dark:"#323232",light:"#E7E7E7"},diffRemovedBg:{dark:"#3E3E3E",light:"#E8E8E8"},diffContextBg:{dark:"monoPanelDark",light:"monoPanelLight"},diffLineNumber:{dark:"monoMutedDark",light:"monoMutedLight"},diffAddedLineNumberBg:{dark:"#2A2A2A",light:"#EFEFEF"},diffRemovedLineNumberBg:{dark:"#303030",light:"#EFEFEF"},markdownText:{dark:"monoTextDark",light:"monoTextLight"},markdownHeading:{dark:"monoPrimaryDark",light:"monoPrimaryLight"},markdownLink:{dark:"monoAccentDark",light:"monoAccentLight"},markdownLinkText:{dark:"monoSecondaryDark",light:"monoSecondaryLight"},markdownCode:{dark:"monoSecondaryDark",light:"monoSecondaryLight"},markdownBlockQuote:{dark:"monoMutedDark",light:"monoMutedLight"},markdownEmph:{dark:"monoAccentDark",light:"monoAccentLight"},markdownStrong:{dark:"monoPrimaryDark",light:"monoPrimaryLight"},markdownHorizontalRule:{dark:"monoBorderDark",light:"monoBorderLight"},markdownListItem:{dark:"monoTextDark",light:"monoTextLight"},markdownListEnumeration:{dark:"monoAccentDark",light:"monoAccentLight"},markdownImage:{dark:"monoAccentDark",light:"monoAccentLight"},markdownImageText:{dark:"monoMutedDark",light:"monoMutedLight"},markdownCodeBlock:{dark:"monoTextDark",light:"monoTextLight"},syntaxComment:{dark:"monoMutedDark",light:"monoMutedLight"},syntaxKeyword:{dark:"monoAccentDark",light:"monoAccentLight"},syntaxFunction:{dark:"monoPrimaryDark",light:"monoPrimaryLight"},syntaxVariable:{dark:"monoTextDark",light:"monoTextLight"},syntaxString:{dark:"monoOkDark",light:"monoOkLight"},syntaxNumber:{dark:"monoAccentDark",light:"monoAccentLight"},syntaxType:{dark:"monoSecondaryDark",light:"monoSecondaryLight"},syntaxOperator:{dark:"monoSecondaryDark",light:"monoSecondaryLight"},syntaxPunctuation:{dark:"monoTextDark",light:"monoTextLight"}}};var monokai_default={$schema:"https://opencode.ai/theme.json",defs:{background:"#272822",backgroundAlt:"#1e1f1c",backgroundPanel:"#3e3d32",foreground:"#f8f8f2",comment:"#75715e",red:"#f92672",orange:"#fd971f",lightOrange:"#e69f66",yellow:"#e6db74",green:"#a6e22e",cyan:"#66d9ef",blue:"#66d9ef",purple:"#ae81ff",pink:"#f92672"},theme:{primary:{dark:"cyan",light:"blue"},secondary:{dark:"purple",light:"purple"},accent:{dark:"green",light:"green"},error:{dark:"red",light:"red"},warning:{dark:"yellow",light:"orange"},success:{dark:"green",light:"green"},info:{dark:"orange",light:"orange"},text:{dark:"foreground",light:"#272822"},textMuted:{dark:"comment",light:"#75715e"},background:{dark:"#272822",light:"#fafafa"},backgroundPanel:{dark:"#1e1f1c",light:"#f0f0f0"},backgroundElement:{dark:"#3e3d32",light:"#e0e0e0"},border:{dark:"#3e3d32",light:"#d0d0d0"},borderActive:{dark:"cyan",light:"blue"},borderSubtle:{dark:"#1e1f1c",light:"#e8e8e8"},diffAdded:{dark:"green",light:"green"},diffRemoved:{dark:"red",light:"red"},diffContext:{dark:"comment",light:"#75715e"},diffHunkHeader:{dark:"comment",light:"#75715e"},diffHighlightAdded:{dark:"green",light:"green"},diffHighlightRemoved:{dark:"red",light:"red"},diffAddedBg:{dark:"#1a3a1a",light:"#e0ffe0"},diffRemovedBg:{dark:"#3a1a1a",light:"#ffe0e0"},diffContextBg:{dark:"#1e1f1c",light:"#f0f0f0"},diffLineNumber:{dark:"#3e3d32",light:"#d0d0d0"},diffAddedLineNumberBg:{dark:"#1a3a1a",light:"#e0ffe0"},diffRemovedLineNumberBg:{dark:"#3a1a1a",light:"#ffe0e0"},markdownText:{dark:"foreground",light:"#272822"},markdownHeading:{dark:"pink",light:"pink"},markdownLink:{dark:"cyan",light:"blue"},markdownLinkText:{dark:"purple",light:"purple"},markdownCode:{dark:"green",light:"green"},markdownBlockQuote:{dark:"comment",light:"#75715e"},markdownEmph:{dark:"yellow",light:"orange"},markdownStrong:{dark:"orange",light:"orange"},markdownHorizontalRule:{dark:"comment",light:"#75715e"},markdownListItem:{dark:"cyan",light:"blue"},markdownListEnumeration:{dark:"purple",light:"purple"},markdownImage:{dark:"cyan",light:"blue"},markdownImageText:{dark:"purple",light:"purple"},markdownCodeBlock:{dark:"foreground",light:"#272822"},syntaxComment:{dark:"comment",light:"#75715e"},syntaxKeyword:{dark:"pink",light:"pink"},syntaxFunction:{dark:"green",light:"green"},syntaxVariable:{dark:"foreground",light:"#272822"},syntaxString:{dark:"yellow",light:"orange"},syntaxNumber:{dark:"purple",light:"purple"},syntaxType:{dark:"cyan",light:"blue"},syntaxOperator:{dark:"pink",light:"pink"},syntaxPunctuation:{dark:"foreground",light:"#272822"}}};var nightowl_default={$schema:"https://opencode.ai/theme.json",defs:{nightOwlBg:"#011627",nightOwlFg:"#d6deeb",nightOwlBlue:"#82AAFF",nightOwlCyan:"#7fdbca",nightOwlGreen:"#c5e478",nightOwlYellow:"#ecc48d",nightOwlOrange:"#F78C6C",nightOwlRed:"#EF5350",nightOwlPink:"#ff5874",nightOwlPurple:"#c792ea",nightOwlMuted:"#5f7e97",nightOwlGray:"#637777",nightOwlLightGray:"#89a4bb",nightOwlPanel:"#0b253a"},theme:{primary:{dark:"nightOwlBlue",light:"nightOwlBlue"},secondary:{dark:"nightOwlCyan",light:"nightOwlCyan"},accent:{dark:"nightOwlPurple",light:"nightOwlPurple"},error:{dark:"nightOwlRed",light:"nightOwlRed"},warning:{dark:"nightOwlYellow",light:"nightOwlYellow"},success:{dark:"nightOwlGreen",light:"nightOwlGreen"},info:{dark:"nightOwlBlue",light:"nightOwlBlue"},text:{dark:"nightOwlFg",light:"nightOwlFg"},textMuted:{dark:"nightOwlMuted",light:"nightOwlMuted"},background:{dark:"nightOwlBg",light:"nightOwlBg"},backgroundPanel:{dark:"nightOwlPanel",light:"nightOwlPanel"},backgroundElement:{dark:"nightOwlPanel",light:"nightOwlPanel"},border:{dark:"nightOwlMuted",light:"nightOwlMuted"},borderActive:{dark:"nightOwlBlue",light:"nightOwlBlue"},borderSubtle:{dark:"nightOwlMuted",light:"nightOwlMuted"},diffAdded:{dark:"nightOwlGreen",light:"nightOwlGreen"},diffRemoved:{dark:"nightOwlRed",light:"nightOwlRed"},diffContext:{dark:"nightOwlMuted",light:"nightOwlMuted"},diffHunkHeader:{dark:"nightOwlMuted",light:"nightOwlMuted"},diffHighlightAdded:{dark:"nightOwlGreen",light:"nightOwlGreen"},diffHighlightRemoved:{dark:"nightOwlRed",light:"nightOwlRed"},diffAddedBg:{dark:"#0a2e1a",light:"#0a2e1a"},diffRemovedBg:{dark:"#2d1b1b",light:"#2d1b1b"},diffContextBg:{dark:"nightOwlPanel",light:"nightOwlPanel"},diffLineNumber:{dark:"nightOwlMuted",light:"nightOwlMuted"},diffAddedLineNumberBg:{dark:"#0a2e1a",light:"#0a2e1a"},diffRemovedLineNumberBg:{dark:"#2d1b1b",light:"#2d1b1b"},markdownText:{dark:"nightOwlFg",light:"nightOwlFg"},markdownHeading:{dark:"nightOwlBlue",light:"nightOwlBlue"},markdownLink:{dark:"nightOwlCyan",light:"nightOwlCyan"},markdownLinkText:{dark:"nightOwlBlue",light:"nightOwlBlue"},markdownCode:{dark:"nightOwlGreen",light:"nightOwlGreen"},markdownBlockQuote:{dark:"nightOwlMuted",light:"nightOwlMuted"},markdownEmph:{dark:"nightOwlPurple",light:"nightOwlPurple"},markdownStrong:{dark:"nightOwlYellow",light:"nightOwlYellow"},markdownHorizontalRule:{dark:"nightOwlMuted",light:"nightOwlMuted"},markdownListItem:{dark:"nightOwlBlue",light:"nightOwlBlue"},markdownListEnumeration:{dark:"nightOwlCyan",light:"nightOwlCyan"},markdownImage:{dark:"nightOwlCyan",light:"nightOwlCyan"},markdownImageText:{dark:"nightOwlBlue",light:"nightOwlBlue"},markdownCodeBlock:{dark:"nightOwlFg",light:"nightOwlFg"},syntaxComment:{dark:"nightOwlGray",light:"nightOwlGray"},syntaxKeyword:{dark:"nightOwlPurple",light:"nightOwlPurple"},syntaxFunction:{dark:"nightOwlBlue",light:"nightOwlBlue"},syntaxVariable:{dark:"nightOwlFg",light:"nightOwlFg"},syntaxString:{dark:"nightOwlYellow",light:"nightOwlYellow"},syntaxNumber:{dark:"nightOwlOrange",light:"nightOwlOrange"},syntaxType:{dark:"nightOwlGreen",light:"nightOwlGreen"},syntaxOperator:{dark:"nightOwlCyan",light:"nightOwlCyan"},syntaxPunctuation:{dark:"nightOwlFg",light:"nightOwlFg"}}};var nord_default={$schema:"https://opencode.ai/theme.json",defs:{nord0:"#2E3440",nord1:"#3B4252",nord2:"#434C5E",nord3:"#4C566A",nord4:"#D8DEE9",nord5:"#E5E9F0",nord6:"#ECEFF4",nord7:"#8FBCBB",nord8:"#88C0D0",nord9:"#81A1C1",nord10:"#5E81AC",nord11:"#BF616A",nord12:"#D08770",nord13:"#EBCB8B",nord14:"#A3BE8C",nord15:"#B48EAD"},theme:{primary:{dark:"nord8",light:"nord10"},secondary:{dark:"nord9",light:"nord9"},accent:{dark:"nord7",light:"nord7"},error:{dark:"nord11",light:"nord11"},warning:{dark:"nord12",light:"nord12"},success:{dark:"nord14",light:"nord14"},info:{dark:"nord8",light:"nord10"},text:{dark:"nord6",light:"nord0"},textMuted:{dark:"#8B95A7",light:"nord1"},background:{dark:"nord0",light:"nord6"},backgroundPanel:{dark:"nord1",light:"nord5"},backgroundElement:{dark:"nord2",light:"nord4"},border:{dark:"nord2",light:"nord3"},borderActive:{dark:"nord3",light:"nord2"},borderSubtle:{dark:"nord2",light:"nord3"},diffAdded:{dark:"nord14",light:"nord14"},diffRemoved:{dark:"nord11",light:"nord11"},diffContext:{dark:"#8B95A7",light:"nord3"},diffHunkHeader:{dark:"#8B95A7",light:"nord3"},diffHighlightAdded:{dark:"nord14",light:"nord14"},diffHighlightRemoved:{dark:"nord11",light:"nord11"},diffAddedBg:{dark:"#3B4252",light:"#E5E9F0"},diffRemovedBg:{dark:"#3B4252",light:"#E5E9F0"},diffContextBg:{dark:"nord1",light:"nord5"},diffLineNumber:{dark:"nord2",light:"nord4"},diffAddedLineNumberBg:{dark:"#3B4252",light:"#E5E9F0"},diffRemovedLineNumberBg:{dark:"#3B4252",light:"#E5E9F0"},markdownText:{dark:"nord4",light:"nord0"},markdownHeading:{dark:"nord8",light:"nord10"},markdownLink:{dark:"nord9",light:"nord9"},markdownLinkText:{dark:"nord7",light:"nord7"},markdownCode:{dark:"nord14",light:"nord14"},markdownBlockQuote:{dark:"#8B95A7",light:"nord3"},markdownEmph:{dark:"nord12",light:"nord12"},markdownStrong:{dark:"nord13",light:"nord13"},markdownHorizontalRule:{dark:"#8B95A7",light:"nord3"},markdownListItem:{dark:"nord8",light:"nord10"},markdownListEnumeration:{dark:"nord7",light:"nord7"},markdownImage:{dark:"nord9",light:"nord9"},markdownImageText:{dark:"nord7",light:"nord7"},markdownCodeBlock:{dark:"nord4",light:"nord0"},syntaxComment:{dark:"#8B95A7",light:"nord3"},syntaxKeyword:{dark:"nord9",light:"nord9"},syntaxFunction:{dark:"nord8",light:"nord8"},syntaxVariable:{dark:"nord7",light:"nord7"},syntaxString:{dark:"nord14",light:"nord14"},syntaxNumber:{dark:"nord15",light:"nord15"},syntaxType:{dark:"nord7",light:"nord7"},syntaxOperator:{dark:"nord9",light:"nord9"},syntaxPunctuation:{dark:"nord4",light:"nord0"}}};var one_dark_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#282c34",darkBgAlt:"#21252b",darkBgPanel:"#353b45",darkFg:"#abb2bf",darkFgMuted:"#5c6370",darkPurple:"#c678dd",darkBlue:"#61afef",darkRed:"#e06c75",darkGreen:"#98c379",darkYellow:"#e5c07b",darkOrange:"#d19a66",darkCyan:"#56b6c2",lightBg:"#fafafa",lightBgAlt:"#f0f0f1",lightBgPanel:"#eaeaeb",lightFg:"#383a42",lightFgMuted:"#a0a1a7",lightPurple:"#a626a4",lightBlue:"#4078f2",lightRed:"#e45649",lightGreen:"#50a14f",lightYellow:"#c18401",lightOrange:"#986801",lightCyan:"#0184bc"},theme:{primary:{dark:"darkBlue",light:"lightBlue"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkCyan",light:"lightCyan"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkOrange",light:"lightOrange"},text:{dark:"darkFg",light:"lightFg"},textMuted:{dark:"darkFgMuted",light:"lightFgMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgAlt",light:"lightBgAlt"},backgroundElement:{dark:"darkBgPanel",light:"lightBgPanel"},border:{dark:"#393f4a",light:"#d1d1d2"},borderActive:{dark:"darkBlue",light:"lightBlue"},borderSubtle:{dark:"#2c313a",light:"#e0e0e1"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkFgMuted",light:"lightFgMuted"},diffHunkHeader:{dark:"darkCyan",light:"lightCyan"},diffHighlightAdded:{dark:"#aad482",light:"#489447"},diffHighlightRemoved:{dark:"#e8828b",light:"#d65145"},diffAddedBg:{dark:"#2c382b",light:"#eafbe9"},diffRemovedBg:{dark:"#3a2d2f",light:"#fce9e8"},diffContextBg:{dark:"darkBgAlt",light:"lightBgAlt"},diffLineNumber:{dark:"#495162",light:"#c9c9ca"},diffAddedLineNumberBg:{dark:"#283427",light:"#e1f3df"},diffRemovedLineNumberBg:{dark:"#36292b",light:"#f5e2e1"},markdownText:{dark:"darkFg",light:"lightFg"},markdownHeading:{dark:"darkPurple",light:"lightPurple"},markdownLink:{dark:"darkBlue",light:"lightBlue"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkFgMuted",light:"lightFgMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkFgMuted",light:"lightFgMuted"},markdownListItem:{dark:"darkBlue",light:"lightBlue"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkBlue",light:"lightBlue"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkFg",light:"lightFg"},syntaxComment:{dark:"darkFgMuted",light:"lightFgMuted"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkFg",light:"lightFg"}}};var opencode_default={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#0a0a0a",darkStep2:"#141414",darkStep3:"#1e1e1e",darkStep4:"#282828",darkStep5:"#323232",darkStep6:"#3c3c3c",darkStep7:"#484848",darkStep8:"#606060",darkStep9:"#fab283",darkStep10:"#ffc09f",darkStep11:"#808080",darkStep12:"#eeeeee",darkSecondary:"#5c9cf5",darkAccent:"#9d7cd8",darkRed:"#e06c75",darkOrange:"#f5a742",darkGreen:"#7fd88f",darkCyan:"#56b6c2",darkYellow:"#e5c07b",lightStep1:"#ffffff",lightStep2:"#fafafa",lightStep3:"#f5f5f5",lightStep4:"#ebebeb",lightStep5:"#e1e1e1",lightStep6:"#d4d4d4",lightStep7:"#b8b8b8",lightStep8:"#a0a0a0",lightStep9:"#3b7dd8",lightStep10:"#2968c3",lightStep11:"#8a8a8a",lightStep12:"#1a1a1a",lightSecondary:"#7b5bb6",lightAccent:"#d68c27",lightRed:"#d1383d",lightOrange:"#d68c27",lightGreen:"#3d9a57",lightCyan:"#318795",lightYellow:"#b0851f"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep3",light:"lightStep3"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkAccent",light:"lightAccent"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkAccent",light:"lightAccent"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}};var orng_default={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#0a0a0a",darkStep2:"#141414",darkStep3:"#1e1e1e",darkStep4:"#282828",darkStep5:"#323232",darkStep6:"#3c3c3c",darkStep7:"#484848",darkStep8:"#606060",darkStep9:"#EC5B2B",darkStep10:"#EE7948",darkStep11:"#808080",darkStep12:"#eeeeee",darkSecondary:"#EE7948",darkAccent:"#FFF7F1",darkRed:"#e06c75",darkOrange:"#EC5B2B",darkBlue:"#6ba1e6",darkCyan:"#56b6c2",darkYellow:"#e5c07b",lightStep1:"#ffffff",lightStep2:"#FFF7F1",lightStep3:"#f5f0eb",lightStep4:"#ebebeb",lightStep5:"#e1e1e1",lightStep6:"#d4d4d4",lightStep7:"#b8b8b8",lightStep8:"#a0a0a0",lightStep9:"#EC5B2B",lightStep10:"#c94d24",lightStep11:"#8a8a8a",lightStep12:"#1a1a1a",lightSecondary:"#EE7948",lightAccent:"#c94d24",lightRed:"#d1383d",lightOrange:"#EC5B2B",lightBlue:"#0062d1",lightCyan:"#318795",lightYellow:"#b0851f"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkBlue",light:"lightBlue"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},selectedListItemText:{dark:"#0a0a0a",light:"#ffffff"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"#EC5B2B",light:"#EC5B2B"},borderActive:{dark:"#EE7948",light:"#c94d24"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#6ba1e6",light:"#0062d1"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#6ba1e6",light:"#0062d1"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#1a2a3d",light:"#e0edfa"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep3",light:"lightStep3"},diffAddedLineNumberBg:{dark:"#162535",light:"#d0e5f5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"#EC5B2B",light:"#EC5B2B"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkBlue",light:"lightBlue"},markdownBlockQuote:{dark:"#FFF7F1",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"#EE7948",light:"#EC5B2B"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"#EC5B2B",light:"#EC5B2B"},syntaxFunction:{dark:"#EE7948",light:"#c94d24"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkBlue",light:"lightBlue"},syntaxNumber:{dark:"#FFF7F1",light:"#EC5B2B"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}};var osaka_jade_default={$schema:"https://opencode.ai/theme.json",defs:{darkBg0:"#111c18",darkBg1:"#1a2520",darkBg2:"#23372B",darkBg3:"#3d4a44",darkFg0:"#C1C497",darkFg1:"#9aa88a",darkGray:"#53685B",darkRed:"#FF5345",darkGreen:"#549e6a",darkYellow:"#459451",darkBlue:"#509475",darkMagenta:"#D2689C",darkCyan:"#2DD5B7",darkWhite:"#F6F5DD",darkRedBright:"#db9f9c",darkGreenBright:"#63b07a",darkYellowBright:"#E5C736",darkBlueBright:"#ACD4CF",darkMagentaBright:"#75bbb3",darkCyanBright:"#8CD3CB",lightBg0:"#F6F5DD",lightBg1:"#E8E7CC",lightBg2:"#D5D4B8",lightBg3:"#A8A78C",lightFg0:"#111c18",lightFg1:"#1a2520",lightGray:"#53685B",lightRed:"#c7392d",lightGreen:"#3d7a52",lightYellow:"#b5a020",lightBlue:"#3d7560",lightMagenta:"#a8527a",lightCyan:"#1faa90"},theme:{primary:{dark:"darkCyan",light:"lightCyan"},secondary:{dark:"darkMagenta",light:"lightMagenta"},accent:{dark:"darkGreen",light:"lightGreen"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellowBright",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkFg0",light:"lightFg0"},textMuted:{dark:"darkGray",light:"lightGray"},background:{dark:"darkBg0",light:"lightBg0"},backgroundPanel:{dark:"darkBg1",light:"lightBg1"},backgroundElement:{dark:"darkBg2",light:"lightBg2"},border:{dark:"darkBg3",light:"lightBg3"},borderActive:{dark:"darkCyan",light:"lightCyan"},borderSubtle:{dark:"darkBg2",light:"lightBg2"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkGray",light:"lightGray"},diffHunkHeader:{dark:"darkCyan",light:"lightCyan"},diffHighlightAdded:{dark:"darkGreenBright",light:"lightGreen"},diffHighlightRemoved:{dark:"darkRedBright",light:"lightRed"},diffAddedBg:{dark:"#15241c",light:"#e0eee5"},diffRemovedBg:{dark:"#241515",light:"#eee0e0"},diffContextBg:{dark:"darkBg1",light:"lightBg1"},diffLineNumber:{dark:"darkBg3",light:"lightBg3"},diffAddedLineNumberBg:{dark:"#121f18",light:"#d5e5da"},diffRemovedLineNumberBg:{dark:"#1f1212",light:"#e5d5d5"},markdownText:{dark:"darkFg0",light:"lightFg0"},markdownHeading:{dark:"darkCyan",light:"lightCyan"},markdownLink:{dark:"darkCyanBright",light:"lightCyan"},markdownLinkText:{dark:"darkGreen",light:"lightGreen"},markdownCode:{dark:"darkGreenBright",light:"lightGreen"},markdownBlockQuote:{dark:"darkGray",light:"lightGray"},markdownEmph:{dark:"darkMagenta",light:"lightMagenta"},markdownStrong:{dark:"darkFg0",light:"lightFg0"},markdownHorizontalRule:{dark:"darkGray",light:"lightGray"},markdownListItem:{dark:"darkCyan",light:"lightCyan"},markdownListEnumeration:{dark:"darkCyanBright",light:"lightCyan"},markdownImage:{dark:"darkCyanBright",light:"lightCyan"},markdownImageText:{dark:"darkGreen",light:"lightGreen"},markdownCodeBlock:{dark:"darkFg0",light:"lightFg0"},syntaxComment:{dark:"darkGray",light:"lightGray"},syntaxKeyword:{dark:"darkCyan",light:"lightCyan"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkFg0",light:"lightFg0"},syntaxString:{dark:"darkGreenBright",light:"lightGreen"},syntaxNumber:{dark:"darkMagenta",light:"lightMagenta"},syntaxType:{dark:"darkGreen",light:"lightGreen"},syntaxOperator:{dark:"darkYellow",light:"lightYellow"},syntaxPunctuation:{dark:"darkFg0",light:"lightFg0"}}};var palenight_default={$schema:"https://opencode.ai/theme.json",defs:{background:"#292d3e",backgroundAlt:"#1e2132",backgroundPanel:"#32364a",foreground:"#a6accd",foregroundBright:"#bfc7d5",comment:"#676e95",red:"#f07178",orange:"#f78c6c",yellow:"#ffcb6b",green:"#c3e88d",cyan:"#89ddff",blue:"#82aaff",purple:"#c792ea",magenta:"#ff5370",pink:"#f07178"},theme:{primary:{dark:"blue",light:"#4976eb"},secondary:{dark:"purple",light:"#a854f2"},accent:{dark:"cyan",light:"#00acc1"},error:{dark:"red",light:"#e53935"},warning:{dark:"yellow",light:"#ffb300"},success:{dark:"green",light:"#91b859"},info:{dark:"orange",light:"#f4511e"},text:{dark:"foreground",light:"#292d3e"},textMuted:{dark:"comment",light:"#8796b0"},background:{dark:"#292d3e",light:"#fafafa"},backgroundPanel:{dark:"#1e2132",light:"#f5f5f5"},backgroundElement:{dark:"#32364a",light:"#e7e7e8"},border:{dark:"#32364a",light:"#e0e0e0"},borderActive:{dark:"blue",light:"#4976eb"},borderSubtle:{dark:"#1e2132",light:"#eeeeee"},diffAdded:{dark:"green",light:"#91b859"},diffRemoved:{dark:"red",light:"#e53935"},diffContext:{dark:"comment",light:"#8796b0"},diffHunkHeader:{dark:"cyan",light:"#00acc1"},diffHighlightAdded:{dark:"green",light:"#91b859"},diffHighlightRemoved:{dark:"red",light:"#e53935"},diffAddedBg:{dark:"#2e3c2b",light:"#e8f5e9"},diffRemovedBg:{dark:"#3c2b2b",light:"#ffebee"},diffContextBg:{dark:"#1e2132",light:"#f5f5f5"},diffLineNumber:{dark:"#444760",light:"#cfd8dc"},diffAddedLineNumberBg:{dark:"#2e3c2b",light:"#e8f5e9"},diffRemovedLineNumberBg:{dark:"#3c2b2b",light:"#ffebee"},markdownText:{dark:"foreground",light:"#292d3e"},markdownHeading:{dark:"purple",light:"#a854f2"},markdownLink:{dark:"blue",light:"#4976eb"},markdownLinkText:{dark:"cyan",light:"#00acc1"},markdownCode:{dark:"green",light:"#91b859"},markdownBlockQuote:{dark:"comment",light:"#8796b0"},markdownEmph:{dark:"yellow",light:"#ffb300"},markdownStrong:{dark:"orange",light:"#f4511e"},markdownHorizontalRule:{dark:"comment",light:"#8796b0"},markdownListItem:{dark:"blue",light:"#4976eb"},markdownListEnumeration:{dark:"cyan",light:"#00acc1"},markdownImage:{dark:"blue",light:"#4976eb"},markdownImageText:{dark:"cyan",light:"#00acc1"},markdownCodeBlock:{dark:"foreground",light:"#292d3e"},syntaxComment:{dark:"comment",light:"#8796b0"},syntaxKeyword:{dark:"purple",light:"#a854f2"},syntaxFunction:{dark:"blue",light:"#4976eb"},syntaxVariable:{dark:"foreground",light:"#292d3e"},syntaxString:{dark:"green",light:"#91b859"},syntaxNumber:{dark:"orange",light:"#f4511e"},syntaxType:{dark:"yellow",light:"#ffb300"},syntaxOperator:{dark:"cyan",light:"#00acc1"},syntaxPunctuation:{dark:"foreground",light:"#292d3e"}}};var poseidon_default={$schema:"https://opencode.ai/theme.json",defs:{poseidonBgDark:"#0F2440",poseidonPanelDark:"#122B4C",poseidonElemDark:"#153259",poseidonTextDark:"#EAF7FF",poseidonMutedDark:"#496884",poseidonPrimaryDark:"#A9DFFF",poseidonAccentDark:"#5DB8F5",poseidonSecondaryDark:"#A9DFFF",poseidonBorderDark:"#2A6FB9",poseidonBorderSubtleDark:"#496884",poseidonBgLight:"#F8F8F8",poseidonPanelLight:"#EFEFEF",poseidonElemLight:"#E4E4E4",poseidonTextLight:"#1A1A1A",poseidonMutedLight:"#5A5A5A",poseidonPrimaryLight:"#009AF5",poseidonAccentLight:"#0D85D5",poseidonSecondaryLight:"#009AF5",poseidonBorderLight:"#D0D0D0",poseidonBorderSubtleLight:"#E0E0E0",poseidonOkDark:"#4caf50",poseidonErrorDark:"#ef5350",poseidonWarnDark:"#ffa726",poseidonOkLight:"#4caf50",poseidonErrorLight:"#ef5350",poseidonWarnLight:"#A56200"},theme:{primary:{dark:"poseidonPrimaryDark",light:"poseidonPrimaryLight"},secondary:{dark:"poseidonSecondaryDark",light:"poseidonSecondaryLight"},accent:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},error:{dark:"poseidonErrorDark",light:"poseidonErrorLight"},warning:{dark:"poseidonWarnDark",light:"poseidonWarnLight"},success:{dark:"poseidonOkDark",light:"poseidonOkLight"},info:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},text:{dark:"poseidonTextDark",light:"poseidonTextLight"},textMuted:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},background:{dark:"poseidonBgDark",light:"poseidonBgLight"},backgroundPanel:{dark:"poseidonPanelDark",light:"poseidonPanelLight"},backgroundElement:{dark:"poseidonElemDark",light:"poseidonElemLight"},border:{dark:"poseidonBorderDark",light:"poseidonBorderLight"},borderActive:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},borderSubtle:{dark:"poseidonBorderSubtleDark",light:"poseidonBorderSubtleLight"},diffAdded:{dark:"poseidonOkDark",light:"poseidonOkLight"},diffRemoved:{dark:"poseidonErrorDark",light:"poseidonErrorLight"},diffContext:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},diffHunkHeader:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},diffHighlightAdded:{dark:"poseidonOkDark",light:"poseidonOkLight"},diffHighlightRemoved:{dark:"poseidonErrorDark",light:"poseidonErrorLight"},diffAddedBg:{dark:"#1A3D43",light:"#DEEDDF"},diffRemovedBg:{dark:"#372C43",light:"#F7DFDF"},diffContextBg:{dark:"poseidonPanelDark",light:"poseidonPanelLight"},diffLineNumber:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},diffAddedLineNumberBg:{dark:"#153242",light:"#EAF2EB"},diffRemovedLineNumberBg:{dark:"#252942",light:"#F7EBEB"},markdownText:{dark:"poseidonTextDark",light:"poseidonTextLight"},markdownHeading:{dark:"poseidonPrimaryDark",light:"poseidonPrimaryLight"},markdownLink:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},markdownLinkText:{dark:"poseidonSecondaryDark",light:"poseidonSecondaryLight"},markdownCode:{dark:"poseidonSecondaryDark",light:"poseidonSecondaryLight"},markdownBlockQuote:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},markdownEmph:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},markdownStrong:{dark:"poseidonPrimaryDark",light:"poseidonPrimaryLight"},markdownHorizontalRule:{dark:"poseidonBorderDark",light:"poseidonBorderLight"},markdownListItem:{dark:"poseidonTextDark",light:"poseidonTextLight"},markdownListEnumeration:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},markdownImage:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},markdownImageText:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},markdownCodeBlock:{dark:"poseidonTextDark",light:"poseidonTextLight"},syntaxComment:{dark:"poseidonMutedDark",light:"poseidonMutedLight"},syntaxKeyword:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},syntaxFunction:{dark:"poseidonPrimaryDark",light:"poseidonPrimaryLight"},syntaxVariable:{dark:"poseidonTextDark",light:"poseidonTextLight"},syntaxString:{dark:"poseidonOkDark",light:"poseidonOkLight"},syntaxNumber:{dark:"poseidonAccentDark",light:"poseidonAccentLight"},syntaxType:{dark:"poseidonSecondaryDark",light:"poseidonSecondaryLight"},syntaxOperator:{dark:"poseidonSecondaryDark",light:"poseidonSecondaryLight"},syntaxPunctuation:{dark:"poseidonTextDark",light:"poseidonTextLight"}}};var rosepine_default={$schema:"https://opencode.ai/theme.json",defs:{base:"#191724",surface:"#1f1d2e",overlay:"#26233a",muted:"#6e6a86",subtle:"#908caa",text:"#e0def4",love:"#eb6f92",gold:"#f6c177",rose:"#ebbcba",pine:"#31748f",foam:"#9ccfd8",iris:"#c4a7e7",highlightLow:"#21202e",highlightMed:"#403d52",highlightHigh:"#524f67",moonBase:"#232136",moonSurface:"#2a273f",moonOverlay:"#393552",moonMuted:"#6e6a86",moonSubtle:"#908caa",moonText:"#e0def4",dawnBase:"#faf4ed",dawnSurface:"#fffaf3",dawnOverlay:"#f2e9e1",dawnMuted:"#9893a5",dawnSubtle:"#797593",dawnText:"#575279"},theme:{primary:{dark:"foam",light:"pine"},secondary:{dark:"iris",light:"#907aa9"},accent:{dark:"rose",light:"#d7827e"},error:{dark:"love",light:"#b4637a"},warning:{dark:"gold",light:"#ea9d34"},success:{dark:"pine",light:"#286983"},info:{dark:"foam",light:"#56949f"},text:{dark:"#e0def4",light:"#575279"},textMuted:{dark:"muted",light:"dawnMuted"},background:{dark:"base",light:"dawnBase"},backgroundPanel:{dark:"surface",light:"dawnSurface"},backgroundElement:{dark:"overlay",light:"dawnOverlay"},border:{dark:"highlightMed",light:"#dfdad9"},borderActive:{dark:"foam",light:"pine"},borderSubtle:{dark:"highlightLow",light:"#f4ede8"},diffAdded:{dark:"pine",light:"#286983"},diffRemoved:{dark:"love",light:"#b4637a"},diffContext:{dark:"muted",light:"dawnMuted"},diffHunkHeader:{dark:"iris",light:"#907aa9"},diffHighlightAdded:{dark:"pine",light:"#286983"},diffHighlightRemoved:{dark:"love",light:"#b4637a"},diffAddedBg:{dark:"#1f2d3a",light:"#e5f2f3"},diffRemovedBg:{dark:"#3a1f2d",light:"#fce5e8"},diffContextBg:{dark:"surface",light:"dawnSurface"},diffLineNumber:{dark:"muted",light:"dawnMuted"},diffAddedLineNumberBg:{dark:"#1f2d3a",light:"#e5f2f3"},diffRemovedLineNumberBg:{dark:"#3a1f2d",light:"#fce5e8"},markdownText:{dark:"#e0def4",light:"#575279"},markdownHeading:{dark:"iris",light:"#907aa9"},markdownLink:{dark:"foam",light:"pine"},markdownLinkText:{dark:"rose",light:"#d7827e"},markdownCode:{dark:"pine",light:"#286983"},markdownBlockQuote:{dark:"muted",light:"dawnMuted"},markdownEmph:{dark:"gold",light:"#ea9d34"},markdownStrong:{dark:"love",light:"#b4637a"},markdownHorizontalRule:{dark:"highlightMed",light:"#dfdad9"},markdownListItem:{dark:"foam",light:"pine"},markdownListEnumeration:{dark:"rose",light:"#d7827e"},markdownImage:{dark:"foam",light:"pine"},markdownImageText:{dark:"rose",light:"#d7827e"},markdownCodeBlock:{dark:"#e0def4",light:"#575279"},syntaxComment:{dark:"muted",light:"dawnMuted"},syntaxKeyword:{dark:"pine",light:"#286983"},syntaxFunction:{dark:"rose",light:"#d7827e"},syntaxVariable:{dark:"#e0def4",light:"#575279"},syntaxString:{dark:"gold",light:"#ea9d34"},syntaxNumber:{dark:"iris",light:"#907aa9"},syntaxType:{dark:"foam",light:"#56949f"},syntaxOperator:{dark:"subtle",light:"dawnSubtle"},syntaxPunctuation:{dark:"subtle",light:"dawnSubtle"}}};var sisyphus_default={$schema:"https://opencode.ai/theme.json",defs:{sisyphusBgDark:"#202020",sisyphusPanelDark:"#282828",sisyphusElemDark:"#2F2F2F",sisyphusTextDark:"#D3D3D3",sisyphusMutedDark:"#4A4A4A",sisyphusPrimaryDark:"#F5F5F5",sisyphusAccentDark:"#E7E7E7",sisyphusSecondaryDark:"#D3D3D3",sisyphusBorderDark:"#B7B7B7",sisyphusBorderSubtleDark:"#656565",sisyphusBgLight:"#F8F8F8",sisyphusPanelLight:"#EFEFEF",sisyphusElemLight:"#E4E4E4",sisyphusTextLight:"#1A1A1A",sisyphusMutedLight:"#5A5A5A",sisyphusPrimaryLight:"#9C9C9C",sisyphusAccentLight:"#8E8E8E",sisyphusSecondaryLight:"#7A7A7A",sisyphusBorderLight:"#D0D0D0",sisyphusBorderSubtleLight:"#E0E0E0",sisyphusOkDark:"#919191",sisyphusErrorDark:"#E7E7E7",sisyphusWarnDark:"#B7B7B7",sisyphusOkLight:"#919191",sisyphusErrorLight:"#A7A7A7",sisyphusWarnLight:"#777777"},theme:{primary:{dark:"sisyphusPrimaryDark",light:"sisyphusPrimaryLight"},secondary:{dark:"sisyphusSecondaryDark",light:"sisyphusSecondaryLight"},accent:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},error:{dark:"sisyphusErrorDark",light:"sisyphusErrorLight"},warning:{dark:"sisyphusWarnDark",light:"sisyphusWarnLight"},success:{dark:"sisyphusOkDark",light:"sisyphusOkLight"},info:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},text:{dark:"sisyphusTextDark",light:"sisyphusTextLight"},textMuted:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},background:{dark:"sisyphusBgDark",light:"sisyphusBgLight"},backgroundPanel:{dark:"sisyphusPanelDark",light:"sisyphusPanelLight"},backgroundElement:{dark:"sisyphusElemDark",light:"sisyphusElemLight"},border:{dark:"sisyphusBorderDark",light:"sisyphusBorderLight"},borderActive:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},borderSubtle:{dark:"sisyphusBorderSubtleDark",light:"sisyphusBorderSubtleLight"},diffAdded:{dark:"sisyphusOkDark",light:"sisyphusOkLight"},diffRemoved:{dark:"sisyphusErrorDark",light:"sisyphusErrorLight"},diffContext:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},diffHunkHeader:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},diffHighlightAdded:{dark:"sisyphusOkDark",light:"sisyphusOkLight"},diffHighlightRemoved:{dark:"sisyphusErrorDark",light:"sisyphusErrorLight"},diffAddedBg:{dark:"#343434",light:"#E9E9E9"},diffRemovedBg:{dark:"#444444",light:"#ECECEC"},diffContextBg:{dark:"sisyphusPanelDark",light:"sisyphusPanelLight"},diffLineNumber:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},diffAddedLineNumberBg:{dark:"#2B2B2B",light:"#F0F0F0"},diffRemovedLineNumberBg:{dark:"#343434",light:"#F2F2F2"},markdownText:{dark:"sisyphusTextDark",light:"sisyphusTextLight"},markdownHeading:{dark:"sisyphusPrimaryDark",light:"sisyphusPrimaryLight"},markdownLink:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},markdownLinkText:{dark:"sisyphusSecondaryDark",light:"sisyphusSecondaryLight"},markdownCode:{dark:"sisyphusSecondaryDark",light:"sisyphusSecondaryLight"},markdownBlockQuote:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},markdownEmph:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},markdownStrong:{dark:"sisyphusPrimaryDark",light:"sisyphusPrimaryLight"},markdownHorizontalRule:{dark:"sisyphusBorderDark",light:"sisyphusBorderLight"},markdownListItem:{dark:"sisyphusTextDark",light:"sisyphusTextLight"},markdownListEnumeration:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},markdownImage:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},markdownImageText:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},markdownCodeBlock:{dark:"sisyphusTextDark",light:"sisyphusTextLight"},syntaxComment:{dark:"sisyphusMutedDark",light:"sisyphusMutedLight"},syntaxKeyword:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},syntaxFunction:{dark:"sisyphusPrimaryDark",light:"sisyphusPrimaryLight"},syntaxVariable:{dark:"sisyphusTextDark",light:"sisyphusTextLight"},syntaxString:{dark:"sisyphusOkDark",light:"sisyphusOkLight"},syntaxNumber:{dark:"sisyphusAccentDark",light:"sisyphusAccentLight"},syntaxType:{dark:"sisyphusSecondaryDark",light:"sisyphusSecondaryLight"},syntaxOperator:{dark:"sisyphusSecondaryDark",light:"sisyphusSecondaryLight"},syntaxPunctuation:{dark:"sisyphusTextDark",light:"sisyphusTextLight"}}};var slate_default={$schema:"https://opencode.ai/theme.json",defs:{slateBgDark:"#151C2F",slatePanelDark:"#1A223A",slateElemDark:"#1E2944",slateTextDark:"#c9d1d9",slateMutedDark:"#4b5563",slatePrimaryDark:"#7eb8f6",slateAccentDark:"#8EA8FF",slateSecondaryDark:"#8EA8FF",slateBorderDark:"#4169e1",slateBorderSubtleDark:"#4b5563",slateBgLight:"#F8F8F8",slatePanelLight:"#EFEFEF",slateElemLight:"#E4E4E4",slateTextLight:"#1A1A1A",slateMutedLight:"#5A5A5A",slatePrimaryLight:"#157EEF",slateAccentLight:"#1E52FF",slateSecondaryLight:"#1E52FF",slateBorderLight:"#D0D0D0",slateBorderSubtleLight:"#E0E0E0",slateOkDark:"#63D0A6",slateErrorDark:"#F7A072",slateWarnDark:"#e6a855",slateOkLight:"#2A8A65",slateErrorLight:"#DD550D",slateWarnLight:"#A36818"},theme:{primary:{dark:"slatePrimaryDark",light:"slatePrimaryLight"},secondary:{dark:"slateSecondaryDark",light:"slateSecondaryLight"},accent:{dark:"slateAccentDark",light:"slateAccentLight"},error:{dark:"slateErrorDark",light:"slateErrorLight"},warning:{dark:"slateWarnDark",light:"slateWarnLight"},success:{dark:"slateOkDark",light:"slateOkLight"},info:{dark:"slateAccentDark",light:"slateAccentLight"},text:{dark:"slateTextDark",light:"slateTextLight"},textMuted:{dark:"slateMutedDark",light:"slateMutedLight"},background:{dark:"slateBgDark",light:"slateBgLight"},backgroundPanel:{dark:"slatePanelDark",light:"slatePanelLight"},backgroundElement:{dark:"slateElemDark",light:"slateElemLight"},border:{dark:"slateBorderDark",light:"slateBorderLight"},borderActive:{dark:"slateAccentDark",light:"slateAccentLight"},borderSubtle:{dark:"slateBorderSubtleDark",light:"slateBorderSubtleLight"},diffAdded:{dark:"slateOkDark",light:"slateOkLight"},diffRemoved:{dark:"slateErrorDark",light:"slateErrorLight"},diffContext:{dark:"slateMutedDark",light:"slateMutedLight"},diffHunkHeader:{dark:"slateMutedDark",light:"slateMutedLight"},diffHighlightAdded:{dark:"slateOkDark",light:"slateOkLight"},diffHighlightRemoved:{dark:"slateErrorDark",light:"slateErrorLight"},diffAddedBg:{dark:"#233C44",light:"#D9E8E2"},diffRemovedBg:{dark:"#3E343B",light:"#F4E0D5"},diffContextBg:{dark:"slatePanelDark",light:"slatePanelLight"},diffLineNumber:{dark:"slateMutedDark",light:"slateMutedLight"},diffAddedLineNumberBg:{dark:"#1D2E3B",light:"#E8EFEC"},diffRemovedLineNumberBg:{dark:"#2C2936",light:"#F6EBE5"},markdownText:{dark:"slateTextDark",light:"slateTextLight"},markdownHeading:{dark:"slatePrimaryDark",light:"slatePrimaryLight"},markdownLink:{dark:"slateAccentDark",light:"slateAccentLight"},markdownLinkText:{dark:"slateSecondaryDark",light:"slateSecondaryLight"},markdownCode:{dark:"slateSecondaryDark",light:"slateSecondaryLight"},markdownBlockQuote:{dark:"slateMutedDark",light:"slateMutedLight"},markdownEmph:{dark:"slateAccentDark",light:"slateAccentLight"},markdownStrong:{dark:"slatePrimaryDark",light:"slatePrimaryLight"},markdownHorizontalRule:{dark:"slateBorderDark",light:"slateBorderLight"},markdownListItem:{dark:"slateTextDark",light:"slateTextLight"},markdownListEnumeration:{dark:"slateAccentDark",light:"slateAccentLight"},markdownImage:{dark:"slateAccentDark",light:"slateAccentLight"},markdownImageText:{dark:"slateMutedDark",light:"slateMutedLight"},markdownCodeBlock:{dark:"slateTextDark",light:"slateTextLight"},syntaxComment:{dark:"slateMutedDark",light:"slateMutedLight"},syntaxKeyword:{dark:"slateAccentDark",light:"slateAccentLight"},syntaxFunction:{dark:"slatePrimaryDark",light:"slatePrimaryLight"},syntaxVariable:{dark:"slateTextDark",light:"slateTextLight"},syntaxString:{dark:"slateOkDark",light:"slateOkLight"},syntaxNumber:{dark:"slateAccentDark",light:"slateAccentLight"},syntaxType:{dark:"slateSecondaryDark",light:"slateSecondaryLight"},syntaxOperator:{dark:"slateSecondaryDark",light:"slateSecondaryLight"},syntaxPunctuation:{dark:"slateTextDark",light:"slateTextLight"}}};var solarized_default={$schema:"https://opencode.ai/theme.json",defs:{base03:"#002b36",base02:"#073642",base01:"#586e75",base00:"#657b83",base0:"#839496",base1:"#93a1a1",base2:"#eee8d5",base3:"#fdf6e3",yellow:"#b58900",orange:"#cb4b16",red:"#dc322f",magenta:"#d33682",violet:"#6c71c4",blue:"#268bd2",cyan:"#2aa198",green:"#859900"},theme:{primary:{dark:"blue",light:"blue"},secondary:{dark:"violet",light:"violet"},accent:{dark:"cyan",light:"cyan"},error:{dark:"red",light:"red"},warning:{dark:"yellow",light:"yellow"},success:{dark:"green",light:"green"},info:{dark:"orange",light:"orange"},text:{dark:"base0",light:"base00"},textMuted:{dark:"base01",light:"base1"},background:{dark:"base03",light:"base3"},backgroundPanel:{dark:"base02",light:"base2"},backgroundElement:{dark:"#073642",light:"#eee8d5"},border:{dark:"base02",light:"base2"},borderActive:{dark:"base01",light:"base1"},borderSubtle:{dark:"#073642",light:"#eee8d5"},diffAdded:{dark:"green",light:"green"},diffRemoved:{dark:"red",light:"red"},diffContext:{dark:"base01",light:"base1"},diffHunkHeader:{dark:"base01",light:"base1"},diffHighlightAdded:{dark:"green",light:"green"},diffHighlightRemoved:{dark:"red",light:"red"},diffAddedBg:{dark:"#073642",light:"#eee8d5"},diffRemovedBg:{dark:"#073642",light:"#eee8d5"},diffContextBg:{dark:"base02",light:"base2"},diffLineNumber:{dark:"base01",light:"base1"},diffAddedLineNumberBg:{dark:"#073642",light:"#eee8d5"},diffRemovedLineNumberBg:{dark:"#073642",light:"#eee8d5"},markdownText:{dark:"base0",light:"base00"},markdownHeading:{dark:"blue",light:"blue"},markdownLink:{dark:"cyan",light:"cyan"},markdownLinkText:{dark:"violet",light:"violet"},markdownCode:{dark:"green",light:"green"},markdownBlockQuote:{dark:"base01",light:"base1"},markdownEmph:{dark:"yellow",light:"yellow"},markdownStrong:{dark:"orange",light:"orange"},markdownHorizontalRule:{dark:"base01",light:"base1"},markdownListItem:{dark:"blue",light:"blue"},markdownListEnumeration:{dark:"cyan",light:"cyan"},markdownImage:{dark:"cyan",light:"cyan"},markdownImageText:{dark:"violet",light:"violet"},markdownCodeBlock:{dark:"base0",light:"base00"},syntaxComment:{dark:"base01",light:"base1"},syntaxKeyword:{dark:"green",light:"green"},syntaxFunction:{dark:"blue",light:"blue"},syntaxVariable:{dark:"cyan",light:"cyan"},syntaxString:{dark:"cyan",light:"cyan"},syntaxNumber:{dark:"magenta",light:"magenta"},syntaxType:{dark:"yellow",light:"yellow"},syntaxOperator:{dark:"green",light:"green"},syntaxPunctuation:{dark:"base0",light:"base00"}}};var synthwave84_default={$schema:"https://opencode.ai/theme.json",defs:{background:"#262335",backgroundAlt:"#1e1a29",backgroundPanel:"#2a2139",foreground:"#ffffff",foregroundMuted:"#848bbd",pink:"#ff7edb",pinkBright:"#ff92df",cyan:"#36f9f6",cyanBright:"#72f1f8",yellow:"#fede5d",yellowBright:"#fff95d",orange:"#ff8b39",orangeBright:"#ff9f43",purple:"#b084eb",purpleBright:"#c792ea",red:"#fe4450",redBright:"#ff5e5b",green:"#72f1b8",greenBright:"#97f1d8"},theme:{primary:{dark:"cyan",light:"#00bcd4"},secondary:{dark:"pink",light:"#e91e63"},accent:{dark:"purple",light:"#9c27b0"},error:{dark:"red",light:"#f44336"},warning:{dark:"yellow",light:"#ff9800"},success:{dark:"green",light:"#4caf50"},info:{dark:"orange",light:"#ff5722"},text:{dark:"foreground",light:"#262335"},textMuted:{dark:"foregroundMuted",light:"#5c5c8a"},background:{dark:"#262335",light:"#fafafa"},backgroundPanel:{dark:"#1e1a29",light:"#f5f5f5"},backgroundElement:{dark:"#2a2139",light:"#eeeeee"},border:{dark:"#495495",light:"#e0e0e0"},borderActive:{dark:"cyan",light:"#00bcd4"},borderSubtle:{dark:"#241b2f",light:"#f0f0f0"},diffAdded:{dark:"green",light:"#4caf50"},diffRemoved:{dark:"red",light:"#f44336"},diffContext:{dark:"foregroundMuted",light:"#5c5c8a"},diffHunkHeader:{dark:"purple",light:"#9c27b0"},diffHighlightAdded:{dark:"greenBright",light:"#4caf50"},diffHighlightRemoved:{dark:"redBright",light:"#f44336"},diffAddedBg:{dark:"#1a3a2a",light:"#e8f5e9"},diffRemovedBg:{dark:"#3a1a2a",light:"#ffebee"},diffContextBg:{dark:"#1e1a29",light:"#f5f5f5"},diffLineNumber:{dark:"#495495",light:"#b0b0b0"},diffAddedLineNumberBg:{dark:"#1a3a2a",light:"#e8f5e9"},diffRemovedLineNumberBg:{dark:"#3a1a2a",light:"#ffebee"},markdownText:{dark:"foreground",light:"#262335"},markdownHeading:{dark:"pink",light:"#e91e63"},markdownLink:{dark:"cyan",light:"#00bcd4"},markdownLinkText:{dark:"purple",light:"#9c27b0"},markdownCode:{dark:"green",light:"#4caf50"},markdownBlockQuote:{dark:"foregroundMuted",light:"#5c5c8a"},markdownEmph:{dark:"yellow",light:"#ff9800"},markdownStrong:{dark:"orange",light:"#ff5722"},markdownHorizontalRule:{dark:"#495495",light:"#e0e0e0"},markdownListItem:{dark:"cyan",light:"#00bcd4"},markdownListEnumeration:{dark:"purple",light:"#9c27b0"},markdownImage:{dark:"cyan",light:"#00bcd4"},markdownImageText:{dark:"purple",light:"#9c27b0"},markdownCodeBlock:{dark:"foreground",light:"#262335"},syntaxComment:{dark:"foregroundMuted",light:"#5c5c8a"},syntaxKeyword:{dark:"pink",light:"#e91e63"},syntaxFunction:{dark:"orange",light:"#ff5722"},syntaxVariable:{dark:"foreground",light:"#262335"},syntaxString:{dark:"yellow",light:"#ff9800"},syntaxNumber:{dark:"purple",light:"#9c27b0"},syntaxType:{dark:"cyan",light:"#00bcd4"},syntaxOperator:{dark:"pink",light:"#e91e63"},syntaxPunctuation:{dark:"foreground",light:"#262335"}}};var tokyonight_default={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#1a1b26",darkStep2:"#1e2030",darkStep3:"#222436",darkStep4:"#292e42",darkStep5:"#3b4261",darkStep6:"#545c7e",darkStep7:"#737aa2",darkStep8:"#9099b2",darkStep9:"#82aaff",darkStep10:"#89b4fa",darkStep11:"#828bb8",darkStep12:"#c8d3f5",darkRed:"#ff757f",darkOrange:"#ff966c",darkYellow:"#ffc777",darkGreen:"#c3e88d",darkCyan:"#86e1fc",darkPurple:"#c099ff",lightStep1:"#e1e2e7",lightStep2:"#d5d6db",lightStep3:"#c8c9ce",lightStep4:"#b9bac1",lightStep5:"#a8aecb",lightStep6:"#9699a8",lightStep7:"#737a8c",lightStep8:"#5a607d",lightStep9:"#2e7de9",lightStep10:"#1a6ce7",lightStep11:"#8990a3",lightStep12:"#3760bf",lightRed:"#f52a65",lightOrange:"#b15c00",lightYellow:"#8c6c3e",lightGreen:"#587539",lightCyan:"#007197",lightPurple:"#9854f1"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkOrange",light:"lightOrange"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkStep9",light:"lightStep9"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep3",light:"lightStep3"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkPurple",light:"lightPurple"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}};var vercel_default={$schema:"https://opencode.ai/theme.json",defs:{background100:"#0A0A0A",background200:"#000000",gray100:"#1A1A1A",gray200:"#1F1F1F",gray300:"#292929",gray400:"#2E2E2E",gray500:"#454545",gray600:"#878787",gray700:"#8F8F8F",gray900:"#A1A1A1",gray1000:"#EDEDED",blue600:"#0099FF",blue700:"#0070F3",blue900:"#52A8FF",blue1000:"#EBF8FF",red700:"#E5484D",red900:"#FF6166",red1000:"#FDECED",amber700:"#FFB224",amber900:"#F2A700",amber1000:"#FDF4DC",green700:"#46A758",green900:"#63C46D",green1000:"#E6F9E9",teal700:"#12A594",teal900:"#0AC7AC",purple700:"#8E4EC6",purple900:"#BF7AF0",pink700:"#E93D82",pink900:"#F75590",highlightPink:"#FF0080",highlightPurple:"#F81CE5",cyan:"#50E3C2",lightBackground:"#FFFFFF",lightGray100:"#FAFAFA",lightGray200:"#EAEAEA",lightGray600:"#666666",lightGray1000:"#171717"},theme:{primary:{dark:"blue700",light:"blue700"},secondary:{dark:"blue900",light:"#0062D1"},accent:{dark:"purple700",light:"purple700"},error:{dark:"red700",light:"#DC3545"},warning:{dark:"amber700",light:"#FF9500"},success:{dark:"green700",light:"#388E3C"},info:{dark:"blue900",light:"blue700"},text:{dark:"gray1000",light:"lightGray1000"},textMuted:{dark:"gray600",light:"lightGray600"},background:{dark:"background200",light:"lightBackground"},backgroundPanel:{dark:"gray100",light:"lightGray100"},backgroundElement:{dark:"gray300",light:"lightGray200"},border:{dark:"gray200",light:"lightGray200"},borderActive:{dark:"gray500",light:"#999999"},borderSubtle:{dark:"gray100",light:"#EAEAEA"},diffAdded:{dark:"green900",light:"green700"},diffRemoved:{dark:"red900",light:"red700"},diffContext:{dark:"gray600",light:"lightGray600"},diffHunkHeader:{dark:"gray600",light:"lightGray600"},diffHighlightAdded:{dark:"green900",light:"green700"},diffHighlightRemoved:{dark:"red900",light:"red700"},diffAddedBg:{dark:"#0B1D0F",light:"#E6F9E9"},diffRemovedBg:{dark:"#2A1314",light:"#FDECED"},diffContextBg:{dark:"background200",light:"lightBackground"},diffLineNumber:{dark:"gray600",light:"lightGray600"},diffAddedLineNumberBg:{dark:"#0F2613",light:"#D6F5D6"},diffRemovedLineNumberBg:{dark:"#3C1618",light:"#FFE5E5"},markdownText:{dark:"gray1000",light:"lightGray1000"},markdownHeading:{dark:"purple900",light:"purple700"},markdownLink:{dark:"blue900",light:"blue700"},markdownLinkText:{dark:"teal900",light:"teal700"},markdownCode:{dark:"green900",light:"green700"},markdownBlockQuote:{dark:"gray600",light:"lightGray600"},markdownEmph:{dark:"amber900",light:"amber700"},markdownStrong:{dark:"pink900",light:"pink700"},markdownHorizontalRule:{dark:"gray500",light:"#999999"},markdownListItem:{dark:"gray1000",light:"lightGray1000"},markdownListEnumeration:{dark:"blue900",light:"blue700"},markdownImage:{dark:"teal900",light:"teal700"},markdownImageText:{dark:"cyan",light:"teal700"},markdownCodeBlock:{dark:"gray1000",light:"lightGray1000"},syntaxComment:{dark:"gray600",light:"#888888"},syntaxKeyword:{dark:"pink900",light:"pink700"},syntaxFunction:{dark:"purple900",light:"purple700"},syntaxVariable:{dark:"blue900",light:"blue700"},syntaxString:{dark:"green900",light:"green700"},syntaxNumber:{dark:"amber900",light:"amber700"},syntaxType:{dark:"teal900",light:"teal700"},syntaxOperator:{dark:"pink900",light:"pink700"},syntaxPunctuation:{dark:"gray1000",light:"lightGray1000"}}};var vesper_default={$schema:"https://opencode.ai/theme.json",defs:{vesperBg:"#101010",vesperFg:"#FFF",vesperComment:"#8b8b8b",vesperKeyword:"#A0A0A0",vesperFunction:"#FFC799",vesperString:"#99FFE4",vesperNumber:"#FFC799",vesperError:"#FF8080",vesperWarning:"#FFC799",vesperSuccess:"#99FFE4",vesperMuted:"#A0A0A0"},theme:{primary:{dark:"#FFC799",light:"#FFC799"},secondary:{dark:"#99FFE4",light:"#99FFE4"},accent:{dark:"#FFC799",light:"#FFC799"},error:{dark:"vesperError",light:"vesperError"},warning:{dark:"vesperWarning",light:"vesperWarning"},success:{dark:"vesperSuccess",light:"vesperSuccess"},info:{dark:"#FFC799",light:"#FFC799"},text:{dark:"vesperFg",light:"vesperBg"},textMuted:{dark:"vesperMuted",light:"vesperMuted"},background:{dark:"vesperBg",light:"#FFF"},backgroundPanel:{dark:"vesperBg",light:"#F0F0F0"},backgroundElement:{dark:"vesperBg",light:"#E0E0E0"},border:{dark:"#282828",light:"#D0D0D0"},borderActive:{dark:"#FFC799",light:"#FFC799"},borderSubtle:{dark:"#1C1C1C",light:"#E8E8E8"},diffAdded:{dark:"vesperSuccess",light:"vesperSuccess"},diffRemoved:{dark:"vesperError",light:"vesperError"},diffContext:{dark:"vesperMuted",light:"vesperMuted"},diffHunkHeader:{dark:"vesperMuted",light:"vesperMuted"},diffHighlightAdded:{dark:"vesperSuccess",light:"vesperSuccess"},diffHighlightRemoved:{dark:"vesperError",light:"vesperError"},diffAddedBg:{dark:"#0d2818",light:"#e8f5e8"},diffRemovedBg:{dark:"#281a1a",light:"#f5e8e8"},diffContextBg:{dark:"vesperBg",light:"#F8F8F8"},diffLineNumber:{dark:"#505050",light:"#808080"},diffAddedLineNumberBg:{dark:"#0d2818",light:"#e8f5e8"},diffRemovedLineNumberBg:{dark:"#281a1a",light:"#f5e8e8"},markdownText:{dark:"vesperFg",light:"vesperBg"},markdownHeading:{dark:"#FFC799",light:"#FFC799"},markdownLink:{dark:"#FFC799",light:"#FFC799"},markdownLinkText:{dark:"vesperMuted",light:"vesperMuted"},markdownCode:{dark:"vesperMuted",light:"vesperMuted"},markdownBlockQuote:{dark:"vesperFg",light:"vesperBg"},markdownEmph:{dark:"vesperFg",light:"vesperBg"},markdownStrong:{dark:"vesperFg",light:"vesperBg"},markdownHorizontalRule:{dark:"#65737E",light:"#65737E"},markdownListItem:{dark:"vesperFg",light:"vesperBg"},markdownListEnumeration:{dark:"vesperFg",light:"vesperBg"},markdownImage:{dark:"#FFC799",light:"#FFC799"},markdownImageText:{dark:"vesperMuted",light:"vesperMuted"},markdownCodeBlock:{dark:"vesperFg",light:"vesperBg"},syntaxComment:{dark:"vesperComment",light:"vesperComment"},syntaxKeyword:{dark:"vesperKeyword",light:"vesperKeyword"},syntaxFunction:{dark:"vesperFunction",light:"vesperFunction"},syntaxVariable:{dark:"vesperFg",light:"vesperBg"},syntaxString:{dark:"vesperString",light:"vesperString"},syntaxNumber:{dark:"vesperNumber",light:"vesperNumber"},syntaxType:{dark:"vesperFunction",light:"vesperFunction"},syntaxOperator:{dark:"vesperKeyword",light:"vesperKeyword"},syntaxPunctuation:{dark:"vesperFg",light:"vesperBg"}}};var warm_lightmode_default={$schema:"https://opencode.ai/theme.json",defs:{warmlightmodeBgDark:"#101014",warmlightmodePanelDark:"#18181F",warmlightmodeElemDark:"#1F1F28",warmlightmodeTextDark:"#E6E6E6",warmlightmodeMutedDark:"#9A9A9A",warmlightmodePrimaryDark:"#9D681D",warmlightmodeAccentDark:"#CE661C",warmlightmodeSecondaryDark:"#9D681D",warmlightmodeBorderDark:"#A17A17",warmlightmodeBorderSubtleDark:"#806949",warmlightmodeBgLight:"#F5F0E8",warmlightmodePanelLight:"#EBE6DF",warmlightmodeElemLight:"#E1DDD5",warmlightmodeTextLight:"#2C1810",warmlightmodeMutedLight:"#8B7355",warmlightmodePrimaryLight:"#5C3D11",warmlightmodeAccentLight:"#8B4513",warmlightmodeSecondaryLight:"#5C3D11",warmlightmodeBorderLight:"#8B6914",warmlightmodeBorderSubtleLight:"#A0845C",warmlightmodeOkDark:"#2E7D32",warmlightmodeErrorDark:"#C62828",warmlightmodeWarnDark:"#E65100",warmlightmodeOkLight:"#2E7D32",warmlightmodeErrorLight:"#C62828",warmlightmodeWarnLight:"#E65100"},theme:{primary:{dark:"warmlightmodePrimaryDark",light:"warmlightmodePrimaryLight"},secondary:{dark:"warmlightmodeSecondaryDark",light:"warmlightmodeSecondaryLight"},accent:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},error:{dark:"warmlightmodeErrorDark",light:"warmlightmodeErrorLight"},warning:{dark:"warmlightmodeWarnDark",light:"warmlightmodeWarnLight"},success:{dark:"warmlightmodeOkDark",light:"warmlightmodeOkLight"},info:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},text:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"},textMuted:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},background:{dark:"warmlightmodeBgDark",light:"warmlightmodeBgLight"},backgroundPanel:{dark:"warmlightmodePanelDark",light:"warmlightmodePanelLight"},backgroundElement:{dark:"warmlightmodeElemDark",light:"warmlightmodeElemLight"},border:{dark:"warmlightmodeBorderDark",light:"warmlightmodeBorderLight"},borderActive:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},borderSubtle:{dark:"warmlightmodeBorderSubtleDark",light:"warmlightmodeBorderSubtleLight"},diffAdded:{dark:"warmlightmodeOkDark",light:"warmlightmodeOkLight"},diffRemoved:{dark:"warmlightmodeErrorDark",light:"warmlightmodeErrorLight"},diffContext:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},diffHunkHeader:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},diffHighlightAdded:{dark:"warmlightmodeOkDark",light:"warmlightmodeOkLight"},diffHighlightRemoved:{dark:"warmlightmodeErrorDark",light:"warmlightmodeErrorLight"},diffAddedBg:{dark:"#152419",light:"#D7DFCD"},diffRemovedBg:{dark:"#311418",light:"#EED2CB"},diffContextBg:{dark:"warmlightmodePanelDark",light:"warmlightmodePanelLight"},diffLineNumber:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},diffAddedLineNumberBg:{dark:"#131B17",light:"#E5E7D9"},diffRemovedLineNumberBg:{dark:"#221216",light:"#F1E0D9"},markdownText:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"},markdownHeading:{dark:"warmlightmodePrimaryDark",light:"warmlightmodePrimaryLight"},markdownLink:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},markdownLinkText:{dark:"warmlightmodeSecondaryDark",light:"warmlightmodeSecondaryLight"},markdownCode:{dark:"warmlightmodeSecondaryDark",light:"warmlightmodeSecondaryLight"},markdownBlockQuote:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},markdownEmph:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},markdownStrong:{dark:"warmlightmodePrimaryDark",light:"warmlightmodePrimaryLight"},markdownHorizontalRule:{dark:"warmlightmodeBorderDark",light:"warmlightmodeBorderLight"},markdownListItem:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"},markdownListEnumeration:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},markdownImage:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},markdownImageText:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},markdownCodeBlock:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"},syntaxComment:{dark:"warmlightmodeMutedDark",light:"warmlightmodeMutedLight"},syntaxKeyword:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},syntaxFunction:{dark:"warmlightmodePrimaryDark",light:"warmlightmodePrimaryLight"},syntaxVariable:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"},syntaxString:{dark:"warmlightmodeOkDark",light:"warmlightmodeOkLight"},syntaxNumber:{dark:"warmlightmodeAccentDark",light:"warmlightmodeAccentLight"},syntaxType:{dark:"warmlightmodeSecondaryDark",light:"warmlightmodeSecondaryLight"},syntaxOperator:{dark:"warmlightmodeSecondaryDark",light:"warmlightmodeSecondaryLight"},syntaxPunctuation:{dark:"warmlightmodeTextDark",light:"warmlightmodeTextLight"}}};var zenburn_default={$schema:"https://opencode.ai/theme.json",defs:{bg:"#3f3f3f",bgAlt:"#4f4f4f",bgPanel:"#5f5f5f",fg:"#dcdccc",fgMuted:"#9f9f9f",red:"#cc9393",redBright:"#dca3a3",green:"#7f9f7f",greenBright:"#8fb28f",yellow:"#f0dfaf",yellowDim:"#e0cf9f",blue:"#8cd0d3",blueDim:"#7cb8bb",magenta:"#dc8cc3",cyan:"#93e0e3",orange:"#dfaf8f"},theme:{primary:{dark:"blue",light:"#5f7f8f"},secondary:{dark:"magenta",light:"#8f5f8f"},accent:{dark:"cyan",light:"#5f8f8f"},error:{dark:"red",light:"#8f5f5f"},warning:{dark:"yellow",light:"#8f8f5f"},success:{dark:"green",light:"#5f8f5f"},info:{dark:"orange",light:"#8f7f5f"},text:{dark:"fg",light:"#3f3f3f"},textMuted:{dark:"fgMuted",light:"#6f6f6f"},background:{dark:"bg",light:"#ffffef"},backgroundPanel:{dark:"bgAlt",light:"#f5f5e5"},backgroundElement:{dark:"bgPanel",light:"#ebebdb"},border:{dark:"#5f5f5f",light:"#d0d0c0"},borderActive:{dark:"blue",light:"#5f7f8f"},borderSubtle:{dark:"#4f4f4f",light:"#e0e0d0"},diffAdded:{dark:"green",light:"#5f8f5f"},diffRemoved:{dark:"red",light:"#8f5f5f"},diffContext:{dark:"fgMuted",light:"#6f6f6f"},diffHunkHeader:{dark:"cyan",light:"#5f8f8f"},diffHighlightAdded:{dark:"greenBright",light:"#5f8f5f"},diffHighlightRemoved:{dark:"redBright",light:"#8f5f5f"},diffAddedBg:{dark:"#4f5f4f",light:"#efffef"},diffRemovedBg:{dark:"#5f4f4f",light:"#ffefef"},diffContextBg:{dark:"bgAlt",light:"#f5f5e5"},diffLineNumber:{dark:"#6f6f6f",light:"#b0b0a0"},diffAddedLineNumberBg:{dark:"#4f5f4f",light:"#efffef"},diffRemovedLineNumberBg:{dark:"#5f4f4f",light:"#ffefef"},markdownText:{dark:"fg",light:"#3f3f3f"},markdownHeading:{dark:"yellow",light:"#8f8f5f"},markdownLink:{dark:"blue",light:"#5f7f8f"},markdownLinkText:{dark:"cyan",light:"#5f8f8f"},markdownCode:{dark:"green",light:"#5f8f5f"},markdownBlockQuote:{dark:"fgMuted",light:"#6f6f6f"},markdownEmph:{dark:"yellowDim",light:"#8f8f5f"},markdownStrong:{dark:"orange",light:"#8f7f5f"},markdownHorizontalRule:{dark:"fgMuted",light:"#6f6f6f"},markdownListItem:{dark:"blue",light:"#5f7f8f"},markdownListEnumeration:{dark:"cyan",light:"#5f8f8f"},markdownImage:{dark:"blue",light:"#5f7f8f"},markdownImageText:{dark:"cyan",light:"#5f8f8f"},markdownCodeBlock:{dark:"fg",light:"#3f3f3f"},syntaxComment:{dark:"#7f9f7f",light:"#5f7f5f"},syntaxKeyword:{dark:"yellow",light:"#8f8f5f"},syntaxFunction:{dark:"blue",light:"#5f7f8f"},syntaxVariable:{dark:"fg",light:"#3f3f3f"},syntaxString:{dark:"red",light:"#8f5f5f"},syntaxNumber:{dark:"greenBright",light:"#5f8f5f"},syntaxType:{dark:"cyan",light:"#5f8f8f"},syntaxOperator:{dark:"yellow",light:"#8f8f5f"},syntaxPunctuation:{dark:"fg",light:"#3f3f3f"}}};var DEFAULT_THEMES={ares:ares_default,aura:aura_default,ayu:ayu_default,carbonfox:carbonfox_default,catppuccin:catppuccin_default,"catppuccin-frappe":catppuccin_frappe_default,"catppuccin-macchiato":catppuccin_macchiato_default,charizard:charizard_default,cobalt2:cobalt2_default,cursor:cursor_default,daylight:daylight_default,default:default_default,dracula:dracula_default,everforest:everforest_default,flexoki:flexoki_default,github:github_default,gruvbox:gruvbox_default,kanagawa:kanagawa_default,"lucent-orng":lucent_orng_default,material:material_default,matrix:matrix_default,mercury:mercury_default,mono:mono_default,monokai:monokai_default,nightowl:nightowl_default,nord:nord_default,"one-dark":one_dark_default,opencode:opencode_default,orng:orng_default,"osaka-jade":osaka_jade_default,palenight:palenight_default,poseidon:poseidon_default,rosepine:rosepine_default,sisyphus:sisyphus_default,slate:slate_default,solarized:solarized_default,synthwave84:synthwave84_default,tokyonight:tokyonight_default,vercel:vercel_default,vesper:vesper_default,"warm-lightmode":warm_lightmode_default,zenburn:zenburn_default},DEFAULT_THEME="tokyonight";function syntax(theme){return SyntaxStyle.fromTheme(rules(theme))}function rules(theme){return[{scope:["default"],style:{foreground:theme.text}},{scope:["comment","comment.documentation"],style:{foreground:theme.syntaxComment,italic:!0}},{scope:["string","symbol"],style:{foreground:theme.syntaxString}},{scope:["number","boolean"],style:{foreground:theme.syntaxNumber}},{scope:["keyword"],style:{foreground:theme.syntaxKeyword,italic:!0}},{scope:["keyword.return","keyword.conditional","keyword.repeat"],style:{foreground:theme.syntaxKeyword,italic:!0}},{scope:["keyword.type"],style:{foreground:theme.syntaxType,bold:!0}},{scope:["keyword.function","function.method"],style:{foreground:theme.syntaxFunction}},{scope:["function","function.call"],style:{foreground:theme.syntaxFunction}},{scope:["variable","variable.parameter"],style:{foreground:theme.syntaxVariable}},{scope:["type"],style:{foreground:theme.syntaxType}},{scope:["operator"],style:{foreground:theme.syntaxOperator}},{scope:["punctuation","punctuation.bracket","punctuation.delimiter"],style:{foreground:theme.syntaxPunctuation}},{scope:["markup.heading"],style:{foreground:theme.markdownHeading,bold:!0}},{scope:["markup.strong"],style:{foreground:theme.markdownStrong,bold:!0}},{scope:["markup.italic"],style:{foreground:theme.markdownEmph,italic:!0}},{scope:["markup.link"],style:{foreground:theme.markdownLink,underline:!0}},{scope:["markup.raw"],style:{foreground:theme.markdownCode}},{scope:["markup.list"],style:{foreground:theme.markdownListItem}}]}var exports_preferences={};__export(exports_preferences,{usePref:()=>usePref,set:()=>set,reset:()=>reset,reload:()=>reload,prefs:()=>exports_preferences,load:()=>load,get:()=>get});var import_react15=__toESM(require_react_production(),1);import{join as join5}from"path";import{existsSync as existsSync6,mkdirSync as mkdirSync2,readFileSync,writeFileSync as writeFileSync2}from"fs";import{homedir as homedir2}from"os";import{join as join4}from"path";import{existsSync as existsSync5,mkdirSync,readdirSync,renameSync}from"fs";var HOME=()=>process.env.HOME||homedir2(),HERMES_HOME=()=>process.env.HERMES_HOME||join4(HOME(),".hermes"),migrated=!1;function configDir(){let dir=process.env.HERM_CONFIG_DIR||join4(HERMES_HOME(),"herm");if(!migrated)migrated=!0,maybeMigrateLegacy(dir);return dir}function maybeMigrateLegacy(target){if(process.env.HERM_CONFIG_DIR)return;let legacy=join4(HOME(),".config","herm");if(!existsSync5(legacy)||legacy===target)return;try{if(existsSync5(target)&&readdirSync(target).length>0)return;mkdirSync(target,{recursive:!0});for(let name of readdirSync(legacy)){let src=join4(legacy,name),dst=join4(target,name);if(existsSync5(dst))continue;try{renameSync(src,dst)}catch{}}}catch{}}var DEFAULTS={mouse:!0,targetFps:30};function configFile(){return join5(configDir(),"tui.json")}var cached=null;function reset(){cached=null}function reload(){cached=null;for(let l of listeners)l()}function load(){if(cached)return cached;let CONFIG_FILE=configFile();try{if(!existsSync6(CONFIG_FILE)){let prefs2={...DEFAULTS};return cached=prefs2,prefs2}let raw=JSON.parse(readFileSync(CONFIG_FILE,"utf-8")),prefs={...DEFAULTS,...raw};return cached=prefs,prefs}catch{let prefs={...DEFAULTS};return cached=prefs,prefs}}function save(partial){let current=load();if(partial)Object.assign(current,partial);cached=current;try{let CONFIG_DIR=configDir();if(!existsSync6(CONFIG_DIR))mkdirSync2(CONFIG_DIR,{recursive:!0});let json=JSON.stringify(current,null,2)+`
|
|
3670
3670
|
`;writeFileSync2(configFile(),json,"utf-8")}catch(err){if(process.env.PERF)console.error("[preferences] failed to save:",err)}}function get(key){return load()[key]}function set(key,value){save({[key]:value});for(let l of listeners)l()}var listeners=new Set;function subscribe(l){return listeners.add(l),()=>listeners.delete(l)}function usePref(key){return import_react15.useSyncExternalStore(subscribe,()=>load()[key])}var Ctx=import_react16.createContext(null),ThemeProvider=({children,initial,mode:initialMode="dark"})=>{let active=usePref("theme")??initial??DEFAULT_THEME,[mode]=import_react16.useState(initialMode),[themes]=import_react16.useState(DEFAULT_THEMES),resolved=import_react16.useMemo(()=>{let json=themes[active]??themes[DEFAULT_THEME];try{return resolveTheme(json,mode)}catch{return resolveTheme(themes[DEFAULT_THEME],mode)}},[active,mode,themes]),names=import_react16.useMemo(()=>Object.keys(themes).sort(),[themes]),set2=import_react16.useCallback((name)=>{if(!themes[name])return!1;return set("theme",name),!0},[themes]),has=import_react16.useCallback((name)=>themes[name]!==void 0,[themes]),syntaxStyle=import_react16.useMemo(()=>syntax(resolved),[resolved]),value=import_react16.useMemo(()=>({theme:resolved,syntaxStyle,name:active,mode,set:set2,names,has}),[resolved,syntaxStyle,active,mode,set2,names,has]);return $jsx(Ctx.Provider,{value,children})},useTheme=makeUse(Ctx,"useTheme");var import_react17=__toESM(require_react_production(),1);var FRAMES=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],MS=80,subs=new Set,tick=0,timer=null;function sub(fn){if(subs.add(fn),fn(tick),!timer)timer=setInterval(()=>{tick=(tick+1)%FRAMES.length;for(let s of Array.from(subs))s(tick)},MS);return()=>{if(subs.delete(fn),subs.size===0&&timer)clearInterval(timer),timer=null}}function useGlyph(active){let ref=import_react17.useRef(null);return import_react17.useEffect(()=>{if(!active)return;return sub((n)=>{let node=ref.current;if(node)node.children=[FRAMES[n]]})},[active]),ref}var Spinner=import_react17.memo((props)=>{let theme=useTheme().theme,color=props.color??theme.textMuted,on=exports_preferences.get("animations")!==!1,ref=useGlyph(on);return $jsxs("text",{children:[$jsx("span",{ref,fg:color,children:on?FRAMES[tick]:"\u22EF"}),props.label?$jsxs("span",{fg:color,children:[" ",props.label]}):null]})}),SpinGlyph=import_react17.memo((props)=>{let on=(props.active??!0)&&exports_preferences.get("animations")!==!1,ref=useGlyph(on);return $jsx("span",{ref,fg:props.fg,children:on?FRAMES[tick]:"\u22EF"})});function useSpinnerGlyph(active=!0){let on=exports_preferences.get("animations")!==!1&&active,[n,set2]=import_react17.useState(tick);return import_react17.useEffect(()=>on?sub(set2):void 0,[on]),on?FRAMES[n]:"\u22EF"}var SPEC={terminal:{icon:"$",verb:"",pending:"Writing command\u2026"},process:{icon:"\u229A",verb:"Process",pending:"Managing process\u2026"},execute_code:{icon:"\xBB",verb:"Exec",pending:"Writing script\u2026"},read_file:{icon:"\u2192",verb:"Read",pending:"Reading file\u2026"},write_file:{icon:"\u2190",verb:"Write",pending:"Preparing write\u2026"},patch:{icon:"\u2190",verb:"Edit",pending:"Preparing edit\u2026"},search_files:{icon:"\u2731",verb:"Search",pending:"Searching\u2026"},web_search:{icon:"\u25C8",verb:"Web",pending:"Searching web\u2026"},web_extract:{icon:"%",verb:"Fetch",pending:"Fetching page\u2026"},session_search:{icon:"\u21BA",verb:"Recall",pending:"Searching memory\u2026"},browser_navigate:{icon:"%",verb:"Navigate",pending:"Navigating\u2026"},browser_click:{icon:"\xB7",verb:"Click",pending:"Clicking\u2026"},browser_type:{icon:"\u2328",verb:"Type",pending:"Typing\u2026"},browser_snapshot:{icon:"\u2399",verb:"Snapshot",pending:"Capturing\u2026"},browser_vision:{icon:"\u25C9",verb:"Vision",pending:"Looking\u2026"},vision_analyze:{icon:"\u25C9",verb:"Vision",pending:"Analyzing image\u2026"},todo:{icon:"\u2630",verb:"Todo",pending:"Updating todos\u2026"},memory:{icon:"\u2691",verb:"Memory",pending:"Updating memory\u2026"},clarify:{icon:"?",verb:"Ask",pending:"Asking\u2026"},skill_view:{icon:"\u25C6",verb:"Skill",pending:"Loading skill\u2026"},skills_list:{icon:"\u25C6",verb:"Skills",pending:"Listing skills\u2026"},skill_manage:{icon:"\u25C6",verb:"Skill",pending:"Managing skill\u2026"},delegate_task:{icon:"\u2299",verb:"Delegate",pending:"Spawning agent\u2026"},cronjob:{icon:"\u25F7",verb:"Cron",pending:"Managing cron\u2026"},text_to_speech:{icon:"\u266A",verb:"TTS",pending:"Synthesizing\u2026"},image_generate:{icon:"\u2726",verb:"Image",pending:"Generating image\u2026"}},GENERIC={icon:"\u2699",verb:"",pending:"Running\u2026"};function spec(name){if(name.startsWith("subagent"))return{icon:"\u2299",verb:"Subagent",pending:"Running\u2026"};if(name.startsWith("mcp__")||name.startsWith("mcp:"))return{icon:"\u25C7",verb:"MCP",pending:"Calling\u2026"};return SPEC[name]??GENERIC}function ms(d2){if(d2==null)return"";if(d2<1000)return`${Math.round(d2)}ms`;if(d2<60000)return`${(d2/1000).toFixed(1)}s`;return`${Math.floor(d2/60000)}m${Math.round(d2%60000/1000)}s`}var InlineTool=import_react18.memo((p)=>{let theme=useTheme().theme,[hover,setHover]=import_react18.useState(!1),s=spec(p.part.name),running=p.part.status==="running",failed=p.part.status==="error",spin=useSpinnerGlyph(running),fg2=failed?theme.error:hover&&p.onClick?theme.text:running?theme.text:theme.textMuted;return $jsxs("box",{flexDirection:"column",paddingLeft:3,onMouseOver:p.onClick?()=>setHover(!0):void 0,onMouseOut:p.onClick?()=>setHover(!1):void 0,onMouseDown:p.onClick,children:[$jsx("box",{height:1,children:$jsxs("text",{children:[$jsxs("span",{fg:running?theme.warning:p.iconColor??fg2,children:[running?spin:s.icon," "]}),p.complete??!0?$jsx("span",{fg:fg2,children:p.children}):$jsxs("span",{fg:fg2,children:["~ ",s.pending]}),p.part.duration!=null?$jsxs("span",{fg:theme.textMuted,children:[" ",ms(p.part.duration)]}):null]})}),failed&&p.part.result?$jsx("box",{minHeight:1,paddingLeft:2,children:$jsx("text",{fg:theme.error,wrapMode:"word",children:p.part.result})}):null]})});var import_react19=__toESM(require_react_production(),1);var ANSI2=/\x1b\[[0-9;?]*[A-Za-z]/g;function isDiff(s){if(!s)return!1;return/^--- a\//m.test(s)||/^@@ /m.test(s)||/^diff --git /m.test(s)}var CAP=80,WORD_CAP=40,tokens=(s)=>s.split(/(\s+)/).filter((t2)=>t2.length>0);function wordDiff(a,b2){let ta=tokens(a),tb=tokens(b2),p=0;while(p<ta.length&&p<tb.length&&ta[p]===tb[p])p++;let s=0;while(s<ta.length-p&&s<tb.length-p&&ta[ta.length-1-s]===tb[tb.length-1-s])s++;let seg=(t2)=>{let mid2=t2.slice(p,t2.length-s).join(""),out=[];if(p)out.push({text:t2.slice(0,p).join(""),hi:!1});if(mid2)out.push({text:mid2,hi:!0});if(s)out.push({text:t2.slice(t2.length-s).join(""),hi:!1});return out};return[seg(ta),seg(tb)]}function intraline(rows){let marks=rows.map(()=>null);if(rows.length>WORD_CAP)return marks;let del=(l)=>l.startsWith("-")&&!l.startsWith("---"),add=(l)=>l.startsWith("+")&&!l.startsWith("+++"),i=0;while(i<rows.length){if(!del(rows[i])){i++;continue}let j2=i;while(j2<rows.length&&del(rows[j2]))j2++;let k2=j2;while(k2<rows.length&&add(rows[k2]))k2++;let n=Math.min(j2-i,k2-j2);for(let d2=0;d2<n;d2++){let[rm,ad]=wordDiff(rows[i+d2].slice(1),rows[j2+d2].slice(1));marks[i+d2]=rm,marks[j2+d2]=ad}i=k2}return marks}var DiffBlock=import_react19.memo(({text:text2})=>{let theme=useTheme().theme,all=text2.replace(ANSI2,"").replace(/\n$/,"").split(`
|
|
3671
|
-
`),rows=all.slice(0,CAP),more=all.length-rows.length,marks=intraline(rows),fg2=(l)=>l.startsWith("@@")?theme.accent:l.startsWith("+++")||l.startsWith("---")?theme.textMuted:l.startsWith("+")?theme.success:l.startsWith("-")?theme.error:theme.textMuted;return $jsxs("box",{flexDirection:"column",backgroundColor:theme.backgroundPanel,children:[rows.map((l,i)=>{let segs=marks[i],bg2=l.startsWith("+")?theme.diffAddedBg:theme.diffRemovedBg;return $jsx("box",{height:1,overflow:"hidden",minWidth:0,children:$jsx("text",{fg:fg2(l),children:segs?$jsxs($Fragment2,{children:[l[0],segs.map((s,j2)=>s.hi?$jsx("span",{bg:bg2,children:s.text},j2):s.text)]}):l||" "})},i)}),more>0?$jsx("box",{height:1,children:$jsxs("text",{fg:theme.textMuted,children:["\u2026 ",more," more lines"]})}):null]})});var import_react20=__toESM(require_react_production(),1);function dur(d2){if(d2==null)return"";let s=d2/1000;return s<60?`${s.toFixed(1)}s`:`${Math.floor(s/60)}m${Math.round(s%60)}s`}var Subagent=import_react20.memo(({tool})=>{let theme=useTheme().theme,[open,setOpen]=import_react20.useState(!1),running=tool.status==="running",failed=tool.status==="error",spin=useSpinnerGlyph(running),trail=tool.trail??[],last=trail[trail.length-1],fg2=failed?theme.error:running?theme.text:theme.textMuted,goal=(tool.goal??tool.preview??"").replace(/\s+/g," ").trim(),sub2=running?last?`\u21B3 ${spec(last.name).verb||last.name} ${last.preview??""}`:trail.length?`\u21B3 ${trail.length} toolcalls`:"":`\u2514 ${trail.length} toolcall${trail.length===1?"":"s"}${tool.duration?` \xB7 ${dur(tool.duration)}`:""}`;return $jsxs("box",{flexDirection:"column",paddingLeft:3+(tool.depth??0)*2,onMouseDown:trail.length?()=>setOpen((o)=>!o):void 0,children:[$jsx("box",{height:1,children:$jsxs("text",{children:[$jsxs("span",{fg:running?theme.warning:fg2,children:[running?spin:"\u2299"," "]}),$jsxs("span",{fg:fg2,children:["Task \u2014 ",goal||"delegating\u2026"]})]})}),open?$jsxs("box",{flexDirection:"column",children:[trail.map((c,i)=>{let s=spec(c.name),lbl=s.verb?`${s.verb} ${c.preview??""}`:c.preview??c.name;return $jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.textMuted,children:i<trail.length-1?"\u251C\u2500 ":"\u2514\u2500 "}),$jsxs("span",{fg:theme.textMuted,children:[s.icon," ",lbl]})]})},i)}),tool.result?$jsx("box",{minHeight:1,marginTop:1,children:$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:tool.result})}):null]}):sub2?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:sub2})}):null]})});var FILE=new Set(["write_file","patch"]);function short(s,n=120){if(!s)return"";let one=s.replace(/\s+/g," ").trim();return one.length>n?one.slice(0,n-1)+"\u2026":one}function base(path6){let clean=path6.replace(/\/+$/,""),slash=clean.lastIndexOf("/");return slash>=0?clean.slice(slash+1):clean}var Inline=import_react21.memo(({tool})=>{let s=spec(tool.name),body=tool.preview?short(tool.preview):"";return $jsx(InlineTool,{part:tool,complete:!!body||tool.status!=="running",children:s.verb?`${s.verb} ${body}`:body||tool.name})}),FileEdit=import_react21.memo(({tool})=>{let theme=useTheme().theme;if(tool.status==="running"||!tool.preview)return $jsx(Inline,{tool});return $jsx(InlineTool,{part:tool,children:$jsxs("span",{bg:theme.accent,fg:theme.background,children:[" changed ",short(base(tool.preview),48)," "]})})}),Tool=import_react21.memo(({tool,detail="expanded"})=>{if(detail==="hidden"&&tool.status!=="running")return null;if(tool.trail||tool.name==="delegate_task")return $jsx(Subagent,{tool});if(FILE.has(tool.name)||tool.diff||isDiff(tool.result))return $jsx(FileEdit,{tool});return $jsx(Inline,{tool})});var CLOUD_MIN=12,CLOUD_MAX=24,CLOUD={topLeft:"\u250F",topRight:"\u2513",bottomLeft:"\u2517",bottomRight:"\u251B",horizontal:"\u2505",vertical:"\u2507",topT:"\u2505",bottomT:"\u2505",leftT:"\u2507",rightT:"\u2507",cross:"\u254B"},SLOTS=[["\u250F\u2505\u2505\u2513 ","\u2517\u2505\u2505\u251B "],[" \u250F\u2513 "," \u2517\u251B "],[" \u2578 "," "]],BLANK=" ",ORDER=[2,1,0,-1],Tail=import_react22.memo((props)=>{let theme=useTheme().theme,refs=import_react22.useRef([]),paint=(lit)=>{SLOTS.forEach((slot,i)=>slot.forEach((l,j2)=>{let node=refs.current[i*2+j2];if(node)node.children=[lit===null||lit===i?l:BLANK]}))};return import_react22.useEffect(()=>{if(!props.run){paint(null);return}let f=0;paint(ORDER[0]);let t2=setInterval(()=>{f=(f+1)%ORDER.length,paint(ORDER[f])},160);return()=>{clearInterval(t2),paint(null)}},[props.run]),$jsx("box",{flexDirection:"column",children:SLOTS.flatMap((slot,i)=>slot.map((l,j2)=>$jsx("text",{fg:theme.hermAvatar,children:$jsx("span",{ref:(el)=>{refs.current[i*2+j2]=el},children:l})},`${i}-${j2}`)))})});function parts(m2){return m2?.parts.filter((p)=>p.type==="thinking"||p.type==="tool")??[]}function latest(messages){for(let i=messages.length-1;i>=0;i--)if(messages[i].role==="assistant")return messages[i];return}function rows(list){return list.reduce((n,p)=>n+(p.type==="thinking"?Math.ceil(p.content.length/80)||1:p.type==="tool"&&p.diff?6:1),0)}var ThoughtCloud=import_react22.memo((props)=>{let theme=useTheme().theme,detail=usePref("toolDetails")??"expanded",src=props.pick??latest(props.messages),all=parts(src),think=all.filter((p)=>p.type==="thinking"),tools=all.filter((p)=>p.type==="tool"),[pane,setPane]=import_react22.useState("all"),body=pane==="reasoning"?think:pane==="tools"?tools:all,manual=import_react22.useRef(!1),want=Math.min(CLOUD_MAX,Math.max(CLOUD_MIN,rows(body)+3)),resize=props.onResize;import_react22.useEffect(()=>{if(!manual.current)resize(want)},[want,resize]);let drag=import_react22.useRef(null),grab=(e)=>{drag.current={y:e.y,h:props.height},manual.current=!0,e.stopPropagation()},move=(e)=>{let d2=drag.current;if(!d2)return;resize(Math.min(CLOUD_MAX,Math.max(CLOUD_MIN,d2.h+(e.y-d2.y))))},drop=()=>{drag.current=null},pill=(id,label,n)=>{let on=pane===id;return $jsx("box",{height:1,marginRight:2,onMouseDown:(e)=>{e.stopPropagation(),setPane(id)},children:$jsxs("text",{children:[$jsx("span",{fg:on?theme.accent:theme.textMuted,children:on?$jsx("strong",{children:label}):label}),n>0?$jsx("span",{fg:theme.textMuted,children:` ${n}`}):null]})})};return $jsxs("box",{height:props.height,flexDirection:"column",position:"relative",border:!0,borderColor:theme.hermAvatar,customBorderChars:CLOUD,backgroundColor:theme.backgroundPanel,paddingX:1,children:[$jsxs("box",{height:1,flexShrink:0,flexDirection:"row",children:[pill("all","all",all.length),pill("reasoning","reasoning",think.length),pill("tools","tools",tools.length),$jsx("box",{flexGrow:1}),detail!=="expanded"?$jsx("box",{marginRight:1,children:$jsxs("text",{fg:theme.textMuted,children:["\u27E8",detail,"\u27E9"]})}):null,props.onClose?$jsx("box",{width:1,onMouseDown:props.onClose,children:$jsx("text",{fg:theme.textMuted,children:"\xD7"})}):null]}),$jsx("scrollbox",{scrollY:!0,stickyScroll:!0,stickyStart:"bottom",flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:body.map((p,i)=>p.type==="thinking"?$jsx("box",{minHeight:1,width:"100%",flexShrink:0,children:$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:p.content})},p.key??`th-${i}`):$jsx("box",{width:"100%",flexShrink:0,children:$jsx(Tool,{tool:p,detail:detail==="hidden"?"hidden":"collapsed"})},p.id||`t-${i}`))})}),$jsx("box",{position:"absolute",left:0,right:0,bottom:0,height:1,onMouseDown:grab,onMouseDrag:move,onMouseUp:drop,onMouseDragEnd:drop})]})});var import_react28=__toESM(require_react_production(),1);var import_react23=__toESM(require_react_production(),1);var def=(chord,desc,scope)=>({chord,desc,scope}),DEFAULTS2={leader:def("ctrl+x","Leader prefix","global"),"app.exit":def("ctrl+c","Quit","global"),"input.clear":def("ctrl+c","Clear input","global"),"app.suspend":def("ctrl+z","Suspend to shell","global"),"app.redraw":def("ctrl+l","Clear & force-repaint terminal","global"),"app.sidebar":def("<leader>b","Toggle sidebar","global"),"palette.open":def("ctrl+k","Command palette","global"),"help.open":def("f1","Keyboard shortcuts","global"),"tab.next":def("alt+right","Next tab","global"),"tab.prev":def("alt+left","Previous tab","global"),"focus.cycle":def("tab","Cycle focus (double-tap \u2192 composer)","global"),"editor.open":def("<leader>e,ctrl+g","Open $EDITOR on prompt","global"),"reply.copy":def("<leader>y,ctrl+y","Copy last assistant reply","global"),"clipboard.attach":def("alt+v","Attach clipboard image","global"),"queue.flush":def("<leader>u","Interrupt and send queued now","global"),"session.interrupt":def("escape","Interrupt (double-tap while streaming)","global"),"session.new":def("<leader>n","New session","global"),"session.redo":def("<leader>r","Redo last undo","global"),"session.compress":def("<leader>c","Compress context","global"),"input.stash":def("<leader>p","Stash prompt draft","global"),"session.timeline":def("<leader>g","Session timeline","global"),"theme.pick":def("<leader>t","Switch theme","global"),"model.pick":def("<leader>m","Switch model","global"),"status.open":def("<leader>s","Show status","global"),"list.up":def("up","Move selection up","list"),"list.down":def("down","Move selection down","list"),"list.pageUp":def("pageup","Page up","list"),"list.pageDown":def("pagedown","Page down","list"),"list.home":def("home","First item","list"),"list.end":def("end","Last item","list"),"list.activate":def("return","Activate / open","list"),"list.delete":def("d,delete","Delete item","list"),"list.refresh":def("r","Reload","list"),"list.new":def("n","Create","list"),"list.search":def("/","Filter","list"),"list.toggle":def("space","Toggle item","list"),"dialog.accept":def("return","Accept","dialog"),"dialog.cancel":def("escape","Cancel / close","dialog"),"dialog.confirm":def("y","Yes","dialog"),"dialog.deny":def("n","No","dialog"),"dialog.copy":def("c","Copy body","dialog"),"input.submit":def("return","Send","composer"),"input.newline":def("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline","composer"),"sessions.rename":def("ctrl+r","Retitle session","sessions"),"sessions.prev":def("left","Walk lineage back (continues from)","sessions"),"sessions.next":def("right","Walk lineage forward (compressed to)","sessions"),"agents.kill":def("k","Kill subagent","agents"),"agents.history":def("h","Spawn history","agents"),"agents.install":def("i","Install distribution","agents"),"config.save":def("ctrl+s","Write config","config"),"config.mode":def("m","Toggle form \u2194 YAML","config")};var TAB_SCOPES=new Set(["sessions","cron","env","agents","skills","config"]);function scopesOverlap(a,b2){if(a===b2)return!0;if(a==="global"||b2==="global")return!0;if(a==="list")return TAB_SCOPES.has(b2);if(b2==="list")return TAB_SCOPES.has(a);return!1}var ALIAS={esc:"escape",enter:"return",del:"delete",ins:"insert",space:"space"," ":"space"};function parse2(spec2){if(!spec2||spec2==="none")return[];return spec2.split(",").map(one)}function one(combo){let c={name:"",ctrl:!1,meta:!1,shift:!1,super:!1,leader:!1};for(let raw of combo.replace(/<leader>/g,"leader+").toLowerCase().split("+")){let p=raw.trim();if(!p)continue;if(p==="ctrl")c.ctrl=!0;else if(p==="alt"||p==="meta"||p==="option")c.meta=!0;else if(p==="shift")c.shift=!0;else if(p==="super"||p==="cmd")c.super=!0;else if(p==="leader")c.leader=!0;else c.name=ALIAS[p]??p}return c}function from(key,leader=!1){return{name:key.name===" "?"space":key.name,ctrl:key.ctrl,meta:key.meta,shift:key.shift,super:key.super??!1,leader}}function eq(a,b2){return a.name===b2.name&&a.ctrl===b2.ctrl&&a.meta===b2.meta&&a.shift===b2.shift&&a.super===b2.super&&a.leader===b2.leader}function match(list,key,leader=!1){if(list.length===0)return!1;let k2=from(key,leader);return list.some((c)=>eq(c,k2))}function print(list,lead){let c=list[0];if(!c)return"";let mods=[];if(c.ctrl)mods.push("Ctrl");if(c.meta)mods.push("Alt");if(c.super)mods.push("Super");if(c.shift)mods.push("Shift");let name=LABEL[c.name]??cap(c.name),body=[...mods,name].join("+");if(!c.leader)return body;return lead?`${lead} ${body}`:`<leader> ${body}`}var LABEL={return:"Enter",escape:"Esc",space:"Space",delete:"Del",backspace:"\u232B",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"PgUp",pagedown:"PgDn",home:"Home",end:"End",tab:"Tab"};function cap(s){return s.length===1?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1)}function toBindings(list,action){return list.map((c)=>({name:c.name,ctrl:c.ctrl||void 0,meta:c.meta||void 0,shift:c.shift||void 0,super:c.super||void 0,action}))}function key(c){return`${c.leader?"L":""}${c.ctrl?"C":""}${c.meta?"M":""}${c.shift?"S":""}${c.super?"W":""}-${c.name}`}var LEADER_MS=2000,Ctx2=import_react23.createContext(null),NO_OVERRIDES=Object.freeze({}),KeysProvider=({children})=>{let renderer=useRenderer(),overrides=usePref("keys")??NO_OVERRIDES,table=import_react23.useMemo(()=>{let t2=new Map;for(let id of Object.keys(DEFAULTS2))t2.set(id,parse2(overrides[id]??DEFAULTS2[id].chord));return t2},[overrides]),lead=table.get("leader"),leadLabel=print(lead),armed=import_react23.useRef(!1),stolen=import_react23.useRef(null),timer2=import_react23.useRef(null),[,bump]=import_react23.useState(0),disarm=import_react23.useCallback(()=>{if(!armed.current)return;if(armed.current=!1,timer2.current)clearTimeout(timer2.current),timer2.current=null;let f=stolen.current;if(stolen.current=null,f&&!f.isDestroyed&&!renderer.currentFocusedRenderable)f.focus();bump((n)=>n+1)},[renderer]),arm=import_react23.useCallback(()=>{if(armed.current=!0,stolen.current=renderer.currentFocusedRenderable??null,stolen.current?.blur(),timer2.current)clearTimeout(timer2.current);timer2.current=setTimeout(disarm,LEADER_MS),bump((n)=>n+1)},[renderer,disarm]);useKeyboard((key2)=>{if(!armed.current&&match(lead,key2)){arm(),key2.stopPropagation();return}if(armed.current)queueMicrotask(disarm)});let value=import_react23.useMemo(()=>({get leader(){return armed.current},match:(id,key2)=>match(table.get(id)??[],key2,armed.current),print:(id)=>print(table.get(id)??[],leadLabel),chord:(id)=>table.get(id)??[],all:(scope)=>Object.keys(DEFAULTS2).filter((id)=>DEFAULTS2[id].scope===scope).map((id)=>({id,desc:DEFAULTS2[id].desc,scope,chord:table.get(id)??[]})),table}),[table,leadLabel]);return $jsx(Ctx2.Provider,{value,children})},useKeys=makeUse(Ctx2,"useKeys");var import_react25=__toESM(require_react_production(),1);function handleListKey(keys,key2,o){let move=(next)=>{o.setSel((p)=>{let n=Math.max(0,Math.min(o.count-1,next(p)));return o.scrollTo?.(n),n})},pg=o.page??10;if(keys.match("list.up",key2))return move((p)=>p-1),!0;if(keys.match("list.down",key2))return move((p)=>p+1),!0;if(keys.match("list.pageUp",key2))return move((p)=>p-pg),!0;if(keys.match("list.pageDown",key2))return move((p)=>p+pg),!0;if(keys.match("list.home",key2))return move(()=>0),!0;if(keys.match("list.end",key2))return move(()=>o.count-1),!0;if(o.onActivate&&keys.match("list.activate",key2))return o.onActivate(),!0;if(o.onDelete&&keys.match("list.delete",key2))return o.onDelete(),!0;if(o.onRefresh&&keys.match("list.refresh",key2))return o.onRefresh(),!0;if(o.onNew&&keys.match("list.new",key2))return o.onNew(),!0;if(o.onToggle&&keys.match("list.toggle",key2))return o.onToggle(),!0;if(o.onSearch&&keys.match("list.search",key2))return o.onSearch(),!0;return!1}function useListKeys(o){let keys=useKeys();return useKeyboard((key2)=>{if(!(typeof o.active==="function"?o.active():o.active))return;if(handleListKey(keys,key2,o))return;o.also?.(key2,keys)}),keys}function useFollow(prefix){let ref=import_react25.useRef(null),id=(i)=>`${prefix}-row-${i}`;return{ref,id,opts:{scrollTo:(n)=>ref.current?.scrollChildIntoView(id(n)),get page(){return Math.max(1,(ref.current?.viewport.height??10)-1)}}}}function conflicts(table){let buckets=new Map;for(let[id,chords]of table)for(let c of chords){let k2=key(c),b2=buckets.get(k2);if(b2)b2.push([id,c]);else buckets.set(k2,[[id,c]])}let out=[];for(let bucket of buckets.values()){if(bucket.length<2)continue;for(let i=0;i<bucket.length;i++)for(let j2=i+1;j2<bucket.length;j2++){let[a,c]=bucket[i],[b2]=bucket[j2];if(scopesOverlap(DEFAULTS2[a].scope,DEFAULTS2[b2].scope))out.push({chord:c,a,b:b2})}}return out}function conflictsWith(table,id){let mine=new Set((table.get(id)??[]).map(key));if(mine.size===0)return[];let scope=DEFAULTS2[id].scope,out=[];for(let[other,chords]of table){if(other===id)continue;if(!scopesOverlap(scope,DEFAULTS2[other].scope))continue;if(chords.some((c)=>mine.has(key(c))))out.push(other)}return out}var import_react27=__toESM(require_react_production(),1);var TabStrip=import_react27.memo(({tabs,active,onChange,hint})=>{let theme=useTheme().theme;return $jsxs("box",{width:"100%",flexDirection:"row",height:1,overflow:"hidden",children:[tabs.map((name,i)=>$jsx("box",{onMouseDown:()=>onChange(i),paddingX:2,marginRight:1,flexShrink:0,backgroundColor:i===active?theme.backgroundElement:void 0,children:$jsx("text",{fg:i===active?theme.primary:theme.textMuted,children:$jsx("strong",{children:name})})},i)),$jsx("box",{flexGrow:1,minWidth:0}),hint?$jsx("box",{paddingX:1,flexShrink:1,minWidth:0,overflow:"hidden",children:$jsx("text",{fg:theme.borderSubtle,children:hint})}):null]})});var TabBar=import_react28.memo(({tabs,activeTab,onTabChange})=>{let keys=useKeys(),hint=`${keys.print("tab.prev")}/${keys.print("tab.next")} or ${keys.print("leader")} N`;return $jsx(TabStrip,{tabs:tabs.map((t2)=>t2.name),active:activeTab,onChange:onTabChange,hint})});var import_react32=__toESM(require_react_production(),1);var import_react29=__toESM(require_react_production(),1);var default_default2=`{"eikon":1,"name":"nous-girl","width":48,"height":24,"author":"kaio","created":"2026-05-04T02:32:53.930Z"}
|
|
3671
|
+
`),rows=all.slice(0,CAP),more=all.length-rows.length,marks=intraline(rows),fg2=(l)=>l.startsWith("@@")?theme.accent:l.startsWith("+++")||l.startsWith("---")?theme.textMuted:l.startsWith("+")?theme.success:l.startsWith("-")?theme.error:theme.textMuted;return $jsxs("box",{flexDirection:"column",backgroundColor:theme.backgroundPanel,children:[rows.map((l,i)=>{let segs=marks[i],bg2=l.startsWith("+")?theme.diffAddedBg:theme.diffRemovedBg;return $jsx("box",{height:1,overflow:"hidden",minWidth:0,children:$jsx("text",{fg:fg2(l),children:segs?$jsxs($Fragment2,{children:[l[0],segs.map((s,j2)=>s.hi?$jsx("span",{bg:bg2,children:s.text},j2):s.text)]}):l||" "})},i)}),more>0?$jsx("box",{height:1,children:$jsxs("text",{fg:theme.textMuted,children:["\u2026 ",more," more lines"]})}):null]})});var import_react20=__toESM(require_react_production(),1);function dur(d2){if(d2==null)return"";let s=d2/1000;return s<60?`${s.toFixed(1)}s`:`${Math.floor(s/60)}m${Math.round(s%60)}s`}var Subagent=import_react20.memo(({tool})=>{let theme=useTheme().theme,[open,setOpen]=import_react20.useState(!1),running=tool.status==="running",failed=tool.status==="error",spin=useSpinnerGlyph(running),trail=tool.trail??[],last=trail[trail.length-1],fg2=failed?theme.error:running?theme.text:theme.textMuted,goal=(tool.goal??tool.preview??"").replace(/\s+/g," ").trim(),sub2=running?last?`\u21B3 ${spec(last.name).verb||last.name} ${last.preview??""}`:trail.length?`\u21B3 ${trail.length} toolcalls`:"":`\u2514 ${trail.length} toolcall${trail.length===1?"":"s"}${tool.duration?` \xB7 ${dur(tool.duration)}`:""}`;return $jsxs("box",{flexDirection:"column",paddingLeft:3+(tool.depth??0)*2,onMouseDown:trail.length?()=>setOpen((o)=>!o):void 0,children:[$jsx("box",{height:1,children:$jsxs("text",{children:[$jsxs("span",{fg:running?theme.warning:fg2,children:[running?spin:"\u2299"," "]}),$jsxs("span",{fg:fg2,children:["Task \u2014 ",goal||"delegating\u2026"]})]})}),open?$jsxs("box",{flexDirection:"column",children:[trail.map((c,i)=>{let s=spec(c.name),lbl=s.verb?`${s.verb} ${c.preview??""}`:c.preview??c.name;return $jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.textMuted,children:i<trail.length-1?"\u251C\u2500 ":"\u2514\u2500 "}),$jsxs("span",{fg:theme.textMuted,children:[s.icon," ",lbl]})]})},i)}),tool.result?$jsx("box",{minHeight:1,marginTop:1,children:$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:tool.result})}):null]}):sub2?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:sub2})}):null]})});var FILE=new Set(["write_file","patch"]);function short(s,n=120){if(!s)return"";let one=s.replace(/\s+/g," ").trim();return one.length>n?one.slice(0,n-1)+"\u2026":one}function base(path6){let clean=path6.replace(/\/+$/,""),slash=clean.lastIndexOf("/");return slash>=0?clean.slice(slash+1):clean}var Inline=import_react21.memo(({tool})=>{let s=spec(tool.name),body=tool.preview?short(tool.preview):"";return $jsx(InlineTool,{part:tool,complete:!!body||tool.status!=="running",children:s.verb?`${s.verb} ${body}`:body||tool.name})}),FileEdit=import_react21.memo(({tool})=>{let theme=useTheme().theme;if(tool.status==="running"||!tool.preview)return $jsx(Inline,{tool});return $jsx(InlineTool,{part:tool,children:$jsxs("span",{bg:theme.accent,fg:theme.background,children:[" changed ",short(base(tool.preview),48)," "]})})}),Tool=import_react21.memo(({tool,detail="expanded"})=>{if(detail==="hidden"&&tool.status!=="running")return null;if(tool.trail||tool.name==="delegate_task")return $jsx(Subagent,{tool});if(FILE.has(tool.name)||tool.diff||isDiff(tool.result))return $jsx(FileEdit,{tool});return $jsx(Inline,{tool})});var CLOUD_MIN=12,CLOUD_MAX=24,CLOUD={topLeft:"\u250F",topRight:"\u2513",bottomLeft:"\u2517",bottomRight:"\u251B",horizontal:"\u2505",vertical:"\u2507",topT:"\u2505",bottomT:"\u2505",leftT:"\u2507",rightT:"\u2507",cross:"\u254B"},SLOTS=[["\u250F\u2505\u2505\u2513 ","\u2517\u2505\u2505\u251B "],[" \u250F\u2513 "," \u2517\u251B "],[" \u2578 "," "]],BLANK=" ",ORDER=[2,1,0,-1],Tail=import_react22.memo((props)=>{let theme=useTheme().theme,refs=import_react22.useRef([]),paint=(lit)=>{SLOTS.forEach((slot,i)=>slot.forEach((l,j2)=>{let node=refs.current[i*2+j2];if(node)node.children=[lit===null||lit===i?l:BLANK]}))};return import_react22.useEffect(()=>{if(!props.run){paint(null);return}let f=0;paint(ORDER[0]);let t2=setInterval(()=>{f=(f+1)%ORDER.length,paint(ORDER[f])},160);return()=>{clearInterval(t2),paint(null)}},[props.run]),$jsx("box",{flexDirection:"column",children:SLOTS.flatMap((slot,i)=>slot.map((l,j2)=>$jsx("text",{fg:theme.hermAvatar,children:$jsx("span",{ref:(el)=>{refs.current[i*2+j2]=el},children:l})},`${i}-${j2}`)))})});function parts(m2){return m2?.parts.filter((p)=>p.type==="thinking"||p.type==="tool")??[]}function latest(messages){for(let i=messages.length-1;i>=0;i--)if(messages[i].role==="assistant")return messages[i];return}function rows(list){return list.reduce((n,p)=>n+(p.type==="thinking"?Math.ceil(p.content.length/80)||1:p.type==="tool"&&p.diff?6:1),0)}var ThoughtCloud=import_react22.memo((props)=>{let theme=useTheme().theme,detail=usePref("toolDetails")??"expanded",src=props.pick??latest(props.messages),all=parts(src),think=all.filter((p)=>p.type==="thinking"),tools=all.filter((p)=>p.type==="tool"),[pane,setPane]=import_react22.useState("all"),body=pane==="reasoning"?think:pane==="tools"?tools:all,manual=import_react22.useRef(!1),want=Math.min(CLOUD_MAX,Math.max(CLOUD_MIN,rows(body)+3)),resize=props.onResize;import_react22.useEffect(()=>{if(!manual.current)resize(want)},[want,resize]);let drag=import_react22.useRef(null),grab=(e)=>{drag.current={y:e.y,h:props.height},manual.current=!0,e.stopPropagation()},move=(e)=>{let d2=drag.current;if(!d2)return;resize(Math.min(CLOUD_MAX,Math.max(CLOUD_MIN,d2.h+(e.y-d2.y))))},drop=()=>{drag.current=null},pill=(id,label,n)=>{let on=pane===id;return $jsx("box",{height:1,marginRight:2,onMouseDown:(e)=>{e.stopPropagation(),setPane(id)},children:$jsxs("text",{children:[$jsx("span",{fg:on?theme.accent:theme.textMuted,children:on?$jsx("strong",{children:label}):label}),n>0?$jsx("span",{fg:theme.textMuted,children:` ${n}`}):null]})})};return $jsxs("box",{height:props.height,flexDirection:"column",position:"relative",border:!0,borderColor:theme.hermAvatar,customBorderChars:CLOUD,backgroundColor:theme.backgroundPanel,paddingX:1,children:[$jsxs("box",{height:1,flexShrink:0,flexDirection:"row",children:[pill("all","all",all.length),pill("reasoning","reasoning",think.length),pill("tools","tools",tools.length),$jsx("box",{flexGrow:1}),detail!=="expanded"?$jsx("box",{marginRight:1,children:$jsxs("text",{fg:theme.textMuted,children:["\u27E8",detail,"\u27E9"]})}):null,props.onClose?$jsx("box",{width:1,onMouseDown:props.onClose,children:$jsx("text",{fg:theme.textMuted,children:"\xD7"})}):null]}),$jsx("scrollbox",{scrollY:!0,stickyScroll:!0,stickyStart:"bottom",flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:body.map((p,i)=>p.type==="thinking"?$jsx("box",{minHeight:1,width:"100%",flexShrink:0,children:$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:p.content})},p.key??`th-${i}`):$jsx("box",{width:"100%",flexShrink:0,children:$jsx(Tool,{tool:p,detail:detail==="hidden"?"hidden":"collapsed"})},p.id||`t-${i}`))})}),$jsx("box",{position:"absolute",left:0,right:0,bottom:0,height:1,onMouseDown:grab,onMouseDrag:move,onMouseUp:drop,onMouseDragEnd:drop})]})});var import_react28=__toESM(require_react_production(),1);var import_react23=__toESM(require_react_production(),1);var def=(chord,desc,scope)=>({chord,desc,scope}),DEFAULTS2={leader:def("ctrl+x","Leader prefix","global"),"app.exit":def("ctrl+c","Quit","global"),"input.clear":def("ctrl+c","Clear input","global"),"app.suspend":def("ctrl+z","Suspend to shell","global"),"app.redraw":def("ctrl+l","Clear & force-repaint terminal","global"),"app.sidebar":def("<leader>b","Toggle sidebar","global"),"palette.open":def("ctrl+k","Command palette","global"),"help.open":def("f1","Keyboard shortcuts","global"),"tab.next":def("alt+right","Next tab","global"),"tab.prev":def("alt+left","Previous tab","global"),"focus.cycle":def("tab","Cycle focus (double-tap \u2192 composer)","global"),"editor.open":def("<leader>e,ctrl+g","Open $EDITOR on prompt","global"),"reply.copy":def("<leader>y,ctrl+y","Copy last assistant reply","global"),"clipboard.attach":def("ctrl+v","Attach clipboard image","global"),"queue.flush":def("<leader>u","Interrupt and send queued now","global"),"session.interrupt":def("escape","Interrupt (double-tap while streaming)","global"),"session.new":def("<leader>n","New session","global"),"session.redo":def("<leader>r","Redo last undo","global"),"session.compress":def("<leader>c","Compress context","global"),"input.stash":def("<leader>p","Stash prompt draft","global"),"session.timeline":def("<leader>g","Session timeline","global"),"theme.pick":def("<leader>t","Switch theme","global"),"model.pick":def("<leader>m","Switch model","global"),"status.open":def("<leader>s","Show status","global"),"list.up":def("up","Move selection up","list"),"list.down":def("down","Move selection down","list"),"list.pageUp":def("pageup","Page up","list"),"list.pageDown":def("pagedown","Page down","list"),"list.home":def("home","First item","list"),"list.end":def("end","Last item","list"),"list.activate":def("return","Activate / open","list"),"list.delete":def("d,delete","Delete item","list"),"list.refresh":def("r","Reload","list"),"list.new":def("n","Create","list"),"list.search":def("/","Filter","list"),"list.toggle":def("space","Toggle item","list"),"dialog.accept":def("return","Accept","dialog"),"dialog.cancel":def("escape","Cancel / close","dialog"),"dialog.confirm":def("y","Yes","dialog"),"dialog.deny":def("n","No","dialog"),"dialog.copy":def("c","Copy body","dialog"),"input.submit":def("return","Send","composer"),"input.newline":def("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline","composer"),"sessions.rename":def("ctrl+r","Retitle session","sessions"),"sessions.prev":def("left","Walk lineage back (continues from)","sessions"),"sessions.next":def("right","Walk lineage forward (compressed to)","sessions"),"agents.kill":def("k","Kill subagent","agents"),"agents.history":def("h","Spawn history","agents"),"agents.install":def("i","Install distribution","agents"),"config.save":def("ctrl+s","Write config","config"),"config.mode":def("m","Toggle form \u2194 YAML","config")};var TAB_SCOPES=new Set(["sessions","cron","env","agents","skills","config"]);function scopesOverlap(a,b2){if(a===b2)return!0;if(a==="global"||b2==="global")return!0;if(a==="list")return TAB_SCOPES.has(b2);if(b2==="list")return TAB_SCOPES.has(a);return!1}var ALIAS={esc:"escape",enter:"return",del:"delete",ins:"insert",space:"space"," ":"space"};function parse2(spec2){if(!spec2||spec2==="none")return[];return spec2.split(",").map(one)}function one(combo){let c={name:"",ctrl:!1,meta:!1,shift:!1,super:!1,leader:!1};for(let raw of combo.replace(/<leader>/g,"leader+").toLowerCase().split("+")){let p=raw.trim();if(!p)continue;if(p==="ctrl")c.ctrl=!0;else if(p==="alt"||p==="meta"||p==="option")c.meta=!0;else if(p==="shift")c.shift=!0;else if(p==="super"||p==="cmd")c.super=!0;else if(p==="leader")c.leader=!0;else c.name=ALIAS[p]??p}return c}function from(key,leader=!1){return{name:key.name===" "?"space":key.name,ctrl:key.ctrl,meta:key.meta,shift:key.shift,super:key.super??!1,leader}}function eq(a,b2){return a.name===b2.name&&a.ctrl===b2.ctrl&&a.meta===b2.meta&&a.shift===b2.shift&&a.super===b2.super&&a.leader===b2.leader}function match(list,key,leader=!1){if(list.length===0)return!1;let k2=from(key,leader);return list.some((c)=>eq(c,k2))}function print(list,lead){let c=list[0];if(!c)return"";let mods=[];if(c.ctrl)mods.push("Ctrl");if(c.meta)mods.push("Alt");if(c.super)mods.push("Super");if(c.shift)mods.push("Shift");let name=LABEL[c.name]??cap(c.name),body=[...mods,name].join("+");if(!c.leader)return body;return lead?`${lead} ${body}`:`<leader> ${body}`}var LABEL={return:"Enter",escape:"Esc",space:"Space",delete:"Del",backspace:"\u232B",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"PgUp",pagedown:"PgDn",home:"Home",end:"End",tab:"Tab"};function cap(s){return s.length===1?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1)}function toBindings(list,action){return list.map((c)=>({name:c.name,ctrl:c.ctrl||void 0,meta:c.meta||void 0,shift:c.shift||void 0,super:c.super||void 0,action}))}function key(c){return`${c.leader?"L":""}${c.ctrl?"C":""}${c.meta?"M":""}${c.shift?"S":""}${c.super?"W":""}-${c.name}`}var LEADER_MS=2000,Ctx2=import_react23.createContext(null),NO_OVERRIDES=Object.freeze({}),KeysProvider=({children})=>{let renderer=useRenderer(),overrides=usePref("keys")??NO_OVERRIDES,table=import_react23.useMemo(()=>{let t2=new Map;for(let id of Object.keys(DEFAULTS2))t2.set(id,parse2(overrides[id]??DEFAULTS2[id].chord));return t2},[overrides]),lead=table.get("leader"),leadLabel=print(lead),armed=import_react23.useRef(!1),stolen=import_react23.useRef(null),timer2=import_react23.useRef(null),[,bump]=import_react23.useState(0),disarm=import_react23.useCallback(()=>{if(!armed.current)return;if(armed.current=!1,timer2.current)clearTimeout(timer2.current),timer2.current=null;let f=stolen.current;if(stolen.current=null,f&&!f.isDestroyed&&!renderer.currentFocusedRenderable)f.focus();bump((n)=>n+1)},[renderer]),arm=import_react23.useCallback(()=>{if(armed.current=!0,stolen.current=renderer.currentFocusedRenderable??null,stolen.current?.blur(),timer2.current)clearTimeout(timer2.current);timer2.current=setTimeout(disarm,LEADER_MS),bump((n)=>n+1)},[renderer,disarm]);useKeyboard((key2)=>{if(!armed.current&&match(lead,key2)){arm(),key2.stopPropagation();return}if(armed.current)queueMicrotask(disarm)});let value=import_react23.useMemo(()=>({get leader(){return armed.current},match:(id,key2)=>match(table.get(id)??[],key2,armed.current),print:(id)=>print(table.get(id)??[],leadLabel),chord:(id)=>table.get(id)??[],all:(scope)=>Object.keys(DEFAULTS2).filter((id)=>DEFAULTS2[id].scope===scope).map((id)=>({id,desc:DEFAULTS2[id].desc,scope,chord:table.get(id)??[]})),table}),[table,leadLabel]);return $jsx(Ctx2.Provider,{value,children})},useKeys=makeUse(Ctx2,"useKeys");var import_react25=__toESM(require_react_production(),1);function handleListKey(keys,key2,o){let move=(next)=>{o.setSel((p)=>{let n=Math.max(0,Math.min(o.count-1,next(p)));return o.scrollTo?.(n),n})},pg=o.page??10;if(keys.match("list.up",key2))return move((p)=>p-1),!0;if(keys.match("list.down",key2))return move((p)=>p+1),!0;if(keys.match("list.pageUp",key2))return move((p)=>p-pg),!0;if(keys.match("list.pageDown",key2))return move((p)=>p+pg),!0;if(keys.match("list.home",key2))return move(()=>0),!0;if(keys.match("list.end",key2))return move(()=>o.count-1),!0;if(o.onActivate&&keys.match("list.activate",key2))return o.onActivate(),!0;if(o.onDelete&&keys.match("list.delete",key2))return o.onDelete(),!0;if(o.onRefresh&&keys.match("list.refresh",key2))return o.onRefresh(),!0;if(o.onNew&&keys.match("list.new",key2))return o.onNew(),!0;if(o.onToggle&&keys.match("list.toggle",key2))return o.onToggle(),!0;if(o.onSearch&&keys.match("list.search",key2))return o.onSearch(),!0;return!1}function useListKeys(o){let keys=useKeys();return useKeyboard((key2)=>{if(!(typeof o.active==="function"?o.active():o.active))return;if(handleListKey(keys,key2,o))return;o.also?.(key2,keys)}),keys}function useFollow(prefix){let ref=import_react25.useRef(null),id=(i)=>`${prefix}-row-${i}`;return{ref,id,opts:{scrollTo:(n)=>ref.current?.scrollChildIntoView(id(n)),get page(){return Math.max(1,(ref.current?.viewport.height??10)-1)}}}}function conflicts(table){let buckets=new Map;for(let[id,chords]of table)for(let c of chords){let k2=key(c),b2=buckets.get(k2);if(b2)b2.push([id,c]);else buckets.set(k2,[[id,c]])}let out=[];for(let bucket of buckets.values()){if(bucket.length<2)continue;for(let i=0;i<bucket.length;i++)for(let j2=i+1;j2<bucket.length;j2++){let[a,c]=bucket[i],[b2]=bucket[j2];if(scopesOverlap(DEFAULTS2[a].scope,DEFAULTS2[b2].scope))out.push({chord:c,a,b:b2})}}return out}function conflictsWith(table,id){let mine=new Set((table.get(id)??[]).map(key));if(mine.size===0)return[];let scope=DEFAULTS2[id].scope,out=[];for(let[other,chords]of table){if(other===id)continue;if(!scopesOverlap(scope,DEFAULTS2[other].scope))continue;if(chords.some((c)=>mine.has(key(c))))out.push(other)}return out}var import_react27=__toESM(require_react_production(),1);var TabStrip=import_react27.memo(({tabs,active,onChange,hint})=>{let theme=useTheme().theme;return $jsxs("box",{width:"100%",flexDirection:"row",height:1,overflow:"hidden",children:[tabs.map((name,i)=>$jsx("box",{onMouseDown:()=>onChange(i),paddingX:2,marginRight:1,flexShrink:0,backgroundColor:i===active?theme.backgroundElement:void 0,children:$jsx("text",{fg:i===active?theme.primary:theme.textMuted,children:$jsx("strong",{children:name})})},i)),$jsx("box",{flexGrow:1,minWidth:0}),hint?$jsx("box",{paddingX:1,flexShrink:1,minWidth:0,overflow:"hidden",children:$jsx("text",{fg:theme.borderSubtle,children:hint})}):null]})});var TabBar=import_react28.memo(({tabs,activeTab,onTabChange})=>{let keys=useKeys(),hint=`${keys.print("tab.prev")}/${keys.print("tab.next")} or ${keys.print("leader")} N`;return $jsx(TabStrip,{tabs:tabs.map((t2)=>t2.name),active:activeTab,onChange:onTabChange,hint})});var import_react32=__toESM(require_react_production(),1);var import_react29=__toESM(require_react_production(),1);var default_default2=`{"eikon":1,"name":"nous-girl","width":48,"height":24,"author":"kaio","created":"2026-05-04T02:32:53.930Z"}
|
|
3672
3672
|
{"state":"idle","fps":16,"color":"#7aa2f7","frame_count":64,"loop_from":0}
|
|
3673
3673
|
{"f":0,"data":"\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2880\u28C0\u28C0\u28E0\u28E4\u28E4\u28C0\u28C0\u28C0\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2880\u28C0\u28E4\u28E4\u28EC\u28E5\u28C4\u28C0\u2800\u2809\u2819\u283B\u28FF\u28FF\u28FF\u28FF\u28F7\u28F6\u28E4\u2840\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28C0\u28E4\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28E6\u2840\u2800\u2808\u283B\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28C4\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2880\u28E4\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u287F\u28A6\u2840\u2800\u2808\u28BF\u28FF\u28FF\u28FF\u28FF\u28FF\u28BF\u2857\u2804\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2870\u28FB\u28FF\u28FF\u28FF\u288F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u2819\u280F\u2800\u2800\u28EE\u2873\u2800\u2800\u2808\u28BF\u28BF\u283B\u283F\u284F\u2801\u2801\u28F8\u28C4\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u280C\u2808\u2809\u28BA\u283B\u2883\u280A\u2819\u281B\u28A0\u2840\u2880\u2819\u2801\u2801\u2800\u2858\u28F6\u28F7\u28FF\u28F7\u28FE\u2800\u2800\u2808\u28F6\u28C6\u28F3\u28F6\u28EE\u2894\u28FF\u28FF\u2846\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u287C\u28F4\u28B6\u28E4\u28F6\u28FE\u28FC\u28FF\u28FF\u28FF\u28FF\u28BF\u28FF\u28FF\u28FF\u28FE\u28F6\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u2847\u28C0\u28E0\u28F8\u28FF\u28F7\u28FB\u28FF\u28FF\u28FF\u28FF\u28F7\u2840\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u28B0\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u285F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28AF\u28FF\u28DA\u28FF\u28FF\u28FF\u28BF\u28FF\u28FF\u28FF\u28FF\u28D7\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28BF\u28FF\u28FF\u28FF\u28FF\u2858\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u28FF\u28FF\u28FF\u28FF\u28FF\u2844\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u2827\u283B\u281F\u28FB\u281F\u2853\u2808\u281B\u281B\u281B\u281B\u281B\u283F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F9\u28FF\u28FF\u28FF\u28FF\u28C7\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u283B\u28FF\u287F\u28FF\u28FF\u28C9\u28C1\u2800\u2800\u2800\u2800\u2838\u28BB\u28FF\u2877\u28A6\u2844\u2800\u2800\u2800\u28B9\u28FF\u28FF\u28FF\u28FF\u289F\u28DB\u287B\u28FF\u28FF\u28FF\u28EF\u28FF\u28FF\u28FF\u28FF\u28FF\u2840\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2808\u2819\u280A\u28BB\u28CF\u28BF\u2807\u2800\u2800\u2800\u2800\u282C\u283F\u2825\u280A\u2800\u2800\u2800\u2800\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287C\u28FF\u28FF\u28FF\u28FF\u28C7\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28F8\u28EF\u280A\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28BF\u28FF\u28FF\u28FF\u28FF\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FF\u2847\u2820\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287E\u28FF\u28FF\u28FF\u28FF\u2847\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FF\u28C7\u2830\u28C4\u28C4\u2840\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28FF\u28FF\u28FF\u28FF\u28FF\u2840\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B0\u28FF\u28FF\u2846\u2823\u2804\u2808\u2801\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28A0\u28FF\u28FF\u28FF\u28FF\u283B\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FC\u28FF\u28FF\u28B9\u28FF\u28C7\u2800\u2800\u2800\u2800\\n\u2800\u2800\u28A0\u2800\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28C6\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u284F\u2888\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u2804\u28FF\u28FF\u2840\u2800\u2800\u2800\\n\u2800\u2800\u28DF\u2800\u2800\u2800\u2800\u28FF\u28FF\u28FF\u28FF\u28FF\u28E6\u28C0\u28C0\u28C0\u28C0\u28E0\u28C4\u2840\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u287E\u281F\u28BF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u2801\u28F9\u28FF\u2847\u2810\u2844\u2800\\n\u2800\u2880\u28FF\u28E6\u28C0\u28E0\u28FC\u28FF\u28FF\u28FB\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28C4\u2800\u28F8\u28FF\u28FF\u28EF\u2840\u28C0\u28FC\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u2880\u28FF\u28FF\u2847\u2800\u28F7\u2800\\n\u2800\u2818\u28DC\u283F\u28FF\u28FF\u283F\u280B\u28F1\u28FF\u28FF\u28FB\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287E\u280B\u28BF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28E3\u28FE\u28FF\u28FF\u2847\u28A0\u28FF\u2800\\n\u2800\u2800\u2819\u283F\u28F6\u28E4\u28F6\u28FE\u28FF\u28FF\u288B\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u281B\u288B\u2860\u2886\u2800\u2819\u283F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u28A0\u28FF\u280F\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2809\u28AF\u28C9\u28C9\u28E1\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28E7\u2840\u288B\u281D\u2803\u28C0\u28F4\u281F\u282B\u289B\u28ED\u287F\u281A\u280B\u2809\u2801\u2812\u282B\u28DD\u283B\u28FF\u28FF\u28FF\u289F\u28F5\u287F\u280B\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2808\u281B\u283F\u283F\u281B\u2881\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28E4\u2876\u281F\u2809\u2800\u2880\u28F4\u285F\u2801\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2808\u2833\u28DC\u28BF\u287F\u281F\u280B\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28E0\u28FE\u28FF\u28FF\u28FF\u28FF\u283F\u28FF\u28AF\u287E\u280B\u2800\u2800\u2880\u2854\u2800\u287E\u280B\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2818\u282E\u2805\u2800\u2800\u2800\u2800\u2800\u2800"}
|
|
3674
3674
|
{"f":1,"data":"\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28C0\u28C0\u28C0\u28E0\u28E0\u28C0\u28C0\u28C0\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28C0\u28E4\u28E4\u28E4\u28E5\u28E4\u28C0\u2800\u2809\u2809\u283B\u28BF\u28FF\u28FF\u28FF\u28F7\u28F6\u28E4\u28C0\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2880\u28E4\u28F6\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F6\u28C4\u2800\u2800\u2819\u28BF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28E4\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28E0\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28DF\u287F\u28B7\u2840\u2800\u2808\u28BB\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28E7\u2880\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2860\u28EB\u287F\u28FF\u28FF\u289F\u28FE\u28FF\u285F\u28FF\u28FF\u28FF\u28FF\u28FF\u280E\u281F\u2800\u2800\u28B4\u287B\u2804\u2800\u2800\u28BB\u28FF\u283F\u28BF\u28FF\u2803\u2809\u28A0\u28E4\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2814\u2804\u2800\u2819\u2833\u280B\u280E\u2809\u281A\u2881\u28C4\u28C0\u28B8\u2809\u2801\u2800\u2848\u28B6\u28FE\u28FF\u28F7\u28FE\u2840\u2800\u2800\u28B6\u28E6\u2874\u28E6\u28F6\u28C2\u28E6\u28BF\u2844\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u28F8\u28F5\u28E6\u28E7\u28F6\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FB\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28C7\u2880\u28C0\u2878\u28FF\u28FF\u28FB\u28FF\u28F7\u28BE\u28FF\u28FF\u2840\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u28A0\u28F7\u28FF\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28CF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28CC\u28FF\u28F0\u28BF\u28FF\u28F7\u28BF\u28FF\u28FF\u28FF\u28FF\u28C7\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28BF\u28FF\u28FF\u28FF\u28FF\u285C\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u285F\u28FF\u28FF\u28FF\u28FF\u28FF\u2843\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2818\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u283F\u2807\u2819\u281B\u287B\u289F\u28CB\u2809\u281B\u281B\u281B\u281B\u281B\u283F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F9\u28FF\u28FF\u28FF\u28FF\u28F7\u2800\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2819\u28BF\u28DF\u28BF\u28FF\u28C1\u28D0\u2800\u2800\u2800\u2800\u2818\u28BB\u28FF\u2877\u28A6\u2844\u2800\u2800\u2800\u28F8\u28FF\u28FF\u28FF\u28FF\u281F\u281B\u283B\u28FF\u28FF\u28FF\u28EF\u28FF\u28FF\u28FF\u28FF\u28FF\u2844\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2809\u2803\u28B9\u28CF\u28BB\u2807\u2800\u2800\u2800\u2800\u2828\u283D\u2825\u280A\u2800\u2800\u2800\u2800\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F9\u28FF\u28FF\u28FF\u28FF\u28C7\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B8\u28CF\u2801\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2880\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28BF\u28FF\u28FF\u28FF\u28FF\u2800\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FC\u2807\u2820\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287E\u28FF\u28FF\u28FF\u28FF\u2847\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FF\u28C7\u2838\u28C4\u28C0\u2840\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28CF\u28FF\u28FF\u28FF\u28FF\u28FF\u2800\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B0\u28FF\u28FF\u2846\u282B\u2800\u2808\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28B8\u28FF\u28FF\u28FF\u28FF\u28B9\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28BB\u28FF\u2847\u2800\u2800\u2800\u2800\\n\u2800\u2800\u2860\u2800\u2800\u2800\u2800\u28F8\u28FF\u28FF\u28FF\u2844\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28FC\u28FF\u28FF\u28FF\u2803\u2898\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u2808\u28FF\u28FF\u2800\u2800\u2800\u2800\\n\u2800\u28A0\u28E7\u2800\u2800\u2800\u2880\u28FF\u28FF\u28FF\u28FF\u28FF\u28E6\u28C0\u28C0\u28C0\u28C0\u28E0\u28C4\u2840\u2800\u2800\u28FF\u28FF\u28FF\u28EF\u2876\u281F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u2801\u28B9\u28FF\u2847\u28A0\u2800\u2800\\n\u2800\u2808\u28FF\u28F6\u28E4\u28E4\u28FE\u28FF\u287F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28C4\u2800\u28FF\u28FF\u28FF\u28CF\u2800\u28E0\u28FE\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u2880\u28FF\u28FF\u2847\u2800\u28E7\u2800\\n\u2800\u2818\u28CC\u287B\u283F\u283F\u281F\u288B\u28FC\u28FF\u287F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287E\u281B\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28E3\u28FE\u28FF\u28FF\u2847\u28B0\u28FF\u2800\\n\u2800\u2800\u2818\u283B\u28F7\u28F6\u28FE\u28FF\u28FF\u287F\u28B3\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u281B\u288B\u2860\u2886\u2808\u283B\u28BF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u287F\u28A0\u28FF\u2807\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2808\u28EF\u28C9\u28C1\u28F4\u28FF\u287F\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28E7\u2840\u288B\u281D\u2803\u28C0\u28F4\u281F\u283B\u289B\u28ED\u287F\u281A\u280B\u2809\u2801\u2812\u282B\u28D9\u283B\u28FF\u28FF\u28FF\u285F\u28F1\u28FF\u280B\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2808\u281B\u281B\u281B\u280B\u28F0\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28FF\u28F7\u28E4\u2876\u281F\u2809\u2800\u2880\u28F4\u281F\u2801\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2808\u2833\u28DC\u28BF\u28FF\u283F\u280B\u2801\u2800\u2800\u2800\\n\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u28F0\u28FF\u28FF\u28FF\u28FF\u28FF\u283F\u28FF\u28AF\u287E\u280B\u2800\u2800\u2880\u2854\u2880\u287E\u2803\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2818\u283A\u2805\u2800\u2800\u2800\u2800\u2800\u2800"}
|
|
@@ -4136,7 +4136,7 @@ Usage:
|
|
|
4136
4136
|
|
|
4137
4137
|
${n} mapped \xB7 ${r.skipped.length} skipped (no herm equivalent)${r.skipped.length?`:
|
|
4138
4138
|
${r.skipped.slice(0,8).join(", ")}${r.skipped.length>8?", \u2026":""}`:""}`,yes:"import"}).then((ok)=>{if(openKeys(props.dialog),!ok)return;exports_preferences.set("keys",{...exports_preferences.get("keys")??{},...r.overrides}),toast.show({variant:"success",message:`Imported ${n} \xB7 skipped ${r.skipped.length}`})})};return useKeyboard((key2)=>{if(key2.name==="up")return setSel((s)=>Math.max(0,s-1));if(key2.name==="down")return setSel((s)=>Math.min(actionRows.length-1,s+1));if(key2.name==="return"&&cur)return rebind(cur.id);if(key2.name==="r"&&!key2.ctrl&&cur?.override){write(cur.id,void 0);return}if(key2.name==="o"&&!key2.ctrl)return importOc()}),$jsxs("box",{flexDirection:"column",width:78,children:[$jsxs("box",{height:1,flexDirection:"row",children:[$jsx("box",{flexGrow:1,children:$jsx("text",{fg:theme.text,children:$jsx("strong",{children:"Keybindings"})})}),$jsx("text",{fg:theme.textMuted,children:`leader = ${keys.print("leader")}`})]}),$jsx("box",{height:1}),$jsx("scrollbox",{scrollY:!0,maxHeight:22,verticalScrollbarOptions:VBAR,children:$jsx("box",{flexDirection:"column",width:"100%",children:rows3.map((r,i)=>{if(r.type==="header")return $jsx("box",{height:1,marginTop:i>0?1:0,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:r.title})})},`h-${r.title}`);let ai=actionRows.findIndex((x2)=>x2.i===i),on=ai===sel,conf=conflictsWith(keys.table,r.id);return $jsxs("box",{height:1,flexDirection:"row",backgroundColor:on?theme.backgroundElement:void 0,onMouseOver:()=>setSel(ai),onMouseDown:()=>{setSel(ai),rebind(r.id)},children:[$jsx("box",{width:2,flexShrink:0,children:$jsx("text",{fg:on?theme.primary:theme.text,children:on?"\u25B8 ":" "})}),$jsx("box",{width:16,flexShrink:0,height:1,overflow:"hidden",children:$jsx("text",{fg:on?theme.accent:theme.text,children:print(r.chord,keys.print("leader"))||"\u2014"})}),$jsx("box",{flexGrow:1,minWidth:0,height:1,overflow:"hidden",children:$jsx("text",{fg:theme.textMuted,children:r.desc})}),$jsx("box",{width:5,flexShrink:0,flexDirection:"row",justifyContent:"flex-end",children:$jsxs("text",{children:[r.override?$jsx("span",{fg:theme.info,children:"\xB7 "}):null,conf.length>0?$jsx("span",{fg:theme.warning,children:"\u26A0"}):null]})})]},r.id)})})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:curConflicts.length>0?$jsx("text",{fg:theme.warning,children:`\u26A0 shares ${keys.print(cur.id)} with: ${curConflicts.join(", ")}`}):$jsx("text",{fg:theme.textMuted,children:`\u2191\u2193 select Enter rebind${cur?.override?" \xB7 r reset":""} \xB7 o import opencode \xB7 esc close \xB7 \xB7 = overridden`})})]})};function openKeys(dialog){dialog.replace($jsx(KeysDialog,{dialog}))}var ERRLIKE=/error|fail|traceback|exception|\b[45]\d\d\b|refused|denied|unauthori/i,LogsDialog=()=>{let theme=useTheme().theme,lines2=useGateway().tail(200).split(`
|
|
4139
|
-
`).filter(Boolean);return $jsxs("box",{flexDirection:"column",width:110,height:Math.min(34,Math.max(8,lines2.length+5)),children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Gateway Logs"})})}),$jsx("box",{height:1,children:$jsxs("text",{fg:theme.textMuted,children:[lines2.length," lines \xB7 stderr + protocol \xB7 Esc to close"]})}),$jsx("box",{height:1}),lines2.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No log output captured."})}):$jsx("scrollbox",{scrollY:!0,stickyScroll:!0,stickyStart:"bottom",flexGrow:1,children:$jsx("box",{flexDirection:"column",children:lines2.map((l,i)=>$jsx("box",{height:1,children:$jsx("text",{fg:ERRLIKE.test(l)?theme.error:theme.textMuted,children:l.length>106?l.slice(0,105)+"\u2026":l})},i))})})]})},openLogs=(dialog)=>dialog.replace($jsx(LogsDialog,{}));var import_react100=__toESM(require_react_production(),1);var ThemePickerDialog=({onConfirm})=>{let ctx=useTheme(),dialog=useDialog(),options=ctx.names.map((n)=>({title:n,value:n})),onMove=import_react100.useCallback((opt)=>{ctx.set(opt.value)},[ctx]),onSelect=import_react100.useCallback((opt)=>{ctx.set(opt.value),onConfirm(),dialog.clear()},[ctx,dialog,onConfirm]);return $jsx(DialogSelect,{title:"Switch Theme",options,current:ctx.name,onSelect,onMove,placeholder:"Search themes..."})},openThemePicker=(dialog,ctx)=>{let saved=ctx.name,confirmed=!1;dialog.replace($jsx(ThemePickerDialog,{onConfirm:()=>{confirmed=!0}}),()=>{if(!confirmed)ctx.set(saved)})};var import_react101=__toESM(require_react_production(),1);import{readFileSync as readFileSync8}from"fs";import{homedir as homedir8}from"os";import{join as join14}from"path";var trunc5=(s,n)=>s.length<=n?s:s.slice(0,n-1)+"\u2026",defaultDirs=()=>{let hermesHome2=process.env.HERMES_HOME||join14(homedir8(),".hermes");return[BUNDLED_EIKON_DIR,join14(hermesHome2,"eikons")]},EikonPickerDialog=(props)=>{let theme=useTheme().theme,dialog=useDialog(),dirs=props.dirs??defaultDirs(),found=import_react101.useMemo(()=>listEikons(dirs),[dirs]),[cursor,setCursor]=import_react101.useState(0),cur=found[cursor],parsed=import_react101.useMemo(()=>{if(!cur)return;try{return parseEikon(readFileSync8(cur.path,"utf8"))}catch{return}},[cur]);useListKeys({active:!0,count:found.length,setSel:setCursor,onActivate:()=>{if(cur)props.onSelect(cur.path),dialog.clear()}});let w2=(parsed?.meta.width??48)+2,h2=Math.max(parsed?.meta.height??24,12);return $jsxs("box",{flexDirection:"column",width:40+w2,height:h2+4,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Pick Avatar"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${found.length} found \xB7 \u2191\u2193 nav \xB7 Enter select \xB7 Esc close`})}),$jsx("box",{height:1}),$jsxs("box",{flexDirection:"row",flexGrow:1,children:[$jsx("box",{width:38,marginRight:2,children:$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:found.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No .eikon files found."})},"empty"):found.map((e,i)=>{let on=i===cursor;return $jsxs("box",{flexDirection:"column",paddingLeft:1,paddingRight:1,backgroundColor:on?theme.backgroundElement:void 0,onMouseDown:()=>setCursor(i),children:[$jsx("box",{height:1,children:$jsx("text",{fg:on?theme.text:theme.textMuted,children:$jsx("strong",{children:trunc5(e.meta.name,34)})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${e.meta.author??"\u2014"} \xB7 ${e.meta.states.length} states \xB7 ${e.meta.width}\xD7${e.meta.height}`})})]},e.path)})})})}),$jsx("box",{flexGrow:1,flexDirection:"column",overflow:"hidden",children:parsed?$jsx(AnimatedAvatar,{state:"idle",eikon:parsed},cur?.path??"none"):$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No preview."})},"blank")})]})]})},openEikonPicker=(dialog,onSelect)=>dialog.replace($jsx(EikonPickerDialog,{onSelect}));var import_react102=__toESM(require_react_production(),1);var RollbackDialog=(props)=>{let theme=useTheme().theme,[data2,setData]=import_react102.useState(props.initial??null),[sel,setSel]=import_react102.useState(props.sel??0),[diff,setDiff]=import_react102.useState(null),[confirm,setConfirm]=import_react102.useState(!1);import_react102.useEffect(()=>{if(props.initial)return;props.gw.request("rollback.list").then(setData).catch((e)=>setData({enabled:!1,checkpoints:[],...{err:e.message}}))},[props.gw,props.initial]);let points=data2?.checkpoints??[],cur=points[sel],open2=(cp)=>{props.gw.request("rollback.diff",{hash:cp.hash}).then(setDiff).catch((e)=>props.toast.error(e))},back=()=>{setDiff(null),setConfirm(!1),props.dialog.replace($jsx(RollbackDialog,{gw:props.gw,toast:props.toast,dialog:props.dialog,initial:data2??void 0,sel}))},restore=(cp)=>{props.gw.request("rollback.restore",{hash:cp.hash}).then((r)=>{if(!r.success)throw Error("restore rejected");let n=r.history_removed;props.toast.show({variant:"success",message:`Restored ${cp.hash.slice(0,7)}${n?` \xB7 ${n} turns removed`:""}`}),props.dialog.clear()}).catch((e)=>{props.toast.show({variant:"error",message:`Restore failed: ${e.message}`}),props.dialog.clear()})},keys=useKeys();if(useKeyboard((key2)=>{if(diff){if(confirm){if(keys.match("dialog.confirm",key2))return restore(cur);if(keys.match("dialog.deny",key2)||keys.match("dialog.cancel",key2))return setConfirm(!1),back();return}if(keys.match("dialog.cancel",key2))return back();if(key2.name==="r")return setConfirm(!0);return}if(!data2?.enabled)return;handleListKey(keys,key2,{count:points.length,setSel,onActivate:()=>{if(cur)open2(cur)}})}),!data2)return $jsx("box",{width:60,height:3,children:$jsx("text",{fg:theme.textMuted,children:"Loading checkpoints\u2026"})});if(!data2.enabled)return $jsxs("box",{flexDirection:"column",width:60,height:5,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.warning,children:$jsx("strong",{children:"Checkpoints disabled"})})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Enable checkpoints in config to use /rollback."})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Esc to close"})})]});if(diff){let body=diff.rendered||diff.diff||diff.stat||"(empty diff)";return $jsxs("box",{flexDirection:"column",width:110,height:30,children:[$jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.primary,children:$jsx("strong",{children:"Rollback \xB7 "})}),$jsx("span",{fg:theme.accent,children:cur.hash.slice(0,7)}),$jsx("span",{fg:theme.textMuted,children:` ${trunc4(cur.message,70)}`})]})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:diff.stat||" "})}),$jsx("box",{height:1}),$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:$jsx(DiffBlock,{text:body})})}),$jsx("box",{height:1}),confirm?$jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.warning,children:$jsx("strong",{children:"Restore this checkpoint? "})}),$jsx("span",{fg:theme.textMuted,children:"[y] restore [n] cancel"})]})}):$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"[r] restore \xB7 Esc back"})})]})}return $jsxs("box",{flexDirection:"column",width:90,height:Math.min(28,Math.max(8,points.length+6)),children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Rollback"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${points.length} checkpoints \xB7 \u2191\u2193 navigate Enter diff Esc close`})}),$jsx("box",{height:1}),points.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No checkpoints yet."})}):$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:points.map((cp,i)=>{let on=i===sel;return $jsx("box",{height:1,backgroundColor:on?theme.backgroundElement:void 0,onMouseDown:()=>{setSel(i),open2(cp)},onMouseOver:()=>setSel(i),children:$jsxs("text",{children:[$jsx("span",{fg:on?theme.primary:theme.textMuted,children:on?"\u25B8 ":" "}),$jsx("span",{fg:theme.accent,children:cp.hash.slice(0,7).padEnd(9)}),$jsx("span",{fg:theme.textMuted,children:ago(cp.timestamp).padEnd(12)}),$jsx("span",{fg:on?theme.text:theme.textMuted,children:trunc4(cp.message,56)})]})},cp.hash)})})})]})},openRollback=(dialog,gw,toast)=>dialog.replace($jsx(RollbackDialog,{gw,toast,dialog}));var import_react104=__toESM(require_react_production(),1);var tag=(m2,theme)=>m2.role==="user"?{label:"\u25B8 You",fg:theme.info}:m2.role==="assistant"?{label:"\u25C2 Agent",fg:theme.success}:m2.role==="tool"?{label:`\u2699 ${m2.name??"tool"}`,fg:theme.warning}:{label:"\xB7 system",fg:theme.textMuted},flatten2=(t2)=>{if(typeof t2==="string")return t2;if(!Array.isArray(t2))return"";for(let p of t2)if(p&&typeof p==="object"&&"type"in p&&p.type==="text"&&"text"in p&&typeof p.text==="string")return p.text;return""},body=(m2)=>m2.role==="tool"?m2.context??"":flatten2(m2.text),HistoryDialog=(props)=>{let theme=useTheme().theme,[rows3,setRows]=import_react104.useState(null),[err,setErr]=import_react104.useState("");import_react104.useEffect(()=>{props.gw.request("session.history").then((r)=>setRows(r.messages??[])).catch((e)=>{setErr(e.message),setRows([])})},[props.gw]);let n=rows3?.length??0,h2=Math.min(34,Math.max(8,n+5));return $jsxs("box",{flexDirection:"column",width:110,height:h2,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Session History"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:err?theme.error:theme.textMuted,children:err?`\u26A0 ${err}`:`${n} messages \xB7 server-authoritative \xB7 Esc to close`})}),$jsx("box",{height:1}),rows3===null?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"loading\u2026"})}):n===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Empty \u2014 no turns yet."})}):$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",children:rows3.map((m2,i)=>{let t2=tag(m2,theme);return $jsxs("box",{height:1,flexDirection:"row",children:[$jsx("box",{width:14,flexShrink:0,children:$jsx("text",{fg:t2.fg,children:trunc4(t2.label,13)})}),$jsx("box",{flexGrow:1,minWidth:0,height:1,overflow:"hidden",children:$jsx("text",{fg:m2.role==="tool"||m2.role==="system"?theme.textMuted:theme.text,children:body(m2).replace(/\n/g," ")})})]},i)})})})]})},openHistory=(dialog,gw)=>dialog.replace($jsx(HistoryDialog,{gw}));var import_react105=__toESM(require_react_production(),1);var InfoDialog=(props)=>{let theme=useTheme().theme,body2=props.rows.filter((r)=>r[1]!==void 0);return $jsxs("box",{flexDirection:"column",minWidth:52,gap:1,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:props.title})})}),$jsx("box",{flexDirection:"column",children:$jsx(KVBlock,{rows:body2})}),props.note?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:props.note})}):null,$jsx("box",{height:1,children:$jsx("text",{fg:theme.borderSubtle,children:"Esc to close"})})]})};function openStatus(dialog,info2,sid){let toolsets=Object.keys(info2?.tools??{}),nTools=Object.values(info2?.tools??{}).reduce((n,v2)=>n+v2.length,0),mcp=info2?.mcp_servers??[],up=mcp.filter((s)=>s.connected).length;dialog.replace($jsx(InfoDialog,{title:"Status",rows:[["Version",info2?.version||"\u2014"],["Model",info2?.model||"\u2014"],["Profile",activeProfileName()],["Home",hermesPath("")],["CWD",info2?.cwd||process.cwd()],["Session",sid||"\u2014"],["Tools",`${nTools} in ${toolsets.length} toolset${toolsets.length===1?"":"s"}`],["Skills",String(Object.values(info2?.skills??{}).reduce((n,v2)=>n+v2.length,0))],["MCP",mcp.length?`${up}/${mcp.length} connected`:void 0]]}))}var UsageDialog=({gw})=>{let theme=useTheme().theme,[u3,setU]=import_react105.useState(null),[err,setErr]=import_react105.useState("");if(import_react105.useEffect(()=>{gw.request("session.usage").then(setU).catch((e)=>setErr(e instanceof Error?e.message:String(e)))},[gw]),err)return $jsx(InfoDialog,{title:"Usage",rows:[["Error",err,theme.error]]});if(!u3)return $jsx(InfoDialog,{title:"Usage",rows:[["","\u2026"]]});let ctx=u3.context_max?`${fmt(u3.context_used??0)} / ${fmt(u3.context_max)} (${Math.round(u3.context_percent??0)}%)`:void 0;return $jsx(InfoDialog,{title:"Usage",note:u3.cost_status==="estimated"?"cost is estimated":void 0,rows:[["Model",u3.model||"\u2014"],["API calls",String(u3.calls??0)],["Input",fmt(u3.input??0)],["Output",fmt(u3.output??0)],["Cache r/w",u3.cache_read||u3.cache_write?`${fmt(u3.cache_read??0)} / ${fmt(u3.cache_write??0)}`:void 0],["Reasoning",u3.reasoning?fmt(u3.reasoning):void 0],["Total",fmt(u3.total??0)],["Context",ctx],["Cost",u3.cost_usd!=null?cost(u3.cost_usd):void 0,theme.accent]]})},openUsage=(dialog,gw)=>dialog.replace($jsx(UsageDialog,{gw})),ProfileDialog=()=>{let[p,setP]=import_react105.useState(void 0),active=activeProfileName();if(import_react105.useEffect(()=>{listProfiles().then((ps)=>setP(ps.find((x2)=>x2.name===active)??null)).catch(()=>setP(null))},[]),p===void 0)return $jsx(InfoDialog,{title:"Profile",rows:[["","\u2026"]]});return $jsx(InfoDialog,{title:"Profile",note:p?void 0:"profile directory not found",rows:[["Active",active],["Home",p?.path??hermesPath("")],["Model",p?.model??"\u2014"],["Provider",p?.provider??"\u2014"],["Skills",p?String(p.skill_count):void 0],["Gateway",p?.gateway_running?"running":"stopped"],["Sticky",p?.is_sticky?"yes":void 0],["Alias",p?.is_default?void 0:p?.has_alias?`~/.local/bin/${active}`:"\u2014"],[".env",p?.has_env?"present":"\u2014"]]})},openProfile=(dialog)=>dialog.replace($jsx(ProfileDialog,{}));var import_react106=__toESM(require_react_production(),1);import{spawnSync as spawnSync2}from"child_process";import{existsSync as existsSync15}from"fs";var CHAFA=["/usr/sbin/chafa","/usr/bin/chafa","/usr/local/bin/chafa","/opt/homebrew/bin/chafa"];function whichChafa(){for(let p of CHAFA)if(existsSync15(p))return p;return null}function render(path7,w2,h2){let bin=whichChafa();if(!bin)return{err:"chafa not installed (brew/apt install chafa)"};let full=path7.startsWith("~")?path7.replace(/^~/,process.env.HOME??""):path7;if(!existsSync15(full))return{err:`file not found: ${full}`};let r=spawnSync2(bin,[`--size=${w2}x${h2}`,"--format=symbols","--symbols=block","--colors=full",full],{encoding:"utf8"});if(r.status!==0)return{err:r.stderr||`chafa exit ${r.status}`};return{rows:parseChafa(r.stdout)}}var ChafaDialog=({path:path7})=>{let theme=useTheme().theme,[w2]=import_react106.useState(80),[h2]=import_react106.useState(28),result=import_react106.useMemo(()=>render(path7,w2,h2),[path7,w2,h2]);return $jsxs("box",{flexDirection:"column",minWidth:w2+4,gap:1,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsxs("strong",{children:["chafa demo \xB7 ",path7]})})}),result.err?$jsx("box",{height:1,children:$jsx("text",{fg:theme.error,children:result.err})}):$jsx("box",{flexDirection:"column",children:result.rows.map((row,i)=>$jsx("text",{children:row.map((c,j2)=>$jsx("span",{fg:hex(c.fg),bg:hex(c.bg),children:c.ch},j2))},i))}),$jsx("box",{height:1,children:$jsxs("text",{fg:theme.borderSubtle,children:[result.rows?`${result.rows.length} rows \xB7 ${result.rows.reduce((a,r)=>a+r.length,0)} cells \xB7 `:"","Esc to close"]})})]})};function openChafa(dialog,path7){dialog.replace($jsx(ChafaDialog,{path:path7}))}var import_react108=__toESM(require_react_production(),1);import{tmpdir as tmpdir2}from"os";import{join as join15}from"path";import{rm}from"fs/promises";async function editInEditor(renderer,seed){let cmd=process.env.VISUAL||process.env.EDITOR;if(!cmd)return;let path7=join15(tmpdir2(),`herm-${Date.now()}.md`);await Bun.write(path7,seed),renderer.suspend(),renderer.currentRenderBuffer.clear();let parts2=cmd.split(" ");await Bun.spawn([...parts2,path7],{stdin:"inherit",stdout:"inherit",stderr:"inherit"}).exited;let text2=await Bun.file(path7).text().catch(()=>"");if(rm(path7,{force:!0}).catch(()=>{}),renderer.isDestroyed)return text2.trim()||void 0;return renderer.currentRenderBuffer.clear(),renderer.resume(),renderer.requestRender(),text2.trim()||void 0}var exports_selection={};__export(exports_selection,{yank:()=>yank,key:()=>key2,Selection:()=>exports_selection});function yank(renderer,toast){let text2=renderer.getSelection()?.getSelectedText();if(!text2)return!1;return copy(text2).then(()=>toast?.push("Copied to clipboard","info")).catch(()=>toast?.push("Clipboard write failed","err")),renderer.clearSelection(),!0}function key2(renderer,evt,toast){let sel=renderer.getSelection();if(!sel?.getSelectedText())return!1;if(evt.ctrl&&evt.name==="c")return yank(renderer,toast),!0;if(evt.name==="escape")return renderer.clearSelection(),!0;let focus=renderer.currentFocusedRenderable;if(focus&&sel.selectedRenderables.includes(focus))return!1;return renderer.clearSelection(),!1}function redraw(renderer){resolveRenderLib().clearTerminal(renderer.rendererPtr),renderer.currentRenderBuffer.clear(RGBA.fromValues(0,0,0,0)),renderer.requestRender()}var INTERRUPT_MS=5000,DOUBLE_TAB_MS=400;function useAppKeys(o){let renderer=useRenderer(),keys=useKeys(),lastEsc=import_react108.useRef(0),lastTab=import_react108.useRef(0),regionFor=(t2)=>t2===o.chatTab?"input":"content";import_react108.useEffect(()=>{let found=conflicts(keys.table).filter((c)=>!(c.a==="session.interrupt"&&c.b==="dialog.cancel")).filter((c)=>!(c.a==="app.exit"&&c.b==="input.clear"));if(found.length===0)return;let first=found[0];o.onNotice(`Keybinding conflict: ${print([first.chord])} \u2192 ${first.a} and ${first.b}`+(found.length>1?` (+${found.length-1} more)`:""))},[keys.table]),useKeyboard((key3)=>{let c=o.composer.current;if(exports_selection.key(renderer,key3)){key3.stopPropagation();return}if(keys.match("input.clear",key3)&&c&&!c.isEmpty()){let v2=c.value().trim();if(v2.length>=20)c.remember(v2);c.set(""),key3.stopPropagation();return}if(keys.match("input.stash",key3)){o.onStash(),key3.stopPropagation();return}if(keys.match("app.exit",key3))return o.onQuit();if(keys.match("app.suspend",key3)){renderer.suspend(),process.kill(process.pid,"SIGTSTP"),process.once("SIGCONT",()=>renderer.resume());return}if(keys.match("app.redraw",key3)){redraw(renderer),key3.stopPropagation();return}if(keys.match("app.sidebar",key3)){o.onToggleSidebar();return}if(o.dialogOpen())return;if(c?.mode()==="shell"){if(key3.name==="escape"){c.setMode("normal"),key3.stopPropagation();return}if(key3.name==="backspace"&&!key3.ctrl&&!key3.meta&&c.caret()===0){c.setMode("normal"),key3.stopPropagation();return}}if(keys.match("queue.flush",key3)&&o.streaming&&o.queued>0){o.onFlushQueue(),key3.stopPropagation();return}if(o.onPromptKey&&!keys.leader&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(o.onPromptKey(key3)){key3.stopPropagation();return}}if(keys.match("editor.open",key3)&&!o.streaming){let seed=c?.value()??"";editInEditor(renderer,seed).then((out)=>{if(out===void 0){if(!process.env.VISUAL&&!process.env.EDITOR)o.onNotice("Set $EDITOR or $VISUAL to use the external editor");return}c?.set(out),o.setFocusRegion("input")});return}if(keys.match("tab.prev",key3)){o.setTab((t2)=>{let n=Math.max(0,t2-1);return o.setFocusRegion(regionFor(n)),n});return}if(keys.match("tab.next",key3)){o.setTab((t2)=>{let n=Math.min(o.tabMax,t2+1);return o.setFocusRegion(regionFor(n)),n});return}if(o.subCount>0&&key3.shift&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(key3.name==="left"){o.cycleSub(-1),key3.stopPropagation();return}if(key3.name==="right"){o.cycleSub(1),key3.stopPropagation();return}}if(keys.leader&&!key3.ctrl&&!key3.meta&&!key3.shift&&key3.eventType!=="release"){let n={"1":0,"2":1,"3":2,"4":3,"5":4,"6":5,"7":6,"8":7,"9":8,"0":9,"-":10}[key3.name];if(n!==void 0&&n<=o.tabMax){o.setTab(()=>{return o.setFocusRegion(regionFor(n)),n}),key3.stopPropagation();return}}if(key3.meta&&!key3.ctrl&&!key3.shift&&key3.eventType!=="release"){let n={"1":0,"2":1,"3":2,"4":3,"5":4,"6":5,"7":6,"8":7,"9":8,"0":9,"-":10}[key3.name];if(n!==void 0&&n<=o.tabMax){o.setTab(()=>{return o.setFocusRegion(regionFor(n)),n}),key3.stopPropagation();return}}if(c?.popOpen()){if(key3.name==="escape")return c.popCancel();if(key3.name==="up"){c.popNav(-1),key3.stopPropagation();return}if(key3.name==="down"){c.popNav(1),key3.stopPropagation();return}if(key3.name==="tab")return c.popAccept();return}if(keys.match("focus.cycle",key3)&&!o.streaming){if(o.tab===o.chatTab){o.setFocusRegion((r)=>r==="input"?"content":"input");return}if(o.focusRegion==="input"){o.setFocusRegion("content");return}let now2=Date.now();if(now2-lastTab.current<DOUBLE_TAB_MS)o.setFocusRegion("input"),lastTab.current=0,key3.stopPropagation();else lastTab.current=now2;return}if(keys.match("session.interrupt",key3)){if(!o.streaming&&o.onEscape?.())return;if(o.streaming){let now2=Date.now();if(now2-lastEsc.current<INTERRUPT_MS){o.onInterrupt(),lastEsc.current=0;return}lastEsc.current=now2,o.onInterruptNotice();return}if(o.tab===o.chatTab&&o.focusRegion==="content")o.setFocusRegion("input");return}if(keys.match("reply.copy",key3))return o.onCopyLast();if(keys.match("clipboard.attach",key3)){o.onAttachClipboard(),key3.stopPropagation();return}if(o.focusRegion==="input"&&!o.streaming){if((key3.name==="!"||key3.name==="1"&&key3.shift)&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"&&c&&c.mode()==="normal"&&!c.popOpen()&&c.caret()===0){c.setMode("shell"),key3.stopPropagation();return}if(key3.name==="up")return void c?.historyUp();if(key3.name==="down")return void c?.historyDown();if(key3.name==="backspace"&&!key3.ctrl&&!key3.meta&&c?.isEmpty()&&o.onDetachLast()){key3.stopPropagation();return}}if(o.tab===o.chatTab&&o.focusRegion==="content"&&!o.streaming&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(key3.name.length===1&&key3.name!==" "){let ch=key3.shift&&/[a-z]/.test(key3.name)?key3.name.toUpperCase():key3.name;o.setFocusRegion("input"),c?.insert(ch),key3.stopPropagation()}}})}import{writeSync}from"fs";var done=!1;function quit(renderer,sid,title,gw){if(done)process.exit(0);done=!0;try{gw?.kill()}catch{}if(renderer.destroy(),process.stdout.isTTY&&sid){let t2=title?` \u2014 ${title.slice(0,60)}`:"";writeSync(1,`
|
|
4139
|
+
`).filter(Boolean);return $jsxs("box",{flexDirection:"column",width:110,height:Math.min(34,Math.max(8,lines2.length+5)),children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Gateway Logs"})})}),$jsx("box",{height:1,children:$jsxs("text",{fg:theme.textMuted,children:[lines2.length," lines \xB7 stderr + protocol \xB7 Esc to close"]})}),$jsx("box",{height:1}),lines2.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No log output captured."})}):$jsx("scrollbox",{scrollY:!0,stickyScroll:!0,stickyStart:"bottom",flexGrow:1,children:$jsx("box",{flexDirection:"column",children:lines2.map((l,i)=>$jsx("box",{height:1,children:$jsx("text",{fg:ERRLIKE.test(l)?theme.error:theme.textMuted,children:l.length>106?l.slice(0,105)+"\u2026":l})},i))})})]})},openLogs=(dialog)=>dialog.replace($jsx(LogsDialog,{}));var import_react100=__toESM(require_react_production(),1);var ThemePickerDialog=({onConfirm})=>{let ctx=useTheme(),dialog=useDialog(),options=ctx.names.map((n)=>({title:n,value:n})),onMove=import_react100.useCallback((opt)=>{ctx.set(opt.value)},[ctx]),onSelect=import_react100.useCallback((opt)=>{ctx.set(opt.value),onConfirm(),dialog.clear()},[ctx,dialog,onConfirm]);return $jsx(DialogSelect,{title:"Switch Theme",options,current:ctx.name,onSelect,onMove,placeholder:"Search themes..."})},openThemePicker=(dialog,ctx)=>{let saved=ctx.name,confirmed=!1;dialog.replace($jsx(ThemePickerDialog,{onConfirm:()=>{confirmed=!0}}),()=>{if(!confirmed)ctx.set(saved)})};var import_react101=__toESM(require_react_production(),1);import{readFileSync as readFileSync8}from"fs";import{homedir as homedir8}from"os";import{join as join14}from"path";var trunc5=(s,n)=>s.length<=n?s:s.slice(0,n-1)+"\u2026",defaultDirs=()=>{let hermesHome2=process.env.HERMES_HOME||join14(homedir8(),".hermes");return[BUNDLED_EIKON_DIR,join14(hermesHome2,"eikons")]},EikonPickerDialog=(props)=>{let theme=useTheme().theme,dialog=useDialog(),dirs=props.dirs??defaultDirs(),found=import_react101.useMemo(()=>listEikons(dirs),[dirs]),[cursor,setCursor]=import_react101.useState(0),cur=found[cursor],parsed=import_react101.useMemo(()=>{if(!cur)return;try{return parseEikon(readFileSync8(cur.path,"utf8"))}catch{return}},[cur]);useListKeys({active:!0,count:found.length,setSel:setCursor,onActivate:()=>{if(cur)props.onSelect(cur.path),dialog.clear()}});let w2=(parsed?.meta.width??48)+2,h2=Math.max(parsed?.meta.height??24,12);return $jsxs("box",{flexDirection:"column",width:40+w2,height:h2+4,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Pick Avatar"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${found.length} found \xB7 \u2191\u2193 nav \xB7 Enter select \xB7 Esc close`})}),$jsx("box",{height:1}),$jsxs("box",{flexDirection:"row",flexGrow:1,children:[$jsx("box",{width:38,marginRight:2,children:$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:found.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No .eikon files found."})},"empty"):found.map((e,i)=>{let on=i===cursor;return $jsxs("box",{flexDirection:"column",paddingLeft:1,paddingRight:1,backgroundColor:on?theme.backgroundElement:void 0,onMouseDown:()=>setCursor(i),children:[$jsx("box",{height:1,children:$jsx("text",{fg:on?theme.text:theme.textMuted,children:$jsx("strong",{children:trunc5(e.meta.name,34)})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${e.meta.author??"\u2014"} \xB7 ${e.meta.states.length} states \xB7 ${e.meta.width}\xD7${e.meta.height}`})})]},e.path)})})})}),$jsx("box",{flexGrow:1,flexDirection:"column",overflow:"hidden",children:parsed?$jsx(AnimatedAvatar,{state:"idle",eikon:parsed},cur?.path??"none"):$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No preview."})},"blank")})]})]})},openEikonPicker=(dialog,onSelect)=>dialog.replace($jsx(EikonPickerDialog,{onSelect}));var import_react102=__toESM(require_react_production(),1);var RollbackDialog=(props)=>{let theme=useTheme().theme,[data2,setData]=import_react102.useState(props.initial??null),[sel,setSel]=import_react102.useState(props.sel??0),[diff,setDiff]=import_react102.useState(null),[confirm,setConfirm]=import_react102.useState(!1);import_react102.useEffect(()=>{if(props.initial)return;props.gw.request("rollback.list").then(setData).catch((e)=>setData({enabled:!1,checkpoints:[],...{err:e.message}}))},[props.gw,props.initial]);let points=data2?.checkpoints??[],cur=points[sel],open2=(cp)=>{props.gw.request("rollback.diff",{hash:cp.hash}).then(setDiff).catch((e)=>props.toast.error(e))},back=()=>{setDiff(null),setConfirm(!1),props.dialog.replace($jsx(RollbackDialog,{gw:props.gw,toast:props.toast,dialog:props.dialog,initial:data2??void 0,sel}))},restore=(cp)=>{props.gw.request("rollback.restore",{hash:cp.hash}).then((r)=>{if(!r.success)throw Error("restore rejected");let n=r.history_removed;props.toast.show({variant:"success",message:`Restored ${cp.hash.slice(0,7)}${n?` \xB7 ${n} turns removed`:""}`}),props.dialog.clear()}).catch((e)=>{props.toast.show({variant:"error",message:`Restore failed: ${e.message}`}),props.dialog.clear()})},keys=useKeys();if(useKeyboard((key2)=>{if(diff){if(confirm){if(keys.match("dialog.confirm",key2))return restore(cur);if(keys.match("dialog.deny",key2)||keys.match("dialog.cancel",key2))return setConfirm(!1),back();return}if(keys.match("dialog.cancel",key2))return back();if(key2.name==="r")return setConfirm(!0);return}if(!data2?.enabled)return;handleListKey(keys,key2,{count:points.length,setSel,onActivate:()=>{if(cur)open2(cur)}})}),!data2)return $jsx("box",{width:60,height:3,children:$jsx("text",{fg:theme.textMuted,children:"Loading checkpoints\u2026"})});if(!data2.enabled)return $jsxs("box",{flexDirection:"column",width:60,height:5,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.warning,children:$jsx("strong",{children:"Checkpoints disabled"})})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Enable checkpoints in config to use /rollback."})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Esc to close"})})]});if(diff){let body=diff.rendered||diff.diff||diff.stat||"(empty diff)";return $jsxs("box",{flexDirection:"column",width:110,height:30,children:[$jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.primary,children:$jsx("strong",{children:"Rollback \xB7 "})}),$jsx("span",{fg:theme.accent,children:cur.hash.slice(0,7)}),$jsx("span",{fg:theme.textMuted,children:` ${trunc4(cur.message,70)}`})]})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:diff.stat||" "})}),$jsx("box",{height:1}),$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:$jsx(DiffBlock,{text:body})})}),$jsx("box",{height:1}),confirm?$jsx("box",{height:1,children:$jsxs("text",{children:[$jsx("span",{fg:theme.warning,children:$jsx("strong",{children:"Restore this checkpoint? "})}),$jsx("span",{fg:theme.textMuted,children:"[y] restore [n] cancel"})]})}):$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"[r] restore \xB7 Esc back"})})]})}return $jsxs("box",{flexDirection:"column",width:90,height:Math.min(28,Math.max(8,points.length+6)),children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Rollback"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:`${points.length} checkpoints \xB7 \u2191\u2193 navigate Enter diff Esc close`})}),$jsx("box",{height:1}),points.length===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"No checkpoints yet."})}):$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",width:"100%",children:points.map((cp,i)=>{let on=i===sel;return $jsx("box",{height:1,backgroundColor:on?theme.backgroundElement:void 0,onMouseDown:()=>{setSel(i),open2(cp)},onMouseOver:()=>setSel(i),children:$jsxs("text",{children:[$jsx("span",{fg:on?theme.primary:theme.textMuted,children:on?"\u25B8 ":" "}),$jsx("span",{fg:theme.accent,children:cp.hash.slice(0,7).padEnd(9)}),$jsx("span",{fg:theme.textMuted,children:ago(cp.timestamp).padEnd(12)}),$jsx("span",{fg:on?theme.text:theme.textMuted,children:trunc4(cp.message,56)})]})},cp.hash)})})})]})},openRollback=(dialog,gw,toast)=>dialog.replace($jsx(RollbackDialog,{gw,toast,dialog}));var import_react104=__toESM(require_react_production(),1);var tag=(m2,theme)=>m2.role==="user"?{label:"\u25B8 You",fg:theme.info}:m2.role==="assistant"?{label:"\u25C2 Agent",fg:theme.success}:m2.role==="tool"?{label:`\u2699 ${m2.name??"tool"}`,fg:theme.warning}:{label:"\xB7 system",fg:theme.textMuted},flatten2=(t2)=>{if(typeof t2==="string")return t2;if(!Array.isArray(t2))return"";for(let p of t2)if(p&&typeof p==="object"&&"type"in p&&p.type==="text"&&"text"in p&&typeof p.text==="string")return p.text;return""},body=(m2)=>m2.role==="tool"?m2.context??"":flatten2(m2.text),HistoryDialog=(props)=>{let theme=useTheme().theme,[rows3,setRows]=import_react104.useState(null),[err,setErr]=import_react104.useState("");import_react104.useEffect(()=>{props.gw.request("session.history").then((r)=>setRows(r.messages??[])).catch((e)=>{setErr(e.message),setRows([])})},[props.gw]);let n=rows3?.length??0,h2=Math.min(34,Math.max(8,n+5));return $jsxs("box",{flexDirection:"column",width:110,height:h2,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:"Session History"})})}),$jsx("box",{height:1,children:$jsx("text",{fg:err?theme.error:theme.textMuted,children:err?`\u26A0 ${err}`:`${n} messages \xB7 server-authoritative \xB7 Esc to close`})}),$jsx("box",{height:1}),rows3===null?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"loading\u2026"})}):n===0?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"Empty \u2014 no turns yet."})}):$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("box",{flexDirection:"column",children:rows3.map((m2,i)=>{let t2=tag(m2,theme);return $jsxs("box",{height:1,flexDirection:"row",children:[$jsx("box",{width:14,flexShrink:0,children:$jsx("text",{fg:t2.fg,children:trunc4(t2.label,13)})}),$jsx("box",{flexGrow:1,minWidth:0,height:1,overflow:"hidden",children:$jsx("text",{fg:m2.role==="tool"||m2.role==="system"?theme.textMuted:theme.text,children:body(m2).replace(/\n/g," ")})})]},i)})})})]})},openHistory=(dialog,gw)=>dialog.replace($jsx(HistoryDialog,{gw}));var import_react105=__toESM(require_react_production(),1);var InfoDialog=(props)=>{let theme=useTheme().theme,body2=props.rows.filter((r)=>r[1]!==void 0);return $jsxs("box",{flexDirection:"column",minWidth:52,gap:1,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsx("strong",{children:props.title})})}),$jsx("box",{flexDirection:"column",children:$jsx(KVBlock,{rows:body2})}),props.note?$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:props.note})}):null,$jsx("box",{height:1,children:$jsx("text",{fg:theme.borderSubtle,children:"Esc to close"})})]})};function openStatus(dialog,info2,sid){let toolsets=Object.keys(info2?.tools??{}),nTools=Object.values(info2?.tools??{}).reduce((n,v2)=>n+v2.length,0),mcp=info2?.mcp_servers??[],up=mcp.filter((s)=>s.connected).length;dialog.replace($jsx(InfoDialog,{title:"Status",rows:[["Version",info2?.version||"\u2014"],["Model",info2?.model||"\u2014"],["Profile",activeProfileName()],["Home",hermesPath("")],["CWD",info2?.cwd||process.cwd()],["Session",sid||"\u2014"],["Tools",`${nTools} in ${toolsets.length} toolset${toolsets.length===1?"":"s"}`],["Skills",String(Object.values(info2?.skills??{}).reduce((n,v2)=>n+v2.length,0))],["MCP",mcp.length?`${up}/${mcp.length} connected`:void 0]]}))}var UsageDialog=({gw})=>{let theme=useTheme().theme,[u3,setU]=import_react105.useState(null),[err,setErr]=import_react105.useState("");if(import_react105.useEffect(()=>{gw.request("session.usage").then(setU).catch((e)=>setErr(e instanceof Error?e.message:String(e)))},[gw]),err)return $jsx(InfoDialog,{title:"Usage",rows:[["Error",err,theme.error]]});if(!u3)return $jsx(InfoDialog,{title:"Usage",rows:[["","\u2026"]]});let ctx=u3.context_max?`${fmt(u3.context_used??0)} / ${fmt(u3.context_max)} (${Math.round(u3.context_percent??0)}%)`:void 0;return $jsx(InfoDialog,{title:"Usage",note:u3.cost_status==="estimated"?"cost is estimated":void 0,rows:[["Model",u3.model||"\u2014"],["API calls",String(u3.calls??0)],["Input",fmt(u3.input??0)],["Output",fmt(u3.output??0)],["Cache r/w",u3.cache_read||u3.cache_write?`${fmt(u3.cache_read??0)} / ${fmt(u3.cache_write??0)}`:void 0],["Reasoning",u3.reasoning?fmt(u3.reasoning):void 0],["Total",fmt(u3.total??0)],["Context",ctx],["Cost",u3.cost_usd!=null?cost(u3.cost_usd):void 0,theme.accent]]})},openUsage=(dialog,gw)=>dialog.replace($jsx(UsageDialog,{gw})),ProfileDialog=()=>{let[p,setP]=import_react105.useState(void 0),active=activeProfileName();if(import_react105.useEffect(()=>{listProfiles().then((ps)=>setP(ps.find((x2)=>x2.name===active)??null)).catch(()=>setP(null))},[]),p===void 0)return $jsx(InfoDialog,{title:"Profile",rows:[["","\u2026"]]});return $jsx(InfoDialog,{title:"Profile",note:p?void 0:"profile directory not found",rows:[["Active",active],["Home",p?.path??hermesPath("")],["Model",p?.model??"\u2014"],["Provider",p?.provider??"\u2014"],["Skills",p?String(p.skill_count):void 0],["Gateway",p?.gateway_running?"running":"stopped"],["Sticky",p?.is_sticky?"yes":void 0],["Alias",p?.is_default?void 0:p?.has_alias?`~/.local/bin/${active}`:"\u2014"],[".env",p?.has_env?"present":"\u2014"]]})},openProfile=(dialog)=>dialog.replace($jsx(ProfileDialog,{}));var import_react106=__toESM(require_react_production(),1);import{spawnSync as spawnSync2}from"child_process";import{existsSync as existsSync15}from"fs";var CHAFA=["/usr/sbin/chafa","/usr/bin/chafa","/usr/local/bin/chafa","/opt/homebrew/bin/chafa"];function whichChafa(){for(let p of CHAFA)if(existsSync15(p))return p;return null}function render(path7,w2,h2){let bin=whichChafa();if(!bin)return{err:"chafa not installed (brew/apt install chafa)"};let full=path7.startsWith("~")?path7.replace(/^~/,process.env.HOME??""):path7;if(!existsSync15(full))return{err:`file not found: ${full}`};let r=spawnSync2(bin,[`--size=${w2}x${h2}`,"--format=symbols","--symbols=block","--colors=full",full],{encoding:"utf8"});if(r.status!==0)return{err:r.stderr||`chafa exit ${r.status}`};return{rows:parseChafa(r.stdout)}}var ChafaDialog=({path:path7})=>{let theme=useTheme().theme,[w2]=import_react106.useState(80),[h2]=import_react106.useState(28),result=import_react106.useMemo(()=>render(path7,w2,h2),[path7,w2,h2]);return $jsxs("box",{flexDirection:"column",minWidth:w2+4,gap:1,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.primary,children:$jsxs("strong",{children:["chafa demo \xB7 ",path7]})})}),result.err?$jsx("box",{height:1,children:$jsx("text",{fg:theme.error,children:result.err})}):$jsx("box",{flexDirection:"column",children:result.rows.map((row,i)=>$jsx("text",{children:row.map((c,j2)=>$jsx("span",{fg:hex(c.fg),bg:hex(c.bg),children:c.ch},j2))},i))}),$jsx("box",{height:1,children:$jsxs("text",{fg:theme.borderSubtle,children:[result.rows?`${result.rows.length} rows \xB7 ${result.rows.reduce((a,r)=>a+r.length,0)} cells \xB7 `:"","Esc to close"]})})]})};function openChafa(dialog,path7){dialog.replace($jsx(ChafaDialog,{path:path7}))}var import_react108=__toESM(require_react_production(),1);import{tmpdir as tmpdir2}from"os";import{join as join15}from"path";import{rm}from"fs/promises";async function editInEditor(renderer,seed){let cmd=process.env.VISUAL||process.env.EDITOR;if(!cmd)return;let path7=join15(tmpdir2(),`herm-${Date.now()}.md`);await Bun.write(path7,seed),renderer.suspend(),renderer.currentRenderBuffer.clear();let parts2=cmd.split(" ");await Bun.spawn([...parts2,path7],{stdin:"inherit",stdout:"inherit",stderr:"inherit"}).exited;let text2=await Bun.file(path7).text().catch(()=>"");if(rm(path7,{force:!0}).catch(()=>{}),renderer.isDestroyed)return text2.trim()||void 0;return renderer.currentRenderBuffer.clear(),renderer.resume(),renderer.requestRender(),text2.trim()||void 0}var exports_selection={};__export(exports_selection,{yank:()=>yank,key:()=>key2,Selection:()=>exports_selection});function yank(renderer,toast){let text2=renderer.getSelection()?.getSelectedText();if(!text2)return!1;return copy(text2).then(()=>toast?.push("Copied to clipboard","info")).catch(()=>toast?.push("Clipboard write failed","err")),renderer.clearSelection(),!0}function key2(renderer,evt,toast){let sel=renderer.getSelection();if(!sel?.getSelectedText())return!1;if(evt.ctrl&&evt.name==="c")return yank(renderer,toast),!0;if(evt.name==="escape")return renderer.clearSelection(),!0;let focus=renderer.currentFocusedRenderable;if(focus&&sel.selectedRenderables.includes(focus))return!1;return renderer.clearSelection(),!1}function redraw(renderer){resolveRenderLib().clearTerminal(renderer.rendererPtr),renderer.currentRenderBuffer.clear(RGBA.fromValues(0,0,0,0)),renderer.requestRender()}var INTERRUPT_MS=5000,DOUBLE_TAB_MS=400,QUIT_MS=2000;function useAppKeys(o){let renderer=useRenderer(),keys=useKeys(),lastEsc=import_react108.useRef(0),lastTab=import_react108.useRef(0),lastQuit=import_react108.useRef(0),regionFor=(t2)=>t2===o.chatTab?"input":"content";import_react108.useEffect(()=>{let found=conflicts(keys.table).filter((c)=>!(c.a==="session.interrupt"&&c.b==="dialog.cancel")).filter((c)=>!(c.a==="app.exit"&&c.b==="input.clear"));if(found.length===0)return;let first=found[0];o.onNotice(`Keybinding conflict: ${print([first.chord])} \u2192 ${first.a} and ${first.b}`+(found.length>1?` (+${found.length-1} more)`:""))},[keys.table]),useKeyboard((key3)=>{let c=o.composer.current;if(exports_selection.key(renderer,key3)){key3.stopPropagation();return}if(keys.match("input.clear",key3)&&c&&!c.isEmpty()){let v2=c.value().trim();if(v2.length>=20)c.remember(v2);c.set(""),lastQuit.current=0,key3.stopPropagation();return}if(keys.match("input.stash",key3)){o.onStash(),key3.stopPropagation();return}if(keys.match("app.exit",key3)){let now2=Date.now();if(now2-lastQuit.current<QUIT_MS)return o.onQuit();lastQuit.current=now2,o.onQuitArm(keys.print("app.exit")),key3.stopPropagation();return}if(keys.match("app.suspend",key3)){renderer.suspend(),process.kill(process.pid,"SIGTSTP"),process.once("SIGCONT",()=>renderer.resume());return}if(keys.match("app.redraw",key3)){redraw(renderer),key3.stopPropagation();return}if(keys.match("app.sidebar",key3)){o.onToggleSidebar();return}if(o.dialogOpen())return;if(c?.mode()==="shell"){if(key3.name==="escape"){c.setMode("normal"),key3.stopPropagation();return}if(key3.name==="backspace"&&!key3.ctrl&&!key3.meta&&c.caret()===0){c.setMode("normal"),key3.stopPropagation();return}}if(keys.match("queue.flush",key3)&&o.streaming&&o.queued>0){o.onFlushQueue(),key3.stopPropagation();return}if(o.onPromptKey&&!keys.leader&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(o.onPromptKey(key3)){key3.stopPropagation();return}}if(keys.match("editor.open",key3)&&!o.streaming){let seed=c?.value()??"";editInEditor(renderer,seed).then((out)=>{if(out===void 0){if(!process.env.VISUAL&&!process.env.EDITOR)o.onNotice("Set $EDITOR or $VISUAL to use the external editor");return}c?.set(out),o.setFocusRegion("input")});return}if(keys.match("tab.prev",key3)){o.setTab((t2)=>{let n=Math.max(0,t2-1);return o.setFocusRegion(regionFor(n)),n});return}if(keys.match("tab.next",key3)){o.setTab((t2)=>{let n=Math.min(o.tabMax,t2+1);return o.setFocusRegion(regionFor(n)),n});return}if(o.subCount>0&&key3.shift&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(key3.name==="left"){o.cycleSub(-1),key3.stopPropagation();return}if(key3.name==="right"){o.cycleSub(1),key3.stopPropagation();return}}if(keys.leader&&!key3.ctrl&&!key3.meta&&!key3.shift&&key3.eventType!=="release"){let n={"1":0,"2":1,"3":2,"4":3,"5":4,"6":5,"7":6,"8":7,"9":8,"0":9,"-":10}[key3.name];if(n!==void 0&&n<=o.tabMax){o.setTab(()=>{return o.setFocusRegion(regionFor(n)),n}),key3.stopPropagation();return}}if(key3.meta&&!key3.ctrl&&!key3.shift&&key3.eventType!=="release"){let n={"1":0,"2":1,"3":2,"4":3,"5":4,"6":5,"7":6,"8":7,"9":8,"0":9,"-":10}[key3.name];if(n!==void 0&&n<=o.tabMax){o.setTab(()=>{return o.setFocusRegion(regionFor(n)),n}),key3.stopPropagation();return}}if(c?.popOpen()){if(key3.name==="escape")return c.popCancel();if(key3.name==="up"){c.popNav(-1),key3.stopPropagation();return}if(key3.name==="down"){c.popNav(1),key3.stopPropagation();return}if(key3.name==="tab")return c.popAccept();return}if(keys.match("focus.cycle",key3)&&!o.streaming){if(o.tab===o.chatTab){o.setFocusRegion((r)=>r==="input"?"content":"input");return}if(o.focusRegion==="input"){o.setFocusRegion("content");return}let now2=Date.now();if(now2-lastTab.current<DOUBLE_TAB_MS)o.setFocusRegion("input"),lastTab.current=0,key3.stopPropagation();else lastTab.current=now2;return}if(keys.match("session.interrupt",key3)){if(!o.streaming&&o.onEscape?.())return;if(o.streaming){let now2=Date.now();if(now2-lastEsc.current<INTERRUPT_MS){o.onInterrupt(),lastEsc.current=0;return}lastEsc.current=now2,o.onInterruptNotice();return}if(o.tab===o.chatTab&&o.focusRegion==="content")o.setFocusRegion("input");return}if(keys.match("reply.copy",key3))return o.onCopyLast();if(keys.match("clipboard.attach",key3)){o.onAttachClipboard(),key3.stopPropagation();return}if(o.focusRegion==="input"&&!o.streaming){if((key3.name==="!"||key3.name==="1"&&key3.shift)&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"&&c&&c.mode()==="normal"&&!c.popOpen()&&c.caret()===0){c.setMode("shell"),key3.stopPropagation();return}if(key3.name==="up")return void c?.historyUp();if(key3.name==="down")return void c?.historyDown();if(key3.name==="backspace"&&!key3.ctrl&&!key3.meta&&c?.isEmpty()&&o.onDetachLast()){key3.stopPropagation();return}}if(o.tab===o.chatTab&&o.focusRegion==="content"&&!o.streaming&&!key3.ctrl&&!key3.meta&&key3.eventType!=="release"){if(key3.name.length===1&&key3.name!==" "){let ch=key3.shift&&/[a-z]/.test(key3.name)?key3.name.toUpperCase():key3.name;o.setFocusRegion("input"),c?.insert(ch),key3.stopPropagation()}}})}import{writeSync}from"fs";var done=!1;function quit(renderer,sid,title,gw){if(done)process.exit(0);done=!0;try{gw?.kill()}catch{}if(renderer.destroy(),process.stdout.isTTY&&sid){let t2=title?` \u2014 ${title.slice(0,60)}`:"";writeSync(1,`
|
|
4140
4140
|
continue herm --resume ${sid}${t2}
|
|
4141
4141
|
|
|
4142
4142
|
`)}process.exit(0)}var exports_stash={};__export(exports_stash,{push:()=>push2,pop:()=>pop2,drop:()=>drop,all:()=>all,Stash:()=>exports_stash});import{join as join16}from"path";import{existsSync as existsSync16,readFileSync as readFileSync9,writeFileSync as writeFileSync3,mkdirSync as mkdirSync3}from"fs";var MAX=50,file=()=>join16(configDir(),"stash.jsonl");function load3(){if(!existsSync16(file()))return[];return readFileSync9(file(),"utf-8").split(`
|
|
@@ -4167,7 +4167,7 @@ ${r.skipped.slice(0,8).join(", ")}${r.skipped.length>8?", \u2026":""}`:""}`,yes:
|
|
|
4167
4167
|
`,"utf-8");else appendFileSync2(FILE2,enc2(msg)+`
|
|
4168
4168
|
`,"utf-8");bump2((n)=>n+1)},[]),up=import_react118.useCallback(()=>{let h2=hist.current;if(h2.length===0)return;if(idx2.current===-1)stash.current=input;let next2=Math.min(idx2.current+1,h2.length-1);idx2.current=next2,setInput(h2[next2])},[input,setInput]),down=import_react118.useCallback(()=>{if(idx2.current===-1)return;let next2=idx2.current-1;idx2.current=next2,setInput(next2===-1?stash.current:hist.current[next2])},[setInput]);return{push:push3,up,down}}var import_react119=__toESM(require_react_production(),1);var MAX_VISIBLE=14;function badge2(source,theme){if(source==="skill")return theme.success;if(source==="plugin")return theme.info;if(source==="mcp")return theme.warning;return null}var SlashPopover=import_react119.memo(({commands:cmds,cursor,onCursor,onSelect})=>{let theme=useTheme().theme;if(cmds.length===0)return $jsx("box",{border:!0,borderStyle:"single",borderColor:theme.border,backgroundColor:theme.backgroundPanel,paddingX:1,height:3,children:$jsx("text",{fg:theme.textMuted,children:"No matching commands"})});let rows3=import_react119.useMemo(()=>{let sorted=sort(cmds),result=[],flat=0,lastCat="";for(let cmd of sorted){if(cmd.category!==lastCat)result.push({type:"header",cat:cmd.category}),lastCat=cmd.category;result.push({type:"cmd",cmd,flat:flat++})}return result},[cmds]),cursorRow=rows3.findIndex((r)=>r.type==="cmd"&&r.flat===cursor),start2=Math.max(0,Math.min(cursorRow-2,rows3.length-MAX_VISIBLE)),visible=rows3.slice(start2,start2+MAX_VISIBLE),clipped=rows3.length>MAX_VISIBLE,above=clipped&&start2>0,below=clipped&&start2+MAX_VISIBLE<rows3.length,height=visible.length+2+(above?1:0)+(below?1:0);return $jsxs("box",{flexDirection:"column",border:!0,borderStyle:"single",borderColor:theme.border,backgroundColor:theme.backgroundPanel,paddingX:1,height,children:[above?$jsx("box",{height:1,paddingLeft:1,children:$jsx("text",{fg:theme.textMuted,children:"\u2191 more"})}):null,visible.map((row)=>{if(row.type==="header")return $jsx("box",{height:1,paddingLeft:1,children:$jsx("text",{children:$jsx("span",{fg:theme.textMuted,children:$jsx("strong",{children:row.cat})})})},`h-${row.cat}`);let active=row.flat===cursor,color=badge2(row.cmd.source,theme);return $jsxs("box",{height:1,flexDirection:"row",backgroundColor:active?theme.backgroundElement:void 0,onMouseOver:()=>onCursor(row.flat),onMouseDown:()=>onSelect(row.cmd),paddingLeft:2,paddingRight:1,children:[$jsx("box",{flexGrow:1,height:1,children:$jsxs("text",{children:[$jsxs("span",{fg:active?theme.primary:theme.text,children:["/",row.cmd.name]}),row.cmd.argsHint?$jsxs("span",{fg:theme.textMuted,children:[" ",row.cmd.argsHint]}):null,$jsxs("span",{fg:theme.textMuted,children:[" ",row.cmd.description]})]})}),$jsxs("box",{height:1,flexDirection:"row",children:[color?$jsx("text",{children:$jsxs("span",{fg:color,children:[" ",row.cmd.source]})}):null,row.cmd.keybind?$jsx("text",{children:$jsxs("span",{fg:theme.textMuted,children:[" ",row.cmd.keybind]})}):null]})]},`c-${row.cmd.name}`)}),below?$jsx("box",{height:1,paddingLeft:1,children:$jsx("text",{fg:theme.textMuted,children:"\u2193 more"})}):null]})});var import_react120=__toESM(require_react_production(),1);var MAX_VISIBLE2=10,AtRefPopover=import_react120.memo(({items,cursor,onCursor,onSelect})=>{let theme=useTheme().theme,start2=Math.max(0,Math.min(cursor-2,items.length-MAX_VISIBLE2)),visible=items.slice(start2,start2+MAX_VISIBLE2),above=start2>0,below=start2+MAX_VISIBLE2<items.length,height=visible.length+2+(above?1:0)+(below?1:0);return $jsxs("box",{flexDirection:"column",border:!0,borderStyle:"single",borderColor:theme.border,backgroundColor:theme.backgroundPanel,paddingX:1,height,children:[above?$jsx("box",{height:1,paddingLeft:1,children:$jsx("text",{fg:theme.textMuted,children:"\u2191 more"})}):null,visible.map((it,j2)=>{let i=start2+j2,active=i===cursor;return $jsxs("box",{height:1,flexDirection:"row",backgroundColor:active?theme.backgroundElement:void 0,onMouseOver:()=>onCursor(i),onMouseDown:()=>onSelect(i),paddingLeft:2,paddingRight:1,children:[$jsx("box",{flexGrow:1,height:1,overflow:"hidden",children:$jsxs("text",{children:[$jsx("span",{fg:active?theme.primary:theme.text,children:it.display}),it.text!==it.display?$jsx("span",{fg:theme.textMuted,children:` ${it.text}`}):null]})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:it.meta})})]},it.text)}),below?$jsx("box",{height:1,paddingLeft:1,children:$jsx("text",{fg:theme.textMuted,children:"\u2193 more"})}):null]})});var MAX_ROWS=6;function fmt3(n){if(n<1000)return String(n);if(n<1e6)return`${(n/1000).toFixed(1)}k`;return`${(n/1e6).toFixed(2)}M`}var Composer=import_react121.memo(import_react121.forwardRef((props,ref)=>{let theme=useTheme().theme,gw=useGateway(),keys=useKeys(),ta=import_react121.useRef(null),[input,setInput]=import_react121.useState(""),[caret,setCaret]=import_react121.useState(0),[mode,setMode]=import_react121.useState("normal"),modeRef=import_react121.useRef(mode);modeRef.current=mode;let head=import_react121.useMemo(()=>{let i=input.indexOf(`
|
|
4169
4169
|
`);return i<0?input:input.slice(0,i)},[input]),pop3=useSlashPopover(mode==="normal"?head:"",props.cmds),at=useAtRefPopover(mode==="normal"?input:"",caret),write=import_react121.useCallback((v2)=>{ta.current?.setText(v2),ta.current?.gotoBufferEnd(),setInput(v2)},[]),hist=useInputHistory(input,write),bindings=import_react121.useMemo(()=>[...toBindings(keys.chord("input.submit"),"submit"),...toBindings(keys.chord("input.newline"),"newline")],[keys]),live=import_react121.useRef({pop:pop3,at,props,input});live.current={pop:pop3,at,props,input};let wasDirty=import_react121.useRef(!1);import_react121.useEffect(()=>{let dirty=input.trim().length>0;if(dirty===wasDirty.current)return;wasDirty.current=dirty,live.current.props.onDirty?.(dirty)},[input]);let select=(c)=>{if(c.name.includes(" ")){write(`/${c.name} `);return}write(""),live.current.props.onSlash(c)},atAccept=(idx2)=>{let off=ta.current?.cursorOffset,next2=live.current.at.accept(live.current.input,idx2,off);if(next2!==null)write(next2)},paste=import_react121.useCallback((e)=>{e.preventDefault();let raw=decodePasteBytes(e.bytes).replace(/\r\n?/g,`
|
|
4170
|
-
`),text2=/[^\n]/.test(raw)?raw.replace(/\n+$/,""):raw
|
|
4170
|
+
`),text2=/[^\n]/.test(raw)?raw.replace(/\n+$/,""):raw;if(!text2){live.current.props.onAttachClipboard?.();return}let verbatim=()=>ta.current?.insertText(text2);if(looksLikePath(text2)){gw.request("input.detect_drop",{text:text2}).then((r)=>{if(!r.matched)return verbatim();if(r.is_image){let{path:path7,count:count4,name,width,height,token_estimate}=r;if(live.current.props.onAttach?.({attached:!0,path:path7,count:count4,name,width,height,token_estimate}),!r.text.startsWith("[User attached"))ta.current?.insertText(r.text+" ");return}ta.current?.insertText(r.text+" ")}).catch(verbatim);return}if(text2.split(`
|
|
4171
4171
|
`).length<5)return verbatim();gw.request("paste.collapse",{text:text2}).then((r)=>ta.current?.insertText(r.placeholder+" ")).catch(verbatim)},[gw]),submit=()=>{if(live.current.at.open)return atAccept();let p=live.current.pop;if(p.open){let c=p.popover?.[p.cursor];if(c)select(c);return}if(modeRef.current==="shell"){let text3=live.current.input.trim();if(!text3)return;hist.push(text3),write(""),setMode("normal"),live.current.props.onShell?.(text3);return}let text2=live.current.input.trim();if(live.current.props.streaming){if(!text2||!live.current.props.ready)return;if(hist.push(text2),write(""),text2.startsWith("/"))return void live.current.props.onSend(text2);live.current.props.onEnqueue?.(text2);return}let hasAtt=(live.current.props.attachments?.length??0)>0;if(!text2&&!hasAtt){live.current.props.onEmptyEnter?.();return}if(!live.current.props.ready)return;if(text2)hist.push(text2);write(""),live.current.props.onSend(text2)};import_react121.useImperativeHandle(ref,()=>({value:()=>live.current.input,set:write,insert:(text2)=>ta.current?.insertText(text2),remember:hist.push,lines:()=>ta.current?.lineCount??1,isEmpty:()=>live.current.input.trim().length===0,mode:()=>modeRef.current,setMode,caret:()=>ta.current?.cursorOffset??0,popOpen:()=>live.current.pop.open||live.current.at.open,popNav:(d2)=>{let a=live.current.at;if(a.open)return a.setCursor((c)=>Math.max(0,Math.min(a.items.length-1,c+d2)));let max=(live.current.pop.popover?.length??1)-1;pop3.setCursor((c)=>Math.max(0,Math.min(max,c+d2)))},popAccept:()=>{if(live.current.at.open)return atAccept();let p=live.current.pop,c=p.popover?.[p.cursor];if(c)write(`/${c.name}${c.name.includes(" ")?" ":""}`)},popCancel:()=>{let a=live.current.at;if(a.open)return a.dismiss();write("")},historyUp:()=>{let t2=ta.current;if(!t2||modeRef.current==="shell")return!1;let buf=live.current.input;if(t2.cursorOffset>0&&buf.lastIndexOf(`
|
|
4172
4172
|
`,t2.cursorOffset-1)>=0)return!1;if(buf.includes(`
|
|
4173
4173
|
`)&&t2.cursorOffset!==0)return t2.cursorOffset=0,!0;return hist.up(),!0},historyDown:()=>{let t2=ta.current;if(!t2||modeRef.current==="shell")return!1;let buf=live.current.input;if(buf.indexOf(`
|
|
@@ -4176,5 +4176,5 @@ ${r.skipped.slice(0,8).join(", ")}${r.skipped.length>8?", \u2026":""}`:""}`,yes:
|
|
|
4176
4176
|
`).length)),lift=rows3+3;return $jsxs("box",{flexDirection:"column",position:"relative",children:[props.focused&&pop3.open?$jsx("box",{position:"absolute",bottom:lift,left:0,right:0,children:$jsx(SlashPopover,{commands:pop3.popover,cursor:pop3.cursor,onCursor:pop3.setCursor,onSelect:select})}):props.focused&&at.open?$jsx("box",{position:"absolute",bottom:lift,left:0,right:0,children:$jsx(AtRefPopover,{items:at.items,cursor:at.cursor,onCursor:at.setCursor,onSelect:atAccept})}):null,(props.queue?.length??0)>0?$jsx("box",{flexDirection:"column",paddingX:1,paddingBottom:1,children:props.queue.map((q4,i)=>$jsx("box",{height:1,onMouseDown:()=>props.onDequeue?.(i),children:$jsxs("text",{children:[$jsxs("span",{fg:theme.borderSubtle,children:[i===0?"\u256D":"\u2502"," "]}),$jsxs("span",{fg:theme.textMuted,children:["\u23F8 ",i+1,". ",trunc4(q4,60)]})]})},i))}):null,(props.attachments?.length??0)>0?$jsx("box",{flexDirection:"column",paddingX:1,paddingBottom:1,gap:1,children:props.attachments.map((a)=>a.path?$jsx(ChafaImage,{path:a.path,width:60},`p-${a.path}`):null)}):null,(props.attachments?.length??0)>0?$jsx("box",{flexDirection:"row",flexWrap:"wrap",gap:1,paddingX:1,paddingBottom:1,children:props.attachments.map((a,i)=>$jsxs("text",{children:[$jsx("span",{bg:theme.accent,fg:theme.background,children:" img "}),$jsxs("span",{bg:theme.backgroundElement,fg:theme.textMuted,children:[" ",a.name??`image ${i+1}`," "]}),a.width&&a.height?$jsxs("span",{bg:theme.backgroundElement,fg:theme.textMuted,children:[a.width,"\xD7",a.height," "]}):null,a.token_estimate?$jsxs("span",{bg:theme.backgroundElement,fg:theme.textMuted,children:["~",fmt3(a.token_estimate),"t "]}):null,$jsx("span",{fg:theme.textMuted,children:" "}),$jsx("span",{fg:theme.textMuted,children:"\u232B to detach"})]},a.path??i))}):null,$jsxs("box",{border:!0,borderStyle:"single",borderColor:mode==="shell"?theme.primary:props.focused?theme.borderActive:theme.border,flexDirection:"row",position:"relative",children:[$jsx("box",{width:1,children:$jsx("text",{fg:theme.primary,children:mode==="shell"?"$":">"})}),$jsx("box",{width:1}),$jsx("textarea",{ref:ta,onContentChange:()=>{let t2=ta.current;setInput(t2?.plainText??""),setCaret(t2?.cursorOffset??0)},onCursorChange:()=>{if(!live.current.input.includes("@"))return;let off=ta.current?.cursorOffset??0;setCaret((c)=>c===off?c:off)},onSubmit:submit,onPaste:paste,keyBindings:bindings,wrapMode:"word",minHeight:1,maxHeight:MAX_ROWS,placeholder:mode==="shell"?"Run a shell command (30s cap, cwd) \u2014 esc or \u232B to exit":props.streaming?"Type to queue... (Enter queues, click chip to edit)":"Message Hermes... (/ for commands, Shift+Enter for newline)",focused:props.focused,textColor:theme.text,focusedTextColor:theme.text,placeholderColor:theme.textMuted,cursorColor:theme.text,backgroundColor:"transparent",focusedBackgroundColor:"transparent",flexGrow:1}),pop3.ghost&&props.focused&&rows3===1?$jsx("box",{position:"absolute",top:0,left:2+input.length,height:1,children:$jsx("text",{fg:theme.textMuted,children:pop3.ghost})}):null]}),$jsxs("box",{height:1,flexDirection:"row",paddingX:1,children:[$jsxs("text",{children:[$jsx("span",{fg:dot,children:"\u25CF "}),$jsx("span",{fg:theme.textMuted,children:mode==="shell"?"Shell":label}),mode==="shell"?$jsx("span",{fg:theme.textMuted,children:" esc exit shell mode"}):props.streaming&&props.escHint?$jsx("span",{fg:theme.warning,children:" esc again to interrupt"}):props.streaming?$jsx("span",{fg:theme.textMuted,children:" esc\xD72 interrupt"}):null]}),$jsx("box",{flexGrow:1}),props.streaming&&(props.queue?.length??0)>0?$jsxs("text",{fg:theme.textMuted,children:[keys.print("queue.flush")," to send queued now "]}):null,props.model?$jsx("text",{fg:theme.textMuted,children:props.model}):null]})]})}));var import_react122=__toESM(require_react_production(),1);init_sessions_db();var normalize2=(sid)=>sid.trim().replace(/\.json$/i,"").replace(/^session_(?=\d{8}_)/,"");function useSession(){let gw=useGateway(),resume=import_react122.useCallback(async(sid)=>{let target=normalize2(sid),res=await gw.request("session.resume",{session_id:target}),id=res.session_id;gw.setSession(id),set("lastSessionId",res.resumed??target);let messages=res.messages?.length?transcriptToMessages(res.messages):[];return{id,messages}},[gw]),create=import_react122.useCallback(async()=>{let res=await gw.request("session.create",{});return gw.setSession(res.session_id),res.session_id},[gw]),close=import_react122.useCallback(async(sid)=>{if(!sid)return;try{await gw.request("session.close",{session_id:sid})}catch{}},[gw]),boot2=import_react122.useCallback(async(launch)=>{let fresh=async(note)=>({id:await create(),messages:[],note});if(launch.mode==="resume"){let target=launch.sid??exports_sessions_db.lastReal()?.id;if(!target)return fresh("no prior session to resume \u2014 starting fresh");try{return await resume(target)}catch(e){let msg=e instanceof Error?e.message:String(e);return fresh(`resume ${target} failed: ${msg} \u2014 starting fresh`)}}let last3=get("lastSessionId"),tip2=last3?exports_sessions_db.chainTip(last3):null;if(tip2&&exports_sessions_db.byId(tip2)?.message_count===0)try{return await resume(tip2)}catch{}return fresh()},[create,resume]),interrupt=import_react122.useCallback(async()=>{try{await gw.request("session.interrupt")}catch{}},[gw]),branch2=import_react122.useCallback(async(name)=>{try{return(await gw.request("session.branch",name?{name}:{})).session_id??null}catch{return null}},[gw]),compress=import_react122.useCallback(async()=>{try{return await gw.request("session.compress")}catch{return null}},[gw]),undo=import_react122.useCallback(async()=>{try{await gw.request("session.undo")}catch{}},[gw]);return import_react122.useMemo(()=>({boot:boot2,create,resume,close,interrupt,branch:branch2,compress,undo}),[boot2,create,resume,close,interrupt,branch2,compress,undo])}init_sessions_db();init_hermes_analytics();function rehome(newHome){process.env.HERMES_HOME=newHome,setHome2(newHome),setHome(newHome),cache2.clear(),resetKanban(),exports_preferences.reload(),home2.reset()}var import_react123=__toESM(require_react_production(),1);var Countdown=(p)=>{let theme=useTheme().theme,[n,setN]=import_react123.useState(p.seconds);import_react123.useEffect(()=>{if(n<=0){p.onFire();return}let t2=setTimeout(()=>setN((v2)=>v2-1),1000);return()=>clearTimeout(t2)},[n,p.onFire]),useKeyboard(()=>p.onCancel());let bar3="\u2588".repeat(n)+"\u2591".repeat(Math.max(0,p.seconds-n));return $jsxs("box",{flexDirection:"column",width:58,children:[$jsx("box",{height:1,children:$jsx("text",{fg:theme.warning,children:$jsx("strong",{children:p.title})})}),$jsx("box",{height:1}),$jsx("box",{minHeight:1,children:$jsx("text",{wrapMode:"word",children:p.body})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsxs("text",{fg:theme.warning,children:[bar3," ",n,"s"]})}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:p.action})}),$jsx("box",{height:1}),$jsx("box",{height:1,children:$jsx("text",{fg:theme.textMuted,children:"press any key to cancel"})})]})};function openCountdown(dialog,opts){return new Promise((resolve4)=>{dialog.replace($jsx(Countdown,{...opts,onFire:()=>{dialog.clear(),resolve4(!0)},onCancel:()=>{dialog.clear(),resolve4(!1)}}),()=>resolve4(!1))})}var SECONDS=10,SUSPEND=process.platform==="darwin"?"pmset sleepnow":"systemctl suspend",run=(cmd)=>Bun.spawn(["sh","-c",cmd],{stdout:"ignore",stderr:"ignore"}),fired=new Map;function makeGoalHook(dialog,toast){let act=(goal,done2,total)=>{let pref=(exports_preferences.get("onGoalDone")??"toast").trim(),head=goal.length>60?goal.slice(0,57)+"\u2026":goal,n=total&&total>0?` ${done2}/${total} items`:"";if(toast.show({variant:"success",title:"Goal complete",message:head+n,duration:8000}),pref==="toast")return;let cmd=pref==="suspend"?SUSPEND:pref;openCountdown(dialog,{title:"Goal complete \u2014 "+(pref==="suspend"?"suspending":"running hook"),body:head,action:`\u2192 ${cmd}`,seconds:SECONDS}).then((ok)=>{if(ok)run(cmd)})};return{check:(sid)=>{if(!sid)return;io.goalState(sid).then((s)=>{if(!s||s.status!=="done")return;if(fired.get(sid)===s.goal)return;fired.set(sid,s.goal);let list=s.checklist??[],done2=list.filter((i)=>i.status==="completed"||i.status==="impossible").length;act(s.goal,done2,list.length)}).catch(()=>{})}}}var import_react128=__toESM(require_react_production(),1);function select(dialog,opts){return new Promise((res)=>{let settled=!1,done2=(v2)=>{if(settled)return;settled=!0,res(v2),dialog.clear()};dialog.replace($jsx(DialogSelect,{title:opts.title,options:opts.options,placeholder:opts.placeholder,onSelect:(o)=>done2(o)}),()=>done2(null))})}function locate2(routes,name){let lower=name.toLowerCase(),hit=TAB_SLASH[lower];if(hit)return hit;let i=[...routes.keys()].findIndex((n)=>n.toLowerCase()===lower);if(i<0)return;return{tab:TABS.length+i,sub:0}}function createApi(input){return{renderer:input.renderer,theme:{get current(){return input.theme.current.theme},get name(){return input.theme.current.name},get mode(){return input.theme.current.mode},set:(name)=>input.theme.current.set(name),has:(name)=>input.theme.current.has(name)},get keys(){return input.keys.current},ui:{dialog:input.dialog,toast:(o)=>input.toast.show({variant:o.variant??"info",title:o.title,message:o.message}),confirm:(o)=>openConfirm(input.dialog,o),prompt:(o)=>openTextPrompt(input.dialog,o),alert:(title,body2)=>openAlert(input.dialog,title,body2),select:(o)=>select(input.dialog,o)},kv:{get:(key3,fallback)=>{return get("plugin")?.[key3]??fallback},set:(key3,value)=>{let bag=get("plugin")??{};set("plugin",{...bag,[key3]:value})}},get client(){return input.gw.current},event:{on:(fn)=>{let c=input.gw.current,h2=(ev)=>fn(ev);return c.on("event",h2),()=>c.off("event",h2)}},route:{register:(defs)=>{for(let d2 of defs)input.routes.set(d2.name,d2);return input.bump(),()=>{for(let d2 of defs)input.routes.delete(d2.name);input.bump()}},navigate:(name,sub2)=>{let at=locate2(input.routes,name);if(!at)return;input.nav.current?.(at.tab,sub2??at.sub)},get current(){return input.cur.current?.()}},command:{register:(cmds)=>input.cmd.register(cmds)},slots:{register(){throw Error("slots.register is only available inside a plugin's tui() factory")}},lifecycle:{signal:new AbortController().signal,onDispose:()=>()=>{}}}}function createScope(id,fail){let ctrl=new AbortController,list=[],done2=!1,onDispose=(fn)=>{if(done2)return()=>{};let key3=Symbol();return list.push({key:key3,fn}),()=>{list=list.filter((x2)=>x2.key!==key3)}},track=(fn)=>{if(!fn)return()=>{};let ran=!1,drop2=()=>{},wrapped=()=>{if(ran)return;return ran=!0,drop2(),fn()};return drop2=onDispose(wrapped),wrapped},race=(fn,left)=>new Promise((res)=>{let t2=setTimeout(()=>res("timeout"),left);Promise.resolve().then(fn).then(()=>{clearTimeout(t2),res("ok")}).catch((e)=>{clearTimeout(t2),res(e instanceof Error?e:Error(String(e)))})}),dispose=async()=>{if(done2)return;done2=!0,ctrl.abort();let queue=[...list].reverse();list=[];let until2=Date.now()+5000;for(let item of queue){let left=until2-Date.now();if(left<=0){fail(`[plugin:${id}] dispose budget exhausted`);return}let out=await race(item.fn,left);if(out==="ok")continue;if(out==="timeout"){fail(`[plugin:${id}] dispose timed out`);return}fail(`[plugin:${id}] dispose threw`,out)}};return{lifecycle:{signal:ctrl.signal,onDispose},track,dispose}}var import_react125=__toESM(require_react_production(),1);var fmt4=(d2)=>[d2.getHours(),d2.getMinutes(),d2.getSeconds()].map((n)=>String(n).padStart(2,"0")).join(":");function Clock(props){let[now2,set2]=import_react125.useState(()=>new Date);return import_react125.useEffect(()=>{let t2=setInterval(()=>set2(new Date),1000);return()=>clearInterval(t2)},[]),$jsx("text",{fg:props.api.theme.current.textMuted,wrapMode:"none",children:fmt4(now2)})}var plugin={id:"demo.clock",tui(api){api.slots.register({order:100,slots:{app_bottom:()=>$jsx(Clock,{api})}})}},clock_default=plugin;var import_react126=__toESM(require_react_production(),1);import{readdirSync as readdirSync5,statSync as statSync4}from"fs";import{join as join19,basename as basename8}from"path";import{homedir as homedir9}from"os";var PREVIEW_MAX=200000,read2=(dir)=>{return(dir==="/"?[]:[{name:"..",dir:!0}]).concat(readdirSync5(dir,{withFileTypes:!0}).filter((d2)=>!d2.name.startsWith(".")).sort((a,b2)=>a.isDirectory()===b2.isDirectory()?a.name.localeCompare(b2.name):a.isDirectory()?-1:1).map((d2)=>({name:d2.name,dir:d2.isDirectory()})))},isMd=(name)=>/\.(md|markdown|mdx)$/i.test(name);function Files(props){let api=props.api,theme=api.theme.current,[dir,setDir]=import_react126.useState(()=>homedir9()),[sel,setSel]=import_react126.useState(0),[preview2,setPreview]=import_react126.useState(""),[err,setErr]=import_react126.useState(""),rows3=import_react126.useMemo(()=>{setErr("");try{return read2(dir)}catch(e){return setErr(String(e.message??e)),[]}},[dir]);import_react126.useEffect(()=>{setSel((s)=>Math.min(s,Math.max(0,rows3.length-1)))},[rows3.length]);let active=rows3[sel];import_react126.useEffect(()=>{if(!active||active.dir){setPreview("");return}let path7=join19(dir,active.name),cancel=!1;return(async()=>{let st=statSync4(path7);if(st.size>PREVIEW_MAX){if(!cancel)setPreview(`(file too large \u2014 ${st.size} bytes)`);return}let text2=await Bun.file(path7).text();if(!cancel)setPreview(text2)})().catch((e)=>{if(!cancel)setPreview(`(read error: ${e})`)}),()=>{cancel=!0}},[dir,active?.name,active?.dir]);let enter=()=>{if(!active)return;if(active.name===".."){setDir((d2)=>d2==="/"?"/":join19(d2,"..")),setSel(0);return}if(active.dir)setDir((d2)=>join19(d2,active.name)),setSel(0)};return useKeyboard((key3)=>{if(key3.name==="left"){setDir((d2)=>d2==="/"?"/":join19(d2,"..")),setSel(0);return}handleListKey(api.keys,key3,{count:rows3.length,setSel,onActivate:enter})}),$jsxs("box",{flexGrow:1,flexDirection:"column",children:[$jsx("box",{height:1,flexShrink:0,paddingX:1,children:$jsx("text",{fg:theme.textMuted,wrapMode:"none",children:dir})}),$jsxs("box",{flexGrow:1,flexDirection:"row",children:[$jsxs("box",{width:32,flexShrink:0,flexDirection:"column",border:!0,borderColor:theme.border,children:[rows3.map((e,i)=>$jsx("box",{height:1,paddingX:1,backgroundColor:i===sel?theme.backgroundElement:void 0,children:$jsx("text",{fg:i===sel?theme.selectedListItemText:e.dir?theme.accent:theme.text,wrapMode:"none",children:(e.dir?"\u25B8 ":" ")+e.name})},e.name)),err?$jsx("box",{height:1,paddingX:1,children:$jsx("text",{fg:theme.error,wrapMode:"none",children:err})}):null]}),$jsx("box",{flexGrow:1,flexDirection:"column",border:!0,borderColor:theme.border,children:active&&!active.dir?$jsxs($Fragment2,{children:[$jsx("box",{height:1,flexShrink:0,paddingX:1,children:$jsxs("text",{fg:theme.textMuted,wrapMode:"none",children:[basename8(active.name),isMd(active.name)?" \xB7 markdown":""]})}),$jsx("scrollbox",{scrollY:!0,flexGrow:1,children:$jsx("text",{fg:theme.text,wrapMode:"word",children:preview2})})]}):$jsx("box",{paddingX:1,children:$jsx("text",{fg:theme.textMuted,children:"Select a file to preview."})})})]})]})}var plugin2={id:"demo.files",tui(api){api.route.register([{name:"Files",description:"File browser",render:()=>$jsx(Files,{api})}]),api.command.register([{title:"Files: open browser",value:"plugin.files.open",category:"Plugin",onSelect:()=>api.route.navigate("Files")}])}},files_default=plugin2;var INTERNAL=[clock_default,files_default];var KV_ENABLED="enabled",Ctx7=import_react128.createContext(null);function fail(msg,err){let tail=err instanceof Error?`: ${err.message}`:err!==void 0?`: ${String(err)}`:"";console.error(msg+tail)}function enabledMap(){let v2=get("plugin")?.[KV_ENABLED];return v2&&typeof v2==="object"?v2:{}}function persist2(id,on){let bag=get("plugin")??{},map={...enabledMap(),[id]:on};set("plugin",{...bag,[KV_ENABLED]:map})}function scoped(base2,reg,id,scope){let n=0;return{...base2,slots:{register(p){let sid=n++?`${id}:${n}`:id;return scope.track(reg.register({...p,id:sid}))}},route:{register:(defs)=>scope.track(base2.route.register(defs)),navigate:base2.route.navigate,get current(){return base2.route.current}},event:{on:(fn)=>scope.track(base2.event.on(fn))},command:{register:(cmds)=>scope.track(base2.command.register(cmds))},kv:{get:(key3,fb)=>base2.kv.get(`${id}.${key3}`,fb),set:(key3,v2)=>base2.kv.set(`${id}.${key3}`,v2)},lifecycle:scope.lifecycle}}function PluginProvider(props){let list=props.plugins??INTERNAL,renderer=useRenderer(),themeCtx=useTheme(),keys=useKeys(),dialog=useDialog(),toast=useToast(),cmd=useCommand(),gw=useGateway(),themeRef=import_react128.useRef(themeCtx);themeRef.current=themeCtx;let keysRef=import_react128.useRef(keys);keysRef.current=keys;let gwRef=import_react128.useRef(gw);gwRef.current=gw;let navRef=import_react128.useRef(null),curRef=import_react128.useRef(null),routes=import_react128.useRef(new Map).current,[rev,bump2]=import_react128.useReducer((x2)=>x2+1,0),reg=import_react128.useMemo(()=>createReactSlotRegistry(renderer,Object.defineProperty({},"theme",{get:()=>themeRef.current.theme,enumerable:!0}),{onPluginError:(e)=>fail(`[plugin:${e.pluginId}] ${e.phase} error in slot "${e.slot}"`,e.error)}),[renderer]),Slot2=import_react128.useMemo(()=>createSlot(reg),[reg]),api=import_react128.useMemo(()=>createApi({renderer,theme:themeRef,keys:keysRef,dialog,toast,gw:gwRef,cmd,routes,bump:bump2,nav:navRef,cur:curRef}),[renderer,dialog,toast,cmd,routes]),entries=import_react128.useRef(new Map),[gen,force]=import_react128.useReducer((x2)=>x2+1,0),activate=async(id,write=!0)=>{let e=entries.current.get(id);if(!e)return!1;if(e.enabled=!0,write)persist2(id,!0);if(e.scope)return!0;let scope=createScope(id,fail),ok=await Promise.resolve().then(()=>e.plugin.tui(scoped(api,reg,id,scope))).then(()=>!0).catch((err)=>{return fail(`[plugin:${id}] activation failed`,err),e.error=String(err?.message??err),!1});if(!ok||!e.enabled)return await scope.dispose(),force(),ok&&!0;return e.scope=scope,e.error=void 0,force(),!0},deactivate=async(id,write=!0)=>{let e=entries.current.get(id);if(!e)return!1;if(e.enabled=!1,write)persist2(id,!1);let scope=e.scope;if(e.scope=void 0,scope)await scope.dispose();return force(),!0},started=import_react128.useRef(!1);import_react128.useEffect(()=>{if(started.current)return;started.current=!0;let on=enabledMap();for(let p of list)entries.current.set(p.id,{plugin:p,enabled:on[p.id]??p.enabled??!0});return(async()=>{for(let[id,e]of entries.current)if(e.enabled)await activate(id,!1)})(),()=>{for(let[,e]of entries.current)e.scope?.dispose();entries.current.clear(),routes.clear(),reg.clear()}},[]);let value=import_react128.useMemo(()=>({Slot:Slot2,routes:[...routes.values()],bind:(nav,current)=>{navRef.current=nav,curRef.current=current},status:()=>[...entries.current.values()].map((e)=>({id:e.plugin.id,enabled:e.enabled,active:!!e.scope,error:e.error})),activate:(id)=>activate(id),deactivate:(id)=>deactivate(id)}),[Slot2,routes,rev,gen]);return $jsx(Ctx7.Provider,{value,children:props.children})}var usePlugins=makeUse(Ctx7,"usePlugins");var App=(props)=>$jsx(ThemeProvider,{initial:props.initialTheme,children:$jsx(GatewayProvider,{client:props.gateway,children:$jsx(ToastProvider,{children:$jsx(KeysProvider,{children:$jsx(DialogProvider,{children:$jsx(CommandProvider,{children:$jsx(PluginProvider,{children:$jsx(AppInner,{launch:props.launch??{mode:"new"}})})})})})})})}),AppInner=({launch:launch0})=>{let gw=useGateway(),gwRestart=useGatewayRestart(),dialog=useDialog(),themeCtx=useTheme(),toast=useToast(),renderer=useRenderer(),plugins=usePlugins(),session=useSession(),dims=useTerminalDimensions(),goalHook=import_react131.useMemo(()=>makeGoalHook(dialog,toast),[dialog,toast]),[turn,dispatch]=import_react131.useReducer(turnReducer,initialTurn),[ready,setReady]=import_react131.useState(!1),[sid,setSid]=import_react131.useState(""),sidRef=import_react131.useRef(sid);sidRef.current=sid;let[tab,setTab]=import_react131.useState(CHAT_TAB),[subTabs,setSubTabs]=import_react131.useState(()=>({[SESSIONS_TAB]:0,[AUTOMATION_TAB]:0,[CONFIG_TAB]:0})),setSub=import_react131.useCallback((tabIdx,sub2)=>setSubTabs((prev)=>prev[tabIdx]===sub2?prev:{...prev,[tabIdx]:sub2}),[]),sessSub=import_react131.useCallback((i)=>setSub(SESSIONS_TAB,i),[setSub]),autoSub=import_react131.useCallback((i)=>setSub(AUTOMATION_TAB,i),[setSub]),cfgSub=import_react131.useCallback((i)=>setSub(CONFIG_TAB,i),[setSub]),[hideSidebar,setHideSidebar]=import_react131.useState(!1),[usage,setUsage]=import_react131.useState(void 0),[info2,setInfo]=import_react131.useState(null),[title,setTitle]=import_react131.useState(""),[focusRegion,setFocusRegion]=import_react131.useState("input"),goToTab=import_react131.useCallback((t2)=>{setTab(t2),setFocusRegion(t2===CHAT_TAB?"input":"content")},[]),goTo=import_react131.useCallback((t2,sub2)=>{setTab(t2),setSubTabs((prev)=>prev[t2]===sub2?prev:{...prev,[t2]:sub2}),setFocusRegion(t2===CHAT_TAB?"input":"content")},[]),[status,setStatus]=import_react131.useState(""),[escHint,setEscHint]=import_react131.useState(!1),[eikon,setEikon]=import_react131.useState(void 0),[queue,setQueue]=import_react131.useState([]),[busy,setBusy]=import_react131.useState("queue"),turnRef=import_react131.useRef(turn);turnRef.current=turn;let queueRef=import_react131.useRef(queue);queueRef.current=queue;let launchRef=import_react131.useRef(launch0),launch=launchRef.current,[splash,setSplash]=import_react131.useState(launch.splash!==!1),[switching,setSwitching]=import_react131.useState(!1),summoned=import_react131.useRef(!1),[composing,setComposing]=import_react131.useState(!1),splashLast=import_react131.useMemo(()=>launch.mode==="new"?lastReal():void 0,[launch.mode]),splashInfo=import_react131.useMemo(()=>info2?{agentVersion:info2.version,behind:info2.update_behind,model:info2.model}:void 0,[info2?.version,info2?.update_behind,info2?.model]),splashLastProp=import_react131.useMemo(()=>splashLast?{id:splashLast.id,title:splashLast.title}:void 0,[splashLast]),news=import_react131.useMemo(()=>readChangelog()?.headline,[]),[attachments,setAttachments]=import_react131.useState([]),[cloudH,setCloudH]=import_react131.useState(CLOUD_MIN),[pick,setPick]=import_react131.useState(void 0),[skin,setSkin]=import_react131.useState(()=>deriveSkin(void 0)),inflight=import_react131.useRef(!1),undone=import_react131.useRef([]),sessionStart=import_react131.useRef(Date.now()),composer2=import_react131.useRef(null),promptRef=import_react131.useRef(null),{cmds}=useSlashCommands(),cmdsRef=import_react131.useRef(cmds);cmdsRef.current=cmds;let[errorPulse,setErrorPulse]=import_react131.useState(!1),agentState=errorPulse?"error":turn.toolActive?"working":turn.streaming&&turn.hasContent?"speaking":turn.streaming?"thinking":composing?"listening":"idle",onAvatarHold=import_react131.useCallback((s)=>{if(s==="error")setErrorPulse(!1)},[]),prompt=import_react131.useMemo(()=>pending(turn.messages),[turn.messages]),cloudAuto=turn.streaming&&!turn.hasContent&&!prompt,[force,setForce]=import_react131.useState(void 0),cloud=!prompt&&(force??cloudAuto),prevStream=import_react131.useRef(turn.streaming);import_react131.useEffect(()=>{if(!prevStream.current&&turn.streaming)setForce(void 0),setPick(void 0);prevStream.current=turn.streaming},[turn.streaming]);let onPick=import_react131.useCallback((m2)=>{setPick((p)=>{if(m2&&p&&m2.id===p.id){setForce(!1);return}return setForce(!!m2),m2})},[]),onAvatar=import_react131.useCallback(()=>{let next2=!cloud;if(!next2)setPick(void 0);setForce(next2)},[cloud]),closeCloud=import_react131.useCallback(()=>{setForce(!1),setPick(void 0)},[]),intr=import_react131.useRef(()=>{}),onEnqueue=import_react131.useCallback((t2)=>{if(busy==="steer"){gw.request("session.steer",{text:t2}).then((r)=>{if(r.status==="queued")return toast.show({variant:"success",message:"steered \u2014 lands on next tool result"});setQueue((q4)=>[...q4,t2]),toast.show({variant:"info",message:"steer rejected \u2014 queued for next turn"})}).catch(()=>setQueue((q4)=>[...q4,t2]));return}if(busy==="interrupt")return intr.current(),setQueue((q4)=>[t2,...q4]);setQueue((q4)=>[...q4,t2])},[busy,gw,toast]),onAttach=import_react131.useCallback((r)=>setAttachments((a)=>[...a,r]),[]),stream=useStream({dispatch,session,launchRef,sidRef,sessionStart,goalHook,setSid,setInfo,setReady,setTitle,setBusy,setUsage,setStatus,setSkin,setErrorPulse});intr.current=stream.doInterrupt;let reset2=import_react131.useCallback(()=>{stream.interrupted.current=!1,undone.current=[],dispatch({kind:"reset"}),setUsage(void 0),setReady(!1),setStatus(""),setTitle(""),setAttachments([])},[]),newSession=import_react131.useCallback(async()=>{let prev=sidRef.current;if(reset2(),summoned.current=!0,setSplash(!0),prev)session.close(prev);try{setSid(await session.create()),sessionStart.current=Date.now()}catch{}},[reset2,session]),switchSession=import_react131.useCallback(async(target)=>{let prev=sidRef.current;reset2(),summoned.current=!0,setSplash(!0),setSwitching(!0),goToTab(CHAT_TAB);try{let res=await session.resume(target);if(setSid(res.id),sessionStart.current=Date.now(),res.messages.length)dispatch({kind:"load",messages:res.messages});if(prev&&prev!==res.id)session.close(prev);setSplash(!1),summoned.current=!1}catch(err){dispatch({kind:"system",text:`Failed to resume: ${err instanceof Error?err.message:String(err)}`}),setSplash(!1),summoned.current=!1}finally{setSwitching(!1)}},[reset2,session,goToTab]),switchProfile=import_react131.useCallback((newHome,name)=>{rehome(newHome),reset2(),gw.setSession(""),setSid(""),setInfo(null),setSkin(deriveSkin(void 0)),summoned.current=!0,setSplash(!0),launchRef.current={mode:"new",splash:!0},toast.show({variant:"info",message:`Switching to '${name}'\u2026`}),goToTab(CHAT_TAB),gwRestart()},[reset2,goToTab,gwRestart,toast,gw]),loadEikon=import_react131.useCallback((path7)=>{Bun.file(path7).text().then((t2)=>setEikon(parseEikon(t2))).catch(()=>{})},[]),eikonPath=usePref("eikonPath");import_react131.useEffect(()=>{let p=eikonPath||bundledEikonPath(skin.skin?.name);if(p)loadEikon(p);else setEikon(void 0)},[eikonPath,skin.skin?.name,loadEikon]);let turnsFrom=(m2)=>{let msgs=turnRef.current.messages,at=msgs.findIndex((x2)=>x2.id===m2.id);return at<0?0:msgs.slice(at).filter((x2)=>x2.role==="user").length},rewind=import_react131.useCallback(async(m2)=>{if(turnRef.current.streaming)return;let n=turnsFrom(m2);if(n===0)return;let text2=m2.parts.filter((p)=>p.type==="text").map((p)=>p.content).join("");for(let i=0;i<n;i++)await gw.request("session.undo").catch(()=>{});let r=await gw.request("session.history").catch(()=>null),msgs=turnRef.current.messages,at=msgs.findIndex((x2)=>x2.id===m2.id);dispatch({kind:"load",messages:r?transcriptToMessages(r.messages??[]):msgs.slice(0,at)}),composer2.current?.set(text2),setFocusRegion("input")},[gw]),fork=import_react131.useCallback(async(m2)=>{if(turnRef.current.streaming)return;let n=turnsFrom(m2),text2=m2.parts.filter((p)=>p.type==="text").map((p)=>p.content).join(""),res=await gw.request("session.branch",{}).catch((e)=>{return toast.show({variant:"error",message:`branch failed: ${e.message}`}),null});if(!res?.session_id)return;for(let i=0;i<n;i++)await gw.request("session.undo",{session_id:res.session_id}).catch(()=>{});await switchSession(res.session_id),composer2.current?.set(text2),setFocusRegion("input"),toast.show({variant:"success",message:`forked \u2192 ${res.title??res.session_id}`})},[gw,toast,switchSession]),msgMenu=import_react131.useCallback((m2)=>{if(turnRef.current.streaming)return;openMessage(dialog,m2,{rewind,fork})},[dialog,rewind,fork]),attachClipboard=import_react131.useCallback(()=>{gw.request("clipboard.paste").then((r)=>r.attached?setAttachments((a)=>[...a,r]):toast.show({variant:"info",message:r.message??"No image in clipboard"})).catch((e)=>toast.show({variant:"error",message:e.message}))},[gw,toast]),sendRef=import_react131.useRef(()=>{}),slash=useSlash({dispatch,session,turnRef,queueRef,sendRef,composer:composer2,summoned,undone,ready,info:info2,sid,title,skin,setQueue,setFocusRegion,setSplash,setAttachments,setInfo,setUsage,setTitle,newSession,switchSession,rewind,goTo,attachClipboard}),send=import_react131.useCallback(async(raw)=>{if(["exit","quit",":q",":q!",":wq"].includes(raw.trim()))return quit(renderer,sid,title,gw);let m2=raw.match(/^\/(\S+)(?:\s+([\s\S]*))?$/);if(m2){let[,name,arg=""]=m2,r=resolve7(cmdsRef.current,name);if("hit"in r)return slash(r.hit,arg.trim());if("ambiguous"in r){let head=r.ambiguous.slice(0,6).join(", ");return dispatch({kind:"system",text:`ambiguous: /${name} \u2192 ${head}${r.ambiguous.length>6?", \u2026":""}`})}}let text2=raw;if(hasInterp(raw))setStatus("interpolating\u2026"),text2=await interpolate(gw,raw),setStatus("");stream.interrupted.current=!1;let withMedia=attachments.length?[...attachments.flatMap((a)=>a.path?[`MEDIA:${a.path}`]:[]),text2].filter(Boolean).join(`
|
|
4177
4177
|
`):text2;dispatch({kind:"user",text:withMedia}),setAttachments([]),undone.current=[],gw.request("prompt.submit",{text:text2}).catch(()=>{inflight.current=!1}),setTab(CHAT_TAB)},[gw,slash,attachments]);sendRef.current=send;let onShell=import_react131.useCallback((command)=>{setSplash(!1),dispatch({kind:"system",text:`$ ${command}`}),setStatus("running\u2026"),gw.request("shell.exec",{command}).then((r)=>{let out=(r.stdout??"").trimEnd(),err=(r.stderr??"").trimEnd(),body2=[out,err&&`stderr:
|
|
4178
4178
|
${err}`].filter(Boolean).join(`
|
|
4179
|
-
`);if(dispatch({kind:"system",text:body2||`(exit ${r.code??0})`}),(r.code??0)!==0)toast.show({variant:"warning",message:`exit ${r.code}`})}).catch((e)=>dispatch({kind:"system",text:`error: ${e.message}`})).finally(()=>setStatus(""))},[gw,toast]),onSend=import_react131.useCallback((raw)=>{return setSplash(!1),send(raw)},[send]),onEmptyEnter=import_react131.useCallback(()=>{if(!splash||summoned.current||!splashLast||composing)return!1;return setSplash(!1),switchSession(splashLast.id),!0},[splash,splashLast,composing,switchSession]);import_react131.useEffect(()=>{if(turn.streaming)inflight.current=!1},[turn.streaming]),import_react131.useEffect(()=>{if(turn.streaming||inflight.current||!ready||queue.length===0)return;let[head,...rest]=queue;inflight.current=!0,setQueue(rest),send(head)},[turn.streaming,ready,queue,send]);let dequeue=import_react131.useCallback((i)=>{let item=queueRef.current[i];if(item===void 0)return;setQueue((q4)=>q4.filter((_2,j2)=>j2!==i)),composer2.current?.set(item),setFocusRegion("input")},[]),extra=plugins.routes,all2=import_react131.useMemo(()=>[...TABS,...extra.map((r)=>({name:r.name,description:r.description??"Plugin"}))],[extra]),tabMax=all2.length-1;import_react131.useEffect(()=>{plugins.bind(goTo,()=>all2[tab]?.name)},[plugins,goTo,all2,tab]);let subCount=SUB_TABS[tab]?.length??0,cycleSub=import_react131.useCallback((dir)=>{let labels=SUB_TABS[tab];if(!labels||labels.length===0)return;setSubTabs((prev)=>{let cur=prev[tab]??0,next2=(cur+dir+labels.length)%labels.length;return next2===cur?prev:{...prev,[tab]:next2}})},[tab]);useAppKeys({tab,tabMax,chatTab:CHAT_TAB,setTab,subCount,cycleSub,focusRegion,setFocusRegion,streaming:turn.streaming,dialogOpen:dialog.open,composer:composer2,onPromptKey:(k2)=>promptRef.current?.feed(k2)??!1,onEscape:()=>{if(!splash||!summoned.current)return!1;return setSplash(!1),summoned.current=!1,!0},onInterrupt:stream.doInterrupt,queued:queue.length,onFlushQueue:stream.doInterrupt,onQuit:()=>quit(renderer,sid,title,gw),onInterruptNotice:()=>{setEscHint(!0),setTimeout(()=>setEscHint(!1),5000)},onCopyLast:()=>{let m2=[...turnRef.current.messages].reverse().find((x2)=>x2.role==="assistant"&&text(x2));if(m2)copy(text(m2))},onAttachClipboard:attachClipboard,onDetachLast:()=>{if(attachments.length===0)return!1;return setAttachments((a)=>a.slice(0,-1)),!0},onNotice:(text2)=>dispatch({kind:"system",text:text2}),onToggleSidebar:()=>setHideSidebar((v2)=>!v2),onStash:()=>{let c=composer2.current,v2=c?.value().trim()??"";if(!v2){let e=exports_stash.pop();if(!e)return toast.show({variant:"info",message:"stash empty"});c?.set(e.text);return}let n=exports_stash.push(v2);c?.set(""),toast.show({variant:"info",message:`stashed (${n})`})}}),useBridge({tab,ready,streaming:turn.streaming,messages:turn.messages,sid,focusRegion,setTab,setFocusRegion,dispatch,composer:composer2});let contentFocused=focusRegion==="content"&&!turn.streaming,promptAnswer=import_react131.useCallback((id,label,ok)=>dispatch({kind:"prompt.answered",id,label,ok}),[]),promptWire=import_react131.useMemo(()=>({ref:promptRef,onAnswer:promptAnswer}),[promptAnswer]);import_react131.useEffect(()=>{if(prompt&&tab!==CHAT_TAB)setTab(CHAT_TAB)},[prompt?.id]);let content=()=>{let inner=(()=>{switch(tab){case CHAT_TAB:return $jsx(Chat,{messages:turn.messages,streaming:turn.streaming,prompt:promptWire,cloud,cloudH,pick,onResize:setCloudH,onPick,onClose:closeCloud,onRewind:msgMenu});case SESSIONS_TAB:return $jsx(SessionsGroup,{focused:contentFocused,sub:subTabs[SESSIONS_TAB]??0,setSub:sessSub,onSwitch:switchSession,currentId:sid,messages:turn.messages,sessionStart:sessionStart.current,info:info2??void 0});case AUTOMATION_TAB:return $jsx(Automation,{focused:contentFocused,sub:subTabs[AUTOMATION_TAB]??0,setSub:autoSub,sessionId:sid,onSwitchProfile:switchProfile});case CONFIG_TAB:return $jsx(ConfigGroup,{focused:contentFocused,sub:subTabs[CONFIG_TAB]??0,setSub:cfgSub});default:{let r=extra[tab-TABS.length];return r?r.render():null}}})(),name=all2[tab]?.name??"unknown";return $jsx(import_react131.Profiler,{id:`tab:${name}`,onRender,children:inner})},theme=themeCtx.theme,onMouseUp=import_react131.useCallback(()=>copySelection(renderer),[renderer]),inputFocused=focusRegion==="input"&&!prompt;return $jsx(import_react131.Profiler,{id:"shell",onRender,children:$jsx(SkinProvider,{value:skin,children:$jsxs("box",{width:"100%",height:"100%",flexDirection:"column",backgroundColor:theme.background,onMouseUp,children:[$jsx(TabBar,{tabs:all2,activeTab:tab,onTabChange:goToTab}),$jsxs("box",{flexGrow:1,flexDirection:"row",children:[$jsxs("box",{flexGrow:1,flexDirection:"column",children:[$jsxs("box",{flexGrow:1,position:"relative",children:[content(),splash&&tab===CHAT_TAB?$jsx(Splash,{info:splashInfo,last:summoned.current?void 0:splashLastProp,composing,news,loading:switching||!info2}):null]}),$jsx("box",{flexShrink:0,zIndex:1,children:$jsx(Composer,{ref:composer2,focused:inputFocused,ready,streaming:turn.streaming,status,model:info2?.model,escHint,queue,attachments,cmds,onSend,onSlash:slash,onShell,onAttach,onEnqueue,onDequeue:dequeue,onDirty:setComposing,onEmptyEnter})})]}),dims.width>=(tab===CHAT_TAB?120:140)&&!hideSidebar?$jsx(import_react131.Profiler,{id:"sidebar",onRender,children:$jsx(Sidebar,{agentState,info:info2,usage,eikon,profile:activeProfileName(),title,cloud:tab===0&&cloud,pulse:turn.streaming,onAvatar,onAvatarHold})}):null]}),$jsx("box",{height:1,flexShrink:0,paddingX:1,overflow:"hidden",children:$jsx(plugins.Slot,{name:"app_bottom",mode:"single_winner",sid,tab,streaming:turn.streaming})})]})})})};init_perf();import{writeSync as writeSync2}from"fs";var TERMINAL_MODE_RESET="\x1B[0'z\x1B[0'{\x1B[?2029l\x1B[?1016l\x1B[?1015l\x1B[?1006l\x1B[?1005l\x1B[?1003l\x1B[?1002l\x1B[?1001l\x1B[?1000l\x1B[?9l\x1B[?1004l\x1B[?2004l\x1B[?1049l\x1B[<u\x1B[>4;0m\x1B[0m\x1B[?25h";function resetTerminalModes(stream=process.stdout){if(!stream.isTTY)return!1;let fd=typeof stream.fd==="number"?stream.fd:stream===process.stdout?1:void 0;if(fd!==void 0)try{return writeSync2(fd,TERMINAL_MODE_RESET),!0}catch{}try{return stream.write(TERMINAL_MODE_RESET),!0}catch{return!1}}var wired=!1;function installExitResetHooks(){if(wired)return;wired=!0,process.on("exit",()=>{resetTerminalModes()});let codes={SIGHUP:129,SIGINT:130,SIGTERM:143};for(let sig of["SIGINT","SIGTERM","SIGHUP"])process.on(sig,()=>{resetTerminalModes(),process.exit(codes[sig])});process.on("uncaughtException",(err)=>{resetTerminalModes(),console.error(err),process.exit(1)}),process.on("unhandledRejection",(reason)=>{resetTerminalModes(),console.error(reason),process.exit(1)})}boot("import-graph",Bun.nanoseconds()/1e6);var argv=Bun.argv.slice(2);if(argv.includes("--help")||argv.includes("-h"))process.stdout.write(HELP),process.exit(0);if(argv.includes("--version")||argv.includes("-v"))process.stdout.write(VERSION+`
|
|
4179
|
+
`);if(dispatch({kind:"system",text:body2||`(exit ${r.code??0})`}),(r.code??0)!==0)toast.show({variant:"warning",message:`exit ${r.code}`})}).catch((e)=>dispatch({kind:"system",text:`error: ${e.message}`})).finally(()=>setStatus(""))},[gw,toast]),onSend=import_react131.useCallback((raw)=>{return setSplash(!1),send(raw)},[send]),onEmptyEnter=import_react131.useCallback(()=>{if(!splash||summoned.current||!splashLast||composing)return!1;return setSplash(!1),switchSession(splashLast.id),!0},[splash,splashLast,composing,switchSession]);import_react131.useEffect(()=>{if(turn.streaming)inflight.current=!1},[turn.streaming]),import_react131.useEffect(()=>{if(turn.streaming||inflight.current||!ready||queue.length===0)return;let[head,...rest]=queue;inflight.current=!0,setQueue(rest),send(head)},[turn.streaming,ready,queue,send]);let dequeue=import_react131.useCallback((i)=>{let item=queueRef.current[i];if(item===void 0)return;setQueue((q4)=>q4.filter((_2,j2)=>j2!==i)),composer2.current?.set(item),setFocusRegion("input")},[]),extra=plugins.routes,all2=import_react131.useMemo(()=>[...TABS,...extra.map((r)=>({name:r.name,description:r.description??"Plugin"}))],[extra]),tabMax=all2.length-1;import_react131.useEffect(()=>{plugins.bind(goTo,()=>all2[tab]?.name)},[plugins,goTo,all2,tab]);let subCount=SUB_TABS[tab]?.length??0,cycleSub=import_react131.useCallback((dir)=>{let labels=SUB_TABS[tab];if(!labels||labels.length===0)return;setSubTabs((prev)=>{let cur=prev[tab]??0,next2=(cur+dir+labels.length)%labels.length;return next2===cur?prev:{...prev,[tab]:next2}})},[tab]);useAppKeys({tab,tabMax,chatTab:CHAT_TAB,setTab,subCount,cycleSub,focusRegion,setFocusRegion,streaming:turn.streaming,dialogOpen:dialog.open,composer:composer2,onPromptKey:(k2)=>promptRef.current?.feed(k2)??!1,onEscape:()=>{if(!splash||!summoned.current)return!1;return setSplash(!1),summoned.current=!1,!0},onInterrupt:stream.doInterrupt,queued:queue.length,onFlushQueue:stream.doInterrupt,onQuit:()=>quit(renderer,sid,title,gw),onQuitArm:(label)=>toast.show({variant:"info",message:`${label} again to quit`}),onInterruptNotice:()=>{setEscHint(!0),setTimeout(()=>setEscHint(!1),5000)},onCopyLast:()=>{let m2=[...turnRef.current.messages].reverse().find((x2)=>x2.role==="assistant"&&text(x2));if(m2)copy(text(m2))},onAttachClipboard:attachClipboard,onDetachLast:()=>{if(attachments.length===0)return!1;return setAttachments((a)=>a.slice(0,-1)),!0},onNotice:(text2)=>dispatch({kind:"system",text:text2}),onToggleSidebar:()=>setHideSidebar((v2)=>!v2),onStash:()=>{let c=composer2.current,v2=c?.value().trim()??"";if(!v2){let e=exports_stash.pop();if(!e)return toast.show({variant:"info",message:"stash empty"});c?.set(e.text);return}let n=exports_stash.push(v2);c?.set(""),toast.show({variant:"info",message:`stashed (${n})`})}}),useBridge({tab,ready,streaming:turn.streaming,messages:turn.messages,sid,focusRegion,setTab,setFocusRegion,dispatch,composer:composer2});let contentFocused=focusRegion==="content"&&!turn.streaming,promptAnswer=import_react131.useCallback((id,label,ok)=>dispatch({kind:"prompt.answered",id,label,ok}),[]),promptWire=import_react131.useMemo(()=>({ref:promptRef,onAnswer:promptAnswer}),[promptAnswer]);import_react131.useEffect(()=>{if(prompt&&tab!==CHAT_TAB)setTab(CHAT_TAB)},[prompt?.id]);let content=()=>{let inner=(()=>{switch(tab){case CHAT_TAB:return $jsx(Chat,{messages:turn.messages,streaming:turn.streaming,prompt:promptWire,cloud,cloudH,pick,onResize:setCloudH,onPick,onClose:closeCloud,onRewind:msgMenu});case SESSIONS_TAB:return $jsx(SessionsGroup,{focused:contentFocused,sub:subTabs[SESSIONS_TAB]??0,setSub:sessSub,onSwitch:switchSession,currentId:sid,messages:turn.messages,sessionStart:sessionStart.current,info:info2??void 0});case AUTOMATION_TAB:return $jsx(Automation,{focused:contentFocused,sub:subTabs[AUTOMATION_TAB]??0,setSub:autoSub,sessionId:sid,onSwitchProfile:switchProfile});case CONFIG_TAB:return $jsx(ConfigGroup,{focused:contentFocused,sub:subTabs[CONFIG_TAB]??0,setSub:cfgSub});default:{let r=extra[tab-TABS.length];return r?r.render():null}}})(),name=all2[tab]?.name??"unknown";return $jsx(import_react131.Profiler,{id:`tab:${name}`,onRender,children:inner})},theme=themeCtx.theme,onMouseUp=import_react131.useCallback(()=>copySelection(renderer),[renderer]),inputFocused=focusRegion==="input"&&!prompt;return $jsx(import_react131.Profiler,{id:"shell",onRender,children:$jsx(SkinProvider,{value:skin,children:$jsxs("box",{width:"100%",height:"100%",flexDirection:"column",backgroundColor:theme.background,onMouseUp,children:[$jsx(TabBar,{tabs:all2,activeTab:tab,onTabChange:goToTab}),$jsxs("box",{flexGrow:1,flexDirection:"row",children:[$jsxs("box",{flexGrow:1,flexDirection:"column",children:[$jsxs("box",{flexGrow:1,position:"relative",children:[content(),splash&&tab===CHAT_TAB?$jsx(Splash,{info:splashInfo,last:summoned.current?void 0:splashLastProp,composing,news,loading:switching||!info2}):null]}),$jsx("box",{flexShrink:0,zIndex:1,children:$jsx(Composer,{ref:composer2,focused:inputFocused,ready,streaming:turn.streaming,status,model:info2?.model,escHint,queue,attachments,cmds,onSend,onSlash:slash,onShell,onAttach,onAttachClipboard:attachClipboard,onEnqueue,onDequeue:dequeue,onDirty:setComposing,onEmptyEnter})})]}),dims.width>=(tab===CHAT_TAB?120:140)&&!hideSidebar?$jsx(import_react131.Profiler,{id:"sidebar",onRender,children:$jsx(Sidebar,{agentState,info:info2,usage,eikon,profile:activeProfileName(),title,cloud:tab===0&&cloud,pulse:turn.streaming,onAvatar,onAvatarHold})}):null]}),$jsx("box",{height:1,flexShrink:0,paddingX:1,overflow:"hidden",children:$jsx(plugins.Slot,{name:"app_bottom",mode:"single_winner",sid,tab,streaming:turn.streaming})})]})})})};init_perf();import{writeSync as writeSync2}from"fs";var TERMINAL_MODE_RESET="\x1B[0'z\x1B[0'{\x1B[?2029l\x1B[?1016l\x1B[?1015l\x1B[?1006l\x1B[?1005l\x1B[?1003l\x1B[?1002l\x1B[?1001l\x1B[?1000l\x1B[?9l\x1B[?1004l\x1B[?2004l\x1B[?1049l\x1B[<u\x1B[>4;0m\x1B[0m\x1B[?25h";function resetTerminalModes(stream=process.stdout){if(!stream.isTTY)return!1;let fd=typeof stream.fd==="number"?stream.fd:stream===process.stdout?1:void 0;if(fd!==void 0)try{return writeSync2(fd,TERMINAL_MODE_RESET),!0}catch{}try{return stream.write(TERMINAL_MODE_RESET),!0}catch{return!1}}var wired=!1;function installExitResetHooks(){if(wired)return;wired=!0,process.on("exit",()=>{resetTerminalModes()});let codes={SIGHUP:129,SIGINT:130,SIGTERM:143};for(let sig of["SIGINT","SIGTERM","SIGHUP"])process.on(sig,()=>{resetTerminalModes(),process.exit(codes[sig])});process.on("uncaughtException",(err)=>{resetTerminalModes(),console.error(err),process.exit(1)}),process.on("unhandledRejection",(reason)=>{resetTerminalModes(),console.error(reason),process.exit(1)})}boot("import-graph",Bun.nanoseconds()/1e6);var argv=Bun.argv.slice(2);if(argv.includes("--help")||argv.includes("-h"))process.stdout.write(HELP),process.exit(0);if(argv.includes("--version")||argv.includes("-v"))process.stdout.write(VERSION+`
|
|
4180
4180
|
`),process.exit(0);var launch=parseLaunch(argv),main2=async()=>{resetTerminalModes(),installExitResetHooks(),mem("pre-renderer");let prefs=load(),end=mark("renderer-init"),renderer=await createCliRenderer({exitOnCtrlC:!1,useMouse:prefs.mouse??!0,targetFps:prefs.targetFps??30,gatherStats:!1});end();let bump2=()=>renderer.capabilities?.kitty_keyboard||process.stdout.isTTY&&process.stdout.write("\x1B[>4;2m");bump2(),renderer.on("focus",bump2),mem("post-renderer");let root2=createRoot(renderer),endRender=mark("first-render");root2.render($jsx(App,{initialTheme:prefs.theme,launch})),endRender(),boot("first-render",Bun.nanoseconds()/1e6),warmup(),warm(),mem("post-first-render"),monitor(15000),start()};main2().catch(console.error);
|