fix: add include option when retrieving agents for memory blocks (#574)
This commit is contained in:
@@ -49,7 +49,9 @@ export function MemoryTabViewer({
|
||||
const fetchBlocks = async () => {
|
||||
try {
|
||||
const client = await getClient();
|
||||
const agent = await client.agents.retrieve(agentId);
|
||||
const agent = await client.agents.retrieve(agentId, {
|
||||
include: ["agent.blocks"],
|
||||
});
|
||||
setFreshBlocks(agent.memory?.blocks || []);
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch memory blocks:", error);
|
||||
|
||||
@@ -120,7 +120,9 @@ function ProfileSelectionUI({
|
||||
const fetchedOptions = await Promise.all(
|
||||
optionsToFetch.map(async (opt) => {
|
||||
try {
|
||||
const agent = await client.agents.retrieve(opt.agentId);
|
||||
const agent = await client.agents.retrieve(opt.agentId, {
|
||||
include: ["agent.blocks"],
|
||||
});
|
||||
return { ...opt, agent };
|
||||
} catch {
|
||||
return { ...opt, agent: null };
|
||||
|
||||
Reference in New Issue
Block a user