adjust ai insight and seed data

This commit is contained in:
Alberto-Audrix committed 2026-09-18 11:34:07 +07:00
1 parent 68e0d1a0bb
commit a2b5b10977
18 files changed
+1835 -140

No files matched your search

+25
View File
@@ -299,6 +299,30 @@ export type InsightStructuredReport = {
>;
};
/** Structured end-cycle insight (Masalah / Akar penyebab / Perbaikan). */
export type EndCycleRootCause = {
id?: string;
hipotesis: string;
bukti: string[];
confidence?: 'high' | 'med' | 'low' | string;
fase?: string;
};
export type EndCycleAction = {
id?: string;
fase: string;
aksi: string;
metrik_pantau?: string;
};
export type EndCycleStructuredInsight = {
kesimpulan: string;
masalah: string[];
akar_penyebab: EndCycleRootCause[];
perbaikan_siklus_berikutnya: EndCycleAction[];
insight?: string;
};
/** Response from generate / cached insight endpoints. */
export type InsightApiResponse = {
success?: boolean;
@@ -306,6 +330,7 @@ export type InsightApiResponse = {
summary?: string;
insight?: string;
structured?: InsightStructuredReport | null;
structured_end_cycle?: EndCycleStructuredInsight | null;
citations?: InsightCitation[];
message?: string;
};