feat(web): advertise whole-queue steering shortcut
This commit is contained in:
@@ -22,6 +22,7 @@ export const zh = {
|
||||
'input.commands': '命令',
|
||||
'input.stop': '停止生成',
|
||||
'input.send': '发送消息',
|
||||
'input.steerQueueShortcut': 'Cmd/Ctrl+Enter 插话发送全部排队消息',
|
||||
'input.accessMode': '访问模式,当前:{name}',
|
||||
'context.aria': '上下文已用 {percent}',
|
||||
'context.used': '上下文已用',
|
||||
@@ -162,6 +163,7 @@ export const en = {
|
||||
'input.commands': 'Commands',
|
||||
'input.stop': 'Stop generating',
|
||||
'input.send': 'Send message',
|
||||
'input.steerQueueShortcut': 'Cmd/Ctrl+Enter steers all queued messages',
|
||||
'input.accessMode': 'Access mode, current: {name}',
|
||||
'context.aria': '{percent} of context used',
|
||||
'context.used': 'of context used',
|
||||
|
||||
@@ -89,6 +89,8 @@ export function InputBar({
|
||||
const disabled = removed || inert || !live
|
||||
const locked = disabled
|
||||
const machineBusy = input?.phase === 'adjudicating' || input?.phase === 'submitting'
|
||||
const canSteerQueue = !locked && !machineBusy && empty && running && subagent === null
|
||||
&& input.queue.some(row => row.placement === 'queued')
|
||||
|
||||
// Scroll the draft scrollport the minimum that brings `caret` into view — the
|
||||
// browser's own behavior for typing, performed for the paths where it does
|
||||
@@ -253,8 +255,7 @@ export function InputBar({
|
||||
// still-pending queued message into the running turn (the dock's per-row
|
||||
// steer button applied to the whole queue). Steering needs the same
|
||||
// window as the per-row button: a running ordinary session.
|
||||
if (accelerated && empty && running && subagent === null
|
||||
&& input.queue.some(row => row.placement === 'queued')) {
|
||||
if (accelerated && canSteerQueue) {
|
||||
keyboard.steerQueue()
|
||||
return
|
||||
}
|
||||
@@ -485,7 +486,9 @@ export function InputBar({
|
||||
data-phase={input?.phase ?? 'inert'}
|
||||
placeholder={placeholder ?? (disabled
|
||||
? t('placeholder.unavailable')
|
||||
: planActive ? t('placeholder.plan') : t('placeholder.default'))}
|
||||
: canSteerQueue
|
||||
? t('input.steerQueueShortcut')
|
||||
: planActive ? t('placeholder.plan') : t('placeholder.default'))}
|
||||
rows={2}
|
||||
onChange={onChange}
|
||||
onKeyDown={onKeyDown}
|
||||
|
||||
Reference in New Issue
Block a user