Remove unused persona marketplace and discover page files.
CI / check (22) (push) Failing after 16m32s
CI / check (24) (push) Failing after 15m50s

This commit is contained in:
2026-10-07 23:41:27 +02:00
parent 10ec76d437
commit 5ca611c113
34 changed files with 368 additions and 1216 deletions
+6
View File
@@ -11,6 +11,7 @@ export function createChatStatements(db) {
END AS title,
cs.title AS stored_title,
cs.assistant_persona_id,
cs.personality_id,
p.name AS assistant_persona_name,
cs.user_persona_id,
up.name AS user_persona_name,
@@ -46,6 +47,7 @@ export function createChatStatements(db) {
END AS title,
cs.title AS stored_title,
cs.assistant_persona_id,
cs.personality_id,
p.name AS assistant_persona_name,
cs.user_persona_id,
up.name AS user_persona_name,
@@ -80,6 +82,7 @@ export function createChatStatements(db) {
END AS title,
cs.title AS stored_title,
cs.assistant_persona_id,
cs.personality_id,
p.name AS assistant_persona_name,
cs.user_persona_id,
up.name AS user_persona_name,
@@ -112,6 +115,7 @@ export function createChatStatements(db) {
`),
updateChatSessionTitle: db.prepare("UPDATE chat_sessions SET title = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND username = ?"),
updateChatUserPersona: db.prepare("UPDATE chat_sessions SET user_persona_id = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND username = ?"),
updateChatPersonality: db.prepare("UPDATE chat_sessions SET personality_id = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND username = ?"),
updateChatSessionScene: db.prepare("UPDATE chat_sessions SET scenario_prompt = ?, scenario_summary = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND username = ?"),
updateChatContextSummary: db.prepare("UPDATE chat_sessions SET context_summary = ?, context_summary_message_id = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND username = ?"),
updateChatGenerationSettings: db.prepare(`
@@ -325,6 +329,7 @@ export function createChatStatements(db) {
END AS title,
cs.title AS stored_title,
cs.assistant_persona_id,
cs.personality_id,
p.name AS assistant_persona_name,
cs.user_persona_id,
up.name AS user_persona_name,
@@ -434,6 +439,7 @@ const failChatTurnTransaction = db.transaction((chatId, userMessageId, errorMess
},
updateChatTitle: (chatId, username, title) => statements.updateChatSessionTitle.run(title, chatId, username),
updateChatUserPersona: (chatId, username, personaId) => statements.updateChatUserPersona.run(personaId ?? null, chatId, username),
updateChatPersonality: (chatId, username, personalityId) => statements.updateChatPersonality.run(personalityId, chatId, username),
updateChatScene: (chatId, username, scenarioPrompt, scenarioSummary) => statements.updateChatSessionScene.run(scenarioPrompt, scenarioSummary, chatId, username),
updateChatContextSummary: (chatId, username, summary, messageId) => statements.updateChatContextSummary.run(summary, Number(messageId || 0), chatId, username),
getPersonaChatState: (chatId, username) => statements.getPersonaChatState.get(chatId, username) || null,
+1
View File
@@ -277,6 +277,7 @@ export function createRepositories(db, config) {
chat.scenario_prompt ?? null,
chat.scenario_summary ?? null
).lastInsertRowid;
db.prepare("UPDATE chat_sessions SET personality_id = ? WHERE id = ?").run(chat.personality_id || "general-assistant", chatId);
const importedMessageIds = new Map();
importedChats.push({chat, chatId, messageIds: importedMessageIds});
for (const message of chat.messages || []) {
+3
View File
@@ -38,6 +38,7 @@ export function initializeSchema(db) {
context_length INTEGER,
response_length INTEGER,
system_instruction TEXT,
personality_id TEXT NOT NULL DEFAULT 'general-assistant',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (assistant_persona_id) REFERENCES personas (id) ON DELETE SET NULL,
@@ -306,6 +307,8 @@ export function runMigrations(db, {dropLegacyChats = true} = {}) {
db.prepare("UPDATE chat_messages SET delivery_status = 'complete' WHERE delivery_status IS NULL").run();
const chatSessionColumns = db.prepare("PRAGMA table_info(chat_sessions)").all();
ensureColumn("chat_sessions", chatSessionColumns, "personality_id", "ALTER TABLE chat_sessions ADD COLUMN personality_id TEXT NOT NULL DEFAULT 'general-assistant'");
db.prepare("UPDATE chat_sessions SET personality_id = 'general-assistant' WHERE personality_id IS NULL OR personality_id = ''").run();
ensureColumn("chat_sessions", chatSessionColumns, "assistant_persona_id", "ALTER TABLE chat_sessions ADD COLUMN assistant_persona_id INTEGER");
ensureColumn("chat_sessions", chatSessionColumns, "user_persona_id", "ALTER TABLE chat_sessions ADD COLUMN user_persona_id INTEGER");
ensureColumn("chat_sessions", chatSessionColumns, "folder_name", "ALTER TABLE chat_sessions ADD COLUMN folder_name TEXT");