Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/tui/src/mini/footer.prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import type {
RunPrompt,
RunPromptPart,
RunReference,
RunTuiConfig,
} from "./types"

const AUTOCOMPLETE_ROWS = FOOTER_MENU_ROWS
Expand Down Expand Up @@ -176,6 +177,7 @@ export function selectedCommand(text: string, command: RunPrompt["command"]) {
export function RunPromptBody(props: {
theme: () => RunFooterTheme
background: () => ColorInput
cursorStyle: RunTuiConfig["cursor"]
placeholder: () => StyledText | string
onSubmit: () => void
onKeyDown: (event: KeyEvent) => void
Expand Down Expand Up @@ -239,6 +241,7 @@ export function RunPromptBody(props: {
backgroundColor={props.background()}
focusedBackgroundColor={props.background()}
cursorColor={props.theme().text}
cursorStyle={props.cursorStyle}
onSubmit={props.onSubmit}
onKeyDown={props.onKeyDown}
onPaste={() => {
Expand Down
1 change: 1 addition & 0 deletions packages/tui/src/mini/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export class RunFooter implements FooterApi {
variants: footer.variants,
currentVariant: footer.currentVariant,
theme: footer.theme,
tuiConfig: options.tuiConfig,
mono: options.mono,
miniSettings: footer.miniSettings,
history: footer.history,
Expand Down
3 changes: 3 additions & 0 deletions packages/tui/src/mini/footer.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import type {
RunPrompt,
RunProvider,
RunReference,
RunTuiConfig,
} from "./types"
import type { RunTheme } from "./theme"

Expand Down Expand Up @@ -92,6 +93,7 @@ type RunFooterViewProps = {
subagent?: () => FooterSubagentState
queuedPrompts?: () => FooterQueuedPrompt[]
theme: () => RunTheme
tuiConfig: RunTuiConfig
mono: boolean
miniSettings: () => MiniSettings
history?: () => RunPrompt[]
Expand Down Expand Up @@ -733,6 +735,7 @@ export function RunFooterView(props: RunFooterViewProps) {
<Match when={active().type === "prompt" && route().type === "composer"}>
<RunPromptBody
theme={theme}
cursorStyle={props.tuiConfig.cursor}
background={() => runTheme().background}
placeholder={composer.placeholder}
onSubmit={composer.onSubmit}
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/src/mini/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export type FormCancel = {
location?: LocationRef
}

export type RunTuiConfig = Pick<Config.Resolved, "keybinds" | "leader" | "theme" | "mini" | "session">
export type RunTuiConfig = Pick<Config.Resolved, "keybinds" | "leader" | "theme" | "mini" | "session" | "cursor">

export type MiniSettings = {
thinking: "show" | "hide"
Expand Down
1 change: 1 addition & 0 deletions packages/tui/test/mini/footer-keymap.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ async function renderSubagent(interrupt: "ctrl+i" | "none") {
view={view}
subagent={subagents}
theme={() => RUN_THEME_FALLBACK}
tuiConfig={config}
miniSettings={() => ({
thinking: "hide",
shell_output: "hide",
Expand Down
2 changes: 2 additions & 0 deletions packages/tui/test/mini/footer.view.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ async function renderFooter(
subagent={subagents}
queuedPrompts={() => input.queuedPrompts ?? []}
theme={input.theme ?? (() => RUN_THEME_FALLBACK)}
tuiConfig={config}
mono={input.mono ?? false}
miniSettings={miniSettings}
onSubmit={input.onSubmit ?? (() => true)}
Expand Down Expand Up @@ -1454,6 +1455,7 @@ test("direct footer shows authoritative queued work while running", async () =>
},
]}
theme={() => RUN_THEME_FALLBACK}
tuiConfig={tuiConfig}
miniSettings={() => ({
thinking: "hide",
shell_output: "hide",
Expand Down
2 changes: 2 additions & 0 deletions packages/tui/test/mini/runtime.boot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ describe("run runtime boot", () => {
createTuiResolvedConfig({
theme: { mode: "light" },
leader: { timeout: 450 },
cursor: { style: "underline", blinking: false },
}),
)

expect(result.theme).toEqual({ mode: "light" })
expect(result.leader.timeout).toBe(450)
expect(result.cursor).toEqual({ style: "underline", blinking: false })
expect(resolveMiniSettings(result)).toEqual({
thinking: "hide",
shell_output: "hide",
Expand Down
Loading