Skip to content

Commit

Permalink
fix file explorer depth
Browse files Browse the repository at this point in the history
  • Loading branch information
paulclindo committed Jan 9, 2025
1 parent abf9085 commit cd87e8b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const SetJobScopeDrawer = () => {
nodeAddress: auth?.node_address ?? '',
token: auth?.api_v2_key ?? '',
path: '/',
depth: 6,
});

const { mutateAsync: updateJobScope, isPending: isUpdatingJobScope } =
Expand Down
7 changes: 5 additions & 2 deletions apps/shinkai-desktop/src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ html {
-ms-overflow-style: none;
}

.p-node-disabled{
.p-node-disabled {
pointer-events: none;
& .p-checkbox-box{
& .p-checkbox-box {
@apply !bg-gray-100;
}
& .p-icon.p-checkbox-icon {
@apply !pointer-events-none ;
}
}
1 change: 1 addition & 0 deletions libs/shinkai-message-ts/src/api/vector-fs/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type GetListDirectoryContentsRequest = {
path: string;
depth?: number;
};

export type DirectoryContent = {
Expand Down
1 change: 0 additions & 1 deletion libs/shinkai-node-state/src/lib/utils/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function transformDataToTreeNodes(
selectedPaths,
)
: undefined,
expanded: true,
className: selectedPaths?.includes(item.path) ? 'p-node-disabled' : '',
};
result.push(itemNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ export const getListDirectoryContents = async ({
nodeAddress,
path,
token,
depth,
}: GetVRPathSimplifiedInput) => {
const response = await getListDirectoryContentsApi(nodeAddress, token, {
path: path,
depth,
});

return response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FunctionKeyV2 } from '../../constants';
export type GetVRPathSimplifiedInput = Token & {
nodeAddress: string;
path: string;
depth?: number;
};

export type UseGetDirectoryContents = [
Expand Down

0 comments on commit cd87e8b

Please sign in to comment.