Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Feb 7, 2025
1 parent b3b6343 commit 04f964b
Show file tree
Hide file tree
Showing 7 changed files with 332 additions and 229 deletions.
7 changes: 4 additions & 3 deletions ee/tabby-ui/app/page/components/nav-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { useEffect, useRef, useState } from 'react'

import { ListPageSectionsQuery } from '@/lib/gql/generates/graphql'
import { useDebounceCallback } from '@/lib/hooks/use-debounce'

import { SectionItem } from '../types'

interface Props {
sections: ListPageSectionsQuery['pageSections']['edges'] | undefined
sections: SectionItem[] | undefined
}

export const Navbar = ({ sections }: Props) => {
Expand Down Expand Up @@ -42,7 +43,7 @@ export const Navbar = ({ sections }: Props) => {
return (
<nav className="sticky right-0 top-0 p-4">
<ul className="flex flex-col space-y-1">
{sections?.map(({ node: section }) => (
{sections?.map(section => (
<li key={section.id}>
<div
className={`truncate whitespace-nowrap text-sm ${
Expand Down
3 changes: 3 additions & 0 deletions ee/tabby-ui/app/page/components/page-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ type PageContextValue = {
onUpdateSectionContent: (
message: string
) => Promise<ExtendedCombinedError | undefined>
pendingSectionIds: Set<string>
setPendingSectionIds: (value: SetStateAction<Set<string>>) => void
currentSectionId: string | undefined
}

export const PageContext = createContext<PageContextValue>(
Expand Down
Loading

0 comments on commit 04f964b

Please sign in to comment.