MCPcopy
hub / github.com/wavetermdev/waveterm / handleCloseTab

Function handleCloseTab

frontend/app/tab/tabbar.tsx:542–555  ·  view source on GitHub ↗
(event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, tabId: string)

Source from the content-addressed store, hash-verified

540 };
541
542 const handleCloseTab = (event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, tabId: string) => {
543 event?.stopPropagation();
544 env.electron
545 .closeTab(workspace.oid, tabId, confirmClose)
546 .then((didClose) => {
547 if (didClose) {
548 tabsWrapperRef.current?.style.setProperty("--tabs-wrapper-transition", "width 0.3s ease");
549 deleteLayoutModelForTab(tabId);
550 }
551 })
552 .catch((e) => {
553 console.log("error closing tab", e);
554 });
555 };
556
557 const handleTabLoaded = useCallback((tabId: string) => {
558 setTabsLoaded((prev) => {

Callers 1

tabbar.tsxFile · 0.85

Calls 1

deleteLayoutModelForTabFunction · 0.85

Tested by

no test coverage detected