File tree Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,7 @@ import {
4
4
OpenAiApi ,
5
5
CallOpenAi ,
6
6
} from './OpenAI' ;
7
- import {
8
- AiSection ,
9
- AiImageResponse ,
10
- AiTextResponse ,
11
- } from './AiResponse' ;
7
+ import { AiSection } from './AiResponse' ;
12
8
import {
13
9
ChatSource ,
14
10
ChatContent ,
@@ -157,20 +153,16 @@ Respond with the image prompt string in the required format. Do not respond conv
157
153
return (
158
154
< AiSection isLoading = { isLoading } >
159
155
{
160
- // TODO: All of this can go away now, once images are working in new model
161
- ( isLoading || error ) ?
162
- < Text style = { { color : 'crimson' } } > { error } </ Text >
163
- : isRequestForImage ?
164
- < AiImageResponse
165
- imageUrl = { queryResult }
166
- prompt = { imagePrompt }
167
- rejectImage = { ( ) => {
168
- setIsRequestForImage ( false ) ;
169
- setQueryResult ( undefined ) ;
170
- } } />
171
- : // Not an error, not an image
172
- < AiTextResponse
173
- text = { queryResult } />
156
+ ( isLoading ?
157
+ isRequestForImage === undefined ?
158
+ < Text > Identifying intent...</ Text > :
159
+ isRequestForImage === true ?
160
+ imagePrompt === undefined ?
161
+ < Text > Generating keywords for an image...</ Text > :
162
+ < Text > Generating image...</ Text > :
163
+ < Text > Generating text...</ Text >
164
+ :
165
+ < Text > Done loading</ Text > )
174
166
}
175
167
</ AiSection >
176
168
)
You can’t perform that action at this time.
0 commit comments