opencode-navigator 0.22.0 → 0.24.0
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/CHANGELOG.md +19 -0
- package/HOST_API.md +78 -0
- package/PROVIDERS.md +11 -4
- package/README.md +93 -10
- package/dist/{chunk-dz8cfnfs.js → chunk-bv0nm1tj.js} +4 -4
- package/dist/chunk-fd7394y1.js +17 -0
- package/dist/chunk-pwa1wzer.js +22 -0
- package/dist/layout-preset-actions.js +5 -11
- package/dist/navigator-updates.js +63 -25
- package/dist/provider-limits.js +127 -22
- package/dist/quick-actions-settings.js +2 -8
- package/dist/runtime-dependencies.json +5 -5
- package/dist/runtime-requirements.json +1 -0
- package/dist/server.js +12 -5
- package/dist/sidebar-settings.js +1052 -315
- package/dist/sidebar-shortcuts.js +1 -1
- package/dist/toolbar-settings.js +144 -35
- package/dist/tui.js +765 -564
- package/dist/upgrade-notes.js +87 -0
- package/package.json +20 -18
- package/scripts/snapshot-verifier.mjs +36 -0
- package/scripts/update-local-snapshot.mjs +29 -16
package/dist/sidebar-settings.js
CHANGED
|
@@ -1,23 +1,487 @@
|
|
|
1
1
|
import {SIDEBAR_SECTIONS,SECTION_DEFINITIONS,PLUGIN_ID,DEFAULT_SEARCH_KEY
|
|
2
|
-
} from "./chunk-
|
|
3
|
-
import"./chunk-qmntexwm.js"
|
|
4
|
-
import {
|
|
2
|
+
} from "./chunk-bv0nm1tj.js"
|
|
3
|
+
import"./chunk-qmntexwm.js"
|
|
4
|
+
import {isNewerVersion
|
|
5
|
+
} from "./chunk-fd7394y1.js";
|
|
6
|
+
import {use as _$use5} from "@opentui/solid"
|
|
7
|
+
import {createComponent as _$createComponent14} from "@opentui/solid"
|
|
8
|
+
import {memo as _$memo6} from "@opentui/solid"
|
|
9
|
+
import {effect as _$effect13} from "@opentui/solid"
|
|
10
|
+
import {createTextNode as _$createTextNode12} from "@opentui/solid"
|
|
11
|
+
import {insertNode as _$insertNode12} from "@opentui/solid"
|
|
12
|
+
import {insert as _$insert10} from "@opentui/solid"
|
|
13
|
+
import {setProp as _$setProp13} from "@opentui/solid"
|
|
14
|
+
import {createElement as _$createElement13} from "@opentui/solid"
|
|
15
|
+
import {TextAttributes as TextAttributes6} from "@opentui/core"
|
|
16
|
+
import {For as For5,Show as Show6} from "solid-js"
|
|
17
|
+
import {DialogSurface as DialogSurface6,Tab} from "./tui.js"
|
|
18
|
+
import {createComponent as _$createComponent11} from "@opentui/solid"
|
|
19
|
+
import {useTerminalDimensions as useTerminalDimensions4} from "@opentui/solid"
|
|
20
|
+
import {createEffect as createEffect3,createMemo as createMemo3,onCleanup as onCleanup7} from "solid-js"
|
|
21
|
+
import {useDialogScroll as useDialogScroll2,useDialogState as useDialogState4,useDialogs as useDialogs5,useIcons as useIcons5} from "./tui.js"
|
|
22
|
+
import {use as _$use3} from "@opentui/solid"
|
|
23
|
+
import {effect as _$effect3} from "@opentui/solid"
|
|
24
|
+
import {insert as _$insert2} from "@opentui/solid"
|
|
25
|
+
import {setProp as _$setProp3} from "@opentui/solid"
|
|
26
|
+
import {createElement as _$createElement3} from "@opentui/solid"
|
|
27
|
+
import {createComponent as _$createComponent3} from "@opentui/solid"
|
|
28
|
+
import {useTerminalDimensions as useTerminalDimensions2} from "@opentui/solid"
|
|
29
|
+
import {For} from "solid-js"
|
|
30
|
+
import {DialogAction as DialogAction2,DialogHeader as DialogHeader2,DialogSurface as DialogSurface2} from "./tui.js"
|
|
31
|
+
import {createComponent as _$createComponent2} from "@opentui/solid"
|
|
32
|
+
import {createMemo,createSignal,onMount} from "solid-js"
|
|
33
|
+
import {useDialogState as useDialogState2,useDialogs} from "./tui.js"
|
|
5
34
|
import {use as _$use} from "@opentui/solid"
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {createTextNode as _$
|
|
9
|
-
import {insertNode as _$
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {For as For3} from "solid-js"
|
|
15
|
-
import {DialogSurface as DialogSurface2,Tab} from "./tui.js"
|
|
35
|
+
import {effect as _$effect} from "@opentui/solid"
|
|
36
|
+
import {insert as _$insert} from "@opentui/solid"
|
|
37
|
+
import {createTextNode as _$createTextNode} from "@opentui/solid"
|
|
38
|
+
import {insertNode as _$insertNode} from "@opentui/solid"
|
|
39
|
+
import {setProp as _$setProp} from "@opentui/solid"
|
|
40
|
+
import {createElement as _$createElement} from "@opentui/solid"
|
|
41
|
+
import {mergeProps as _$mergeProps} from "@opentui/solid"
|
|
42
|
+
import {createComponent as _$createComponent} from "@opentui/solid"
|
|
16
43
|
import {useTerminalDimensions} from "@opentui/solid"
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
44
|
+
import {onCleanup} from "solid-js"
|
|
45
|
+
import {DialogAction,DialogHeader,DialogSurface,GuardedConfirmation,useDialogState} from "./tui.js"
|
|
46
|
+
async function runProcessCommand(command,input="",signal,timeoutMs=15000,environment){if(signal?.aborted)
|
|
47
|
+
return{code:-1,stdout:"",timedOut:true}
|
|
48
|
+
let child
|
|
49
|
+
try{child=Bun.spawn([...command],{stdin:"pipe",stdout:"pipe",stderr:"ignore",env:environment?{...process.env,...environment}:undefined
|
|
50
|
+
})
|
|
51
|
+
} catch{return{code:-1,stdout:""}}
|
|
52
|
+
child.stdin.write(input)
|
|
53
|
+
child.stdin.end()
|
|
54
|
+
let timer
|
|
55
|
+
const chunks=[]
|
|
56
|
+
const output=()=>new TextDecoder().decode(Buffer.concat(chunks))
|
|
57
|
+
let cancel
|
|
58
|
+
const cancelled=new Promise((resolve)=>{cancel=()=>{try{child.kill("SIGKILL")
|
|
59
|
+
} catch{}
|
|
60
|
+
resolve({code:-1,stdout:output(),timedOut:true})
|
|
61
|
+
}
|
|
62
|
+
timer=setTimeout(cancel,timeoutMs)
|
|
63
|
+
signal?.addEventListener("abort",cancel,{once:true})
|
|
64
|
+
if(signal?.aborted)
|
|
65
|
+
cancel()
|
|
66
|
+
})
|
|
67
|
+
const read=async ()=>{const reader=child.stdout.getReader()
|
|
68
|
+
let size=0
|
|
69
|
+
try{while(true){const part=await reader.read()
|
|
70
|
+
if(part.done)
|
|
71
|
+
break
|
|
72
|
+
size += part.value.byteLength
|
|
73
|
+
if(size>65536){child.kill()
|
|
74
|
+
throw new Error("Command output exceeded its limit")
|
|
75
|
+
}
|
|
76
|
+
chunks.push(part.value)
|
|
77
|
+
}
|
|
78
|
+
return{code:await child.exited,stdout:output()}} finally{reader.releaseLock()
|
|
79
|
+
}}
|
|
80
|
+
try{return await Promise.race([read(),cancelled])
|
|
81
|
+
} catch{return{code:-1,stdout:""}} finally{clearTimeout(timer)
|
|
82
|
+
signal?.removeEventListener("abort",cancel)
|
|
83
|
+
}}
|
|
84
|
+
async function openExternalUrl(url,signal){const target=new URL(url)
|
|
85
|
+
if(!["https:","http:"].includes(target.protocol)||target.username||target.password)
|
|
86
|
+
return false
|
|
87
|
+
const programs={darwin:["open",url],linux:["xdg-open",url],win32:["rundll32.exe","url.dll,FileProtocolHandler",url]
|
|
88
|
+
}
|
|
89
|
+
const command=programs[process.platform]
|
|
90
|
+
if(!command)
|
|
91
|
+
return false
|
|
92
|
+
const result=await runProcessCommand(command,"",signal,4000)
|
|
93
|
+
return result.code===0
|
|
94
|
+
}
|
|
95
|
+
var BUG_REPORT_REPOSITORY="St1ggy/opencode-navigator"
|
|
96
|
+
var BUG_REPORT_BASE=`https://github.com/${BUG_REPORT_REPOSITORY}/issues`
|
|
97
|
+
function bugReportBrowserTarget(draft){const target=new URL(`${BUG_REPORT_BASE}/new`)
|
|
98
|
+
target.searchParams.set("template","bug_report.yml")
|
|
99
|
+
target.searchParams.set("title",draft.title)
|
|
100
|
+
target.searchParams.set("report",draft.body)
|
|
101
|
+
const needsCopy=target.href.length>7000
|
|
102
|
+
if(needsCopy)
|
|
103
|
+
target.searchParams.delete("report")
|
|
104
|
+
const copyTitle=target.href.length>7000
|
|
105
|
+
if(copyTitle)
|
|
106
|
+
target.searchParams.delete("title")
|
|
107
|
+
return{url:target.href,needsCopy,copyText:copyTitle?`${draft.title}
|
|
108
|
+
|
|
109
|
+
${draft.body}`:draft.body}}
|
|
110
|
+
function BugReportConfirmation(props){return _$createComponent(GuardedConfirmation,{get api(){return props.api
|
|
111
|
+
},title:"Send Bug report",get message(){return props.draft.title
|
|
112
|
+
},get current(){return props.current
|
|
113
|
+
},get onConfirm(){return props.onConfirm
|
|
114
|
+
},render:(actions)=>_$createComponent(BugReportReview,_$mergeProps({get api(){return props.api
|
|
115
|
+
},get draft(){return props.draft
|
|
116
|
+
}},actions))
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
function BugReportReview(props){const dimensions=useTerminalDimensions()
|
|
120
|
+
const [selected,setSelected]=useDialogState("confirm-report",0)
|
|
121
|
+
let body
|
|
122
|
+
const prefix="opencode-navigator.bug-report.confirm"
|
|
123
|
+
const unregister=props.api.keymap.registerLayer({mode:"modal",priority:1200,commands:[{name:`${prefix}.switch`,run:()=>setSelected((value)=>1-value)
|
|
124
|
+
},{name:`${prefix}.activate`,run:()=>selected()?props.confirm():props.cancel()
|
|
125
|
+
},{name:`${prefix}.up`,run:()=>body?.scrollBy(-1)
|
|
126
|
+
},{name:`${prefix}.down`,run:()=>body?.scrollBy(1)
|
|
127
|
+
}],bindings:[...["tab","shift+tab","left","right"].map((key)=>({key,cmd:`${prefix}.switch`
|
|
128
|
+
})),{key:"return",cmd:`${prefix}.activate`
|
|
129
|
+
},{key:"up",cmd:`${prefix}.up`
|
|
130
|
+
},{key:"down",cmd:`${prefix}.down`
|
|
131
|
+
}]
|
|
132
|
+
})
|
|
133
|
+
onCleanup(unregister)
|
|
134
|
+
return _$createComponent(DialogSurface,{get api(){return props.api
|
|
135
|
+
},lift:true,get children(){return [_$createComponent(DialogHeader,{get api(){return props.api
|
|
136
|
+
},title:"Send Bug report",icon:"bug",get onBack(){return props.cancel
|
|
137
|
+
}}),(()=>{var _el$=_$createElement("text"),_el$2=_$createTextNode(`Public issue in `),_el$3=_$createTextNode(` \xB7 Type: Bug`)
|
|
138
|
+
_$insertNode(_el$,_el$2)
|
|
139
|
+
_$insertNode(_el$,_el$3)
|
|
140
|
+
_$setProp(_el$,"wrapMode","word")
|
|
141
|
+
_$insert(_el$,BUG_REPORT_REPOSITORY,_el$3)
|
|
142
|
+
_$effect((_$p)=>_$setProp(_el$,"fg",props.api.theme.current.textMuted,_$p))
|
|
143
|
+
return _el$
|
|
144
|
+
})(),(()=>{var _el$4=_$createElement("scrollbox"),_el$5=_$createElement("text"),_el$6=_$createTextNode(`
|
|
145
|
+
|
|
146
|
+
`)
|
|
147
|
+
_$insertNode(_el$4,_el$5)
|
|
148
|
+
_$use((node)=>{body=node
|
|
149
|
+
},_el$4)
|
|
150
|
+
_$setProp(_el$4,"scrollX",false)
|
|
151
|
+
_$insertNode(_el$5,_el$6)
|
|
152
|
+
_$setProp(_el$5,"wrapMode","word")
|
|
153
|
+
_$insert(_el$5,()=>props.draft.title,_el$6)
|
|
154
|
+
_$insert(_el$5,()=>props.draft.body,null)
|
|
155
|
+
_$effect((_p$)=>{var _v$=Math.max(3,Math.min(12,dimensions().height-15)),_v$2=props.api.theme.current.text
|
|
156
|
+
_v$!==_p$.e&&(_p$.e=_$setProp(_el$4,"height",_v$,_p$.e))
|
|
157
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp(_el$5,"fg",_v$2,_p$.t))
|
|
158
|
+
return _p$
|
|
159
|
+
},{e:undefined,t:undefined
|
|
160
|
+
})
|
|
161
|
+
return _el$4
|
|
162
|
+
})(),(()=>{var _el$7=_$createElement("box")
|
|
163
|
+
_$setProp(_el$7,"flexDirection","row")
|
|
164
|
+
_$setProp(_el$7,"gap",1)
|
|
165
|
+
_$insert(_el$7,_$createComponent(DialogAction,{get api(){return props.api
|
|
166
|
+
},id:`${prefix}.cancel`,label:"Cancel",icon:"close",get selected(){return selected()===0
|
|
167
|
+
},onSelect:()=>setSelected(0),get onActivate(){return props.cancel
|
|
168
|
+
}}),null)
|
|
169
|
+
_$insert(_el$7,_$createComponent(DialogAction,{get api(){return props.api
|
|
170
|
+
},id:`${prefix}.send`,label:"Send report",icon:"export",get selected(){return selected()===1
|
|
171
|
+
},onSelect:()=>setSelected(1),get onActivate(){return props.confirm
|
|
172
|
+
}}),null)
|
|
173
|
+
return _el$7
|
|
174
|
+
})()]
|
|
175
|
+
}})
|
|
176
|
+
}
|
|
177
|
+
import {createEffect,onCleanup as onCleanup2} from "solid-js"
|
|
178
|
+
function registerBugReportNavigation(input){const prefix="opencode-navigator.bug-report"
|
|
179
|
+
createEffect(()=>{const actionsFocused=input.active()>=2
|
|
180
|
+
const unregister=input.api.keymap.registerLayer({mode:"modal",priority:1100,commands:[{name:`${prefix}.next`,run:()=>input.focus((input.active() + 1)%6)},{name:`${prefix}.previous`,run:()=>input.focus((input.active() + 5)%6)},{name:`${prefix}.send`,run:input.send},{name:`${prefix}.title-next`,run:()=>input.focus(1)},{name:`${prefix}.activate`,enabled:()=>input.active()>=2,run:()=>input.activate(input.active()-2)
|
|
181
|
+
},{name:`${prefix}.up`,enabled:()=>input.active()>=2,run:()=>input.focus(input.active()===2?5:input.active()-1)
|
|
182
|
+
},{name:`${prefix}.down`,enabled:()=>input.active()>=2,run:()=>input.focus(input.active()===5?2:input.active() + 1)
|
|
183
|
+
}],bindings:[{key:"tab",cmd:`${prefix}.next`},{key:"shift+tab",cmd:`${prefix}.previous`},{key:"ctrl+return",cmd:`${prefix}.send`},...input.active()===0?[{key:"return",cmd:`${prefix}.title-next`}]:[],...actionsFocused?[{key:"return",cmd:`${prefix}.activate`},{key:"up",cmd:`${prefix}.up`},{key:"down",cmd:`${prefix}.down`}]:[]]
|
|
184
|
+
})
|
|
185
|
+
onCleanup2(unregister)
|
|
186
|
+
})
|
|
187
|
+
}
|
|
188
|
+
function createBugReportDialogController(api,model){const dialogs=useDialogs(api)
|
|
189
|
+
const [active,setActive]=useDialogState2("report-field",0)
|
|
190
|
+
const [notice,setNotice]=useDialogState2("report-notice","")
|
|
191
|
+
const [copyLink,setCopyLink]=useDialogState2("browser-failed",false)
|
|
192
|
+
const [cursor,setCursor]=useDialogState2("report-cursor",0)
|
|
193
|
+
const [hovered,setHovered]=createSignal()
|
|
194
|
+
let title
|
|
195
|
+
let body
|
|
196
|
+
let actions
|
|
197
|
+
const focus=(index)=>{setActive(index)
|
|
198
|
+
setHovered(undefined)
|
|
199
|
+
if(index===0)
|
|
200
|
+
title?.focus()
|
|
201
|
+
else if(index===1)
|
|
202
|
+
body?.focus()
|
|
203
|
+
else
|
|
204
|
+
actions?.focus()
|
|
205
|
+
}
|
|
206
|
+
const send=()=>{if(!model.canSend())
|
|
207
|
+
return
|
|
208
|
+
const draft={...model.draft()
|
|
209
|
+
}
|
|
210
|
+
dialogs.open(()=>_$createComponent2(BugReportConfirmation,{api,draft,current:()=>model.canSend()&&JSON.stringify(draft)===JSON.stringify(model.draft()),onConfirm:()=>{dialogs.back()
|
|
211
|
+
model.send(draft).then(()=>{const result=model.result()
|
|
212
|
+
if(api.lifecycle.signal?.aborted||!result||api.ui.dialog.open)
|
|
213
|
+
return
|
|
214
|
+
api.ui.toast({variant:result.status==="created"?"success":"warning",title:"Bug report",message:result.url??result.message,duration:6000
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
}}))
|
|
218
|
+
}
|
|
219
|
+
const browse=async ()=>{if(!model.canBrowse())
|
|
220
|
+
return
|
|
221
|
+
const target=model.browser()
|
|
222
|
+
if(copyLink()){const copied=api.renderer.copyToClipboardOSC52(target.url)
|
|
223
|
+
setNotice(copied?"Browser link copied.":"Clipboard unavailable. The full draft remains in the editor.")
|
|
224
|
+
return
|
|
225
|
+
}
|
|
226
|
+
if(target.needsCopy&&!api.renderer.copyToClipboardOSC52(target.copyText)){setNotice("Clipboard unavailable. Shorten the report URL or copy the draft manually.")
|
|
227
|
+
return
|
|
228
|
+
}
|
|
229
|
+
setCopyLink(!await model.open(target.url))
|
|
230
|
+
}
|
|
231
|
+
function browserLabel(){if(copyLink())
|
|
232
|
+
return "Copy browser link"
|
|
233
|
+
if(model.result()?.status==="uncertain")
|
|
234
|
+
return "Check GitHub issues in browser"
|
|
235
|
+
return model.browser().needsCopy?"Copy report & open browser":"Open in browser"
|
|
236
|
+
}
|
|
237
|
+
function maintenanceLabel(){const status=model.result()?.status
|
|
238
|
+
if(status==="uncertain")
|
|
239
|
+
return "Retry after checking GitHub"
|
|
240
|
+
return status==="created"||status==="partial"?"New report":"Check GitHub CLI"
|
|
241
|
+
}
|
|
242
|
+
function maintain(){const status=model.result()?.status
|
|
243
|
+
setNotice("")
|
|
244
|
+
setCopyLink(false)
|
|
245
|
+
if(status==="uncertain")
|
|
246
|
+
model.retryAfterReview()
|
|
247
|
+
else if(status==="created"||status==="partial"){model.newReport()
|
|
248
|
+
body?.setText(model.draft().body)
|
|
249
|
+
setCursor(0)
|
|
250
|
+
focus(0)
|
|
251
|
+
} else
|
|
252
|
+
model.probe(true)
|
|
253
|
+
}
|
|
254
|
+
const options=createMemo(()=>[{label:model.busy()?"Sending\u2026":"Send to GitHub\u2026",icon:"export",disabled:!model.canSend(),run:send
|
|
255
|
+
},{label:browserLabel(),icon:"right",disabled:!model.canBrowse(),run:()=>void browse()
|
|
256
|
+
},{label:maintenanceLabel(),icon:"retry",disabled:model.busy()||model.readiness().status==="checking",run:maintain
|
|
257
|
+
},{label:model.busy()?"Back (sending continues)":"Cancel",icon:"close",disabled:false,run:dialogs.back
|
|
258
|
+
}])
|
|
259
|
+
function activate(index){const option=options()[index]
|
|
260
|
+
if(option&&!option.disabled)
|
|
261
|
+
option.run()
|
|
262
|
+
}
|
|
263
|
+
registerBugReportNavigation({api,active,focus,activate,send
|
|
264
|
+
})
|
|
265
|
+
onMount(()=>{model.probe()
|
|
266
|
+
queueMicrotask(()=>focus(active()))
|
|
267
|
+
})
|
|
268
|
+
return{dialogs,options,setHovered,setCursor,status:()=>notice()||model.result()?.message||model.message()||model.readiness().message,selected:(index)=>(hovered()??active()-2)===index,activate(index){focus(index + 2)
|
|
269
|
+
activate(index)
|
|
270
|
+
},editorFocus(index){setActive(index)
|
|
271
|
+
setHovered(undefined)
|
|
272
|
+
},titleSubmit:()=>focus(1),titleRef(node){title=node
|
|
273
|
+
},bodyRef(node){body=node
|
|
274
|
+
body.cursorOffset=cursor()
|
|
275
|
+
},actionsRef(node){actions=node
|
|
276
|
+
}}}
|
|
277
|
+
import {effect as _$effect2} from "@opentui/solid"
|
|
278
|
+
import {use as _$use2} from "@opentui/solid"
|
|
279
|
+
import {setProp as _$setProp2} from "@opentui/solid"
|
|
280
|
+
import {createTextNode as _$createTextNode2} from "@opentui/solid"
|
|
281
|
+
import {insertNode as _$insertNode2} from "@opentui/solid"
|
|
282
|
+
import {createElement as _$createElement2} from "@opentui/solid"
|
|
283
|
+
import {untrack} from "solid-js"
|
|
284
|
+
function BugReportEditor(props){let body
|
|
285
|
+
const initialBody=untrack(()=>props.draft.body)
|
|
286
|
+
const theme=()=>props.api.theme.current
|
|
287
|
+
return [(()=>{var _el$=_$createElement2("box"),_el$2=_$createElement2("text"),_el$4=_$createElement2("input")
|
|
288
|
+
_$insertNode2(_el$,_el$2)
|
|
289
|
+
_$insertNode2(_el$,_el$4)
|
|
290
|
+
_$insertNode2(_el$2,_$createTextNode2(`Issue title`))
|
|
291
|
+
var _ref$=props.titleRef
|
|
292
|
+
typeof _ref$==="function"?_$use2(_ref$,_el$4):props.titleRef=_el$4
|
|
293
|
+
_$setProp2(_el$4,"id","opencode-navigator.bug-report.title")
|
|
294
|
+
_$setProp2(_el$4,"placeholder","Describe the problem briefly")
|
|
295
|
+
_$setProp2(_el$4,"on:focused",()=>props.focus(0))
|
|
296
|
+
_$setProp2(_el$4,"onInput",(title)=>props.change({title
|
|
297
|
+
}))
|
|
298
|
+
_$effect2((_p$)=>{var _v$=theme().textMuted,_v$2=props.draft.title,_v$3=theme().text,_v$4=theme().text,_v$5=theme().backgroundPanel,_v$6=theme().backgroundElement,_v$7=theme().textMuted,_v$8=theme().primary,_v$9=props.titleSubmit
|
|
299
|
+
_v$!==_p$.e&&(_p$.e=_$setProp2(_el$2,"fg",_v$,_p$.e))
|
|
300
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp2(_el$4,"value",_v$2,_p$.t))
|
|
301
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp2(_el$4,"textColor",_v$3,_p$.a))
|
|
302
|
+
_v$4!==_p$.o&&(_p$.o=_$setProp2(_el$4,"focusedTextColor",_v$4,_p$.o))
|
|
303
|
+
_v$5!==_p$.i&&(_p$.i=_$setProp2(_el$4,"backgroundColor",_v$5,_p$.i))
|
|
304
|
+
_v$6!==_p$.n&&(_p$.n=_$setProp2(_el$4,"focusedBackgroundColor",_v$6,_p$.n))
|
|
305
|
+
_v$7!==_p$.s&&(_p$.s=_$setProp2(_el$4,"placeholderColor",_v$7,_p$.s))
|
|
306
|
+
_v$8!==_p$.h&&(_p$.h=_$setProp2(_el$4,"cursorColor",_v$8,_p$.h))
|
|
307
|
+
_v$9!==_p$.r&&(_p$.r=_$setProp2(_el$4,"onSubmit",_v$9,_p$.r))
|
|
308
|
+
return _p$
|
|
309
|
+
},{e:undefined,t:undefined,a:undefined,o:undefined,i:undefined,n:undefined,s:undefined,h:undefined,r:undefined
|
|
310
|
+
})
|
|
311
|
+
return _el$
|
|
312
|
+
})(),(()=>{var _el$5=_$createElement2("box"),_el$6=_$createElement2("text"),_el$8=_$createElement2("textarea")
|
|
313
|
+
_$insertNode2(_el$5,_el$6)
|
|
314
|
+
_$insertNode2(_el$5,_el$8)
|
|
315
|
+
_$insertNode2(_el$6,_$createTextNode2(`Description, reproduction, and expected behavior`))
|
|
316
|
+
_$use2((node)=>{body=node
|
|
317
|
+
untrack(()=>props.bodyRef(node))
|
|
318
|
+
},_el$8)
|
|
319
|
+
_$setProp2(_el$8,"id","opencode-navigator.bug-report.body")
|
|
320
|
+
_$setProp2(_el$8,"initialValue",initialBody)
|
|
321
|
+
_$setProp2(_el$8,"wrapMode","word")
|
|
322
|
+
_$setProp2(_el$8,"on:focused",()=>props.focus(1))
|
|
323
|
+
_$setProp2(_el$8,"onContentChange",()=>{if(body)
|
|
324
|
+
props.change({body:body.plainText
|
|
325
|
+
})
|
|
326
|
+
})
|
|
327
|
+
_$setProp2(_el$8,"onCursorChange",()=>{if(body)
|
|
328
|
+
props.cursor(body.cursorOffset)
|
|
329
|
+
})
|
|
330
|
+
_$effect2((_p$)=>{var _v$0=theme().textMuted,_v$1=props.height,_v$10=theme().text,_v$11=theme().text,_v$12=theme().backgroundPanel,_v$13=theme().backgroundElement,_v$14=theme().primary
|
|
331
|
+
_v$0!==_p$.e&&(_p$.e=_$setProp2(_el$6,"fg",_v$0,_p$.e))
|
|
332
|
+
_v$1!==_p$.t&&(_p$.t=_$setProp2(_el$8,"height",_v$1,_p$.t))
|
|
333
|
+
_v$10!==_p$.a&&(_p$.a=_$setProp2(_el$8,"textColor",_v$10,_p$.a))
|
|
334
|
+
_v$11!==_p$.o&&(_p$.o=_$setProp2(_el$8,"focusedTextColor",_v$11,_p$.o))
|
|
335
|
+
_v$12!==_p$.i&&(_p$.i=_$setProp2(_el$8,"backgroundColor",_v$12,_p$.i))
|
|
336
|
+
_v$13!==_p$.n&&(_p$.n=_$setProp2(_el$8,"focusedBackgroundColor",_v$13,_p$.n))
|
|
337
|
+
_v$14!==_p$.s&&(_p$.s=_$setProp2(_el$8,"cursorColor",_v$14,_p$.s))
|
|
338
|
+
return _p$
|
|
339
|
+
},{e:undefined,t:undefined,a:undefined,o:undefined,i:undefined,n:undefined,s:undefined
|
|
340
|
+
})
|
|
341
|
+
return _el$5
|
|
342
|
+
})()]
|
|
343
|
+
}
|
|
344
|
+
function BugReportDialog(props){const model=createBugReportDialogController(props.api,props.controller)
|
|
345
|
+
const dimensions=useTerminalDimensions2()
|
|
346
|
+
return _$createComponent3(DialogSurface2,{get api(){return props.api
|
|
347
|
+
},lift:true,get children(){return [_$createComponent3(DialogHeader2,{get api(){return props.api
|
|
348
|
+
},title:"Report a bug",icon:"bug",get onBack(){return model.dialogs.back
|
|
349
|
+
}}),_$createComponent3(BugReportEditor,{get api(){return props.api
|
|
350
|
+
},get draft(){return props.controller.draft()
|
|
351
|
+
},get height(){return Math.max(3,Math.min(8,dimensions().height-21))
|
|
352
|
+
},get titleRef(){return model.titleRef
|
|
353
|
+
},get bodyRef(){return model.bodyRef
|
|
354
|
+
},get change(){return props.controller.change
|
|
355
|
+
},get cursor(){return model.setCursor
|
|
356
|
+
},get focus(){return model.editorFocus
|
|
357
|
+
},get titleSubmit(){return model.titleSubmit
|
|
358
|
+
}}),(()=>{var _el$=_$createElement3("text")
|
|
359
|
+
_$setProp3(_el$,"height",1)
|
|
360
|
+
_$setProp3(_el$,"truncate",true)
|
|
361
|
+
_$setProp3(_el$,"wrapMode","none")
|
|
362
|
+
_$insert2(_el$,()=>model.status())
|
|
363
|
+
_$effect3((_$p)=>_$setProp3(_el$,"fg",props.api.theme.current.textMuted,_$p))
|
|
364
|
+
return _el$
|
|
365
|
+
})(),(()=>{var _el$2=_$createElement3("box")
|
|
366
|
+
var _ref$=model.actionsRef
|
|
367
|
+
typeof _ref$==="function"?_$use3(_ref$,_el$2):model.actionsRef=_el$2
|
|
368
|
+
_$setProp3(_el$2,"id","opencode-navigator.bug-report.actions")
|
|
369
|
+
_$setProp3(_el$2,"focusable",true)
|
|
370
|
+
_$insert2(_el$2,_$createComponent3(For,{each:[0,1,2,3],children:(index)=>_$createComponent3(DialogAction2,{get api(){return props.api
|
|
371
|
+
},id:`opencode-navigator.bug-report.action.${index}`,get label(){return model.options()[index].label
|
|
372
|
+
},get icon(){return model.options()[index].icon
|
|
373
|
+
},get disabled(){return model.options()[index].disabled
|
|
374
|
+
},get selected(){return model.selected(index)
|
|
375
|
+
},onSelect:()=>model.setHovered(index),onActivate:()=>model.activate(index)
|
|
376
|
+
})
|
|
377
|
+
}))
|
|
378
|
+
return _el$2
|
|
379
|
+
})()]
|
|
380
|
+
}})
|
|
381
|
+
}
|
|
382
|
+
import {getNavigatorAboutServices as getNavigatorAboutServices3} from "./tui.js"
|
|
383
|
+
import {createSignal as createSignal2} from "solid-js"
|
|
384
|
+
function initialBugReport(environment){return{title:"",body:`## What happened
|
|
385
|
+
|
|
386
|
+
## Steps to reproduce
|
|
387
|
+
|
|
388
|
+
## Expected behavior
|
|
389
|
+
|
|
390
|
+
## Environment
|
|
391
|
+
- Navigator: ${environment.navigatorVersion}
|
|
392
|
+
- OpenCode: ${environment.openCodeVersion}
|
|
393
|
+
- Platform: ${environment.platform}
|
|
394
|
+
- Runtime: ${environment.runtime}
|
|
395
|
+
`
|
|
396
|
+
}}
|
|
397
|
+
function validBugReport(draft){return Boolean(draft.title.trim()&&draft.body.trim())
|
|
398
|
+
}
|
|
399
|
+
function runGitHubCommand(command,input,signal){return runProcessCommand(command,input,signal,15000,{GH_PROMPT_DISABLED:"1",GH_HOST:"github.com",GH_PAGER:"cat"
|
|
400
|
+
})
|
|
401
|
+
}
|
|
402
|
+
function createGitHubBugReportTransport(open,run=runGitHubCommand){return{open,async probe(signal){const version=await run(["gh","--version"],"",signal)
|
|
403
|
+
if(version.code!==0)
|
|
404
|
+
return{status:"missing",message:"Install GitHub CLI for direct sending, or open the browser."}
|
|
405
|
+
const auth=await run(["gh","auth","status","--active","--hostname","github.com"],"",signal)
|
|
406
|
+
if(auth.code!==0)
|
|
407
|
+
return{status:"unauthenticated",message:"Sign in with gh auth login, or open the browser."}
|
|
408
|
+
const help=await run(["gh","issue","create","--help"],"",signal)
|
|
409
|
+
return help.code===0&&help.stdout.includes("--type")?{status:"ready",message:"Ready to send through your authenticated GitHub CLI."}:{status:"unsupported",message:"Update gh to support the Bug issue type, or use the browser."}},async send(draft,signal){const result=await run(["gh","issue","create","--repo",`github.com/${BUG_REPORT_REPOSITORY}`,"--type","Bug",`--title=${draft.title.trim()}`,"--body-file","-"],draft.body,signal)
|
|
410
|
+
const url=/^https:\/\/github\.com\/St1ggy\/opencode-navigator\/issues\/\d+\s*$/m.exec(result.stdout)?.[0].trim()
|
|
411
|
+
if(url)
|
|
412
|
+
return result.code===0?{status:"created",message:"Bug report created.",url}:{status:"partial",message:"Issue created; open it to review the Bug type.",url}
|
|
413
|
+
if(result.timedOut||![-1,4,127].includes(result.code))
|
|
414
|
+
return{status:"uncertain",message:"Outcome unknown. Check GitHub before sending again."}
|
|
415
|
+
return{status:"failed",message:"Could not send. Check GitHub access, then retry."}}}}
|
|
416
|
+
function createBugReportController(environment,transport=createGitHubBugReportTransport(openExternalUrl),signal){const [draft,setDraft]=createSignal2(initialBugReport(environment))
|
|
417
|
+
const [readiness,setReadiness]=createSignal2({status:"checking",message:"Checking GitHub CLI\u2026"
|
|
418
|
+
})
|
|
419
|
+
const [busy,setBusy]=createSignal2(false)
|
|
420
|
+
const [result,setResult]=createSignal2()
|
|
421
|
+
const [message,setMessage]=createSignal2("")
|
|
422
|
+
let probing
|
|
423
|
+
let checked=false
|
|
424
|
+
const locked=()=>busy()||result()&&result().status!=="failed"
|
|
425
|
+
function probe(force=false){if(probing)
|
|
426
|
+
return probing
|
|
427
|
+
if(checked&&!force)
|
|
428
|
+
return Promise.resolve()
|
|
429
|
+
setReadiness({status:"checking",message:"Checking GitHub CLI\u2026"})
|
|
430
|
+
probing=transport.probe(signal).then(setReadiness).catch(()=>setReadiness({status:"missing",message:"Could not check gh. The browser remains available."})).then(()=>{checked=true
|
|
431
|
+
}).finally(()=>{probing=undefined
|
|
432
|
+
})
|
|
433
|
+
return probing
|
|
434
|
+
}
|
|
435
|
+
return{draft,readiness,busy,result,message,probe,change(value){setDraft((previous)=>({...previous,...value}))
|
|
436
|
+
},canSend:()=>readiness().status==="ready"&&validBugReport(draft())&&!locked(),canBrowse:()=>result()?.status==="uncertain"||Boolean(result()?.url)||validBugReport(draft()),browser:()=>{if(result()?.url)
|
|
437
|
+
return{url:result().url,needsCopy:false,copyText:""}
|
|
438
|
+
if(result()?.status==="uncertain")
|
|
439
|
+
return{url:BUG_REPORT_BASE,needsCopy:false,copyText:""}
|
|
440
|
+
return bugReportBrowserTarget(draft())
|
|
441
|
+
},retryAfterReview(){if(busy()||result()?.status!=="uncertain")
|
|
442
|
+
return
|
|
443
|
+
setResult(undefined)
|
|
444
|
+
setMessage("Review your report, then confirm another send.")
|
|
445
|
+
},newReport(){if(busy())
|
|
446
|
+
return
|
|
447
|
+
setResult(undefined)
|
|
448
|
+
setMessage("")
|
|
449
|
+
setDraft(initialBugReport(environment))
|
|
450
|
+
},async send(confirmed){if(readiness().status!=="ready"||!validBugReport(confirmed)||locked()||JSON.stringify(confirmed)!==JSON.stringify(draft()))
|
|
451
|
+
return
|
|
452
|
+
setBusy(true)
|
|
453
|
+
setResult(undefined)
|
|
454
|
+
setMessage("Sending your Bug report\u2026")
|
|
455
|
+
try{setResult(await transport.send({...confirmed},signal))
|
|
456
|
+
} catch{setResult({status:"uncertain",message:"Outcome unknown. Check GitHub before sending again."})
|
|
457
|
+
} finally{setBusy(false)
|
|
458
|
+
}},async open(url){if(url!==BUG_REPORT_BASE&&!url.startsWith(`${BUG_REPORT_BASE}/`))
|
|
459
|
+
return false
|
|
460
|
+
try{const opened=await transport.open(url,signal)
|
|
461
|
+
setMessage(opened?"Opened in your browser.":`Browser unavailable. Copy this URL: ${url}`)
|
|
462
|
+
return opened
|
|
463
|
+
} catch{setMessage(`Browser unavailable. Copy this URL: ${url}`)
|
|
464
|
+
return false
|
|
465
|
+
}}}}
|
|
466
|
+
import {createMemo as createMemo2} from "solid-js"
|
|
20
467
|
import {supportsSidebarSection} from "./tui.js"
|
|
468
|
+
import {getNavigatorAboutServices} from "./tui.js"
|
|
469
|
+
function aboutSettingsOptions(api,icons){const service=getNavigatorAboutServices(api)
|
|
470
|
+
const state=service?.checkState()
|
|
471
|
+
const busy=!service||service.checking()||service.updating()
|
|
472
|
+
let updateDescription="No confirmed update available"
|
|
473
|
+
if(service?.installed?.())
|
|
474
|
+
updateDescription="Installed; restart OpenCode"
|
|
475
|
+
else if(service?.updating())
|
|
476
|
+
updateDescription="Installing\u2026"
|
|
477
|
+
else if(state?.status==="available")
|
|
478
|
+
updateDescription=`Install ${state.latest}`
|
|
479
|
+
return [{title:`${icons.icon("retry")} Check for updates`,value:"about:check",description:service?.checking()?"Checking\u2026":"Check the published Navigator version",disabled:busy
|
|
480
|
+
},{title:`${icons.icon("update")} Update Navigator\u2026`,value:"about:update",description:updateDescription,disabled:busy||state?.status!=="available"||Boolean(service?.installed?.())
|
|
481
|
+
},{title:`${icons.icon("history")} Changelog by version\u2026`,value:"about:changelog",description:"Browse the bundled release history",disabled:!service
|
|
482
|
+
},{title:`${icons.icon("bug")} Report a bug\u2026`,value:"about:bug-report",description:"Edit a Bug report; send with gh or open your browser",disabled:!service
|
|
483
|
+
}]
|
|
484
|
+
}
|
|
21
485
|
import {supportsPermissionMode} from "./tui.js"
|
|
22
486
|
function behaviorSettingsOptions(api,preferences,icons){const permission=preferences.autoApprovePermissions()
|
|
23
487
|
const permissionDescription=permission?"on for new sessions":"off for new sessions"
|
|
@@ -45,7 +509,7 @@ return [{title:`${icons.icon(title ? "checked" : "unchecked")} Session title`,va
|
|
|
45
509
|
}]
|
|
46
510
|
}
|
|
47
511
|
function createSettingsGroups(api,preferences,icons){const supportedSections=()=>SIDEBAR_SECTIONS.filter((name)=>supportsSidebarSection(api,name))
|
|
48
|
-
const groups=
|
|
512
|
+
const groups=createMemo2(()=>[{id:"about",tab:"About",title:"About Navigator",options:aboutSettingsOptions(api,icons)},{id:"scope",tab:"Scope",title:"Preference scope",options:[{title:`${icons.icon(preferences.preferenceScope() === "global" ? "radioOn" : "radioOff")} Global`,value:"scope:global",description:"applies to every worktree"
|
|
49
513
|
},{title:`${icons.icon(preferences.preferenceScope() === "worktree" ? "radioOn" : "radioOff")} Current worktree`,value:"scope:worktree",description:preferences.canUseWorktreeScope()?preferences.preferenceScopeLabel():"unavailable outside a worktree"
|
|
50
514
|
}]
|
|
51
515
|
},{id:"presets",tab:"Presets",title:"Layout presets",options:[...Object.keys(preferences.layoutPresets()).sort((left,right)=>left.localeCompare(right)).map((name)=>({title:`${icons.icon("presets")} ${name}`,value:`preset:custom:${encodeURIComponent(name)}`,description:preferences.workspaceProfiles?.()[name]?`profile \xB7 ${preferences.workspaceProfiles()[name]}`:"enter to apply or edit"
|
|
@@ -66,7 +530,7 @@ return{title:`${icons.icon(preferences.selectedSections()[section.name] ? "check
|
|
|
66
530
|
},{title:`${icons.icon("help")} Open quick setup guide`,value:"wizard",description:"tips and section settings"
|
|
67
531
|
}]
|
|
68
532
|
}])
|
|
69
|
-
const orderedGroups=
|
|
533
|
+
const orderedGroups=createMemo2(()=>["sections","scope","presets","behavior","defaults","about"].map((id)=>groups().find((group)=>group.id===id)))
|
|
70
534
|
return orderedGroups
|
|
71
535
|
}
|
|
72
536
|
function registerSettingsKeymap(input){return input.api.keymap.registerLayer({mode:"modal",priority:1000,commands:[{name:`${PLUGIN_ID}.settings.previous`,run:()=>input.move(-1)},{name:`${PLUGIN_ID}.settings.next`,run:()=>input.move(1)},{name:`${PLUGIN_ID}.settings.select`,run:()=>input.select()},{name:`${PLUGIN_ID}.settings.groups`,run:()=>{if(input.activeGroup()!=="sections")
|
|
@@ -83,23 +547,43 @@ input.openLimitPrompt(section)
|
|
|
83
547
|
}},{name:`${PLUGIN_ID}.settings.previous-tab`,run:()=>input.switchGroup(-1)},{name:`${PLUGIN_ID}.settings.next-tab`,run:()=>input.switchGroup(1)},{name:`${PLUGIN_ID}.settings.move-up`,run:()=>input.reorder(input.options()[input.active()]?.value,-1)},{name:`${PLUGIN_ID}.settings.move-down`,run:()=>input.reorder(input.options()[input.active()]?.value,1)}],bindings:[{key:"up",cmd:`${PLUGIN_ID}.settings.previous`},{key:"down",cmd:`${PLUGIN_ID}.settings.next`},{key:"tab",cmd:`${PLUGIN_ID}.settings.next-tab`},{key:"shift+tab",cmd:`${PLUGIN_ID}.settings.previous-tab`},{key:"space",cmd:`${PLUGIN_ID}.settings.select`},{key:"return",cmd:`${PLUGIN_ID}.settings.select`},{key:"l",cmd:`${PLUGIN_ID}.settings.item-limit`},{key:"a",cmd:`${PLUGIN_ID}.settings.quick-actions`},{key:"g",cmd:`${PLUGIN_ID}.settings.groups`},{key:"left",cmd:`${PLUGIN_ID}.settings.move-up`},{key:"right",cmd:`${PLUGIN_ID}.settings.move-down`},{key:"shift+up",cmd:`${PLUGIN_ID}.settings.move-up`},{key:"shift+down",cmd:`${PLUGIN_ID}.settings.move-down`}]
|
|
84
548
|
})
|
|
85
549
|
}
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
|
|
550
|
+
import {useRenderer} from "@opentui/solid"
|
|
551
|
+
import {createEffect as createEffect2,onCleanup as onCleanup3} from "solid-js"
|
|
552
|
+
function useSettingsReveal(input){const renderer=useRenderer()
|
|
553
|
+
let pending=true
|
|
554
|
+
createEffect2(()=>{input.active()
|
|
555
|
+
input.group()
|
|
556
|
+
pending=true
|
|
557
|
+
})
|
|
558
|
+
const reveal=()=>{if(!pending)
|
|
559
|
+
return
|
|
560
|
+
const body=input.body()
|
|
561
|
+
const option=input.options()[input.active()]
|
|
562
|
+
if(!body||body.isDestroyed||body.scrollHeight===0||!option)
|
|
563
|
+
return
|
|
564
|
+
pending=false
|
|
565
|
+
body.scrollChildIntoView(input.optionId(option.value))
|
|
566
|
+
}
|
|
567
|
+
renderer.on("frame",reveal)
|
|
568
|
+
onCleanup3(()=>renderer.off("frame",reveal))
|
|
569
|
+
}
|
|
570
|
+
import {createComponent as _$createComponent10} from "@opentui/solid"
|
|
571
|
+
import {setProp as _$setProp10} from "@opentui/solid"
|
|
572
|
+
import {effect as _$effect10} from "@opentui/solid"
|
|
573
|
+
import {createTextNode as _$createTextNode9} from "@opentui/solid"
|
|
574
|
+
import {insertNode as _$insertNode9} from "@opentui/solid"
|
|
575
|
+
import {createElement as _$createElement10} from "@opentui/solid"
|
|
576
|
+
import {createComponent as _$createComponent6} from "@opentui/solid"
|
|
577
|
+
import {effect as _$effect6} from "@opentui/solid"
|
|
89
578
|
import {createTextNode as _$createTextNode5} from "@opentui/solid"
|
|
90
579
|
import {insertNode as _$insertNode5} from "@opentui/solid"
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {createTextNode as _$createTextNode3} from "@opentui/solid"
|
|
95
|
-
import {insertNode as _$insertNode3} from "@opentui/solid"
|
|
96
|
-
import {insert as _$insert3} from "@opentui/solid"
|
|
97
|
-
import {setProp as _$setProp3} from "@opentui/solid"
|
|
98
|
-
import {createElement as _$createElement3} from "@opentui/solid"
|
|
580
|
+
import {insert as _$insert5} from "@opentui/solid"
|
|
581
|
+
import {setProp as _$setProp6} from "@opentui/solid"
|
|
582
|
+
import {createElement as _$createElement6} from "@opentui/solid"
|
|
99
583
|
import {TextAttributes as TextAttributes3} from "@opentui/core"
|
|
100
|
-
import {Show,createSignal,onCleanup} from "solid-js"
|
|
584
|
+
import {Show,createSignal as createSignal3,onCleanup as onCleanup4} from "solid-js"
|
|
101
585
|
import {supportsSidebarSection as supportsSidebarSection3} from "./tui.js"
|
|
102
|
-
import {DialogSurface,createDialogStack,useDialogs,useIcons as useIcons3} from "./tui.js"
|
|
586
|
+
import {DialogSurface as DialogSurface3,createDialogStack,useDialogs as useDialogs2,useIcons as useIcons3} from "./tui.js"
|
|
103
587
|
var ONBOARDING_STEPS=[{title:"A control center that stays compact",summary:"Navigator brings session state, search, and controls into OpenCode's existing sidebar.",icon:"help",features:[{icon:"sections",title:"Progressive disclosure",description:"Expand only the context you need right now."},{icon:"scope",title:"Current context",description:"Follow the active session, workspace, and worktree."},{icon:"actions",title:"Mouse and keyboard",description:"Use the same controls with either input method."}]
|
|
104
588
|
},{title:"Stay oriented while agents work",summary:"Keep current work visible without turning the sidebar into another dashboard.",icon:"todo",features:[{icon:"todo",title:"Todo filters",description:"Separate active, finished, and cancelled work."},{icon:"subagents",title:"Live subagents",description:"See running, retrying, recent, and failed child sessions; open them directly."
|
|
105
589
|
},{icon:"info",title:"Provider limits",description:"Link a matching Codex account for model quotas and confirmed banked resets."
|
|
@@ -117,92 +601,92 @@ var ONBOARDING_STEPS=[{title:"A control center that stays compact",summary:"Navi
|
|
|
117
601
|
},{icon:"presets",title:"Scoped presets",description:"Save layouts globally or for the current worktree."},{icon:"settings",title:"Accessible controls",description:"Change shortcuts or use Text fallback without a restart."
|
|
118
602
|
}]
|
|
119
603
|
}];
|
|
120
|
-
import {effect as _$
|
|
604
|
+
import {effect as _$effect4} from "@opentui/solid"
|
|
121
605
|
import {memo as _$memo} from "@opentui/solid"
|
|
122
|
-
import {createComponent as _$
|
|
123
|
-
import {createTextNode as _$
|
|
124
|
-
import {insertNode as _$
|
|
125
|
-
import {insert as _$
|
|
126
|
-
import {setProp as _$
|
|
127
|
-
import {createElement as _$
|
|
606
|
+
import {createComponent as _$createComponent4} from "@opentui/solid"
|
|
607
|
+
import {createTextNode as _$createTextNode3} from "@opentui/solid"
|
|
608
|
+
import {insertNode as _$insertNode3} from "@opentui/solid"
|
|
609
|
+
import {insert as _$insert3} from "@opentui/solid"
|
|
610
|
+
import {setProp as _$setProp4} from "@opentui/solid"
|
|
611
|
+
import {createElement as _$createElement4} from "@opentui/solid"
|
|
128
612
|
import {TextAttributes} from "@opentui/core"
|
|
129
|
-
import {For} from "solid-js"
|
|
613
|
+
import {For as For2} from "solid-js"
|
|
130
614
|
import {SelectionBox,useIcons} from "./tui.js"
|
|
131
615
|
function OnboardingStep(props){const icons=useIcons()
|
|
132
616
|
const theme=()=>props.api.theme.current
|
|
133
|
-
return(()=>{var _el$=_$
|
|
134
|
-
_$
|
|
135
|
-
_$
|
|
136
|
-
_$
|
|
137
|
-
_$
|
|
138
|
-
_$
|
|
139
|
-
_$
|
|
140
|
-
_$
|
|
141
|
-
_$
|
|
142
|
-
_$
|
|
143
|
-
_$
|
|
144
|
-
_$
|
|
145
|
-
_$
|
|
146
|
-
_$
|
|
147
|
-
_$
|
|
148
|
-
_$
|
|
149
|
-
_$
|
|
150
|
-
},children:(feature)=>(()=>{var _el$14=_$
|
|
151
|
-
_$
|
|
152
|
-
_$
|
|
153
|
-
_$
|
|
154
|
-
_$
|
|
155
|
-
_$
|
|
156
|
-
_$
|
|
157
|
-
_$
|
|
158
|
-
_$
|
|
159
|
-
_$
|
|
160
|
-
_$
|
|
161
|
-
_$
|
|
162
|
-
_$
|
|
163
|
-
_$
|
|
164
|
-
_$
|
|
165
|
-
_v$6!==_p$.e&&(_p$.e=_$
|
|
166
|
-
_v$7!==_p$.t&&(_p$.t=_$
|
|
617
|
+
return(()=>{var _el$=_$createElement4("box"),_el$2=_$createElement4("text"),_el$3=_$createTextNode3(` `),_el$4=_$createElement4("text"),_el$5=_$createElement4("box"),_el$6=_$createElement4("text"),_el$7=_$createTextNode3(`Toggle: `),_el$8=_$createTextNode3(` \xB7 Focus: `),_el$9=_$createTextNode3(` \xB7 Icons: `),_el$1=_$createElement4("box")
|
|
618
|
+
_$insertNode3(_el$,_el$2)
|
|
619
|
+
_$insertNode3(_el$,_el$4)
|
|
620
|
+
_$insertNode3(_el$,_el$5)
|
|
621
|
+
_$insertNode3(_el$,_el$6)
|
|
622
|
+
_$insertNode3(_el$,_el$1)
|
|
623
|
+
_$setProp4(_el$,"gap",1)
|
|
624
|
+
_$insertNode3(_el$2,_el$3)
|
|
625
|
+
_$insert3(_el$2,()=>icons.icon(props.step.icon),_el$3)
|
|
626
|
+
_$insert3(_el$2,()=>props.step.title,null)
|
|
627
|
+
_$setProp4(_el$4,"wrapMode","word")
|
|
628
|
+
_$insert3(_el$4,()=>props.step.summary)
|
|
629
|
+
_$setProp4(_el$5,"border",["top","bottom"])
|
|
630
|
+
_$setProp4(_el$5,"paddingTop",1)
|
|
631
|
+
_$setProp4(_el$5,"paddingBottom",1)
|
|
632
|
+
_$setProp4(_el$5,"gap",1)
|
|
633
|
+
_$insert3(_el$5,_$createComponent4(For2,{get each(){return props.step.features
|
|
634
|
+
},children:(feature)=>(()=>{var _el$14=_$createElement4("box"),_el$15=_$createElement4("text"),_el$16=_$createElement4("text"),_el$17=_$createElement4("b"),_el$18=_$createTextNode3(` \xB7 `)
|
|
635
|
+
_$insertNode3(_el$14,_el$15)
|
|
636
|
+
_$insertNode3(_el$14,_el$16)
|
|
637
|
+
_$setProp4(_el$14,"flexDirection","row")
|
|
638
|
+
_$setProp4(_el$14,"gap",1)
|
|
639
|
+
_$setProp4(_el$15,"flexShrink",0)
|
|
640
|
+
_$insert3(_el$15,()=>icons.icon(feature.icon))
|
|
641
|
+
_$insertNode3(_el$16,_el$17)
|
|
642
|
+
_$insertNode3(_el$16,_el$18)
|
|
643
|
+
_$setProp4(_el$16,"flexGrow",1)
|
|
644
|
+
_$setProp4(_el$16,"minWidth",0)
|
|
645
|
+
_$setProp4(_el$16,"wrapMode","word")
|
|
646
|
+
_$insert3(_el$17,()=>feature.title)
|
|
647
|
+
_$insert3(_el$16,()=>feature.description,null)
|
|
648
|
+
_$effect4((_p$)=>{var _v$6=theme().accent,_v$7=theme().textMuted
|
|
649
|
+
_v$6!==_p$.e&&(_p$.e=_$setProp4(_el$15,"fg",_v$6,_p$.e))
|
|
650
|
+
_v$7!==_p$.t&&(_p$.t=_$setProp4(_el$16,"fg",_v$7,_p$.t))
|
|
167
651
|
return _p$
|
|
168
652
|
},{e:undefined,t:undefined
|
|
169
653
|
})
|
|
170
654
|
return _el$14
|
|
171
655
|
})()
|
|
172
656
|
}))
|
|
173
|
-
_$
|
|
174
|
-
_$
|
|
175
|
-
_$
|
|
176
|
-
_$
|
|
177
|
-
_$
|
|
178
|
-
_$
|
|
179
|
-
_$
|
|
180
|
-
_$
|
|
181
|
-
_$
|
|
182
|
-
_$
|
|
657
|
+
_$insertNode3(_el$6,_el$7)
|
|
658
|
+
_$insertNode3(_el$6,_el$8)
|
|
659
|
+
_$insertNode3(_el$6,_el$9)
|
|
660
|
+
_$setProp4(_el$6,"wrapMode","word")
|
|
661
|
+
_$insert3(_el$6,()=>props.preferences.toggleKey(),_el$8)
|
|
662
|
+
_$insert3(_el$6,()=>props.preferences.focusKey(),_el$9)
|
|
663
|
+
_$insert3(_el$6,()=>icons.style()==="text"?"Text fallback":"Nerd Font",null)
|
|
664
|
+
_$setProp4(_el$1,"flexDirection","row")
|
|
665
|
+
_$setProp4(_el$1,"justifyContent","space-between")
|
|
666
|
+
_$insert3(_el$1,_$createComponent4(SelectionBox,{paddingLeft:1,paddingRight:1,onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
183
667
|
props.onBack()
|
|
184
|
-
},get children(){var _el$10=_$
|
|
185
|
-
_$
|
|
186
|
-
_$
|
|
187
|
-
_$
|
|
668
|
+
},get children(){var _el$10=_$createElement4("text"),_el$11=_$createTextNode3(` Back`)
|
|
669
|
+
_$insertNode3(_el$10,_el$11)
|
|
670
|
+
_$insert3(_el$10,()=>icons.icon("left"),_el$11)
|
|
671
|
+
_$effect4((_$p)=>_$setProp4(_el$10,"fg",theme().textMuted,_$p))
|
|
188
672
|
return _el$10
|
|
189
673
|
}}),null)
|
|
190
|
-
_$
|
|
674
|
+
_$insert3(_el$1,_$createComponent4(SelectionBox,{paddingLeft:1,paddingRight:1,get backgroundColor(){return theme().primary
|
|
191
675
|
},onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
192
676
|
props.onAdvance()
|
|
193
|
-
},get children(){var _el$12=_$
|
|
194
|
-
_$
|
|
195
|
-
_$
|
|
196
|
-
_$
|
|
197
|
-
_$
|
|
677
|
+
},get children(){var _el$12=_$createElement4("text"),_el$13=_$createTextNode3(` `)
|
|
678
|
+
_$insertNode3(_el$12,_el$13)
|
|
679
|
+
_$insert3(_el$12,()=>props.final?"Configure sidebar":"Next",_el$13)
|
|
680
|
+
_$insert3(_el$12,()=>icons.icon("right"),null)
|
|
681
|
+
_$effect4((_$p)=>_$setProp4(_el$12,"fg",theme().selectedListItemText,_$p))
|
|
198
682
|
return _el$12
|
|
199
683
|
}}),null)
|
|
200
|
-
_$
|
|
201
|
-
_v$!==_p$.e&&(_p$.e=_$
|
|
202
|
-
_v$2!==_p$.t&&(_p$.t=_$
|
|
203
|
-
_v$3!==_p$.a&&(_p$.a=_$
|
|
204
|
-
_v$4!==_p$.o&&(_p$.o=_$
|
|
205
|
-
_v$5!==_p$.i&&(_p$.i=_$
|
|
684
|
+
_$effect4((_p$)=>{var _v$=theme().accent,_v$2=TextAttributes.BOLD,_v$3=theme().textMuted,_v$4=theme().borderSubtle,_v$5=theme().textMuted
|
|
685
|
+
_v$!==_p$.e&&(_p$.e=_$setProp4(_el$2,"fg",_v$,_p$.e))
|
|
686
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp4(_el$2,"attributes",_v$2,_p$.t))
|
|
687
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp4(_el$4,"fg",_v$3,_p$.a))
|
|
688
|
+
_v$4!==_p$.o&&(_p$.o=_$setProp4(_el$5,"borderColor",_v$4,_p$.o))
|
|
689
|
+
_v$5!==_p$.i&&(_p$.i=_$setProp4(_el$6,"fg",_v$5,_p$.i))
|
|
206
690
|
return _p$
|
|
207
691
|
},{e:undefined,t:undefined,a:undefined,o:undefined,i:undefined
|
|
208
692
|
})
|
|
@@ -210,70 +694,70 @@ return _el$
|
|
|
210
694
|
})()
|
|
211
695
|
}
|
|
212
696
|
import {memo as _$memo2} from "@opentui/solid"
|
|
213
|
-
import {effect as _$
|
|
214
|
-
import {createComponent as _$
|
|
215
|
-
import {createTextNode as _$
|
|
216
|
-
import {insertNode as _$
|
|
217
|
-
import {insert as _$
|
|
218
|
-
import {setProp as _$
|
|
219
|
-
import {createElement as _$
|
|
697
|
+
import {effect as _$effect5} from "@opentui/solid"
|
|
698
|
+
import {createComponent as _$createComponent5} from "@opentui/solid"
|
|
699
|
+
import {createTextNode as _$createTextNode4} from "@opentui/solid"
|
|
700
|
+
import {insertNode as _$insertNode4} from "@opentui/solid"
|
|
701
|
+
import {insert as _$insert4} from "@opentui/solid"
|
|
702
|
+
import {setProp as _$setProp5} from "@opentui/solid"
|
|
703
|
+
import {createElement as _$createElement5} from "@opentui/solid"
|
|
220
704
|
import {TextAttributes as TextAttributes2} from "@opentui/core"
|
|
221
|
-
import {For as
|
|
705
|
+
import {For as For3} from "solid-js"
|
|
222
706
|
import {supportsSidebarSection as supportsSidebarSection2} from "./tui.js"
|
|
223
707
|
import {SelectionBox as SelectionBox2,useIcons as useIcons2} from "./tui.js"
|
|
224
708
|
function SectionConfig(props){const icons=useIcons2()
|
|
225
709
|
const theme=()=>props.api.theme.current
|
|
226
710
|
const sections=SECTION_DEFINITIONS.filter((section)=>supportsSidebarSection2(props.api,section.name))
|
|
227
711
|
const finishIndex=sections.length
|
|
228
|
-
return(()=>{var _el$=_$
|
|
229
|
-
_$
|
|
230
|
-
_$
|
|
231
|
-
_$
|
|
232
|
-
_$
|
|
233
|
-
_$
|
|
234
|
-
_$
|
|
235
|
-
_$
|
|
236
|
-
_$
|
|
237
|
-
_$
|
|
712
|
+
return(()=>{var _el$=_$createElement5("box"),_el$2=_$createElement5("text"),_el$3=_$createTextNode4(` Choose your sidebar sections`),_el$4=_$createElement5("text"),_el$6=_$createElement5("box")
|
|
713
|
+
_$insertNode4(_el$,_el$2)
|
|
714
|
+
_$insertNode4(_el$,_el$4)
|
|
715
|
+
_$insertNode4(_el$,_el$6)
|
|
716
|
+
_$setProp5(_el$,"gap",1)
|
|
717
|
+
_$insertNode4(_el$2,_el$3)
|
|
718
|
+
_$insert4(_el$2,()=>icons.icon("sections"),_el$3)
|
|
719
|
+
_$insertNode4(_el$4,_$createTextNode4(`Select what appears now. You can change visibility, order, limits, scope, and presets later with the gear button.`))
|
|
720
|
+
_$setProp5(_el$4,"wrapMode","word")
|
|
721
|
+
_$insert4(_el$,_$createComponent5(For3,{each:sections,children:(section,index)=>_$createComponent5(SelectionBox2,{flexDirection:"row",gap:1,paddingLeft:1,paddingRight:1,get backgroundColor(){return _$memo2(()=>props.active===index())()?theme().backgroundElement:undefined
|
|
238
722
|
},onMouseOver:()=>props.onActive(index()),onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
239
723
|
props.preferences.toggleSection(section.name)
|
|
240
|
-
},get children(){return [(()=>{var _el$1=_$
|
|
241
|
-
_$
|
|
242
|
-
_$
|
|
243
|
-
_$
|
|
724
|
+
},get children(){return [(()=>{var _el$1=_$createElement5("text")
|
|
725
|
+
_$setProp5(_el$1,"flexShrink",0)
|
|
726
|
+
_$insert4(_el$1,()=>icons.icon(props.preferences.sections()[section.name]?"checked":"unchecked"))
|
|
727
|
+
_$effect5((_$p)=>_$setProp5(_el$1,"fg",props.preferences.sections()[section.name]?theme().accent:theme().textMuted,_$p))
|
|
244
728
|
return _el$1
|
|
245
|
-
})(),(()=>{var _el$10=_$
|
|
246
|
-
_$
|
|
247
|
-
_$
|
|
248
|
-
_$
|
|
249
|
-
_$
|
|
729
|
+
})(),(()=>{var _el$10=_$createElement5("text"),_el$11=_$createTextNode4(` `)
|
|
730
|
+
_$insertNode4(_el$10,_el$11)
|
|
731
|
+
_$insert4(_el$10,()=>icons.section(section.name),_el$11)
|
|
732
|
+
_$insert4(_el$10,()=>section.label,null)
|
|
733
|
+
_$effect5((_$p)=>_$setProp5(_el$10,"fg",props.active===index()?theme().text:theme().textMuted,_$p))
|
|
250
734
|
return _el$10
|
|
251
735
|
})()]
|
|
252
736
|
}})
|
|
253
737
|
}),_el$6)
|
|
254
|
-
_$
|
|
255
|
-
_$
|
|
256
|
-
_$
|
|
738
|
+
_$setProp5(_el$6,"flexDirection","row")
|
|
739
|
+
_$setProp5(_el$6,"justifyContent","space-between")
|
|
740
|
+
_$insert4(_el$6,_$createComponent5(SelectionBox2,{paddingLeft:1,paddingRight:1,onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
257
741
|
props.onBack()
|
|
258
|
-
},get children(){var _el$7=_$
|
|
259
|
-
_$
|
|
260
|
-
_$
|
|
261
|
-
_$
|
|
742
|
+
},get children(){var _el$7=_$createElement5("text"),_el$8=_$createTextNode4(` Back`)
|
|
743
|
+
_$insertNode4(_el$7,_el$8)
|
|
744
|
+
_$insert4(_el$7,()=>icons.icon("left"),_el$8)
|
|
745
|
+
_$effect5((_$p)=>_$setProp5(_el$7,"fg",theme().textMuted,_$p))
|
|
262
746
|
return _el$7
|
|
263
747
|
}}),null)
|
|
264
|
-
_$
|
|
748
|
+
_$insert4(_el$6,_$createComponent5(SelectionBox2,{paddingLeft:2,paddingRight:2,get backgroundColor(){return _$memo2(()=>props.active===finishIndex)()?theme().primary:undefined
|
|
265
749
|
},onMouseOver:()=>props.onActive(finishIndex),onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
266
750
|
props.onFinish()
|
|
267
|
-
},get children(){var _el$9=_$
|
|
268
|
-
_$
|
|
269
|
-
_$
|
|
270
|
-
_$
|
|
751
|
+
},get children(){var _el$9=_$createElement5("text"),_el$0=_$createTextNode4(` Finish`)
|
|
752
|
+
_$insertNode4(_el$9,_el$0)
|
|
753
|
+
_$insert4(_el$9,()=>icons.icon("done"),_el$0)
|
|
754
|
+
_$effect5((_$p)=>_$setProp5(_el$9,"fg",props.active===finishIndex?theme().selectedListItemText:theme().textMuted,_$p))
|
|
271
755
|
return _el$9
|
|
272
756
|
}}),null)
|
|
273
|
-
_$
|
|
274
|
-
_v$!==_p$.e&&(_p$.e=_$
|
|
275
|
-
_v$2!==_p$.t&&(_p$.t=_$
|
|
276
|
-
_v$3!==_p$.a&&(_p$.a=_$
|
|
757
|
+
_$effect5((_p$)=>{var _v$=theme().accent,_v$2=TextAttributes2.BOLD,_v$3=theme().textMuted
|
|
758
|
+
_v$!==_p$.e&&(_p$.e=_$setProp5(_el$2,"fg",_v$,_p$.e))
|
|
759
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp5(_el$2,"attributes",_v$2,_p$.t))
|
|
760
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp5(_el$4,"fg",_v$3,_p$.a))
|
|
277
761
|
return _p$
|
|
278
762
|
},{e:undefined,t:undefined,a:undefined
|
|
279
763
|
})
|
|
@@ -281,9 +765,9 @@ return _el$
|
|
|
281
765
|
})()
|
|
282
766
|
}
|
|
283
767
|
function FirstRunWizard(props){const icons=useIcons3()
|
|
284
|
-
const dialogs=
|
|
285
|
-
const [active,setActive]=
|
|
286
|
-
const [step,setStep]=
|
|
768
|
+
const dialogs=useDialogs2(props.api)
|
|
769
|
+
const [active,setActive]=createSignal3(0)
|
|
770
|
+
const [step,setStep]=createSignal3(0)
|
|
287
771
|
const theme=()=>props.api.theme.current
|
|
288
772
|
const sections=SECTION_DEFINITIONS.filter((section)=>supportsSidebarSection3(props.api,section.name))
|
|
289
773
|
const finishIndex=sections.length
|
|
@@ -324,41 +808,41 @@ const unregister=props.api.keymap.registerLayer({mode:"modal",priority:1000,comm
|
|
|
324
808
|
},{key:"return",cmd:`${PLUGIN_ID}.wizard.select`
|
|
325
809
|
}]
|
|
326
810
|
})
|
|
327
|
-
|
|
328
|
-
return _$
|
|
329
|
-
},get children(){return [(()=>{var _el$=_$
|
|
330
|
-
_$
|
|
331
|
-
_$
|
|
332
|
-
_$
|
|
333
|
-
_$
|
|
334
|
-
_$
|
|
335
|
-
_$
|
|
336
|
-
_$
|
|
337
|
-
_$
|
|
338
|
-
_$
|
|
339
|
-
_$
|
|
340
|
-
_$
|
|
811
|
+
onCleanup4(unregister)
|
|
812
|
+
return _$createComponent6(DialogSurface3,{get api(){return props.api
|
|
813
|
+
},get children(){return [(()=>{var _el$=_$createElement6("box"),_el$2=_$createElement6("text"),_el$3=_$createTextNode5(` Navigator setup`),_el$4=_$createElement6("text"),_el$5=_$createTextNode5(`Step `),_el$6=_$createTextNode5(`/`),_el$7=_$createTextNode5(` \xB7 `)
|
|
814
|
+
_$insertNode5(_el$,_el$2)
|
|
815
|
+
_$insertNode5(_el$,_el$4)
|
|
816
|
+
_$setProp6(_el$,"flexDirection","row")
|
|
817
|
+
_$setProp6(_el$,"justifyContent","space-between")
|
|
818
|
+
_$insertNode5(_el$2,_el$3)
|
|
819
|
+
_$insert5(_el$2,()=>icons.icon("help"),_el$3)
|
|
820
|
+
_$insertNode5(_el$4,_el$5)
|
|
821
|
+
_$insertNode5(_el$4,_el$6)
|
|
822
|
+
_$insertNode5(_el$4,_el$7)
|
|
823
|
+
_$setProp6(_el$4,"onMouseDown",(event)=>event.stopPropagation())
|
|
824
|
+
_$setProp6(_el$4,"onMouseUp",(event)=>{event.stopPropagation()
|
|
341
825
|
finish()
|
|
342
826
|
})
|
|
343
|
-
_$
|
|
344
|
-
_$
|
|
345
|
-
_$
|
|
346
|
-
_$
|
|
347
|
-
_v$!==_p$.e&&(_p$.e=_$
|
|
348
|
-
_v$2!==_p$.t&&(_p$.t=_$
|
|
349
|
-
_v$3!==_p$.a&&(_p$.a=_$
|
|
827
|
+
_$insert5(_el$4,()=>step() + 1,_el$6)
|
|
828
|
+
_$insert5(_el$4,stepCount,_el$7)
|
|
829
|
+
_$insert5(_el$4,()=>icons.key("esc"),null)
|
|
830
|
+
_$effect6((_p$)=>{var _v$=TextAttributes3.BOLD,_v$2=theme().text,_v$3=theme().textMuted
|
|
831
|
+
_v$!==_p$.e&&(_p$.e=_$setProp6(_el$2,"attributes",_v$,_p$.e))
|
|
832
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp6(_el$2,"fg",_v$2,_p$.t))
|
|
833
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp6(_el$4,"fg",_v$3,_p$.a))
|
|
350
834
|
return _p$
|
|
351
835
|
},{e:undefined,t:undefined,a:undefined
|
|
352
836
|
})
|
|
353
837
|
return _el$
|
|
354
|
-
})(),_$
|
|
355
|
-
},get fallback(){return _$
|
|
838
|
+
})(),_$createComponent6(Show,{get when(){return configuring()
|
|
839
|
+
},get fallback(){return _$createComponent6(OnboardingStep,{get api(){return props.api
|
|
356
840
|
},get preferences(){return props.preferences
|
|
357
841
|
},get step(){return ONBOARDING_STEPS[step()]
|
|
358
842
|
},get final(){return step()===ONBOARDING_STEPS.length-1
|
|
359
843
|
},onBack:back,onAdvance:advance
|
|
360
844
|
})
|
|
361
|
-
},get children(){return _$
|
|
845
|
+
},get children(){return _$createComponent6(SectionConfig,{get api(){return props.api
|
|
362
846
|
},get preferences(){return props.preferences
|
|
363
847
|
},get active(){return active()
|
|
364
848
|
},onActive:setActive,onBack:back,onFinish:finish
|
|
@@ -366,15 +850,171 @@ return _el$
|
|
|
366
850
|
}})]
|
|
367
851
|
}})
|
|
368
852
|
}
|
|
369
|
-
import {
|
|
370
|
-
import {
|
|
371
|
-
import {
|
|
372
|
-
import {
|
|
373
|
-
import {
|
|
853
|
+
import {createComponent as _$createComponent9} from "@opentui/solid"
|
|
854
|
+
import {createTextNode as _$createTextNode7} from "@opentui/solid"
|
|
855
|
+
import {insertNode as _$insertNode7} from "@opentui/solid"
|
|
856
|
+
import {effect as _$effect8} from "@opentui/solid"
|
|
857
|
+
import {insert as _$insert7} from "@opentui/solid"
|
|
858
|
+
import {memo as _$memo3} from "@opentui/solid"
|
|
859
|
+
import {setProp as _$setProp8} from "@opentui/solid"
|
|
860
|
+
import {createElement as _$createElement8} from "@opentui/solid"
|
|
861
|
+
import {createComponent as _$createComponent8} from "@opentui/solid"
|
|
862
|
+
import {Show as Show3,onCleanup as onCleanup6,onMount as onMount2} from "solid-js"
|
|
863
|
+
import {DialogAction as DialogAction3,DialogHeader as DialogHeader4,DialogSurface as DialogSurface5,SelectionMenu,useDialogState as useDialogState3,useDialogs as useDialogs4} from "./tui.js"
|
|
864
|
+
import {insert as _$insert6} from "@opentui/solid"
|
|
865
|
+
import {use as _$use4} from "@opentui/solid"
|
|
866
|
+
import {setProp as _$setProp7} from "@opentui/solid"
|
|
867
|
+
import {effect as _$effect7} from "@opentui/solid"
|
|
868
|
+
import {createTextNode as _$createTextNode6} from "@opentui/solid"
|
|
869
|
+
import {insertNode as _$insertNode6} from "@opentui/solid"
|
|
870
|
+
import {createElement as _$createElement7} from "@opentui/solid"
|
|
871
|
+
import {createComponent as _$createComponent7} from "@opentui/solid"
|
|
872
|
+
import {useTerminalDimensions as useTerminalDimensions3} from "@opentui/solid"
|
|
873
|
+
import {For as For4,Show as Show2,onCleanup as onCleanup5} from "solid-js"
|
|
874
|
+
import {DialogHeader as DialogHeader3,DialogSurface as DialogSurface4,useDialogScroll,useDialogs as useDialogs3,useIcons as useIcons4} from "./tui.js"
|
|
875
|
+
function ChangelogVersionDialog(props){const dialogs=useDialogs3(props.api)
|
|
876
|
+
const icons=useIcons4()
|
|
877
|
+
const dimensions=useTerminalDimensions3()
|
|
878
|
+
const scroll=useDialogScroll()
|
|
879
|
+
let body
|
|
880
|
+
const keys=["up","down","pageup","pagedown"]
|
|
881
|
+
const unregister=props.api.keymap.registerLayer({mode:"modal",commands:keys.map((_key,index)=>({name:`opencode-navigator.changelog.scroll.${index}`,run:()=>body?.scrollBy([-1,1,-8,8][index])
|
|
882
|
+
})),bindings:keys.map((key,index)=>({key,cmd:`opencode-navigator.changelog.scroll.${index}`
|
|
883
|
+
}))
|
|
884
|
+
})
|
|
885
|
+
onCleanup5(unregister)
|
|
886
|
+
return _$createComponent7(DialogSurface4,{get api(){return props.api
|
|
887
|
+
},lift:true,get children(){return [_$createComponent7(DialogHeader3,{get api(){return props.api
|
|
888
|
+
},get title(){return `Navigator ${props.entry.version}`
|
|
889
|
+
},get onBack(){return dialogs.back
|
|
890
|
+
}}),(()=>{var _el$=_$createElement7("text")
|
|
891
|
+
_$insertNode6(_el$,_$createTextNode6(`Release notes`))
|
|
892
|
+
_$effect7((_$p)=>_$setProp7(_el$,"fg",props.api.theme.current.textMuted,_$p))
|
|
893
|
+
return _el$
|
|
894
|
+
})(),(()=>{var _el$3=_$createElement7("scrollbox"),_el$4=_$createElement7("box")
|
|
895
|
+
_$insertNode6(_el$3,_el$4)
|
|
896
|
+
_$use4((node)=>{body=node
|
|
897
|
+
scroll.ref(node)
|
|
898
|
+
},_el$3)
|
|
899
|
+
_$setProp7(_el$3,"id","opencode-navigator.changelog.body")
|
|
900
|
+
_$setProp7(_el$3,"scrollX",false)
|
|
901
|
+
_$setProp7(_el$4,"gap",1)
|
|
902
|
+
_$setProp7(_el$4,"paddingRight",1)
|
|
903
|
+
_$insert6(_el$4,_$createComponent7(Show2,{get when(){return props.entry.changes.length>0
|
|
904
|
+
},get fallback(){return(()=>{var _el$8=_$createElement7("text")
|
|
905
|
+
_$insertNode6(_el$8,_$createTextNode6(`No user-facing changes in this version.`))
|
|
906
|
+
_$effect7((_$p)=>_$setProp7(_el$8,"fg",props.api.theme.current.textMuted,_$p))
|
|
907
|
+
return _el$8
|
|
908
|
+
})()
|
|
909
|
+
},get children(){return _$createComponent7(For4,{get each(){return props.entry.changes
|
|
910
|
+
},children:(change)=>(()=>{var _el$0=_$createElement7("text"),_el$1=_$createTextNode6(` `)
|
|
911
|
+
_$insertNode6(_el$0,_el$1)
|
|
912
|
+
_$setProp7(_el$0,"wrapMode","word")
|
|
913
|
+
_$insert6(_el$0,()=>icons.icon("selected"),_el$1)
|
|
914
|
+
_$insert6(_el$0,change,null)
|
|
915
|
+
_$effect7((_$p)=>_$setProp7(_el$0,"fg",props.api.theme.current.text,_$p))
|
|
916
|
+
return _el$0
|
|
917
|
+
})()
|
|
918
|
+
})
|
|
919
|
+
}}))
|
|
920
|
+
_$effect7((_$p)=>_$setProp7(_el$3,"height",Math.max(3,Math.min(16,dimensions().height-13)),_$p))
|
|
921
|
+
return _el$3
|
|
922
|
+
})(),(()=>{var _el$5=_$createElement7("text"),_el$6=_$createTextNode6(` scroll \xB7 `),_el$7=_$createTextNode6(` back`)
|
|
923
|
+
_$insertNode6(_el$5,_el$6)
|
|
924
|
+
_$insertNode6(_el$5,_el$7)
|
|
925
|
+
_$insert6(_el$5,()=>icons.key("up/down"),_el$6)
|
|
926
|
+
_$insert6(_el$5,()=>icons.key("esc"),_el$7)
|
|
927
|
+
_$effect7((_$p)=>_$setProp7(_el$5,"fg",props.api.theme.current.textMuted,_$p))
|
|
928
|
+
return _el$5
|
|
929
|
+
})()]
|
|
930
|
+
}})
|
|
931
|
+
}
|
|
932
|
+
function ChangelogVersionsDialog(props){const dialogs=useDialogs4(props.api)
|
|
933
|
+
const [entries,setEntries]=useDialogState3("releases",undefined)
|
|
934
|
+
const [error,setError]=useDialogState3("read-error","")
|
|
935
|
+
let disposed=false
|
|
936
|
+
const load=async ()=>{setError("")
|
|
937
|
+
try{const result=await props.service.changelog()
|
|
938
|
+
if(!disposed)
|
|
939
|
+
setEntries(result.filter((entry)=>!isNewerVersion(entry.version,props.service.navigatorVersion)))
|
|
940
|
+
} catch{if(!disposed)
|
|
941
|
+
setError("Could not read the bundled changelog. Retry to read it again.")
|
|
942
|
+
}}
|
|
943
|
+
onMount2(()=>{if(!entries())
|
|
944
|
+
load()
|
|
945
|
+
})
|
|
946
|
+
onCleanup6(()=>{disposed=true
|
|
947
|
+
})
|
|
948
|
+
const unregister=props.api.keymap.registerLayer({mode:"modal",commands:[{name:"opencode-navigator.changelog.retry",enabled:()=>Boolean(error())&&!entries(),run:()=>void load()
|
|
949
|
+
}],bindings:[{key:"return",cmd:"opencode-navigator.changelog.retry"
|
|
950
|
+
}]
|
|
951
|
+
})
|
|
952
|
+
onCleanup6(unregister)
|
|
953
|
+
return _$createComponent8(Show3,{get when(){return entries()
|
|
954
|
+
},get fallback(){return _$createComponent8(DialogSurface5,{get api(){return props.api
|
|
955
|
+
},lift:true,get children(){return [_$createComponent8(DialogHeader4,{get api(){return props.api
|
|
956
|
+
},title:"Navigator changelog",get onBack(){return dialogs.back
|
|
957
|
+
}}),(()=>{var _el$=_$createElement8("text")
|
|
958
|
+
_$setProp8(_el$,"wrapMode","word")
|
|
959
|
+
_$insert7(_el$,()=>error()||"Loading bundled release notes\u2026")
|
|
960
|
+
_$effect8((_$p)=>_$setProp8(_el$,"fg",props.api.theme.current.textMuted,_$p))
|
|
961
|
+
return _el$
|
|
962
|
+
})(),_$createComponent8(Show3,{get when(){return error()
|
|
963
|
+
},get children(){return _$createComponent8(DialogAction3,{get api(){return props.api
|
|
964
|
+
},id:"opencode-navigator.changelog.retry",label:"Retry",icon:"retry",selected:true,onSelect:()=>{},onActivate:()=>void load()
|
|
965
|
+
})
|
|
966
|
+
}})]
|
|
967
|
+
}})
|
|
968
|
+
},children:(versions)=>_$createComponent8(Show3,{get when(){return versions().length>0
|
|
969
|
+
},get fallback(){return _$createComponent8(DialogSurface5,{get api(){return props.api
|
|
970
|
+
},lift:true,get children(){return [_$createComponent8(DialogHeader4,{get api(){return props.api
|
|
971
|
+
},title:"Navigator changelog",get onBack(){return dialogs.back
|
|
972
|
+
}}),(()=>{var _el$2=_$createElement8("text")
|
|
973
|
+
_$insertNode7(_el$2,_$createTextNode7(`No release notes are bundled with this installation.`))
|
|
974
|
+
_$effect8((_$p)=>_$setProp8(_el$2,"fg",props.api.theme.current.textMuted,_$p))
|
|
975
|
+
return _el$2
|
|
976
|
+
})()]
|
|
977
|
+
}})
|
|
978
|
+
},get children(){return _$createComponent8(SelectionMenu,{get api(){return props.api
|
|
979
|
+
},title:"Navigator changelog",get options(){return versions().map((entry)=>({title:`Navigator ${entry.version}`,value:entry.version,description:entry.changes.length>0?`${entry.changes.length} changes`:"No user-facing changes"
|
|
980
|
+
}))
|
|
981
|
+
},onSelect:(option)=>{const entry=versions().find((item)=>item.version===option.value)
|
|
982
|
+
if(entry)
|
|
983
|
+
dialogs.open(()=>_$createComponent8(ChangelogVersionDialog,{get api(){return props.api
|
|
984
|
+
},entry
|
|
985
|
+
}))
|
|
986
|
+
}})
|
|
987
|
+
}})
|
|
988
|
+
})
|
|
989
|
+
}
|
|
990
|
+
import {getNavigatorAboutServices as getNavigatorAboutServices2} from "./tui.js"
|
|
991
|
+
function selectAboutAction(api,dialogs,value,openBugReport){const service=getNavigatorAboutServices2(api)
|
|
992
|
+
if(!service)
|
|
993
|
+
return
|
|
994
|
+
switch(value){case "about:check":{if(!service.checking()&&!service.updating())
|
|
995
|
+
service.check()
|
|
996
|
+
break
|
|
997
|
+
}
|
|
998
|
+
case "about:update":{if(service.checkState().status==="available"&&!service.updating())
|
|
999
|
+
service.update(dialogs)
|
|
1000
|
+
break
|
|
1001
|
+
}
|
|
1002
|
+
case "about:changelog":{dialogs.open(()=>_$createComponent9(ChangelogVersionsDialog,{api,service
|
|
1003
|
+
}))
|
|
1004
|
+
break
|
|
1005
|
+
}
|
|
1006
|
+
case "about:bug-report":{openBugReport()
|
|
1007
|
+
break
|
|
1008
|
+
}}}
|
|
1009
|
+
import {setProp as _$setProp9} from "@opentui/solid"
|
|
1010
|
+
import {effect as _$effect9} from "@opentui/solid"
|
|
1011
|
+
import {createTextNode as _$createTextNode8} from "@opentui/solid"
|
|
1012
|
+
import {insertNode as _$insertNode8} from "@opentui/solid"
|
|
1013
|
+
import {createElement as _$createElement9} from "@opentui/solid"
|
|
374
1014
|
function openLimitsRefreshPrompt(api,preferences,dialogs){const scope=preferences.preferenceScopeLabel()
|
|
375
|
-
dialogs.prompt({title:"Limits refresh interval",description:()=>(()=>{var _el$=_$
|
|
376
|
-
_$
|
|
377
|
-
_$
|
|
1015
|
+
dialogs.prompt({title:"Limits refresh interval",description:()=>(()=>{var _el$=_$createElement9("text")
|
|
1016
|
+
_$insertNode8(_el$,_$createTextNode8(`Automatic refresh in minutes (minimum 1; default 5). Manual Refresh stays immediate.`))
|
|
1017
|
+
_$effect9((_$p)=>_$setProp9(_el$,"fg",api.theme.current.textMuted,_$p))
|
|
378
1018
|
return _el$
|
|
379
1019
|
})(),value:String(preferences.selectedLimitsRefreshMinutes()),onConfirm(value){if(preferences.preferenceScopeLabel()!==scope)
|
|
380
1020
|
throw new Error("Preference scope changed; reopen this setting")
|
|
@@ -400,9 +1040,9 @@ function createSettingsSelection(input){const dialogClosed=()=>("open" in input.
|
|
|
400
1040
|
function openLimitPrompt(section){const index=input.options().findIndex((option)=>option.value===section)
|
|
401
1041
|
if(index!==-1)
|
|
402
1042
|
input.setActive(index)
|
|
403
|
-
input.dialogs.prompt({title:`${SECTION_DEFINITIONS.find((item) => item.name === section).label} item limit`,description:()=>(()=>{var _el$=_$
|
|
404
|
-
_$
|
|
405
|
-
_$
|
|
1043
|
+
input.dialogs.prompt({title:`${SECTION_DEFINITIONS.find((item) => item.name === section).label} item limit`,description:()=>(()=>{var _el$=_$createElement10("text")
|
|
1044
|
+
_$insertNode9(_el$,_$createTextNode9(`Visible items before Show all. Enter 0 for All.`))
|
|
1045
|
+
_$effect10((_$p)=>_$setProp10(_el$,"fg",input.api.theme.current.textMuted,_$p))
|
|
406
1046
|
return _el$
|
|
407
1047
|
})(),value:String(input.preferences.selectedSectionItemLimit(section)),onConfirm(value){if(!/^\d+$/.test(value.trim()))
|
|
408
1048
|
throw new Error("Enter a non-negative whole number (0 for All)")
|
|
@@ -415,9 +1055,9 @@ function openShortcut(value){const bindings={toggle_key:{title:"Sidebar shortcut
|
|
|
415
1055
|
},search_key:{title:"Search Everything shortcut",get:input.preferences.selectedSearchKey,set:input.preferences.setSearchKey
|
|
416
1056
|
}}
|
|
417
1057
|
const binding=bindings[value]
|
|
418
|
-
input.dialogs.prompt({title:binding.title,description:()=>(()=>{var _el$3=_$
|
|
419
|
-
_$
|
|
420
|
-
_$
|
|
1058
|
+
input.dialogs.prompt({title:binding.title,description:()=>(()=>{var _el$3=_$createElement10("text")
|
|
1059
|
+
_$insertNode9(_el$3,_$createTextNode9(`Use OpenCode key syntax, for example alt+s.`))
|
|
1060
|
+
_$effect10((_$p)=>_$setProp10(_el$3,"fg",input.api.theme.current.textMuted,_$p))
|
|
421
1061
|
return _el$3
|
|
422
1062
|
})(),value:binding.get(),onConfirm(key){binding.set(key)
|
|
423
1063
|
input.dialogs.back()
|
|
@@ -439,6 +1079,11 @@ module.openSettingsImport(input)
|
|
|
439
1079
|
}
|
|
440
1080
|
function select(value=input.options()[input.active()]?.value){if(!value)
|
|
441
1081
|
return
|
|
1082
|
+
if(input.options().find((option)=>option.value===value)?.disabled)
|
|
1083
|
+
return
|
|
1084
|
+
if(value.startsWith("about:")){selectAboutAction(input.api,input.dialogs,value,input.openBugReport)
|
|
1085
|
+
return
|
|
1086
|
+
}
|
|
442
1087
|
const index=input.options().findIndex((option)=>option.value===value)
|
|
443
1088
|
if(index!==-1)
|
|
444
1089
|
input.setActive(index)
|
|
@@ -520,14 +1165,14 @@ import(path).then((module)=>{if(dialogClosed())
|
|
|
520
1165
|
return
|
|
521
1166
|
const{TrustedSkillsDialog
|
|
522
1167
|
}=module
|
|
523
|
-
input.dialogs.open(()=>_$
|
|
1168
|
+
input.dialogs.open(()=>_$createComponent10(TrustedSkillsDialog,{get api(){return input.api
|
|
524
1169
|
},get preferences(){return input.preferences
|
|
525
1170
|
}}))
|
|
526
1171
|
}).catch((error)=>input.api.ui.toast({variant:"error",title:"Trusted skills",message:String(error)
|
|
527
1172
|
}))
|
|
528
1173
|
break
|
|
529
1174
|
}
|
|
530
|
-
case "wizard":{input.dialogs.open(()=>_$
|
|
1175
|
+
case "wizard":{input.dialogs.open(()=>_$createComponent10(FirstRunWizard,{get api(){return input.api
|
|
531
1176
|
},get preferences(){return input.preferences
|
|
532
1177
|
}}))
|
|
533
1178
|
break
|
|
@@ -540,7 +1185,7 @@ import(path).then((module)=>{if(dialogClosed())
|
|
|
540
1185
|
return
|
|
541
1186
|
const{QuickActionsDialog
|
|
542
1187
|
}=module
|
|
543
|
-
input.dialogs.open(()=>_$
|
|
1188
|
+
input.dialogs.open(()=>_$createComponent10(QuickActionsDialog,{get api(){return input.api
|
|
544
1189
|
},get preferences(){return input.preferences
|
|
545
1190
|
}}))
|
|
546
1191
|
}).catch((error)=>{input.api.ui.toast({variant:"error",title:"Quick actions",message:String(error),duration:4000
|
|
@@ -555,7 +1200,7 @@ import(path).then((module)=>{if(dialogClosed())
|
|
|
555
1200
|
return
|
|
556
1201
|
const{McpGroupsDialog
|
|
557
1202
|
}=module
|
|
558
|
-
input.dialogs.open(()=>_$
|
|
1203
|
+
input.dialogs.open(()=>_$createComponent10(McpGroupsDialog,{get api(){return input.api
|
|
559
1204
|
},get preferences(){return input.preferences
|
|
560
1205
|
},get mcp(){return input.mcp
|
|
561
1206
|
}}))
|
|
@@ -571,7 +1216,7 @@ import(path).then((module)=>{if(dialogClosed())
|
|
|
571
1216
|
return
|
|
572
1217
|
const{SkillGroupsDialog
|
|
573
1218
|
}=module
|
|
574
|
-
input.dialogs.open(()=>_$
|
|
1219
|
+
input.dialogs.open(()=>_$createComponent10(SkillGroupsDialog,{get api(){return input.api
|
|
575
1220
|
},get preferences(){return input.preferences
|
|
576
1221
|
},get skills(){return input.skills
|
|
577
1222
|
}}))
|
|
@@ -583,23 +1228,26 @@ return{openLimitPrompt,openMcpGroups,openSkillGroups,openQuickActions,select
|
|
|
583
1228
|
}}
|
|
584
1229
|
function createSettingsDialogController(props){let body
|
|
585
1230
|
const theme=()=>props.api.theme.current
|
|
586
|
-
const icons=
|
|
587
|
-
const dialogs=
|
|
588
|
-
const
|
|
589
|
-
const
|
|
590
|
-
const
|
|
1231
|
+
const icons=useIcons5()
|
|
1232
|
+
const dialogs=useDialogs5(props.api)
|
|
1233
|
+
const [report,setReport]=useDialogState4("bug-report",undefined)
|
|
1234
|
+
const scroll=useDialogScroll2()
|
|
1235
|
+
const dimensions=useTerminalDimensions4()
|
|
1236
|
+
const bodyHeight=createMemo3(()=>Math.max(4,Math.floor(dimensions().height*0.75)-10))
|
|
591
1237
|
const orderedGroups=createSettingsGroups(props.api,props.preferences,icons)
|
|
592
1238
|
const initialGroup=orderedGroups().find((group)=>group.options.some((option)=>option.value===props.activeValue))
|
|
593
|
-
const [activeGroup,setActiveGroup]=
|
|
594
|
-
const options=
|
|
1239
|
+
const [activeGroup,setActiveGroup]=useDialogState4("tab",initialGroup?.id??orderedGroups()[0].id)
|
|
1240
|
+
const options=createMemo3(()=>orderedGroups().find((group)=>group.id===activeGroup())?.options??[])
|
|
595
1241
|
const optionId=(value)=>`${PLUGIN_ID}.settings.${value}`
|
|
596
1242
|
const initialActive=options().findIndex((option)=>option.value===props.activeValue)
|
|
597
|
-
const [active,setActive]=
|
|
598
|
-
|
|
1243
|
+
const [active,setActive]=useDialogState4("selection",Math.max(0,initialActive))
|
|
1244
|
+
useSettingsReveal({body:()=>body,options,active,group:activeGroup,optionId
|
|
1245
|
+
})
|
|
1246
|
+
createEffect3(()=>{if(active()>=options().length)
|
|
599
1247
|
setActive(Math.max(0,options().length-1))
|
|
600
1248
|
})
|
|
601
|
-
const contentHeight=
|
|
602
|
-
const footerHint=
|
|
1249
|
+
const contentHeight=createMemo3(()=>Math.min(bodyHeight(),Math.max(1,options().length*2-1 + (activeGroup()==="about"?5:0))))
|
|
1250
|
+
const footerHint=createMemo3(()=>{const common=`${icons.key("tab")} switch \xB7 ${icons.key("up/down")} navigate`
|
|
603
1251
|
if(activeGroup()==="sections")
|
|
604
1252
|
return `${common} \xB7 ${icons.key("enter")} toggle \xB7 l item limit${options()[active()]?.value === "quick_actions" ? " \xB7 a actions" : ""}${["mcp", "skills"].includes(options()[active()]?.value ?? "") ? " \xB7 g groups" : ""} \xB7 ${icons.key("left/right")} or ${icons.key("shift+up/down")} reorder`
|
|
605
1253
|
if(activeGroup()==="presets")
|
|
@@ -610,11 +1258,6 @@ if(activeGroup()==="defaults")
|
|
|
610
1258
|
return `${common} \xB7 ${icons.key("enter")} run`
|
|
611
1259
|
return `${common} \xB7 ${icons.key("enter")} select`
|
|
612
1260
|
})
|
|
613
|
-
onMount(()=>{queueMicrotask(()=>{const option=options()[active()]
|
|
614
|
-
if(option)
|
|
615
|
-
body?.scrollChildIntoView(optionId(option.value))
|
|
616
|
-
})
|
|
617
|
-
})
|
|
618
1261
|
function move(offset){const next=(active() + offset + options().length)%options().length
|
|
619
1262
|
setActive(next)
|
|
620
1263
|
const option=options()[next]
|
|
@@ -653,101 +1296,195 @@ actions.prompt()
|
|
|
653
1296
|
}).catch((error)=>props.api.ui.toast({variant:"error",title:"Layout presets",message:String(error)
|
|
654
1297
|
}))
|
|
655
1298
|
}
|
|
656
|
-
const selection=createSettingsSelection({api:props.api,preferences:props.preferences,mcp:props.mcp,skills:props.skills,dialogs,options,active,setActive,openPreset:(name)=>runPresetAction("open",name),promptPreset:()=>runPresetAction("prompt")
|
|
657
|
-
|
|
1299
|
+
const selection=createSettingsSelection({api:props.api,preferences:props.preferences,mcp:props.mcp,skills:props.skills,dialogs,options,active,setActive,openPreset:(name)=>runPresetAction("open",name),promptPreset:()=>runPresetAction("prompt"),openBugReport(){let controller=report()
|
|
1300
|
+
if(!controller){const service=getNavigatorAboutServices3(props.api)
|
|
1301
|
+
if(!service)
|
|
1302
|
+
return
|
|
1303
|
+
controller=createBugReportController({navigatorVersion:service.navigatorVersion,openCodeVersion:service.openCodeVersion,platform:process.platform,runtime:`Bun ${Bun.version}`
|
|
1304
|
+
},service.bugReportTransport,props.api.lifecycle.signal)
|
|
1305
|
+
setReport(controller)
|
|
1306
|
+
}
|
|
1307
|
+
const selected=controller
|
|
1308
|
+
dialogs.open(()=>_$createComponent11(BugReportDialog,{get api(){return props.api
|
|
1309
|
+
},controller:selected
|
|
1310
|
+
}))
|
|
1311
|
+
}})
|
|
658
1312
|
const unregister=registerSettingsKeymap({api:props.api,active,activeGroup,options,move,switchGroup,reorder,select:selection.select,openQuickActions:selection.openQuickActions,openMcpGroups:selection.openMcpGroups,openSkillGroups:selection.openSkillGroups,openLimitPrompt:selection.openLimitPrompt
|
|
659
1313
|
})
|
|
660
|
-
|
|
1314
|
+
onCleanup7(unregister)
|
|
661
1315
|
return{active,activeGroup,contentHeight,dialogs,footerHint,icons,openLimitPrompt:selection.openLimitPrompt,openQuickActions:selection.openQuickActions,openMcpGroups:selection.openMcpGroups,openSkillGroups:selection.openSkillGroups,options,optionId,orderedGroups,reorder,select:selection.select,setActive,setActiveGroup,setBody(node){body=node
|
|
662
1316
|
scroll.ref(node)
|
|
663
1317
|
},restoreScroll:scroll.restore,saveScroll:scroll.save,theme
|
|
664
1318
|
}}
|
|
665
|
-
import {
|
|
666
|
-
import {
|
|
667
|
-
import {
|
|
668
|
-
import {
|
|
669
|
-
import {
|
|
670
|
-
import {
|
|
671
|
-
import {
|
|
672
|
-
import {
|
|
1319
|
+
import {effect as _$effect11} from "@opentui/solid"
|
|
1320
|
+
import {createComponent as _$createComponent12} from "@opentui/solid"
|
|
1321
|
+
import {insert as _$insert8} from "@opentui/solid"
|
|
1322
|
+
import {createTextNode as _$createTextNode10} from "@opentui/solid"
|
|
1323
|
+
import {insertNode as _$insertNode10} from "@opentui/solid"
|
|
1324
|
+
import {memo as _$memo4} from "@opentui/solid"
|
|
1325
|
+
import {setProp as _$setProp11} from "@opentui/solid"
|
|
1326
|
+
import {createElement as _$createElement11} from "@opentui/solid"
|
|
673
1327
|
import {TextAttributes as TextAttributes4} from "@opentui/core"
|
|
674
|
-
import {Show as
|
|
1328
|
+
import {Show as Show4} from "solid-js"
|
|
1329
|
+
import {getNavigatorAboutServices as getNavigatorAboutServices4} from "./tui.js"
|
|
1330
|
+
function AboutVersionStatus(props){const service=()=>getNavigatorAboutServices4(props.api)
|
|
1331
|
+
const status=()=>{const state=service()?.checkState()
|
|
1332
|
+
if(!state)
|
|
1333
|
+
return "Version information is loading\u2026"
|
|
1334
|
+
switch(state.status){case "checking":{return "Checking for Navigator updates\u2026"
|
|
1335
|
+
}
|
|
1336
|
+
case "current":{return "Navigator is up to date."
|
|
1337
|
+
}
|
|
1338
|
+
case "available":{return `Navigator ${state.latest} is available.`
|
|
1339
|
+
}
|
|
1340
|
+
case "error":{return "Could not check updates. Check again to retry."
|
|
1341
|
+
}
|
|
1342
|
+
case "idle":{return "Updates have not been checked yet."
|
|
1343
|
+
}}}
|
|
1344
|
+
return(()=>{var _el$=_$createElement11("box"),_el$2=_$createElement11("text"),_el$3=_$createTextNode10(`Navigator `),_el$4=_$createElement11("text"),_el$5=_$createTextNode10(`OpenCode `),_el$6=_$createElement11("text"),_el$7=_$createElement11("text")
|
|
1345
|
+
_$insertNode10(_el$,_el$2)
|
|
1346
|
+
_$insertNode10(_el$,_el$4)
|
|
1347
|
+
_$insertNode10(_el$,_el$6)
|
|
1348
|
+
_$insertNode10(_el$,_el$7)
|
|
1349
|
+
_$setProp11(_el$,"width","100%")
|
|
1350
|
+
_$setProp11(_el$,"minWidth",0)
|
|
1351
|
+
_$setProp11(_el$,"gap",0)
|
|
1352
|
+
_$insertNode10(_el$2,_el$3)
|
|
1353
|
+
_$setProp11(_el$2,"height",1)
|
|
1354
|
+
_$setProp11(_el$2,"truncate",true)
|
|
1355
|
+
_$setProp11(_el$2,"wrapMode","none")
|
|
1356
|
+
_$insert8(_el$2,()=>service()?.navigatorVersion??"version unavailable",null)
|
|
1357
|
+
_$insertNode10(_el$4,_el$5)
|
|
1358
|
+
_$setProp11(_el$4,"height",1)
|
|
1359
|
+
_$setProp11(_el$4,"truncate",true)
|
|
1360
|
+
_$setProp11(_el$4,"wrapMode","none")
|
|
1361
|
+
_$insert8(_el$4,()=>service()?.openCodeVersion??props.api.app?.version??"version unavailable",null)
|
|
1362
|
+
_$setProp11(_el$6,"height",1)
|
|
1363
|
+
_$setProp11(_el$6,"truncate",true)
|
|
1364
|
+
_$setProp11(_el$6,"wrapMode","none")
|
|
1365
|
+
_$insert8(_el$6,(()=>{var _c$=_$memo4(()=>!!service()?.updating())
|
|
1366
|
+
return()=>_c$()?"Installing Navigator. Restart OpenCode after completion.":status()
|
|
1367
|
+
})())
|
|
1368
|
+
_$setProp11(_el$7,"height",1)
|
|
1369
|
+
_$setProp11(_el$7,"truncate",true)
|
|
1370
|
+
_$setProp11(_el$7,"wrapMode","none")
|
|
1371
|
+
_$insert8(_el$7,(()=>{var _c$2=_$memo4(()=>!!service()?.checkState().checkedAt)
|
|
1372
|
+
return()=>_c$2()?`Last check: ${new Date(service().checkState().checkedAt).toLocaleTimeString()}`:"Check manually when needed."
|
|
1373
|
+
})())
|
|
1374
|
+
_$insert8(_el$,_$createComponent12(Show4,{get when(){return service()?.installed?.()
|
|
1375
|
+
},children:(version)=>(()=>{var _el$8=_$createElement11("text"),_el$9=_$createTextNode10(`Restart OpenCode to use Navigator `),_el$0=_$createTextNode10(`.`)
|
|
1376
|
+
_$insertNode10(_el$8,_el$9)
|
|
1377
|
+
_$insertNode10(_el$8,_el$0)
|
|
1378
|
+
_$setProp11(_el$8,"height",1)
|
|
1379
|
+
_$setProp11(_el$8,"truncate",true)
|
|
1380
|
+
_$setProp11(_el$8,"wrapMode","none")
|
|
1381
|
+
_$insert8(_el$8,version,_el$0)
|
|
1382
|
+
_$effect11((_$p)=>_$setProp11(_el$8,"fg",props.api.theme.current.textMuted,_$p))
|
|
1383
|
+
return _el$8
|
|
1384
|
+
})()
|
|
1385
|
+
}),null)
|
|
1386
|
+
_$effect11((_p$)=>{var _v$=TextAttributes4.BOLD,_v$2=props.api.theme.current.text,_v$3=props.api.theme.current.textMuted,_v$4=service()?.checkState().status==="error"?props.api.theme.current.warning:props.api.theme.current.textMuted,_v$5=props.api.theme.current.textMuted
|
|
1387
|
+
_v$!==_p$.e&&(_p$.e=_$setProp11(_el$2,"attributes",_v$,_p$.e))
|
|
1388
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp11(_el$2,"fg",_v$2,_p$.t))
|
|
1389
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp11(_el$4,"fg",_v$3,_p$.a))
|
|
1390
|
+
_v$4!==_p$.o&&(_p$.o=_$setProp11(_el$6,"fg",_v$4,_p$.o))
|
|
1391
|
+
_v$5!==_p$.i&&(_p$.i=_$setProp11(_el$7,"fg",_v$5,_p$.i))
|
|
1392
|
+
return _p$
|
|
1393
|
+
},{e:undefined,t:undefined,a:undefined,o:undefined,i:undefined
|
|
1394
|
+
})
|
|
1395
|
+
return _el$
|
|
1396
|
+
})()
|
|
1397
|
+
}
|
|
1398
|
+
import {createComponent as _$createComponent13} from "@opentui/solid"
|
|
1399
|
+
import {createTextNode as _$createTextNode11} from "@opentui/solid"
|
|
1400
|
+
import {insertNode as _$insertNode11} from "@opentui/solid"
|
|
1401
|
+
import {effect as _$effect12} from "@opentui/solid"
|
|
1402
|
+
import {insert as _$insert9} from "@opentui/solid"
|
|
1403
|
+
import {setProp as _$setProp12} from "@opentui/solid"
|
|
1404
|
+
import {createElement as _$createElement12} from "@opentui/solid"
|
|
1405
|
+
import {memo as _$memo5} from "@opentui/solid"
|
|
1406
|
+
import {TextAttributes as TextAttributes5} from "@opentui/core"
|
|
1407
|
+
import {Show as Show5} from "solid-js"
|
|
675
1408
|
import {SelectionBox as SelectionBox3} from "./tui.js"
|
|
676
1409
|
function SettingsOptionRow(props){const model=props.controller
|
|
677
1410
|
const index=()=>model.options().findIndex((candidate)=>candidate.value===props.option.value)
|
|
678
1411
|
const selected=()=>model.active()===index()
|
|
679
1412
|
const section=()=>props.option.value
|
|
680
|
-
return _$
|
|
681
|
-
},flexDirection:"row",gap:2,paddingLeft:1,paddingRight:1,get backgroundColor(){return _$
|
|
1413
|
+
return _$createComponent13(SelectionBox3,{get id(){return model.optionId(props.option.value)
|
|
1414
|
+
},flexDirection:"row",gap:2,paddingLeft:1,paddingRight:1,get backgroundColor(){return _$memo5(()=>!!selected())()?model.theme().backgroundElement:undefined
|
|
682
1415
|
},onMouseOver:()=>model.setActive(index()),onMouseDown:(event)=>event.stopPropagation(),onMouseUp:(event)=>{event.stopPropagation()
|
|
1416
|
+
if(!props.option.disabled)
|
|
683
1417
|
model.select(props.option.value)
|
|
684
|
-
},get children(){return [(()=>{var _el$=_$
|
|
685
|
-
_$
|
|
686
|
-
_$
|
|
687
|
-
_$
|
|
688
|
-
_v$!==_p$.e&&(_p$.e=_$
|
|
689
|
-
_v$2!==_p$.t&&(_p$.t=_$
|
|
1418
|
+
},get children(){return [(()=>{var _el$=_$createElement12("text")
|
|
1419
|
+
_$setProp12(_el$,"flexShrink",0)
|
|
1420
|
+
_$insert9(_el$,()=>props.option.title)
|
|
1421
|
+
_$effect12((_p$)=>{var _v$=selected()?TextAttributes5.BOLD:undefined,_v$2=props.option.disabled?model.theme().textMuted:model.theme().text
|
|
1422
|
+
_v$!==_p$.e&&(_p$.e=_$setProp12(_el$,"attributes",_v$,_p$.e))
|
|
1423
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp12(_el$,"fg",_v$2,_p$.t))
|
|
690
1424
|
return _p$
|
|
691
1425
|
},{e:undefined,t:undefined
|
|
692
1426
|
})
|
|
693
1427
|
return _el$
|
|
694
|
-
})(),(()=>{var _el$2=_$
|
|
695
|
-
_$
|
|
696
|
-
_$
|
|
697
|
-
_$
|
|
1428
|
+
})(),(()=>{var _el$2=_$createElement12("text")
|
|
1429
|
+
_$setProp12(_el$2,"flexGrow",1)
|
|
1430
|
+
_$setProp12(_el$2,"minWidth",0)
|
|
1431
|
+
_$setProp12(_el$2,"truncate",true)
|
|
1432
|
+
_$setProp12(_el$2,"wrapMode","none")
|
|
1433
|
+
_$insert9(_el$2,()=>props.option.description)
|
|
1434
|
+
_$effect12((_$p)=>_$setProp12(_el$2,"fg",model.theme().borderSubtle,_$p))
|
|
698
1435
|
return _el$2
|
|
699
|
-
})(),_$
|
|
700
|
-
},get children(){var _el$3=_$
|
|
701
|
-
_$
|
|
702
|
-
_$
|
|
703
|
-
_$
|
|
704
|
-
_$
|
|
705
|
-
_$
|
|
706
|
-
_$
|
|
707
|
-
_$
|
|
708
|
-
},get children(){var _el$4=_$
|
|
709
|
-
_$
|
|
710
|
-
_$
|
|
711
|
-
_$
|
|
1436
|
+
})(),_$createComponent13(Show5,{get when(){return SIDEBAR_SECTIONS.includes(section())
|
|
1437
|
+
},get children(){var _el$3=_$createElement12("box"),_el$8=_$createElement12("text"),_el$9=_$createTextNode11(` Items: `),_el$0=_$createElement12("text"),_el$1=_$createElement12("text")
|
|
1438
|
+
_$insertNode11(_el$3,_el$8)
|
|
1439
|
+
_$insertNode11(_el$3,_el$0)
|
|
1440
|
+
_$insertNode11(_el$3,_el$1)
|
|
1441
|
+
_$setProp12(_el$3,"flexDirection","row")
|
|
1442
|
+
_$setProp12(_el$3,"flexShrink",0)
|
|
1443
|
+
_$setProp12(_el$3,"gap",1)
|
|
1444
|
+
_$insert9(_el$3,_$createComponent13(Show5,{get when(){return props.option.value==="quick_actions"
|
|
1445
|
+
},get children(){var _el$4=_$createElement12("text"),_el$5=_$createTextNode11(` Actions`)
|
|
1446
|
+
_$insertNode11(_el$4,_el$5)
|
|
1447
|
+
_$setProp12(_el$4,"onMouseDown",(event)=>event.stopPropagation())
|
|
1448
|
+
_$setProp12(_el$4,"onMouseUp",(event)=>{event.stopPropagation()
|
|
712
1449
|
model.openQuickActions()
|
|
713
1450
|
})
|
|
714
|
-
_$
|
|
715
|
-
_$
|
|
1451
|
+
_$insert9(_el$4,()=>model.icons.icon("actions"),_el$5)
|
|
1452
|
+
_$effect12((_$p)=>_$setProp12(_el$4,"fg",model.theme().accent,_$p))
|
|
716
1453
|
return _el$4
|
|
717
1454
|
}}),_el$8)
|
|
718
|
-
_$
|
|
719
|
-
},get children(){var _el$6=_$
|
|
720
|
-
_$
|
|
721
|
-
_$
|
|
722
|
-
_$
|
|
1455
|
+
_$insert9(_el$3,_$createComponent13(Show5,{get when(){return props.option.value==="mcp"||props.option.value==="skills"
|
|
1456
|
+
},get children(){var _el$6=_$createElement12("text"),_el$7=_$createTextNode11(` Groups`)
|
|
1457
|
+
_$insertNode11(_el$6,_el$7)
|
|
1458
|
+
_$setProp12(_el$6,"onMouseDown",(event)=>event.stopPropagation())
|
|
1459
|
+
_$setProp12(_el$6,"onMouseUp",(event)=>{event.stopPropagation()
|
|
723
1460
|
if(props.option.value==="skills")
|
|
724
1461
|
model.openSkillGroups()
|
|
725
1462
|
else
|
|
726
1463
|
model.openMcpGroups()
|
|
727
1464
|
})
|
|
728
|
-
_$
|
|
729
|
-
_$
|
|
1465
|
+
_$insert9(_el$6,()=>model.icons.icon("sections"),_el$7)
|
|
1466
|
+
_$effect12((_$p)=>_$setProp12(_el$6,"fg",model.theme().accent,_$p))
|
|
730
1467
|
return _el$6
|
|
731
1468
|
}}),_el$8)
|
|
732
|
-
_$
|
|
733
|
-
_$
|
|
734
|
-
_$
|
|
1469
|
+
_$insertNode11(_el$8,_el$9)
|
|
1470
|
+
_$setProp12(_el$8,"onMouseDown",(event)=>event.stopPropagation())
|
|
1471
|
+
_$setProp12(_el$8,"onMouseUp",(event)=>{event.stopPropagation()
|
|
735
1472
|
model.openLimitPrompt(section())
|
|
736
1473
|
})
|
|
737
|
-
_$
|
|
738
|
-
_$
|
|
739
|
-
_$
|
|
1474
|
+
_$insert9(_el$8,()=>model.icons.icon("todo"),_el$9)
|
|
1475
|
+
_$insert9(_el$8,()=>props.preferences.selectedSectionItemLimit?.(section())||"All",null)
|
|
1476
|
+
_$setProp12(_el$0,"onMouseDown",(event)=>{event.stopPropagation()
|
|
740
1477
|
model.reorder(props.option.value,-1)
|
|
741
1478
|
})
|
|
742
|
-
_$
|
|
743
|
-
_$
|
|
1479
|
+
_$insert9(_el$0,()=>model.icons.icon("up"))
|
|
1480
|
+
_$setProp12(_el$1,"onMouseDown",(event)=>{event.stopPropagation()
|
|
744
1481
|
model.reorder(props.option.value,1)
|
|
745
1482
|
})
|
|
746
|
-
_$
|
|
747
|
-
_$
|
|
748
|
-
_v$3!==_p$.e&&(_p$.e=_$
|
|
749
|
-
_v$4!==_p$.t&&(_p$.t=_$
|
|
750
|
-
_v$5!==_p$.a&&(_p$.a=_$
|
|
1483
|
+
_$insert9(_el$1,()=>model.icons.icon("down"))
|
|
1484
|
+
_$effect12((_p$)=>{var _v$3=model.theme().accent,_v$4=model.theme().accent,_v$5=model.theme().accent
|
|
1485
|
+
_v$3!==_p$.e&&(_p$.e=_$setProp12(_el$8,"fg",_v$3,_p$.e))
|
|
1486
|
+
_v$4!==_p$.t&&(_p$.t=_$setProp12(_el$0,"fg",_v$4,_p$.t))
|
|
1487
|
+
_v$5!==_p$.a&&(_p$.a=_$setProp12(_el$1,"fg",_v$5,_p$.a))
|
|
751
1488
|
return _p$
|
|
752
1489
|
},{e:undefined,t:undefined,a:undefined
|
|
753
1490
|
})
|
|
@@ -756,71 +1493,71 @@ return _el$3
|
|
|
756
1493
|
}})
|
|
757
1494
|
}
|
|
758
1495
|
function SettingsDialog(props){const model=createSettingsDialogController(props)
|
|
759
|
-
return _$
|
|
760
|
-
},get children(){return [(()=>{var _el$=_$
|
|
761
|
-
_$
|
|
762
|
-
_$
|
|
763
|
-
_$
|
|
764
|
-
_$
|
|
765
|
-
_$
|
|
766
|
-
_$
|
|
767
|
-
_$
|
|
768
|
-
_$
|
|
1496
|
+
return _$createComponent14(DialogSurface6,{get api(){return props.api
|
|
1497
|
+
},get children(){return [(()=>{var _el$=_$createElement13("box"),_el$2=_$createElement13("text"),_el$3=_$createTextNode12(` Navigator settings`),_el$4=_$createElement13("text")
|
|
1498
|
+
_$insertNode12(_el$,_el$2)
|
|
1499
|
+
_$insertNode12(_el$,_el$4)
|
|
1500
|
+
_$setProp13(_el$,"flexDirection","row")
|
|
1501
|
+
_$setProp13(_el$,"justifyContent","space-between")
|
|
1502
|
+
_$insertNode12(_el$2,_el$3)
|
|
1503
|
+
_$insert10(_el$2,()=>model.icons.icon("settings"),_el$3)
|
|
1504
|
+
_$setProp13(_el$4,"onMouseDown",(event)=>event.stopPropagation())
|
|
1505
|
+
_$setProp13(_el$4,"onMouseUp",(event)=>{event.stopPropagation()
|
|
769
1506
|
model.dialogs.back()
|
|
770
1507
|
})
|
|
771
|
-
_$
|
|
772
|
-
_$
|
|
773
|
-
_v$!==_p$.e&&(_p$.e=_$
|
|
774
|
-
_v$2!==_p$.t&&(_p$.t=_$
|
|
775
|
-
_v$3!==_p$.a&&(_p$.a=_$
|
|
1508
|
+
_$insert10(_el$4,()=>model.icons.key("esc"))
|
|
1509
|
+
_$effect13((_p$)=>{var _v$=TextAttributes6.BOLD,_v$2=model.theme().text,_v$3=model.theme().textMuted
|
|
1510
|
+
_v$!==_p$.e&&(_p$.e=_$setProp13(_el$2,"attributes",_v$,_p$.e))
|
|
1511
|
+
_v$2!==_p$.t&&(_p$.t=_$setProp13(_el$2,"fg",_v$2,_p$.t))
|
|
1512
|
+
_v$3!==_p$.a&&(_p$.a=_$setProp13(_el$4,"fg",_v$3,_p$.a))
|
|
776
1513
|
return _p$
|
|
777
1514
|
},{e:undefined,t:undefined,a:undefined
|
|
778
1515
|
})
|
|
779
1516
|
return _el$
|
|
780
|
-
})(),(()=>{var _el$5=_$
|
|
781
|
-
_$
|
|
782
|
-
_$
|
|
1517
|
+
})(),(()=>{var _el$5=_$createElement13("text")
|
|
1518
|
+
_$insert10(_el$5,()=>model.activeGroup()==="about"?"Version, updates, release history, and support.":"Adjust sections and behavior. Changes apply immediately.")
|
|
1519
|
+
_$effect13((_$p)=>_$setProp13(_el$5,"fg",model.theme().textMuted,_$p))
|
|
783
1520
|
return _el$5
|
|
784
|
-
})(),(()=>{var _el$
|
|
785
|
-
_$
|
|
786
|
-
_$
|
|
787
|
-
_$
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
},
|
|
1521
|
+
})(),(()=>{var _el$6=_$createElement13("box")
|
|
1522
|
+
_$setProp13(_el$6,"flexDirection","row")
|
|
1523
|
+
_$setProp13(_el$6,"flexWrap","wrap")
|
|
1524
|
+
_$setProp13(_el$6,"columnGap",1)
|
|
1525
|
+
_$setProp13(_el$6,"rowGap",0)
|
|
1526
|
+
_$insert10(_el$6,_$createComponent14(For5,{get each(){return model.orderedGroups().map((group)=>group.id)
|
|
1527
|
+
},children:(id)=>_$createComponent14(Tab,{get api(){return props.api
|
|
1528
|
+
},get selected(){return model.activeGroup()===id
|
|
1529
|
+
},paddingLeft:1,paddingRight:1,onMouseDown:()=>{model.setActiveGroup(id)
|
|
791
1530
|
model.setActive(0)
|
|
792
|
-
},get children(){return [_$
|
|
1531
|
+
},get children(){return [_$memo6(()=>model.icons.tab(id))," ",_$memo6(()=>model.orderedGroups().find((group)=>group.id===id)?.tab)]
|
|
793
1532
|
}})
|
|
794
1533
|
}))
|
|
795
|
-
return _el$
|
|
796
|
-
})(),(()=>{var _el$
|
|
797
|
-
_$
|
|
1534
|
+
return _el$6
|
|
1535
|
+
})(),(()=>{var _el$7=_$createElement13("scrollbox"),_el$8=_$createElement13("box")
|
|
1536
|
+
_$insertNode12(_el$7,_el$8)
|
|
798
1537
|
var _ref$=model.setBody
|
|
799
|
-
typeof _ref$==="function"?_$
|
|
800
|
-
_$
|
|
801
|
-
_$
|
|
802
|
-
_$
|
|
803
|
-
})
|
|
804
|
-
_$setProp7(_el$8,"horizontalScrollbarOptions",{visible:false
|
|
1538
|
+
typeof _ref$==="function"?_$use5(_ref$,_el$7):model.setBody=_el$7
|
|
1539
|
+
_$setProp13(_el$7,"id",`${PLUGIN_ID}.settings.body`)
|
|
1540
|
+
_$setProp13(_el$7,"scrollX",false)
|
|
1541
|
+
_$setProp13(_el$7,"verticalScrollbarOptions",{visible:true
|
|
805
1542
|
})
|
|
806
|
-
_$
|
|
807
|
-
_$insert5(_el$9,_$createComponent6(For3,{get each(){return model.options()
|
|
808
|
-
},children:(option)=>_$createComponent6(SettingsOptionRow,{get preferences(){return props.preferences
|
|
809
|
-
},controller:model,option
|
|
810
|
-
})
|
|
811
|
-
}))
|
|
812
|
-
_$effect7((_p$)=>{var{restoreScroll:_v$4,saveScroll:_v$5}=model,_v$6=model.contentHeight()
|
|
813
|
-
_v$4!==_p$.e&&(_p$.e=_$setProp7(_el$8,"renderBefore",_v$4,_p$.e))
|
|
814
|
-
_v$5!==_p$.t&&(_p$.t=_$setProp7(_el$8,"renderAfter",_v$5,_p$.t))
|
|
815
|
-
_v$6!==_p$.a&&(_p$.a=_$setProp7(_el$8,"height",_v$6,_p$.a))
|
|
816
|
-
return _p$
|
|
817
|
-
},{e:undefined,t:undefined,a:undefined
|
|
1543
|
+
_$setProp13(_el$7,"horizontalScrollbarOptions",{visible:false
|
|
818
1544
|
})
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
_$
|
|
822
|
-
|
|
823
|
-
|
|
1545
|
+
_$setProp13(_el$8,"gap",1)
|
|
1546
|
+
_$insert10(_el$8,_$createComponent14(Show6,{get when(){return model.activeGroup()==="about"
|
|
1547
|
+
},get children(){return _$createComponent14(AboutVersionStatus,{get api(){return props.api
|
|
1548
|
+
}})
|
|
1549
|
+
}}),null)
|
|
1550
|
+
_$insert10(_el$8,_$createComponent14(For5,{get each(){return model.options().map((option)=>option.value)
|
|
1551
|
+
},children:(value)=>_$createComponent14(SettingsOptionRow,{get preferences(){return props.preferences
|
|
1552
|
+
},controller:model,get option(){return model.options().find((option)=>option.value===value)
|
|
1553
|
+
}})
|
|
1554
|
+
}),null)
|
|
1555
|
+
_$effect13((_$p)=>_$setProp13(_el$7,"height",model.contentHeight(),_$p))
|
|
1556
|
+
return _el$7
|
|
1557
|
+
})(),(()=>{var _el$9=_$createElement13("text")
|
|
1558
|
+
_$insert10(_el$9,()=>model.footerHint())
|
|
1559
|
+
_$effect13((_$p)=>_$setProp13(_el$9,"fg",model.theme().textMuted,_$p))
|
|
1560
|
+
return _el$9
|
|
824
1561
|
})()]
|
|
825
1562
|
}})
|
|
826
1563
|
}
|