fix: set agent ID on tool server after /agent switch
SwitchProfile creates a new tool server connection but wasn't calling SetAgentID on it, causing 'agent ID required' errors when listing tools.
This commit is contained in:
parent
edd5ade471
commit
aedfdec564
|
|
@ -359,6 +359,9 @@ func (ag *Agent) SwitchProfile(name string) error {
|
|||
return fmt.Errorf("agent %q: %w", name, err)
|
||||
}
|
||||
disp := ag.newToolServer()
|
||||
if disp != nil && ag.id != "" {
|
||||
disp.SetAgentID(ag.id)
|
||||
}
|
||||
env := []string{"OLLIE_SESSION_ID=" + ag.sessionID, "OLLIE_UNAME=" + ag.id}
|
||||
rt := BuildRuntime(cfg, disp, ag.cwd, env, ag.systemPrompt, ag.envBlock)
|
||||
if cfg.Backend != "" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue