perf(webui): restore cached threads and load mention catalogs on demand
This commit is contained in:
1 parent
c370e2a5a5
commit
1a78ae2b99
13 files changed
+316
-65
No files matched your search
@@ -211,6 +211,7 @@ interface ThreadComposerProps {
|
||||
recentRoundUsage?: readonly ComposerRoundUsage[];
|
||||
variant?: "thread" | "hero";
|
||||
slashCommands?: SlashCommand[];
|
||||
onMentionSearch?: () => void;
|
||||
cliApps?: CliAppInfo[];
|
||||
mcpPresets?: McpPresetInfo[];
|
||||
sessions?: ChatSummary[];
|
||||
@@ -912,6 +913,7 @@ export function ThreadComposer({
|
||||
recentRoundUsage = [],
|
||||
variant = "thread",
|
||||
slashCommands = [],
|
||||
onMentionSearch,
|
||||
cliApps = [],
|
||||
mcpPresets = [],
|
||||
sessions = [],
|
||||
@@ -1301,6 +1303,11 @@ export function ThreadComposer({
|
||||
};
|
||||
}, [cliAppMenuDismissed, cursorPosition, interactionDisabled, value]);
|
||||
|
||||
const mentionSearchActive = cliAppMention !== null;
|
||||
useEffect(() => {
|
||||
if (mentionSearchActive) onMentionSearch?.();
|
||||
}, [mentionSearchActive, onMentionSearch]);
|
||||
|
||||
const availableSessionMentions = useMemo(
|
||||
() => sessionMentionOptions(sessions),
|
||||
[sessions],
|
||||
|
||||
Reference in new issue
Block a user