@@ -35,6 +35,8 @@ interface AgentChatContextType {
3535 addMessage : ( message : Message ) => void ;
3636 setPendingUserMessage : ( message : string | null ) => void ;
3737 clearSession : ( ) => void ;
38+ initialInputValue : string | null ;
39+ setInitialInputValue : ( value : string | null ) => void ;
3840}
3941
4042interface AgentChatProviderProps {
@@ -58,6 +60,7 @@ export function AgentChatProvider({ children }: AgentChatProviderProps): ReactNo
5860 const [ sessions , setSessions ] = useState < SessionWithState [ ] > ( [ ] ) ;
5961 const [ hasMoreSessions , setHasMoreSessions ] = useState ( true ) ;
6062 const [ sessionPage , setSessionPage ] = useState ( 1 ) ;
63+ const [ initialInputValue , setInitialInputValue ] = useState < string | null > ( null ) ;
6164
6265 const appendSessions = useCallback ( ( newSessions : SessionWithState [ ] ) => {
6366 setSessions ( prev => [ ...prev , ...newSessions ] ) ;
@@ -140,13 +143,16 @@ export function AgentChatProvider({ children }: AgentChatProviderProps): ReactNo
140143 addMessage,
141144 setPendingUserMessage,
142145 clearSession,
146+ initialInputValue,
147+ setInitialInputValue,
143148 } ) , [
144149 isOpen , isClosing , sessionId , messages , pendingUserMessage ,
145150 sessionState , sessions , hasMoreSessions , sessionPage ,
146151 openChat , closeChat , toggleChat ,
147152 setSessionId , setMessages , setSessionState , setSessions ,
148153 appendSessions , setHasMoreSessions , setSessionPage ,
149154 addMessage , setPendingUserMessage , clearSession ,
155+ initialInputValue ,
150156 ] ) ;
151157
152158 return (
0 commit comments