diff --git a/data/scripts/o b/data/scripts/o index 8f5a211..e6db6e5 100755 --- a/data/scripts/o +++ b/data/scripts/o @@ -33,7 +33,7 @@ ROOT_ENTRIES="session bypass agents backends models help ctl eventwait complete SESSION_FILES="env paused connected ctl name id bypass" # Agent-level files (exist under session/{name}/agent/{name}/) -AGENT_FILES="prompt fifo chat chat.raw statewait log plan cfg ctl cwd stats models systemprompt tools name id proc" +AGENT_FILES="prompt fifo chat chat.raw statewait log plan cfg ctl cwd stats systemprompt tools name id proc" is_root_path() { local path="$1" diff --git a/fs/handlers.go b/fs/handlers.go index 6075cf4..79d5a6b 100644 --- a/fs/handlers.go +++ b/fs/handlers.go @@ -710,6 +710,8 @@ func requestAgentCtl(ctx HandlerCtx, data []byte) ([]byte, error) { be.SetModel(strings.Join(args, " ")) } return []byte(strings.Join(args, " ") + "\n"), nil + case "models": + return []byte(ctx.Session.CachedListModels() + "\n"), nil case "backend": if len(args) == 0 { if be := ctx.Agent.Backend(); be != nil { @@ -760,10 +762,6 @@ func readAgentStats(ctx HandlerCtx) ([]byte, error) { return []byte(s), nil } -func readAgentModels(ctx HandlerCtx) ([]byte, error) { - return []byte(ctx.Session.CachedListModels() + "\n"), nil -} - func readAgentSystemprompt(ctx HandlerCtx) ([]byte, error) { return []byte(ctx.Agent.SystemPrompt() + "\n"), nil } diff --git a/fs/spec.go b/fs/spec.go index fed6616..2539f90 100644 --- a/fs/spec.go +++ b/fs/spec.go @@ -280,11 +280,6 @@ FileNode("generate", 0666, Read(readAgentStats), ), - FileNode("models", 0444, - Doc("Available models for this agent's backend."), - Read(readAgentModels), - ), - FileNode("systemprompt", 0444, Doc("Fully rendered system prompt for this agent."), Read(readAgentSystemprompt),