fix: always render wordmark via protocol auto-resolution; disable update checks by default
This commit is contained in:
@@ -6,8 +6,9 @@ import { InstallationVersion } from "@opencode-ai/core/installation/version"
|
|||||||
import { GlobalBus } from "@/bus/global"
|
import { GlobalBus } from "@/bus/global"
|
||||||
|
|
||||||
export async function upgrade() {
|
export async function upgrade() {
|
||||||
|
// Neuron fork: update checks are opt-in. We do not phone home by default.
|
||||||
const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal()))
|
const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal()))
|
||||||
if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
|
if (config.autoupdate !== true || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
|
||||||
const method = await Installation.method()
|
const method = await Installation.method()
|
||||||
const latest = await Installation.latest(method).catch(() => {})
|
const latest = await Installation.latest(method).catch(() => {})
|
||||||
if (!latest) return
|
if (!latest) return
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useRenderer } from "@opentui/solid"
|
import { For, createSignal, type JSX } from "solid-js"
|
||||||
import { createSignal, For, onMount, type JSX } from "solid-js"
|
|
||||||
import { RGBA, TextAttributes } from "@opentui/core"
|
import { RGBA, TextAttributes } from "@opentui/core"
|
||||||
import { tint, useTheme } from "../context/theme"
|
import { tint, useTheme } from "../context/theme"
|
||||||
import { logo } from "../logo"
|
import { logo } from "../logo"
|
||||||
@@ -10,24 +9,8 @@ import wordmark from "../assets/neuron-wordmark.png" with { type: "file" }
|
|||||||
// block-letter ASCII logo.
|
// block-letter ASCII logo.
|
||||||
export function Logo() {
|
export function Logo() {
|
||||||
const { theme } = useTheme()
|
const { theme } = useTheme()
|
||||||
const renderer = useRenderer()
|
|
||||||
const [useImage, setImage] = createSignal(false)
|
|
||||||
const [imageFailed, setImageFailed] = createSignal(false)
|
const [imageFailed, setImageFailed] = createSignal(false)
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
// capability info lands asynchronously after startup; only trust an
|
|
||||||
// explicit positive detection
|
|
||||||
const caps = (renderer as { capabilities?: { kitty_graphics?: boolean; iterm2?: boolean } }).capabilities
|
|
||||||
if (caps?.kitty_graphics || caps?.iterm2) {
|
|
||||||
setImage(true)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const onCaps = (next: { kitty_graphics?: boolean; iterm2?: boolean }) => {
|
|
||||||
if (next?.kitty_graphics || next?.iterm2) setImage(true)
|
|
||||||
}
|
|
||||||
renderer.on("capabilities", onCaps)
|
|
||||||
})
|
|
||||||
|
|
||||||
const renderLine = (line: string, fg: RGBA, bold: boolean): JSX.Element[] => {
|
const renderLine = (line: string, fg: RGBA, bold: boolean): JSX.Element[] => {
|
||||||
const shadow = tint(theme.background, fg, 0.25)
|
const shadow = tint(theme.background, fg, 0.25)
|
||||||
const attrs = bold ? TextAttributes.BOLD : undefined
|
const attrs = bold ? TextAttributes.BOLD : undefined
|
||||||
@@ -68,7 +51,7 @@ export function Logo() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useImage() && !imageFailed()) {
|
if (!imageFailed()) {
|
||||||
return (
|
return (
|
||||||
<box height={7}>
|
<box height={7}>
|
||||||
<image
|
<image
|
||||||
@@ -76,6 +59,7 @@ export function Logo() {
|
|||||||
width={34}
|
width={34}
|
||||||
height={6}
|
height={6}
|
||||||
fit="fit"
|
fit="fit"
|
||||||
|
protocol="auto"
|
||||||
onError={() => setImageFailed(true)}
|
onError={() => setImageFailed(true)}
|
||||||
/>
|
/>
|
||||||
</box>
|
</box>
|
||||||
|
|||||||
Reference in New Issue
Block a user