@@ -22,6 +22,7 @@ import {
2222} from '@sourcegraph/extensions-client-common/lib/settings'
2323import { ConfigurationSubject } from '@sourcegraph/extensions-client-common/lib/settings'
2424import { ConfigurationCascade } from '@sourcegraph/extensions-client-common/lib/settings'
25+ import * as H from 'history'
2526
2627import mermaid from 'mermaid'
2728import * as React from 'react'
@@ -131,10 +132,13 @@ function injectCodeIntelligence(): void {
131132 const constExtensionsContextController = extensionsContextController !
132133 const constController = extensionsController !
133134
134- injectExtensionsGlobalComponents ( {
135- extensionsController : constController ,
136- extensionsContextController : constExtensionsContextController ,
137- } )
135+ injectExtensionsGlobalComponents (
136+ {
137+ extensionsController : constController ,
138+ extensionsContextController : constExtensionsContextController ,
139+ } ,
140+ H . createLocation ( window . location )
141+ )
138142
139143 resolveRev ( { repoPath, rev : parseURL ( ) . rev } )
140144 . pipe ( retryWhenCloneInProgressError ( ) )
@@ -396,6 +400,8 @@ function injectCodeSnippetAnnotator(
396400 mount . className = 'sourcegraph-app-annotator'
397401 filePathContainer . appendChild ( mount )
398402
403+ const location = H . createLocation ( window . location )
404+
399405 const renderCodeView = ( commitID : string ) =>
400406 render (
401407 < CodeViewToolbar
@@ -406,6 +412,7 @@ function injectCodeSnippetAnnotator(
406412 buttonProps = { buttonProps }
407413 simpleProviderFns = { lspViaAPIXlang }
408414 actionsNavItemClassProps = { actionsNavItemClassProps }
415+ location = { location }
409416 /> ,
410417 mount
411418 )
@@ -625,6 +632,7 @@ function injectBlobAnnotators(
625632 extensionsController = { extensionsController }
626633 extensions = { extensions }
627634 actionsNavItemClassProps = { actionsNavItemClassProps }
635+ location = { H . createLocation ( window . location ) }
628636 /> ,
629637 mount
630638 )
@@ -698,6 +706,7 @@ function injectBlobAnnotators(
698706 buttonProps = { buttonProps }
699707 simpleProviderFns = { simpleProviderFns }
700708 actionsNavItemClassProps = { actionsNavItemClassProps }
709+ location = { H . createLocation ( window . location ) }
701710 /> ,
702711 mount
703712 )
0 commit comments