summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/HistoryItemDisplay.tsx
diff options
context:
space:
mode:
authorPyush Sinha <[email protected]>2025-08-04 09:53:50 -0700
committerGitHub <[email protected]>2025-08-04 16:53:50 +0000
commite506b40c271da0e05a361f5299c37976a9e1f1f3 (patch)
tree2d569bd9a86734778f89e0197716e1b5db2954aa /packages/cli/src/ui/components/HistoryItemDisplay.tsx
parent83a04c47552c1407662a5e3e567f4c5e50bba5de (diff)
fix: /help remove flickering and respect clear shortcut (ctr+l) (#3611)
Co-authored-by: Jacob Richman <[email protected]> Co-authored-by: Allen Hutchison <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.tsx')
-rw-r--r--packages/cli/src/ui/components/HistoryItemDisplay.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
index eba4ea47..74615b26 100644
--- a/packages/cli/src/ui/components/HistoryItemDisplay.tsx
+++ b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
@@ -21,6 +21,8 @@ import { ModelStatsDisplay } from './ModelStatsDisplay.js';
import { ToolStatsDisplay } from './ToolStatsDisplay.js';
import { SessionSummaryDisplay } from './SessionSummaryDisplay.js';
import { Config } from '@google/gemini-cli-core';
+import { Help } from './Help.js';
+import { SlashCommand } from '../commands/types.js';
interface HistoryItemDisplayProps {
item: HistoryItem;
@@ -29,6 +31,7 @@ interface HistoryItemDisplayProps {
isPending: boolean;
config?: Config;
isFocused?: boolean;
+ commands?: readonly SlashCommand[];
}
export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
@@ -37,6 +40,7 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
terminalWidth,
isPending,
config,
+ commands,
isFocused = true,
}) => (
<Box flexDirection="column" key={item.id}>
@@ -71,6 +75,7 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
gcpProject={item.gcpProject}
/>
)}
+ {item.type === 'help' && commands && <Help commands={commands} />}
{item.type === 'stats' && <StatsDisplay duration={item.duration} />}
{item.type === 'model_stats' && <ModelStatsDisplay />}
{item.type === 'tool_stats' && <ToolStatsDisplay />}