diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json
index 67b63bbe92..10def09438 100644
--- a/apps/desktop/src-tauri/tauri.conf.json
+++ b/apps/desktop/src-tauri/tauri.conf.json
@@ -103,8 +103,9 @@
"hiddenTitle": true,
"titleBarStyle": "Overlay",
"minHeight": 700,
- "minWidth": 1000
+ "minWidth": 1000,
+ "fileDropEnabled": false
}
]
}
-}
\ No newline at end of file
+}
diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx
index 75750a765d..cbd59fd812 100644
--- a/apps/desktop/src/App.tsx
+++ b/apps/desktop/src/App.tsx
@@ -32,6 +32,7 @@ import { polling } from '../../../client/src/utils/requestUtils';
import ReportBugModal from '../../../client/src/components/ReportBugModal';
import { UIContext } from '../../../client/src/context/uiContext';
import { DeviceContextProvider } from '../../../client/src/context/providers/DeviceContextProvider';
+import { EnvContext } from '../../../client/src/context/envContext';
import TextSearch from './TextSearch';
import SplashScreen from './SplashScreen';
@@ -226,12 +227,18 @@ function App() {
isRepoManagementAllowed: true,
forceAnalytics: false,
isSelfServe: false,
- envConfig,
- setEnvConfig,
showNativeMessage: message,
relaunch,
}),
- [homeDirectory, indexFolder, os, release, envConfig],
+ [homeDirectory, indexFolder, os, release],
+ );
+
+ const envContextValue = useMemo(
+ () => ({
+ envConfig,
+ setEnvConfig,
+ }),
+ [envConfig],
);
const bugReportContextValue = useMemo(
@@ -244,26 +251,32 @@ function App() {
);
return (
-
+ {focusedItem?.footerHint} +
+ {focusedItem?.footerBtns?.map((b) =>{t('Indexing...')}
+ ) : undefined + } + /> + ); +}; + +export default memo(DocItem); diff --git a/client/src/CommandBar/steps/items/RepoItem.tsx b/client/src/CommandBar/steps/items/RepoItem.tsx new file mode 100644 index 0000000000..36b21de252 --- /dev/null +++ b/client/src/CommandBar/steps/items/RepoItem.tsx @@ -0,0 +1,360 @@ +import { + Dispatch, + memo, + SetStateAction, + useCallback, + useContext, + useEffect, + useMemo, + useRef, + useState, +} from 'react'; +import { useTranslation } from 'react-i18next'; +import { + CommandBarStepEnum, + RepoProvider, + RepoUi, + SyncStatus, +} from '../../../types/general'; +import { + addRepoToProject, + cancelSync, + deleteRepo, + removeRepoFromProject, + syncRepo, +} from '../../../services/api'; +import { + CloseSignInCircleIcon, + LinkChainIcon, + PlusSignIcon, + RepositoryIcon, + TrashCanIcon, +} from '../../../icons'; +import { DeviceContext } from '../../../context/deviceContext'; +import { getFileManagerName } from '../../../utils'; +import Item from '../../Body/Item'; +import SpinLoaderContainer from '../../../components/Loaders/SpinnerLoader'; +import { ProjectContext } from '../../../context/projectContext'; +import { repoStatusMap } from '../../../consts/general'; + +type Props = { + repo: RepoUi; + i: number; + isFocused: boolean; + setFocusedIndex: Dispatch+ {t('Unlock the value of your existing code, using AI')} +
++
+
{step === 0 ? (
+
+
{children}
; +} + +const reactNodeViews: Record
+
{error}
+
+ ·{' '}
+ {isLoading ? (
+
+
bloop
+
+
+
+
+
+
+
+
+ {type === TabTypesEnum.FILE + ? splitPath(path).pop() + : title || t('New chat')} +
+ + + ); +}; + +export default memo(TabButton); diff --git a/client/src/Project/CurrentTabContent/Header/index.tsx b/client/src/Project/CurrentTabContent/Header/index.tsx new file mode 100644 index 0000000000..c1c648c33e --- /dev/null +++ b/client/src/Project/CurrentTabContent/Header/index.tsx @@ -0,0 +1,81 @@ +import React, { memo, useCallback, useContext, useMemo } from 'react'; +import HeaderRightPart from '../../../components/Header/HeaderRightPart'; +import { TabsContext } from '../../../context/tabsContext'; +import { TabTypesEnum } from '../../../types/general'; +import AddTabButton from './AddTabButton'; +import TabButton from './TabButton'; + +type Props = { + side: 'left' | 'right'; +}; + +const ProjectHeader = ({ side }: Props) => { + const { leftTabs, rightTabs, focusedPanel } = useContext(TabsContext.All); + const { tab } = useContext( + TabsContext[side === 'left' ? 'CurrentLeft' : 'CurrentRight'], + ); + const { setLeftTabs, setRightTabs } = useContext(TabsContext.Handlers); + const tabs = useMemo(() => { + return side === 'left' ? leftTabs : rightTabs; + }, [side, rightTabs, leftTabs]); + + const moveTab = useCallback( + (dragIndex: number, hoverIndex: number) => { + const action = side === 'left' ? setLeftTabs : setRightTabs; + action((prevTabs) => { + const newTabs = JSON.parse(JSON.stringify(prevTabs)); + newTabs.splice(dragIndex, 1); + const newTab = prevTabs[dragIndex]; + newTabs.splice( + hoverIndex, + 0, + newTab.type === TabTypesEnum.FILE && newTab.isTemp + ? { ...newTab, isTemp: false } + : newTab, + ); + return newTabs; + }); + }, + [side], + ); + + return ( +
+
+
+
+
+
+ {splitPath(repoRef).pop()}
+ {isExpanded && (
+ <>
+ /
+
+ {branch?.replace(/^origin\//, '')}{' '}
+
+ {(lineToRender || tokensMap[0]).tokens.map((token, index) => (
+
+ {project?.name || 'Default project'} +
+
+
+
+
+
+ Permanently delete{' '} + {project?.name} and + remove all the data associated to it. Repositories will remain + accessible in your GitHub account. +
+ +