@@ -46,7 +46,7 @@ const GenerateFlowTestModal = ({ closeFn = () => null, open = false, collectionI
4646 leaveFrom = 'opacity-100 scale-100'
4747 leaveTo = 'opacity-0 scale-95'
4848 >
49- < Dialog . Panel className = 'w-full max-w-md p-6 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-2xl' >
49+ < Dialog . Panel className = 'w-full max-w-2xl p-6 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-2xl' >
5050 < Dialog . Title
5151 as = 'h3'
5252 className = 'pb-4 text-lg font-semibold text-center text-gray-900 border-b border-neutral-300'
@@ -56,7 +56,7 @@ const GenerateFlowTestModal = ({ closeFn = () => null, open = false, collectionI
5656 < div className = 'mt-6' >
5757 < Listbox value = { selectedModel } onChange = { setSelectedModel } >
5858 < div className = 'relative flex w-full h-full' >
59- < Listbox . Button className = 'flex items-center justify-between w-full gap-4 py-4 border rounded cursor-default border-neutral-300' >
59+ < Listbox . Button className = 'flex items-center justify-between w-full gap-4 px-2 py-4 border rounded cursor-default border-neutral-300' >
6060 < div className = 'pl-2 text-left min-w-32' > { selectedModel ? selectedModel : 'Select model' } </ div >
6161 < ChevronUpDownIcon className = 'w-5 h-5' aria-hidden = 'true' />
6262 </ Listbox . Button >
@@ -66,7 +66,7 @@ const GenerateFlowTestModal = ({ closeFn = () => null, open = false, collectionI
6666 leaveFrom = 'opacity-100'
6767 leaveTo = 'opacity-0'
6868 >
69- < Listbox . Options className = 'absolute right-0 z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded shadow-lg top-6 max-h-60 ring-1 ring-black/5' >
69+ < Listbox . Options className = 'absolute right-0 z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded shadow-lg top-12 max-h-60 ring-1 ring-black/5' >
7070 { Object . values ( GENAI_MODELS ) . map ( ( modelType ) => (
7171 < Listbox . Option
7272 key = { modelType }
@@ -95,10 +95,30 @@ const GenerateFlowTestModal = ({ closeFn = () => null, open = false, collectionI
9595 </ Transition >
9696 </ div >
9797 </ Listbox >
98- < div className = 'mt-4' >
98+ { selectedModel === GENAI_MODELS . openai ? (
99+ < div className = 'flex items-center justify-center w-full h-12 mt-8 text-sm border rounded-md border-neutral-500 text-neutral-500 outline-0 focus:ring-0' >
100+ < label
101+ className = 'flex items-center w-32 h-full px-4 border-r border-r-neutral-500'
102+ htmlFor = 'openAIkey'
103+ >
104+ OpenAI Key
105+ </ label >
106+ < input
107+ id = 'openAIkey'
108+ type = 'text'
109+ className = 'nodrag nowheel block w-full p-2.5'
110+ name = 'keyName'
111+ placeholder = 'Enter your Open AI key'
112+ onChange = { ( e ) => console . log ( e . target . value ) }
113+ />
114+ </ div >
115+ ) : (
116+ ''
117+ ) }
118+ < div className = 'mt-8' >
99119 < textarea
100120 id = 'gen-ai-text'
101- className = 'block w-full rounded border border -gray-300 bg -gray-50 p-2.5 text-sm text -gray-900 outline-blue-300 focus:border-blue-100 focus:ring-blue-100'
121+ className = 'block w-full p-4 text-sm text -gray-900 border border -gray-300 rounded min-h-80 bg -gray-50 outline-blue-300 focus:border-blue-100 focus:ring-blue-100'
102122 placeholder = 'Describe your flow step by step'
103123 onChange = { ( event ) => setTextareaValue ( event . target . value ) }
104124 />
0 commit comments