File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -646,15 +646,27 @@ function ChatScreen(): React.JSX.Element {
646646 if ( message [ 0 ] ?. text || files . length > 0 ) {
647647 if ( ! message [ 0 ] ?. text ) {
648648 if ( modeRef . current === ChatMode . Text ) {
649- message [ 0 ] . text = getFileTypeSummary ( files ) ;
649+ // use system prompt name as user prompt
650+ if ( systemPromptRef . current ) {
651+ message [ 0 ] . text = systemPromptRef . current . name ;
652+ } else {
653+ message [ 0 ] . text = getFileTypeSummary ( files ) ;
654+ }
650655 } else {
656+ // use selected system prompt as user prompt
651657 message [ 0 ] . text = systemPromptRef . current ?. prompt ?? 'Empty Message' ;
652658 if ( systemPromptRef . current ?. id === - 7 ) {
653659 saveLastVirtualTryOnImgFile ( files [ 0 ] ) ;
654660 saveCurrentImageSystemPrompt ( null ) ;
655661 sendEventRef . current ( 'unSelectSystemPrompt' ) ;
656662 }
657663 }
664+ } else {
665+ // append user prompt after system prompt in image mode
666+ if ( modeRef . current === ChatMode . Image && systemPromptRef . current ) {
667+ message [ 0 ] . text =
668+ systemPromptRef . current ?. prompt + '\n' + message [ 0 ] . text ;
669+ }
658670 }
659671 if ( selectedFilesRef . current . length > 0 ) {
660672 message [ 0 ] . image = JSON . stringify ( selectedFilesRef . current ) ;
You can’t perform that action at this time.
0 commit comments