Skip to content
Closed
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
12 changes: 0 additions & 12 deletions internal/agent/agent_tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1639,18 +1639,6 @@ func simStripPaddedLineNumberPrefixes(text, content string) string {
return strings.Join(lines, "\n")
}

func simStripAllLineNumberPrefixes(text string) string {
lines := simTrimDanglingReadFileLineNumberOnlyLines(strings.Split(text, "\n"))
for i, l := range lines {
if simReadFileLineNumberOnlyRE.MatchString(l) {
lines[i] = ""
continue
}
lines[i] = simLineNumberPrefixRE.ReplaceAllString(l, "")
}
return strings.Join(lines, "\n")
}

func simTrimDanglingReadFileLineNumberOnlyLines(lines []string) []string {
if len(lines) == 0 {
return lines
Expand Down
6 changes: 0 additions & 6 deletions internal/agent/model_cascade.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ package agent

import (
"github.com/topcheer/ggcode/internal/debug"
"github.com/topcheer/ggcode/internal/provider"
)

// cascadeMinLowBatches is how many consecutive all-read-only, error-free
Expand Down Expand Up @@ -149,8 +148,3 @@ func (a *Agent) restoreModelCascade() {
a.cascadeSavedProvider = nil
debug.Log("model-cascade", "restored main model provider")
}

// cascadeTurnProvider is the provider a NEW agent-level request would use;
// exposed for tests to assert swap/restore behavior without racing the
// loop.
func (a *Agent) cascadeTurnProvider() provider.Provider { return a.provider }
10 changes: 0 additions & 10 deletions internal/agent/tool_fallback_hints.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@ func lspFallbackHint(lowerErr string) string {
return ""
}

// isEmptyToolResult checks if the error indicates no results were found.
// #3673-A: "not found" and "empty" removed - a successful search result's
// content IS the searched file's content, and ordinary source lines carry
// those words constantly ("// err is not found here", "// list is empty").
// Kept phrases are the explicit no-match sentinels only.
func isEmptyToolResult(s string) bool {
return strings.Contains(s, "no match") || strings.Contains(s, "no result") ||
strings.Contains(s, "no symbol")
}

// isZeroMatchSuccess reports whether a SUCCESS (non-error) tool result is a
// zero-match outcome for a search-class tool (#3641). grep/search_files
// render "No matches found" as a successful empty result, so IsError-gated
Expand Down
Loading