fix nil pointer dereference on /agent command

NewDispatcher was not passed to AgentCoreConfig in the dbus session
manager, causing a nil function call when switching agents via /agent.
This commit is contained in:
Levi Neely 2026-07-14 11:59:03 +02:00
parent 93ba8ffd29
commit 5afe7b69ac
1 changed files with 8 additions and 7 deletions

15
main.go
View File

@ -113,13 +113,14 @@ func (m *SessionManager) CreateSession(cwd, backendName, modelName, agentName st
// Create the agent core
core := agent.NewAgentCore(agent.AgentCoreConfig{
Backend: be,
AgentName: agentName,
AgentsDir: agentsDir,
SessionsDir: sessionsDir,
SessionID: sessID,
CWD: cwd,
Runtime: rt,
Backend: be,
AgentName: agentName,
AgentsDir: agentsDir,
SessionsDir: sessionsDir,
SessionID: sessID,
CWD: cwd,
Runtime: rt,
NewDispatcher: newDisp,
})
ctx, cancel := context.WithCancel(context.Background())