mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-26 15:55:45 +00:00
tips as plugin
This commit is contained in:
@@ -636,28 +636,12 @@ const home = (input: Cfg): TuiSlotPlugin => ({
|
||||
</box>
|
||||
)
|
||||
},
|
||||
home_tips(ctx, value) {
|
||||
if (!value.show_tips) return null
|
||||
home_bottom(ctx) {
|
||||
const skin = look(ctx.theme.current)
|
||||
const text = "extra content in the unified home bottom slot"
|
||||
|
||||
return (
|
||||
<box height={4} minHeight={0} width="100%" maxWidth={75} alignItems="center" paddingTop={3} flexShrink={1}>
|
||||
<text fg={skin.muted}>
|
||||
<span style={{ fg: skin.accent }}>{input.label}</span> replaces the built-in home tips slot
|
||||
</text>
|
||||
</box>
|
||||
)
|
||||
},
|
||||
home_below_tips(ctx, value) {
|
||||
const skin = look(ctx.theme.current)
|
||||
const text = value.first_time_user
|
||||
? "first-time user state"
|
||||
: value.tips_hidden
|
||||
? "tips are hidden"
|
||||
: "extra content below tips"
|
||||
|
||||
return (
|
||||
<box width="100%" maxWidth={75} alignItems="center" paddingTop={1} flexShrink={0}>
|
||||
<box width="100%" maxWidth={75} alignItems="center" paddingTop={1} flexShrink={0} gap={1}>
|
||||
<box
|
||||
border
|
||||
borderColor={skin.border}
|
||||
|
||||
Reference in New Issue
Block a user