File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 {
9494 "command" : " goose.askAboutSelection" ,
9595 "title" : " Ask Goose about this code"
96+ },
97+ {
98+ "command" : " goose.showLogs" ,
99+ "title" : " Goose: Show Extension Logs"
96100 }
97101 ],
98102 "menus" : {
Original file line number Diff line number Diff line change @@ -857,6 +857,12 @@ export function activate(context: vscode.ExtensionContext) {
857857 } ) ;
858858 // --- End Configuration Change Listener ---
859859
860+ // Register command to show logs
861+ const showLogsDisposable = vscode . commands . registerCommand ( 'goose.showLogs' , ( ) => {
862+ logger . info ( 'Executing command: goose.showLogs' ) ;
863+ logger . showOutputChannel ( ) ;
864+ } ) ;
865+
860866 // Add all disposables to the extension context's subscriptions
861867 context . subscriptions . push (
862868 viewRegistration ,
@@ -868,7 +874,8 @@ export function activate(context: vscode.ExtensionContext) {
868874 codeActionRegistration ,
869875 listSessionsDisposable ,
870876 themeChangeListener ,
871- loggingConfigListener // Add the logging config listener
877+ loggingConfigListener ,
878+ showLogsDisposable
872879 ) ;
873880}
874881
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ suite('Extension Test Suite', () => {
9595 // Check that context.subscriptions was updated (command disposables should be pushed)
9696 assert . strictEqual (
9797 context . subscriptions ?. length ,
98- 10 , // Updated from 9 to 10 to account for themeChangeListener
99- 'Expected 10 subscriptions to be added to context'
98+ 11 , // Updated from 10 to 11 to account for showLogsDisposable
99+ 'Expected 11 subscriptions to be added to context'
100100 ) ;
101101 } finally {
102102 // Restore the stubs
Original file line number Diff line number Diff line change @@ -135,6 +135,13 @@ export class Logger implements ILogger {
135135 this . log ( LogLevel . ERROR , message , ...args ) ;
136136 }
137137
138+ /**
139+ * Shows the VS Code output channel associated with this logger.
140+ */
141+ public showOutputChannel ( ) : void {
142+ this . outputChannel . show ( ) ;
143+ }
144+
138145 /**
139146 * Central log processing method.
140147 */
You can’t perform that action at this time.
0 commit comments