mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
feat: Implement AskUserQuestionTool for interactive user queries
- Added AskUserQuestionDialog component for handling user questions in CLI. - Integrated AskUserQuestionTool into the core toolset, allowing for dynamic user input during execution. - Enhanced ToolConfirmationMessage to utilize the new AskUserQuestionDialog for 'ask_user_question' type confirmations. - Updated core configuration to register the AskUserQuestionTool. - Implemented validation and execution logic for user questions, including multi-select options. - Added comprehensive tests for AskUserQuestionTool to ensure functionality and validation rules. - Updated tool names and display names to include AskUserQuestion.
This commit is contained in:
parent
12b669d7c6
commit
35b5bc8a1e
11 changed files with 2165 additions and 4 deletions
|
|
@ -26,6 +26,7 @@ export interface TextInputProps {
|
|||
isActive?: boolean; // when false, ignore keypresses
|
||||
validationErrors?: string[];
|
||||
inputWidth?: number;
|
||||
initialCursorOffset?: number;
|
||||
}
|
||||
|
||||
export function TextInput({
|
||||
|
|
@ -37,6 +38,7 @@ export function TextInput({
|
|||
isActive = true,
|
||||
validationErrors = [],
|
||||
inputWidth = 80,
|
||||
initialCursorOffset,
|
||||
}: TextInputProps) {
|
||||
const allowMultiline = height > 1;
|
||||
|
||||
|
|
@ -51,6 +53,7 @@ export function TextInput({
|
|||
|
||||
const buffer = useTextBuffer({
|
||||
initialText: value || '',
|
||||
initialCursorOffset,
|
||||
viewport: { height, width: inputWidth },
|
||||
isValidPath: () => false,
|
||||
onChange: stableOnChange,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue