TerminalOne icon indicating copy to clipboard operation
TerminalOne copied to clipboard

Add support for renaming a tab

Open atinylittleshell opened this issue 6 months ago • 0 comments

Add support for renaming tabs in the terminal application.

  • State Management:

    • Add a new state variable tabTitles in packages/terminal/app/page.tsx to store tab names.
    • Modify the createTab function to initialize the tab name.
    • Modify the closeTab function to remove the tab name.
    • Pass the tabName prop to the Tab component.
  • Tab Component:

    • Accept a tabName prop in packages/terminal/components/Tab/index.tsx.
    • Display the tabName in the tab.
    • Add an input field to allow users to rename the tab.
    • Handle the input change event to update the tab name.
  • TitleBar Component:

    • Update the title bar in packages/terminal/components/TitleBar/index.tsx to reflect the renamed tab.
    • Use the tabName prop to display the tab name in the title bar.
  • TabContext:

    • Add a function to handle tab renaming in packages/terminal/hooks/TabContext.tsx.
    • Update the context to include the tab renaming function.

For more details, open the Copilot Workspace session.

atinylittleshell avatar Aug 08 '24 22:08 atinylittleshell