diff --git a/packages/cli/dev/error-overlay.tsx b/packages/cli/dev/error-overlay.tsx index fbae6cbc81b..0198a424ca0 100644 --- a/packages/cli/dev/error-overlay.tsx +++ b/packages/cli/dev/error-overlay.tsx @@ -36,17 +36,17 @@ export function ErrorOverlay(props: { component: string; error: unknown; onClose - + Error while hot reloading - + esc - + {props.error instanceof Error ? props.error.message : String(props.error)} - + {props.component} · Fix the component and save to retry. diff --git a/packages/latex/src/plugin.ts b/packages/latex/src/plugin.ts index 2a427297b24..3c7cf0930d7 100644 --- a/packages/latex/src/plugin.ts +++ b/packages/latex/src/plugin.ts @@ -5,8 +5,8 @@ export default Plugin.define({ id: "opencode.latex", setup(context) { const render = createLatexCodeBlockRenderer(context.renderer, () => ({ - text: context.theme.text.default, - subdued: context.theme.text.subdued, + text: context.theme.text.base, + subdued: context.theme.text.muted, })) context.markdown.registerCodeBlockRenderer("latex", render) context.markdown.registerCodeBlockRenderer("math", render) diff --git a/packages/merman/src/palette.test.ts b/packages/merman/src/palette.test.ts index 23a023b7eb1..f0e6aa8ca5d 100644 --- a/packages/merman/src/palette.test.ts +++ b/packages/merman/src/palette.test.ts @@ -83,15 +83,15 @@ describe("OpenCode diagram palette", () => { } const theme = { text: { - default: rgb([230, 232, 240]), - subdued: rgb([114, 120, 138]), + base: rgb([230, 232, 240]), + muted: rgb([114, 120, 138]), feedback: { - info: { default: rgb([40, 120, 220]) }, - success: { default: rgb([80, 180, 120]) }, - warning: { default: rgb([220, 160, 80]) }, + info: { base: rgb([40, 120, 220]) }, + success: { base: rgb([80, 180, 120]) }, + warning: { base: rgb([220, 160, 80]) }, }, }, - background: { default: rgb([250, 250, 250]) }, + background: { base: rgb([250, 250, 250]) }, categorical: [accent], } const palette = resolveOpenCodeDiagramPalette(theme, mode) diff --git a/packages/merman/src/palette.ts b/packages/merman/src/palette.ts index 67e99950392..ae7579f9ea2 100644 --- a/packages/merman/src/palette.ts +++ b/packages/merman/src/palette.ts @@ -46,27 +46,27 @@ export function createOpenCodeDiagramPalette(input: OpenCodeDiagramPaletteInput) export function resolveOpenCodeDiagramPalette( theme: { readonly text: { - readonly default: RGBA - readonly subdued: RGBA + readonly base: RGBA + readonly muted: RGBA readonly feedback: { - readonly info: { readonly default: RGBA } - readonly success: { readonly default: RGBA } - readonly warning: { readonly default: RGBA } + readonly info: { readonly base: RGBA } + readonly success: { readonly base: RGBA } + readonly warning: { readonly base: RGBA } } } - readonly background: { readonly default: RGBA } + readonly background: { readonly base: RGBA } readonly categorical: readonly Readonly>[] }, mode: "dark" | "light", ) { const accent = theme.categorical[3] ?? theme.categorical[0]! return createOpenCodeDiagramPalette({ - text: theme.text.default, - subdued: theme.text.subdued, - info: theme.text.feedback.info.default, - success: theme.text.feedback.success.default, - warning: theme.text.feedback.warning.default, - background: theme.background.default, + text: theme.text.base, + subdued: theme.text.muted, + info: theme.text.feedback.info.base, + success: theme.text.feedback.success.base, + warning: theme.text.feedback.warning.base, + background: theme.background.base, accent: { soft: accent[mode === "dark" ? 300 : 700], clear: accent[mode === "dark" ? 200 : 800], diff --git a/packages/theme/src/tui/defaults.ts b/packages/theme/src/tui/defaults.ts index 38d5e24bd6f..2e72787cd78 100644 --- a/packages/theme/src/tui/defaults.ts +++ b/packages/theme/src/tui/defaults.ts @@ -106,16 +106,16 @@ const modes = { }, categorical: DEFAULT_CATEGORICAL, text: { - default: "$hue.neutral.200", - subdued: "$hue.neutral.400", + base: "$hue.neutral.200", + muted: "$hue.neutral.400", action: { - primary: { default: "$hue.neutral.800", $disabled: "$hue.neutral.500" }, - secondary: { default: "$text.subdued", $hovered: "$text.default" }, - destructive: { default: "$hue.red.800", $disabled: "$hue.neutral.500" }, + primary: { base: "$hue.neutral.800", $disabled: "$hue.neutral.500" }, + secondary: { base: "$text.muted", $hovered: "$text.base" }, + destructive: { base: "$hue.red.800", $disabled: "$hue.neutral.500" }, }, formfield: { - default: "$hue.neutral.200", - $focused: "$text.action.primary.default", + base: "$hue.neutral.200", + $focused: "$text.action.primary.base", $pressed: "$hue.neutral.800", $disabled: "$hue.neutral.500", $selected: "$hue.interactive.300", @@ -127,14 +127,14 @@ const modes = { unread: "$hue.accent.200", }, feedback: { - error: { default: "$hue.red.300", subdued: "$hue.red.400" }, - warning: { default: "$hue.yellow.200", subdued: "$hue.yellow.300" }, - success: { default: "$hue.green.300", subdued: "$hue.green.400" }, - info: { default: "$hue.cyan.300", subdued: "$hue.cyan.400" }, + error: { base: "$hue.red.300", muted: "$hue.red.400" }, + warning: { base: "$hue.yellow.200", muted: "$hue.yellow.300" }, + success: { base: "$hue.green.300", muted: "$hue.green.400" }, + info: { base: "$hue.cyan.300", muted: "$hue.cyan.400" }, }, }, background: { - default: "$hue.neutral.800", + base: "$hue.neutral.800", raised: { base: "$hue.neutral.700", high: "$hue.neutral.600", @@ -142,16 +142,16 @@ const modes = { }, action: { primary: { - default: "$hue.interactive.400", + base: "$hue.interactive.400", $hovered: "$hue.interactive.300", $focused: "$hue.interactive.300", $pressed: "$hue.interactive.200", $selected: "$hue.interactive.300", $disabled: "$hue.neutral.700", }, - secondary: { default: "transparent" }, + secondary: { base: "transparent" }, destructive: { - default: "$hue.red.400", + base: "$hue.red.400", $hovered: "$hue.red.300", $focused: "$hue.red.300", $pressed: "$hue.red.200", @@ -160,22 +160,22 @@ const modes = { }, }, formfield: { - default: "$background.default", + base: "$background.base", $hovered: "$background.raised.base", - $focused: "$background.action.primary.default", + $focused: "$background.action.primary.base", $pressed: "$hue.interactive.200", - $disabled: "$background.default", - $selected: "$background.formfield.default", + $disabled: "$background.base", + $selected: "$background.formfield.base", }, feedback: { - error: { default: "$background.default" }, - warning: { default: "$background.default" }, - success: { default: "$background.default" }, - info: { default: "$background.default" }, + error: { base: "$background.base" }, + warning: { base: "$background.base" }, + success: { base: "$background.base" }, + info: { base: "$background.base" }, }, }, - border: { default: "$hue.neutral.700" }, - scrollbar: { default: "$hue.neutral.600" }, + border: { base: "$hue.neutral.700" }, + scrollbar: { base: "$hue.neutral.600" }, diff: { text: { added: "$hue.green.300", @@ -218,10 +218,10 @@ const modes = { codeBlock: "$hue.neutral.100", }, "@dialog": { - text: { action: { primary: { default: "$hue.neutral.900" } } }, + text: { action: { primary: { base: "$hue.neutral.900" } } }, background: { - default: "$background.raised.base", - action: { primary: { default: "$hue.interactive.500", $hovered: "$background.raised.high" } }, + base: "$background.raised.base", + action: { primary: { base: "$hue.interactive.500", $hovered: "$background.raised.high" } }, }, }, }, @@ -321,16 +321,16 @@ const modes = { }, categorical: DEFAULT_CATEGORICAL, text: { - default: "$hue.neutral.200", - subdued: "$hue.neutral.400", + base: "$hue.neutral.200", + muted: "$hue.neutral.400", action: { - primary: { default: "$hue.neutral.200", $disabled: "$hue.neutral.500" }, - secondary: { default: "$text.subdued", $hovered: "$text.default" }, - destructive: { default: "$hue.red.200", $disabled: "$hue.neutral.500" }, + primary: { base: "$hue.neutral.200", $disabled: "$hue.neutral.500" }, + secondary: { base: "$text.muted", $hovered: "$text.base" }, + destructive: { base: "$hue.red.200", $disabled: "$hue.neutral.500" }, }, formfield: { - default: "$hue.neutral.200", - $focused: "$text.action.primary.default", + base: "$hue.neutral.200", + $focused: "$text.action.primary.base", $pressed: "$hue.neutral.200", $disabled: "$hue.neutral.500", $selected: "$hue.interactive.500", @@ -342,14 +342,14 @@ const modes = { unread: "$hue.accent.200", }, feedback: { - error: { default: "$hue.red.300", subdued: "$hue.red.400" }, - warning: { default: "$hue.yellow.200", subdued: "$hue.yellow.300" }, - success: { default: "$hue.green.300", subdued: "$hue.green.400" }, - info: { default: "$hue.cyan.300", subdued: "$hue.cyan.400" }, + error: { base: "$hue.red.300", muted: "$hue.red.400" }, + warning: { base: "$hue.yellow.200", muted: "$hue.yellow.300" }, + success: { base: "$hue.green.300", muted: "$hue.green.400" }, + info: { base: "$hue.cyan.300", muted: "$hue.cyan.400" }, }, }, background: { - default: "$hue.neutral.800", + base: "$hue.neutral.800", raised: { base: "$hue.neutral.700", high: "$hue.neutral.600", @@ -357,16 +357,16 @@ const modes = { }, action: { primary: { - default: "$hue.interactive.500", + base: "$hue.interactive.500", $hovered: "$hue.interactive.600", $focused: "$hue.interactive.600", $pressed: "$hue.interactive.800", $selected: "$hue.interactive.600", $disabled: "$hue.neutral.800", }, - secondary: { default: "transparent" }, + secondary: { base: "transparent" }, destructive: { - default: "$hue.red.600", + base: "$hue.red.600", $hovered: "$hue.red.700", $focused: "$hue.red.700", $pressed: "$hue.red.800", @@ -375,22 +375,22 @@ const modes = { }, }, formfield: { - default: "$background.default", + base: "$background.base", $hovered: "$background.raised.base", - $focused: "$background.action.primary.default", + $focused: "$background.action.primary.base", $pressed: "$hue.interactive.800", - $disabled: "$background.default", - $selected: "$background.formfield.default", + $disabled: "$background.base", + $selected: "$background.formfield.base", }, feedback: { - error: { default: "$background.default" }, - warning: { default: "$background.default" }, - success: { default: "$background.default" }, - info: { default: "$background.default" }, + error: { base: "$background.base" }, + warning: { base: "$background.base" }, + success: { base: "$background.base" }, + info: { base: "$background.base" }, }, }, - border: { default: "$hue.neutral.700" }, - scrollbar: { default: "$hue.neutral.600" }, + border: { base: "$hue.neutral.700" }, + scrollbar: { base: "$hue.neutral.600" }, diff: { text: { added: "$hue.green.300", @@ -433,10 +433,10 @@ const modes = { codeBlock: "$hue.neutral.100", }, "@dialog": { - text: { action: { primary: { default: "$hue.neutral.200" } } }, + text: { action: { primary: { base: "$hue.neutral.200" } } }, background: { - default: "$background.raised.base", - action: { primary: { default: "$hue.interactive.400", $hovered: "$background.raised.high" } }, + base: "$background.raised.base", + action: { primary: { base: "$hue.interactive.400", $hovered: "$background.raised.high" } }, }, }, }, diff --git a/packages/theme/src/tui/expand.ts b/packages/theme/src/tui/expand.ts index c53a24f3cb1..3ff3fb6c25f 100644 --- a/packages/theme/src/tui/expand.ts +++ b/packages/theme/src/tui/expand.ts @@ -40,7 +40,7 @@ function expandText(definition: TextDefinition | undefined): TextDefinition | un if (!definition) return return { ...definition, - subdued: definition.subdued ?? (definition.default ? "$text.default" : undefined), + muted: definition.muted ?? (definition.base ? "$text.base" : undefined), action: expandActions(definition.action, "text.action"), formfield: expandFormfield(definition.formfield, "text.formfield"), feedback: definition.feedback @@ -50,7 +50,7 @@ function expandText(definition: TextDefinition | undefined): TextDefinition | un kind, { ...feedback, - subdued: feedback.subdued ?? (feedback.default ? `$text.feedback.${kind}.default` : undefined), + muted: feedback.muted ?? (feedback.base ? `$text.feedback.${kind}.base` : undefined), }, ] }), @@ -69,11 +69,11 @@ function expandBackground(definition: BackgroundDefinition | undefined): Backgro } function expandFormfield(definition: StatefulColorDefinition | undefined, path: string) { - if (!definition?.default) return definition + if (!definition?.base) return definition return { ...definition, ...Object.fromEntries( - ActionState.literals.map((state) => [`$${state}`, definition[`$${state}`] ?? `$${path}.default`]), + ActionState.literals.map((state) => [`$${state}`, definition[`$${state}`] ?? `$${path}.base`]), ), } } @@ -85,13 +85,13 @@ function expandActions { - if (!value?.default) return [variant, value] + if (!value?.base) return [variant, value] return [ variant, { ...value, ...Object.fromEntries( - ActionState.literals.map((state) => [`$${state}`, value[`$${state}`] ?? `$${path}.${variant}.default`]), + ActionState.literals.map((state) => [`$${state}`, value[`$${state}`] ?? `$${path}.${variant}.base`]), ), }, ] diff --git a/packages/theme/src/tui/resolve.ts b/packages/theme/src/tui/resolve.ts index 9e142c8ff2e..73bee9ae463 100644 --- a/packages/theme/src/tui/resolve.ts +++ b/packages/theme/src/tui/resolve.ts @@ -100,14 +100,14 @@ function contextualActions( return [ variant, Object.fromEntries( - (["default", ...ActionState.literals] as readonly ResolvedActionState[]).map((state) => { - const key = state === "default" ? undefined : (`$${state}` as ActionStateKey) + (["base", ...ActionState.literals] as readonly ResolvedActionState[]).map((state) => { + const key = state === "base" ? undefined : (`$${state}` as ActionStateKey) return [ - key ?? "default", + key ?? "base", (key ? surfaceVariant?.[key] : undefined) ?? - surfaceVariant?.default ?? + surfaceVariant?.base ?? (key ? baseVariant?.[key] : undefined) ?? - baseVariant?.default, + baseVariant?.base, ] }), ), @@ -151,7 +151,7 @@ function statefulActions(actions: Readonly> function statefulColor(color: StatefulColor): StatefulColor { return { ...color, - state: (states: ActionStates) => color[ActionState.literals.find((state) => states[state]) ?? "default"], + state: (states: ActionStates) => color[ActionState.literals.find((state) => states[state]) ?? "base"], } } diff --git a/packages/theme/src/tui/schema.ts b/packages/theme/src/tui/schema.ts index e5f727b9c32..e55017d3781 100644 --- a/packages/theme/src/tui/schema.ts +++ b/packages/theme/src/tui/schema.ts @@ -62,7 +62,7 @@ const HueDefinition = Schema.Struct({ export type HueDefinition = Schema.Schema.Type const StatefulColorDefinition = Schema.Struct({ - default: Schema.optional(ColorValue), + base: Schema.optional(ColorValue), $hovered: Schema.optional(ColorValue), $focused: Schema.optional(ColorValue), $pressed: Schema.optional(ColorValue), @@ -80,17 +80,17 @@ const ActionColorDefinition = Schema.Struct({ }) const TextFeedbackDefinition = Schema.Struct({ - default: Schema.optional(ColorValue), - subdued: Schema.optional(ColorValue), + base: Schema.optional(ColorValue), + muted: Schema.optional(ColorValue), }) const BackgroundFeedbackDefinition = Schema.Struct({ - default: Schema.optional(ColorValue), + base: Schema.optional(ColorValue), }) const TextDefinition = Schema.Struct({ - default: Schema.optional(ColorValue), - subdued: Schema.optional(ColorValue), + base: Schema.optional(ColorValue), + muted: Schema.optional(ColorValue), action: Schema.optional(ActionColorDefinition), formfield: Schema.optional(StatefulColorDefinition), status: Schema.optional( @@ -113,7 +113,7 @@ const TextDefinition = Schema.Struct({ export type TextDefinition = Schema.Schema.Type const BackgroundDefinition = Schema.Struct({ - default: Schema.optional(ColorValue), + base: Schema.optional(ColorValue), raised: Schema.optional( Schema.Struct({ base: Schema.optional(ColorValue), @@ -202,8 +202,8 @@ export type DiffDefinition = Schema.Schema.Type const ThemeTokensDefinition = Schema.Struct({ text: Schema.optional(TextDefinition), background: Schema.optional(BackgroundDefinition), - border: Schema.optional(Schema.Struct({ default: Schema.optional(ColorValue) })), - scrollbar: Schema.optional(Schema.Struct({ default: Schema.optional(ColorValue) })), + border: Schema.optional(Schema.Struct({ base: Schema.optional(ColorValue) })), + scrollbar: Schema.optional(Schema.Struct({ base: Schema.optional(ColorValue) })), diff: Schema.optional(DiffDefinition), syntax: Schema.optional(SyntaxDefinition), markdown: Schema.optional(MarkdownDefinition), @@ -211,7 +211,7 @@ const ThemeTokensDefinition = Schema.Struct({ export type ThemeTokensDefinition = Schema.Schema.Type const CompleteStatefulColorDefinition = Schema.Struct({ - default: ColorValue, + base: ColorValue, $hovered: Schema.optional(ColorValue), $focused: Schema.optional(ColorValue), $pressed: Schema.optional(ColorValue), @@ -225,13 +225,13 @@ const CompleteActionColorDefinition = Schema.Struct({ destructive: CompleteStatefulColorDefinition, }) -const CompleteTextFeedbackDefinition = Schema.Struct({ default: ColorValue, subdued: Schema.optional(ColorValue) }) -const CompleteBackgroundFeedbackDefinition = Schema.Struct({ default: ColorValue }) +const CompleteTextFeedbackDefinition = Schema.Struct({ base: ColorValue, muted: Schema.optional(ColorValue) }) +const CompleteBackgroundFeedbackDefinition = Schema.Struct({ base: ColorValue }) const CompleteThemeTokensDefinition = Schema.Struct({ text: Schema.Struct({ - default: ColorValue, - subdued: ColorValue, + base: ColorValue, + muted: ColorValue, action: CompleteActionColorDefinition, formfield: CompleteStatefulColorDefinition, status: Schema.Struct({ @@ -248,7 +248,7 @@ const CompleteThemeTokensDefinition = Schema.Struct({ }), }), background: Schema.Struct({ - default: ColorValue, + base: ColorValue, raised: Schema.Struct({ base: ColorValue, high: ColorValue, max: ColorValue }), action: CompleteActionColorDefinition, formfield: CompleteStatefulColorDefinition, @@ -259,8 +259,8 @@ const CompleteThemeTokensDefinition = Schema.Struct({ info: CompleteBackgroundFeedbackDefinition, }), }), - border: Schema.Struct({ default: ColorValue }), - scrollbar: Schema.Struct({ default: ColorValue }), + border: Schema.Struct({ base: ColorValue }), + scrollbar: Schema.Struct({ base: ColorValue }), diff: Schema.Struct({ text: Schema.Struct({ added: ColorValue, removed: ColorValue, context: ColorValue, hunkHeader: ColorValue }), background: Schema.Struct({ added: ColorValue, removed: ColorValue, context: ColorValue }), diff --git a/packages/theme/src/tui/syntax.ts b/packages/theme/src/tui/syntax.ts index d5c641a0ce4..aabe979f264 100644 --- a/packages/theme/src/tui/syntax.ts +++ b/packages/theme/src/tui/syntax.ts @@ -8,14 +8,14 @@ export function generateSyntax(theme: ResolvedThemeTokens) { const feedback = theme.text.feedback return SyntaxStyle.fromTheme([ - rule(["default"], theme.text.default), + rule(["default"], theme.text.base), rule(["prompt"], theme.hue.accent[step]), - rule(["extmark.file"], feedback.warning.default, { bold: true }), + rule(["extmark.file"], feedback.warning.base, { bold: true }), rule(["extmark.agent"], theme.categorical[0][step], { bold: true }), rule(["extmark.skill"], (theme.categorical[1] ?? theme.categorical[0])[step], { bold: true }), // V1 migration preserves its selected/inverse foreground in this action state. rule(["extmark.paste"], theme.text.action.primary.focused, { - background: feedback.warning.default, + background: feedback.warning.base, bold: true, }), rule(["comment", "comment.documentation"], syntax.comment, { italic: true }), @@ -39,7 +39,7 @@ export function generateSyntax(theme: ResolvedThemeTokens) { rule(["punctuation", "punctuation.bracket"], syntax.punctuation), rule( ["variable.builtin", "type.builtin", "function.builtin", "module.builtin", "constant.builtin", "variable.super"], - feedback.error.default, + feedback.error.base, ), rule(["keyword.directive", "keyword.modifier", "keyword.exception"], syntax.keyword, { italic: true }), rule(["punctuation.special", "tag.delimiter"], syntax.operator), @@ -61,27 +61,27 @@ export function generateSyntax(theme: ResolvedThemeTokens) { rule(["markup.list"], markdown.listItem), rule(["markup.quote"], markdown.blockQuote, { italic: true }), rule(["markup.raw", "markup.raw.block"], markdown.code), - rule(["markup.raw.inline"], markdown.code, { background: theme.background.default }), + rule(["markup.raw.inline"], markdown.code, { background: theme.background.base }), rule(["markup.link", "markup.link.url", "string.special", "string.special.url"], markdown.link, { underline: true, }), rule(["markup.link.label"], markdown.linkText, { underline: true }), rule(["label"], markdown.linkText), - rule(["spell", "nospell"], theme.text.default), - rule(["markup.underline"], theme.text.default, { underline: true }), - rule(["comment.error"], feedback.error.default, { italic: true, bold: true }), - rule(["comment.warning"], feedback.warning.default, { italic: true, bold: true }), - rule(["comment.todo", "comment.note"], feedback.info.default, { italic: true, bold: true }), - rule(["attribute", "annotation"], feedback.warning.default), - rule(["tag"], feedback.error.default), - rule(["markup.strikethrough", "markup.list.unchecked", "debug"], theme.text.subdued), - rule(["markup.list.checked"], feedback.success.default), + rule(["spell", "nospell"], theme.text.base), + rule(["markup.underline"], theme.text.base, { underline: true }), + rule(["comment.error"], feedback.error.base, { italic: true, bold: true }), + rule(["comment.warning"], feedback.warning.base, { italic: true, bold: true }), + rule(["comment.todo", "comment.note"], feedback.info.base, { italic: true, bold: true }), + rule(["attribute", "annotation"], feedback.warning.base), + rule(["tag"], feedback.error.base), + rule(["markup.strikethrough", "markup.list.unchecked", "debug"], theme.text.muted), + rule(["markup.list.checked"], feedback.success.base), rule(["diff.plus"], theme.diff.text.added, { background: theme.diff.background.added }), rule(["diff.minus"], theme.diff.text.removed, { background: theme.diff.background.removed }), rule(["diff.delta"], theme.diff.text.context, { background: theme.diff.background.context }), - rule(["error"], feedback.error.default, { bold: true }), - rule(["warning"], feedback.warning.default, { bold: true }), - rule(["info"], feedback.info.default), + rule(["error"], feedback.error.base, { bold: true }), + rule(["warning"], feedback.warning.base, { bold: true }), + rule(["info"], feedback.info.base), ]) } diff --git a/packages/theme/src/tui/types.ts b/packages/theme/src/tui/types.ts index 4e0a8e8c3b4..c76148e6f93 100644 --- a/packages/theme/src/tui/types.ts +++ b/packages/theme/src/tui/types.ts @@ -11,7 +11,7 @@ import type { SyntaxToken, } from "./schema.js" -export type ResolvedActionState = "default" | ActionState +export type ResolvedActionState = "base" | ActionState export type ResolvedFormfieldState = ResolvedActionState export type HueScale = Readonly> export type Hue = Readonly> @@ -30,8 +30,8 @@ export type ResolvedThemeTokens = { readonly increase: (color: RGBA, amount?: number) => RGBA readonly decrease: (color: RGBA, amount?: number) => RGBA readonly text: { - readonly default: RGBA - readonly subdued: RGBA + readonly base: RGBA + readonly muted: RGBA readonly action: Readonly> readonly formfield: FormfieldColor readonly status: { @@ -40,10 +40,10 @@ export type ResolvedThemeTokens = { readonly permission: RGBA readonly unread: RGBA } - readonly feedback: Readonly> + readonly feedback: Readonly> } readonly background: { - readonly default: RGBA + readonly base: RGBA readonly raised: { readonly base: RGBA readonly high: RGBA @@ -51,10 +51,10 @@ export type ResolvedThemeTokens = { } readonly action: Readonly> readonly formfield: FormfieldColor - readonly feedback: Readonly> + readonly feedback: Readonly> } - readonly border: { readonly default: RGBA } - readonly scrollbar: { readonly default: RGBA } + readonly border: { readonly base: RGBA } + readonly scrollbar: { readonly base: RGBA } readonly diff: { readonly text: { readonly added: RGBA diff --git a/packages/theme/src/tui/v1-migrate.ts b/packages/theme/src/tui/v1-migrate.ts index cea80caef6d..a4039acfd25 100644 --- a/packages/theme/src/tui/v1-migrate.ts +++ b/packages/theme/src/tui/v1-migrate.ts @@ -110,20 +110,20 @@ function migrateMode(theme: Theme, mode: Mode): ThemeDefinition { } as HueDefinition, categorical: uniqueCategorical.length ? uniqueCategorical : DEFAULT_CATEGORICAL, text: { - default: text, - subdued: textMuted, + base: text, + muted: textMuted, action: { primary: { - default: "$text.default", + base: "$text.base", $disabled: textMuted, $focused: selected, $selected: primary, }, - secondary: { default: "$text.subdued", $hovered: "$text.default" }, - destructive: { default: destructive, $disabled: textMuted }, + secondary: { base: "$text.muted", $hovered: "$text.base" }, + destructive: { base: destructive, $disabled: textMuted }, }, formfield: { - default: text, + base: text, $hovered: primary, $focused: primary, $pressed: primary, @@ -137,36 +137,36 @@ function migrateMode(theme: Theme, mode: Mode): ThemeDefinition { unread: "$hue.accent.200", }, feedback: { - error: { default: color("error") }, - warning: { default: color("warning") }, - success: { default: color("success") }, - info: { default: color("info") }, + error: { base: color("error") }, + warning: { base: color("warning") }, + success: { base: color("success") }, + info: { base: color("info") }, }, }, background: { - default: background, + base: background, raised: { base: backgroundPanel, high: backgroundMenu, max: backgroundRaisedMax, }, action: { - primary: { default: "transparent", $hovered: backgroundPanel, $focused: primary, $selected: "transparent" }, - secondary: { default: "transparent" }, - destructive: { default: color("error") }, + primary: { base: "transparent", $hovered: backgroundPanel, $focused: primary, $selected: "transparent" }, + secondary: { base: "transparent" }, + destructive: { base: color("error") }, }, formfield: { - default: "$background.default", + base: "$background.base", }, feedback: { - error: { default: "$background.default" }, - warning: { default: "$background.default" }, - success: { default: "$background.default" }, - info: { default: "$background.default" }, + error: { base: "$background.base" }, + warning: { base: "$background.base" }, + success: { base: "$background.base" }, + info: { base: "$background.base" }, }, }, - border: { default: color("border") }, - scrollbar: { default: color("borderActive") }, + border: { base: color("border") }, + scrollbar: { base: color("borderActive") }, diff: { text: { added: color("diffAdded"), @@ -217,7 +217,7 @@ function migrateMode(theme: Theme, mode: Mode): ThemeDefinition { }, "@dialog": { background: { - default: "$background.raised.base", + base: "$background.raised.base", action: { primary: { $hovered: "$background.raised.high" } }, }, }, diff --git a/packages/tui/src/app.tsx b/packages/tui/src/app.tsx index 7b8123b3efe..98b40cfb9f6 100644 --- a/packages/tui/src/app.tsx +++ b/packages/tui/src/app.tsx @@ -1311,7 +1311,7 @@ function App(props: { pair?: DialogPairCredentials }) { width={dimensions().width} height={dimensions().height} flexDirection="column" - backgroundColor={theme.background.default} + backgroundColor={theme.background.base} onMouseDown={(evt) => { if (copyOnSelectEnabled()) return if (evt.button !== MouseButton.RIGHT) return diff --git a/packages/tui/src/component/devtools-bar.tsx b/packages/tui/src/component/devtools-bar.tsx index f599f6459c0..10af2019d60 100644 --- a/packages/tui/src/component/devtools-bar.tsx +++ b/packages/tui/src/component/devtools-bar.tsx @@ -229,7 +229,7 @@ export function DevToolsBar() { } return ( - + {serverIndicator().icon} @@ -261,8 +261,8 @@ export function DevToolsBar() { panel() === "server" ? theme.text.action.primary.focused : serverIndicator().state === "disconnected" - ? theme.text.feedback.error.default - : theme.text.subdued + ? theme.text.feedback.error.base + : theme.text.muted } > {" "} @@ -286,7 +286,7 @@ export function DevToolsBar() { )} - Server details unavailable + Server details unavailable @@ -297,8 +297,8 @@ export function DevToolsBar() { panel() === "ui" ? theme.text.action.primary.focused : runtime() === "high" - ? theme.text.feedback.error.default - : theme.text.subdued + ? theme.text.feedback.error.base + : theme.text.muted } > {statusIcon(runtime())} @@ -308,8 +308,8 @@ export function DevToolsBar() { panel() === "ui" ? theme.text.action.primary.focused : runtime() === "high" - ? theme.text.feedback.error.default - : theme.text.subdued + ? theme.text.feedback.error.base + : theme.text.muted } > {" "} @@ -339,7 +339,7 @@ export function DevToolsBar() { toggle("theme")}> - Theme + Theme Theme @@ -355,7 +355,7 @@ export function DevToolsBar() { toggle("tools")}> - Tools + Tools Tools @@ -364,20 +364,20 @@ export function DevToolsBar() { {(file) => ( - + {file()} )} {(error) => ( - + {error()} )} - + Render {(group) => ( - + {group.title} {(entry) => } @@ -433,10 +433,10 @@ export function DevToolsBar() { dialog.replace(() => ) }} > - Experiments + Experiments - + ) @@ -502,7 +502,7 @@ function PanelBox(props: ParentProps) { function PanelTitle(props: ParentProps) { const theme = useTheme() return ( - + {props.children} ) @@ -512,9 +512,9 @@ function Row(props: { label: string; value: string }) { const theme = useTheme() return ( - {props.label} + {props.label} - {props.value} + {props.value} ) } @@ -534,7 +534,7 @@ function Action(props: ParentProps<{ onClick: () => void; disabled?: boolean; ho if (!props.disabled) props.onClick() }} > - {props.children} + {props.children} ) } @@ -554,13 +554,13 @@ function ProcessStat(props: { label: string; values: readonly number[]; unit: st return ( - {props.label} + {props.label} - {brailleGraph(props.values)} + {brailleGraph(props.values)} - {value()} + {value()} ) diff --git a/packages/tui/src/component/dialog-debug.tsx b/packages/tui/src/component/dialog-debug.tsx index 4419578a5ee..92b18e905de 100644 --- a/packages/tui/src/component/dialog-debug.tsx +++ b/packages/tui/src/component/dialog-debug.tsx @@ -55,10 +55,10 @@ export function DialogDebug() { return ( - + Debug - dialog.clear()}> + dialog.clear()}> esc @@ -68,10 +68,10 @@ export function DialogDebug() { {(entry) => ( - + {entry.label.padEnd(10)} - + {entry.value} @@ -79,12 +79,12 @@ export function DialogDebug() { - Share this when reporting an issue. + Share this when reporting an issue. - + {copied() ? "✓ copied" : "copy"}{" "} - enter + enter diff --git a/packages/tui/src/component/dialog-error-details.tsx b/packages/tui/src/component/dialog-error-details.tsx index 2930bb1b651..c4ced3b4ffd 100644 --- a/packages/tui/src/component/dialog-error-details.tsx +++ b/packages/tui/src/component/dialog-error-details.tsx @@ -76,7 +76,7 @@ export function DialogErrorDetails(props: { {props.title} - + esc @@ -93,7 +93,7 @@ export function DialogErrorDetails(props: { )} @@ -106,28 +106,28 @@ export function DialogErrorDetails(props: { scrollbarOptions={{ visible: false }} scrollAcceleration={getScrollAcceleration(config)} > - + {props.error} - Reference: {props.diagnosticRef} + Reference: {props.diagnosticRef} - + i - investigate + investigate - + {copied() ? "✓ copied" : "c"} - {copied() ? "" : " copy details"} + {copied() ? "" : " copy details"} - ↑/↓ scroll + ↑/↓ scroll ) diff --git a/packages/tui/src/component/dialog-experiments.tsx b/packages/tui/src/component/dialog-experiments.tsx index 8938ced5bc9..d28f1876911 100644 --- a/packages/tui/src/component/dialog-experiments.tsx +++ b/packages/tui/src/component/dialog-experiments.tsx @@ -57,7 +57,7 @@ export function DialogExperiments() { onSelect={(option) => void change(option.value)} emptyView={ - No experiments available + No experiments available } footerHints={experiments.length > 0 ? [{ title: "←/→", label: "change" }] : []} diff --git a/packages/tui/src/component/dialog-image-preview.tsx b/packages/tui/src/component/dialog-image-preview.tsx index 3d060e324db..060663210f9 100644 --- a/packages/tui/src/component/dialog-image-preview.tsx +++ b/packages/tui/src/component/dialog-image-preview.tsx @@ -39,10 +39,10 @@ export function DialogImagePreview(props: { images: readonly ImagePreviewItem[]; return ( - + Image {index() + 1} of {props.images.length} - dialog.clear()}> + dialog.clear()}> esc @@ -56,13 +56,13 @@ export function DialogImagePreview(props: { images: readonly ImagePreviewItem[]; onError={() => setFailed(true)} /> - move(-1)}> + move(-1)}> {props.images.length > 1 ? "← previous" : ""} - + {failed() ? "No preview" : (current().mention?.text ?? `Image ${index() + 1}`)} - move(1)}> + move(1)}> {props.images.length > 1 ? "next →" : ""} diff --git a/packages/tui/src/component/dialog-integration.tsx b/packages/tui/src/component/dialog-integration.tsx index b89852125cf..c15187d109c 100644 --- a/packages/tui/src/component/dialog-integration.tsx +++ b/packages/tui/src/component/dialog-integration.tsx @@ -114,7 +114,7 @@ export function DialogIntegration( disabled: methods.length === 0 && credentials.length === 0, gutter: integration.connections.length > 0 - ? () => ✓ + ? () => ✓ : undefined, onSelect: () => { if (credentials.length) return manageConnections(integration, methods, location, dialog, props.onConnected) @@ -130,12 +130,12 @@ export function DialogIntegration( options={options()} emptyView={ - No integrations available + No integrations available } noMatchView={ - No integrations found + No integrations found } /> @@ -433,10 +433,10 @@ function CommandView(props: { title: string; output: string; message: string }) return ( - + {props.title} - dialog.clear()}> + dialog.clear()}> esc close @@ -447,10 +447,10 @@ function CommandView(props: { title: string; output: string; message: string }) paddingTop={1} paddingBottom={1} > - {props.output.trim()} + {props.output.trim()} - {props.message} + {props.message} ) @@ -487,7 +487,7 @@ function KeyMethod(props: { .catch((cause) => setError(message(cause))) }} description={() => ( - {(value) => {value()}} + {(value) => {value()}} )} /> ) @@ -706,9 +706,9 @@ function OAuthCode(props: { }} description={() => ( - {props.attempt.instructions} + {props.attempt.instructions} - {(value) => {value()}} + {(value) => {value()}} )} /> @@ -728,10 +728,10 @@ function OAuthView(props: { return ( - + {props.title} - dialog.clear()}> + dialog.clear()}> esc @@ -740,21 +740,21 @@ function OAuthView(props: { - {(instructions) => {instructions()}} + {(instructions) => {instructions()}} )} - {props.message} + {props.message} - - o open + + o open - - c copy + + c copy @@ -872,9 +872,9 @@ function textAnswer( description={() => ( - {(description) => {description()}} + {(description) => {description()}} - {(value) => {value()}} + {(value) => {value()}} )} /> diff --git a/packages/tui/src/component/dialog-mcp.tsx b/packages/tui/src/component/dialog-mcp.tsx index 80915c86b34..9d9f8884edc 100644 --- a/packages/tui/src/component/dialog-mcp.tsx +++ b/packages/tui/src/component/dialog-mcp.tsx @@ -56,10 +56,10 @@ export function DialogMcp(props: { initialServer?: string; details?: boolean } = const [loading, setLoading] = createSignal>(new Set()) const statusColor = (status: McpServer["status"]) => { - if (status.status === "connected") return theme.text.feedback.success.default - if (status.status === "failed") return theme.text.feedback.error.default - if (status.status === "needs_auth") return theme.text.feedback.warning.default - return theme.text.subdued + if (status.status === "connected") return theme.text.feedback.success.base + if (status.status === "failed") return theme.text.feedback.error.base + if (status.status === "needs_auth") return theme.text.feedback.warning.base + return theme.text.muted } createEffect(() => { @@ -76,7 +76,7 @@ export function DialogMcp(props: { initialServer?: string; details?: boolean } = value: server.name, title: server.name, footer: , - footerColor: pending ? theme.text.subdued : statusColor(server.status), + footerColor: pending ? theme.text.muted : statusColor(server.status), } }) }) @@ -155,7 +155,7 @@ export function DialogMcp(props: { initialServer?: string; details?: boolean } = ]} footer={ - enter to view error + enter to view error } /> diff --git a/packages/tui/src/component/dialog-open.tsx b/packages/tui/src/component/dialog-open.tsx index 2d85ce040bf..0c842375bf9 100644 --- a/packages/tui/src/component/dialog-open.tsx +++ b/packages/tui/src/component/dialog-open.tsx @@ -336,7 +336,7 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions: emptyView={ - No recent sessions or projects + No recent sessions or projects } @@ -350,13 +350,13 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions: > - Loading worktrees… + Loading worktrees… - Refreshing sessions and projects… + Refreshing sessions and projects… - + Could not refresh{" "} {recent() === false ? (projects() === false ? "sessions and projects" : "sessions") : "projects"}. @@ -402,7 +402,7 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions: footerHints={[...(projectID() ? [{ title: "new worktree", label: "ctrl+n" }] : [])]} noMatchView={ - + {projectID() ? worktrees.loading ? "Loading worktrees…" @@ -434,7 +434,7 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions: size="large" title={`${projectName(data.project.get(projectID()!)) ?? "Project"} / New worktree`} placeholder="Worktree name (optional)" - description={() => Leave blank for a random name.} + description={() => Leave blank for a random name.} busy={creating()} busyText="Creating worktree…" onCancel={cancelCreation} diff --git a/packages/tui/src/component/dialog-pair.tsx b/packages/tui/src/component/dialog-pair.tsx index bc6ea06775a..d6e11437056 100644 --- a/packages/tui/src/component/dialog-pair.tsx +++ b/packages/tui/src/component/dialog-pair.tsx @@ -61,33 +61,33 @@ export function DialogPair(props: { credentials?: DialogPairCredentials }) { - This device + This device {(url) => ( - + {url()} )} - URLs + URLs {(url) => ( - + {url} )} - Username - {value.username} + Username + {value.username} - Password + Password setPasswordHover(true)} onMouseOut={() => setPasswordHover(false)} @@ -97,7 +97,7 @@ export function DialogPair(props: { credentials?: DialogPairCredentials }) { ["localhost", "127.0.0.1", "[::1]"].includes(new URL(url).hostname))}> - + Run `opencode service set hostname 0.0.0.0` to access the service remotely. @@ -108,7 +108,7 @@ export function DialogPair(props: { credentials?: DialogPairCredentials }) { flexShrink={0} alignItems={horizontal() ? "flex-end" : "center"} > - {renderUnicodeCompact(JSON.stringify(value), { border: 1 })} + {renderUnicodeCompact(JSON.stringify(value), { border: 1 })} ) @@ -117,17 +117,17 @@ export function DialogPair(props: { credentials?: DialogPairCredentials }) { return ( - + Pair - dialog.clear()}> + dialog.clear()}> esc Loading server information…}> + Loading server information…}> = 36} fallback={ @@ -146,11 +146,11 @@ export function DialogPair(props: { credentials?: DialogPairCredentials }) { > {(error) => ( - + Could not load server information - {errorMessage(error())} - Close and reopen Pair to try again. + {errorMessage(error())} + Close and reopen Pair to try again. )} diff --git a/packages/tui/src/component/dialog-session-list.tsx b/packages/tui/src/component/dialog-session-list.tsx index 0c0183476ff..c730eec6cdf 100644 --- a/packages/tui/src/component/dialog-session-list.tsx +++ b/packages/tui/src/component/dialog-session-list.tsx @@ -197,11 +197,11 @@ export function DialogSessionList() { title="Sessions" titleView={ - + Sessions - for {currentProjectName()} + for {currentProjectName()} } @@ -226,14 +226,14 @@ export function DialogSessionList() { ]} emptyView={ - + {searchState().message} } noMatchView={ - + {searchState().message} diff --git a/packages/tui/src/component/dialog-shell-output.tsx b/packages/tui/src/component/dialog-shell-output.tsx index 07f19c12944..8c9f5c15916 100644 --- a/packages/tui/src/component/dialog-shell-output.tsx +++ b/packages/tui/src/component/dialog-shell-output.tsx @@ -102,19 +102,19 @@ export function DialogShellOutput(props: { shell: ShellInfo; location: LocationR return ( - + Shell output - {status()} - dialog.clear()}> + {status()} + dialog.clear()}> esc - + {props.shell.command} - Earlier output omitted · showing recent output + Earlier output omitted · showing recent output - + {text() || (output() === undefined ? "Loading output…" @@ -132,12 +132,12 @@ export function DialogShellOutput(props: { shell: ShellInfo; location: LocationR - {error()} + {error()} - ↑/↓ scroll - end follow - esc back + ↑/↓ scroll + end follow + esc back ) diff --git a/packages/tui/src/component/dialog-skill.tsx b/packages/tui/src/component/dialog-skill.tsx index 7347fc45f4e..e6cdcbb505f 100644 --- a/packages/tui/src/component/dialog-skill.tsx +++ b/packages/tui/src/component/dialog-skill.tsx @@ -63,29 +63,29 @@ export function DialogSkill(props: DialogSkillProps) { - No skills available + No skills available } > - + Could not load skills - {errorMessage(loadError())} - Close and reopen Skills to try again. + {errorMessage(loadError())} + Close and reopen Skills to try again. - Loading skills… + Loading skills… } noMatchView={ - No skills found + No skills found } /> diff --git a/packages/tui/src/component/dialog-status.tsx b/packages/tui/src/component/dialog-status.tsx index 3fed887c9f9..3c06c47aba3 100644 --- a/packages/tui/src/component/dialog-status.tsx +++ b/packages/tui/src/component/dialog-status.tsx @@ -11,24 +11,24 @@ export function DialogStatus() { const mcp = createMemo(() => data.location.mcp.server.list() ?? []) const color = (status: string) => { - if (status === "connected") return theme.text.feedback.success.default - if (status === "failed") return theme.text.feedback.error.default - if (status === "needs_auth") return theme.text.feedback.warning.default - return theme.text.subdued + if (status === "connected") return theme.text.feedback.success.base + if (status === "failed") return theme.text.feedback.error.base + if (status === "needs_auth") return theme.text.feedback.warning.base + return theme.text.muted } return ( - + Status - dialog.clear()}> + dialog.clear()}> esc - 0} fallback={No MCP servers}> + 0} fallback={No MCP servers}> - + {mcp().length} MCP server{mcp().length === 1 ? "" : "s"} @@ -37,9 +37,9 @@ export function DialogStatus() { • - + {item.name}{" "} - + Connected {(val) => val().error} diff --git a/packages/tui/src/component/dialog-update.tsx b/packages/tui/src/component/dialog-update.tsx index aee62c5e3a4..fd388460275 100644 --- a/packages/tui/src/component/dialog-update.tsx +++ b/packages/tui/src/component/dialog-update.tsx @@ -88,14 +88,14 @@ export function DialogUpdate(props: { return ( - + {state().type === "installing" ? "Updating OpenCode" : state().type === "available" || state().type === "failed" ? "Update available" : "Update"} - dialog.clear()}> + dialog.clear()}> esc @@ -104,33 +104,33 @@ export function DialogUpdate(props: { {(current) => ( - Checking for updates… + Checking for updates… - + An update is available. After installing, you'll be prompted to restart OpenCode. - + {current.type === "installing" ? `Installing OpenCode ${current.version}…` : ""} - + Update successful! A restart is required. Any active sessions will be resumed automatically. - OpenCode is already up to date. + OpenCode is already up to date. - + {current.type === "unavailable" ? current.message : ""} - + {current.type === "failed" || current.type === "check-failed" ? current.message : ""} @@ -148,7 +148,7 @@ export function DialogUpdate(props: { backgroundColor={active() === index() ? theme.background.action.primary.focused : undefined} onMouseUp={() => void button.run()} > - + {button.label} diff --git a/packages/tui/src/component/dialog-workspace-file-changes.tsx b/packages/tui/src/component/dialog-workspace-file-changes.tsx index 6ed7d5d276b..99135d07538 100644 --- a/packages/tui/src/component/dialog-workspace-file-changes.tsx +++ b/packages/tui/src/component/dialog-workspace-file-changes.tsx @@ -72,15 +72,15 @@ export function DialogWorkspaceFileChanges(props: { return ( - + {props.title ?? "File Changes Found"} - dialog.clear()}> + dialog.clear()}> esc - + {props.message ?? "Do you want to move these changes with the session?"} @@ -95,9 +95,9 @@ export function DialogWorkspaceFileChanges(props: { - {statusLabel(item.status)} + {statusLabel(item.status)} - + @@ -125,7 +125,7 @@ export function DialogWorkspaceFileChanges(props: { dialog.clear() }} > - {item} + {item} )} diff --git a/packages/tui/src/component/dialog-workspaces.tsx b/packages/tui/src/component/dialog-workspaces.tsx index 5cfcd10694d..2619d2f6dd4 100644 --- a/packages/tui/src/component/dialog-workspaces.tsx +++ b/packages/tui/src/component/dialog-workspaces.tsx @@ -175,18 +175,18 @@ export function DialogWorkspaces(props: DialogWorkspacesProps) { return { title, titleView: isRemoving ? ( - Deleting {item.location} + Deleting {item.location} ) : deleting ? ( - + Press {shortcuts.get("dialog.move_session.delete")} again to confirm ) : suffix ? ( <> {visible.slice(0, split)} - {visible.slice(split)} + {visible.slice(split)} ) : undefined, - bg: deleting ? theme.background.action.destructive.default : undefined, + bg: deleting ? theme.background.action.destructive.base : undefined, value: { type: "directory", directory: item.location, @@ -327,7 +327,7 @@ export function DialogWorkspaces(props: DialogWorkspacesProps) { title="Worktrees" titleView={ - + Worktrees @@ -341,25 +341,25 @@ export function DialogWorkspaces(props: DialogWorkspacesProps) { emptyView={ showError() ? ( - + Could not load worktrees - {errorMessage(loadError())} - Close and reopen Worktrees to try again. + {errorMessage(loadError())} + Close and reopen Worktrees to try again. ) : directories.loading || loadedProject.loading ? ( - Loading worktrees… + Loading worktrees… ) : ( - No worktrees available + No worktrees available ) } noMatchView={ - No worktrees found + No worktrees found } locked={showError() || directories.loading || loadedProject.loading || Boolean(removing())} diff --git a/packages/tui/src/component/dialog-worktree-name.tsx b/packages/tui/src/component/dialog-worktree-name.tsx index 7be47324084..d1a0340655f 100644 --- a/packages/tui/src/component/dialog-worktree-name.tsx +++ b/packages/tui/src/component/dialog-worktree-name.tsx @@ -49,10 +49,10 @@ export function DialogWorktreeName(props: { onConfirm: (name: string) => void }) return ( - + Name worktree - dialog.clear()}> + dialog.clear()}> esc @@ -64,17 +64,17 @@ export function DialogWorktreeName(props: { onConfirm: (name: string) => void }) }} onSubmit={confirm} placeholder="Worktree name" - placeholderColor={theme.text.subdued} - textColor={theme.text.formfield.default} - focusedTextColor={theme.text.formfield.default} - cursorColor={theme.text.formfield.default} + placeholderColor={theme.text.muted} + textColor={theme.text.formfield.base} + focusedTextColor={theme.text.formfield.base} + cursorColor={theme.text.formfield.base} /> - - enter submit + + enter submit - - {shortcuts.get("dialog.worktree.generate")} generate one + + {shortcuts.get("dialog.worktree.generate")} generate one diff --git a/packages/tui/src/component/logo.tsx b/packages/tui/src/component/logo.tsx index 32b5e96b1f1..2c3abc3cb0e 100644 --- a/packages/tui/src/component/logo.tsx +++ b/packages/tui/src/component/logo.tsx @@ -10,7 +10,7 @@ export function Logo() { const dimensions = useTerminalDimensions() const renderLine = (line: string, fg: RGBA, bold: boolean): JSX.Element[] => { - const shadow = tint(theme.background.default, fg, 0.25) + const shadow = tint(theme.background.base, fg, 0.25) const attrs = bold ? TextAttributes.BOLD : undefined return Array.from(line).map((char) => { if (char === "_") { @@ -53,23 +53,23 @@ export function Logo() { {dimensions().height < 12 ? null : dimensions().width < 22 ? ( - {(line) => {renderLine(line, theme.text.default, true)}} + {(line) => {renderLine(line, theme.text.base, true)}} ) : dimensions().width < 44 ? ( <> - {(line) => {renderLine(line, theme.text.subdued, false)}} + {(line) => {renderLine(line, theme.text.muted, false)}} - {(line) => {renderLine(line, theme.text.default, true)}} + {(line) => {renderLine(line, theme.text.base, true)}} ) : ( {(line, index) => ( - {renderLine(line, theme.text.subdued, false)} - {renderLine(logo.right[index()], theme.text.default, true)} + {renderLine(line, theme.text.muted, false)} + {renderLine(logo.right[index()], theme.text.base, true)} )} diff --git a/packages/tui/src/component/migration-overlay.tsx b/packages/tui/src/component/migration-overlay.tsx index adfd390c95f..92e35aa6382 100644 --- a/packages/tui/src/component/migration-overlay.tsx +++ b/packages/tui/src/component/migration-overlay.tsx @@ -54,14 +54,14 @@ export function MigrationOverlay() { flexDirection="row" backgroundColor={theme.background.raised.high} border={["left"]} - borderColor={theme.text.feedback.info.default} + borderColor={theme.text.feedback.info.base} customBorderChars={SplitBorder.customBorderChars} paddingLeft={2} paddingRight={2} paddingTop={1} paddingBottom={1} > - + {value().label} {count(value())} diff --git a/packages/tui/src/component/panel-host.tsx b/packages/tui/src/component/panel-host.tsx index 6c119ca4af0..740bf9b082e 100644 --- a/packages/tui/src/component/panel-host.tsx +++ b/packages/tui/src/component/panel-host.tsx @@ -21,7 +21,7 @@ export function PanelHost(props: { const theme = useTheme() // Side panels sit on a raised surface; fullscreen takes over the base background. const background = () => - panels.presentation() === "panel" ? theme.background.raised.base : theme.background.default + panels.presentation() === "panel" ? theme.background.raised.base : theme.background.base return ( - + Unknown plugin route: {props.id}/{props.name} { @@ -896,7 +896,7 @@ export function Autocomplete(props: { each={options()} fallback={ - {emptyMessage()} + {emptyMessage()} } > @@ -928,7 +928,7 @@ export function Autocomplete(props: { ? theme.text.action.destructive.focused : index === store.selected ? theme.text.action.primary.focused - : theme.text.default + : theme.text.base } flexShrink={0} > @@ -936,7 +936,7 @@ export function Autocomplete(props: { {" " + option().description?.replace(/\s+/g, " ").trim()} diff --git a/packages/tui/src/component/prompt/index.tsx b/packages/tui/src/component/prompt/index.tsx index 44737b668f1..99566e83862 100644 --- a/packages/tui/src/component/prompt/index.tsx +++ b/packages/tui/src/component/prompt/index.tsx @@ -350,7 +350,7 @@ export function Prompt(props: PromptProps) { createEffect(() => { if (!input || input.isDestroyed) return - input.cursorColor = disabled() ? theme.background.raised.base : theme.text.default + input.cursorColor = disabled() ? theme.background.raised.base : theme.text.base if (config.cursor) input.cursorStyle = config.cursor }) @@ -1554,9 +1554,9 @@ export function Prompt(props: PromptProps) { }, ) const highlight = createMemo(() => { - if (muted()) return theme.border.default + if (muted()) return theme.border.base if (store.mode === "shell") return theme.text.action.primary.selected - return promptDisplay().agentColor ?? theme.border.default + return promptDisplay().agentColor ?? theme.border.base }) const agentLabel = createMemo(() => (store.mode === "shell" ? "Shell" : promptDisplay().agentLabel)) const animateMetadata = !revealedPromptMetadata.has(local) @@ -1573,7 +1573,7 @@ export function Prompt(props: PromptProps) { createEffect(() => { if (agentLabel()) revealedPromptMetadata.add(local) }) - const borderHighlight = createMemo(() => tint(theme.border.default, highlight(), agentMetaAlpha())) + const borderHighlight = createMemo(() => tint(theme.border.base, highlight(), agentMetaAlpha())) const footerInput = () => ({ sessionID: props.sessionID, mode: store.mode, @@ -1622,7 +1622,7 @@ export function Prompt(props: PromptProps) { }) const spinnerDef = createMemo(() => { - const color = promptDisplay().agentColor ?? theme.border.default + const color = promptDisplay().agentColor ?? theme.border.base return { frames: createFrames({ color, @@ -1694,7 +1694,7 @@ export function Prompt(props: PromptProps) { when={!failed()} fallback={ - No preview + No preview } > @@ -1726,7 +1726,7 @@ export function Prompt(props: PromptProps) { openImagePreview(visibleImageAttachments().length) }} > - + +{imageAttachments().length - visibleImageAttachments().length} more @@ -1736,9 +1736,9 @@ export function Prompt(props: PromptProps) {