@@ -19,7 +19,6 @@ import {
1919  useSendChatRequest , 
2020  useCompressChat , 
2121  useAutoFocusOnce , 
22-   useTotalTokenUsage , 
2322}  from  "../../hooks" ; 
2423import  {  ErrorCallout ,  Callout  }  from  "../Callout" ; 
2524import  {  ComboBox  }  from  "../ComboBox" ; 
@@ -35,7 +34,6 @@ import { useInputValue } from "./useInputValue";
3534import  { 
3635  clearInformation , 
3736  getInformationMessage , 
38-   setInformation , 
3937}  from  "../../features/Errors/informationSlice" ; 
4038import  {  InformationCallout  }  from  "../Callout/Callout" ; 
4139import  {  ToolConfirmation  }  from  "./ToolConfirmation" ; 
@@ -98,18 +96,6 @@ export const ChatForm: React.FC<ChatFormProps> = ({
9896  const  autoFocus  =  useAutoFocusOnce ( ) ; 
9997  const  attachedFiles  =  useAttachedFiles ( ) ; 
10098
101-   const  {  limitReached,  tokens,  limit }  =  useTotalTokenUsage ( ) ; 
102- 
103-   useEffect ( ( )  =>  { 
104-     if  ( limitReached )  { 
105-       dispatch ( 
106-         setInformation ( 
107-           `Token Limit reached, ${ tokens }   out of ${ limit }   used. To continue click the compress button or start a new chat.` , 
108-         ) , 
109-       ) ; 
110-     } 
111-   } ,  [ tokens ,  limit ,  limitReached ,  dispatch ] ) ; 
112- 
11399  const  shouldAgentCapabilitiesBeShown  =  useMemo ( ( )  =>  { 
114100    return  threadToolUse  ===  "agent" ; 
115101  } ,  [ threadToolUse ] ) ; 
@@ -322,11 +308,7 @@ export const ChatForm: React.FC<ChatFormProps> = ({
322308
323309  if  ( information )  { 
324310    return  ( 
325-       < InformationCallout 
326-         mt = "2" 
327-         onClick = { onClearInformation } 
328-         timeout = { limitReached  ? null  : 2000 } 
329-       > 
311+       < InformationCallout  mt = "2"  onClick = { onClearInformation }  timeout = { 2000 } > 
330312        { information } 
331313      </ InformationCallout > 
332314    ) ; 
@@ -386,7 +368,6 @@ export const ChatForm: React.FC<ChatFormProps> = ({
386368                data-testid = "chat-form-textarea" 
387369                required = { true } 
388370                // disabled={isStreaming} 
389-                 disabled = { limitReached } 
390371                { ...props } 
391372                autoFocus = { autoFocus } 
392373                style = { {  boxShadow : "none" ,  outline : "none"  } } 
0 commit comments