import { createEffect, createSignal, type Component } from "solid-js" import { Terminal } from "lucide-solid" import OpenCodeBinarySelector from "../opencode-binary-selector" import EnvironmentVariablesEditor from "../environment-variables-editor" import { useConfig } from "../../stores/preferences" import { useI18n } from "../../lib/i18n" export const OpenCodeSettingsSection: Component = () => { const { t } = useI18n() const { serverSettings, updateLastUsedBinary } = useConfig() const [selectedBinary, setSelectedBinary] = createSignal(serverSettings().opencodeBinary || "opencode") createEffect(() => { const binary = serverSettings().opencodeBinary || "opencode" setSelectedBinary((current) => (current === binary ? current : binary)) }) const handleBinaryChange = (binary: string) => { setSelectedBinary(binary) updateLastUsedBinary(binary) } return (

{t("settings.opencode.runtime.title")}

{t("settings.opencode.runtime.subtitle")}

{t("settings.scope.server")}

{t("advancedSettings.environmentVariables.title")}

{t("advancedSettings.environmentVariables.subtitle")}

{t("settings.scope.server")}
) }