From 3d7c885584dc0f2d49925dadc18ff782bb48c68b Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Wed, 12 Mar 2025 14:25:45 -0400 Subject: [PATCH] fix no-restricted-imports --- app/components/chat/Chat.client.tsx | 4 ++-- app/components/header/Feedback.tsx | 2 +- app/lib/hooks/pingTelemetry.ts | 2 +- app/lib/persistence/useChatHistory.ts | 2 +- app/lib/stores/workbench.ts | 4 ++-- app/lib/webcontainer/index.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index aa945d0d..25ebd2e5 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -31,8 +31,8 @@ import { type ProtocolMessage, } from '~/lib/replay/SimulationPrompt'; import { getIFrameSimulationData } from '~/lib/replay/Recording'; -import { getCurrentIFrame } from '../workbench/Preview'; -import { getCurrentMouseData } from '../workbench/PointSelector'; +import { getCurrentIFrame } from '~/components/workbench/Preview'; +import { getCurrentMouseData } from '~/components/workbench/PointSelector'; import { anthropicNumFreeUsesCookieName, anthropicApiKeyCookieName, MaxFreeUses } from '~/utils/freeUses'; import type { FileMap } from '~/lib/stores/files'; import { shouldIncludeFile } from '~/utils/fileUtils'; diff --git a/app/components/header/Feedback.tsx b/app/components/header/Feedback.tsx index a61d45c8..6f54e83f 100644 --- a/app/components/header/Feedback.tsx +++ b/app/components/header/Feedback.tsx @@ -2,7 +2,7 @@ import { toast } from 'react-toastify'; import ReactModal from 'react-modal'; import { useState } from 'react'; import { submitFeedback } from '~/lib/replay/Problems'; -import { getLastProjectContents, getLastChatMessages } from '../chat/Chat.client'; +import { getLastProjectContents, getLastChatMessages } from '~/components/chat/Chat.client'; ReactModal.setAppElement('#root'); diff --git a/app/lib/hooks/pingTelemetry.ts b/app/lib/hooks/pingTelemetry.ts index 535b33ab..5f80acc7 100644 --- a/app/lib/hooks/pingTelemetry.ts +++ b/app/lib/hooks/pingTelemetry.ts @@ -1,6 +1,6 @@ // FIXME ping telemetry server directly instead of going through the backend. -import { getNutLoginKey } from '../replay/Problems'; +import { getNutLoginKey } from '~/lib/replay/Problems'; // We do this to work around CORS insanity. export async function pingTelemetry(event: string, data: any) { diff --git a/app/lib/persistence/useChatHistory.ts b/app/lib/persistence/useChatHistory.ts index 26d02e31..0f00ce4b 100644 --- a/app/lib/persistence/useChatHistory.ts +++ b/app/lib/persistence/useChatHistory.ts @@ -15,7 +15,7 @@ import { createChatFromMessages, } from './db'; import { loadProblem } from '~/components/chat/LoadProblemButton'; -import { createAsyncSuspenseValue } from '../asyncSuspenseValue'; +import { createAsyncSuspenseValue } from '~/lib/asyncSuspenseValue'; export interface ChatHistoryItem { id: string; diff --git a/app/lib/stores/workbench.ts b/app/lib/stores/workbench.ts index 23e01242..82b0ba61 100644 --- a/app/lib/stores/workbench.ts +++ b/app/lib/stores/workbench.ts @@ -17,9 +17,9 @@ import { extractRelativePath } from '~/utils/diff'; import { description } from '~/lib/persistence'; import Cookies from 'js-cookie'; import { createSampler } from '~/utils/sampler'; -import { uint8ArrayToBase64 } from '../replay/ReplayProtocolClient'; +import { uint8ArrayToBase64 } from '~/lib/replay/ReplayProtocolClient'; import type { ActionAlert } from '~/types/actions'; -import { extractFileArtifactsFromRepositoryContents } from '../replay/Problems'; +import { extractFileArtifactsFromRepositoryContents } from '~/lib/replay/Problems'; export interface ArtifactState { id: string; diff --git a/app/lib/webcontainer/index.ts b/app/lib/webcontainer/index.ts index 47b6830d..9dfb8c5e 100644 --- a/app/lib/webcontainer/index.ts +++ b/app/lib/webcontainer/index.ts @@ -1,7 +1,7 @@ import { WebContainer } from '@webcontainer/api'; import { WORK_DIR_NAME } from '~/utils/constants'; import { cleanStackTrace } from '~/utils/stacktrace'; -import { recordingMessageHandlerScript } from '../replay/Recording'; +import { recordingMessageHandlerScript } from '~/lib/replay/Recording'; interface WebContainerContext { loaded: boolean;