feat(UI): allow system prompts and persona prompts to be saved server side and individually included or excluded from messages

This commit is contained in:
Willie Zutz 2025-05-27 12:53:30 -06:00
parent 8e6934bb64
commit 011d10df29
27 changed files with 1345 additions and 132 deletions

View file

@ -17,6 +17,23 @@ interface File {
fileId: string;
}
export const systemPrompts = sqliteTable('system_prompts', {
id: text('id')
.primaryKey()
.$defaultFn(() => crypto.randomUUID()),
name: text('name').notNull(),
content: text('content').notNull(),
type: text('type', { enum: ['system', 'persona'] })
.notNull()
.default('system'),
createdAt: integer('created_at', { mode: 'timestamp' })
.notNull()
.$defaultFn(() => new Date()),
updatedAt: integer('updated_at', { mode: 'timestamp' })
.notNull()
.$defaultFn(() => new Date()),
});
export const chats = sqliteTable('chats', {
id: text('id').primaryKey(),
title: text('title').notNull(),