@@ -23,6 +23,8 @@ import { RefactorAdvisorPanel } from './panels/RefactorAdvisorPanel';
2323import { ResearchSynthesisPanel } from './panels/ResearchSynthesisPanel' ;
2424import { InitializeWizardPanel } from './panels/InitializeWizardPanel' ;
2525import { TestGeneratorPanel } from './panels/TestGeneratorPanel' ;
26+ import { WorkflowWizardPanel } from './panels/WorkflowWizardPanel' ;
27+ import { DocAnalysisPanel } from './panels/DocAnalysisPanel' ;
2628import { initializeProject , showWelcomeIfNeeded as showInitializeWelcome } from './commands/initializeProject' ;
2729
2830// Status bar item
@@ -129,11 +131,19 @@ export function activate(context: vscode.ExtensionContext) {
129131 ) ;
130132
131133 // Test Generator panel - Interactive test generation wizard
132- const testGeneratorProvider = new TestGeneratorPanel ( context . extensionUri , context ) ;
134+ // Opens in main editor area (not sidebar) using createOrShow pattern
135+ context . subscriptions . push (
136+ vscode . commands . registerCommand ( 'empathy.openTestGenerator' , ( ) => {
137+ TestGeneratorPanel . createOrShow ( context . extensionUri ) ;
138+ } )
139+ ) ;
140+
141+ // Workflow Wizard panel - Create new workflows from templates
142+ const workflowWizardProvider = new WorkflowWizardPanel ( context . extensionUri , context ) ;
133143 context . subscriptions . push (
134144 vscode . window . registerWebviewViewProvider (
135- TestGeneratorPanel . viewType ,
136- testGeneratorProvider ,
145+ WorkflowWizardPanel . viewType ,
146+ workflowWizardProvider ,
137147 {
138148 webviewOptions : {
139149 retainContextWhenHidden : true
@@ -169,7 +179,9 @@ export function activate(context: vscode.ExtensionContext) {
169179 // Initialize wizard (accepts optional { force: true } to skip "already initialized" check)
170180 { name : 'empathy.initializeProject' , handler : ( options ?: { force ?: boolean } ) => initializeProject ( context , options ) } ,
171181 // Test Generator wizard
172- { name : 'empathy.testGenerator.show' , handler : ( ) => vscode . commands . executeCommand ( 'test-generator.focus' ) } ,
182+ { name : 'empathy.testGenerator.show' , handler : ( ) => vscode . commands . executeCommand ( 'empathy.openTestGenerator' ) } ,
183+ // Workflow Wizard
184+ { name : 'empathy.workflowWizard.show' , handler : ( ) => vscode . commands . executeCommand ( 'workflow-wizard.focus' ) } ,
173185 ] ;
174186
175187 for ( const cmd of commands ) {
@@ -185,6 +197,51 @@ export function activate(context: vscode.ExtensionContext) {
185197 } )
186198 ) ;
187199
200+ // Register Documentation Analysis Panel command
201+ context . subscriptions . push (
202+ vscode . commands . registerCommand ( 'empathy.openDocAnalysis' , ( ) => {
203+ DocAnalysisPanel . createOrShow ( context . extensionUri ) ;
204+ } )
205+ ) ;
206+
207+ // Register command to open workflow reports in editor
208+ context . subscriptions . push (
209+ vscode . commands . registerCommand ( 'empathy.openReportInEditor' , async ( args : { workflowName : string ; output : string ; input ?: string } ) => {
210+ const workflowNames : Record < string , string > = {
211+ 'code-review' : 'Code Review' ,
212+ 'bug-predict' : 'Bug Prediction' ,
213+ 'security-audit' : 'Security Audit' ,
214+ 'perf-audit' : 'Performance Audit' ,
215+ 'refactor-plan' : 'Refactoring Plan' ,
216+ 'health-check' : 'Health Check' ,
217+ 'pr-review' : 'PR Review' ,
218+ 'pro-review' : 'Code Analysis' ,
219+ } ;
220+
221+ const displayName = workflowNames [ args . workflowName ] || args . workflowName ;
222+ const timestamp = new Date ( ) . toLocaleString ( ) ;
223+
224+ let content = `# ${ displayName } Report\n\n` ;
225+ content += `**Generated:** ${ timestamp } \n` ;
226+ if ( args . input ) {
227+ content += `**Target:** ${ args . input } \n` ;
228+ }
229+ content += `\n---\n\n` ;
230+ content += args . output ;
231+ content += `\n\n---\n*Generated by Empathy Framework*` ;
232+
233+ const doc = await vscode . workspace . openTextDocument ( {
234+ content,
235+ language : 'markdown' ,
236+ } ) ;
237+ await vscode . window . showTextDocument ( doc , {
238+ viewColumn : vscode . ViewColumn . One ,
239+ preview : false ,
240+ preserveFocus : false
241+ } ) ;
242+ } )
243+ ) ;
244+
188245 // Register URI handler for "Run in Empathy" buttons from documentation
189246 // Example URI: vscode://Smart-AI-Memory.empathy-framework/runCommand?command=empathy%20init
190247 context . subscriptions . push (
0 commit comments