Extract an agent_ui crate from agent (#33284)

This PR moves the UI-dependent logic in the `agent` crate into its own
crate, `agent_ui`. The remaining `agent` crate no longer depends on
`editor`, `picker`, `ui`, `workspace`, etc.

This has compile time benefits, but the main motivation is to isolate
our core agentic logic, so that we can make agents more
pluggable/configurable.

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2025-06-23 18:00:28 -07:00 committed by GitHub
parent 371b7355d3
commit 2283ec5de2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 865 additions and 752 deletions

121
Cargo.lock generated
View file

@ -56,49 +56,28 @@ dependencies = [
"agent_settings",
"anyhow",
"assistant_context_editor",
"assistant_slash_command",
"assistant_slash_commands",
"assistant_tool",
"assistant_tools",
"audio",
"buffer_diff",
"chrono",
"client",
"collections",
"component",
"context_server",
"convert_case 0.8.0",
"db",
"editor",
"extension",
"extension_host",
"feature_flags",
"file_icons",
"fs",
"futures 0.3.31",
"fuzzy",
"git",
"gpui",
"heed",
"html_to_markdown",
"http_client",
"indexed_docs",
"icons",
"indoc",
"inventory",
"itertools 0.14.0",
"jsonschema",
"language",
"language_model",
"log",
"lsp",
"markdown",
"menu",
"multi_buffer",
"notifications",
"ordered-float 2.10.1",
"parking_lot",
"paths",
"picker",
"postage",
"pretty_assertions",
"project",
@ -106,35 +85,22 @@ dependencies = [
"proto",
"rand 0.8.5",
"ref-cast",
"release_channel",
"rope",
"rules_library",
"schemars",
"search",
"serde",
"serde_json",
"serde_json_lenient",
"settings",
"smol",
"sqlez",
"streaming_diff",
"telemetry",
"telemetry_events",
"terminal",
"terminal_view",
"text",
"theme",
"thiserror 2.0.12",
"time",
"time_format",
"ui",
"urlencoding",
"util",
"uuid",
"watch",
"workspace",
"workspace-hack",
"zed_actions",
"zed_llm_client",
"zstd",
]
@ -165,6 +131,89 @@ dependencies = [
"zed_llm_client",
]
[[package]]
name = "agent_ui"
version = "0.1.0"
dependencies = [
"agent",
"agent_settings",
"anyhow",
"assistant_context_editor",
"assistant_slash_command",
"assistant_slash_commands",
"assistant_tool",
"assistant_tools",
"audio",
"buffer_diff",
"chrono",
"client",
"collections",
"component",
"context_server",
"db",
"editor",
"extension",
"extension_host",
"feature_flags",
"file_icons",
"fs",
"futures 0.3.31",
"fuzzy",
"gpui",
"html_to_markdown",
"http_client",
"indexed_docs",
"indoc",
"inventory",
"itertools 0.14.0",
"jsonschema",
"language",
"language_model",
"log",
"lsp",
"markdown",
"menu",
"multi_buffer",
"notifications",
"ordered-float 2.10.1",
"parking_lot",
"paths",
"picker",
"pretty_assertions",
"project",
"prompt_store",
"proto",
"rand 0.8.5",
"release_channel",
"rope",
"rules_library",
"schemars",
"search",
"serde",
"serde_json",
"serde_json_lenient",
"settings",
"smol",
"streaming_diff",
"telemetry",
"telemetry_events",
"terminal",
"terminal_view",
"text",
"theme",
"time",
"time_format",
"ui",
"urlencoding",
"util",
"uuid",
"watch",
"workspace",
"workspace-hack",
"zed_actions",
"zed_llm_client",
]
[[package]]
name = "ahash"
version = "0.7.8"
@ -5062,6 +5111,7 @@ version = "0.1.0"
dependencies = [
"agent",
"agent_settings",
"agent_ui",
"anyhow",
"assistant_tool",
"assistant_tools",
@ -19868,6 +19918,7 @@ dependencies = [
"activity_indicator",
"agent",
"agent_settings",
"agent_ui",
"anyhow",
"ashpd",
"askpass",