mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
refactor(ui): move TraceView into components/lens/traces (#44501)
Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
6532dcb73b
commit
05f1c73a3c
80 changed files with 187 additions and 186 deletions
|
|
@ -100,7 +100,7 @@ const eslintConfig = [
|
|||
rules: { "local/no-ad-hoc-z-index": ["error", { allowPopupLayer: true }] },
|
||||
},
|
||||
{
|
||||
files: ["src/components/view_logs/TraceView/**/*.tsx", "src/components/lens/**/*.tsx"],
|
||||
files: ["src/components/lens/**/*.tsx"],
|
||||
ignores: ["src/**/*.test.tsx"],
|
||||
rules: { "local/no-arbitrary-design-value": "error" },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import LensPage from "@/app/(dashboard)/lens/page";
|
|||
|
||||
const { auth } = vi.hoisted(() => ({ auth: vi.fn() }));
|
||||
vi.mock("@/app/(dashboard)/hooks/useAuthorized", () => ({ default: auth }));
|
||||
vi.mock("@/components/view_logs/TraceView/AgentTracesPage", () => ({
|
||||
vi.mock("@/components/lens/traces/list/AgentTracesPage", () => ({
|
||||
default: ({ isActive }: { isActive: boolean }) => <div>Trace polling {isActive ? "active" : "paused"}</div>,
|
||||
}));
|
||||
vi.mock("./investigations/InvestigationsView", () => ({
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
import { useId, useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Aperture, ArrowUpRight } from "lucide-react";
|
||||
import AgentTracesPage from "@/components/view_logs/TraceView/AgentTracesPage";
|
||||
import AgentTracesPage from "@/components/lens/traces/list/AgentTracesPage";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import type { TraceSummary } from "@/components/view_logs/TraceView/traceTypes";
|
||||
import type { TraceSummary } from "@/components/lens/traces/types";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { Tabs, TabsContent } from "@/components/ui/tabs";
|
||||
import { LensServicesProvider, useLensAccessToken, useLensApi, useLiveLensServices } from "./data/LensServices";
|
||||
import { LensPreviewContext } from "@/components/view_logs/TraceView/LensPreviewButton";
|
||||
import { LensPreviewContext } from "@/components/lens/ui/LensPreviewButton";
|
||||
import { isProxyAdminRole, isProxyAdminTierRole } from "@/utils/roles";
|
||||
import { InvestigationsView } from "./investigations/InvestigationsView";
|
||||
import { LensSettings } from "./settings/LensSettings";
|
||||
|
|
@ -22,7 +22,7 @@ import { cn } from "@/lib/cva.config";
|
|||
import { useDialogRoute, useLensRoute, type LensDialog, type LensTab } from "./route";
|
||||
import { LensIntroDialog, useLensIntro } from "./onboarding/LensIntroDialog";
|
||||
import { OnboardingProvider, type Onboarding } from "./onboarding/OnboardingContext";
|
||||
import { traceRefOf, useOpenTraceRouting } from "@/components/view_logs/TraceView/traceRouting";
|
||||
import { traceRefOf, useOpenTraceRouting } from "@/components/lens/traces/routing";
|
||||
|
||||
type WorkspaceProps = { accessToken: string; userRole: string; readOnly: boolean };
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { createContext, useContext, useMemo, type ReactNode } from "react";
|
||||
import { apiClient } from "@/components/networking";
|
||||
import { liveTracesApi, TracesApiContext, type TracesApi } from "@/components/view_logs/TraceView/tracesApi";
|
||||
import { liveTracesApi, TracesApiContext, type TracesApi } from "@/components/lens/traces/api";
|
||||
import { liveLensApi, type LensApi } from "./service";
|
||||
|
||||
export interface LensServices {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ApiError } from "@/lib/http/client";
|
||||
import type { TracesApi } from "@/components/view_logs/TraceView/tracesApi";
|
||||
import type { TracesApi } from "@/components/lens/traces/api";
|
||||
import type { LensServices } from "../LensServices";
|
||||
import type { LensApi } from "../service";
|
||||
import { createLensDemoData, type LensDemoData } from "./fixtures";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Trace, Span, SpanDetail } from "@/components/view_logs/TraceView/traceTypes";
|
||||
import type { Trace, Span, SpanDetail } from "@/components/lens/traces/types";
|
||||
import type { Lens, Finding, Job, Settings } from "../../model/types";
|
||||
import { withReleaseCases } from "./lensDemoLongTrace";
|
||||
import { scenarios, type Scenario } from "./scenarios";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Span, SpanDetail, Trace } from "@/components/view_logs/TraceView/traceTypes";
|
||||
import type { Span, SpanDetail, Trace } from "@/components/lens/traces/types";
|
||||
|
||||
export function withReleaseCases(run: { trace: Trace; details: SpanDetail[] }) {
|
||||
const { trace } = run;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { isTracingNotEnabled, useTraceAvailability } from "@/components/view_logs/TraceView/useAgentTraces";
|
||||
import { isTracingNotEnabled, useTraceAvailability } from "@/components/lens/traces/list/useAgentTraces";
|
||||
import { useLensAccessToken, useLensApi } from "../data/LensServices";
|
||||
import { lensQueries } from "../data/queries";
|
||||
import { readiness, type Readiness, type ReadinessInput } from "../model/readiness";
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import { useQuery } from "@tanstack/react-query";
|
|||
|
||||
import { Inspector } from "@/components/shared/Inspector";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { RunView } from "@/components/view_logs/TraceView/TraceDrawer";
|
||||
import { useLocalRunSelection } from "@/components/view_logs/TraceView/traceRouting";
|
||||
import { RunView } from "@/components/lens/traces/detail/TraceDrawer";
|
||||
import { useLocalRunSelection } from "@/components/lens/traces/routing";
|
||||
|
||||
import { lensQueries } from "../data/queries";
|
||||
import { useLensAccessToken, useLensApi } from "../data/LensServices";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { fireEvent, screen, within } from "@testing-library/react";
|
|||
import userEvent from "@testing-library/user-event";
|
||||
import { afterEach, expect, it, vi } from "vitest";
|
||||
|
||||
import type { RunSelection } from "@/components/view_logs/TraceView/traceRouting";
|
||||
import type { RunSelection } from "@/components/lens/traces/routing";
|
||||
|
||||
import { renderWithLens } from "@/../tests/lens-test-utils";
|
||||
import { Inspector } from "@/components/shared/Inspector";
|
||||
|
|
@ -11,7 +11,7 @@ import type { OwnedFinding } from "../model/inbox";
|
|||
import type { Finding, Lens } from "../model/types";
|
||||
import { FindingPanel, ownedFindingKey } from "./FindingDetails";
|
||||
|
||||
vi.mock("@/components/view_logs/TraceView/TraceDrawer", () => ({
|
||||
vi.mock("@/components/lens/traces/detail/TraceDrawer", () => ({
|
||||
RunView: ({ traceId, selection }: { traceId: string; selection: RunSelection }) => (
|
||||
<div data-testid="run-view">
|
||||
{traceId} at {selection.spanId}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { ApiError } from "@/lib/http/client";
|
|||
import { apiClient } from "@/components/networking";
|
||||
import { lensKeys } from "../data/queries";
|
||||
import { InvestigationsView } from "./InvestigationsView";
|
||||
import { LensPreviewContext } from "@/components/view_logs/TraceView/LensPreviewButton";
|
||||
import { LensPreviewContext } from "@/components/lens/ui/LensPreviewButton";
|
||||
import { briefMarkdown } from "../model/findings";
|
||||
import { findingKey } from "../model/inbox";
|
||||
import { runTime } from "../model/format";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useQuery } from "@tanstack/react-query";
|
|||
import { Plus } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
import { LensPreviewButton } from "@/components/view_logs/TraceView/LensPreviewButton";
|
||||
import { LensPreviewButton } from "@/components/lens/ui/LensPreviewButton";
|
||||
|
||||
import { useInvalidateLenses } from "../data/mutations";
|
||||
import { lensQueries } from "../data/queries";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import { createContext, useContext } from "react";
|
||||
import type { TraceSummary } from "@/components/view_logs/TraceView/traceTypes";
|
||||
import type { TraceSummary } from "@/components/lens/traces/types";
|
||||
|
||||
export interface Onboarding {
|
||||
readonly readOnly: boolean;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import { useId, useRef, useState, type ReactNode } from "react";
|
||||
import { ArrowRight, ChevronDown } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { TracingSetupFields } from "@/components/view_logs/TraceView/TracingSetupCard";
|
||||
import { TracingSetupFields } from "@/components/lens/onboarding/tracing/TracingSetupCard";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
import { useLensAccessToken } from "../data/LensServices";
|
||||
import type { LensReadiness } from "../hooks/useLensReadiness";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import userEvent from "@testing-library/user-event";
|
|||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { chooseSelectOption, renderWithProviders } from "@/../tests/test-utils";
|
||||
import { copyToClipboard } from "@/utils/dataUtils";
|
||||
import { LensPreviewContext } from "./LensPreviewButton";
|
||||
import { agentTraceCall, apiClient, sendOtlpTraceCall } from "../../networking";
|
||||
import { LensPreviewContext } from "../../ui/LensPreviewButton";
|
||||
import { agentTraceCall, apiClient, sendOtlpTraceCall } from "../../../networking";
|
||||
import {
|
||||
codingAgentCommand,
|
||||
codingAgentPrompt,
|
||||
|
|
@ -14,9 +14,9 @@ import {
|
|||
TracingSetupCard,
|
||||
} from "./TracingSetupCard";
|
||||
import { FRAMEWORKS } from "./tracingSetupGuides";
|
||||
import type { Trace } from "./traceTypes";
|
||||
import type { Trace } from "../../traces/types";
|
||||
|
||||
vi.mock("../../networking", () => ({
|
||||
vi.mock("../../../networking", () => ({
|
||||
getProxyBaseUrl: () => "http://proxy.test/",
|
||||
sendOtlpTraceCall: vi.fn(),
|
||||
agentTraceCall: vi.fn(),
|
||||
|
|
@ -5,19 +5,19 @@ import { useState } from "react";
|
|||
import { useTimeout } from "usehooks-ts";
|
||||
|
||||
import { cn } from "@/lib/cva.config";
|
||||
import { LensPreviewButton } from "./LensPreviewButton";
|
||||
import { LensPreviewButton } from "../../ui/LensPreviewButton";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { copyToClipboard } from "@/utils/dataUtils";
|
||||
|
||||
import anthropicLogo from "../../../../public/assets/logos/anthropic.svg";
|
||||
import openaiLogo from "../../../../public/assets/logos/openai_small.svg";
|
||||
import otelLogo from "../../../../public/assets/logos/opentelemetry.svg";
|
||||
import { agentTraceCall, apiClient, getProxyBaseUrl, sendOtlpTraceCall } from "../../networking";
|
||||
import { ActiveDot } from "./ActiveDot";
|
||||
import anthropicLogo from "../../../../../public/assets/logos/anthropic.svg";
|
||||
import openaiLogo from "../../../../../public/assets/logos/openai_small.svg";
|
||||
import otelLogo from "../../../../../public/assets/logos/opentelemetry.svg";
|
||||
import { agentTraceCall, apiClient, getProxyBaseUrl, sendOtlpTraceCall } from "../../../networking";
|
||||
import { ActiveDot } from "../../traces/ui/ActiveDot";
|
||||
import { sampleTraceExport } from "./sampleTrace";
|
||||
import { FRAMEWORKS, frameworkSnippet, type FrameworkGuide } from "./tracingSetupGuides";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import type { TraceSummary } from "../../traces/types";
|
||||
|
||||
const COPIED_RESET_MS = 1500;
|
||||
const DOCS_URL = "https://docs.litellm.ai/docs/proxy/lens";
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
import langgraphLogo from "../../../../public/assets/logos/langgraph-color.svg";
|
||||
import langchainLogo from "../../../../public/assets/logos/langchain.svg";
|
||||
import openaiAgentsLogo from "../../../../public/assets/logos/openai-agents.svg";
|
||||
import anthropicLogo from "../../../../public/assets/logos/anthropic.svg";
|
||||
import crewaiLogo from "../../../../public/assets/logos/crewai-color.svg";
|
||||
import pydanticAiLogo from "../../../../public/assets/logos/pydantic-ai-color.svg";
|
||||
import llamaindexLogo from "../../../../public/assets/logos/llamaindex-color.svg";
|
||||
import vercelLogo from "../../../../public/assets/logos/vercel.svg";
|
||||
import otelLogo from "../../../../public/assets/logos/opentelemetry.svg";
|
||||
import langgraphLogo from "../../../../../public/assets/logos/langgraph-color.svg";
|
||||
import langchainLogo from "../../../../../public/assets/logos/langchain.svg";
|
||||
import openaiAgentsLogo from "../../../../../public/assets/logos/openai-agents.svg";
|
||||
import anthropicLogo from "../../../../../public/assets/logos/anthropic.svg";
|
||||
import crewaiLogo from "../../../../../public/assets/logos/crewai-color.svg";
|
||||
import pydanticAiLogo from "../../../../../public/assets/logos/pydantic-ai-color.svg";
|
||||
import llamaindexLogo from "../../../../../public/assets/logos/llamaindex-color.svg";
|
||||
import vercelLogo from "../../../../../public/assets/logos/vercel.svg";
|
||||
import otelLogo from "../../../../../public/assets/logos/opentelemetry.svg";
|
||||
|
||||
import adkLogo from "../../../../public/assets/logos/google-adk.png";
|
||||
import strandsLogo from "../../../../public/assets/logos/strands.svg";
|
||||
import hermesLogo from "../../../../public/assets/logos/hermes.png";
|
||||
import openclawLogo from "../../../../public/assets/logos/openclaw.png";
|
||||
import adkLogo from "../../../../../public/assets/logos/google-adk.png";
|
||||
import strandsLogo from "../../../../../public/assets/logos/strands.svg";
|
||||
import hermesLogo from "../../../../../public/assets/logos/hermes.png";
|
||||
import openclawLogo from "../../../../../public/assets/logos/openclaw.png";
|
||||
|
||||
export interface FrameworkGuide {
|
||||
id: string;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { parseAsBoolean, parseAsString, parseAsStringLiteral, useQueryStates } from "nuqs";
|
||||
import { useCallback } from "react";
|
||||
import { OPEN_TRACE_PARSERS, RUN_FILTER_PARSERS } from "@/components/view_logs/TraceView/traceRouting";
|
||||
import { OPEN_TRACE_PARSERS, RUN_FILTER_PARSERS } from "@/components/lens/traces/routing";
|
||||
|
||||
export const LENS_TABS = { traces: "Traces", investigations: "Investigations", settings: "Settings" } as const;
|
||||
export type LensTab = keyof typeof LENS_TABS;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
apiClient,
|
||||
getProxyBaseUrl,
|
||||
} from "../../networking";
|
||||
import type { SpanDetail, SpanErrorPage, Trace, TracePage } from "./traceTypes";
|
||||
import type { SpanDetail, SpanErrorPage, Trace, TracePage } from "./types";
|
||||
|
||||
export interface TraceWindow {
|
||||
readonly startMs: number;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { type KeyValue, KeyValueRows } from "./KeyValueRows";
|
||||
import { Card } from "./MessageCard";
|
||||
import type { Span } from "./traceTypes";
|
||||
import type { Span } from "../types";
|
||||
|
||||
interface AttributesDetailProps {
|
||||
traceId: string;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
"use client";
|
||||
import { useTracesApi } from "./tracesApi";
|
||||
import { useTracesApi } from "../api";
|
||||
|
||||
import { useQuery, type UseQueryOptions } from "@tanstack/react-query";
|
||||
import { useState } from "react";
|
||||
|
|
@ -10,9 +10,9 @@ import { cn } from "@/lib/cva.config";
|
|||
|
||||
import { type KeyValue, KeyValueRows, objectEntries } from "./KeyValueRows";
|
||||
import { Card, MessageCard, Section, ToolResultCard } from "./MessageCard";
|
||||
import type { ErrorSource } from "./traceTree";
|
||||
import type { Span, SpanDetail, SpanErrorPage, TraceMessage, UIContent, UIMessage } from "./traceTypes";
|
||||
import { errorSource, parseJson, parseMessages, prettyPayload } from "./traceUtils";
|
||||
import type { ErrorSource } from "../tree";
|
||||
import type { Span, SpanDetail, SpanErrorPage, TraceMessage, UIContent, UIMessage } from "../types";
|
||||
import { errorSource, parseJson, parseMessages, prettyPayload } from "../utils";
|
||||
|
||||
const ERROR_SOURCE_LABEL: Record<ErrorSource, string> = { tool: "Tool", model: "Model", litellm: "LiteLLM" };
|
||||
const TRACEBACK_MARKER = "Traceback (most recent call last):";
|
||||
|
|
@ -3,20 +3,20 @@ import userEvent from "@testing-library/user-event";
|
|||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { type ComponentProps, useState } from "react";
|
||||
|
||||
import { renderWithProviders, testQueryClient } from "../../../../tests/test-utils";
|
||||
import { renderWithProviders, testQueryClient } from "../../../../../tests/test-utils";
|
||||
import { DetailPane } from "./DetailPane";
|
||||
import type { SpanTab } from "./traceRouting";
|
||||
import type { SpanTab } from "../routing";
|
||||
import { absoluteTime, SpanHoverCard, spanFacts } from "./SpanHoverCard";
|
||||
import type { GroupRowData, SpanRowData } from "./traceTree";
|
||||
import type { Span, SpanDetail, SpanErrorPage, Trace } from "./traceTypes";
|
||||
import type { GroupRowData, SpanRowData } from "../tree";
|
||||
import type { Span, SpanDetail, SpanErrorPage, Trace } from "../types";
|
||||
|
||||
vi.mock("../../networking", () => ({
|
||||
vi.mock("../../../networking", () => ({
|
||||
agentTraceSpanCall: vi.fn(),
|
||||
agentTraceSpanErrorCall: vi.fn(),
|
||||
getProxyBaseUrl: () => "http://proxy.test/",
|
||||
}));
|
||||
|
||||
import { agentTraceSpanCall, agentTraceSpanErrorCall } from "../../networking";
|
||||
import { agentTraceSpanCall, agentTraceSpanErrorCall } from "../../../networking";
|
||||
|
||||
type SpanFields = Partial<Span> & Pick<Span, "span_id">;
|
||||
|
||||
|
|
@ -6,17 +6,17 @@ import { Button } from "@/components/ui/button";
|
|||
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
|
||||
|
||||
import { AttributesDetail } from "./AttributesDetail";
|
||||
import { CopyButton } from "./CopyButton";
|
||||
import { CopyButton } from "../ui/CopyButton";
|
||||
import { DetailContent, errorHeadline, useSpanDetail } from "./DetailContent";
|
||||
import { IdChip } from "./IdChip";
|
||||
import { PaneBar } from "./PaneBar";
|
||||
import { IdChip } from "../ui/IdChip";
|
||||
import { PaneBar } from "../ui/PaneBar";
|
||||
import { RequestDetail } from "./RequestDetail";
|
||||
import { SpanIcon } from "./SpanIcon";
|
||||
import { useTracesApi } from "./tracesApi";
|
||||
import { SPAN_TABS, type SpanTab } from "./traceRouting";
|
||||
import type { GroupRowData, TreeRow } from "./traceTree";
|
||||
import type { Span, SpanType, Trace } from "./traceTypes";
|
||||
import { fmtMs, fmtTok } from "./traceUtils";
|
||||
import { SpanIcon } from "../ui/SpanIcon";
|
||||
import { useTracesApi } from "../api";
|
||||
import { SPAN_TABS, type SpanTab } from "../routing";
|
||||
import type { GroupRowData, TreeRow } from "../tree";
|
||||
import type { Span, SpanType, Trace } from "../types";
|
||||
import { fmtMs, fmtTok } from "../utils";
|
||||
|
||||
interface SpanTabProps {
|
||||
spanTab: SpanTab;
|
||||
|
|
@ -4,7 +4,7 @@ import { useState } from "react";
|
|||
|
||||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import { FoldChevron } from "./Collapse";
|
||||
import { FoldChevron } from "../ui/Collapse";
|
||||
|
||||
const LONG_VALUE_CHARS = 90;
|
||||
const ID_KEY = /(^|_)id$/i;
|
||||
|
|
@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
|||
|
||||
import { MessageCard, Section, ToolResultCard } from "./MessageCard";
|
||||
|
||||
vi.mock("./spanProvider", () => ({ useSpanProvider: () => null }));
|
||||
vi.mock("../ui/spanProvider", () => ({ useSpanProvider: () => null }));
|
||||
|
||||
const LONG_QUERY = "Find every invoice for the customer that was billed twice. ".repeat(3).trim();
|
||||
|
||||
|
|
@ -7,10 +7,10 @@ import remarkGfm from "remark-gfm";
|
|||
|
||||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import { FoldChevron } from "./Collapse";
|
||||
import { CopyButton } from "./CopyButton";
|
||||
import { FoldChevron } from "../ui/Collapse";
|
||||
import { CopyButton } from "../ui/CopyButton";
|
||||
import { displayValue, type KeyValue, KeyValueRows, objectEntries } from "./KeyValueRows";
|
||||
import type { TraceMessage, TraceToolCall } from "./traceTypes";
|
||||
import type { TraceMessage, TraceToolCall } from "../types";
|
||||
|
||||
const ROLE_LABEL: Record<string, string> = { user: "User", system: "System", assistant: "Assistant", tool: "Tool" };
|
||||
|
||||
|
|
@ -5,13 +5,13 @@ import { useState } from "react";
|
|||
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
import { LogDetailsDrawer } from "../LogDetailsDrawer";
|
||||
import { formatCost } from "./AgentTracesTable";
|
||||
import { LogDetailsDrawer } from "../../../view_logs/LogDetailsDrawer";
|
||||
import { formatCost } from "../list/AgentTracesTable";
|
||||
import { DetailGroup } from "./AttributesDetail";
|
||||
import { CopyButton } from "./CopyButton";
|
||||
import { CopyButton } from "../ui/CopyButton";
|
||||
import { type KeyValue, KeyValueRows } from "./KeyValueRows";
|
||||
import type { Span } from "./traceTypes";
|
||||
import { fmtMs, fmtTok } from "./traceUtils";
|
||||
import type { Span } from "../types";
|
||||
import { fmtMs, fmtTok } from "../utils";
|
||||
import { useSpanRequestLog } from "./useSpanRequestLog";
|
||||
|
||||
interface RequestDetailProps {
|
||||
|
|
@ -4,12 +4,12 @@ import { Check } from "lucide-react";
|
|||
|
||||
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@/components/ui/hover-card";
|
||||
|
||||
import { formatCost } from "./AgentTracesTable";
|
||||
import { formatCost } from "../list/AgentTracesTable";
|
||||
import { errorHeadline } from "./DetailContent";
|
||||
import { SpanIcon } from "./SpanIcon";
|
||||
import type { GroupRowData } from "./traceTree";
|
||||
import type { Span, SpanType } from "./traceTypes";
|
||||
import { fmtMs, fmtTok } from "./traceUtils";
|
||||
import { SpanIcon } from "../ui/SpanIcon";
|
||||
import type { GroupRowData } from "../tree";
|
||||
import type { Span, SpanType } from "../types";
|
||||
import { fmtMs, fmtTok } from "../utils";
|
||||
|
||||
export const HOVER_OPEN_DELAY_MS = 300;
|
||||
const HOVER_CLOSE_DELAY_MS = 100;
|
||||
|
|
@ -15,13 +15,13 @@ import {
|
|||
} from "@/components/ui/dropdown-menu";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import { FoldChevron } from "./Collapse";
|
||||
import { PaneBar } from "./PaneBar";
|
||||
import { FoldChevron } from "../ui/Collapse";
|
||||
import { PaneBar } from "../ui/PaneBar";
|
||||
import { groupFacts, SpanHoverCard, spanFacts } from "./SpanHoverCard";
|
||||
import { SpanIcon } from "./SpanIcon";
|
||||
import type { GroupRowData, SpanRowData, TreeRow } from "./traceTree";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import { fmtMs, previewText, type TreeGuide, treeGuides } from "./traceUtils";
|
||||
import { SpanIcon } from "../ui/SpanIcon";
|
||||
import type { GroupRowData, SpanRowData, TreeRow } from "../tree";
|
||||
import type { TraceSummary } from "../types";
|
||||
import { fmtMs, previewText, type TreeGuide, treeGuides } from "../utils";
|
||||
|
||||
interface SpanTreeProps {
|
||||
rows: TreeRow[];
|
||||
|
|
@ -2,19 +2,19 @@ import { act, screen, waitFor, within } from "@testing-library/react";
|
|||
import userEvent from "@testing-library/user-event";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { ComponentProps } from "react";
|
||||
import { renderWithProviders, testQueryClient } from "../../../../tests/test-utils";
|
||||
import { renderWithProviders, testQueryClient } from "../../../../../tests/test-utils";
|
||||
import { RunView } from "./TraceDrawer";
|
||||
import { useOpenTraceRouting } from "./traceRouting";
|
||||
import { useOpenTraceRouting } from "../routing";
|
||||
import { TraceConversation } from "./TraceConversation";
|
||||
import type { SpanDetail, Trace } from "./traceTypes";
|
||||
import research from "./__fixtures__/research_trace.json";
|
||||
import type { SpanDetail, Trace } from "../types";
|
||||
import research from "../__fixtures__/research_trace.json";
|
||||
|
||||
vi.mock("../../networking", () => ({
|
||||
vi.mock("../../../networking", () => ({
|
||||
agentTraceCall: vi.fn(),
|
||||
agentTraceSpanCall: vi.fn(),
|
||||
getProxyBaseUrl: () => "http://proxy.test",
|
||||
}));
|
||||
import { agentTraceCall, agentTraceSpanCall } from "../../networking";
|
||||
import { agentTraceCall, agentTraceSpanCall } from "../../../networking";
|
||||
|
||||
function RoutedRunView(props: Omit<ComponentProps<typeof RunView>, "selection">) {
|
||||
const { selection } = useOpenTraceRouting();
|
||||
|
|
@ -4,14 +4,14 @@ import { useQueries } from "@tanstack/react-query";
|
|||
import { useState } from "react";
|
||||
import { ChevronRight, Wrench } from "lucide-react";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
import { CopyButton } from "./CopyButton";
|
||||
import { useTracesApi } from "./tracesApi";
|
||||
import { CopyButton } from "../ui/CopyButton";
|
||||
import { useTracesApi } from "../api";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { buildConversation, conversationSteps, CONVERSATION_PAGE_SIZE, type ConversationItem } from "./conversation";
|
||||
import { ErrorBlock } from "./DetailContent";
|
||||
import { Markdown, ToolCallBlock } from "./MessageCard";
|
||||
import type { SpanDetail, Trace, TraceMessage } from "./traceTypes";
|
||||
import { fmtMs } from "./traceUtils";
|
||||
import type { SpanDetail, Trace, TraceMessage } from "../types";
|
||||
import { fmtMs } from "../utils";
|
||||
|
||||
export function TraceConversation({
|
||||
trace,
|
||||
|
|
@ -3,19 +3,19 @@ import { focusManager, onlineManager } from "@tanstack/react-query";
|
|||
import userEvent from "@testing-library/user-event";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { renderWithProviders, testQueryClient } from "../../../../tests/test-utils";
|
||||
import researchTrace from "./__fixtures__/research_trace.json";
|
||||
import swarmTrace from "./__fixtures__/swarm_trace.json";
|
||||
import { renderWithProviders, testQueryClient } from "../../../../../tests/test-utils";
|
||||
import researchTrace from "../__fixtures__/research_trace.json";
|
||||
import swarmTrace from "../__fixtures__/swarm_trace.json";
|
||||
import type { ComponentProps } from "react";
|
||||
import { ShortcutHints } from "@/components/shared/ShortcutHints";
|
||||
import { initialRunSelection, RunView } from "./TraceDrawer";
|
||||
import { useOpenTraceRouting } from "./traceRouting";
|
||||
import { agentHandoffText } from "./tracesApi";
|
||||
import type { Span } from "./traceTypes";
|
||||
import type { Trace } from "./traceTypes";
|
||||
import { traceDisplayName } from "./traceUtils";
|
||||
import { useOpenTraceRouting } from "../routing";
|
||||
import { agentHandoffText } from "../api";
|
||||
import type { Span } from "../types";
|
||||
import type { Trace } from "../types";
|
||||
import { traceDisplayName } from "../utils";
|
||||
|
||||
vi.mock("../../networking", () => ({
|
||||
vi.mock("../../../networking", () => ({
|
||||
agentTraceCall: vi.fn(),
|
||||
agentTraceSpanCall: vi.fn(),
|
||||
getProxyBaseUrl: () => "http://proxy.test/",
|
||||
|
|
@ -36,7 +36,7 @@ vi.mock("@/utils/dataUtils", () => ({ copyToClipboard: vi.fn().mockResolvedValue
|
|||
|
||||
import { copyToClipboard } from "@/utils/dataUtils";
|
||||
|
||||
import { agentTraceCall } from "../../networking";
|
||||
import { agentTraceCall } from "../../../networking";
|
||||
|
||||
const swarm = swarmTrace as Trace;
|
||||
const research = researchTrace as Trace;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
"use client";
|
||||
import { type TraceHandoff, useTracesApi } from "./tracesApi";
|
||||
import { type TraceHandoff, useTracesApi } from "../api";
|
||||
|
||||
import { QueryErrorResetBoundary, useQueryClient, useSuspenseInfiniteQuery } from "@tanstack/react-query";
|
||||
import { ArrowLeft, Check, Copy } from "lucide-react";
|
||||
|
|
@ -15,15 +15,15 @@ import { cn } from "@/lib/cva.config";
|
|||
import { copyToClipboard } from "@/utils/dataUtils";
|
||||
|
||||
import { DetailPane } from "./DetailPane";
|
||||
import { IdChip } from "./IdChip";
|
||||
import { formatCost } from "./AgentTracesTable";
|
||||
import { SpanIcon } from "./SpanIcon";
|
||||
import { IdChip } from "../ui/IdChip";
|
||||
import { formatCost } from "../list/AgentTracesTable";
|
||||
import { SpanIcon } from "../ui/SpanIcon";
|
||||
import { SpanTree } from "./SpanTree";
|
||||
import { TraceConversation } from "./TraceConversation";
|
||||
import { FrameworkLogo, traceFramework } from "./TraceFramework";
|
||||
import { type RunSelection, traceKey } from "./traceRouting";
|
||||
import type { SpanTreeState, TreeRow } from "./traceTree";
|
||||
import type { Trace } from "./traceTypes";
|
||||
import { FrameworkLogo, traceFramework } from "../ui/TraceFramework";
|
||||
import { type RunSelection, traceKey } from "../routing";
|
||||
import type { SpanTreeState, TreeRow } from "../tree";
|
||||
import type { Trace } from "../types";
|
||||
import {
|
||||
buildTreeRows,
|
||||
firstErrorSpan,
|
||||
|
|
@ -36,7 +36,7 @@ import {
|
|||
revealSpanInState,
|
||||
traceAgentNames,
|
||||
traceDisplayName,
|
||||
} from "./traceUtils";
|
||||
} from "../utils";
|
||||
|
||||
const INITIAL_STATE: SpanTreeState = {
|
||||
hideFramework: true,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { buildConversation, conversationSteps, newConversationMessages } from "./conversation";
|
||||
import type { Span, SpanDetail, TraceMessage } from "./traceTypes";
|
||||
import research from "./__fixtures__/research_trace.json";
|
||||
import type { Span, SpanDetail, TraceMessage } from "../types";
|
||||
import research from "../__fixtures__/research_trace.json";
|
||||
|
||||
const root = { ...research.spans[0], span_id: "root", parent_span_id: null, type: "agent" } as Span;
|
||||
const user: TraceMessage = { role: "user", content: "Find my order" };
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Span, SpanDetail, TraceMessage, TraceToolCall, UIContent } from "./traceTypes";
|
||||
import { isFrameworkSpan, parseJson, parseMessages, prettyPayload } from "./traceUtils";
|
||||
import type { Span, SpanDetail, TraceMessage, TraceToolCall, UIContent } from "../types";
|
||||
import { isFrameworkSpan, parseJson, parseMessages, prettyPayload } from "../utils";
|
||||
|
||||
export const CONVERSATION_PAGE_SIZE = 20;
|
||||
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
import { useQuery, type UseQueryOptions } from "@tanstack/react-query";
|
||||
import moment from "moment";
|
||||
|
||||
import { uiSpendLogsCall } from "../../networking";
|
||||
import type { LogEntry } from "../columns";
|
||||
import { uiSpendLogsCall } from "../../../networking";
|
||||
import type { LogEntry } from "../../../view_logs/columns";
|
||||
|
||||
/** Spend-log timestamps are written when the call finishes, so pad the span start on both sides. */
|
||||
const LOOKUP_PAD_MINUTES = 30;
|
||||
|
|
@ -4,8 +4,8 @@ import moment from "moment";
|
|||
import { useMemo, useState } from "react";
|
||||
|
||||
import { AgentTracesSection } from "./AgentTracesSection";
|
||||
import { useTracesLive } from "./tracesApi";
|
||||
import { useRangeHoursRouting } from "./traceRouting";
|
||||
import { useTracesLive } from "../api";
|
||||
import { useRangeHoursRouting } from "../routing";
|
||||
|
||||
const TIME_FORMAT = "YYYY-MM-DDTHH:mm:ss";
|
||||
|
||||
|
|
@ -5,15 +5,15 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|||
|
||||
import { ApiError } from "@/lib/http/client";
|
||||
|
||||
import { renderWithProviders, testQueryClient } from "../../../../tests/test-utils";
|
||||
import traceList from "./__fixtures__/trace_list.json";
|
||||
import { LensPreviewContext } from "./LensPreviewButton";
|
||||
import { renderWithProviders, testQueryClient } from "../../../../../tests/test-utils";
|
||||
import traceList from "../__fixtures__/trace_list.json";
|
||||
import { LensPreviewContext } from "../../ui/LensPreviewButton";
|
||||
import AgentTracesPage from "./AgentTracesPage";
|
||||
import { filterRuns } from "./runSearch/runQuery";
|
||||
import { AgentTracesSection, type TimeControls } from "./AgentTracesSection";
|
||||
import type { TracePage, TraceSummary } from "./traceTypes";
|
||||
import type { TracePage, TraceSummary } from "../types";
|
||||
|
||||
vi.mock("../../networking", () => ({
|
||||
vi.mock("../../../networking", () => ({
|
||||
apiClient: { get: vi.fn(), post: vi.fn() },
|
||||
agentTraceListCall: vi.fn(),
|
||||
sendOtlpTraceCall: vi.fn(),
|
||||
|
|
@ -22,7 +22,7 @@ vi.mock("../../networking", () => ({
|
|||
getProxyBaseUrl: () => "http://localhost:4000",
|
||||
}));
|
||||
|
||||
vi.mock("./TraceDrawer", () => ({
|
||||
vi.mock("../detail/TraceDrawer", () => ({
|
||||
RunView: ({ traceId, onBack }: { traceId: string; onBack: () => void }) => (
|
||||
<div data-testid="run-view">
|
||||
run {traceId}
|
||||
|
|
@ -31,7 +31,7 @@ vi.mock("./TraceDrawer", () => ({
|
|||
),
|
||||
}));
|
||||
|
||||
import { agentTraceListCall, apiClient } from "../../networking";
|
||||
import { agentTraceListCall, apiClient } from "../../../networking";
|
||||
|
||||
const runs = (traceList as TracePage).data as TraceSummary[];
|
||||
|
||||
|
|
@ -16,13 +16,13 @@ import {
|
|||
useOpenTraceRouting,
|
||||
useRunFilterRouting,
|
||||
useZoomRouting,
|
||||
} from "./traceRouting";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import { RunView } from "./TraceDrawer";
|
||||
} from "../routing";
|
||||
import type { TraceSummary } from "../types";
|
||||
import { RunView } from "../detail/TraceDrawer";
|
||||
import { TimeRangeControls } from "./TimeRangeControls";
|
||||
import { TracesTimeline, type TimeWindow } from "./TracesTimeline";
|
||||
import { TracingSetupCard } from "./TracingSetupCard";
|
||||
import { useTracesLive } from "./tracesApi";
|
||||
import { TracingSetupCard } from "../../onboarding/tracing/TracingSetupCard";
|
||||
import { useTracesLive } from "../api";
|
||||
import { type AgentTracesResult, traceWindowStartMs, useAgentTraces, useTraceAvailability } from "./useAgentTraces";
|
||||
|
||||
const DRAWER_WIDTH_KEY = "litellm.agentTraces.drawerWidth";
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import { fireEvent, render, screen } from "@testing-library/react";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { renderWithProviders } from "../../../../tests/test-utils";
|
||||
import { renderWithProviders } from "../../../../../tests/test-utils";
|
||||
import { Inspector } from "@/components/shared/Inspector";
|
||||
import traceList from "./__fixtures__/trace_list.json";
|
||||
import traceList from "../__fixtures__/trace_list.json";
|
||||
import { AgentTracesTable } from "./AgentTracesTable";
|
||||
import { traceKey } from "./traceRouting";
|
||||
import type { TracePage, TraceSummary } from "./traceTypes";
|
||||
import { traceKey } from "../routing";
|
||||
import type { TracePage, TraceSummary } from "../types";
|
||||
|
||||
const inList = (table: React.ReactElement) => (
|
||||
<Inspector.Root
|
||||
|
|
@ -9,12 +9,12 @@ import { InspectorTable, useInspectorTable } from "@/components/shared/Inspector
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { formatActivityTimestamp, formatRunTimestamp, localTimeZoneAbbreviation } from "@/utils/activityTimestamp";
|
||||
|
||||
import { SpanIcon } from "./SpanIcon";
|
||||
import { StatusMark } from "./StatusMark";
|
||||
import { FrameworkLogo, traceFramework } from "./TraceFramework";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import { traceRefOf } from "./traceRouting";
|
||||
import { fmtMs, previewText, traceDisplayName, traceAgentNames } from "./traceUtils";
|
||||
import { SpanIcon } from "../ui/SpanIcon";
|
||||
import { StatusMark } from "../ui/StatusMark";
|
||||
import { FrameworkLogo, traceFramework } from "../ui/TraceFramework";
|
||||
import type { TraceSummary } from "../types";
|
||||
import { traceRefOf } from "../routing";
|
||||
import { fmtMs, previewText, traceDisplayName, traceAgentNames } from "../utils";
|
||||
|
||||
interface AgentTracesTableProps {
|
||||
traces: TraceSummary[];
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { bandForWindow, bucketRuns, dragUpdate, formatSpan } from "./TracesTimeline";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import type { TraceSummary } from "../types";
|
||||
|
||||
const HOUR = 3600 * 1000;
|
||||
const START = Date.UTC(2026, 8, 30, 0, 0, 0);
|
||||
|
|
@ -9,8 +9,8 @@ import { DotFieldCanvas, DotFieldRoot } from "@/components/shared/dotField/DotFi
|
|||
import type { DotBand, DotColumn } from "@/components/shared/dotField/dots";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import { traceAgentNames } from "./traceUtils";
|
||||
import type { TraceSummary } from "../types";
|
||||
import { traceAgentNames } from "../utils";
|
||||
|
||||
const BUCKETS = 60;
|
||||
const TICKS = 6;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { useMemo } from "react";
|
||||
|
||||
import type { TraceSummary } from "../traceTypes";
|
||||
import type { TraceSummary } from "../../types";
|
||||
import type { TimeWindow } from "../TracesTimeline";
|
||||
|
||||
import { SearchBox } from "@/components/shared/search/SearchBox";
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import type { TraceSummary } from "../traceTypes";
|
||||
import type { TraceSummary } from "../../types";
|
||||
import type { TimeWindow } from "../TracesTimeline";
|
||||
|
||||
import { RunSearch } from "./RunSearch";
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import type { TraceSummary } from "../../traceTypes";
|
||||
import type { TraceSummary } from "../../../types";
|
||||
|
||||
export const run = (overrides: Partial<TraceSummary>): TraceSummary => ({
|
||||
agent_count: 1,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { Bot, Box, Braces, CircleDashed, Hash, SquareChevronRight } from "lucide-react";
|
||||
|
||||
import type { TraceSummary } from "../traceTypes";
|
||||
import { previewText, traceAgentNames } from "../traceUtils";
|
||||
import type { TraceSummary } from "../../types";
|
||||
import { previewText, traceAgentNames } from "../../utils";
|
||||
|
||||
import { type ClientIndex, filterItems } from "@/components/shared/search/evaluate";
|
||||
import type { FieldSpec, QueryLanguage } from "@/components/shared/search/language";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { traceWindowStartMs } from "./useAgentTraces";
|
||||
import { spanLogWindow } from "./useSpanRequestLog";
|
||||
import { spanLogWindow } from "../detail/useSpanRequestLog";
|
||||
|
||||
const HOUR = 3600 * 1000;
|
||||
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
import { useTracesApi } from "./tracesApi";
|
||||
import { useTracesApi } from "../api";
|
||||
import { useInfiniteQuery, useQuery, type UseQueryOptions } from "@tanstack/react-query";
|
||||
import moment from "moment";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { ApiError } from "@/lib/http/client";
|
||||
|
||||
import { LIVE_TAIL_INTERVAL_MS } from "../log_filter_logic";
|
||||
import type { TracePage, TraceSummary } from "./traceTypes";
|
||||
import type { TraceWindow } from "./tracesApi";
|
||||
import type { TracePage, TraceSummary } from "../types";
|
||||
import type { TraceWindow } from "../api";
|
||||
|
||||
const LIVE_TAIL_INTERVAL_MS = 15000;
|
||||
|
||||
interface LoadedTracePage extends TracePage {
|
||||
window: TraceWindow;
|
||||
|
|
@ -9,9 +9,9 @@ import {
|
|||
} from "nuqs";
|
||||
import { useCallback, useState } from "react";
|
||||
|
||||
import { RANGE_PRESETS } from "./TimeRangeControls";
|
||||
import type { TimeWindow } from "./TracesTimeline";
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import { RANGE_PRESETS } from "./list/TimeRangeControls";
|
||||
import type { TimeWindow } from "./list/TracesTimeline";
|
||||
import type { TraceSummary } from "./types";
|
||||
|
||||
export const TRACE_VIEWS = ["steps", "conversation"] as const;
|
||||
export type TraceView = (typeof TRACE_VIEWS)[number];
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/**
|
||||
* Shared contract for the agent run view (span tree + detail pane).
|
||||
* Rows are produced by `buildTreeRows` in traceUtils.ts and rendered by SpanTree / DetailPane.
|
||||
* Rows are produced by `buildTreeRows` in utils.ts and rendered by SpanTree / DetailPane.
|
||||
*/
|
||||
import type { Span, SpanType } from "./traceTypes";
|
||||
import type { Span, SpanType } from "./types";
|
||||
|
||||
export type ErrorSource = "model" | "tool" | "litellm";
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ import { Logo } from "@/components/molecules/logo/Logo";
|
|||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import { useSpanProvider } from "./spanProvider";
|
||||
import type { SpanType } from "./traceTypes";
|
||||
import type { SpanType } from "../types";
|
||||
|
||||
const SIZE = {
|
||||
sm: "size-4 rounded-sm",
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
import anthropicLogo from "../../../../public/assets/logos/anthropic.svg";
|
||||
import crewaiLogo from "../../../../public/assets/logos/crewai-color.svg";
|
||||
import cursorLogo from "../../../../public/assets/logos/cursor.svg";
|
||||
import copilotLogo from "../../../../public/assets/logos/github_copilot.svg";
|
||||
import googleAdkLogo from "../../../../public/assets/logos/google-adk.png";
|
||||
import langchainLogo from "../../../../public/assets/logos/langchain.svg";
|
||||
import langgraphLogo from "../../../../public/assets/logos/langgraph-color.svg";
|
||||
import llamaIndexLogo from "../../../../public/assets/logos/llamaindex-color.svg";
|
||||
import openaiLogo from "../../../../public/assets/logos/openai_small.svg";
|
||||
import openaiAgentsLogo from "../../../../public/assets/logos/openai-agents.svg";
|
||||
import pydanticAiLogo from "../../../../public/assets/logos/pydantic-ai-color.svg";
|
||||
import strandsLogo from "../../../../public/assets/logos/strands.svg";
|
||||
import vercelLogo from "../../../../public/assets/logos/vercel.svg";
|
||||
import anthropicLogo from "../../../../../public/assets/logos/anthropic.svg";
|
||||
import crewaiLogo from "../../../../../public/assets/logos/crewai-color.svg";
|
||||
import cursorLogo from "../../../../../public/assets/logos/cursor.svg";
|
||||
import copilotLogo from "../../../../../public/assets/logos/github_copilot.svg";
|
||||
import googleAdkLogo from "../../../../../public/assets/logos/google-adk.png";
|
||||
import langchainLogo from "../../../../../public/assets/logos/langchain.svg";
|
||||
import langgraphLogo from "../../../../../public/assets/logos/langgraph-color.svg";
|
||||
import llamaIndexLogo from "../../../../../public/assets/logos/llamaindex-color.svg";
|
||||
import openaiLogo from "../../../../../public/assets/logos/openai_small.svg";
|
||||
import openaiAgentsLogo from "../../../../../public/assets/logos/openai-agents.svg";
|
||||
import pydanticAiLogo from "../../../../../public/assets/logos/pydantic-ai-color.svg";
|
||||
import strandsLogo from "../../../../../public/assets/logos/strands.svg";
|
||||
import vercelLogo from "../../../../../public/assets/logos/vercel.svg";
|
||||
import { Logo } from "@/components/molecules/logo/Logo";
|
||||
import { cn } from "@/lib/cva.config";
|
||||
|
||||
import type { TraceSummary } from "./traceTypes";
|
||||
import type { TraceSummary } from "../types";
|
||||
|
||||
export interface TraceFramework {
|
||||
readonly id: string;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { useTracesLive } from "./tracesApi";
|
||||
import { useTracesLive } from "../api";
|
||||
import { useModelCostMap } from "@/app/(dashboard)/hooks/models/useModelCostMap";
|
||||
import { getProviderLogoAndName } from "@/components/provider_info_helpers";
|
||||
|
||||
|
|
@ -3,8 +3,8 @@ import { describe, expect, it } from "vitest";
|
|||
import deepAgentTrace from "./__fixtures__/deep_agent_trace.json";
|
||||
import researchTrace from "./__fixtures__/research_trace.json";
|
||||
import swarmTrace from "./__fixtures__/swarm_trace.json";
|
||||
import { type SpanTreeState, type TreeRow } from "./traceTree";
|
||||
import type { Span, Trace } from "./traceTypes";
|
||||
import { type SpanTreeState, type TreeRow } from "./tree";
|
||||
import type { Span, Trace } from "./types";
|
||||
import {
|
||||
buildTreeRows,
|
||||
buildVisibleTree,
|
||||
|
|
@ -22,7 +22,7 @@ import {
|
|||
revealSpanInState,
|
||||
ROOT_KEY,
|
||||
treeGuides,
|
||||
} from "./traceUtils";
|
||||
} from "./utils";
|
||||
|
||||
const swarm = swarmTrace as Trace;
|
||||
const research = researchTrace as Trace;
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
* Pure helpers for the agent trace views. No React in here: everything the span tree
|
||||
* computes lives here so it can be unit-tested directly.
|
||||
*/
|
||||
import { type ErrorSource, type SpanTreeState, type TreeRow } from "./traceTree";
|
||||
import type { Span, TraceMessage, TraceSummary } from "./traceTypes";
|
||||
import { type ErrorSource, type SpanTreeState, type TreeRow } from "./tree";
|
||||
import type { Span, TraceMessage, TraceSummary } from "./types";
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Formatting */
|
||||
|
|
@ -117,7 +117,7 @@ import type { ComplexityRouterConfigPayload } from "./add_model/build_complexity
|
|||
import type { AutoRouterPresetsResponse } from "@/lib/autorouter_presets";
|
||||
import type { VectorStoreIndex } from "@/app/(dashboard)/vector-stores/_components/IndexesTab";
|
||||
import type { RoutingDecision } from "./view_logs/LogDetailsDrawer/RoutingDecisionCard";
|
||||
import type { SpanDetail, SpanErrorPage, Trace, TracePage } from "./view_logs/TraceView/traceTypes";
|
||||
import type { SpanDetail, SpanErrorPage, Trace, TracePage } from "./lens/traces/types";
|
||||
import {
|
||||
createApiClient,
|
||||
deriveErrorMessage,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { expectTypeOf, test } from "vitest";
|
||||
import type { components } from "./schema";
|
||||
import type { getClaudeCodePluginsList, userListCall } from "@/components/networking";
|
||||
import type { TraceMessage, UIMessage } from "@/components/view_logs/TraceView/traceTypes";
|
||||
import type { TraceMessage, UIMessage } from "@/components/lens/traces/types";
|
||||
import type { TagNewRequest, TagUpdateRequest } from "@/components/tag_management/types";
|
||||
|
||||
test("API read functions expose the generated response contracts", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue