feat(ui-tui): slash command history/display, CoT fade, live skin switch, fix double reasoning
This commit is contained in:
@@ -840,7 +840,7 @@ export function App({ gw }: { gw: GatewayClient }) {
|
||||
return
|
||||
}
|
||||
|
||||
if (completions.length && input && (key.upArrow || key.downArrow)) {
|
||||
if (completions.length && input && historyIdx === null && (key.upArrow || key.downArrow)) {
|
||||
setCompIdx(i => (key.upArrow ? (i - 1 + completions.length) % completions.length : (i + 1) % completions.length))
|
||||
|
||||
return
|
||||
@@ -1004,6 +1004,13 @@ export function App({ gw }: { gw: GatewayClient }) {
|
||||
|
||||
break
|
||||
|
||||
case 'skin.changed':
|
||||
if (p) {
|
||||
setTheme(fromSkin(p.colors ?? {}, p.branding ?? {}, p.banner_logo ?? '', p.banner_hero ?? ''))
|
||||
}
|
||||
|
||||
break
|
||||
|
||||
case 'session.info':
|
||||
setInfo(p as SessionInfo)
|
||||
|
||||
@@ -1520,6 +1527,15 @@ export function App({ gw }: { gw: GatewayClient }) {
|
||||
|
||||
return true
|
||||
|
||||
case 'skin':
|
||||
if (arg) {
|
||||
rpc('config.set', { key: 'skin', value: arg }).then((r: any) => sys(`skin → ${r.value}`))
|
||||
} else {
|
||||
rpc('config.get', { key: 'skin' }).then((r: any) => sys(`skin: ${r.value || 'default'}`))
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
case 'yolo':
|
||||
rpc('config.set', { key: 'yolo' }).then((r: any) => sys(`yolo ${r.value === '1' ? 'on' : 'off'}`))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user