Implementation:0xranx OpenContext AgentInputBar
| Knowledge Sources | |
|---|---|
| Domains | UI, Agent_Chat, React |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
Agent chat input bar component that combines a textarea, intent selector, model selector, and send/stop button for the desktop AI agent interface.
Description
The AgentInputBar component in src/ui/src/components/agent/ renders the input area for the agent chat sidebar. It includes an auto-resizing textarea with composition event handling for IME, an IntentSelector dropdown for quick actions, a ModelSelector for per-session model selection (shown only for agent sessions), and a send/stop toggle button. All behavior is controlled via props from the parent AgentSidebar.
Usage
Import this component in AgentSidebar to render the chat input area.
Code Reference
Source Location
- Repository: 0xranx_OpenContext
- File: src/ui/src/components/agent/AgentInputBar.jsx
- Lines: 1-104
Signature
export function AgentInputBar({
inputRef, inputValue, setInputValue, inputPlaceholder,
isInputReady, isGenerating, isComposing, setIsComposing,
setIsInputFocused, activeSession, handleKeyDown, handleStop,
handleSend, activeIntent, intentLabel, IntentIcon,
showIntentMenu, setShowIntentMenu, handleQuickAction,
intentMenuRef, t, activeModelOptions, handleSessionModelChange,
activeModelPlaceholder, isAgentSession, showAuthGate, quickActions
})
Import
import { AgentInputBar } from './components/agent/AgentInputBar';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| inputValue | string | Yes | Current text input |
| isGenerating | boolean | Yes | Whether AI is generating |
| activeSession | object | Yes | Active agent session |
| activeModelOptions | Array | No | Model dropdown options |
| quickActions | Array | No | Intent quick actions |
Usage Examples
Basic Usage
<AgentInputBar
inputRef={inputRef}
inputValue={input}
setInputValue={setInput}
isGenerating={isGenerating}
handleSend={handleSend}
handleStop={handleStop}
activeSession={session}
t={t}
isAgentSession={true}
activeModelOptions={modelOptions}
handleSessionModelChange={onModelChange}
/>