mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-28 21:33:05 +00:00
feat: expand local operator controls across CLI and WebUI
- Add structured CLI commands for status/kernel/settings/plugins/memory/knowledge/agents - Inject core dependencies directly into CLI plugin for non-HTTP operator workflows - Add plugin management panel and API proxy endpoints to WebUI - Let cmd_run inherit default workdir from core.agent.workdir - Use fixed loopback address for pluginmgr API - Remove stale MaxToolTurns config usage from homed wiring
This commit is contained in:
@ -45,7 +45,7 @@ func (p *Plugin) Start(s *sdk.PluginSDK) error {
|
||||
},
|
||||
"workdir": map[string]interface{}{
|
||||
"type": "string",
|
||||
"description": "工作目录(可选,默认当前目录)",
|
||||
"description": "工作目录(可选,默认由 core.agent.workdir 配置决定)",
|
||||
},
|
||||
},
|
||||
"required": []string{"command"},
|
||||
@ -66,6 +66,15 @@ func (p *Plugin) Start(s *sdk.PluginSDK) error {
|
||||
}
|
||||
|
||||
workdir, _ := args["workdir"].(string)
|
||||
if workdir == "" {
|
||||
if sett := s.Settings(); sett != nil {
|
||||
if v, _ := sett.GetCore("core.agent.workdir"); v != nil {
|
||||
if str, ok := v.(string); ok && str != "" {
|
||||
workdir = str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user