fix: add guard for default conversation id (#1245)

This commit is contained in:
cthomas
2026-03-03 14:42:35 -08:00
committed by GitHub
parent 13063371c0
commit 28ba2e7e1f
5 changed files with 62 additions and 20 deletions

View File

@@ -3280,6 +3280,10 @@ export default function App({
try {
const client = await getClient();
debugLog(
"conversations",
`retrieve(${conversationId}) [syncConversationModel]`,
);
const conversation =
await client.conversations.retrieve(conversationId);
if (cancelled) return;
@@ -6154,7 +6158,9 @@ export default function App({
// Build success message
const agentLabel = agent.name || targetAgentId;
const isSpecificConv =
opts?.conversationId && opts.conversationId !== "default";
opts?.conversationId &&
opts.conversationId !== "default" &&
!opts?.conversationId.startsWith("agent-");
const successOutput = isSpecificConv
? [
`Switched to **${agentLabel}**`,
@@ -8695,7 +8701,7 @@ export default function App({
// Build export parameters (include conversation_id if in specific conversation)
const exportParams: { conversation_id?: string } = {};
if (conversationId !== "default") {
if (conversationId !== "default" && conversationId !== agentId) {
exportParams.conversation_id = conversationId;
}
@@ -12914,15 +12920,16 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
: `letta --agent ${agentId}`}
</Text>
{/* Only show conversation hint if not on default (default is resumed automatically) */}
{conversationId !== "default" && (
<>
<Box height={1} />
<Text dimColor>Resume this conversation with:</Text>
<Text color={colors.link.url}>
{`letta --conv ${conversationId}`}
</Text>
</>
)}
{conversationId !== "default" &&
conversationId !== agentId && (
<>
<Box height={1} />
<Text dimColor>Resume this conversation with:</Text>
<Text color={colors.link.url}>
{`letta --conv ${conversationId}`}
</Text>
</>
)}
</Box>
);
})()}

View File

@@ -177,7 +177,9 @@ export const AgentInfoBar = memo(function AgentInfoBar({
{/* Phantom alien row + Conversation ID */}
<Box>
<Text>{alienLines[3]}</Text>
{conversationId && conversationId !== "default" ? (
{conversationId &&
conversationId !== "default" &&
!conversationId.startsWith("agent-") ? (
<Box width={rightWidth} flexShrink={1}>
<Text dimColor wrap="truncate-end">
{truncateText(conversationId, rightWidth)}