Update package.json scripts, enhance layout with new components, and improve API error handling
Some checks failed
Deploy / deploy (push) Failing after 1h28m6s
Some checks failed
Deploy / deploy (push) Failing after 1h28m6s
- Added new scripts for database operations and temporary production in package.json. - Integrated KaydetBannerLazy component into the layout for improved user notifications. - Enhanced API error handling in the soru route to mark credit exhaustion. - Updated the IletisimPage for better button styling and user experience. - Refactored ListemPage to streamline user flow and improve session handling. - Removed unused ListePaneli component to clean up the codebase.
This commit is contained in:
@@ -7,6 +7,12 @@ import type { RaporSonuc } from "./ai/rapor";
|
||||
|
||||
export const ACIK_SATIR = 3;
|
||||
|
||||
/**
|
||||
* Maske çıktısı: kilitli uyarıların yalnızca SAYISI iner, metinleri inmez.
|
||||
* RaporSchema'ya (LLM çıktısı) eklenmez — bu alan yalnızca maskede doğar.
|
||||
*/
|
||||
export type MaskeliRapor = RaporSonuc & { kilitliUyariSayisi?: number };
|
||||
|
||||
const SAHTE_GEREKCE =
|
||||
"Bu tercih için kişisel gerekçe paketle açılır.";
|
||||
const SAHTE_RISK =
|
||||
@@ -21,7 +27,7 @@ function degerlendirmeKirp(metin: string): string {
|
||||
return `${cumleler.slice(0, 2).join(" ").trim()} …`;
|
||||
}
|
||||
|
||||
export function raporMaskele(rapor: RaporSonuc): RaporSonuc {
|
||||
export function raporMaskele(rapor: RaporSonuc): MaskeliRapor {
|
||||
const tercihler = rapor.tercihler.map((t, i) =>
|
||||
i < ACIK_SATIR
|
||||
? t
|
||||
@@ -36,8 +42,10 @@ export function raporMaskele(rapor: RaporSonuc): RaporSonuc {
|
||||
return {
|
||||
tercihler,
|
||||
genelDegerlendirme: degerlendirmeKirp(rapor.genelDegerlendirme),
|
||||
// Kişisel uyarılar ücretli katmandır; istemciye hiç inmez.
|
||||
uyarilar: [],
|
||||
// Teaser: ilk uyarı açık kalır, kalan uyarıların yalnızca sayısı iner —
|
||||
// kilitli metinler istemciye hiç ulaşmaz.
|
||||
uyarilar: rapor.uyarilar?.slice(0, 1) ?? [],
|
||||
kilitliUyariSayisi: Math.max(0, (rapor.uyarilar?.length ?? 0) - 1),
|
||||
// Program adı, üniversite ve 2021–2025 taban sıralamaları ham veridir.
|
||||
programlar: rapor.programlar,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user