Dedupe AssistantSettings
(#23190)
This PR dedupes the `AssistantSettings` so we can use the same settings for both Assistant1 and Assistant2. We originally forked them so we could change the Assistant2 settings freely, but given our rollout strategy for the new Assistant, I don't think that makes sense. This also fixes the issue where the JSON language server would show a "Matches multiple schemas when only one must validate" warning in `settings.json`. Closes #23171. Release Notes: - Fixed the "Matches multiple schemas when only one must validate" warning for the `assistant` setting.
This commit is contained in:
parent
22f5fd53ca
commit
e215ca1d99
18 changed files with 91 additions and 568 deletions
|
@ -1,13 +1,11 @@
|
|||
use crate::buffer_codegen::{BufferCodegen, CodegenAlternative, CodegenEvent};
|
||||
use crate::context_store::ContextStore;
|
||||
use crate::inline_prompt_editor::{CodegenStatus, InlineAssistId, PromptEditor, PromptEditorEvent};
|
||||
use crate::thread_store::ThreadStore;
|
||||
use crate::AssistantPanel;
|
||||
use crate::{
|
||||
assistant_settings::AssistantSettings, prompts::PromptBuilder,
|
||||
terminal_inline_assistant::TerminalInlineAssistant,
|
||||
};
|
||||
use std::cmp;
|
||||
use std::mem;
|
||||
use std::ops::Range;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::{Context as _, Result};
|
||||
use assistant_settings::AssistantSettings;
|
||||
use client::telemetry::Telemetry;
|
||||
use collections::{hash_map, HashMap, HashSet, VecDeque};
|
||||
use editor::{
|
||||
|
@ -21,8 +19,6 @@ use editor::{
|
|||
};
|
||||
use feature_flags::{Assistant2FeatureFlag, FeatureFlagViewExt as _};
|
||||
use fs::Fs;
|
||||
use util::ResultExt;
|
||||
|
||||
use gpui::{
|
||||
point, AppContext, FocusableView, Global, HighlightStyle, Model, Subscription, Task,
|
||||
UpdateGlobal, View, ViewContext, WeakModel, WeakView, WindowContext,
|
||||
|
@ -34,15 +30,22 @@ use multi_buffer::MultiBufferRow;
|
|||
use parking_lot::Mutex;
|
||||
use project::{CodeAction, ProjectTransaction};
|
||||
use settings::{Settings, SettingsStore};
|
||||
use std::{cmp, mem, ops::Range, rc::Rc, sync::Arc};
|
||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
||||
use text::{OffsetRangeExt, ToPoint as _};
|
||||
use ui::prelude::*;
|
||||
use util::RangeExt;
|
||||
use util::ResultExt;
|
||||
use workspace::{dock::Panel, ShowConfiguration};
|
||||
use workspace::{notifications::NotificationId, ItemHandle, Toast, Workspace};
|
||||
|
||||
use crate::buffer_codegen::{BufferCodegen, CodegenAlternative, CodegenEvent};
|
||||
use crate::context_store::ContextStore;
|
||||
use crate::inline_prompt_editor::{CodegenStatus, InlineAssistId, PromptEditor, PromptEditorEvent};
|
||||
use crate::thread_store::ThreadStore;
|
||||
use crate::AssistantPanel;
|
||||
use crate::{prompts::PromptBuilder, terminal_inline_assistant::TerminalInlineAssistant};
|
||||
|
||||
pub fn init(
|
||||
fs: Arc<dyn Fs>,
|
||||
prompt_builder: Arc<PromptBuilder>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue