@@ -476,7 +476,7 @@ mod tests {
#[test]
fn test_validate_name_mismatch() {
- let mut metadata = SkillMetadata {
+ let metadata = SkillMetadata {
name: "bar".to_string(),
description: "Valid description".to_string(),
license: None,
@@ -639,7 +639,7 @@ This is the skill content."#;
"exact-skill".to_string(),
Arc::new(Skill {
name: "exact-skill".to_string(),
- description: exact_description.clone(),
+ description: exact_description,
path: PathBuf::from("/exact"),
}),
);
@@ -9,7 +9,7 @@ use anyhow::Result;
use client::{Client, RefreshLlmTokenListener, UserStore};
use collections::IndexMap;
use context_server::{ContextServer, ContextServerCommand, ContextServerId};
-use feature_flags::FeatureFlagAppExt as _;
+
use fs::{FakeFs, Fs};
use futures::{
FutureExt as _, StreamExt,
@@ -4565,10 +4565,6 @@ async fn test_subagent_tool_call_end_to_end(cx: &mut TestAppContext) {
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -4700,10 +4696,6 @@ async fn test_subagent_tool_output_does_not_include_thinking(cx: &mut TestAppCon
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -4848,10 +4840,6 @@ async fn test_subagent_tool_call_cancellation_during_task_prompt(cx: &mut TestAp
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -4978,10 +4966,6 @@ async fn test_subagent_tool_resume_session(cx: &mut TestAppContext) {
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -5156,10 +5140,6 @@ async fn test_subagent_tool_resume_session(cx: &mut TestAppContext) {
async fn test_subagent_tool_is_present_when_feature_flag_enabled(cx: &mut TestAppContext) {
init_test(cx);
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(path!("/test"), json!({})).await;
let project = Project::test(fs, [path!("/test").as_ref()], cx).await;
@@ -5198,10 +5178,6 @@ async fn test_subagent_tool_is_present_when_feature_flag_enabled(cx: &mut TestAp
async fn test_subagent_thread_inherits_parent_thread_properties(cx: &mut TestAppContext) {
init_test(cx);
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(path!("/test"), json!({})).await;
let project = Project::test(fs, [path!("/test").as_ref()], cx).await;
@@ -5246,10 +5222,6 @@ async fn test_subagent_thread_inherits_parent_thread_properties(cx: &mut TestApp
async fn test_max_subagent_depth_prevents_tool_registration(cx: &mut TestAppContext) {
init_test(cx);
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(path!("/test"), json!({})).await;
let project = Project::test(fs, [path!("/test").as_ref()], cx).await;
@@ -5296,10 +5268,6 @@ async fn test_max_subagent_depth_prevents_tool_registration(cx: &mut TestAppCont
async fn test_parent_cancel_stops_subagent(cx: &mut TestAppContext) {
init_test(cx);
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(path!("/test"), json!({})).await;
let project = Project::test(fs, [path!("/test").as_ref()], cx).await;
@@ -5355,10 +5323,6 @@ async fn test_subagent_context_window_warning(cx: &mut TestAppContext) {
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -5481,10 +5445,6 @@ async fn test_subagent_no_context_window_warning_when_already_at_warning(cx: &mu
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -5655,10 +5615,6 @@ async fn test_subagent_error_propagation(cx: &mut TestAppContext) {
cx.update(|cx| {
LanguageModelRegistry::test(cx);
});
- cx.update(|cx| {
- cx.update_flags(true, vec!["subagents".to_string()]);
- });
-
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
"/",
@@ -10,7 +10,7 @@ use project::{AgentLocation, ImageItem, Project, WorktreeSettings, image_store};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::Settings;
-use std::path::PathBuf;
+
use std::sync::Arc;
use util::markdown::MarkdownCodeBlock;