fix(brain): default list limit to 50 instead of 0
Some checks failed
CI / test (push) Failing after 2s
Some checks failed
CI / test (push) Failing after 2s
Backend clamps 0 to 1, returning only one memory. Default to 50 for a sensible batch when callers omit the limit field. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
1ac4ff731d
commit
1d44728dcd
1 changed files with 5 additions and 1 deletions
|
|
@ -200,13 +200,17 @@ func (s *Subsystem) brainList(_ context.Context, _ *mcp.CallToolRequest, input L
|
|||
return nil, ListOutput{}, errBridgeNotAvailable
|
||||
}
|
||||
|
||||
limit := input.Limit
|
||||
if limit == 0 {
|
||||
limit = 50 // sensible default — backend clamps 0 to 1
|
||||
}
|
||||
err := s.bridge.Send(ide.BridgeMessage{
|
||||
Type: "brain_list",
|
||||
Data: map[string]any{
|
||||
"project": input.Project,
|
||||
"type": input.Type,
|
||||
"agent_id": input.AgentID,
|
||||
"limit": input.Limit,
|
||||
"limit": limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue