chore: sync latest workspace updates

This commit is contained in:
root
2026-06-15 13:38:23 +08:00
parent 1ed3f576fa
commit 6ef78ca54f
4 changed files with 118 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ import (
"strings"
"sproutclaw-web/internal/models"
"sproutclaw-web/internal/utils"
)
var npmSpecRe = regexp.MustCompile(`^(@?[^@]+(?:/[^@]+)?)(?:@(.+))?$`)
@@ -206,5 +207,5 @@ func ToggleExtension(agentDir, extPath string, enable bool) error {
if err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil {
return err
}
return os.Rename(src, dst)
return utils.Move(src, dst)
}

View File

@@ -7,6 +7,7 @@ import (
"strings"
"sproutclaw-web/internal/models"
"sproutclaw-web/internal/utils"
)
// ListSkills returns all skills (enabled and disabled) under agentDir.
@@ -65,7 +66,7 @@ func ToggleSkill(agentDir, skillPath string, enable bool) error {
if err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil {
return err
}
return os.Rename(src, dst)
return utils.Move(src, dst)
}
func isUnderDir(path, dir string) bool {