File tree Expand file tree Collapse file tree
packages/tui/src/component/prompt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1086,22 +1086,31 @@ export function Prompt(props: PromptProps) {
10861086 } else {
10871087 move . startSubmit ( )
10881088 sdk . client . session
1089- . prompt ( {
1090- sessionID,
1091- ...selectedModel ,
1092- agent : agent . name ,
1093- model : selectedModel ,
1094- variant,
1095- parts : [
1096- ...editorParts ,
1097- {
1098- type : "text" ,
1099- text : inputText ,
1100- } ,
1101- ...nonTextParts ,
1102- ] ,
1089+ . prompt (
1090+ {
1091+ sessionID,
1092+ ...selectedModel ,
1093+ agent : agent . name ,
1094+ model : selectedModel ,
1095+ variant,
1096+ parts : [
1097+ ...editorParts ,
1098+ {
1099+ type : "text" ,
1100+ text : inputText ,
1101+ } ,
1102+ ...nonTextParts ,
1103+ ] ,
1104+ } ,
1105+ { throwOnError : true } ,
1106+ )
1107+ . catch ( ( error ) => {
1108+ toast . show ( {
1109+ title : "Failed to send prompt" ,
1110+ message : errorMessage ( error ) ,
1111+ variant : "error" ,
1112+ } )
11031113 } )
1104- . catch ( ( ) => { } )
11051114 if ( editorParts . length > 0 ) editor . markSelectionSent ( )
11061115 }
11071116 history . append ( {
You can’t perform that action at this time.
0 commit comments