🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
refactor(web): send components/ui's single-feature files home (LFE-14804) (#15821)
Nikita Kabardin729e921bde46
diff --git a/web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsx b/web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsxindex 77a31dc7b5..a6f853dffd 100644--- a/web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsx+++ b/web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsx@@ -37,7 +37,7 @@ import { useAnnotationQueueData } from "./shared/hooks/useAnnotationQueueData";import { useAnnotationObjectData } from "./shared/hooks/useAnnotationObjectData";import { TraceAnnotationProcessor } from "./processors/TraceAnnotationProcessor";import { SessionAnnotationProcessor } from "./processors/SessionAnnotationProcessor";-import { ObjectNotFoundCard } from "@/src/components/ui/object-not-found-card";+import { ObjectNotFoundCard } from "@/src/features/annotation-queues/components/object-not-found-card";import { useSession } from "next-auth/react";// A single row in the keyboard-shortcuts cheatsheet: label on the left, one ordiff --git a/web/src/components/ui/object-not-found-card.tsx b/web/src/features/annotation-queues/components/object-not-found-card.tsxsimilarity index 100%rename from web/src/components/ui/object-not-found-card.tsxrename to web/src/features/annotation-queues/components/object-not-found-card.tsxdiff --git a/web/src/features/in-app-agent/components/InAppAgentWindowHost.tsx b/web/src/features/in-app-agent/components/InAppAgentWindowHost.tsxindex ff3a3d206e..d6c4e2a594 100644--- a/web/src/features/in-app-agent/components/InAppAgentWindowHost.tsx+++ b/web/src/features/in-app-agent/components/InAppAgentWindowHost.tsx@@ -3,7 +3,7 @@import { useLayoutEffect, useRef } from "react";import { ConfirmDialog } from "@/src/components/ui/confirm-dialog";-import { DialogController } from "@/src/components/ui/dialog-controller";+import { DialogController } from "@/src/features/in-app-agent/components/dialog-controller";import { Layer } from "@/src/components/ui/layer";import { ControlledInAppAgentWindow } from "@/src/features/in-app-agent/components/ControlledInAppAgentWindow";import type { InAppAgentWindowConversation } from "@/src/features/in-app-agent/components/InAppAgentWindow";diff --git a/web/src/components/ui/dialog-controller.tsx b/web/src/features/in-app-agent/components/dialog-controller.tsxsimilarity index 73%rename from web/src/components/ui/dialog-controller.tsxrename to web/src/features/in-app-agent/components/dialog-controller.tsxindex 6a311a6ece..41bbd7bb17 100644--- a/web/src/components/ui/dialog-controller.tsx+++ b/web/src/features/in-app-agent/components/dialog-controller.tsx@@ -10,8 +10,12 @@ export function DialogController<T>({dialog: (close: () => void, value: T | null) => ReactNode;}) {const [value, setValue] = useState<T | null>(null);- const open = useCallback((nextValue: T) => setValue(nextValue), []);- const close = useCallback(() => setValue(null), []);+ const open = useCallback((nextValue: T) => {+ setValue(nextValue);+ }, []);+ const close = useCallback(() => {+ setValue(null);+ }, []);return (<>diff --git a/web/src/features/prompts/components/prompt-history.tsx b/web/src/features/prompts/components/prompt-history.tsxindex 8183b9e733..948fad14b3 100644--- a/web/src/features/prompts/components/prompt-history.tsx+++ b/web/src/features/prompts/components/prompt-history.tsx@@ -2,7 +2,10 @@ import { type RouterOutputs } from "@/src/utils/api";import { type NextRouter, useRouter } from "next/router";import { useState, useRef, useEffect } from "react";import { PromptVersionDiffDialog } from "./PromptVersionDiffDialog";-import { Timeline, TimelineItem } from "@/src/components/ui/timeline";+import {+ Timeline,+ TimelineItem,+} from "@/src/features/prompts/components/timeline";import { Badge } from "@/src/components/ui/badge";import { CommandItem } from "@/src/components/ui/command";import { SetPromptVersionLabels } from "@/src/features/prompts/components/SetPromptVersionLabels";diff --git a/web/src/components/ui/timeline.tsx b/web/src/features/prompts/components/timeline.tsxsimilarity index 100%rename from web/src/components/ui/timeline.tsxrename to web/src/features/prompts/components/timeline.tsx