Compare commits

...
Author SHA1 Message Date
KRATOS e018ee27e0 Remove superseded and dead utility functions
Behavior-preserving cleanup of functions unreachable even from tests:
- tools.CoreWriteTools / CoreShellTools — superseded by the …Scoped variants.
- workspaceindex.MaxFileDepth — unused helper.
- tui.indentText — unused string util.
- tuiTheme.onPanel2 + the now-orphaned colorPanel2 const — unused style helper.

deadcode -test=false: 114 -> 109; truly-dead: 23 -> 18. Scoped to genuine cruft only —
the remaining dead funcs are dormant/intended-but-unwired features (owner wire-vs-delete),
not blind deletes.
2026-06-14 12:22:32 +05:30
4 changed files with 0 additions and 27 deletions

No files matched your search

-2
View File
@@ -199,7 +199,6 @@ func CoreReadOnlyToolsScoped(workspaceRoot string, scope PathScope) []Tool {
}
}
func CoreWriteTools(workspaceRoot string) []Tool { return CoreWriteToolsScoped(workspaceRoot, nil) }
func CoreWriteToolsScoped(workspaceRoot string, scope PathScope) []Tool {
return []Tool{
NewScopedWriteFileTool(workspaceRoot, scope),
@@ -209,7 +208,6 @@ func CoreWriteToolsScoped(workspaceRoot string, scope PathScope) []Tool {
}
}
func CoreShellTools(workspaceRoot string) []Tool { return CoreShellToolsScoped(workspaceRoot, nil) }
func CoreShellToolsScoped(workspaceRoot string, scope PathScope) []Tool {
return []Tool{
NewScopedBashTool(workspaceRoot, scope),
-6
View File
@@ -81,7 +81,6 @@ type tuiTheme struct {
// ink so every pairing survives 256-color downsampling.
const (
colorPanel = "#0e0e10" // card backgrounds
colorPanel2 = "#121215" // card header rows, picker rows
colorPanel3 = "#17171b" // selected/hovered row bg
colorLine = "#242429" // default borders, rules
colorLine2 = "#414147" // emphasized borders
@@ -166,11 +165,6 @@ func (t tuiTheme) onPanel(style lipgloss.Style) lipgloss.Style {
return style.Background(lipgloss.Color(colorPanel))
}
// onPanel2 paints on the header/picker-row surface.
func (t tuiTheme) onPanel2(style lipgloss.Style) lipgloss.Style {
return style.Background(lipgloss.Color(colorPanel2))
}
// onSel paints on the selected-row tint.
func (t tuiTheme) onSel(style lipgloss.Style) lipgloss.Style {
return style.Background(lipgloss.Color(colorSelBg))
-9
View File
@@ -790,15 +790,6 @@ func firstArgValue(raw string, keys []string) string {
return ""
}
func indentText(text string, spaces int) string {
prefix := strings.Repeat(" ", spaces)
lines := strings.Split(text, "\n")
for index, line := range lines {
lines[index] = prefix + line
}
return strings.Join(lines, "\n")
}
// looksLikeDiff reports whether output should be rendered as a diff card: a
// real hunk header, or both old/new file headers. A single line starting with
// "---" (a Markdown rule, YAML document marker, log separator…) must NOT
-10
View File
@@ -316,16 +316,6 @@ func normalizeSeparators(rel string) string {
return strings.ReplaceAll(filepath.ToSlash(rel), "\\", "/")
}
func MaxFileDepth(files []File) int {
maxDepth := 0
for _, file := range files {
if file.Depth > maxDepth {
maxDepth = file.Depth
}
}
return maxDepth
}
func SortFiles(files []File) {
sort.Slice(files, func(i, j int) bool {
return files[i].Path < files[j].Path