mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
remove logs
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user