From cbe1cd6507df0298a8904406fe17328b0eb37c8c Mon Sep 17 00:00:00 2001 From: oabrivard Date: Tue, 24 Mar 2026 20:36:08 +0100 Subject: [PATCH] feat: LLM logs types, API client, and i18n labels Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/api/llmLogs.ts | 7 +++++++ frontend/src/i18n/fr.ts | 13 +++++++++++++ frontend/src/types.ts | 13 +++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 frontend/src/api/llmLogs.ts diff --git a/frontend/src/api/llmLogs.ts b/frontend/src/api/llmLogs.ts new file mode 100644 index 0000000..34d2fe8 --- /dev/null +++ b/frontend/src/api/llmLogs.ts @@ -0,0 +1,7 @@ +import { api } from './client'; +import type { LlmCallLogEntry } from '~/types'; + +export const llmLogsApi = { + getByJobId: (jobId: string): Promise => + api.get(`/llm-logs/${jobId}`), +}; diff --git a/frontend/src/i18n/fr.ts b/frontend/src/i18n/fr.ts index e153bbb..28e9bfe 100644 --- a/frontend/src/i18n/fr.ts +++ b/frontend/src/i18n/fr.ts @@ -351,6 +351,19 @@ const fr = { 'articleHistory.provenanceEmpty': 'Aucune donnee de provenance disponible pour cette synthese.', 'articleHistory.provenanceDescription': 'Articles candidats traites lors de la generation de cette synthese.', + // LLM Logs + 'llmLogs.title': 'Logs des appels IA', + 'llmLogs.callType': 'Type', + 'llmLogs.model': 'Modele', + 'llmLogs.duration': 'Duree', + 'llmLogs.systemPrompt': 'Prompt systeme', + 'llmLogs.userPrompt': 'Prompt utilisateur', + 'llmLogs.response': 'Reponse', + 'llmLogs.empty': 'Aucun log disponible pour cette synthese.', + 'llmLogs.viewLogs': 'Voir les logs IA', + 'llmLogs.seconds': 's', + 'llmLogs.back': 'Retour', + // Common 'common.loading': 'Chargement...', 'common.error': 'Une erreur est survenue.', diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 1c606cf..18abf33 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -282,3 +282,16 @@ export interface ArticleHistoryResponse { items: ArticleHistoryEntry[]; total: number; } + +// ---- LLM Call Logs ---- + +export interface LlmCallLogEntry { + id: string; + call_type: string; + model: string; + system_prompt: string; + user_prompt: string; + response_body: string; + duration_ms: number; + created_at: string; +}