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.
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 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 filesOpen 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 → PromptPromptFlowEngine: Codebase → Prompt from SelectionPromptFlowEngine: Open PromptOps WorkspacePromptFlowEngine: Optimize PromptPromptFlowEngine: Restructure PromptPromptFlowEngine: Analyze PromptPromptFlowEngine: Compare Original vs RestructuredPromptFlowEngine: Send Prompt to AI ChatPromptFlowEngine: Prompt → Codebase (Review Changes)PromptFlowEngine: Insert Prompt TemplatePromptFlowEngine: Select Model for Tokens and CostPromptFlowEngine: Connect to OrganizationPromptFlowEngine: Organization StatusPromptFlowEngine: Install Agent Hooks (Claude Code, Cursor, Windsurf, Copilot, Gemini CLI)PromptFlowEngine: Remove Agent HooksPromptFlowEngine: Turn On Activity HistoryPromptFlowEngine: Pause or Resume Activity HistoryPromptFlowEngine: Turn Off Activity HistoryPromptFlowEngine: Show Activity HistoryPromptFlowEngine: Turn Prompt Text in History On or OffPromptFlowEngine: Set Activity History RetentionPromptFlowEngine: Export Activity HistoryPromptFlowEngine: Delete Activity HistoryPromptFlowEngine: Sign InPromptFlowEngine: Sign OutPromptFlowEngine: Account and Activity StatusPromptFlowEngine: Show Protection DashboardPromptFlowEngine: Scan Selection for Sensitive DataPromptFlowEngine: Redact Sensitive Data in SelectionPromptFlowEngine: Protection StatusPromptFlowEngine: 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 PromptCtrl+Alt+P W: Open PromptOps WorkspaceCtrl+Alt+P R: Restructure PromptCtrl+Alt+P A: Analyze PromptCtrl+Alt+P T: Insert Prompt TemplateCtrl+Alt+P S: Send Prompt to AI ChatCtrl+Alt+P M: Select Model for Tokens and CostCtrl+Alt+P P: Codebase → Prompt
Install
In VS Code, open the Extensions view and search for PromptFlowEngine, or run:
code --install-extension promptflow-ai.ide-extensionTo build this exact version from source instead:
# 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.vsixCopilot 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
| Setting | Default | Purpose |
|---|---|---|
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.codebaseMaxFiles | 2000 | Maximum number of files scanned per Codebase → Prompt run, before relevance filtering. |
promptflow.codebaseMaxRelevantFiles | 12 | Maximum number of files included as relevant context in a generated prompt. |
promptflow.privacy.enabled | true | Scan 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.enabled | true | Warn 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.errorReports | false | |
promptflow.dashboard.metrics | true | Keep 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.jsonis repaired after an upgrade; a commentedmcp.jsonis 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.