mirror of
https://github.com/Twigpine/zero.git
synced 2026-11-08 09:49:34 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e018ee27e0 |
No files matched your search
@@ -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),
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user