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
24 changes: 8 additions & 16 deletions crates/goose/src/acp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,6 @@ fn get_requested_line(arguments: Option<&rmcp::model::JsonObject>) -> Option<u32
.map(|l| l as u32)
}

fn create_tool_location(path: &str, line: Option<u32>) -> ToolCallLocation {
let mut loc = ToolCallLocation::new(path);
if let Some(l) = line {
loc = loc.line(l);
}
loc
}

fn is_developer_file_tool(tool_name: &str) -> bool {
matches!(tool_name, "read" | "write" | "edit")
}
Expand All @@ -391,7 +383,7 @@ fn extract_locations_from_meta(
.filter_map(|entry| {
let path = entry.get("path")?.as_str()?;
let line = entry.get("line").and_then(|v| v.as_u64()).map(|l| l as u32);
Some(create_tool_location(path, line))
Some(ToolCallLocation::new(path).line(line))
})
.collect::<Vec<_>>();
if locations.is_empty() {
Expand Down Expand Up @@ -422,12 +414,12 @@ fn extract_tool_locations(
if let Some(path_str) = path_str {
if matches!(tool_name, "read") {
let line = get_requested_line(tool_call.arguments.as_ref());
locations.push(create_tool_location(path_str, line));
locations.push(ToolCallLocation::new(path_str).line(line));
return locations;
}

if matches!(tool_name, "write" | "edit") {
locations.push(create_tool_location(path_str, Some(1)));
locations.push(ToolCallLocation::new(path_str).line(1));
return locations;
}

Expand All @@ -447,19 +439,19 @@ fn extract_tool_locations(
let line = extract_view_line_range(text)
.map(|range| range.0 as u32)
.or(Some(1));
locations.push(create_tool_location(path_str, line));
locations.push(ToolCallLocation::new(path_str).line(line));
}
Some("str_replace") | Some("insert") => {
let line = extract_first_line_number(text)
.map(|l| l as u32)
.or(Some(1));
locations.push(create_tool_location(path_str, line));
locations.push(ToolCallLocation::new(path_str).line(line));
}
Some("write") => {
locations.push(create_tool_location(path_str, Some(1)));
locations.push(ToolCallLocation::new(path_str).line(1));
}
_ => {
locations.push(create_tool_location(path_str, Some(1)));
locations.push(ToolCallLocation::new(path_str).line(1));
}
}
break;
Expand All @@ -468,7 +460,7 @@ fn extract_tool_locations(
}

if locations.is_empty() {
locations.push(create_tool_location(path_str, Some(1)));
locations.push(ToolCallLocation::new(path_str).line(1));
}
}
}
Expand Down
1 change: 0 additions & 1 deletion ui/goose2/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ Additional tooling notes:

- Unit/component tests use Vitest and Testing Library via `just test` or `pnpm test`.
- E2E tests use Playwright via `just test-e2e` and `just test-e2e-all`.
- File size enforcement runs through `pnpm check:file-sizes` and is included in `just check`.
- Before handing off a change, run the smallest relevant verification step. Use `just ci` when you need the full local gate.
- GitHub Actions also runs desktop-oriented checks, including Playwright coverage, that are broader than the local pre-push hook.

Expand Down
3 changes: 1 addition & 2 deletions ui/goose2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
"dev": "vite",
"build": "tsc && vite build",
"typecheck": "tsc --noEmit",
"check:file-sizes": "node ./scripts/check-file-sizes.mjs",
"check:i18n": "node ./scripts/check-i18n-strings.mjs",
"lint": "biome lint .",
"check": "biome check . && pnpm check:file-sizes && pnpm check:i18n",
"check": "biome check . && pnpm check:i18n",
"format": "biome format --write .",
"preview": "vite preview",
"tauri": "tauri",
Expand Down
186 changes: 0 additions & 186 deletions ui/goose2/scripts/check-file-sizes.mjs

This file was deleted.

Loading
Loading