Add OpenCode binary selection with version detection

- Add binary selector component with dropdown and validation
- Support custom OpenCode binary paths and system PATH binary
- Async version checking for all binaries when selector opens
- Store recent binaries with timestamps and version info
- Enhanced instance creation to use selected binary
- Improved storage system for binary preferences
- Fixed validation to handle system PATH binaries properly
This commit is contained in:
Shantur Rathore
2025-10-26 10:26:32 +00:00
parent f4a664bfe7
commit f63a4b3754
11 changed files with 684 additions and 55 deletions

View File

@@ -183,7 +183,7 @@ const App: Component = () => {
return activeSessionId().get(instance.id) || null
})
async function handleSelectFolder(folderPath?: string) {
async function handleSelectFolder(folderPath?: string, binaryPath?: string) {
setIsSelectingFolder(true)
try {
let folder: string | null | undefined = folderPath
@@ -196,7 +196,7 @@ const App: Component = () => {
}
addRecentFolder(folder)
const instanceId = await createInstance(folder)
const instanceId = await createInstance(folder, binaryPath)
setHasInstances(true)
setShowFolderSelection(false)