File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ function M.get_diagnostics(buf)
7272 end
7373
7474 local current_conf = vim .tbl_get (state , ' current_context_config' , ' diagnostics' ) or {}
75+ if current_conf .enabled == false then
76+ return {}
77+ end
78+
7579 local global_conf = vim .tbl_get (config , ' context' , ' diagnostics' ) or {}
7680 local diagnostic_conf = vim .tbl_deep_extend (' force' , global_conf , current_conf ) or {}
7781
Original file line number Diff line number Diff line change @@ -103,7 +103,10 @@ function M.send_message(prompt, opts)
103103 end
104104
105105 opts = opts or {}
106- opts .context = opts .context or config .context
106+
107+ opts .context = vim .tbl_deep_extend (' force' , state .current_context_config or {}, opts .context or {})
108+ state .current_context_config = opts .context
109+ context .load ()
107110 opts .model = opts .model or state .current_model
108111 opts .agent = opts .agent or state .current_mode or config .default_mode
109112
@@ -120,10 +123,7 @@ function M.send_message(prompt, opts)
120123 state .current_mode = opts .agent
121124 end
122125
123- state .current_context_config = opts .context
124- context .load ()
125126 params .parts = context .format_message (prompt , opts .context )
126-
127127 M .before_run (opts )
128128
129129 state .api_client
You can’t perform that action at this time.
0 commit comments