feat: ability to open terminal at the root of a workspace (#6467)

* enhancement: ability to open terminal at the root of a workspace

* fix: imports

---------

Co-authored-by: Sid <siddharth@usebruno.com>
This commit is contained in:
Chirag Chandrashekhar
2025-12-19 15:21:28 +05:30
committed by GitHub
parent 6a177e17d3
commit 7d783d473f

View File

@@ -10,7 +10,9 @@ import {
IconSearch,
IconSortAscendingLetters,
IconSortDescendingLetters,
IconSquareX
IconSquareX,
IconBox,
IconTerminal2
} from '@tabler/icons';
import { importCollection, openCollection } from 'providers/ReduxStore/slices/collections/actions';
@@ -25,7 +27,7 @@ import RemoveCollectionsModal from 'components/Sidebar/Collections/RemoveCollect
import CreateCollection from 'components/Sidebar/CreateCollection';
import Collections from 'components/Sidebar/Collections';
import SidebarSection from 'components/Sidebar/SidebarSection';
import { IconBox } from '@tabler/icons';
import { openDevtoolsAndSwitchToTerminal } from 'utils/terminal';
const CollectionsSection = () => {
const [showSearch, setShowSearch] = useState(false);
@@ -176,6 +178,14 @@ const CollectionsSection = () => {
onClick: () => {
selectAllCollectionsToClose();
}
},
{
id: 'open-in-terminal',
leftSection: IconTerminal2,
label: 'Open in Terminal',
onClick: () => {
openDevtoolsAndSwitchToTerminal(dispatch, activeWorkspace?.pathname);
}
}
];