Product

VS Code extension

Version 2.7.0. PromptFlowEngine for VS Code is built around one workflow: Codebase → Prompt → AI → Codebase. It runs the engine in-process: no server, no Python, no model calls of its own.

Available on the Visual Studio Marketplace as promptflow-ai.ide-extension. This page describes the version in the repository; the Marketplace can carry the previous release until the next one is published.

The workflow

Codebase → Prompt → AI → Codebase
CODEBASE   pick a scope: workspace, current file, chosen files, or none
   ↓       only files relevant to the task are read
PROMPT     describe the change in your own words
   ↓       the engine structures it and grounds it in the code
AI         send to VS Code Chat, copy, or save
   ↓       secrets and personal data are checked first
CODEBASE   review the changes in Source Control,
           or build a review prompt from the modified files

Open the PromptFlowEngine icon in the Activity Bar. The panel walks through the four steps in order.

1. Codebase

Choose Entire workspace, Current file, Choose files or folder, or No code. Files are filtered (no node_modules, build output, or binaries), scored for relevance to your task, and capped, so the prompt carries the handful of files that matter instead of the repository.

2. Prompt

Type the task the way you would say it. Generate prompt produces a sectioned engineering prompt: role, objective, project context, the relevant code, requirements, constraints, edge cases, testing, acceptance criteria, and expected output. Sections appear only when the task needs them: an “explain this” request gets no test plan. The panel shows how many lines came from your task, from the codebase, and from added guidance, and the prompt stays editable. This is the same restructuring the MCP tool and HTTP API expose.

3. AI

Send to AI Chat opens the prompt in VS Code Chat (or copies it where that is unavailable). Before anything leaves, the privacy guard scans for credentials and personal data. Modes: strict (block), redact (default, replace with placeholders), warn (ask). Reduce tokens removes filler and repetition with verified, meaning-preserving edits.

4. Codebase

When the AI has edited your files, Review changes opens Source Control so you can keep or discard each one. Build review prompt reads the files with uncommitted changes and generates a review prompt that checks them against your original task. It needs the built-in Git extension and reads only; it never stages, commits, or reverts.

Commands

  • PromptFlowEngine: Codebase → Prompt
  • PromptFlowEngine: Codebase → Prompt from Selection
  • PromptFlowEngine: Open PromptOps Workspace
  • PromptFlowEngine: Optimize Prompt
  • PromptFlowEngine: Restructure Prompt
  • PromptFlowEngine: Analyze Prompt
  • PromptFlowEngine: Compare Original vs Restructured
  • PromptFlowEngine: Send Prompt to AI Chat
  • PromptFlowEngine: Prompt → Codebase (Review Changes)
  • PromptFlowEngine: Insert Prompt Template
  • PromptFlowEngine: Select Model for Tokens and Cost
  • PromptFlowEngine: Connect to Organization
  • PromptFlowEngine: Organization Status
  • PromptFlowEngine: Install Agent Hooks (Claude Code, Cursor, Windsurf, Copilot, Gemini CLI)
  • PromptFlowEngine: Remove Agent Hooks
  • PromptFlowEngine: Turn On Activity History
  • PromptFlowEngine: Pause or Resume Activity History
  • PromptFlowEngine: Turn Off Activity History
  • PromptFlowEngine: Show Activity History
  • PromptFlowEngine: Turn Prompt Text in History On or Off
  • PromptFlowEngine: Set Activity History Retention
  • PromptFlowEngine: Export Activity History
  • PromptFlowEngine: Delete Activity History
  • PromptFlowEngine: Sign In
  • PromptFlowEngine: Sign Out
  • PromptFlowEngine: Account and Activity Status
  • PromptFlowEngine: Show Protection Dashboard
  • PromptFlowEngine: Scan Selection for Sensitive Data
  • PromptFlowEngine: Redact Sensitive Data in Selection
  • PromptFlowEngine: Protection Status
  • PromptFlowEngine: Reset Protection Metrics

Restructure Prompt works on the selection or the whole document, opens a diff of original against restructured, and offers to replace the text, send it to chat, or copy it. Analyze Prompt lists the quality score, token count, estimated input cost, and each issue with its reason and fix in the PromptFlowEngine output channel. Insert Prompt Template inserts one of the templates or library prompts at the cursor. Select Model for Tokens and Cost chooses any model in the model catalog. The status bar shows the last prompt's tokens and quality score.

Restructure, Analyze, Insert Prompt Template, and Send are also in the editor context menu under PromptFlowEngine, and every command has a keyboard chord under Ctrl+Alt+P (Cmd+Alt+P on macOS):

  • Ctrl+Alt+P O: Optimize Prompt
  • Ctrl+Alt+P W: Open PromptOps Workspace
  • Ctrl+Alt+P R: Restructure Prompt
  • Ctrl+Alt+P A: Analyze Prompt
  • Ctrl+Alt+P T: Insert Prompt Template
  • Ctrl+Alt+P S: Send Prompt to AI Chat
  • Ctrl+Alt+P M: Select Model for Tokens and Cost
  • Ctrl+Alt+P P: Codebase → Prompt

Install

In VS Code, open the Extensions view and search for PromptFlowEngine, or run:

shell
code --install-extension promptflow-ai.ide-extension

To build this exact version from source instead:

shell
# from the root of your PromptFlowEngine checkout
corepack enable && pnpm install
pnpm --filter ide-extension build
cd apps/vscode-extension && pnpm exec vsce package --no-dependencies
code --install-extension ide-extension-2.7.0.vsix

Copilot agent mode

On activation the extension registers its bundled MCP server in .vscode/mcp.json (requires node on PATH), so agents can call the same tools directly. See MCP client.

Settings

SettingDefaultPurpose
promptflow.mcpServerCommand"node"Advanced: overrides the command used to launch the external MCP server registered for GitHub Copilot Agent mode (.vscode/mcp.json). The panel and PromptFlowEngine commands don't use this; they run in-process. Leave unset to use the bundled server.
promptflow.mcpServerArgs[]Advanced: arguments for promptflow.mcpServerCommand. Leave unset to use the bundled server.
promptflow.model""Model used for token counts and cost estimates, as a model id from the catalog (for example gpt-4.1 or claude-sonnet-5-5). Leave empty to use promptflow.defaultProvider.
promptflow.defaultProvider"gpt"Model family used for token counts when promptflow.model is empty. Kept for existing configurations.
promptflow.codebaseMaxFiles2000Maximum number of files scanned per Codebase → Prompt run, before relevance filtering.
promptflow.codebaseMaxRelevantFiles12Maximum number of files included as relevant context in a generated prompt.
promptflow.privacy.enabledtrueScan prompts for sensitive data (credentials, PII, cloud secrets) before they're sent to AI Chat or copied for that purpose.
promptflow.privacy.mode"redact"How PromptFlowEngine reacts when sensitive data is detected in an outbound prompt. When this editor is connected to an organization, its policy applies instead.
promptflow.privacy.exclusions[]Exact substrings that should never be treated as sensitive (e.g. a shared team email alias).
promptflow.privacy.customPatterns[]Additional organization-specific sensitive-data patterns, detected alongside the built-in ones.
promptflow.exposure.enabledtrueWarn when an open file contains credentials that an AI assistant could attach as context. Detection is on this device; values are never shown or sent.
promptflow.enterprise.enrollmentKey""Set by IT: an enrollment key from the PromptFlowEngine admin console (pfe_…). Connects this editor to the organization on start.
promptflow.enterprise.server""Set by IT: the PromptFlowEngine server origin. Defaults to https://promptflowengine.com.
promptflow.enterprise.userEmail""Set by IT (optional): the user’s work email, so their devices count as one seat. Only a keyed hash is stored.
promptflow.account.server"https://promptflowengine.com"
promptflow.diagnostics.errorReportsfalse
promptflow.dashboard.metricstrueKeep daily counts (prompts scanned, categories found, warned/redacted/blocked/handed off) for the Protection Dashboard. Counts only, on this machine, for 90 days; no prompt text or values. Turn off to stop counting; "Reset Protection Metrics" deletes what was kept.

Setting keys keep the promptflow. prefix from earlier versions, so existing configuration carries over.

Changes in 2.2

  • The full model catalog replaces the four model families, with each model's list price, the date it was verified, and whether its token count is exact.
  • New commands: Insert Prompt Template and Select Model for Tokens and Cost. New setting: promptflow.model.
  • Analyze Prompt now reports quality, tokens, cost, and the fix for each issue.
  • An editor context menu and keyboard chords.
  • Fixed: a model without a reference price is no longer given another model's cost; the Copilot entry in .vscode/mcp.json is repaired after an upgrade; a commented mcp.json is never overwritten.

Changes in 2.1

  • Renamed to PromptFlowEngine throughout: display name, Activity Bar, commands, messages, and output channel.
  • The separate Optimize view and the Optimize Prompt command are gone. Token reduction is now one action inside the workflow panel.
  • New: Restructure Prompt, the “No code” scope, the review step, and an editable generated prompt.
  • Generated prompts come from the shared engine, with sections chosen by task instead of a fixed template.
  • The panel now runs under a strict Content Security Policy.