remove , using instead

This commit is contained in:
weishu
2026-03-16 18:29:09 +08:00
parent 02c8e12e80
commit 329d28a93c
40 changed files with 384 additions and 285 deletions
@@ -1,7 +1,7 @@
import { getPermissionModeLabel, getPermissionModeTone, isPermissionModeAllowedForFlavor } from '@hapi/protocol'
import type { PermissionModeTone } from '@hapi/protocol'
import { useMemo } from 'react'
import type { AgentState, ModelMode, PermissionMode } from '@/types/api'
import type { AgentState, PermissionMode } from '@/types/api'
import type { ConversationStatus } from '@/realtime/types'
import { getContextBudgetTokens } from '@/chat/modelConfig'
import { useTranslation } from '@/lib/use-translation'
@@ -106,7 +106,7 @@ export function StatusBar(props: {
thinking: boolean
agentState: AgentState | null | undefined
contextSize?: number
modelMode?: ModelMode
model?: string | null
permissionMode?: PermissionMode
agentFlavor?: string | null
voiceStatus?: ConversationStatus
@@ -120,11 +120,11 @@ export function StatusBar(props: {
const contextWarning = useMemo(
() => {
if (props.contextSize === undefined) return null
const maxContextSize = getContextBudgetTokens(props.modelMode)
const maxContextSize = getContextBudgetTokens(props.model, props.agentFlavor)
if (!maxContextSize) return null
return getContextWarning(props.contextSize, maxContextSize, t)
},
[props.contextSize, props.modelMode, t]
[props.contextSize, props.model, props.agentFlavor, t]
)
const permissionMode = props.permissionMode