assistant2: Push logic for adding file context down into the ContextStore
(#22846)
This PR takes the logic for adding file context out of the `FileContextPicker` and pushes it down into the `ContextStore`. Release Notes: - N/A
This commit is contained in:
parent
d855eb3acb
commit
86f5bb1cc0
5 changed files with 68 additions and 65 deletions
|
@ -335,7 +335,7 @@ impl InlineAssistant {
|
|||
let mut assist_to_focus = None;
|
||||
for range in codegen_ranges {
|
||||
let assist_id = self.next_assist_id.post_inc();
|
||||
let context_store = cx.new_model(|_cx| ContextStore::new());
|
||||
let context_store = cx.new_model(|_cx| ContextStore::new(workspace.clone()));
|
||||
let codegen = cx.new_model(|cx| {
|
||||
BufferCodegen::new(
|
||||
editor.read(cx).buffer().clone(),
|
||||
|
@ -445,7 +445,7 @@ impl InlineAssistant {
|
|||
range.end = range.end.bias_right(&snapshot);
|
||||
}
|
||||
|
||||
let context_store = cx.new_model(|_cx| ContextStore::new());
|
||||
let context_store = cx.new_model(|_cx| ContextStore::new(workspace.clone()));
|
||||
|
||||
let codegen = cx.new_model(|cx| {
|
||||
BufferCodegen::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue