---
slug: "secondary-terminal"
title: "Secondary Terminal"
description: "A full-featured terminal extension for the VSCode sidebar. With genuine PTY emulation via Python, interactive applications like vim and less work correctly."
url: "https://www.ytyng.com/en/bio/secondary-terminal"
achieved_at: "2025-06-28"
updated: "2026-02-15T05:20:35.175Z"
category: "アプリケーション"
image_url: "https://media.ytyng.com/20260130/3347cbef215340b5a9ed6a0a0dd7e33a.png"
lang: "en"
---

# Secondary Terminal

# Secondary Terminal

A full-featured terminal extension that runs in the VSCode sidebar.

## Features

- **Sidebar Terminal**: Terminal integrated into the VSCode sidebar
- **Full PTY Emulation**: Genuine pseudo-terminal implementation using Python's pty module
- **Interactive App Support**: vim, less, nano, and other interactive applications work correctly
- **Dynamic Resizing**: Automatically adjusts terminal size to match sidebar dimensions
- **UTF-8 Support**: Correctly displays multibyte characters including Japanese
- **Multi-Tab**: Independent shell process and ACE editor per tab
- **ACE Editor Integration**: Built-in command editor per tab; send to terminal with `Cmd+Enter`
- **Clipboard Image Paste**: Insert clipboard images as file path references (macOS)
- **Drop Zone**: Drag & drop files from explorer to insert path references

## Technical Background

Since node-pty native modules cannot be properly built in VSCode's Electron environment, a custom PTY emulation using Python's pty module was implemented.

The frontend uses xterm.js, and Node.js child_process handles communication between VSCode and Python.

## Tech Stack

- **Frontend**: xterm.js + ACE Editor
- **Backend**: Python pty module
- **Communication**: Node.js child_process
- **Language**: TypeScript

## Repository

[GitHub Repository](https://github.com/ytyng/secondary-terminal)
