diff --git a/lua/gp/config.lua b/lua/gp/config.lua index a120c29d..2014e397 100644 --- a/lua/gp/config.lua +++ b/lua/gp/config.lua @@ -102,6 +102,20 @@ local config = { -- just a static string is legacy and the [{{agent}}] element is added automatically -- if you really want just a static string, make it a table with one element { "🤖:" } chat_assistant_prefix = { "🤖:", "[{{agent}}]" }, + -- The banner shown at the top of each chat file. + chat_template = [[ +# topic: ? + +- file: %s +%s +Write your queries after %s. Use `%s` or :%sChatRespond to generate a response. +Response generation can be terminated by using `%s` or :%sChatStop command. +Chats are saved automatically. To delete this chat, use `%s` or :%sChatDelete. +Be cautious of very long chats. Start a fresh chat by using `%s` or :%sChatNew. + +--- + +%s]], -- chat topic generation prompt chat_topic_gen_prompt = "Summarize the topic of our conversation above" .. " in two or three words. Respond only with those words.", diff --git a/lua/gp/init.lua b/lua/gp/init.lua index aea59a97..6ded0650 100644 --- a/lua/gp/init.lua +++ b/lua/gp/init.lua @@ -1675,7 +1675,7 @@ M.new_chat = function(params, model, system_prompt, toggle) end local template = string.format( - M.chat_template, + M.config.chat_template or M.chat_template, string.match(filename, "([^/]+)$"), model .. system_prompt, M.config.chat_user_prefix,