@@ -16,14 +16,18 @@ declare module 'react' {
16
16
}
17
17
18
18
/**
19
- * FileTreeView component displays a hierarchical tree view of files and directories.
19
+ * ` FileTreeView` component renders a hierarchical tree view of files and directories.
20
20
*
21
- * @description This component renders a `RichTreeView` with items fetched from the workspace endpoint. It displays a loading
22
- * indicator while the data is being fetched and presents the tree view when the data is loaded. The tree view uses `FileTreeItem`
23
- * to represent each item . The component handles asynchronous data fetching and provides visual feedback using `LinearProgress` .
21
+ * @description This component utilizes `RichTreeView` from Material-UI to display a hierarchical view of files and directories
22
+ * fetched from the workspace endpoint. It handles loading states with `LinearProgress` and displays a context menu for file
23
+ * operations . The context menu is controlled by state and provides options such as creating new files or folders .
24
24
*
25
- * The `RichTreeView` component from Material-UI's TreeView package is utilized to render the hierarchical structure, with
26
- * a custom `item` slot for rendering each tree node via the `FileTreeItem` component.
25
+ * The component:
26
+ * - Fetches file tree data asynchronously from the workspace API endpoint.
27
+ * - Displays a loading indicator while data is being fetched.
28
+ * - Renders the file tree using `FileTreeItem` for each item.
29
+ * - Manages the state and position of a context menu that appears on right-click or button click.
30
+ * - Listens for updates via WebSocket to refresh the file tree data.
27
31
*
28
32
* @component
29
33
*
@@ -33,7 +37,7 @@ declare module 'react' {
33
37
* <FileTreeView />
34
38
* );
35
39
*
36
- * @returns {JSX.Element } The rendered tree view component, displaying either a loading indicator or the file tree.
40
+ * @returns {JSX.Element } The rendered tree view component, showing either a loading indicator or the file tree.
37
41
*/
38
42
export const FileTreeView : React . FC = ( ) => {
39
43
const { connected } = useSessionContext ( ) ;
0 commit comments