fix: all messages route to main session on all agents
All three agents (James/Mira on forge, Hans on Zurich) now use session="main" for both direct and group messages. This lands agentchat in each agent's primary thread — same context as webchat/Telegram. Previous v1.1 used "agentchat"/"agentchat-direct" sessions which were isolated silos. Session "main" routes to agent:main:main on whichever OC gateway is called, including Hans on Zurich.
This commit is contained in:
parent
9ff3c8cde9
commit
9184080682
10
main.go
10
main.go
|
|
@ -243,14 +243,14 @@ func imageURLToBase64(imageURL string) string {
|
|||
func callAgent(cfg AgentConfig, message, from string, direct bool, imageURL string) (string, error) {
|
||||
var prompt, session string
|
||||
if direct {
|
||||
// 1:1 or name-targeted — use dedicated agentchat-direct session (NOT "main", to avoid
|
||||
// conflicting with the webchat session that may be active simultaneously)
|
||||
// 1:1 explicit-To message — use main session so it lands in each agent's primary thread
|
||||
prompt = fmt.Sprintf("[agentchat from %s — reply inline, do not use the message tool]\n%s", from, message)
|
||||
session = "agentchat-direct"
|
||||
session = "main"
|
||||
} else {
|
||||
// Group — use agentchat session with group rules
|
||||
// Group broadcast/name-mention — also use main session so agentchat context is shared
|
||||
// with the agent's primary thread (webchat/Telegram). All three agents on all nodes.
|
||||
prompt = fmt.Sprintf("%s\n\n[group message from %s]\n%s", systemPrompt, from, message)
|
||||
session = "agentchat"
|
||||
session = "main"
|
||||
}
|
||||
|
||||
// Resolve image to base64 data URL if present
|
||||
|
|
|
|||
Loading…
Reference in New Issue