PPocket Editor DOCUMENTATION
Terminal / POCKET EDITOR

Project Terminal

Run commands from a chosen directory using the operating system’s shell. This is an output-only runner: interactive shells, password prompts, full-screen terminal programs, and input forwarding are unsupported. Use Run, Stop, Save Project Command, and Settings. The default directory comes from the project, then the active file, then the current working directory.

Project Terminal colors and portable defaults

Choose Project Terminal → Settings… inside the terminal, or search Project Terminal Settings… in the command palette. Editor Dark, Light, and High Contrast presets provide a starting point. Customize background, normal text, command headers, status messages, error exit messages, and all 16 ANSI base/bright colors. Font family/size, output encoding, ANSI rendering, and optional force-color behavior are user settings. Save & apply persists them under _appearance in project_terminal_settings.json, preserving saved per-project commands.

Portable defaults use UTF-8 decoding, the operating system's monospace font, ANSI rendering enabled, and force-color disabled. The existing system-shell selection stays native to the OS; no Bash-only commands are introduced. If a chosen font is unavailable on another computer, the system monospace font is used. For Windows tools that emit a legacy encoding, choose locale, cp1252, cp850, or cp437 as appropriate. Python child processes receive the selected output encoding. Encoding and force-color changes apply to the next process; appearance changes recolor retained output immediately.

The renderer handles standard/bright ANSI colors, indexed 256-color and RGB colors, bold, underline, reverse, resets, and sequences split across read chunks. Other terminal controls, including title/clipboard/hyperlink escape commands, are discarded rather than executed; carriage-return progress updates become separate lines. This remains an output-only runner, not a full interactive terminal emulator. Standard error remains merged with standard output; category coloring uses recognizable text patterns rather than claiming to identify the originating stream. Nonzero exit markers use the configured error color.

Programs may suppress colors when output is piped. Enable Request colored output from programs (force color) to set FORCE_COLOR, CLICOLOR_FORCE, and TERM for the child; it also overrides NO_COLOR for that process. Some tools still require their own --color=always option. Disabling ANSI interpretation removes ANSI styling from retained text as well as future output. Output remains bounded to 200,000 characters and 8,192 characters per long line, with at most 512 distinct ANSI styles. No OS-specific ANSI rendering library is required.

Plugin communication exposes project_terminal.get_settings and emits terminal_settings_changed after saving. ANSI interpretation follows the xterm control-sequence reference. Parser tests are platform-independent; GUI/process tests were run on Linux. Windows/macOS runtime testing remains outstanding.

sh
python3 -B -m unittest -v test_terminal_colors test_editor.EditorTests.test_terminal_output_fallback_stop_and_shutdown

The main AI Chat / AI Code window now keeps the current reply intact instead of deleting its first 300 lines once the transcript exceeds 1,800 lines. Older transcript content is trimmed toward 200,000 characters without cutting the latest assistant/team reply; one large current reply can exceed that target. Code-fence formatting also survives consecutive assistant output chunks. Reply tokens → Auto keeps the existing conservative defaults; explicitly choose up to 8,192 for a larger requested reply cap. Provider limits/timeouts can still stop generation, and larger caps can increase usage. No extra provider request or larger default budget is introduced.

Terminal presets now include GNOME Tango (inspired by the GNOME Tango color palette) and Modern Graphite, a softer dark scheme with restrained blue, green, amber, and magenta ANSI colors. Modern Graphite is the default for new settings; saved custom colors are preserved. The settings dialog previews command/error text and all 16 palette colors before Save & apply. Each preset applies its complete ANSI palette, not just its background. Restore defaults selects Modern Graphite.

Terminal output categories

Terminal Settings → Categories lets you choose separate colors for user commands/messages, system/info messages, warnings, errors, and successful completion. Automatic category coloring is enabled by default and can be disabled independently of ANSI rendering. Plain, unrecognized program output uses the normal foreground color. Settings apply to retained output as well as new lines.

Examples of recognized prefixes are USER:, INPUT:, SYSTEM:, INFO:, DEBUG:, WARNING:, ERROR:, and SUCCESS: (also bracketed equivalents). Common compiler file:line: error: / warning: messages and build/test success lines are recognized. Matching is heuristic, not an assertion about process privileges or stdout/stderr origin. Partial lines are reevaluated as chunks arrive. The runner's own directory/status messages, command echoes, and exit markers have explicit categories.

Program-supplied ANSI colors take precedence over inferred category colors, matching the palette-driven model described in GNOME Terminal's color documentation. GNOME palettes alone do not provide this plugin's automatic log-category classification. You can use both features, disable automatic classification to see only application colors, or disable ANSI rendering to use only category colors.

Created by Somi Douth · Built with Python and Tkinter