Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/deep-code-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ seccompiler = "0.5"
libc = "0.2"

# Windows sandbox backend (Job Object: process-tree kill + resource limits).
# Job Object APIs span several windows-sys features: CreateJobObjectW needs
# Win32_Security (SECURITY_ATTRIBUTES); the EXTENDED_LIMIT struct needs
# Win32_System_Threading (+ Win32_System_IO for its IO_COUNTERS field).
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.59", features = [
"Win32_Foundation",
"Win32_Security",
"Win32_System_IO",
"Win32_System_JobObjects",
"Win32_System_Threading",
] }

[dev-dependencies]
Expand Down
4 changes: 4 additions & 0 deletions crates/deep-code-agent/src/lsp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ mod tests {
assert_eq!(diags[0].code.as_deref(), Some("E0101"));
}

// Unix-only for now: Windows file URIs (file:///C:/…, backslashes,
// drive-letter case) aren't normalized for path comparison yet — tracked
// separately from the sandbox work.
#[cfg(not(target_os = "windows"))]
#[test]
fn canonical_publish_uri_matches_non_canonical_query_path() {
let dir = tempfile::tempdir().unwrap();
Expand Down
7 changes: 2 additions & 5 deletions crates/deep-code-agent/src/shell_tools/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ fn approved(root: &std::path::Path, name: &str, arguments: Value) -> ToolResult
fn shell_run_requires_approval_and_returns_output() {
let tmp = tempdir().unwrap();
let registry = registry(tmp.path());
let call = ToolCall::new(
"call_1",
"shell_run",
json!({"command": "python3 -c 'print(\"hello\")'"}),
);
// `echo hello` works on both sh and cmd, so the test is cross-platform.
let call = ToolCall::new("call_1", "shell_run", json!({"command": "echo hello"}));

assert!(matches!(
registry.run_tool_call(call.clone(), None).unwrap(),
Expand Down
4 changes: 3 additions & 1 deletion crates/deep-code-agent/src/workspace_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ pub fn list_workspace_files(workspace: &Path, max: usize) -> Vec<String> {
continue;
}
if let Ok(relative) = entry.path().strip_prefix(workspace) {
files.push(relative.display().to_string());
// Normalize to forward slashes so the listing is identical across
// platforms (the model and `@` completion expect `/`).
files.push(relative.to_string_lossy().replace('\\', "/"));
if files.len() >= max {
break;
}
Expand Down
Loading