Skip to content

Commit

Permalink
feat(ui): add help message in codeSearch (#2733)
Browse files Browse the repository at this point in the history
* feat(ui): add help message in codeSearch

* [autofix.ci] apply automated fixes

* Update ee/tabby-ui/app/files/components/code-search-bar.tsx

Co-authored-by: Meng Zhang <[email protected]>

* Update ee/tabby-ui/app/files/components/code-search-bar.tsx

Co-authored-by: Meng Zhang <[email protected]>

* Update ee/tabby-ui/app/files/components/code-search-bar.tsx

Co-authored-by: Meng Zhang <[email protected]>

* [autofix.ci] apply automated fixes

* update

* update

* update: shortcut /

* [autofix.ci] apply automated fixes

* update: add filepath highlight

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Meng Zhang <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 2e45d4e commit 2886303
Show file tree
Hide file tree
Showing 7 changed files with 426 additions and 230 deletions.
5 changes: 1 addition & 4 deletions ee/tabby-ui/app/(dashboard)/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { usePathname } from 'next/navigation'
import logoDarkUrl from '@/assets/logo-dark.png'
import logoUrl from '@/assets/logo.png'
import { cva } from 'class-variance-authority'
import { escapeRegExp } from 'lodash-es'

import { useMe } from '@/lib/hooks/use-me'
import { cn } from '@/lib/utils'
Expand Down Expand Up @@ -168,10 +169,6 @@ function shouldPathnameHighlight(
return regex.test(currentPathname)
}

function escapeRegExp(string: String) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
}

interface SidebarCollapsibleProps {
title: React.ReactNode
children: React.ReactNode
Expand Down
Loading

0 comments on commit 2886303

Please sign in to comment.