Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nicarq committed Jan 4, 2025
1 parent 8f2e247 commit 017dcf0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions apps/shinkai-desktop/src/components/agent/agent-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ function AgentForm({ mode }: AgentFormProps) {
const selectedFileKeysRef = useSetJobScope((state) => state.selectedFileKeysRef);
const selectedFolderKeysRef = useSetJobScope((state) => state.selectedFolderKeysRef);
const onSelectedKeysChange = useSetJobScope((state) => state.onSelectedKeysChange);
const setFileKey = useSetJobScope((state) => state.setFileKey);
const setFolderKey = useSetJobScope((state) => state.setFolderKey);

const { data: agent } = useGetAgent({
agentId: agentId ?? '',
Expand Down Expand Up @@ -194,7 +192,6 @@ function AgentForm({ mode }: AgentFormProps) {
if (agent.scope?.vector_fs_items?.length || agent.scope?.vector_fs_folders?.length) {
const selectedVRFilesPathMap = agent.scope.vector_fs_items.reduce<Record<string, { checked: boolean }>>(
(acc: Record<string, { checked: boolean }>, filePath: string) => {
setFileKey(filePath, filePath);
acc[filePath] = {
checked: true,
};
Expand All @@ -205,7 +202,6 @@ function AgentForm({ mode }: AgentFormProps) {

const selectedVRFoldersPathMap = agent.scope.vector_fs_folders.reduce<Record<string, { checked: boolean }>>(
(acc: Record<string, { checked: boolean }>, folderPath: string) => {
setFolderKey(folderPath, folderPath);
acc[folderPath] = {
checked: true,
};
Expand All @@ -226,7 +222,7 @@ function AgentForm({ mode }: AgentFormProps) {
});
}
}
}, [agent, form, mode, onSelectedKeysChange, setFileKey, setFolderKey]);
}, [agent, form, mode, onSelectedKeysChange]);

// Effect to handle drawer open/close
useEffect(() => {
Expand Down
4 changes: 0 additions & 4 deletions apps/shinkai-desktop/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { PlusIcon } from '@radix-ui/react-icons';
import { useTranslation } from '@shinkai_network/shinkai-i18n';
import { JobConfig } from '@shinkai_network/shinkai-message-ts/api/jobs/types';
import { DEFAULT_CHAT_CONFIG } from '@shinkai_network/shinkai-node-state/v2/constants';
import { useGetLLMProviders } from '@shinkai_network/shinkai-node-state/v2/queries/getLLMProviders/useGetLLMProviders';
import { TooltipProvider } from '@shinkai_network/shinkai-ui';
import { listen } from '@tauri-apps/api/event';
Expand Down

0 comments on commit 017dcf0

Please sign in to comment.