Skip to content

Commit f04ec0c

Browse files
committed
Remove snippet background fills
1 parent 6887250 commit f04ec0c

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

components/FolderOverview.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,15 @@ const FolderOverview: React.FC<FolderOverviewProps> = ({
360360
{highlightMatches(formattedTitle, folderSearchTerm)}
361361
</p>
362362
{result.searchSnippet && (
363-
<p className="mt-0.5 text-[11px] leading-snug text-text-secondary">
363+
<p
364+
className="mt-0.5 -ml-2 text-[11px] leading-snug text-text-secondary"
365+
style={{
366+
paddingLeft: '0.75rem',
367+
borderLeftWidth: '3px',
368+
borderLeftStyle: 'solid',
369+
borderLeftColor: 'rgb(var(--color-accent) / 0.45)',
370+
}}
371+
>
364372
{highlightMatches(result.searchSnippet, folderSearchTerm)}
365373
</p>
366374
)}

components/PromptTreeItem.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ const DocumentTreeItem: React.FC<DocumentTreeItemProps> = (props) => {
352352
const basePaddingLeft = 4; // matches Tailwind px-1 for consistent baseline spacing
353353
const rowPaddingLeft = basePaddingLeft + Math.max(level, 0) * safeIndent;
354354
const snippetPaddingLeft = rowPaddingLeft + 28;
355+
const snippetAccentPadding = 8;
356+
const snippetAccentWidth = 3;
357+
const snippetMarginLeft = Math.max(snippetPaddingLeft - snippetAccentPadding, 0);
358+
const snippetAccentColor = 'rgb(var(--color-accent) / 0.45)';
355359

356360
return (
357361
<li
@@ -513,7 +517,13 @@ const DocumentTreeItem: React.FC<DocumentTreeItemProps> = (props) => {
513517
{!isFolder && searchTerm.trim() && node.searchSnippet && (
514518
<div
515519
className="text-[11px] text-text-secondary leading-snug whitespace-pre-wrap break-words pr-3"
516-
style={{ paddingLeft: `${snippetPaddingLeft}px` }}
520+
style={{
521+
marginLeft: `${snippetMarginLeft}px`,
522+
paddingLeft: `${snippetAccentPadding}px`,
523+
borderLeftWidth: `${snippetAccentWidth}px`,
524+
borderLeftStyle: 'solid',
525+
borderLeftColor: snippetAccentColor,
526+
}}
517527
>
518528
{highlightMatches(node.searchSnippet, searchTerm)}
519529
</div>

0 commit comments

Comments
 (0)