* delete deadcode
This commit is contained in:
parent
9d96da820c
commit
07488bd852
1 changed files with 0 additions and 94 deletions
|
|
@ -626,100 +626,6 @@ type ToolsConfig struct {
|
||||||
WriteFile ToolConfig `json:"write_file"`
|
WriteFile ToolConfig `json:"write_file"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToolsConfigRaw struct {
|
|
||||||
AllowReadPaths []string `json:"allow_read_paths"`
|
|
||||||
AllowWritePaths []string `json:"allow_write_paths"`
|
|
||||||
Web WebToolsConfig `json:"web"`
|
|
||||||
Cron CronToolsConfig `json:"cron"`
|
|
||||||
Exec ExecConfig `json:"exec"`
|
|
||||||
Skills SkillsToolsConfig `json:"skills"`
|
|
||||||
MediaCleanup MediaCleanupConfig `json:"media_cleanup"`
|
|
||||||
MCP MCPConfig `json:"mcp"`
|
|
||||||
AppendFile *ToolConfig `json:"append_file,omitempty"`
|
|
||||||
CronTool *ToolConfig `json:"cron_tool,omitempty"`
|
|
||||||
EditFile *ToolConfig `json:"edit_file,omitempty"`
|
|
||||||
ExecTool *ToolConfig `json:"exec_tool,omitempty"`
|
|
||||||
FindSkills *ToolConfig `json:"find_skills,omitempty"`
|
|
||||||
I2C *ToolConfig `json:"i2c,omitempty"`
|
|
||||||
InstallSkill *ToolConfig `json:"install_skill,omitempty"`
|
|
||||||
ListDir *ToolConfig `json:"list_dir,omitempty"`
|
|
||||||
Message *ToolConfig `json:"message,omitempty"`
|
|
||||||
ReadFile *ToolConfig `json:"read_file,omitempty"`
|
|
||||||
Spawn *ToolConfig `json:"spawn,omitempty"`
|
|
||||||
SPI *ToolConfig `json:"spi,omitempty"`
|
|
||||||
Subagent *ToolConfig `json:"subagent,omitempty"`
|
|
||||||
WebFetch *ToolConfig `json:"web_fetch,omitempty"`
|
|
||||||
WebSearch *ToolConfig `json:"web_search,omitempty"`
|
|
||||||
WriteFile *ToolConfig `json:"write_file,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *ToolsConfig) UnmarshalJSON(data []byte) error {
|
|
||||||
var raw ToolsConfigRaw
|
|
||||||
if err := json.Unmarshal(data, &raw); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
t.AllowReadPaths = raw.AllowReadPaths
|
|
||||||
t.AllowWritePaths = raw.AllowWritePaths
|
|
||||||
t.Web = raw.Web
|
|
||||||
t.Cron = raw.Cron
|
|
||||||
t.Exec = raw.Exec
|
|
||||||
t.Skills = raw.Skills
|
|
||||||
t.MediaCleanup = raw.MediaCleanup
|
|
||||||
t.MCP = raw.MCP
|
|
||||||
|
|
||||||
if raw.AppendFile != nil {
|
|
||||||
t.AppendFile = *raw.AppendFile
|
|
||||||
}
|
|
||||||
if raw.CronTool != nil {
|
|
||||||
t.CronTool = *raw.CronTool
|
|
||||||
}
|
|
||||||
if raw.EditFile != nil {
|
|
||||||
t.EditFile = *raw.EditFile
|
|
||||||
}
|
|
||||||
if raw.ExecTool != nil {
|
|
||||||
t.ExecTool = *raw.ExecTool
|
|
||||||
}
|
|
||||||
if raw.FindSkills != nil {
|
|
||||||
t.FindSkills = *raw.FindSkills
|
|
||||||
}
|
|
||||||
if raw.I2C != nil {
|
|
||||||
t.I2C = *raw.I2C
|
|
||||||
}
|
|
||||||
if raw.InstallSkill != nil {
|
|
||||||
t.InstallSkill = *raw.InstallSkill
|
|
||||||
}
|
|
||||||
if raw.ListDir != nil {
|
|
||||||
t.ListDir = *raw.ListDir
|
|
||||||
}
|
|
||||||
if raw.Message != nil {
|
|
||||||
t.Message = *raw.Message
|
|
||||||
}
|
|
||||||
if raw.ReadFile != nil {
|
|
||||||
t.ReadFile = *raw.ReadFile
|
|
||||||
}
|
|
||||||
if raw.Spawn != nil {
|
|
||||||
t.Spawn = *raw.Spawn
|
|
||||||
}
|
|
||||||
if raw.SPI != nil {
|
|
||||||
t.SPI = *raw.SPI
|
|
||||||
}
|
|
||||||
if raw.Subagent != nil {
|
|
||||||
t.Subagent = *raw.Subagent
|
|
||||||
}
|
|
||||||
if raw.WebFetch != nil {
|
|
||||||
t.WebFetch = *raw.WebFetch
|
|
||||||
}
|
|
||||||
if raw.WebSearch != nil {
|
|
||||||
t.WebSearch = *raw.WebSearch
|
|
||||||
}
|
|
||||||
if raw.WriteFile != nil {
|
|
||||||
t.WriteFile = *raw.WriteFile
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type SearchCacheConfig struct {
|
type SearchCacheConfig struct {
|
||||||
MaxSize int `json:"max_size" env:"PICOCLAW_SKILLS_SEARCH_CACHE_MAX_SIZE"`
|
MaxSize int `json:"max_size" env:"PICOCLAW_SKILLS_SEARCH_CACHE_MAX_SIZE"`
|
||||||
TTLSeconds int `json:"ttl_seconds" env:"PICOCLAW_SKILLS_SEARCH_CACHE_TTL_SECONDS"`
|
TTLSeconds int `json:"ttl_seconds" env:"PICOCLAW_SKILLS_SEARCH_CACHE_TTL_SECONDS"`
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue