Skip to content

Commit 32592ab

Browse files
committed
fix(quick_chat): remove duplicated instructions
1 parent 8ee40a1 commit 32592ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lua/opencode/quick_chat.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ end
307307
local create_message = Promise.async(function(message, buf, range, context_instance, options)
308308
local quick_chat_config = config.quick_chat or {}
309309

310-
-- Generate instructions (allow user override)
311310
local instructions
312311
if quick_chat_config.instructions then
313312
instructions = quick_chat_config.instructions
@@ -323,12 +322,12 @@ local create_message = Promise.async(function(message, buf, range, context_insta
323322
local result = context.format_message_plain_text(message, context_instance, format_opts):await()
324323

325324
local parts = {
326-
{ type = 'text', text = instructions_text },
325+
{ type = 'text', text = table.concat(instructions, '\n') },
327326
{ type = 'text', text = '\n\n' .. string.rep('=', 80) .. '\n\n' .. '# USER REQUEST\n\n' .. result.text },
328327
}
329328

330329
-- Use instructions as system prompt for models that support it
331-
local params = { parts = parts, system = instructions_text }
330+
local params = { parts = parts }
332331

333332
local current_model = core.initialize_current_model():await()
334333
local target_model = options.model or quick_chat_config.default_model or current_model

0 commit comments

Comments
 (0)