mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
feat(cli): add agent composer UI and refactor text input handling
- Extract shared BaseTextInput component with readline keyboard handling - Add AgentComposer and AgentFooter components for agent interaction - Add useAgentStreamingState hook for managing agent streaming state - Refactor InputPrompt to use BaseTextInput with agent tab bar focus support - Move calculatePromptWidths to shared layoutUtils - Disable auto-accept indicator on agent tabs (agents handle their own) This enables a dedicated input experience for agent tabs with proper focus management and keyboard navigation between main input and agent tabs. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
eaef9efe90
commit
89f8751233
19 changed files with 1273 additions and 337 deletions
|
|
@ -676,16 +676,17 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
// Track whether suggestions are visible for Tab key handling
|
||||
const [hasSuggestionsVisible, setHasSuggestionsVisible] = useState(false);
|
||||
|
||||
// Auto-accept indicator
|
||||
const agentViewState = useAgentViewState();
|
||||
|
||||
// Auto-accept indicator — disabled on agent tabs (agents handle their own)
|
||||
const showAutoAcceptIndicator = useAutoAcceptIndicator({
|
||||
config,
|
||||
addItem: historyManager.addItem,
|
||||
onApprovalModeChange: handleApprovalModeChange,
|
||||
shouldBlockTab: () => hasSuggestionsVisible,
|
||||
disabled: agentViewState.activeView !== 'main',
|
||||
});
|
||||
|
||||
const agentViewState = useAgentViewState();
|
||||
|
||||
const { messageQueue, addMessage, clearQueue, getQueuedMessagesText } =
|
||||
useMessageQueue({
|
||||
isConfigInitialized,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue