agent: Send stale file notifications using the project_notifications tool (#34005)
This commit introduces the `project_notifications` tool, which proactively pushes notifications to the agent. Unlike other tools, `Thread` automatically invokes this tool on every turn, even when the LLM doesn't ask for it. When notifications are available, the tool use and results are inserted into the thread, simulating an LLM tool call. As with other tools, users can disable `project_notifications` in Profiles if they do not want them. Currently, the tool only notifies users about stale files: that is, files that have been edited by the user while the agent is also working on them. In the future, notifications may be expanded to include compiler diagnostics, long-running processes, and more. Release Notes: - Added `project_notifications` tool
This commit is contained in:
parent
de9053c7ca
commit
d87603dd60
8 changed files with 427 additions and 4 deletions
|
@ -11,6 +11,7 @@ mod list_directory_tool;
|
|||
mod move_path_tool;
|
||||
mod now_tool;
|
||||
mod open_tool;
|
||||
mod project_notifications_tool;
|
||||
mod read_file_tool;
|
||||
mod schema;
|
||||
mod templates;
|
||||
|
@ -45,6 +46,7 @@ pub use edit_file_tool::{EditFileMode, EditFileToolInput};
|
|||
pub use find_path_tool::FindPathToolInput;
|
||||
pub use grep_tool::{GrepTool, GrepToolInput};
|
||||
pub use open_tool::OpenTool;
|
||||
pub use project_notifications_tool::ProjectNotificationsTool;
|
||||
pub use read_file_tool::{ReadFileTool, ReadFileToolInput};
|
||||
pub use terminal_tool::TerminalTool;
|
||||
|
||||
|
@ -61,6 +63,7 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
|
|||
registry.register_tool(ListDirectoryTool);
|
||||
registry.register_tool(NowTool);
|
||||
registry.register_tool(OpenTool);
|
||||
registry.register_tool(ProjectNotificationsTool);
|
||||
registry.register_tool(FindPathTool);
|
||||
registry.register_tool(ReadFileTool);
|
||||
registry.register_tool(GrepTool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue