From bbed3cd4225bfa41add3ca22c6860487e50555bd Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Thu, 26 Oct 2023 11:31:20 -0400 Subject: saving progress --- src/client/views/nodes/trails/PresBox.tsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/client/views/nodes/trails') diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 0d5edcd83..a88dd6035 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -322,6 +322,7 @@ export class PresBox extends ViewBoxBaseComponent() { customizeWithGPT = async (input: string) => { // const testInput = 'change title to Customized Slide, transition for 2.3s with fade in effect'; if (!this.slideToModify) return; + this.setIsRecording(false); this.setIsLoading(true); try { const res = await gptTrailSlideCustomization(input); @@ -858,6 +859,8 @@ export class PresBox extends ViewBoxBaseComponent() { */ navigateToActiveItem = (afterNav?: () => void) => { const activeItem: Doc = this.activeItem; + // GPT update + this.slideToModify = activeItem; const targetDoc: Doc = this.targetDoc; const finished = () => { afterNav?.(); @@ -2789,15 +2792,6 @@ export class PresBox extends ViewBoxBaseComponent() { /> )} - {/*
{ - const newContent = e.currentTarget.innerHTML; - console.log('content', newContent); - this.setChatInput(newContent); - }}> - {this.chatInput} -
*/} (this._inputref = r)} minRows={3} @@ -2808,13 +2802,7 @@ export class PresBox extends ViewBoxBaseComponent() { onChange={e => { this.setChatInput(e.target.value); }} - // onSelect={e => { - // this.stopDictation(true); - // }} onKeyDown={e => { - // if (e.key === 'Enter') { - // this.customizeWithGPT(this.chatInput); - // } this.stopDictation(true); e.stopPropagation(); }} -- cgit v1.2.3-70-g09d2