feat: Add online status display and context usage tracking to ChatInput

- Display connection status indicators (online, offline, thinking, permission required) in ChatInput with dynamic vibing messages
- Add context size percentage display showing remaining context availability
- Track latest usage data in reducer with inputTokens, outputTokens, cache metrics, and contextSize
- Calculate contextSize from message usage data and expose via latestUsage in reduceChatBlocks
- Pass thinking, agentState, and contextSize props to ChatInput component
- Remove redundant status indicators from SessionHeader (moved to ChatInput for unified display)
This commit is contained in:
weishu
2025-12-17 09:35:45 +08:00
parent ec3a849cbd
commit 031116bfce
4 changed files with 163 additions and 21 deletions
+3
View File
@@ -192,6 +192,9 @@ export function SessionChat(props: {
permissionMode={props.session.permissionMode}
modelMode={props.session.modelMode}
active={props.session.active}
thinking={props.session.thinking}
agentState={props.session.agentState}
contextSize={reduced.latestUsage?.contextSize}
onPermissionModeChange={handlePermissionModeChange}
onModelModeChange={handleModelModeChange}
onAbort={handleAbort}