refactor(cli): move /system upgrade hint into thinking tips (#1411)

Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
Devansh Jain
2026-03-16 16:23:05 -07:00
committed by GitHub
parent 77b6a3fc78
commit fea0c5ff07
4 changed files with 40 additions and 40 deletions

View File

@@ -981,8 +981,9 @@ export default function App({
setAgentState((prev) => (prev ? { ...prev, name } : prev));
}, []);
// Check if the current agent would benefit from switching to the default prompt
const shouldShowDefaultPromptTip = useCallback(() => {
// Check if the current agent would benefit from switching to the default prompt.
// Used to conditionally include the /system tip in streaming tip rotation.
const includeSystemPromptUpgradeTip = useMemo(() => {
if (!agentState?.id || !agentState.system) return false;
const memMode = settingsManager.isMemfsEnabled(agentState.id)
? "memfs"
@@ -3079,8 +3080,6 @@ export default function App({
? `Resuming conversation with **${agentName}**`
: `Starting new conversation with **${agentName}**`;
const showPromptTip = shouldShowDefaultPromptTip();
// Command hints - vary based on agent state:
// - Resuming: show /new (they may want a fresh conversation)
// - New session + unpinned: show /pin (they should save their agent)
@@ -3092,9 +3091,6 @@ export default function App({
"→ **/new** start a new conversation",
"→ **/init** initialize your agent's memory",
"→ **/remember** teach your agent",
...(showPromptTip
? ["→ **/system** upgrade to the latest default prompt"]
: []),
]
: isPinned
? [
@@ -3103,9 +3099,6 @@ export default function App({
"→ **/memory** view your agent's memory",
"→ **/init** initialize your agent's memory",
"→ **/remember** teach your agent",
...(showPromptTip
? ["→ **/system** upgrade to the latest default prompt"]
: []),
]
: [
"→ **/agents** list all agents",
@@ -3113,9 +3106,6 @@ export default function App({
"→ **/pin** save + name your agent",
"→ **/init** initialize your agent's memory",
"→ **/remember** teach your agent",
...(showPromptTip
? ["→ **/system** upgrade to the latest default prompt"]
: []),
];
// Build status lines with optional release notes above header
@@ -3151,7 +3141,6 @@ export default function App({
agentProvenance,
resumedExistingConversation,
releaseNotes,
shouldShowDefaultPromptTip,
]);
// Fetch llmConfig when agent is ready
@@ -13075,9 +13064,6 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
? `Starting new conversation with **${agentName}**`
: "Creating a new agent";
// Only show prompt tip for existing agents, not brand new ones
const showPromptTip = continueSession && shouldShowDefaultPromptTip();
// Command hints - for pinned agents show /memory, for unpinned show /pin
const commandHints = isPinned
? [
@@ -13086,9 +13072,6 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
"→ **/memory** view your agent's memory",
"→ **/init** initialize your agent's memory",
"→ **/remember** teach your agent",
...(showPromptTip
? ["→ **/system** upgrade to the latest default prompt"]
: []),
]
: [
"→ **/agents** list all agents",
@@ -13096,9 +13079,6 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
"→ **/pin** save + name your agent",
"→ **/init** initialize your agent's memory",
"→ **/remember** teach your agent",
...(showPromptTip
? ["→ **/system** upgrade to the latest default prompt"]
: []),
];
// Build status lines with optional release notes above header
@@ -13133,7 +13113,6 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
agentState,
refreshDerived,
releaseNotes,
shouldShowDefaultPromptTip,
]);
const liveTrajectorySnapshot =
@@ -13511,6 +13490,7 @@ If using apply_patch, use this exact relative patch path: ${applyPatchRelativePa
tokenCount={trajectoryTokenDisplay}
elapsedBaseMs={liveTrajectoryElapsedBaseMs}
thinkingMessage={thinkingMessage}
includeSystemPromptUpgradeTip={includeSystemPromptUpgradeTip}
onSubmit={onSubmit}
onBashSubmit={handleBashSubmit}
bashRunning={bashRunning}