diff options
author | bobzel <zzzman@gmail.com> | 2025-07-23 13:50:05 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-07-23 13:50:05 -0400 |
commit | 069716219a0fc9ebb1f4812fdbf54d02fb0a6732 (patch) | |
tree | dd104acebb4f018281629ba5fad147c863458e9d /src | |
parent | 5a76ed69d488cc5798161fb2a528baabc690928d (diff) | |
parent | 53f816699c77a178e43a314fc8f9335f5f1115f3 (diff) |
Merge branch 'master' into lanyi-expanded-agent-paper-main
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/pdf/GPTPopup/GPTPopup.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx index 6e0d58932..65be98c83 100644 --- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx +++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx @@ -92,8 +92,12 @@ export class GPTPopup extends ObservableReactComponent<object> { this.onGptResponse = (sortResult: string, questionType: GPTDocCommand) => this.processGptResponse(selDoc, this._textToDocMap, sortResult, questionType); this.onQuizRandom = () => this.randomlyChooseDoc(selDoc.Document, hasChildDocs()); this._documentDescriptions = Promise.all(hasChildDocs().map(doc => - Doc.getDescription(doc).then(text => this._textToDocMap.set(text.replace(/\n/g, ' ').trim(), doc) && `${DescriptionSeperator}${text}${DescriptionSeperator}`) + Doc.getDescription(doc).then(text => text.replace(/\n/g, ' ').trim()) + .then(text => this._textToDocMap.set(text, doc) && `${DescriptionSeperator}${text}${DescriptionSeperator}`) )).then(docDescriptions => docDescriptions.join()); // prettier-ignore + this._documentDescriptions.then(descs => { + console.log(descs); + }); } }, { fireImmediately: true } |