@@ -15,12 +15,12 @@ local function add_adapter(interaction, opts)
1515end
1616
1717--- @class CodeCompanion.Interactions
18- --- @field buffer_context table
18+ --- @field buffer_context CodeCompanion.BufferContext
1919--- @field selected table
2020local Interactions = {}
2121
2222--- @class CodeCompanion.InteractionArgs
23- --- @field buffer_context table
23+ --- @field buffer_context CodeCompanion.BufferContext
2424--- @field selected table
2525
2626--- @param args CodeCompanion.InteractionArgs
274274
275275--- Evaluate a set of prompts based on conditionals and context
276276--- @param prompts table
277- --- @param context table
277+ --- @param buffer_context CodeCompanion.BufferContext
278278--- @return table
279- function Interactions .evaluate_prompts (prompts , context )
279+ function Interactions .evaluate_prompts (prompts , buffer_context )
280280 if type (prompts ) ~= " table" or vim .tbl_isempty (prompts ) then
281281 return {}
282282 end
@@ -285,10 +285,10 @@ function Interactions.evaluate_prompts(prompts, context)
285285 .iter (prompts )
286286 :filter (function (prompt )
287287 return not (prompt .opts and prompt .opts .contains_code and not config .can_send_code ())
288- and not (prompt .condition and not prompt .condition (context ))
288+ and not (prompt .condition and not prompt .condition (buffer_context ))
289289 end )
290290 :map (function (prompt )
291- local content = type (prompt .content ) == " function" and prompt .content (context ) or prompt .content
291+ local content = type (prompt .content ) == " function" and prompt .content (buffer_context ) or prompt .content
292292 if prompt .role == config .constants .SYSTEM_ROLE and not prompt .opts then
293293 prompt .opts = { visible = false , _meta = { tag = " from_custom_prompt" } }
294294 end
0 commit comments