mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 14:20:35 +00:00
Cherry-pick of #57828 to preview ---- Also adds a menu item called "Rules Library" that takes to the documentation, which will explain the removal of the feature as a whole. Release Notes: - N/A Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
parent
4ffc6a6f02
commit
bae26d4edd
2 changed files with 36 additions and 7 deletions
|
|
@ -55,7 +55,7 @@ use anyhow::Result;
|
|||
#[cfg(feature = "audio")]
|
||||
use audio::{Audio, Sound};
|
||||
use chrono::{DateTime, Utc};
|
||||
use client::UserStore;
|
||||
use client::{UserStore, zed_urls};
|
||||
use cloud_api_types::Plan;
|
||||
use collections::HashMap;
|
||||
use editor::{Editor, MultiBuffer};
|
||||
|
|
@ -4934,9 +4934,20 @@ impl AgentPanel {
|
|||
|
||||
if global_agents_md_loaded {
|
||||
let workspace = workspace.clone();
|
||||
menu = menu.entry(
|
||||
"Open Global AGENTS.md",
|
||||
None,
|
||||
|
||||
menu = menu.custom_entry(
|
||||
|_window, _cx| {
|
||||
h_flex()
|
||||
.w_full()
|
||||
.gap_1()
|
||||
.child(Label::new("Open Global Rules"))
|
||||
.child(
|
||||
Label::new("(AGENTS.md)")
|
||||
.color(Color::Muted)
|
||||
.size(LabelSize::Small),
|
||||
)
|
||||
.into_any_element()
|
||||
},
|
||||
move |window, cx| {
|
||||
workspace
|
||||
.update(cx, |workspace, cx| {
|
||||
|
|
@ -4959,9 +4970,19 @@ impl AgentPanel {
|
|||
|
||||
if let Some(path) = project_agents_md_path.clone() {
|
||||
let workspace = workspace.clone();
|
||||
menu = menu.entry(
|
||||
"Open Project AGENTS.md",
|
||||
None,
|
||||
menu = menu.custom_entry(
|
||||
|_window, _cx| {
|
||||
h_flex()
|
||||
.w_full()
|
||||
.gap_1()
|
||||
.child(Label::new("Open Project Rules"))
|
||||
.child(
|
||||
Label::new("(AGENTS.md)")
|
||||
.color(Color::Muted)
|
||||
.size(LabelSize::Small),
|
||||
)
|
||||
.into_any_element()
|
||||
},
|
||||
move |window, cx| {
|
||||
let path = path.clone();
|
||||
workspace
|
||||
|
|
@ -4983,6 +5004,10 @@ impl AgentPanel {
|
|||
);
|
||||
}
|
||||
|
||||
menu = menu.entry("Rules Library", None, |_window, cx| {
|
||||
cx.open_url(&zed_urls::rules_docs(cx));
|
||||
});
|
||||
|
||||
menu = menu.separator();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ pub fn skills_docs(cx: &App) -> String {
|
|||
format!("{server_url}/docs/ai/skills", server_url = server_url(cx))
|
||||
}
|
||||
|
||||
pub fn rules_docs(cx: &App) -> String {
|
||||
format!("{server_url}/docs/ai/rules", server_url = server_url(cx))
|
||||
}
|
||||
|
||||
/// Returns the URL to Zed's ACP registry blog post.
|
||||
pub fn acp_registry_blog(cx: &App) -> String {
|
||||
format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue