@@ -89,14 +89,11 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
8989}
9090
9191const openClineInNewTab = async ( { context, outputChannel } : Omit < RegisterCommandOptions , "provider" > ) => {
92- outputChannel . appendLine ( "Opening Roo Code in new tab" )
93-
9492 // (This example uses webviewProvider activation event which is necessary to
9593 // deserialize cached webview, but since we use retainContextWhenHidden, we
9694 // don't need to use that event).
9795 // https://github.com/microsoft/vscode-extension-samples/blob/main/webview-sample/src/extension.ts
98- const tabProvider = new ClineProvider ( context , outputChannel )
99- // const column = vscode.window.activeTextEditor ? vscode.window.activeTextEditor.viewColumn : undefined
96+ const tabProvider = new ClineProvider ( context , outputChannel , "editor" )
10097 const lastCol = Math . max ( ...vscode . window . visibleTextEditors . map ( ( editor ) => editor . viewColumn || 0 ) )
10198
10299 // Check if there are any visible text editors, otherwise open a new group
@@ -115,10 +112,10 @@ const openClineInNewTab = async ({ context, outputChannel }: Omit<RegisterComman
115112 localResourceRoots : [ context . extensionUri ] ,
116113 } )
117114
118- // Save as tab type panel
115+ // Save as tab type panel.
119116 setPanel ( newPanel , "tab" )
120117
121- // TODO: use better svg icon with light and dark variants (see
118+ // TODO: Use better svg icon with light and dark variants (see
122119 // https://stackoverflow.com/questions/58365687/vscode-extension-iconpath).
123120 newPanel . iconPath = {
124121 light : vscode . Uri . joinPath ( context . extensionUri , "assets" , "icons" , "rocket.png" ) ,
@@ -127,12 +124,12 @@ const openClineInNewTab = async ({ context, outputChannel }: Omit<RegisterComman
127124
128125 await tabProvider . resolveWebviewView ( newPanel )
129126
130- // Handle panel closing events
127+ // Handle panel closing events.
131128 newPanel . onDidDispose ( ( ) => {
132129 setPanel ( undefined , "tab" )
133130 } )
134131
135- // Lock the editor group so clicking on files doesn't open them over the panel
132+ // Lock the editor group so clicking on files doesn't open them over the panel.
136133 await delay ( 100 )
137134 await vscode . commands . executeCommand ( "workbench.action.lockEditorGroup" )
138135}
0 commit comments