Skip to content

Commit

Permalink
fix: lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes committed Dec 23, 2024
1 parent 4658a54 commit 797768a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ee/tabby-ui/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ChatPage() {
const [activeChatId, setActiveChatId] = useState('')
const [pendingCommand, setPendingCommand] = useState<ChatCommand>()
const [pendingRelevantContexts, setPendingRelevantContexts] = useState<
ClientFileContext[]
ClientFileContext[]
>([])
const [pendingActiveSelection, setPendingActiveSelection] =
useState<ClientFileContext | null>(null)
Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-ui/app/files/components/chat-side-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const ChatSideBar: React.FC<ChatSideBarProps> = ({
},
openExternal: async (url: string) => {
window.open(url, '_blank')
},
}
})

const getCommand = ({ action }: QuickActionEventPayload) => {
Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-ui/components/chat/chat-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import type { UseChatHelpers } from 'ai/react'
import { AnimatePresence, motion } from 'framer-motion'
import { compact } from 'lodash-es'
import { toast } from 'sonner'
import type { Context } from '@/lib/types'

import { SLUG_TITLE_MAX_LENGTH } from '@/lib/constants'
import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard'
import { updateEnableActiveSelection } from '@/lib/stores/chat-actions'
import { useChatStore } from '@/lib/stores/chat-store'
import { useMutation } from '@/lib/tabby/gql'
import { setThreadPersistedMutation } from '@/lib/tabby/query'
import type { Context } from '@/lib/types'
import { cn, getTitleFromMessages } from '@/lib/utils'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
Expand Down
16 changes: 10 additions & 6 deletions ee/tabby-ui/components/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
FileLocation,
GitRepository,
LookupSymbolHint,
SymbolInfo,
SymbolInfo
} from 'tabby-chat-panel'
import { useQuery } from 'urql'

Expand All @@ -27,20 +27,20 @@ import { filename2prism } from '@/lib/language-utils'
import { useChatStore } from '@/lib/stores/chat-store'
import { ExtendedCombinedError } from '@/lib/types'
import {
AssistantMessage,
Context,
FileContext,
AssistantMessage,
MessageActionType,
QuestionAnswerPair,
UserMessage,
UserMessageWithOptionalId
} from '@/lib/types/chat'
import {
cn,
findClosestGitRepository,
getPromptForChatCommand,
convertClientFileContext,
findClosestGitRepository,
getFileLocationFromContext,
getPromptForChatCommand,
nanoid
} from '@/lib/utils'

Expand Down Expand Up @@ -530,8 +530,12 @@ function ChatRenderer(
300
)

const updateActiveSelection = (clientFileContext: ClientFileContext | null) => {
const context = clientFileContext ? convertClientFileContext(clientFileContext) : null
const updateActiveSelection = (
clientFileContext: ClientFileContext | null
) => {
const context = clientFileContext
? convertClientFileContext(clientFileContext)
: null
debouncedUpdateActiveSelection.run(context)
}

Expand Down
8 changes: 4 additions & 4 deletions ee/tabby-ui/components/chat/question-answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import { MARKDOWN_CITATION_REGEX } from '@/lib/constants/regex'
import { useMe } from '@/lib/hooks/use-me'
import { filename2prism } from '@/lib/language-utils'
import {
Context,
AssistantMessage,
AttachmentCodeItem,
Context,
QuestionAnswerPair,
UserMessage
} from '@/lib/types/chat'
import {
buildCodeBrowserUrlForContext,
cn,
getRangeFromAttachmentCode,
getRangeTextFromAttachmentCode,
getFileLocationFromContext,
buildCodeBrowserUrlForContext,
getRangeFromAttachmentCode,
getRangeTextFromAttachmentCode
} from '@/lib/utils'

import { CopyButton } from '../copy-button'
Expand Down

0 comments on commit 797768a

Please sign in to comment.