aboutsummaryrefslogtreecommitdiff
path: root/src/client/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx18
1 files changed, 3 insertions, 15 deletions
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<FieldViewProps>() {
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<FieldViewProps>() {
*/
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<FieldViewProps>() {
/>
)}
</div>
- {/* <div
- contentEditable={true}
- onInput={e => {
- const newContent = e.currentTarget.innerHTML;
- console.log('content', newContent);
- this.setChatInput(newContent);
- }}>
- {this.chatInput}
- </div> */}
<TextareaAutosize
ref={r => (this._inputref = r)}
minRows={3}
@@ -2808,13 +2802,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
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();
}}