diff options
-rw-r--r-- | src/client/views/nodes/formattedText/DailyJournal.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/DailyJournal.tsx b/src/client/views/nodes/formattedText/DailyJournal.tsx index 269a609ef..fc7290988 100644 --- a/src/client/views/nodes/formattedText/DailyJournal.tsx +++ b/src/client/views/nodes/formattedText/DailyJournal.tsx @@ -175,7 +175,10 @@ export class DailyJournal extends ViewBoxAnnotatableComponent<FieldViewProps>() } this.typingTimeout = setTimeout(() => { - this.insertPredictiveQuestion(); + if (this.inlinePromptsEnabled) { + this.insertPredictiveQuestion(); + } + }, 3500); }; @@ -184,7 +187,7 @@ export class DailyJournal extends ViewBoxAnnotatableComponent<FieldViewProps>() */ @action insertPredictiveQuestion = async () => { - if (!this.inlinePromptsEnabled) return; + // if (!this.inlinePromptsEnabled) return; const editorView = this._ref.current?.EditorView; if (!editorView) return; @@ -224,7 +227,7 @@ export class DailyJournal extends ViewBoxAnnotatableComponent<FieldViewProps>() this.predictiveText = ' ...'; // placeholder const fullTextUpToCursor = state.doc.textBetween(0, state.selection.to, '\n', '\n'); - const gptPrompt = `Given the following incomplete journal entry, generate a single 2-5 word question that continues the user's thought:\n\n"${fullTextUpToCursor}"`; + const gptPrompt = `Given the following incomplete journal entry, generate a single 2-5 word reflective question that continues the user's thought:\n\n"${fullTextUpToCursor}"`; const res = await gptAPICall(gptPrompt, GPTCallType.COMPLETION); if (!res) return; |