diff --git a/client/branded/src/components/panel/TabbedPanelContent.tsx b/client/branded/src/components/panel/TabbedPanelContent.tsx index ff1bfff7e192..878f4f14be04 100644 --- a/client/branded/src/components/panel/TabbedPanelContent.tsx +++ b/client/branded/src/components/panel/TabbedPanelContent.tsx @@ -11,13 +11,13 @@ import { ContributableMenu, Contributions, Evaluated } from '@sourcegraph/client import { MaybeLoadingResult } from '@sourcegraph/codeintellify' import { isDefined, combineLatestOrDefault, isErrorLike } from '@sourcegraph/common' import { Location } from '@sourcegraph/extension-api-types' -import { FetchFileParameters } from '@sourcegraph/search-ui' import { ActionsNavItems } from '@sourcegraph/shared/src/actions/ActionsNavItems' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { match } from '@sourcegraph/shared/src/api/client/types/textDocument' import { ExtensionCodeEditor } from '@sourcegraph/shared/src/api/extension/api/codeEditor' import { PanelViewData } from '@sourcegraph/shared/src/api/extension/extensionHostApi' import { haveInitialExtensionsLoaded } from '@sourcegraph/shared/src/api/features' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/branded/src/components/panel/views/FileLocations.tsx b/client/branded/src/components/panel/views/FileLocations.tsx index 187721a77c7f..02337613a4d5 100644 --- a/client/branded/src/components/panel/views/FileLocations.tsx +++ b/client/branded/src/components/panel/views/FileLocations.tsx @@ -10,7 +10,8 @@ import { Badged } from 'sourcegraph' import { asError, ErrorLike, isErrorLike, isDefined, property, logger } from '@sourcegraph/common' import { Location } from '@sourcegraph/extension-api-types' -import { FileSearchResult, FetchFileParameters } from '@sourcegraph/search-ui' +import { FileSearchResult } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { VirtualList } from '@sourcegraph/shared/src/components/VirtualList' import { ContentMatch } from '@sourcegraph/shared/src/search/stream' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/branded/src/components/panel/views/HierarchicalLocationsView.tsx b/client/branded/src/components/panel/views/HierarchicalLocationsView.tsx index 6990e34b1887..7e1ef8fca7e4 100644 --- a/client/branded/src/components/panel/views/HierarchicalLocationsView.tsx +++ b/client/branded/src/components/panel/views/HierarchicalLocationsView.tsx @@ -9,7 +9,7 @@ import { catchError, distinctUntilChanged, endWith, map, startWith, switchMap, t import { MaybeLoadingResult } from '@sourcegraph/codeintellify' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' import { Location } from '@sourcegraph/extension-api-types' -import { FetchFileParameters } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/branded/src/components/panel/views/PanelView.tsx b/client/branded/src/components/panel/views/PanelView.tsx index 800fe7233ba1..1eed0b7a2ca1 100644 --- a/client/branded/src/components/panel/views/PanelView.tsx +++ b/client/branded/src/components/panel/views/PanelView.tsx @@ -4,7 +4,7 @@ import * as H from 'history' import { Observable } from 'rxjs' import { renderMarkdown } from '@sourcegraph/common' -import { FetchFileParameters } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { Markdown } from '@sourcegraph/shared/src/components/Markdown' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/branded/tsconfig.json b/client/branded/tsconfig.json index b408c072821f..f33299164247 100644 --- a/client/branded/tsconfig.json +++ b/client/branded/tsconfig.json @@ -6,7 +6,7 @@ "sourceRoot": "src", "baseUrl": ".", "paths": { - "*": ["src/types/*", "*"], + "*": ["../observability-client/src/types/*", "src/types/*", "*"], }, "rootDir": ".", "outDir": "./out", diff --git a/client/observability-client/src/instrumentations/history.ts b/client/observability-client/src/instrumentations/history.ts index 62d96d063647..589e6064c0df 100644 --- a/client/observability-client/src/instrumentations/history.ts +++ b/client/observability-client/src/instrumentations/history.ts @@ -44,7 +44,12 @@ export class HistoryInstrumentation extends InstrumentationBaseWeb { const instrumentation = this return function historyMethod(this: History, ...args: unknown[]) { - const result = original.apply(this, args as any) + /** + * TODO: figure out why `original as any` is required. + * Without it the monorepo wide Typescript build fails even though + * the `observability-client` Typescript builds are successful. + */ + const result = (original as any).apply(this, args as any) instrumentation.createPageViewSpan() return result diff --git a/client/shared/src/types/@opentelemetry/api/index.d.ts b/client/observability-client/src/types/@opentelemetry/api/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/api/index.d.ts rename to client/observability-client/src/types/@opentelemetry/api/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/core/index.d.ts b/client/observability-client/src/types/@opentelemetry/core/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/core/index.d.ts rename to client/observability-client/src/types/@opentelemetry/core/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/exporter-trace-otlp-http/index.d.ts b/client/observability-client/src/types/@opentelemetry/exporter-trace-otlp-http/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/exporter-trace-otlp-http/index.d.ts rename to client/observability-client/src/types/@opentelemetry/exporter-trace-otlp-http/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/instrumentation/index.d.ts b/client/observability-client/src/types/@opentelemetry/instrumentation/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/instrumentation/index.d.ts rename to client/observability-client/src/types/@opentelemetry/instrumentation/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/resources/index.d.ts b/client/observability-client/src/types/@opentelemetry/resources/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/resources/index.d.ts rename to client/observability-client/src/types/@opentelemetry/resources/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/sdk-trace-base/index.d.ts b/client/observability-client/src/types/@opentelemetry/sdk-trace-base/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/sdk-trace-base/index.d.ts rename to client/observability-client/src/types/@opentelemetry/sdk-trace-base/index.d.ts diff --git a/client/shared/src/types/@opentelemetry/semantic-conventions/index.d.ts b/client/observability-client/src/types/@opentelemetry/semantic-conventions/index.d.ts similarity index 100% rename from client/shared/src/types/@opentelemetry/semantic-conventions/index.d.ts rename to client/observability-client/src/types/@opentelemetry/semantic-conventions/index.d.ts diff --git a/client/observability-client/tsconfig.json b/client/observability-client/tsconfig.json index 991a1a6b96c4..f00d1145fa6b 100644 --- a/client/observability-client/tsconfig.json +++ b/client/observability-client/tsconfig.json @@ -7,7 +7,7 @@ "rootDir": ".", "outDir": "out", "paths": { - "*": ["../shared/src/types/*", "*"], + "*": ["./src/types/*", "*"], }, }, "include": ["**/*", ".*"], diff --git a/client/search-ui/src/components/CodeExcerpt.tsx b/client/search-ui/src/components/CodeExcerpt.tsx index e987ae1f6c69..ab9f1038841f 100644 --- a/client/search-ui/src/components/CodeExcerpt.tsx +++ b/client/search-ui/src/components/CodeExcerpt.tsx @@ -10,10 +10,8 @@ import { catchError, filter } from 'rxjs/operators' import { HoverMerged } from '@sourcegraph/client-api' import { DOMFunctions, findPositionsFromEvents, Hoverifier } from '@sourcegraph/codeintellify' import { asError, ErrorLike, isDefined, isErrorLike, highlightNodeMultiline } from '@sourcegraph/common' -import { HighlightLineRange } from '@sourcegraph/search' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { ViewerId } from '@sourcegraph/shared/src/api/viewerTypes' -import { HighlightResponseFormat } from '@sourcegraph/shared/src/graphql-operations' import { HoverContext } from '@sourcegraph/shared/src/hover/HoverOverlay.types' import { Repo } from '@sourcegraph/shared/src/util/url' import { Icon, Code } from '@sourcegraph/wildcard' @@ -27,15 +25,6 @@ export interface Shape { right?: number } -export interface FetchFileParameters { - repoName: string - commitID: string - filePath: string - disableTimeout?: boolean - ranges: HighlightLineRange[] - format?: HighlightResponseFormat -} - interface Props extends Repo { commitID: string filePath: string diff --git a/client/search-ui/src/components/FileMatchChildren.tsx b/client/search-ui/src/components/FileMatchChildren.tsx index 9adfe8be4459..f6cfcd84176d 100644 --- a/client/search-ui/src/components/FileMatchChildren.tsx +++ b/client/search-ui/src/components/FileMatchChildren.tsx @@ -16,6 +16,7 @@ import { } from '@sourcegraph/common' import { HighlightLineRange, HighlightResponseFormat } from '@sourcegraph/search' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { MatchGroup } from '@sourcegraph/shared/src/components/ranking/PerFileResultRanking' import { Controller as ExtensionsController } from '@sourcegraph/shared/src/extensions/controller' import { HoverContext } from '@sourcegraph/shared/src/hover/HoverOverlay.types' @@ -27,7 +28,7 @@ import { codeCopiedEvent } from '@sourcegraph/shared/src/tracking/event-log-crea import { useCodeIntelViewerUpdates } from '@sourcegraph/shared/src/util/useCodeIntelViewerUpdates' import { useFocusOnLoadedMore } from '@sourcegraph/wildcard' -import { CodeExcerpt, FetchFileParameters, onClickCodeExcerptHref } from './CodeExcerpt' +import { CodeExcerpt, onClickCodeExcerptHref } from './CodeExcerpt' import { LastSyncedIcon } from './LastSyncedIcon' import styles from './FileMatchChildren.module.scss' diff --git a/client/search-ui/src/components/FileSearchResult.tsx b/client/search-ui/src/components/FileSearchResult.tsx index 3d8e1e95ac96..1111b9948258 100644 --- a/client/search-ui/src/components/FileSearchResult.tsx +++ b/client/search-ui/src/components/FileSearchResult.tsx @@ -9,6 +9,7 @@ import { HoverMerged } from '@sourcegraph/client-api' import { Hoverifier } from '@sourcegraph/codeintellify' import { isErrorLike, pluralize } from '@sourcegraph/common' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { LineRanking } from '@sourcegraph/shared/src/components/ranking/LineRanking' import { MatchGroup, MatchItem } from '@sourcegraph/shared/src/components/ranking/PerFileResultRanking' import { ZoektRanking } from '@sourcegraph/shared/src/components/ranking/ZoektRanking' @@ -26,7 +27,6 @@ import { isSettingsValid, SettingsCascadeProps } from '@sourcegraph/shared/src/s import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Badge } from '@sourcegraph/wildcard' -import { FetchFileParameters } from './CodeExcerpt' import { FileMatchChildren } from './FileMatchChildren' import { RepoFileLink } from './RepoFileLink' import { ResultContainerProps, ResultContainer } from './ResultContainer' @@ -125,7 +125,7 @@ export const FileSearchResult: React.FunctionComponent= 0) { return contextLinesSetting diff --git a/client/search-ui/src/results/StreamingSearchResultsList.tsx b/client/search-ui/src/results/StreamingSearchResultsList.tsx index faab35c65c77..723379752c48 100644 --- a/client/search-ui/src/results/StreamingSearchResultsList.tsx +++ b/client/search-ui/src/results/StreamingSearchResultsList.tsx @@ -10,8 +10,9 @@ import { Observable } from 'rxjs' import { HoverMerged } from '@sourcegraph/client-api' import { Hoverifier } from '@sourcegraph/codeintellify' import { SearchContextProps } from '@sourcegraph/search' -import { CommitSearchResult, RepoSearchResult, FileSearchResult, FetchFileParameters } from '@sourcegraph/search-ui' +import { CommitSearchResult, RepoSearchResult, FileSearchResult } from '@sourcegraph/search-ui' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { FilePrefetcher, PrefetchableFile } from '@sourcegraph/shared/src/components/PrefetchableFile' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { VirtualList } from '@sourcegraph/shared/src/components/VirtualList' diff --git a/client/search-ui/tsconfig.json b/client/search-ui/tsconfig.json index a16431c3ba32..31dad5e5e2bb 100644 --- a/client/search-ui/tsconfig.json +++ b/client/search-ui/tsconfig.json @@ -16,5 +16,6 @@ { "path": "../branded" }, { "path": "../http-client" }, { "path": "../common" }, + { "path": "../observability-client" }, ], } diff --git a/client/search/src/integration/streaming-search-mocks.ts b/client/search/src/integration/streaming-search-mocks.ts index 5b2297cce0f0..d70c884b4d9e 100644 --- a/client/search/src/integration/streaming-search-mocks.ts +++ b/client/search/src/integration/streaming-search-mocks.ts @@ -1,9 +1,9 @@ /* eslint-disable no-template-curly-in-string */ -import { SearchGraphQlOperations } from '@sourcegraph/search' -import { FetchFileParameters } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { SharedGraphQlOperations } from '@sourcegraph/shared/src/graphql-operations' import { SearchEvent } from '@sourcegraph/shared/src/search/stream' +import { SearchGraphQlOperations } from '..' import { SymbolKind } from '../graphql-operations' export const diffSearchStreamEvents: SearchEvent[] = [ diff --git a/client/shared/src/backend/file.ts b/client/shared/src/backend/file.ts index c0a6e8c437e9..0ba93ba0beb4 100644 --- a/client/shared/src/backend/file.ts +++ b/client/shared/src/backend/file.ts @@ -3,9 +3,13 @@ import { map } from 'rxjs/operators' import { createAggregateError, memoizeObservable } from '@sourcegraph/common' import { gql } from '@sourcegraph/http-client' -import { FetchFileParameters } from '@sourcegraph/search-ui' -import { HighlightedFileResult, HighlightedFileVariables, HighlightResponseFormat } from '../graphql-operations' +import { + HighlightedFileResult, + HighlightedFileVariables, + HighlightLineRange, + HighlightResponseFormat, +} from '../graphql-operations' import { PlatformContext } from '../platform/context' import { makeRepoURI } from '../util/url' @@ -65,6 +69,15 @@ const VSCE_HIGHLIGHTED_FILE_QUERY = gql` } ` +export interface FetchFileParameters { + repoName: string + commitID: string + filePath: string + disableTimeout?: boolean + ranges: HighlightLineRange[] + format?: HighlightResponseFormat +} + /** * Fetches the specified highlighted file line ranges (`FetchFileParameters.ranges`) and returns * them as a list of ranges, each describing a list of lines in the form of HTML table '...'. diff --git a/client/shared/src/testing/searchTestHelpers.ts b/client/shared/src/testing/searchTestHelpers.ts index c582618d4ab7..e84e6cb5d0dd 100644 --- a/client/shared/src/testing/searchTestHelpers.ts +++ b/client/shared/src/testing/searchTestHelpers.ts @@ -2,10 +2,9 @@ import { noop } from 'lodash' import { EMPTY, NEVER, of, Subscription } from 'rxjs' import sinon from 'sinon' -import { FetchFileParameters } from '@sourcegraph/search-ui' - import { FlatExtensionHostAPI } from '../api/contract' import { pretendProxySubscribable, pretendRemote } from '../api/util' +import { FetchFileParameters } from '../backend/file' import { Controller } from '../extensions/controller' import { PlatformContext } from '../platform/context' import { AggregateStreamingSearchResults, ContentMatch, RepositoryMatch } from '../search/stream' diff --git a/client/vscode/src/webview/search-panel/SearchResultsView.tsx b/client/vscode/src/webview/search-panel/SearchResultsView.tsx index a72f7ee8e48e..525dedac8db4 100644 --- a/client/vscode/src/webview/search-panel/SearchResultsView.tsx +++ b/client/vscode/src/webview/search-panel/SearchResultsView.tsx @@ -10,15 +10,9 @@ import { getUserSearchContextNamespaces, QueryState, } from '@sourcegraph/search' -import { - IEditor, - SearchBox, - StreamingProgress, - StreamingSearchResultsList, - FetchFileParameters, -} from '@sourcegraph/search-ui' +import { IEditor, SearchBox, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/search-ui' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' -import { fetchHighlightedFileLineRanges } from '@sourcegraph/shared/src/backend/file' +import { FetchFileParameters, fetchHighlightedFileLineRanges } from '@sourcegraph/shared/src/backend/file' import { collectMetrics } from '@sourcegraph/shared/src/search/query/metrics' import { appendContextFilter, diff --git a/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx b/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx index 4d87b3fb4615..b6f38948f2dd 100644 --- a/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx +++ b/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx @@ -12,13 +12,9 @@ import { appendSubtreeQueryParameter, toPositionOrRangeQueryParameter, } from '@sourcegraph/common' -import { - LastSyncedIcon, - FileMatchChildrenStyles as styles, - CodeExcerpt, - FetchFileParameters, -} from '@sourcegraph/search-ui' +import { LastSyncedIcon, FileMatchChildrenStyles as styles, CodeExcerpt } from '@sourcegraph/search-ui' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { MatchGroup } from '@sourcegraph/shared/src/components/ranking/PerFileResultRanking' import { Controller as ExtensionsController } from '@sourcegraph/shared/src/extensions/controller' import { HoverContext } from '@sourcegraph/shared/src/hover/HoverOverlay.types' diff --git a/client/web/src/Layout.tsx b/client/web/src/Layout.tsx index 3369e6afa4c5..02900d6fade1 100644 --- a/client/web/src/Layout.tsx +++ b/client/web/src/Layout.tsx @@ -7,7 +7,7 @@ import { Observable } from 'rxjs' import { TabbedPanelContent } from '@sourcegraph/branded/src/components/panel/TabbedPanelContent' import { isMacPlatform } from '@sourcegraph/common' import { SearchContextProps } from '@sourcegraph/search' -import { FetchFileParameters } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { useKeyboardShortcut } from '@sourcegraph/shared/src/keyboardShortcuts/useKeyboardShortcut' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/SourcegraphWebApp.tsx b/client/web/src/SourcegraphWebApp.tsx index 9a233c630ea3..aa39eca65d69 100644 --- a/client/web/src/SourcegraphWebApp.tsx +++ b/client/web/src/SourcegraphWebApp.tsx @@ -28,9 +28,8 @@ import { getAvailableSearchContextSpecOrDefault, SearchQueryStateStoreProvider, } from '@sourcegraph/search' -import { FetchFileParameters } from '@sourcegraph/search-ui' import { NotificationType } from '@sourcegraph/shared/src/api/extension/extensionHostApi' -import { fetchHighlightedFileLineRanges } from '@sourcegraph/shared/src/backend/file' +import { FetchFileParameters, fetchHighlightedFileLineRanges } from '@sourcegraph/shared/src/backend/file' import { setCodeIntelSearchContext } from '@sourcegraph/shared/src/codeintel/searchContext' import { Controller as ExtensionsController } from '@sourcegraph/shared/src/extensions/controller' import { createController as createExtensionsController } from '@sourcegraph/shared/src/extensions/createLazyLoadedController' diff --git a/client/web/src/codeintel/ReferencesPanel.tsx b/client/web/src/codeintel/ReferencesPanel.tsx index dc305bb5dcd2..d54c0f8bf859 100644 --- a/client/web/src/codeintel/ReferencesPanel.tsx +++ b/client/web/src/codeintel/ReferencesPanel.tsx @@ -20,7 +20,8 @@ import { } from '@sourcegraph/common' import { Position } from '@sourcegraph/extension-api-classes' import { useQuery } from '@sourcegraph/http-client' -import { CodeExcerpt, FetchFileParameters, onClickCodeExcerptHref } from '@sourcegraph/search-ui' +import { CodeExcerpt, onClickCodeExcerptHref } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { LanguageSpec } from '@sourcegraph/shared/src/codeintel/legacy-extensions/language-specs/language-spec' import { findLanguageSpec } from '@sourcegraph/shared/src/codeintel/legacy-extensions/language-specs/languages' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' diff --git a/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx b/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx index 856bee0729ad..506e75a02932 100644 --- a/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx +++ b/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx @@ -10,12 +10,12 @@ import { Hoverifier } from '@sourcegraph/codeintellify' import { SearchContextProps } from '@sourcegraph/search' import { StreamingSearchResultsList, - FetchFileParameters, CodeMirrorQueryInput, changeListener, createDefaultSuggestions, } from '@sourcegraph/search-ui' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { editorHeight } from '@sourcegraph/shared/src/components/CodeMirrorEditor' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { HoverContext } from '@sourcegraph/shared/src/hover/HoverOverlay.types' diff --git a/client/web/src/notebooks/index.ts b/client/web/src/notebooks/index.ts index 268193fcaf6d..297b4ea2d34d 100644 --- a/client/web/src/notebooks/index.ts +++ b/client/web/src/notebooks/index.ts @@ -1,8 +1,9 @@ import { Remote } from 'comlink' import { Observable } from 'rxjs' -import { FetchFileParameters, HighlightRange } from '@sourcegraph/search-ui' +import { HighlightRange } from '@sourcegraph/search-ui' import { FlatExtensionHostAPI } from '@sourcegraph/shared/src/api/contract' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { AggregateStreamingSearchResults } from '@sourcegraph/shared/src/search/stream' import { UIRangeSpec } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/notebooks/notebookPage/EmbeddedNotebookPage.tsx b/client/web/src/notebooks/notebookPage/EmbeddedNotebookPage.tsx index 93f689b4235c..c88749cfed52 100644 --- a/client/web/src/notebooks/notebookPage/EmbeddedNotebookPage.tsx +++ b/client/web/src/notebooks/notebookPage/EmbeddedNotebookPage.tsx @@ -5,8 +5,10 @@ import { NEVER } from 'rxjs' import { catchError, startWith } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' -import { FetchFileParameters } from '@sourcegraph/search-ui' -import { fetchHighlightedFileLineRanges as fetchHighlightedFileLineRangesShared } from '@sourcegraph/shared/src/backend/file' +import { + FetchFileParameters, + fetchHighlightedFileLineRanges as fetchHighlightedFileLineRangesShared, +} from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { aggregateStreamingSearch } from '@sourcegraph/shared/src/search/stream' diff --git a/client/web/src/repo/blob/BlobPage.tsx b/client/web/src/repo/blob/BlobPage.tsx index 0b409934d28d..ea0ede902524 100644 --- a/client/web/src/repo/blob/BlobPage.tsx +++ b/client/web/src/repo/blob/BlobPage.tsx @@ -19,7 +19,8 @@ import { reactManualTracer, } from '@sourcegraph/observability-client' import { SearchContextProps } from '@sourcegraph/search' -import { FetchFileParameters, StreamingSearchResultsListProps } from '@sourcegraph/search-ui' +import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { HighlightResponseFormat } from '@sourcegraph/shared/src/graphql-operations' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/repo/blob/panel/BlobPanel.tsx b/client/web/src/repo/blob/panel/BlobPanel.tsx index 75718a46569f..905362f901a7 100644 --- a/client/web/src/repo/blob/panel/BlobPanel.tsx +++ b/client/web/src/repo/blob/panel/BlobPanel.tsx @@ -14,8 +14,8 @@ import { ReferenceParameters, TextDocumentPositionParameters } from '@sourcegrap import { MaybeLoadingResult } from '@sourcegraph/codeintellify' import { isErrorLike } from '@sourcegraph/common' import * as clientType from '@sourcegraph/extension-api-types' -import { FetchFileParameters } from '@sourcegraph/search-ui' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/search/results/StreamingSearchResults.tsx b/client/web/src/search/results/StreamingSearchResults.tsx index 771bb1c8626a..eea0b7f5ed3e 100644 --- a/client/web/src/search/results/StreamingSearchResults.tsx +++ b/client/web/src/search/results/StreamingSearchResults.tsx @@ -7,7 +7,8 @@ import { Observable } from 'rxjs' import { asError } from '@sourcegraph/common' import { QueryUpdate, SearchContextProps, SearchMode } from '@sourcegraph/search' -import { FetchFileParameters, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/search-ui' +import { StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/search-ui' +import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { FilePrefetcher } from '@sourcegraph/shared/src/components/PrefetchableFile' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations'