chore(ui-tui): apply npm run fix formatting pass

Run ui-tui lint autofix + prettier and commit the resulting formatting-only changes for the keybinding/model parity branch.
This commit is contained in:
Brooklyn Nicholson
2026-04-27 12:25:27 -05:00
parent 4909b94f99
commit 17029a64e8
5 changed files with 7 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createSlashHandler } from '../app/createSlashHandler.js'
import { TUI_SESSION_MODEL_FLAG } from '../domain/slash.js'
import { getOverlayState, resetOverlayState } from '../app/overlayStore.js'
import { getUiState, patchUiState, resetUiState } from '../app/uiStore.js'
import { TUI_SESSION_MODEL_FLAG } from '../domain/slash.js'
describe('createSlashHandler', () => {
beforeEach(() => {
@@ -55,9 +55,7 @@ describe('createSlashHandler', () => {
})
expect(
createSlashHandler(ctx)(
`/model anthropic/claude-sonnet-4.6 --provider openrouter ${TUI_SESSION_MODEL_FLAG}`
)
createSlashHandler(ctx)(`/model anthropic/claude-sonnet-4.6 --provider openrouter ${TUI_SESSION_MODEL_FLAG}`)
).toBe(true)
expect(ctx.gateway.rpc).toHaveBeenCalledWith('config.set', {
key: 'model',

View File

@@ -6,8 +6,8 @@ import type {
ConfigGetValueResponse,
ConfigSetResponse,
SessionSaveResponse,
SessionTitleResponse,
SessionSteerResponse,
SessionTitleResponse,
SessionUndoResponse
} from '../../../gatewayTypes.js'
import { writeOsc52Clipboard } from '../../../lib/osc52.js'

View File

@@ -1,4 +1,5 @@
import { attachedImageNotice, introMsg, toTranscriptMessages } from '../../../domain/messages.js'
import { TUI_SESSION_MODEL_FLAG } from '../../../domain/slash.js'
import type {
BackgroundStartResponse,
ConfigGetValueResponse,
@@ -10,7 +11,6 @@ import type {
VoiceToggleResponse
} from '../../../gatewayTypes.js'
import { fmtK } from '../../../lib/text.js'
import { TUI_SESSION_MODEL_FLAG } from '../../../domain/slash.js'
import type { PanelSection } from '../../../types.js'
import { patchOverlayState } from '../../overlayStore.js'
import { patchUiState } from '../../uiStore.js'
@@ -19,8 +19,7 @@ import type { SlashCommand } from '../types.js'
const TUI_SESSION_MODEL_RE = new RegExp(`(?:^|\\s)${TUI_SESSION_MODEL_FLAG}(?:\\s|$)`)
const TUI_SESSION_STRIP_RE = new RegExp(`\\s*${TUI_SESSION_MODEL_FLAG}\\b\\s*`, 'g')
const stripTuiSessionFlag = (trimmed: string) =>
trimmed.replace(TUI_SESSION_STRIP_RE, ' ').replace(/\s+/g, ' ').trim()
const stripTuiSessionFlag = (trimmed: string) => trimmed.replace(TUI_SESSION_STRIP_RE, ' ').replace(/\s+/g, ' ').trim()
const modelValueForConfigSet = (arg: string) => {
const trimmed = arg.trim()

View File

@@ -380,6 +380,7 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult {
if (isAction(key, ch, 'l')) {
clearSelection()
return patchUiState(state => ({ ...state }))
}

View File

@@ -112,9 +112,7 @@ export function ModelPicker({ gw, onCancel, onSelect, sessionId, t }: ModelPicke
const model = models[modelIdx]
if (provider && model) {
onSelect(
`${model} --provider ${provider.slug}${persistGlobal ? ' --global' : ` ${TUI_SESSION_MODEL_FLAG}`}`
)
onSelect(`${model} --provider ${provider.slug}${persistGlobal ? ' --global' : ` ${TUI_SESSION_MODEL_FLAG}`}`)
} else {
setStage('provider')
}