fix: use conversations.messages.compact instead of agents.messages.co… (#653)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-22 22:20:11 -08:00
committed by GitHub
parent 1cfc94e1dd
commit f8f75c50ba

View File

@@ -5127,14 +5127,9 @@ export default function App({
}
const client = await getClient();
// SDK types are out of date - compact returns CompactionResponse, not void
const result = (await client.agents.messages.compact(
agentId,
)) as unknown as {
num_messages_before: number;
num_messages_after: number;
summary: string;
};
const result = await client.conversations.messages.compact(
conversationIdRef.current,
);
// Format success message with before/after counts and summary
const outputLines = [