fix: only inject interrupt recovery after real user interrupts (#936)
This commit is contained in:
@@ -4,7 +4,7 @@ import type { Conversation } from "@letta-ai/letta-client/resources/conversation
|
||||
import { Box, useInput } from "ink";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { getClient } from "../../agent/client";
|
||||
import { SYSTEM_REMINDER_OPEN } from "../../constants";
|
||||
import { SYSTEM_ALERT_OPEN, SYSTEM_REMINDER_OPEN } from "../../constants";
|
||||
import { useTerminalWidth } from "../hooks/useTerminalWidth";
|
||||
import { colors } from "./colors";
|
||||
import { MarkdownDisplay } from "./MarkdownDisplay";
|
||||
@@ -93,7 +93,12 @@ function extractUserMessagePreview(message: Message): string | null {
|
||||
const part = content[i];
|
||||
if (part?.type === "text" && part.text) {
|
||||
// Skip system-reminder blocks
|
||||
if (part.text.startsWith(SYSTEM_REMINDER_OPEN)) continue;
|
||||
if (
|
||||
part.text.startsWith(SYSTEM_REMINDER_OPEN) ||
|
||||
part.text.startsWith(SYSTEM_ALERT_OPEN)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
textToShow = part.text;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user