Allow edit tool to access files outside project (with confirmation) (#35221)
Now the edit tool can access files outside the current project (just like the terminal tool can), but it's behind a prompt (unlike other edit tool actions). Release Notes: - The edit tool can now access files outside the current project, but only if the user grants it permission to.
This commit is contained in:
parent
a57e4dc8a8
commit
a55bd49c8d
23 changed files with 618 additions and 26 deletions
|
@ -942,7 +942,7 @@ impl Thread {
|
|||
}
|
||||
|
||||
pub fn tool_uses_for_message(&self, id: MessageId, cx: &App) -> Vec<ToolUse> {
|
||||
self.tool_use.tool_uses_for_message(id, cx)
|
||||
self.tool_use.tool_uses_for_message(id, &self.project, cx)
|
||||
}
|
||||
|
||||
pub fn tool_results_for_message(
|
||||
|
@ -2557,7 +2557,7 @@ impl Thread {
|
|||
return self.handle_hallucinated_tool_use(tool_use.id, tool_use.name, window, cx);
|
||||
}
|
||||
|
||||
if tool.needs_confirmation(&tool_use.input, cx)
|
||||
if tool.needs_confirmation(&tool_use.input, &self.project, cx)
|
||||
&& !AgentSettings::get_global(cx).always_allow_tool_actions
|
||||
{
|
||||
self.tool_use.confirm_tool_use(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue