Skip to content

Commit

Permalink
tRCP: move client code to src/common/utils
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Oct 16, 2023
1 parent 47539c8 commit df76ec7
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CacheProvider, EmotionCache } from '@emotion/react';
import { CssBaseline, CssVarsProvider } from '@mui/joy';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import 'katex/dist/katex.min.css';
import '~/common/styles/CodePrism.css'
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chat/editors/image-generate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';
import { prodiaDefaultModelId } from '~/modules/prodia/prodia.models';
import { useProdiaStore } from '~/modules/prodia/store-prodia';

Expand Down
2 changes: 1 addition & 1 deletion src/apps/chat/trade/ExportChats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Box, Button, Typography } from '@mui/joy';
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
import FileDownloadIcon from '@mui/icons-material/FileDownload';

import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';

import { Brand } from '~/common/brand';
import { ConfirmationModal } from '~/common/components/ConfirmationModal';
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chat/trade/ImportChats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fileOpen, FileWithHandle } from 'browser-fs-access';
import { Box, Button, FormControl, FormLabel, Input, Sheet, Typography } from '@mui/joy';
import FileUploadIcon from '@mui/icons-material/FileUpload';

import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';

import { Brand } from '~/common/brand';
import { InlineError } from '~/common/components/InlineError';
Expand Down
2 changes: 1 addition & 1 deletion src/apps/personas/YTPersonaCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import WhatshotIcon from '@mui/icons-material/Whatshot';
import YouTubeIcon from '@mui/icons-material/YouTube';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';
import { useModelsStore } from '~/modules/llms/store-llms';

import { copyToClipboard } from '~/common/util/copyToClipboard';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/modules/elevenlabs/useVoiceDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CircularProgress, Option, Select } from '@mui/joy';
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import RecordVoiceOverIcon from '@mui/icons-material/RecordVoiceOver';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { playSoundUrl } from '~/common/util/audioUtils';

Expand Down
3 changes: 2 additions & 1 deletion src/modules/google/search.client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useGoogleSearchStore } from '~/modules/google/store-google';

import { apiAsync } from '~/common/util/trpc.client';

import { Search } from './search.types';
import { apiAsync } from '~/modules/trpc/trpc.client';

export const requireUserKeyGoogleCse = !process.env.HAS_SERVER_KEYS_GOOGLE_CSE;

Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/transports/streamChat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';

import type { DLLM, DLLMId } from '../store-llms';
import { findVendorForLlmOrThrow } from '../vendors/vendor.registry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { Box, Button } from '@mui/joy';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { FormInputKey } from '~/common/components/FormInputKey';
import { InlineError } from '~/common/components/InlineError';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/vendors/anthropic/anthropic.vendor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';

import { AnthropicIcon } from '~/common/components/icons/AnthropicIcon';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/vendors/azure/AzureSourceSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { Alert, Box, Button, FormControl, FormLabel, Input, Typography } from '@mui/joy';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { FormInputKey } from '~/common/components/FormInputKey';
import { Link } from '~/common/components/Link';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/vendors/localai/LocalAISourceSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Box, Button, Typography } from '@mui/joy';
import FileDownloadIcon from '@mui/icons-material/FileDownload';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { FormInputKey } from '~/common/components/FormInputKey';
import { InlineError } from '~/common/components/InlineError';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { Alert, Box, Button, FormControl, FormHelperText, FormLabel, Input, Typography } from '@mui/joy';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { InlineError } from '~/common/components/InlineError';
import { Link } from '~/common/components/Link';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/vendors/openai/OpenAISourceSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { Box, Button, FormControl, FormHelperText, FormLabel, Input, Switch } from '@mui/joy';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { Brand } from '~/common/brand';
import { FormInputKey } from '~/common/components/FormInputKey';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/llms/vendors/openai/openai.vendor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiAsync } from '~/modules/trpc/trpc.client';
import { apiAsync } from '~/common/util/trpc.client';

import { OpenAIIcon } from '~/common/components/icons/OpenAIIcon';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { Box, Button, Typography } from '@mui/joy';
import SyncIcon from '@mui/icons-material/Sync';

import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';

import { FormInputKey } from '~/common/components/FormInputKey';
import { InlineError } from '~/common/components/InlineError';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/prodia/ProdiaSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import StayPrimaryPortraitIcon from '@mui/icons-material/StayPrimaryPortrait';

import { FormInputKey } from '~/common/components/FormInputKey';
import { InlineError } from '~/common/components/InlineError';
import { apiQuery } from '~/modules/trpc/trpc.client';
import { apiQuery } from '~/common/util/trpc.client';
import { settingsGap } from '~/common/theme';

import { isValidProdiaApiKey, requireUserKeyProdia } from './prodia.client';
Expand Down

1 comment on commit df76ec7

@vercel
Copy link

@vercel vercel bot commented on df76ec7 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

big-agi – ./

big-agi-git-main-enricoros.vercel.app
get.big-agi.com
big-agi-enricoros.vercel.app

Please sign in to comment.