Skip to content

Commit 1968a15

Browse files
committed
feat: topic as yaml frontmatter header
(otherwise obsidian would drop it on safe)
1 parent 7be6ba0 commit 1968a15

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lua/gp/defaults.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ M.code_system_prompt = "You are an AI working as a code editor.\n\n"
1515

1616
M.chat_template = [[
1717
---
18-
# topic: ?
18+
topic: ?
1919
{{optional_headers}}
2020
# Write your queries after {{user_prefix}}. Use `{{respond_shortcut}}` or :{{cmd_prefix}}ChatRespond to generate a response.
2121
# Response generation can be terminated by using `{{stop_shortcut}}` or :{{cmd_prefix}}ChatStop command.
@@ -28,7 +28,7 @@ M.chat_template = [[
2828

2929
M.short_chat_template = [[
3030
---
31-
# topic: ?
31+
topic: ?
3232
---
3333
3434
{{user_prefix}}

lua/gp/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ M.chat_respond = function(params)
10211021

10221022
local i = indices.topic
10231023
M.helpers.undojoin(buf)
1024-
vim.api.nvim_buf_set_lines(buf, i, i + 1, false, { "# topic: " .. topic })
1024+
vim.api.nvim_buf_set_lines(buf, i, i + 1, false, { "topic: " .. topic })
10251025
end)
10261026
)
10271027
end

0 commit comments

Comments
 (0)