chore(auto): task completed - unknown
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export { Channel, Guild } from "../../shared/api/client";
|
||||
@@ -1 +0,0 @@
|
||||
export { MediaItem, MediaMode, MediaState } from "../../shared/api/client";
|
||||
@@ -1 +0,0 @@
|
||||
export { DashboardTab, UIState } from "../../shared/api/client";
|
||||
@@ -1 +0,0 @@
|
||||
export { ActiveSpeaker, VoiceStatus } from "../../shared/api/client";
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ActiveSpeaker } from "../../../shared/api/client";
|
||||
import { EmptyStateMascot, Skeleton } from "../../../shared/ui";
|
||||
import { Skeleton } from "../../../shared/ui";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/MascotImage";
|
||||
|
||||
interface ActiveSpeakersProps {
|
||||
speakers: ActiveSpeaker[];
|
||||
@@ -38,7 +39,7 @@ export function ActiveSpeakers({ speakers }: ActiveSpeakersProps) {
|
||||
);
|
||||
}
|
||||
|
||||
export function ActiveSpeakersSkeleton() {
|
||||
function ActiveSpeakersSkeleton() {
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3].map((i) => (
|
||||
|
||||
@@ -5,7 +5,8 @@ import { useEffect, useState } from "react";
|
||||
import type { VoiceRecording } from "../../../shared/api/client";
|
||||
import { listRecordings } from "../../../shared/api/client";
|
||||
import { formatBytes, formatDate } from "../../../shared/lib/utils";
|
||||
import { Badge, Button, EmptyStateMascot, Skeleton } from "../../../shared/ui";
|
||||
import { Badge, Button, Skeleton } from "../../../shared/ui";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/MascotImage";
|
||||
|
||||
export function RecordingsSubPanel() {
|
||||
const [recordings, setRecordings] = useState<VoiceRecording[]>([]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { parseMetadata } from "../../../entities/message/types";
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import { EmptyStateMascot } from "../../../shared/ui";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/MascotImage";
|
||||
|
||||
interface ImageItem {
|
||||
url: string;
|
||||
@@ -75,7 +75,7 @@ export function ImageGrid({ messages }: { messages: MessageRecord[] }) {
|
||||
<div className="grid gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4">
|
||||
{images.map((image, index) => {
|
||||
// Stable key using message.id + url
|
||||
const stableKey = `${image.message.id}-${image.kind}-${index}`;
|
||||
const stableKey = `${image.message.id}-${image.kind}-${image.url}`;
|
||||
return (
|
||||
<a
|
||||
key={stableKey}
|
||||
|
||||
@@ -2,7 +2,8 @@ import { motion } from "framer-motion";
|
||||
import { useEffect, useMemo, useRef } from "react";
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import { cardItem, cardStagger } from "../../../shared/hooks/useFramerStagger";
|
||||
import { EmptyStateMascot, ScrollArea } from "../../../shared/ui";
|
||||
import { ScrollArea } from "../../../shared/ui";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/MascotImage";
|
||||
import { MessageCard, MessageCardSkeleton } from "./MessageCard";
|
||||
|
||||
export interface MessageFeedProps {
|
||||
|
||||
@@ -6,7 +6,6 @@ import { createLogger } from "../lib/logger.js";
|
||||
const logger = createLogger("api");
|
||||
|
||||
const BE_API_URL = import.meta.env.VITE_BE_API_URL || "http://localhost:3001";
|
||||
const BE_WS_URL = import.meta.env.VITE_BE_WS_URL || "ws://localhost:3001";
|
||||
|
||||
class ApiError extends Error {
|
||||
code: string;
|
||||
@@ -52,10 +51,6 @@ export async function request<T>(path: string, init?: RequestInit): Promise<T> {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function getWebSocketURL(): string {
|
||||
return BE_WS_URL;
|
||||
}
|
||||
|
||||
export function getAPIURL(): string {
|
||||
return BE_API_URL;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// ─── Audio transmit hook — captures mic, encodes to PCM, sends via WebSocket ──
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
import { getAPIURL } from "../api/client.js";
|
||||
import { createChildLogger } from "../logger.js";
|
||||
import { createLogger } from "../lib/logger";
|
||||
|
||||
const SAMPLE_RATE = 24000;
|
||||
const logger = createChildLogger("useAudioTransmit");
|
||||
const logger = createLogger("useAudioTransmit");
|
||||
|
||||
async function sendTransmitCommand(command: string): Promise<void> {
|
||||
// Send via HTTP API (kept as exported function for backward compatibility)
|
||||
|
||||
@@ -99,7 +99,7 @@ export function useGsapTransition(tabKey: string) {
|
||||
return { pageRef, animateIn, animateOut };
|
||||
}
|
||||
|
||||
export function gsapCardHover() {
|
||||
function gsapCardHover() {
|
||||
return {
|
||||
onMouseEnter: (e: React.MouseEvent<HTMLElement>) => {
|
||||
gsap.to(e.currentTarget, {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useCallback, useState } from "react";
|
||||
import type { ChatResponse } from "../api/client";
|
||||
import { request } from "../api/client";
|
||||
import { createChildLogger } from "../logger";
|
||||
import { createLogger } from "../lib/logger";
|
||||
|
||||
const logger = createChildLogger("useMascotChat");
|
||||
const logger = createLogger("useMascotChat");
|
||||
|
||||
export interface ChatContext {
|
||||
messageCount: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback } from "react";
|
||||
import type { UIState } from "../../entities/ui/types";
|
||||
import type { UIState } from "../api/client";
|
||||
import { uiStateValidator, useLocalStorage } from "./useLocalStorage";
|
||||
|
||||
export function useUIState() {
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
// Simple logger for frontend - structured logging wrapper
|
||||
type LogLevel = "debug" | "info" | "warn" | "error";
|
||||
|
||||
interface LogContext {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
class Logger {
|
||||
constructor(private context: string) {}
|
||||
|
||||
private log(level: LogLevel, message: string, context?: LogContext) {
|
||||
const timestamp = new Date().toISOString();
|
||||
const logData = {
|
||||
level,
|
||||
context: this.context,
|
||||
message,
|
||||
timestamp,
|
||||
...context,
|
||||
};
|
||||
|
||||
// Use appropriate console method
|
||||
const consoleMethod = console[level] || console.log;
|
||||
consoleMethod(
|
||||
`[${level.toUpperCase()}] [${this.context}]`,
|
||||
message,
|
||||
context || "",
|
||||
);
|
||||
}
|
||||
|
||||
debug(message: string, context?: LogContext) {
|
||||
this.log("debug", message, context);
|
||||
}
|
||||
|
||||
info(message: string, context?: LogContext) {
|
||||
this.log("info", message, context);
|
||||
}
|
||||
|
||||
warn(message: string, context?: LogContext) {
|
||||
this.log("warn", message, context);
|
||||
}
|
||||
|
||||
error(message: string, context?: LogContext) {
|
||||
this.log("error", message, context);
|
||||
}
|
||||
}
|
||||
|
||||
export function createChildLogger(context: string): Logger {
|
||||
return new Logger(context);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LayoutDashboard, MessageSquare, Radio } from "lucide-react";
|
||||
import type { DashboardTab } from "../../entities/ui/types";
|
||||
import type { DashboardTab } from "../api/client";
|
||||
import { cn } from "../lib/utils";
|
||||
|
||||
const tabs: Array<{ id: DashboardTab; label: string; Icon: typeof Radio }> = [
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
// ─── Shared UI barrel export ────────────────────────────────────────────────
|
||||
|
||||
export {
|
||||
EmptyStateMascot,
|
||||
MascotImage,
|
||||
} from "../../widgets/mascot/MascotImage";
|
||||
export { Badge } from "./badge";
|
||||
export { Button } from "./button";
|
||||
export {
|
||||
|
||||
@@ -209,4 +209,3 @@ export function useDashboardSocket(handlers: WsHandlers) {
|
||||
}
|
||||
|
||||
// Alias for backward compatibility
|
||||
export { useDashboardSocket as useWsSocket };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { motion } from "framer-motion";
|
||||
import type { ReactNode } from "react";
|
||||
import type { DashboardTab } from "../entities/ui/types";
|
||||
import type { DashboardTab } from "../shared/api/client";
|
||||
import type { MessageRecord, VoiceStatus } from "../shared/api/client";
|
||||
import { fadeSlideUp } from "../shared/hooks/useFramerStagger";
|
||||
import type { WsStatus } from "../shared/ws/socket";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { motion } from "framer-motion";
|
||||
import { Wifi, WifiOff } from "lucide-react";
|
||||
import type { DashboardTab } from "../entities/ui/types";
|
||||
import type { DashboardTab } from "../shared/api/client";
|
||||
import type { VoiceStatus } from "../shared/api/client";
|
||||
import { fadeSlideUp } from "../shared/hooks/useFramerStagger";
|
||||
import { cn } from "../shared/lib/utils";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { motion } from "framer-motion";
|
||||
import { LayoutDashboard, MessageSquare, Radio } from "lucide-react";
|
||||
import type { DashboardTab } from "../entities/ui/types";
|
||||
import type { DashboardTab } from "../shared/api/client";
|
||||
import type { MessageRecord } from "../shared/api/client";
|
||||
import { useMascotChat } from "../shared/hooks/useMascotChat";
|
||||
import { cn } from "../shared/lib/utils";
|
||||
|
||||
Reference in New Issue
Block a user