feat(chatd): add user-level custom prompt for agent chats (#22896)

Adds a user-level custom prompt to the database.

I'll be doing a follow-up for the UI, as we currently do not have
user-level settings (it's just admin). I'll also make it very obvious
for chats where there is a user-level prompt, but I don't know how yet.
This commit is contained in:
Kyle Carberry
2026-03-10 11:17:52 -04:00
committed by GitHub
parent 6489d6f714
commit b6d1a11c58
12 changed files with 301 additions and 2 deletions
+23
View File
@@ -168,6 +168,29 @@ WHERE user_configs.user_id = @user_id
AND user_configs.key = 'terminal_font'
RETURNING *;
-- name: GetUserChatCustomPrompt :one
SELECT
value as chat_custom_prompt
FROM
user_configs
WHERE
user_id = @user_id
AND key = 'chat_custom_prompt';
-- name: UpdateUserChatCustomPrompt :one
INSERT INTO
user_configs (user_id, key, value)
VALUES
(@user_id, 'chat_custom_prompt', @chat_custom_prompt)
ON CONFLICT
ON CONSTRAINT user_configs_pkey
DO UPDATE
SET
value = @chat_custom_prompt
WHERE user_configs.user_id = @user_id
AND user_configs.key = 'chat_custom_prompt'
RETURNING *;
-- name: GetUserTaskNotificationAlertDismissed :one
SELECT
value::boolean as task_notification_alert_dismissed