Prompt gallery (#957)

- [x] show prompt instead of app in autocomplete
- [x] use proper array/list for db (tags)
- [x] don't do <dyad-prompt> - replace inline
This commit is contained in:
Will Chen
2025-08-18 13:25:11 -07:00
committed by GitHub
parent a547735714
commit 573642ae5f
26 changed files with 1540 additions and 42 deletions

View File

@@ -2,6 +2,19 @@ import { sql } from "drizzle-orm";
import { integer, sqliteTable, text, unique } from "drizzle-orm/sqlite-core";
import { relations } from "drizzle-orm";
export const prompts = sqliteTable("prompts", {
id: integer("id").primaryKey({ autoIncrement: true }),
title: text("title").notNull(),
description: text("description"),
content: text("content").notNull(),
createdAt: integer("created_at", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
updatedAt: integer("updated_at", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
});
export const apps = sqliteTable("apps", {
id: integer("id").primaryKey({ autoIncrement: true }),
name: text("name").notNull(),