C3 AI Documentation Home

Console Reference: c3CloseTabs

C3 AI Console uses a tabbed interface similar to other integrated development environments (IDEs) such as VS Code. Use the c3CloseTabs function to close one or more open tabs.

Parameters

NameTypeDescription
titlestring | functionA tab name, or a function that takes a tab name and returns true when the name is the tab to be closed

Examples

Close all open tabs:

JavaScript
c3CloseTabs();

Close a specific tab by name:

JavaScript
c3CloseTabs("<tab_name>"); // Replace <tab_name> with the target tab name

Close all tabs containing a text pattern:

JavaScript
c3CloseTabs((tabName) => tabName.startsWith("Untitled-"));

See also

Was this page helpful?