aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-09 21:56:45 -0400
committerbobzel <zzzman@gmail.com>2024-10-09 21:56:45 -0400
commite5b9fb05f1a42ee4f53bf93bc3437e0051c89242 (patch)
treecea3d851c4125da6faccf7eb740fb082bd0176a4
parent4864f06dcc6eac232bbb9346c68f831fd6420dae (diff)
lint fixes
-rw-r--r--src/client/apis/gpt/GPT.ts2
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts
index 209e8e87e..858957ac2 100644
--- a/src/client/apis/gpt/GPT.ts
+++ b/src/client/apis/gpt/GPT.ts
@@ -110,7 +110,7 @@ let lastResp = '';
* @param inputText Text to process
* @returns AI Output
*/
-const gptAPICall = async (inputTextIn: string, callType: GPTCallType, prompt?: any, dontCache?: boolean) => {
+const gptAPICall = async (inputTextIn: string, callType: GPTCallType, prompt?: string, dontCache?: boolean) => {
const inputText = [GPTCallType.SUMMARY, GPTCallType.FLASHCARD, GPTCallType.QUIZ].includes(callType) ? inputTextIn + '.' : inputTextIn;
const opts: GPTCallOpts = callTypeMap[callType];
if (lastCall === inputText && dontCache !== true) return lastResp;
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 39a2e3a31..c1446a77a 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -274,7 +274,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
return;
}
this._outputValue = res;
- } catch (err) {
+ } catch {
console.error('GPT call failed');
}
};
@@ -301,7 +301,6 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
return targetDoc || layoutString ? (
<>
<DocumentView
- // eslint-disable-next-line react/jsx-props-no-spreading
{...this._props}
fitWidth={undefined}
NativeHeight={returnZero}
@@ -342,7 +341,6 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
const dataSplit = StrCast(this.dataDoc.data).split('Answer');
const newDoc = Docs.Create.TextDocument(dataSplit[1]);
// if there is text from the pdf ai cards, put the question on the front side.
- // eslint-disable-next-line prefer-destructuring
newDoc[DocData].text = dataSplit[1];
this.addDoc(newDoc, this.fieldKey + '_0');
}
@@ -350,7 +348,6 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
const dataSplit = StrCast(this.dataDoc.data).split('Answer');
const newDoc = Docs.Create.TextDocument(dataSplit[0]);
// if there is text from the pdf ai cards, put the answer on the alternate side.
- // eslint-disable-next-line prefer-destructuring
newDoc[DocData].text = dataSplit[0];
this.addDoc(newDoc, this.fieldKey + '_1');
}