Skip to content

Commit a468680

Browse files
chore: generate
1 parent 0c0d193 commit a468680

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

packages/opencode/src/cli/cmd/run/footer.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export class RunFooter implements FooterApi {
223223
onThemeRelease: (theme) => {
224224
void this.renderer
225225
.idle()
226-
.catch(() => { })
226+
.catch(() => {})
227227
.finally(() => this.destroyTheme(theme))
228228
},
229229
})
@@ -374,7 +374,7 @@ export class RunFooter implements FooterApi {
374374
public onClose(fn: () => void): () => void {
375375
if (this.isClosed) {
376376
fn()
377-
return () => { }
377+
return () => {}
378378
}
379379

380380
this.closes.add(fn)
@@ -569,7 +569,7 @@ export class RunFooter implements FooterApi {
569569
return this.idle()
570570
}
571571

572-
await this.renderer.idle().catch(() => { })
572+
await this.renderer.idle().catch(() => {})
573573
})
574574
}
575575

@@ -819,7 +819,7 @@ export class RunFooter implements FooterApi {
819819
this.patch(patch)
820820
}
821821
})
822-
.catch(() => { })
822+
.catch(() => {})
823823
}
824824

825825
private handleVariantSelect = (variant: string | undefined): void => {
@@ -861,7 +861,7 @@ export class RunFooter implements FooterApi {
861861
this.patch(patch)
862862
}
863863
})
864-
.catch(() => { })
864+
.catch(() => {})
865865
}
866866

867867
private clearInterruptTimer(): void {
@@ -974,9 +974,11 @@ export class RunFooter implements FooterApi {
974974
this.themes.push(theme)
975975
this.setTheme(theme)
976976
this.renderer.setBackgroundColor(theme.background)
977-
this.flushing = this.flushing.then(() => this.scrollback.setTheme(theme)).catch((error) => {
978-
this.flushError = error
979-
})
977+
this.flushing = this.flushing
978+
.then(() => this.scrollback.setTheme(theme))
979+
.catch((error) => {
980+
this.flushError = error
981+
})
980982
})
981983
}
982984

@@ -1006,7 +1008,7 @@ export class RunFooter implements FooterApi {
10061008
this.renderer.clearPaletteCache()
10071009
void this.renderer
10081010
.getPalette({ size: 256 })
1009-
.catch(() => { })
1011+
.catch(() => {})
10101012
.finally(() => {
10111013
this.paletteRefreshRunning = false
10121014
if (!retry && !this.paletteRefreshQueued) {

packages/opencode/src/cli/cmd/run/theme.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,9 @@ export async function resolveRunTheme(renderer: CliRenderer): Promise<RunTheme>
585585

586586
// Palette-only terminal reloads can leave renderer.themeMode stale, but
587587
// ANSI slot zero is not the terminal background when OSC 11 is absent.
588-
const pick = colors.defaultBackground ? mode(RGBA.fromHex(colors.defaultBackground)) : renderer.themeMode ?? mode(RGBA.fromHex(bg))
588+
const pick = colors.defaultBackground
589+
? mode(RGBA.fromHex(colors.defaultBackground))
590+
: (renderer.themeMode ?? mode(RGBA.fromHex(bg)))
589591
const theme = resolveTheme(generateSystem(colors, pick), pick)
590592
const indexed = indexedPalette(colors, 256)
591593
const shared = await import("../tui/context/theme")

packages/opencode/src/cli/cmd/tui/context/theme.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
345345
}
346346

347347
onMount(() => {
348-
void Promise.allSettled([
349-
resolveSystemTheme(store.mode),
350-
syncCustomThemes(),
351-
]).finally(() => {
348+
void Promise.allSettled([resolveSystemTheme(store.mode), syncCustomThemes()]).finally(() => {
352349
setStore("ready", true)
353350
})
354351
})
@@ -791,7 +788,7 @@ export function createSyntaxStyleMemo(factory: () => SyntaxStyle) {
791788
retained.add(style)
792789
void renderer
793790
.idle()
794-
.catch(() => { })
791+
.catch(() => {})
795792
.finally(() => {
796793
if (!retained.delete(style)) return
797794
style.destroy()

0 commit comments

Comments
 (0)