No staged changes found — the staging area is empty. Stage some files first with git add, then I can help craft the commit message.

This commit is contained in:
MythEclipse
2026-06-02 23:05:06 +07:00
parent 130f45a859
commit 0cd4f197e9
@@ -417,6 +417,38 @@ export const pgStickerCacheTable = pgTable(
}),
);
/**
* Corrected Moderations Table (PostgreSQL)
* Stores manually corrected false positives from AI moderation.
* Used for dynamic few-shot injection in moderation prompts.
*/
export const pgCorrectedModerationsTable = pgTable(
"corrected_moderations",
{
id: pgText("id").primaryKey(),
/** The message_id that was originally flagged. */
message_id: pgText("message_id").notNull(),
/** JSON array of original flags assigned by the LLM. */
original_flags: pgText("original_flags").notNull(),
/** JSON array of corrected flags (may be empty [] for clean). */
corrected_flags: pgText("corrected_flags").notNull(),
/** Human-readable explanation of why the correction was made. */
correction_notes: pgText("correction_notes"),
/** Content snippet so the LLM can recognise similar patterns. */
content_snippet: pgText("content_snippet").notNull(),
/** When this correction was recorded. */
created_at: pgBigint("created_at", { mode: "number" }).notNull(),
},
(table) => ({
createdAtIdx: pgIndex("idx_corrected_moderations_created_at").on(
table.created_at,
),
messageIdIdx: pgIndex("idx_corrected_moderations_message_id").on(
table.message_id,
),
}),
);
// Runtime table exports
// =====================