utils

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigInstance = Config{}

Functions

func AddLink(name, globalPath, linkPath string) error
func CleanBrokenLinks() []string
func CreateLink(oldname, newname string) error

func DirExists

func DirExists(path string) bool

func EnsureDir

func EnsureDir(dir string) error

func FileExists

func FileExists(path string) bool

func GetDefaultAgentName

func GetDefaultAgentName() string

GetDefaultAgentName 从配置中获取默认 Agent 名称

func GetDefaultConfig

func GetDefaultConfig() *models.AppConfig

func GetGlobalSkillsDir

func GetGlobalSkillsDir() string
func GetLink(name string) *models.SkillLink

func GetLinksPath

func GetLinksPath() string

func GetSkillsDirForAgent

func GetSkillsDirForAgent(a agent.AgentProfile, projectDir string) (string, error)

GetSkillsDirForAgent 获取指定 Agent 的 skills 目录

func GetSkillsOutputDir

func GetSkillsOutputDir(outputDir string) (string, error)

GetSkillsOutputDir 保持向后兼容,默认使用 Claude Code

func InitAppDirs

func InitAppDirs() error

func IsClaudeCodeProject

func IsClaudeCodeProject(dir string) bool
func LoadLinks() *models.LinksConfig

func PromptSelectAgent

func PromptSelectAgent(agents []agent.AgentProfile) (agent.AgentProfile, error)

PromptSelectAgent 交互式选择 Agent

func RemoveLink(name string) error

func ResolveOutputDir

func ResolveOutputDir(outputDir string, agentName string) (string, error)

ResolveOutputDir 根据 --agent 和 --outputDir 解析最终输出目录 优先级: --outputDir > --agent > config default_agent > 检测 > 默认 claude

func SaveLinks(config *models.LinksConfig) error

func SelectAgent

func SelectAgent(projectDir string, agentName string) (agent.AgentProfile, error)

SelectAgent 选择目标 Agent

func Unzip

func Unzip(src, dest string) error

func ZipDir

func ZipDir(dir, outputPath string) error

Types

type Config

type Config struct {
	HomeDir         string
	AppSeriesDir    string
	AppDir          string
	ConfigDir       string
	ConfigPath      string
	GlobalSkillsDir string
	LogDir          string
	LogPath         string
}

func (*Config) GetAppDir

func (c *Config) GetAppDir() string

func (*Config) GetAppSeriesDir

func (c *Config) GetAppSeriesDir() string

func (*Config) GetConfigDir

func (c *Config) GetConfigDir() string

func (*Config) GetConfigPath

func (c *Config) GetConfigPath() string

func (*Config) GetGlobalSkillsDir

func (c *Config) GetGlobalSkillsDir() string

func (*Config) GetHomeDir

func (c *Config) GetHomeDir() string

func (*Config) GetLogDir

func (c *Config) GetLogDir() string

func (*Config) GetLogPath

func (c *Config) GetLogPath() string

func (*Config) LoadConfig

func (c *Config) LoadConfig() *models.AppConfig

func (*Config) SaveConfig

func (c *Config) SaveConfig(config *models.AppConfig)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL