File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,15 +438,17 @@ export default {
438438 this .$refs ? .translateForm ? .setDefaultValues (true )
439439 this .$refs ? .assistantFormInputs ? .setDefaultValues (true )
440440
441- // keep last prompt if new task type has text input
442- if (lastInput && this .selectedTaskType ? .inputShape ? .input ) {
443- this .myInputs .input = lastInput
444- }
445- if (lastInput && this .selectedTaskType ? .inputShape ? .source_input ) {
446- this .myInputs .source_input = lastInput
447- }
448- if (lastInput && this .selectedTaskType ? .inputShape ? .text ) {
449- this .myInputs .text = lastInput
441+ // keep last prompt if it's a string and if the new task type has text input
442+ if (lastInput && (typeof lastInput === ' string' || lastInput instanceof String )) {
443+ if (this .selectedTaskType ? .inputShape ? .input && this .selectedTaskType ? .inputShape ? .input .type === SHAPE_TYPE_NAMES .Text ) {
444+ this .myInputs .input = lastInput
445+ }
446+ if (this .selectedTaskType ? .inputShape ? .source_input && this .selectedTaskType ? .inputShape ? .source_input .type === SHAPE_TYPE_NAMES .Text ) {
447+ this .myInputs .source_input = lastInput
448+ }
449+ if (this .selectedTaskType ? .inputShape ? .text && this .selectedTaskType ? .inputShape ? .text .type === SHAPE_TYPE_NAMES .Text ) {
450+ this .myInputs .text = lastInput
451+ }
450452 }
451453 },
452454 onSyncSubmit () {
You can’t perform that action at this time.
0 commit comments