From 0556358560f065dec5e35fd5b0544b18ddcc4495 Mon Sep 17 00:00:00 2001 From: Jacob Richman Date: Fri, 2 May 2025 14:39:39 -0700 Subject: Cleanup low value comments. (#248) --- packages/cli/src/ui/components/InputPrompt.tsx | 2 +- packages/cli/src/ui/components/SuggestionsDisplay.tsx | 7 +------ packages/cli/src/ui/components/messages/ToolGroupMessage.tsx | 3 --- packages/cli/src/ui/hooks/useGeminiStream.ts | 6 +++--- packages/cli/src/ui/utils/MarkdownRenderer.tsx | 1 - 5 files changed, 5 insertions(+), 14 deletions(-) (limited to 'packages/cli') diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 1c8cff4d..a7f06bce 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -17,7 +17,7 @@ interface InputPromptProps { setInputKey: React.Dispatch>; onSubmit: (value: string) => void; showSuggestions: boolean; - suggestions: Suggestion[]; // Changed to Suggestion[] + suggestions: Suggestion[]; activeSuggestionIndex: number; navigateUp: () => void; navigateDown: () => void; diff --git a/packages/cli/src/ui/components/SuggestionsDisplay.tsx b/packages/cli/src/ui/components/SuggestionsDisplay.tsx index 8c9cf377..02dea70e 100644 --- a/packages/cli/src/ui/components/SuggestionsDisplay.tsx +++ b/packages/cli/src/ui/components/SuggestionsDisplay.tsx @@ -48,12 +48,7 @@ export function SuggestionsDisplay({ const visibleSuggestions = suggestions.slice(startIndex, endIndex); return ( - + {scrollOffset > 0 && } {visibleSuggestions.map((suggestion, index) => { diff --git a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx index 2d4982c2..401b8ee0 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx @@ -66,9 +66,6 @@ export const ToolGroupMessage: React.FC = ({ )} ))} - {/* Optional: Add padding below the last item if needed, - though ToolMessage already has some vertical space implicitly */} - {/* {tools.length > 0 && } */} ); }; diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts index 9e2901ec..bd2b617c 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.ts +++ b/packages/cli/src/ui/hooks/useGeminiStream.ts @@ -27,12 +27,12 @@ import { IndividualToolCallDisplay, ToolCallStatus, } from '../types.js'; -import { isAtCommand } from '../utils/commandUtils.js'; // Import the @ command checker +import { isAtCommand } from '../utils/commandUtils.js'; import { useSlashCommandProcessor } from './slashCommandProcessor.js'; import { useShellCommandProcessor } from './shellCommandProcessor.js'; import { usePassthroughProcessor } from './passthroughCommandProcessor.js'; -import { handleAtCommand } from './atCommandProcessor.js'; // Import the @ command handler -import { findSafeSplitPoint } from '../utils/markdownUtilities.js'; // Import the split point finder +import { handleAtCommand } from './atCommandProcessor.js'; +import { findSafeSplitPoint } from '../utils/markdownUtilities.js'; const addHistoryItem = ( setHistory: React.Dispatch>, diff --git a/packages/cli/src/ui/utils/MarkdownRenderer.tsx b/packages/cli/src/ui/utils/MarkdownRenderer.tsx index c9053728..6441dcb6 100644 --- a/packages/cli/src/ui/utils/MarkdownRenderer.tsx +++ b/packages/cli/src/ui/utils/MarkdownRenderer.tsx @@ -24,7 +24,6 @@ export class MarkdownRenderer { private static _renderInline(text: string): React.ReactNode[] { const nodes: React.ReactNode[] = []; let lastIndex = 0; - // UPDATED Regex: Added .*?<\/u> pattern const inlineRegex = /(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|\[.*?\]\(.*?\)|`+.+?`+|.*?<\/u>)/g; let match; -- cgit v1.2.3