製品

VS Code 拡張機能

バージョン 2.7.0。VS Code 版 PromptFlowEngine は、コードベース → プロンプト → AI → コードベースというひとつのワークフローを軸に作られています。エンジンはプロセス内で動作し、サーバーも Python も不要で、自前のモデル呼び出しもありません。

Visual Studio Marketplace で promptflow-ai.ide-extension として公開されています。このページはリポジトリ内のバージョンを説明しており、次のリリースが公開されるまでは Marketplace に前のリリースが残っていることがあります。 拡張機能自体は英語です。

ワークフロー

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

アクティビティバーの PromptFlowEngine アイコンを開きます。パネルが 4 つのステップを順に案内します。

1. コードベース

Entire workspace、Current file、Choose files or folder、No code のいずれかを選びます。ファイルはフィルタリング(node_modules、ビルド出力、バイナリは除外)され、タスクとの関連度で採点され、件数も制限されるため、プロンプトにはリポジトリ全体ではなく、重要な数ファイルだけが含まれます。

2. プロンプト

タスクを話し言葉のまま入力します。Generate prompt は、ロール、目的、プロジェクトのコンテキスト、関連コード、要件、制約、エッジケース、テスト、受け入れ基準、期待する出力からなるセクション構成のエンジニアリングプロンプトを生成します。セクションはタスクが必要とする場合にだけ現れ、「これを説明して」という依頼にテスト計画は付きません。パネルには、あなたのタスク、コードベース、追加された指針から来た行数が表示され、プロンプトは編集可能なままです。MCP ツールや HTTP API が提供するものと同じ再構成です。

3. AI

Send to AI Chat は、プロンプトを VS Code Chat で開きます(使えない場合はコピーします)。何かが外に出る前に、プライバシーガードが認証情報と個人データをスキャンします。モード:strict(ブロック)、redact(デフォルト、プレースホルダーに置換)、warn(確認)。Reduce tokens は、意味を保つことを検証した編集で冗長な表現と繰り返しを削除します。

4. コードベース

AI がファイルを編集したら、Review changes でソース管理を開き、変更を一つずつ残すか破棄するかを選べます。Build review prompt は未コミットの変更があるファイルを読み取り、元のタスクと照合するレビュー用プロンプトを生成します。組み込みの Git 拡張機能が必要で、読み取りのみを行い、ステージ、コミット、元に戻す操作は決して行いません。

コマンド

  • 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 は選択範囲またはドキュメント全体に対して動作し、元のものと再構成後の差分を開き、テキストの置き換え、チャットへの送信、コピーを提案します。Analyze Prompt は、品質スコア、トークン数、推定入力コスト、各問題の理由と修正案を PromptFlowEngine の出力チャンネルに一覧表示します。Insert Prompt Template は、テンプレートまたはライブラリのプロンプトのひとつをカーソル位置に挿入します。Select Model for Tokens and Cost は、モデルカタログの任意のモデルを選びます。ステータスバーには直近のプロンプトのトークン数と品質スコアが表示されます。

Restructure、Analyze、Insert Prompt Template、Send は、エディタのコンテキストメニューの PromptFlowEngine の下にもあり、すべてのコマンドに Ctrl+Alt+P(macOS では Cmd+Alt+P)から始まるキーボードショートカットがあります。

  • 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

インストール

VS Code で拡張機能ビューを開いて PromptFlowEngine を検索するか、次のコマンドを実行します。

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

代わりにこのバージョンをソースからビルドするには:

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 エージェントモード

有効化されると、拡張機能は同梱の MCP サーバーを .vscode/mcp.json に登録し(node が PATH にあることが必要)、エージェントが同じツールを直接呼び出せるようにします。MCP クライアントを参照してください。

設定

設定デフォルト用途
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.

設定キーは以前のバージョンと同じ promptflow. プレフィックスを保っているため、既存の設定はそのまま引き継がれます。

2.2 の変更点

  • モデルの 4 ファミリーに代わって、モデルカタログ全体が使えるようになり、各モデルの定価、価格の確認日、トークン数が正確かどうかが分かります。
  • 新しいコマンド:Insert Prompt Template と Select Model for Tokens and Cost。新しい設定:promptflow.model。
  • Analyze Prompt が、品質、トークン、コスト、各問題の修正案を報告するようになりました。
  • エディタのコンテキストメニューとキーボードショートカットを追加。
  • 修正:参考価格のないモデルに別のモデルのコストが割り当てられなくなりました。アップグレード後に .vscode/mcp.json の Copilot エントリが修復されます。コメント付きの mcp.json が上書きされることはありません。

2.1 の変更点

  • 表示名、アクティビティバー、コマンド、メッセージ、出力チャンネルのすべてを PromptFlowEngine に名称変更。
  • 独立した Optimize ビューと Optimize Prompt コマンドを廃止。トークン削減はワークフローパネル内のひとつの操作になりました。
  • 新規:Restructure Prompt、「No code」スコープ、レビューステップ、編集可能な生成プロンプト。
  • 生成されるプロンプトは共有エンジンによるもので、固定テンプレートではなくタスクに応じてセクションが選ばれます。
  • パネルは厳格な Content Security Policy の下で動作するようになりました。