Files
agentu/internal/tools/paths.go
T
loveuer a431d1ec95 v0.0.1: agentu mvp
Add OpenAI-compatible providers, TUI, slash commands, and model switching.
Add local file tools plus optional yolo shell execution.
Document config, usage, and development workflow.
2026-06-22 22:40:38 +08:00

16 lines
252 B
Go

package tools
import (
"path/filepath"
)
func resolvePath(baseDir, path string) (string, error) {
if path == "" {
path = "."
}
if filepath.IsAbs(path) {
return filepath.Clean(path), nil
}
return filepath.Abs(filepath.Join(baseDir, path))
}