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 @@ -104,7 +104,10 @@ function M.send_message(prompt, opts)
104104 end
105105
106106 opts = opts or {}
107- opts .context = opts .context or config .context
107+
108+ opts .context = vim .tbl_deep_extend (' force' , state .current_context_config or {}, opts .context or {})
109+ state .current_context_config = opts .context
110+ context .load ()
108111 opts .model = opts .model or state .current_model
109112 opts .agent = opts .agent or state .current_mode or config .default_mode
110113
@@ -121,10 +124,7 @@ function M.send_message(prompt, opts)
121124 state .current_mode = opts .agent
122125 end
123126
124- state .current_context_config = opts .context
125- context .load ()
126127 params .parts = context .format_message (prompt , opts .context )
127-
128128 M .before_run (opts )
129129
130130 state .api_client
You can’t perform that action at this time.
0 commit comments