aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/GPTPopup
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-07-01 13:17:40 -0400
committerbobzel <zzzman@gmail.com>2025-07-01 13:17:40 -0400
commit86c666427ff8b9d516450a150af641570e00f2d2 (patch)
treea12c359f8a06cd11bedd09bccd3d4bf7d7cba678 /src/client/views/pdf/GPTPopup
parentb3e9d7473e46bd05baf978607cbc60dfc32a71b0 (diff)
reverted chat send to use dash component Button, and dictation to use Toggle. Reverted Dropdown to use trigger of CLICK (hover doesn't work well). got rid of currentuserutil button references in infoUI & replaced with info-specific button descriptions. fixed up a bunch of lint/typing errors
Diffstat (limited to 'src/client/views/pdf/GPTPopup')
-rw-r--r--src/client/views/pdf/GPTPopup/GPTPopup.tsx27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index 9c37428ee..6e0d58932 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -1,4 +1,4 @@
-import { Button, IconButton, Toggle, ToggleType, Type } from '@dash/components';
+import { Button, IconButton, Size, Toggle, ToggleType, Type } from '@dash/components';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { action, makeObservable, observable, reaction } from 'mobx';
import { observer } from 'mobx-react';
@@ -9,7 +9,10 @@ import ReactLoading from 'react-loading';
import { TypeAnimation } from 'react-type-animation';
import { ClientUtils } from '../../../../ClientUtils';
import { Doc } from '../../../../fields/Doc';
+import { List } from '../../../../fields/List';
import { NumCast, StrCast } from '../../../../fields/Types';
+import { ImageField } from '../../../../fields/URLField';
+import { Upload } from '../../../../server/SharedMediaTypes';
import { Networking } from '../../../Network';
import { DataSeperator, DescriptionSeperator, DocSeperator, GPTCallType, GPTDocCommand, gptAPICall, gptImageCall } from '../../../apis/gpt/GPT';
import { DocUtils } from '../../../documents/DocUtils';
@@ -21,17 +24,14 @@ import { DictationButton } from '../../DictationButton';
import { ObservableReactComponent } from '../../ObservableReactComponent';
import { TagItem } from '../../TagsView';
import { ChatSortField, docSortings } from '../../collections/CollectionSubView';
+import { ComparisonBox } from '../../nodes/ComparisonBox';
import { DocumentView, DocumentViewInternal } from '../../nodes/DocumentView';
+import { OpenWhere } from '../../nodes/OpenWhere';
+import { DrawingFillHandler } from '../../smartdraw/DrawingFillHandler';
+import { FireflyImageDimensions } from '../../smartdraw/FireflyConstants';
import { SmartDrawHandler } from '../../smartdraw/SmartDrawHandler';
import { AnchorMenu } from '../AnchorMenu';
import './GPTPopup.scss';
-import { FireflyImageDimensions } from '../../smartdraw/FireflyConstants';
-import { Upload } from '../../../../server/SharedMediaTypes';
-import { OpenWhere } from '../../nodes/OpenWhere';
-import { DrawingFillHandler } from '../../smartdraw/DrawingFillHandler';
-import { ImageField } from '../../../../fields/URLField';
-import { List } from '../../../../fields/List';
-import { ComparisonBox } from '../../nodes/ComparisonBox';
export enum GPTPopupMode {
SUMMARY, // summary of seleted document text
@@ -45,7 +45,6 @@ export enum GPTPopupMode {
@observer
export class GPTPopup extends ObservableReactComponent<object> {
- // eslint-disable-next-line no-use-before-define
static Instance: GPTPopup;
static ChatTag = '#chat'; // tag used by GPT popup to filter docs
private _askDictation: DictationButton | null = null;
@@ -530,14 +529,14 @@ export class GPTPopup extends ObservableReactComponent<object> {
style={{ color: 'black' }}
placeholder={placeholder}
/>
- <Button //
- text="Send"
- type={Type.TERT}
+ <Button //\
+ type={Type.PRIM}
+ tooltip="Send to AI"
icon={<AiOutlineSend />}
iconPlacement="right"
- color={SettingsManager.userColor}
- background={SettingsManager.userVariantColor}
+ background={SnappingManager.userVariantColor}
onClick={() => this.callGpt(this._mode)}
+ size={Size.LARGE}
/>
<DictationButton ref={this.setDictationRef} setInput={onChange} />
</div>