diff --git a/ui-tui/src/app/slash/commands/core.ts b/ui-tui/src/app/slash/commands/core.ts index a151b2cdc8..dd5a9f58c8 100644 --- a/ui-tui/src/app/slash/commands/core.ts +++ b/ui-tui/src/app/slash/commands/core.ts @@ -1,7 +1,12 @@ import { dailyFortune, randomFortune } from '../../../content/fortunes.js' import { HOTKEYS } from '../../../content/hotkeys.js' import { nextDetailsMode, parseDetailsMode } from '../../../domain/details.js' -import type { ConfigGetValueResponse, ConfigSetResponse, SessionSteerResponse, SessionUndoResponse } from '../../../gatewayTypes.js' +import type { + ConfigGetValueResponse, + ConfigSetResponse, + SessionSteerResponse, + SessionUndoResponse +} from '../../../gatewayTypes.js' import { writeOsc52Clipboard } from '../../../lib/osc52.js' import type { DetailsMode, Msg, PanelSection } from '../../../types.js' import { patchOverlayState } from '../../overlayStore.js' @@ -259,19 +264,27 @@ export const coreCommands: SlashCommand[] = [ // message isn't lost — identical semantics to the gateway handler. if (!ctx.ui.busy || !ctx.sid) { ctx.composer.enqueue(payload) - ctx.transcript.sys(`no active turn — queued for next: "${payload.slice(0, 50)}${payload.length > 50 ? '…' : ''}"`) + ctx.transcript.sys( + `no active turn — queued for next: "${payload.slice(0, 50)}${payload.length > 50 ? '…' : ''}"` + ) + return } - ctx.gateway.rpc('session.steer', { session_id: ctx.sid, text: payload }).then( - ctx.guarded(r => { - if (r?.status === 'queued') { - ctx.transcript.sys(`⏩ steer queued — arrives after next tool call: "${payload.slice(0, 50)}${payload.length > 50 ? '…' : ''}"`) - } else { - ctx.transcript.sys('steer rejected') - } - }) - ).catch(ctx.guardedErr) + ctx.gateway + .rpc('session.steer', { session_id: ctx.sid, text: payload }) + .then( + ctx.guarded(r => { + if (r?.status === 'queued') { + ctx.transcript.sys( + `⏩ steer queued — arrives after next tool call: "${payload.slice(0, 50)}${payload.length > 50 ? '…' : ''}"` + ) + } else { + ctx.transcript.sys('steer rejected') + } + }) + ) + .catch(ctx.guardedErr) } }, diff --git a/ui-tui/src/components/messageLine.tsx b/ui-tui/src/components/messageLine.tsx index 9de6f2aa12..8d77a49e57 100644 --- a/ui-tui/src/components/messageLine.tsx +++ b/ui-tui/src/components/messageLine.tsx @@ -35,7 +35,9 @@ export const MessageLine = memo(function MessageLine({ return ( {hasAnsi(msg.text) ? ( - {msg.text} + + {msg.text} + ) : ( {preview}