Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Add VSCode extension configuration to disable CLI colors#1942

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-7353a414-2225-4591-b7bb-2f377689e221
Closed

Add VSCode extension configuration to disable CLI colors#1942
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-7353a414-2225-4591-b7bb-2f377689e221

Conversation

Copilot AI commented Sep 26, 2025

Copy link
Copy Markdown

This PR adds a new configuration option genaiscript.cli.noColors to the VSCode extension that allows users to disable color output in the CLI. This addresses scenarios where users prefer plain text output or work in environments where ANSI color codes may not render correctly.

Changes

New Configuration Option

Added genaiscript.cli.noColors (boolean, default: false) to the VSCode extension settings:

  • Type: Boolean
  • Default: false (colors enabled by default)
  • Description: "Disable color output in the CLI. Default is false (colors enabled)."

Implementation Details

  • Added constant: VSCODE_CONFIG_CLI_NO_COLORS = "cli.noColors" in packages/core/src/constants.ts
  • Updated resolveCli(): Modified the function in packages/vscode/src/config.ts to read and return the new configuration option
  • Updated CLI execution points: All places where CLI commands are constructed now pass the --no-colors flag when the configuration is enabled:
    • fragmentcommands.ts: Script debugging execution
    • taskprovider.ts: Task-based script execution
    • servermanager.ts: Server startup commands

CLI Integration

The existing CLI already supports the --no-colors option and properly handles it by calling setConsoleColors(false) when the flag is present.

Usage

Users can enable this setting by:

  1. Opening VSCode Settings (Ctrl+Shift+P → "Preferences: Open Settings (UI)")
  2. Searching for "genaiscript.cli.noColors"
  3. Enabling the checkbox to disable colors in CLI output

Once enabled, the --no-colors flag will be automatically passed to all CLI invocations, ensuring consistent plain text output across all GenAIScript operations within VSCode.

The implementation maintains backward compatibility and follows the existing patterns in the codebase for configuration management.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.sheetjs.com
    • Triggering command: node /usr/local/bin/yarn install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add a configuration option in the vscode extension to turn off colors in the CLI.

  • Default is false.
  • add "--no-colors" to the cli argument

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 26, 2025 16:35
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a configuration option in the vscode extension to turn off colors in the CLI. - Default is false. - add "--no-colors" to the cli argument Add VSCode extension configuration to disable CLI colors Sep 26, 2025
Copilot AI requested a review from pelikhan September 26, 2025 16:41
@pelikhan pelikhan marked this pull request as ready for review September 26, 2025 21:03
@pelikhan pelikhan closed this Sep 27, 2025
@pelikhan pelikhan deleted the copilot/fix-7353a414-2225-4591-b7bb-2f377689e221 branch September 27, 2025 03:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants