* wip prompt variables * refactor backend + add popup suggestions menu to frontend * use processString to replace all variables in system prompts * update translations * fix translations * wip highlight variables * revert accidental name change * rename everything, remove translations * Update prompt var UI and backend logic * Update form handler linting * linting * normalize all translation files for prompt variables * prompt vars dev image --------- Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
19 lines
691 B
SQL
19 lines
691 B
SQL
-- CreateTable
|
|
CREATE TABLE "system_prompt_variables" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"key" TEXT NOT NULL,
|
|
"value" TEXT,
|
|
"description" TEXT,
|
|
"type" TEXT NOT NULL DEFAULT 'system',
|
|
"userId" INTEGER,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"updatedAt" DATETIME NOT NULL,
|
|
CONSTRAINT "system_prompt_variables_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "system_prompt_variables_key_key" ON "system_prompt_variables"("key");
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "system_prompt_variables_userId_idx" ON "system_prompt_variables"("userId");
|