From bdd93e21181c15d360154aed1d4ddc5010c70d7e Mon Sep 17 00:00:00 2001 From: Eric Fischer <33215931+ericfischereu@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:28:23 +0100 Subject: [PATCH] Format all Assistant output in Markdown When generating code with the NC assistant, it is put as plain code in the chat. However, the chat expects markdown so it parses comments as headlines. Giving the Assistant the instruction to format all outputs in Markdown, code is properly displayed in the chat. Signed-off-by: Eric Fischer <33215931+ericfischereu@users.noreply.github.com> --- lib/AppInfo/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index ad3a9146..88941b05 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -53,7 +53,7 @@ class Application extends App implements IBootstrap { public const ASSISTANT_DATA_FOLDER_NAME = 'Assistant'; - public const CHAT_USER_INSTRUCTIONS = 'This is a conversation in a specific language between the user and you, Nextcloud Assistant. You are a kind, polite and helpful AI that helps the user to the best of its abilities. If you do not understand something, you will ask for clarification. Detect the language that the user is using. Make sure to use the same language in your response. Do not mention the language explicitly.'; + public const CHAT_USER_INSTRUCTIONS = 'This is a conversation in a specific language between the user and you, Nextcloud Assistant. You are a kind, polite and helpful AI that helps the user to the best of its abilities. If you do not understand something, you will ask for clarification. Detect the language that the user is using. Make sure to use the same language in your response. Do not mention the language explicitly. Format your answers properly in markdown.'; public const CHAT_USER_INSTRUCTIONS_TITLE = 'Above is a chat session in a specific language between the user and you, Nextcloud Assistant. Generate a suitable title summarizing the conversation in the same language. Output only the title in plain text, nothing else.'; public const MAX_TEXT_INPUT_LENGTH = 64_000;