mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(panel): resolve undefined font vars + remove dead client code
- layout.tsx/globals.css: font-sans/font-mono pointed at undefined --font-geist-* vars (Geist-starter leftover); now resolve to the actually-loaded Inter via --font-inter. No visible change. - remove orphaned company-goals-card.tsx (unmounted; live charter UI is goals-tab.tsx) - remove dead streamApi transcription REST client (zero consumers) + its barrel export; AgentStreamViewer (a different, live websocket-based component) untouched.
This commit is contained in:
@@ -10,7 +10,6 @@ export { productsApi } from "./products";
|
||||
export { workSessionsApi } from "./work-sessions";
|
||||
export { gitApi } from "./git";
|
||||
export { a2aApi } from "./a2a";
|
||||
export { streamApi } from "./stream";
|
||||
export { settingsApi } from "./settings";
|
||||
export { companyGoalsApi } from "./company-goals";
|
||||
export { releaseApi } from "./release";
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
/**
|
||||
* Stream API Client
|
||||
*
|
||||
* API functions for transcription and extraction operations.
|
||||
*/
|
||||
|
||||
import api from "./client";
|
||||
import { isMockMode } from "@/lib/mock-data";
|
||||
|
||||
// =============================================================================
|
||||
// Types
|
||||
// =============================================================================
|
||||
|
||||
export interface StreamChunkRequest {
|
||||
channel_name: string;
|
||||
audio_data: string; // Base64 encoded
|
||||
chunk_index: number;
|
||||
is_final?: boolean;
|
||||
}
|
||||
|
||||
export interface StreamChunkResponse {
|
||||
status: string;
|
||||
chunk_index: number;
|
||||
queued: boolean;
|
||||
}
|
||||
|
||||
export interface StreamCompleteRequest {
|
||||
channel_name: string;
|
||||
session_id?: string;
|
||||
}
|
||||
|
||||
export interface StreamCompleteResponse {
|
||||
status: string;
|
||||
channel_name: string;
|
||||
total_chunks: number;
|
||||
transcription_id?: string;
|
||||
}
|
||||
|
||||
export interface ExtractionRequest {
|
||||
content: string;
|
||||
extraction_type: "tasks" | "decisions" | "action_items" | "summary";
|
||||
context?: string;
|
||||
}
|
||||
|
||||
export interface ExtractionResponse {
|
||||
extraction_type: string;
|
||||
results: Record<string, unknown>[];
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
export interface TranscriptionStats {
|
||||
total_transcriptions: number;
|
||||
active_channels: number;
|
||||
chunks_processed: number;
|
||||
avg_processing_time_ms: number;
|
||||
}
|
||||
|
||||
export interface ChannelPermissions {
|
||||
channel_name: string;
|
||||
can_transcribe: boolean;
|
||||
can_extract: boolean;
|
||||
rate_limit?: number;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// API Client
|
||||
// =============================================================================
|
||||
|
||||
export const streamApi = {
|
||||
// ===========================================================================
|
||||
// TRANSCRIPTION ENDPOINTS
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* Submit an audio chunk for transcription
|
||||
*/
|
||||
submitChunk: async (
|
||||
request: StreamChunkRequest,
|
||||
): Promise<StreamChunkResponse> => {
|
||||
if (isMockMode()) {
|
||||
return {
|
||||
status: "queued",
|
||||
chunk_index: request.chunk_index,
|
||||
queued: true,
|
||||
};
|
||||
}
|
||||
const { data } = await api.post<StreamChunkResponse>(
|
||||
"/stream/chunk",
|
||||
request,
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Complete a transcription session
|
||||
*/
|
||||
complete: async (
|
||||
request: StreamCompleteRequest,
|
||||
): Promise<StreamCompleteResponse> => {
|
||||
if (isMockMode()) {
|
||||
return {
|
||||
status: "completed",
|
||||
channel_name: request.channel_name,
|
||||
total_chunks: 10,
|
||||
transcription_id: `trans-${Date.now()}`,
|
||||
};
|
||||
}
|
||||
const { data } = await api.post<StreamCompleteResponse>(
|
||||
"/stream/complete",
|
||||
request,
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
// ===========================================================================
|
||||
// EXTRACTION ENDPOINTS
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* Extract structured information from content
|
||||
*/
|
||||
extract: async (request: ExtractionRequest): Promise<ExtractionResponse> => {
|
||||
if (isMockMode()) {
|
||||
return {
|
||||
extraction_type: request.extraction_type,
|
||||
results: [],
|
||||
confidence: 0.85,
|
||||
};
|
||||
}
|
||||
const { data } = await api.post<ExtractionResponse>(
|
||||
"/stream/extract",
|
||||
request,
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
// ===========================================================================
|
||||
// STATS & PERMISSIONS
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* Get transcription statistics
|
||||
*/
|
||||
getStats: async (): Promise<TranscriptionStats> => {
|
||||
if (isMockMode()) {
|
||||
return {
|
||||
total_transcriptions: 100,
|
||||
active_channels: 5,
|
||||
chunks_processed: 1500,
|
||||
avg_processing_time_ms: 250,
|
||||
};
|
||||
}
|
||||
const { data } = await api.get<TranscriptionStats>("/stream/stats");
|
||||
return data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all channel permissions
|
||||
*/
|
||||
getPermissions: async (): Promise<ChannelPermissions[]> => {
|
||||
if (isMockMode()) {
|
||||
return [];
|
||||
}
|
||||
const { data } = await api.get<ChannelPermissions[]>("/stream/permissions");
|
||||
return data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user