remove logs

This commit is contained in:
Enrico Ros
2024-08-04 06:07:36 -07:00
parent 30ffd1a7ee
commit 50e97e7523
2 changed files with 6 additions and 3 deletions
@@ -16,7 +16,7 @@ function _handleGlobalShortcutKeyDown(event: KeyboardEvent) {
// Quicker-out: if the key is null, stop here
if (!event.key)
return;
console.log('event.key', event.key, event.ctrlKey, event.shiftKey, event.altKey);
// Quick-out: either the key is escape/left/right, or we have a modifier key pressed -- otherwise we exit
const lcEventKey = event.key.toLowerCase();
if (lcEventKey !== 'escape' && lcEventKey !== 'arrowleft' && lcEventKey !== 'arrowright' &&
@@ -10,6 +10,9 @@ import { useShallowStable } from '~/common/util/hooks/useShallowObject';
import { agiAttachmentPrompts } from './agiAttachmentPrompts';
// interface
export function useAgiAttachmentPrompts(automatic: boolean, attachmentDrafts: AttachmentDraft[]) {
// external state
@@ -19,14 +22,14 @@ export function useAgiAttachmentPrompts(automatic: boolean, attachmentDrafts: At
const automaticTrigger = automatic && stableFragments.length >= 2;
// async operation state
const { data: prompts, error, isPending, isFetching, isLoading, isRefetching, isStale, refetch } = useQuery({
const { data: prompts, error, isPending, isFetching, refetch } = useQuery({
enabled: automaticTrigger,
queryKey: ['aifn-prompts-attachments', ...stableFragments.map(f => f.fId).sort()],
queryFn: async ({ signal }) => agiAttachmentPrompts(stableFragments, signal),
staleTime: Infinity,
// placeholderData: keepPreviousData,
});
console.log('state', { isPending, isFetching, isLoading, isRefetching, isStale });
// callbacks
const handleRefetch = React.useCallback(async () => refetch(), [refetch]);