@@ -6,7 +6,6 @@ use uuid::Uuid;
use cloud_llm_client::CompletionIntent;
use collections::HashSet;
use editor::{Anchor, AnchorRangeExt, MultiBuffer, MultiBufferSnapshot, ToOffset as _, ToPoint};
-use feature_flags::{FeatureFlagAppExt as _, InlineAssistantUseToolFeatureFlag};
use futures::{
SinkExt, Stream, StreamExt, TryStreamExt as _,
channel::mpsc,
@@ -401,7 +400,6 @@ impl CodegenAlternative {
pub fn use_streaming_tools(model: &dyn LanguageModel, cx: &App) -> bool {
model.supports_streaming_tools()
- && cx.has_flag::<InlineAssistantUseToolFeatureFlag>()
&& AgentSettings::get_global(cx).inline_assistant_use_streaming_tools
}
@@ -8,7 +8,6 @@ use editor::{
ContextMenuOptions, Editor, EditorElement, EditorEvent, EditorMode, EditorStyle, MultiBuffer,
actions::{MoveDown, MoveUp},
};
-use feature_flags::{FeatureFlagAppExt, InlineAssistantUseToolFeatureFlag};
use fs::Fs;
use gpui::{
AnyElement, App, ClipboardItem, Context, Entity, EventEmitter, FocusHandle, Focusable,
@@ -833,7 +832,6 @@ impl<T: 'static> PromptEditor<T> {
.into_any_element(),
]
} else {
- let show_rating_buttons = cx.has_flag::<InlineAssistantUseToolFeatureFlag>();
let rated = matches!(self.session_state.completion, CompletionState::Rated);
let accept = IconButton::new("accept", IconName::Check)
@@ -849,78 +847,72 @@ impl<T: 'static> PromptEditor<T> {
let mut buttons = Vec::new();
- if show_rating_buttons {
- buttons.push(
- h_flex()
- .pl_1()
- .gap_1()
- .border_l_1()
- .border_color(cx.theme().colors().border_variant)
- .child(
- IconButton::new("thumbs-up", IconName::ThumbsUp)
- .shape(IconButtonShape::Square)
- .map(|this| {
- if rated {
- this.disabled(true)
- .icon_color(Color::Disabled)
- .tooltip(move |_, cx| {
- Tooltip::with_meta(
- "Good Result",
- None,
- "You already rated this result",
- cx,
- )
- })
- } else {
- this.icon_color(Color::Muted).tooltip(
- move |_, cx| {
- Tooltip::for_action(
- "Good Result",
- &ThumbsUpResult,
- cx,
- )
- },
+ buttons.push(
+ h_flex()
+ .pl_1()
+ .gap_1()
+ .border_l_1()
+ .border_color(cx.theme().colors().border_variant)
+ .child(
+ IconButton::new("thumbs-up", IconName::ThumbsUp)
+ .shape(IconButtonShape::Square)
+ .map(|this| {
+ if rated {
+ this.disabled(true).icon_color(Color::Disabled).tooltip(
+ move |_, cx| {
+ Tooltip::with_meta(
+ "Good Result",
+ None,
+ "You already rated this result",
+ cx,
+ )
+ },
+ )
+ } else {
+ this.icon_color(Color::Muted).tooltip(move |_, cx| {
+ Tooltip::for_action(
+ "Good Result",
+ &ThumbsUpResult,
+ cx,
)
- }
- })
- .on_click(cx.listener(|this, _, window, cx| {
- this.thumbs_up(&ThumbsUpResult, window, cx);
- })),
- )
- .child(
- IconButton::new("thumbs-down", IconName::ThumbsDown)
- .shape(IconButtonShape::Square)
- .map(|this| {
- if rated {
- this.disabled(true)
- .icon_color(Color::Disabled)
- .tooltip(move |_, cx| {
- Tooltip::with_meta(
- "Bad Result",
- None,
- "You already rated this result",
- cx,
- )
- })
- } else {
- this.icon_color(Color::Muted).tooltip(
- move |_, cx| {
- Tooltip::for_action(
- "Bad Result",
- &ThumbsDownResult,
- cx,
- )
- },
+ })
+ }
+ })
+ .on_click(cx.listener(|this, _, window, cx| {
+ this.thumbs_up(&ThumbsUpResult, window, cx);
+ })),
+ )
+ .child(
+ IconButton::new("thumbs-down", IconName::ThumbsDown)
+ .shape(IconButtonShape::Square)
+ .map(|this| {
+ if rated {
+ this.disabled(true).icon_color(Color::Disabled).tooltip(
+ move |_, cx| {
+ Tooltip::with_meta(
+ "Bad Result",
+ None,
+ "You already rated this result",
+ cx,
+ )
+ },
+ )
+ } else {
+ this.icon_color(Color::Muted).tooltip(move |_, cx| {
+ Tooltip::for_action(
+ "Bad Result",
+ &ThumbsDownResult,
+ cx,
)
- }
- })
- .on_click(cx.listener(|this, _, window, cx| {
- this.thumbs_down(&ThumbsDownResult, window, cx);
- })),
- )
- .into_any_element(),
- );
- }
+ })
+ }
+ })
+ .on_click(cx.listener(|this, _, window, cx| {
+ this.thumbs_down(&ThumbsDownResult, window, cx);
+ })),
+ )
+ .into_any_element(),
+ );
buttons.push(accept);