File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ vi.mock('../../utils', async () => ({
9494 } ,
9595} ) ) ;
9696
97- vi . mock ( './Input ' , ( ) => ( {
98- Input : ( props : {
97+ vi . mock ( './ChatInput ' , ( ) => ( {
98+ ChatInput : ( props : {
9999 history ?: string [ ] ;
100100 onSubmit ?: ( value : string ) => void ;
101101 onInterrupt ?: ( ) => void ;
Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ import { Messages } from '../Messages';
99import { TURN_ABORTED_MESSAGE } from '../Messages/constants' ;
1010import { PlanApproval } from '../PlanApproval' ;
1111import { ToolApproval } from '../ToolApproval' ;
12+ import { ChatInput } from './ChatInput' ;
1213import {
1314 ACTION_NOT_PERFORMED ,
1415 INTERRUPT_REASON ,
1516 PLAN_CHECKLIST_REMINDER ,
1617 PLAN_EXECUTION_REMINDER ,
1718} from './constants' ;
18- import { Input } from './Input' ;
1919import { hasExecutablePlan } from './plan' ;
2020
2121interface Props {
@@ -592,7 +592,7 @@ export function Chat({
592592
593593 { ! pendingPlan && ! pendingToolCall && (
594594 < Box marginTop = { 1 } >
595- < Input
595+ < ChatInput
596596 history = { history }
597597 isDisabled = { isLoading }
598598 onInterrupt = { handleInterrupt }
Original file line number Diff line number Diff line change @@ -214,11 +214,11 @@ vi.mock('./FileSuggestions', () => ({
214214 } ,
215215} ) ) ;
216216
217- import { Input } from './Input ' ;
217+ import { ChatInput } from './ChatInput ' ;
218218
219- describe ( 'Input ' , ( ) => {
220- function renderInput ( props : Partial < ComponentProps < typeof Input > > = { } ) {
221- return render ( < Input history = { [ ] } onSubmit = { vi . fn ( ) } { ...props } /> ) ;
219+ describe ( 'ChatInput ' , ( ) => {
220+ function renderInput ( props : Partial < ComponentProps < typeof ChatInput > > = { } ) {
221+ return render ( < ChatInput history = { [ ] } onSubmit = { vi . fn ( ) } { ...props } /> ) ;
222222 }
223223
224224 beforeEach ( ( ) => {
@@ -628,7 +628,7 @@ describe('Input', () => {
628628 stdin . write ( KEY . ENTER ) ;
629629 await time . tick ( ) ;
630630
631- rerender ( < Input history = { [ ] } onSubmit = { onSubmit } /> ) ;
631+ rerender ( < ChatInput history = { [ ] } onSubmit = { onSubmit } /> ) ;
632632 await time . tick ( ) ;
633633
634634 stdin . write ( KEY . UP ) ;
@@ -649,7 +649,9 @@ describe('Input', () => {
649649 await time . tick ( ) ;
650650 expect ( lastFrame ( ) ) . toContain ( 'session one prompt' ) ;
651651
652- rerender ( < Input history = { [ 'session two prompt' ] } onSubmit = { onSubmit } /> ) ;
652+ rerender (
653+ < ChatInput history = { [ 'session two prompt' ] } onSubmit = { onSubmit } /> ,
654+ ) ;
653655 await time . tick ( ) ;
654656
655657 expect ( lastFrame ( ) ) . toContain ( 'Ask anything... (/ commands, @ files)' ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function hasFileSuggestionQuery(input: string): boolean {
2323 return / ( ^ | .) @ \S + / . test ( input ) ;
2424}
2525
26- export function Input ( {
26+ export function ChatInput ( {
2727 history : sessionHistory ,
2828 isDisabled = false ,
2929 onInterrupt,
You can’t perform that action at this time.
0 commit comments