[env] Remove git config for now (#1884)

## Summary
Forgot to remove this in #1869 last night! Too much of a performance hit
on the main thread. We can bring it back via an async thread on startup.
This commit is contained in:
Dylan
2025-08-06 08:05:17 -07:00
committed by GitHub
parent 3e8bcf0247
commit dc468d563f
3 changed files with 1 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
use crate::config_types::ReasoningEffort as ReasoningEffortConfig;
use crate::config_types::ReasoningSummary as ReasoningSummaryConfig;
use crate::error::Result;
use crate::git_info::GitInfo;
use crate::model_family::ModelFamily;
use crate::models::ContentItem;
use crate::models::ResponseItem;
@@ -35,7 +34,6 @@ const USER_INSTRUCTIONS_END: &str = "\n\n</user_instructions>";
#[derive(Debug, Clone)]
pub(crate) struct EnvironmentContext {
pub cwd: PathBuf,
pub git_info: Option<GitInfo>,
pub approval_policy: AskForApproval,
pub sandbox_policy: SandboxPolicy,
}
@@ -47,7 +45,6 @@ impl Display for EnvironmentContext {
"Current working directory: {}",
self.cwd.to_string_lossy()
)?;
writeln!(f, "Is directory a git repo: {}", self.git_info.is_some())?;
writeln!(f, "Approval policy: {}", self.approval_policy)?;
writeln!(f, "Sandbox policy: {}", self.sandbox_policy)?;

View File

@@ -52,7 +52,6 @@ use crate::exec::SandboxType;
use crate::exec::StdoutStream;
use crate::exec::process_exec_tool_call;
use crate::exec_env::create_env;
use crate::git_info::collect_git_info;
use crate::mcp_connection_manager::McpConnectionManager;
use crate::mcp_tool_call::handle_mcp_tool_call;
use crate::models::ContentItem;
@@ -1228,7 +1227,6 @@ async fn run_turn(
base_instructions_override: sess.base_instructions.clone(),
environment_context: Some(EnvironmentContext {
cwd: sess.cwd.clone(),
git_info: collect_git_info(&sess.cwd).await,
approval_policy: sess.approval_policy,
sandbox_policy: sess.sandbox_policy.clone(),
}),

View File

@@ -99,7 +99,7 @@ async fn test_send_message_success() {
response
);
// wait for the server to hear the user message
sleep(Duration::from_secs(10));
sleep(Duration::from_secs(5));
// Ensure the server and tempdir live until end of test
drop(server);