|
|
@@ -1086,22 +1086,31 @@ export function Prompt(props: PromptProps) {
|
|
|
} else {
|
|
|
move.startSubmit()
|
|
|
sdk.client.session
|
|
|
- .prompt({
|
|
|
- sessionID,
|
|
|
- ...selectedModel,
|
|
|
- agent: agent.name,
|
|
|
- model: selectedModel,
|
|
|
- variant,
|
|
|
- parts: [
|
|
|
- ...editorParts,
|
|
|
- {
|
|
|
- type: "text",
|
|
|
- text: inputText,
|
|
|
- },
|
|
|
- ...nonTextParts,
|
|
|
- ],
|
|
|
+ .prompt(
|
|
|
+ {
|
|
|
+ sessionID,
|
|
|
+ ...selectedModel,
|
|
|
+ agent: agent.name,
|
|
|
+ model: selectedModel,
|
|
|
+ variant,
|
|
|
+ parts: [
|
|
|
+ ...editorParts,
|
|
|
+ {
|
|
|
+ type: "text",
|
|
|
+ text: inputText,
|
|
|
+ },
|
|
|
+ ...nonTextParts,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ { throwOnError: true },
|
|
|
+ )
|
|
|
+ .catch((error) => {
|
|
|
+ toast.show({
|
|
|
+ title: "Failed to send prompt",
|
|
|
+ message: errorMessage(error),
|
|
|
+ variant: "error",
|
|
|
+ })
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
if (editorParts.length > 0) editor.markSelectionSent()
|
|
|
}
|
|
|
history.append({
|