File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
qualifiers/background/shared Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ function createPredominantGradientBackgroundModel(background: BackgroundPredomin
205
205
function createGenerativeFillBackgroundModel ( background : BackgroundGenerativeFillQualifier ) : IGenerativeFillBackgroundModel {
206
206
return {
207
207
backgroundType : background . getBackgroundType ( ) ,
208
- ...( background . getPrompt ( ) ? { prompt : decodeURIComponent ( background . getPrompt ( ) ) } : { } )
208
+ ...( background . getPrompt ( ) ? { prompt : background . getPrompt ( ) } : { } )
209
209
} ;
210
210
}
211
211
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ class BackgroundGenerativeFillQualifier extends BackgroundQualifier {
16
16
}
17
17
18
18
prompt ( prompt : string ) : BackgroundGenerativeFillQualifier {
19
- this . _prompt = prompt ? encodePromptComponent ( prompt ) : prompt ;
19
+ this . _prompt = decodeURIComponent ( prompt ) ;
20
20
return this ;
21
21
}
22
22
23
23
getPrompt ( ) : string | undefined {
24
- return this . _prompt ? decodeURIComponent ( this . _prompt ) : this . _prompt ;
24
+ return this . _prompt ;
25
25
}
26
26
27
27
getBackgroundType ( ) : 'generativeFill' {
@@ -33,7 +33,7 @@ class BackgroundGenerativeFillQualifier extends BackgroundQualifier {
33
33
* Override the toString() function to explicitly stringify the qualifier.
34
34
*/
35
35
toString ( ) : string {
36
- return `b_gen_fill${ this . _prompt ? `:prompt_${ this . _prompt } ` : '' } ` ;
36
+ return `b_gen_fill${ this . _prompt ? `:prompt_${ encodePromptComponent ( this . _prompt ) } ` : '' } ` ;
37
37
}
38
38
}
39
39
You can’t perform that action at this time.
0 commit comments