update code references to "Sourcegraph App" -> "Cody App" (#56747)

This updates variable names, property names, env var names, etc., to call it "Cody App".

The entire diff was created by running the following commands:

```
fastmod -e go SourcegraphAppMode CodyAppMode
fastmod -e go,ts,tsx sourcegraphAppMode codyAppMode
fastmod -e ts,tsx isSourcegraphApp isCodyApp
fastmod -e ts,tsx,go,yaml,sh,js SOURCEGRAPH_APP CODY_APP
fastmod -e ts,tsx,go,json,mod,graphql,md,js 'Sourcegraph App\b' 'Cody App'
fastmod -e ts,tsx,go,json,mod,graphql,md,js 'Sourcegraph app\b' 'Cody app' # with a few changes skipped
```
This commit is contained in:
Quinn Slack 2023-09-19 15:31:12 -07:00 committed by GitHub
parent 3e314edc17
commit 8caa9ad9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
116 changed files with 331 additions and 352 deletions

View File

@ -66,4 +66,4 @@ All notable changes to the Cody app are documented in this file.
- Adding your Git repositories is now much easier
- We made the app a much more native experience (by adopting [Tauri](https://tauri.app)), and you can now access Cody through the system tray.
- You can now ask Cody questions side-by-side with your editor open
- If you use VS Code, the Cody extension now offers a `Connect Sourcegraph App` option (you may need to sign out using the settings gear to see it). Cody in VS Code will then talk to your Sourcegraph app to answer questions. In the future, this will enable much more powerful answers including context about all of your local code - not just what's open in your editor.
- If you use VS Code, the Cody extension now offers a `Connect Cody App` option (you may need to sign out using the settings gear to see it). Cody in VS Code will then talk to your Cody app to answer questions. In the future, this will enable much more powerful answers including context about all of your local code - not just what's open in your editor.

View File

@ -560,7 +560,7 @@ export function buildSearchURLQuery(
}
/**
* Takes an input URL and adds Sourcegraph App specific query parameters to it. This includes the UTM parameters and app_os.
* Takes an input URL and adds Cody App specific query parameters to it. This includes the UTM parameters and app_os.
* @param url Original URL
* @param campaign Optional utm_campaign value to add to the query params.
* @returns URL string with appended query parameters

View File

@ -22,14 +22,14 @@ import { ENVIRONMENT_CONFIG, IS_DEVELOPMENT, IS_PRODUCTION } from '../utils'
import { manifestPlugin } from './manifestPlugin'
const isEnterpriseBuild = ENVIRONMENT_CONFIG.ENTERPRISE
const isSourcegraphApp = ENVIRONMENT_CONFIG.SOURCEGRAPH_APP
const isCodyApp = ENVIRONMENT_CONFIG.CODY_APP
const omitSlowDeps = ENVIRONMENT_CONFIG.DEV_WEB_BUILDER_OMIT_SLOW_DEPS
export const BUILD_OPTIONS: esbuild.BuildOptions = {
entryPoints: {
// Enterprise vs. OSS builds use different entrypoints. The enterprise entrypoint imports a
// strict superset of the OSS entrypoint.
'scripts/app': isSourcegraphApp
'scripts/app': isCodyApp
? path.join(ROOT_PATH, 'client/web/src/enterprise/app-main.tsx')
: isEnterpriseBuild
? path.join(ROOT_PATH, 'client/web/src/enterprise/main.tsx')

View File

@ -8,7 +8,7 @@ import { STATIC_ASSETS_PATH } from '@sourcegraph/build-config'
import { type WebpackManifest, HTML_INDEX_PATH } from '../utils'
// Note: This is only valid for Sourcegraph App.
// Note: This is only valid for Cody App.
export const assetPathPrefix = '/'
export const getManifest = (jsEntrypoint: string, cssEntrypoint?: string): WebpackManifest => ({
@ -34,7 +34,7 @@ const ENTRYPOINT_NAME = 'scripts/shell'
* An esbuild plugin to write a index.html file for Sourcegraph, for compatibility with the current
* Go backend template system.
*
* This is only used in Sourcegraph App, currently.
* This is only used in Cody App, currently.
*/
export const htmlIndexPlugin: esbuild.Plugin = {
name: 'htmlIndex',

View File

@ -59,7 +59,7 @@ export const createJsContext = ({ sourcegraphBaseUrl }: { sourcegraphBaseUrl: st
siteID: 'TestSiteID',
siteGQLID: 'TestGQLSiteID',
sourcegraphDotComMode: ENVIRONMENT_CONFIG.SOURCEGRAPHDOTCOM_MODE,
sourcegraphAppMode: false,
codyAppMode: false,
srcServeGitUrl: 'http://127.0.0.1:3434',
userAgentIsBot: false,
version: '0.0.0',

View File

@ -79,7 +79,7 @@ export const ENVIRONMENT_CONFIG = {
*/
ENTERPRISE: getEnvironmentBoolean('ENTERPRISE'),
SOURCEGRAPHDOTCOM_MODE: getEnvironmentBoolean('SOURCEGRAPHDOTCOM_MODE'),
SOURCEGRAPH_APP: getEnvironmentBoolean('SOURCEGRAPH_APP'),
CODY_APP: getEnvironmentBoolean('CODY_APP'),
// Is reporting to Sentry enabled.
ENABLE_SENTRY: getEnvironmentBoolean('ENABLE_SENTRY'),

View File

@ -82,7 +82,7 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
const { fuzzyFinder } = useExperimentalFeatures(features => ({
// enable fuzzy finder by default unless it's explicitly disabled in settings, or it's the Cody app
fuzzyFinder: features.fuzzyFinder ?? !props.isSourcegraphApp,
fuzzyFinder: features.fuzzyFinder ?? !props.isCodyApp,
}))
const isSetupWizardPage = location.pathname.startsWith(PageRoutes.SetupWizard)
@ -147,7 +147,7 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
return <Navigate replace={true} to={{ ...location, pathname: location.pathname.slice(0, -1) }} />
}
if (isSetupWizardPage && !!props.authenticatedUser?.siteAdmin && !props.isSourcegraphApp) {
if (isSetupWizardPage && !!props.authenticatedUser?.siteAdmin && !props.isCodyApp) {
return (
<Suspense
fallback={
@ -167,7 +167,7 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
// moment, we use mutable window.context object here.
// TODO remove window.context and use injected context store/props
if (
!props.isSourcegraphApp &&
!props.isCodyApp &&
window.context?.needsRepositoryConfiguration &&
!wasSetupWizardSkipped &&
props.authenticatedUser?.siteAdmin
@ -180,7 +180,7 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
// because this page is part of setup experience, and we should not interrupt
// rendering of this page even if setup hasn't been finished yet
if (
props.isSourcegraphApp &&
props.isCodyApp &&
!wasAppSetupFinished &&
!isAppSetupPage &&
!isAppAuthCallbackPage &&
@ -236,12 +236,12 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
/>
)}
<GlobalAlerts authenticatedUser={props.authenticatedUser} isSourcegraphApp={props.isSourcegraphApp} />
<GlobalAlerts authenticatedUser={props.authenticatedUser} isCodyApp={props.isCodyApp} />
{!isSiteInit &&
!isSignInOrUp &&
!props.isSourcegraphDotCom &&
!disableFeedbackSurvey &&
!props.isSourcegraphApp && <SurveyToast authenticatedUser={props.authenticatedUser} />}
!props.isCodyApp && <SurveyToast authenticatedUser={props.authenticatedUser} />}
{!isSiteInit && !isSignInOrUp && !isGetCodyPage && !isPostSignUpPage && (
<GlobalNavbar
{...props}
@ -260,7 +260,7 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
showFeedbackModal={showFeedbackModal}
/>
)}
{props.isSourcegraphApp && <StartupUpdateChecker />}
{props.isCodyApp && <StartupUpdateChecker />}
{needsSiteInit && !isSiteInit && <Navigate replace={true} to="/site-admin/init" />}
<ApplicationRoutes routes={props.routes} />
<GlobalContributions

View File

@ -216,7 +216,7 @@ export class LegacySourcegraphWebApp extends React.Component<StaticAppConfig, Le
fetchHighlightedFileLineRanges={this.fetchHighlightedFileLineRanges}
telemetryService={eventLogger}
isSourcegraphDotCom={window.context.sourcegraphDotComMode}
isSourcegraphApp={window.context.sourcegraphAppMode}
isCodyApp={window.context.codyAppMode}
isSearchContextSpecAvailable={isSearchContextSpecAvailable}
searchContextsEnabled={this.props.searchContextsEnabled}
getUserSearchContextNamespaces={getUserSearchContextNamespaces}

View File

@ -5,7 +5,7 @@ export function tauriInvoke(command: string): void {
}
/**
* Utility function to open the callback URL in Sourcegraph App. Used where
* Utility function to open the callback URL in Cody App. Used where
* window.open or target="_blank" cannot be used.
*/
export function tauriShellOpen(uri: string): void {

View File

@ -54,7 +54,7 @@ import styles from './CodyChatPage.module.scss'
interface CodyChatPageProps {
isSourcegraphDotCom: boolean
authenticatedUser: AuthenticatedUser | null
isSourcegraphApp: boolean
isCodyApp: boolean
context: Pick<SourcegraphContext, 'authProviders'>
}
@ -93,7 +93,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
authenticatedUser,
context,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
}) => {
const { pathname } = useLocation()
const navigate = useNavigate()
@ -102,7 +102,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
userID: authenticatedUser?.id,
onTranscriptHistoryLoad,
autoLoadTranscriptFromHistory: false,
autoLoadScopeWithRepositories: isSourcegraphApp,
autoLoadScopeWithRepositories: isCodyApp,
})
const {
initializeNewChat,
@ -160,7 +160,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
return (
<Page className={classNames('d-flex flex-column', styles.page)}>
<PageTitle title="Cody AI Chat" />
{!isSourcegraphDotCom && !isCTADismissed && !isSourcegraphApp && (
{!isSourcegraphDotCom && !isCTADismissed && !isCodyApp && (
<MarketingBlock
wrapperClassName="mb-5"
contentClassName={classNames(styles.ctaWrapper, styles.ctaContent)}
@ -200,7 +200,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
<>
Cody answers code questions and writes code for you by leveraging your entire codebase and the
code graph.
{!isSourcegraphDotCom && !isSourcegraphApp && isCTADismissed && (
{!isSourcegraphDotCom && !isCodyApp && isCTADismissed && (
<>
{' '}
<Link to="/help/cody#get-cody">Cody is more powerful in the IDE</Link>.
@ -214,7 +214,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
<PageHeader.Breadcrumb icon={CodyColorIcon}>
<div className="d-inline-flex align-items-center">
Cody Chat
{!isSourcegraphApp && (
{!isCodyApp && (
<Badge variant="info" className="ml-2">
Beta
</Badge>
@ -246,13 +246,13 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
)}
<MenuLink
as={Link}
to={isSourcegraphApp ? 'https://docs.sourcegraph.com/app' : '/help/cody'}
to={isCodyApp ? 'https://docs.sourcegraph.com/app' : '/help/cody'}
target="_blank"
rel="noopener"
>
<Icon aria-hidden={true} svgPath={mdiOpenInNew} /> Cody Docs & FAQ
</MenuLink>
{!isSourcegraphApp && authenticatedUser?.siteAdmin && (
{!isCodyApp && authenticatedUser?.siteAdmin && (
<MenuLink as={Link} to="/site-admin/cody">
<Icon aria-hidden={true} svgPath={mdiCogOutline} /> Cody Settings
</MenuLink>
@ -350,7 +350,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
))}
</div>
{isSourcegraphApp ? (
{isCodyApp ? (
<>
<div
className={classNames(
@ -380,7 +380,7 @@ export const CodyChatPage: React.FunctionComponent<CodyChatPageProps> = ({
</div>
<ChatUI
codyChatStore={codyChatStore}
isSourcegraphApp={true}
isCodyApp={true}
isCodyChatPage={true}
authenticatedUser={authenticatedUser}
/>

View File

@ -43,14 +43,14 @@ const onFeedbackSubmit = (feedback: string): void => eventLogger.log(`web:cody:f
interface IChatUIProps {
codyChatStore: CodyChatStore
isSourcegraphApp?: boolean
isCodyApp?: boolean
isCodyChatPage?: boolean
authenticatedUser: AuthenticatedUser | null
}
export const ChatUI: React.FC<IChatUIProps> = ({
codyChatStore,
isSourcegraphApp,
isCodyApp,
isCodyChatPage,
authenticatedUser,
}): JSX.Element => {
@ -95,7 +95,7 @@ export const ChatUI: React.FC<IChatUIProps> = ({
toggleIncludeInferredRepository,
toggleIncludeInferredFile,
fetchRepositoryNames,
isSourcegraphApp,
isCodyApp,
logTranscriptEvent,
transcriptHistory,
className: 'mt-2',
@ -107,7 +107,7 @@ export const ChatUI: React.FC<IChatUIProps> = ({
toggleIncludeInferredRepository,
toggleIncludeInferredFile,
fetchRepositoryNames,
isSourcegraphApp,
isCodyApp,
logTranscriptEvent,
transcriptHistory,
authenticatedUser,
@ -137,7 +137,7 @@ export const ChatUI: React.FC<IChatUIProps> = ({
setInputHistory={setInputHistory}
onSubmit={onSubmit}
submitButtonComponent={SubmitButton}
fileLinkComponent={isSourcegraphApp ? AppFileLink : FileLink}
fileLinkComponent={isCodyApp ? AppFileLink : FileLink}
className={styles.container}
transcriptItemClassName={styles.transcriptItem}
humanTranscriptItemClassName={styles.humanTranscriptItem}

View File

@ -29,7 +29,7 @@ export const GettingStarted: React.FC<
| 'toggleIncludeInferredFile'
| 'fetchRepositoryNames'
> & {
isSourcegraphApp?: boolean
isCodyApp?: boolean
isCodyChatPage?: boolean
submitInput: (input: string, submitType: 'user' | 'suggestion' | 'example') => void
authenticatedUser: AuthenticatedUser | null

View File

@ -22,7 +22,7 @@ export interface ScopeSelectorProps {
toggleIncludeInferredRepository: () => void
toggleIncludeInferredFile: () => void
fetchRepositoryNames: (count: number) => Promise<string[]>
isSourcegraphApp?: boolean
isCodyApp?: boolean
logTranscriptEvent: (eventLabel: string, eventProperties?: { [key: string]: any }) => void
transcriptHistory: TranscriptJSON[]
className?: string
@ -39,7 +39,7 @@ export const ScopeSelector: React.FC<ScopeSelectorProps> = React.memo(function S
toggleIncludeInferredRepository,
toggleIncludeInferredFile,
fetchRepositoryNames,
isSourcegraphApp,
isCodyApp,
logTranscriptEvent,
transcriptHistory,
className,
@ -116,13 +116,13 @@ export const ScopeSelector: React.FC<ScopeSelectorProps> = React.memo(function S
const resetScope = useCallback(async (): Promise<void> => {
logTranscriptEvent(EventName.CODY_CHAT_SCOPE_RESET)
if (!isSourcegraphApp) {
if (!isCodyApp) {
return setScope({ ...scope, repositories: [], includeInferredRepository: true, includeInferredFile: true })
}
const repositories = await fetchRepositoryNames(10)
return setScope({ ...scope, repositories, includeInferredRepository: true, includeInferredFile: true })
}, [scope, setScope, fetchRepositoryNames, isSourcegraphApp, logTranscriptEvent])
}, [scope, setScope, fetchRepositoryNames, isCodyApp, logTranscriptEvent])
return (
<>
@ -135,7 +135,7 @@ export const ScopeSelector: React.FC<ScopeSelectorProps> = React.memo(function S
inferredFilePath={activeEditor?.filePath || null}
additionalRepositories={additionalRepositories}
addRepository={addRepository}
resetScope={!isSourcegraphApp ? resetScope : null}
resetScope={!isCodyApp ? resetScope : null}
removeRepository={removeRepository}
toggleIncludeInferredRepository={toggleIncludeInferredRepository}
toggleIncludeInferredFile={toggleIncludeInferredFile}

View File

@ -2,7 +2,7 @@ export const isEmailVerificationNeededForCody = (): boolean =>
window.context?.codyRequiresVerifiedEmail && !window.context?.currentUser?.hasVerifiedEmail
export const isCodyEnabled = (): boolean => {
if (window.context?.sourcegraphAppMode) {
if (window.context?.codyAppMode) {
return true
}

View File

@ -33,7 +33,7 @@ export const Overview: Story = () => (
autoFocusForm={false}
externalServicesFromFile={false}
allowEditExternalServicesWithFile={false}
isSourcegraphApp={false}
isCodyApp={false}
/>
)}
</WebStory>
@ -52,7 +52,7 @@ export const OverviewWithBusinessLicense: Story = () => {
autoFocusForm={false}
externalServicesFromFile={false}
allowEditExternalServicesWithFile={false}
isSourcegraphApp={false}
isCodyApp={false}
/>
)}
</WebStory>
@ -70,7 +70,7 @@ export const AddConnectionBykind: Story = () => (
autoFocusForm={false}
externalServicesFromFile={false}
allowEditExternalServicesWithFile={false}
isSourcegraphApp={false}
isCodyApp={false}
/>
)}
</WebStory>

View File

@ -33,7 +33,7 @@ export interface AddExternalServicesPageProps extends TelemetryProps {
externalServicesFromFile: boolean
allowEditExternalServicesWithFile: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
/** For testing only. */
autoFocusForm?: boolean
@ -49,7 +49,7 @@ export const AddExternalServicesPage: FC<AddExternalServicesPageProps> = ({
autoFocusForm,
externalServicesFromFile,
allowEditExternalServicesWithFile,
isSourcegraphApp,
isCodyApp,
}) => {
const { search } = useLocation()
const [hasDismissedPrivacyWarning, setHasDismissedPrivacyWarning] = useTemporarySetting(
@ -109,7 +109,7 @@ export const AddExternalServicesPage: FC<AddExternalServicesPageProps> = ({
className="mb-3"
/>
{isSourcegraphApp && (
{isCodyApp && (
<LimitedAccessBanner
storageKey="app.manage-repositories-with-new-settings"
badgeText="Repositories"

View File

@ -46,7 +46,7 @@ export const ListOfExternalServices: Story = () => (
telemetryService={NOOP_TELEMETRY_SERVICE}
externalServicesFromFile={false}
allowEditExternalServicesWithFile={false}
isSourcegraphApp={false}
isCodyApp={false}
/>
</MockedTestProvider>
)

View File

@ -25,7 +25,7 @@ import { ExternalServiceNode } from './ExternalServiceNode'
interface Props extends TelemetryProps {
externalServicesFromFile: boolean
allowEditExternalServicesWithFile: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
/**
@ -35,7 +35,7 @@ export const ExternalServicesPage: FC<Props> = ({
telemetryService,
externalServicesFromFile,
allowEditExternalServicesWithFile,
isSourcegraphApp,
isCodyApp,
}) => {
useEffect(() => {
telemetryService.logViewEvent('SiteAdminExternalServices')
@ -64,7 +64,7 @@ export const ExternalServicesPage: FC<Props> = ({
headingElement="h2"
actions={
<>
{isSourcegraphApp && (
{isCodyApp && (
<ButtonLink className="mr-2" to="/setup" variant="secondary" as={Link}>
<Icon aria-hidden={true} svgPath={mdiPlus} /> Add local code
</ButtonLink>

View File

@ -28,7 +28,7 @@ const hardcodedConfig = {
export const windowContextConfig = {
isSourcegraphDotCom: false,
isSourcegraphApp: false,
isCodyApp: false,
needsRepositoryConfiguration: false,
batchChangesWebhookLogsEnabled: true,
batchChangesEnabled: true,

View File

@ -55,7 +55,7 @@ const injectedValuesConfig = {
repoHeaderActionButtons: enterpriseRepoHeaderActionButtons,
repoSettingsAreaRoutes: enterpriseRepoSettingsAreaRoutes,
repoSettingsSidebarGroups: enterpriseRepoSettingsSidebarGroups,
routes: windowContextConfig.isSourcegraphApp ? APP_ROUTES : enterpriseRoutes,
routes: windowContextConfig.isCodyApp ? APP_ROUTES : enterpriseRoutes,
/**
* Per feature injections

View File

@ -95,7 +95,7 @@ const RemoteRepositoriesTab: FC<TelemetryProps> = ({ telemetryService }) => (
description={false}
progressBar={false}
telemetryService={telemetryService}
isSourcegraphApp={true}
isCodyApp={true}
/>
</div>
)

View File

@ -109,7 +109,7 @@ export const AppSetupWizard: FC<TelemetryProps> = ({ telemetryService }) => {
<SetupStepsContent
telemetryService={telemetryService}
className={styles.content}
isSourcegraphApp={true}
isCodyApp={true}
/>
<FooterWidgetPortal className={styles.footer} />

View File

@ -15,7 +15,7 @@ import styles from './CodeMonitoringGettingStarted.module.scss'
interface CodeMonitoringGettingStartedProps {
authenticatedUser: AuthenticatedUser | null
isSourcegraphApp: boolean
isCodyApp: boolean
}
interface ExampleCodeMonitor {
@ -67,7 +67,7 @@ const createCodeMonitorUrl = (example: ExampleCodeMonitor): string => {
export const CodeMonitoringGettingStarted: React.FunctionComponent<
React.PropsWithChildren<CodeMonitoringGettingStartedProps>
> = ({ authenticatedUser, isSourcegraphApp }) => {
> = ({ authenticatedUser, isCodyApp }) => {
const isLightTheme = useIsLightTheme()
const isSourcegraphDotCom: boolean = window.context?.sourcegraphDotComMode || false
const assetsRoot = window.context?.assetsRoot || ''
@ -77,7 +77,7 @@ export const CodeMonitoringGettingStarted: React.FunctionComponent<
}, [])
let ctaBannerUrl = 'https://about.sourcegraph.com/get-started?t=enterprise'
if (isSourcegraphApp) {
if (isCodyApp) {
ctaBannerUrl = addSourcegraphAppOutboundUrlParameters(ctaBannerUrl, 'monitoring')
}
@ -101,7 +101,7 @@ export const CodeMonitoringGettingStarted: React.FunctionComponent<
<li>Identify when bad patterns are committed </li>
<li>Identify use of deprecated libraries</li>
</ul>
{authenticatedUser && !isSourcegraphApp && (
{authenticatedUser && !isCodyApp && (
<Button to="/code-monitoring/new" className={styles.createButton} variant="primary" as={Link}>
<Icon aria-hidden={true} className="mr-2" svgPath={mdiPlus} />
Create a code monitor
@ -111,7 +111,7 @@ export const CodeMonitoringGettingStarted: React.FunctionComponent<
</Card>
{isSourcegraphDotCom ||
(isSourcegraphApp && (
(isCodyApp && (
<CallToActionBanner variant="filled">
To monitor changes across your team's private repositories,{' '}
<Link
@ -136,7 +136,7 @@ export const CodeMonitoringGettingStarted: React.FunctionComponent<
<CardBody className="d-flex flex-column">
<H3>{monitor.title}</H3>
<Text className="text-muted flex-grow-1">{monitor.description}</Text>
{!isSourcegraphApp && (
{!isCodyApp && (
<Link to={createCodeMonitorUrl(monitor)} onClick={logExampleMonitorClicked}>
Create copy of monitor
</Link>

View File

@ -64,7 +64,7 @@ const additionalProps = {
} as AuthenticatedUser,
toggleCodeMonitorEnabled: sinon.fake(),
settingsCascade: EMPTY_SETTINGS_CASCADE,
isSourcegraphApp: false,
isCodyApp: false,
}
const additionalPropsShortList = {

View File

@ -29,7 +29,7 @@ const additionalProps = {
toggleCodeMonitorEnabled: sinon.spy((id: string, enabled: boolean) => of({ id: 'test', enabled: true })),
settingsCascade: EMPTY_SETTINGS_CASCADE,
isLightTheme: false,
isSourcegraphApp: false,
isCodyApp: false,
}
const generateMockFetchMonitors =

View File

@ -37,7 +37,7 @@ export interface CodeMonitoringPageProps extends SettingsCascadeProps<Settings>
fetchUserCodeMonitors?: typeof _fetchUserCodeMonitors
fetchCodeMonitors?: typeof _fetchCodeMonitors
toggleCodeMonitorEnabled?: typeof _toggleCodeMonitorEnabled
isSourcegraphApp: boolean
isCodyApp: boolean
// For testing purposes only
testForceTab?: 'list' | 'getting-started' | 'logs'
}
@ -48,7 +48,7 @@ export const CodeMonitoringPage: React.FunctionComponent<React.PropsWithChildren
fetchCodeMonitors = _fetchCodeMonitors,
toggleCodeMonitorEnabled = _toggleCodeMonitorEnabled,
testForceTab,
isSourcegraphApp,
isCodyApp,
}) => {
const userHasCodeMonitors = useObservable(
useMemo(
@ -106,7 +106,7 @@ export const CodeMonitoringPage: React.FunctionComponent<React.PropsWithChildren
const showList = userHasCodeMonitors !== undefined && !isErrorLike(userHasCodeMonitors) && currentTab === 'list'
const showLogsTab =
useExperimentalFeatures(features => features.showCodeMonitoringLogs) && authenticatedUser && !isSourcegraphApp
useExperimentalFeatures(features => features.showCodeMonitoringLogs) && authenticatedUser && !isCodyApp
return (
<div className="code-monitoring-page" data-testid="code-monitoring-page">
@ -114,7 +114,7 @@ export const CodeMonitoringPage: React.FunctionComponent<React.PropsWithChildren
<PageHeader
actions={
authenticatedUser &&
!isSourcegraphApp && (
!isCodyApp && (
<Button to="/code-monitoring/new" variant="primary" as={Link}>
<Icon aria-hidden={true} svgPath={mdiPlus} /> Create a code monitor
</Button>
@ -136,7 +136,7 @@ export const CodeMonitoringPage: React.FunctionComponent<React.PropsWithChildren
<div className="d-flex flex-column">
<div className="code-monitoring-page-tabs mb-4">
<div className="nav nav-tabs">
{!isSourcegraphApp && (
{!isCodyApp && (
<div className="nav-item">
<Link
to=""
@ -190,10 +190,7 @@ export const CodeMonitoringPage: React.FunctionComponent<React.PropsWithChildren
</div>
{currentTab === 'getting-started' && (
<CodeMonitoringGettingStarted
authenticatedUser={authenticatedUser}
isSourcegraphApp={isSourcegraphApp}
/>
<CodeMonitoringGettingStarted authenticatedUser={authenticatedUser} isCodyApp={isCodyApp} />
)}
{currentTab === 'logs' && <CodeMonitoringLogs />}

View File

@ -13,7 +13,7 @@ import { Page } from '../../../components/Page'
interface Props extends TelemetryProps, PlatformContextProps, SettingsCascadeProps {
authenticatedUser: AuthenticatedUser | null
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
const CodeMonitoringPage = lazyComponent(() => import('../CodeMonitoringPage'), 'CodeMonitoringPage')

View File

@ -113,7 +113,7 @@ interface RepositoryListProps {
}
const RepositoryList: FunctionComponent<RepositoryListProps> = ({ repositoryPatterns }) => {
const isSourcegraphApp = window.context?.sourcegraphAppMode
const isCodyApp = window.context?.codyAppMode
const [repositoryFetchLimit, setRepositoryFetchLimit] = useState(DEFAULT_FETCH_LIMIT)
const {
previewResult: preview,
@ -188,7 +188,7 @@ const RepositoryList: FunctionComponent<RepositoryListProps> = ({ repositoryPatt
{preview.repositories.map(repo => (
<li key={repo.name} className="list-group-item">
{repo.externalRepository && <ExternalRepositoryIcon externalRepo={repo.externalRepository} />}
{isSourcegraphApp ? (
{isCodyApp ? (
<>{repo.name}</>
) : (
<Link to={repo.url} target="_blank" rel="noopener noreferrer">

View File

@ -6,6 +6,6 @@ export const enterpriseNamespaceAreaHeaderNavItems: readonly NamespaceAreaNavIte
to: '/batch-changes',
label: 'Batch Changes',
icon: BatchChangesIconNamespaceNav,
condition: ({ batchChangesEnabled, isSourcegraphApp }) => batchChangesEnabled && !isSourcegraphApp,
condition: ({ batchChangesEnabled, isCodyApp }) => batchChangesEnabled && !isCodyApp,
},
]

View File

@ -47,7 +47,7 @@ export const enterpriseRoutes: RouteObject[] = [
element: (
<LegacyRoute
render={props => <AppSetup telemetryService={props.telemetryService} />}
condition={({ isSourcegraphApp }) => isSourcegraphApp}
condition={({ isCodyApp }) => isCodyApp}
/>
),
},
@ -132,12 +132,7 @@ export const enterpriseRoutes: RouteObject[] = [
},
{
path: EnterprisePageRoutes.AppAuthCallback,
element: (
<LegacyRoute
render={() => <AppAuthCallbackPage />}
condition={({ isSourcegraphApp }) => isSourcegraphApp}
/>
),
element: <LegacyRoute render={() => <AppAuthCallbackPage />} condition={({ isCodyApp }) => isCodyApp} />,
},
...routes,
]

View File

@ -27,7 +27,7 @@ export const AdminSidebarItems: Story = () => (
<WebStory>
{webProps => (
<Grid columnCount={5}>
<Code>isSourcegraphApp=true</Code>
<Code>isCodyApp=true</Code>
<Code>default</Code>
<Code>isSourcegraphDotCom=true</Code>
<Code>batchChangesEnabled=false</Code>
@ -36,7 +36,7 @@ export const AdminSidebarItems: Story = () => (
{...webProps}
groups={enterpriseSiteAdminSidebarGroups}
isSourcegraphDotCom={false}
isSourcegraphApp={true}
isCodyApp={true}
batchChangesEnabled={true}
batchChangesExecutionEnabled={true}
batchChangesWebhookLogsEnabled={true}
@ -47,7 +47,7 @@ export const AdminSidebarItems: Story = () => (
{...webProps}
groups={enterpriseSiteAdminSidebarGroups}
isSourcegraphDotCom={false}
isSourcegraphApp={false}
isCodyApp={false}
batchChangesEnabled={true}
batchChangesExecutionEnabled={true}
batchChangesWebhookLogsEnabled={true}
@ -58,7 +58,7 @@ export const AdminSidebarItems: Story = () => (
{...webProps}
groups={enterpriseSiteAdminSidebarGroups}
isSourcegraphDotCom={true}
isSourcegraphApp={false}
isCodyApp={false}
batchChangesEnabled={true}
batchChangesExecutionEnabled={true}
batchChangesWebhookLogsEnabled={true}
@ -69,7 +69,7 @@ export const AdminSidebarItems: Story = () => (
{...webProps}
groups={enterpriseSiteAdminSidebarGroups}
isSourcegraphDotCom={false}
isSourcegraphApp={false}
isCodyApp={false}
batchChangesEnabled={false}
batchChangesExecutionEnabled={false}
batchChangesWebhookLogsEnabled={false}
@ -80,7 +80,7 @@ export const AdminSidebarItems: Story = () => (
{...webProps}
groups={enterpriseSiteAdminSidebarGroups}
isSourcegraphDotCom={false}
isSourcegraphApp={false}
isCodyApp={false}
batchChangesEnabled={true}
batchChangesExecutionEnabled={true}
batchChangesWebhookLogsEnabled={true}

View File

@ -24,7 +24,7 @@ import styles from './RepoEmbeddingJobNode.module.scss'
interface RepoEmbeddingJobNodeProps extends RepoEmbeddingJobFields {
onCancel: (id: string) => void
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const RepoEmbeddingJobNode: FC<RepoEmbeddingJobNodeProps> = ({
@ -39,7 +39,7 @@ export const RepoEmbeddingJobNode: FC<RepoEmbeddingJobNodeProps> = ({
failureMessage,
stats,
onCancel,
isSourcegraphApp,
isCodyApp,
}) => (
<li className="list-group-item p-2">
<div className="d-flex justify-content-between">
@ -49,7 +49,7 @@ export const RepoEmbeddingJobNode: FC<RepoEmbeddingJobNodeProps> = ({
</div>
<div className="d-flex flex-column ml-3">
{repo && revision ? (
isSourcegraphApp ? (
isCodyApp ? (
<>
{repo.name}@{revision.abbreviatedOID}
</>

View File

@ -73,7 +73,7 @@ const enumToFilterValues = <T extends string>(enumeration: { [key in T]: T }): F
}
export const SiteAdminCodyPage: FC<SiteAdminCodyPageProps> = ({ telemetryService }) => {
const isSourcegraphApp = window.context?.sourcegraphAppMode
const isCodyApp = window.context?.codyAppMode
useEffect(() => {
telemetryService.logPageView('SiteAdminCodyPage')
@ -231,12 +231,7 @@ export const SiteAdminCodyPage: FC<SiteAdminCodyPageProps> = ({ telemetryService
{loading && !connection && <ConnectionLoading />}
<ConnectionList as="ul" className="list-group" aria-label="Repository embeddings jobs">
{connection?.nodes?.map(node => (
<RepoEmbeddingJobNode
key={node.id}
{...node}
onCancel={onCancel}
isSourcegraphApp={isSourcegraphApp}
/>
<RepoEmbeddingJobNode key={node.id} {...node} onCancel={onCancel} isCodyApp={isCodyApp} />
))}
</ConnectionList>
{connection && (

View File

@ -23,17 +23,17 @@ const configurationGroup: SiteAdminSideBarGroup = {
label: 'License',
to: '/site-admin/license',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Incoming webhooks',
to: '/site-admin/webhooks/incoming',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Outgoing webhooks',
to: '/site-admin/webhooks/outgoing',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
],
}
@ -45,7 +45,7 @@ const maintenanceGroup: SiteAdminSideBarGroup = {
{
label: 'Code Insights jobs',
to: '/site-admin/code-insights-jobs',
condition: ({ isSourcegraphApp, codeInsightsEnabled }) => !isSourcegraphApp && codeInsightsEnabled,
condition: ({ isCodyApp, codeInsightsEnabled }) => !isCodyApp && codeInsightsEnabled,
},
],
}
@ -85,7 +85,7 @@ export const batchChangesGroup: SiteAdminSideBarGroup = {
condition: props => props.batchChangesExecutionEnabled,
},
],
condition: ({ batchChangesEnabled, isSourcegraphApp }) => batchChangesEnabled && !isSourcegraphApp,
condition: ({ batchChangesEnabled, isCodyApp }) => batchChangesEnabled && !isCodyApp,
}
const businessGroup: SiteAdminSideBarGroup = {
@ -112,7 +112,7 @@ const businessGroup: SiteAdminSideBarGroup = {
const codeIntelGroup: SiteAdminSideBarGroup = {
header: { label: 'Code graph', icon: BrainIcon },
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
items: [
{
to: '/site-admin/code-graph/dashboard',
@ -138,7 +138,7 @@ const codeIntelGroup: SiteAdminSideBarGroup = {
{
label: 'Ownership signals',
to: '/site-admin/own-signal-page',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
],
}

View File

@ -35,14 +35,14 @@ export const enterpriseUserAreaRoutes: readonly UserAreaRoute[] = [
...userAreaRoutes,
...enterpriseNamespaceAreaRoutes,
// Sourcegraph app specific route (cody/app settings page)
// Cody app specific route (cody/app settings page)
// This route won't be available for any non-app deploy types.
// See userAreaHeaderNavItems in client/web/src/enterprise/user/navitems.ts
// for more context on user settings page.
{
path: 'app-settings/*',
render: props => <AppSettingsArea telemetryService={props.telemetryService} />,
condition: context => context.isSourcegraphApp,
condition: context => context.isCodyApp,
},
// Redirect from previous /users/:username/subscriptions -> /users/:username/settings/subscriptions.

View File

@ -27,7 +27,7 @@ export const enterpriseUserSettingsSideBarItems: UserSettingsSidebarItems = [
label: 'Permissions',
to: '/permissions',
exact: true,
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
to: '/event-log',

View File

@ -24,7 +24,7 @@ import styles from './GlobalAlerts.module.scss'
interface Props {
authenticatedUser: AuthenticatedUser | null
isSourcegraphApp: boolean
isCodyApp: boolean
}
// NOTE: The name of the query is also added in the refreshSiteFlags() function
@ -44,7 +44,7 @@ const QUERY = gql`
/**
* Fetches and displays relevant global alerts at the top of the page
*/
export const GlobalAlerts: React.FunctionComponent<Props> = ({ authenticatedUser, isSourcegraphApp }) => {
export const GlobalAlerts: React.FunctionComponent<Props> = ({ authenticatedUser, isCodyApp }) => {
const settings = useSettings()
const { data } = useQuery<GlobalAlertsSiteFlagsResult, GlobalAlertsSiteFlagsVariables>(QUERY, {
fetchPolicy: 'cache-and-network',
@ -58,7 +58,7 @@ export const GlobalAlerts: React.FunctionComponent<Props> = ({ authenticatedUser
<div className={classNames('test-global-alert', styles.globalAlerts)}>
{siteFlagsValue && (
<>
{siteFlagsValue?.externalServicesCounts.remoteExternalServicesCount === 0 && !isSourcegraphApp && (
{siteFlagsValue?.externalServicesCounts.remoteExternalServicesCount === 0 && !isCodyApp && (
<NeedsRepositoryConfigurationAlert className={styles.alert} />
)}
{siteFlagsValue.freeUsersExceeded && (
@ -113,8 +113,8 @@ export const GlobalAlerts: React.FunctionComponent<Props> = ({ authenticatedUser
.
</DismissibleAlert>
)}
{/* Sourcegraph app creates a global policy during setup but this alert is flashing during connection to dotcom account */}
{showNoEmbeddingPoliciesAlert && authenticatedUser?.siteAdmin && !isSourcegraphApp && (
{/* Cody app creates a global policy during setup but this alert is flashing during connection to dotcom account */}
{showNoEmbeddingPoliciesAlert && authenticatedUser?.siteAdmin && !isCodyApp && (
<DismissibleAlert
key="no-embeddings-policies-alert"
partialStorageKey="no-embeddings-policies-alert"
@ -131,11 +131,9 @@ export const GlobalAlerts: React.FunctionComponent<Props> = ({ authenticatedUser
)}
<Notices alertClassName={styles.alert} location="top" />
{/* The link in the notice doesn't work in the Sourcegraph app since it's rendered by Markdown,
{/* The link in the notice doesn't work in the Cody app since it's rendered by Markdown,
so don't show it there for now. */}
{!isSourcegraphApp && (
<VerifyEmailNotices authenticatedUser={authenticatedUser} alertClassName={styles.alert} />
)}
{!isCodyApp && <VerifyEmailNotices authenticatedUser={authenticatedUser} alertClassName={styles.alert} />}
</div>
)
}

View File

@ -56,7 +56,7 @@ export const createJsContext = ({ sourcegraphBaseUrl }: { sourcegraphBaseUrl: st
siteID,
siteGQLID,
sourcegraphDotComMode: false,
sourcegraphAppMode: false,
codyAppMode: false,
userAgentIsBot: false,
version: '0.0.0',
xhrHeaders: {},

View File

@ -115,7 +115,7 @@ export interface SourcegraphContext extends Pick<Required<SiteConfiguration>, 'e
debug: boolean
sourcegraphDotComMode: boolean
sourcegraphAppMode: boolean
codyAppMode: boolean
/**
* siteID is the identifier of the Sourcegraph site.
@ -203,7 +203,7 @@ export interface SourcegraphContext extends Pick<Required<SiteConfiguration>, 'e
/**
* Local git URL, it's used only to create a local external service
* in Sourcegraph App.
* in Cody App.
*/
srcServeGitUrl: string

View File

@ -17,7 +17,7 @@ export interface NamespaceAreaRoute extends RouteV6Descriptor<NamespaceAreaConte
interface NavItemDescriptorContext extends BatchChangesProps {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
export interface NamespaceAreaNavItem extends NavItemWithIconDescriptor<NavItemDescriptorContext> {}

View File

@ -15,7 +15,7 @@ import { GlobalNavbar, type GlobalNavbarProps } from './GlobalNavbar'
const defaultProps: GlobalNavbarProps = {
isSourcegraphDotCom: false,
isSourcegraphApp: false,
isCodyApp: false,
settingsCascade: {
final: null,
subjects: null,

View File

@ -16,7 +16,7 @@ jest.mock('../components/branding/BrandLogo', () => ({ BrandLogo: 'BrandLogo' })
const PROPS: React.ComponentProps<typeof GlobalNavbar> = {
authenticatedUser: null,
isSourcegraphDotCom: false,
isSourcegraphApp: false,
isCodyApp: false,
platformContext: {} as any,
settingsCascade: NOOP_SETTINGS_CASCADE,
batchChangesEnabled: false,

View File

@ -61,7 +61,7 @@ export interface GlobalNavbarProps
OwnConfigProps {
authenticatedUser: AuthenticatedUser | null
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
showSearchBox: boolean
routes: RouteObject[]
@ -125,7 +125,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
showSearchBox,
branding,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
isRepositoryRelatedPage,
codeInsightsEnabled,
sentinelEnabled,
@ -148,16 +148,16 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
// but should not show in the navbar. Users can still
// access this feature via the context dropdown.
const showSearchContext = searchContextsEnabled && !isSourcegraphDotCom
const showCodeMonitoring = codeMonitoringEnabled && !isSourcegraphApp && !isSourcegraphDotCom
const showSearchNotebook = notebooksEnabled && !isSourcegraphApp && !isSourcegraphDotCom
const isLicensed = !!window.context?.licenseInfo || isSourcegraphApp // Assume licensed when running as a native app
const showBatchChanges = props.batchChangesEnabled && isLicensed && !isSourcegraphApp && !isSourcegraphDotCom
const showCodeMonitoring = codeMonitoringEnabled && !isCodyApp && !isSourcegraphDotCom
const showSearchNotebook = notebooksEnabled && !isCodyApp && !isSourcegraphDotCom
const isLicensed = !!window.context?.licenseInfo || isCodyApp // Assume licensed when running as a native app
const showBatchChanges = props.batchChangesEnabled && isLicensed && !isCodyApp && !isSourcegraphDotCom
const [codySearchEnabled] = useFeatureFlag('cody-web-search')
const [isSentinelEnabled] = useFeatureFlag('sentinel')
// TODO: Include isSourcegraphDotCom in subsequent PR
// const showSentinel = sentinelEnabled && isSourcegraphDotCom && props.authenticatedUser?.siteAdmin
const showSentinel = isSentinelEnabled && props.authenticatedUser?.siteAdmin && !isSourcegraphApp
const showSentinel = isSentinelEnabled && props.authenticatedUser?.siteAdmin && !isCodyApp
useEffect(() => {
// On a non-search related page or non-repo page, we clear the query in
@ -173,7 +173,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
const navLinkVariant = useCalculatedNavLinkVariant(navbarReference, props.authenticatedUser)
// CodeInsightsEnabled props controls insights appearance over OSS and Enterprise version
const codeInsights = codeInsightsEnabled && !isSourcegraphApp && !isSourcegraphDotCom
const codeInsights = codeInsightsEnabled && !isCodyApp && !isSourcegraphDotCom
const searchNavBarItems = useMemo(() => {
const items: (NavDropdownItem | false)[] = [
@ -208,7 +208,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
<NavBar
ref={navbarReference}
logo={
!isSourcegraphApp && (
!isCodyApp && (
<BrandLogo
branding={branding}
isLightTheme={isLightTheme}
@ -219,7 +219,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
}
>
<NavGroup>
{!isSourcegraphApp &&
{!isCodyApp &&
(searchNavBarItems.length > 0 ? (
<NavDropdown
toggleItem={{
@ -278,7 +278,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
</NavLink>
</NavItem>
)}
{isSourcegraphApp && (
{isCodyApp && (
<NavDropdown
routeMatch="something-that-never-matches"
toggleItem={{
@ -311,7 +311,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
)}
</NavGroup>
<NavActions>
{isSourcegraphApp && <UpdateGlobalNav />}
{isCodyApp && <UpdateGlobalNav />}
{props.authenticatedUser?.siteAdmin && <AccessRequestsGlobalNavItem />}
{isSourcegraphDotCom && (
<NavAction>
@ -325,9 +325,9 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
</NavAction>
)}
{fuzzyFinderNavbar && FuzzyFinderNavItem(props.setFuzzyFinderIsVisible)}
{props.authenticatedUser?.siteAdmin && !isSourcegraphApp && (
{props.authenticatedUser?.siteAdmin && !isCodyApp && (
<NavAction>
<StatusMessagesNavItem isSourcegraphApp={isSourcegraphApp} />
<StatusMessagesNavItem isCodyApp={isCodyApp} />
</NavAction>
)}
{!props.authenticatedUser ? (
@ -361,7 +361,7 @@ export const GlobalNavbar: React.FunctionComponent<React.PropsWithChildren<Globa
{...props}
authenticatedUser={props.authenticatedUser}
isSourcegraphDotCom={isSourcegraphDotCom}
isSourcegraphApp={isSourcegraphApp}
isCodyApp={isCodyApp}
showFeedbackModal={showFeedbackModal}
/>
</NavAction>

View File

@ -172,7 +172,7 @@ const STATUS_MESSAGES_POLL_INTERVAL = 10000
interface Props {
disablePolling?: boolean
isSourcegraphApp?: boolean
isCodyApp?: boolean
}
/**
* Displays a status icon in the navbar reflecting the completion of backend
@ -273,7 +273,7 @@ export const StatusMessagesNavItem: React.FunctionComponent<React.PropsWithChild
key="no-repositories"
title="No repositories"
message="Connect a code host to connect repositories to Sourcegraph."
linkTo={props.isSourcegraphApp ? '/user/app-settings/local-repositories' : '/setup'}
linkTo={props.isCodyApp ? '/user/app-settings/local-repositories' : '/setup'}
linkText="Setup code hosts"
linkOnClick={toggleIsOpen}
entryType="info"
@ -342,7 +342,7 @@ export const StatusMessagesNavItem: React.FunctionComponent<React.PropsWithChild
})}
</>
)
}, [data, props.isSourcegraphApp])
}, [data, props.isCodyApp])
return (
<Popover isOpen={isOpen} onOpenChange={event => setIsOpen(event.isOpen)}>

View File

@ -64,7 +64,7 @@ const authenticatedUser: UserNavItemProps['authenticatedUser'] = {
const commonProps = (props: Args): UserNavItemProps => ({
authenticatedUser,
isSourcegraphDotCom: props.isSourcegraphDotCom,
isSourcegraphApp: false,
isCodyApp: false,
showKeyboardShortcutsHelp: () => undefined,
showFeedbackModal: () => undefined,
telemetryService: NOOP_TELEMETRY_SERVICE,

View File

@ -57,7 +57,7 @@ describe('UserNavItem', () => {
showKeyboardShortcutsHelp={() => undefined}
authenticatedUser={USER}
isSourcegraphDotCom={true}
isSourcegraphApp={false}
isCodyApp={false}
showFeedbackModal={() => undefined}
telemetryService={NOOP_TELEMETRY_SERVICE}
/>
@ -74,7 +74,7 @@ describe('UserNavItem', () => {
showKeyboardShortcutsHelp={() => undefined}
authenticatedUser={USER}
isSourcegraphDotCom={true}
isSourcegraphApp={false}
isCodyApp={false}
showFeedbackModal={() => undefined}
telemetryService={NOOP_TELEMETRY_SERVICE}
/>

View File

@ -43,7 +43,7 @@ type MinimalAuthenticatedUser = Pick<
export interface UserNavItemProps extends TelemetryProps {
authenticatedUser: MinimalAuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
menuButtonRef?: React.Ref<HTMLButtonElement>
showFeedbackModal: () => void
showKeyboardShortcutsHelp: () => void
@ -57,7 +57,7 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
const {
authenticatedUser,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
menuButtonRef,
showFeedbackModal,
showKeyboardShortcutsHelp,
@ -114,7 +114,7 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
>
<div className="position-relative">
<div className="align-items-center d-flex">
{isSourcegraphApp ? (
{isCodyApp ? (
<Icon svgPath={mdiCogOutline} aria-hidden={true} />
) : (
<UserAvatar user={authenticatedUser} className={styles.avatar} />
@ -129,7 +129,7 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
className={styles.dropdownMenu}
aria-label="User. Open menu"
>
{!isSourcegraphApp ? (
{!isCodyApp ? (
<>
<MenuHeader className={styles.dropdownHeader}>
Signed in as <strong>@{authenticatedUser.username}</strong>
@ -137,19 +137,16 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
<MenuDivider className={styles.dropdownDivider} />
</>
) : null}
<MenuLink
as={Link}
to={isSourcegraphApp ? '/user/app-settings' : authenticatedUser.settingsURL!}
>
<MenuLink as={Link} to={isCodyApp ? '/user/app-settings' : authenticatedUser.settingsURL!}>
Settings
</MenuLink>
{!isSourcegraphApp && (
{!isCodyApp && (
<MenuLink as={Link} to={`/users/${props.authenticatedUser.username}/searches`}>
Saved searches
</MenuLink>
)}
{isSourcegraphApp && <AppUserConnectDotComAccount />}
{!isSourcegraphDotCom && !isSourcegraphApp && (
{isCodyApp && <AppUserConnectDotComAccount />}
{!isSourcegraphDotCom && !isCodyApp && (
<MenuLink as={Link} to="/teams">
Teams
</MenuLink>
@ -187,7 +184,7 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
</div>
)}
</div>
{!isSourcegraphApp && searchQueryInputFeature === 'experimental' && (
{!isCodyApp && searchQueryInputFeature === 'experimental' && (
<div className="px-2 py-1">
<div className="d-flex align-items-center justify-content-between">
<div className="mr-2">
@ -217,7 +214,7 @@ export const UserNavItem: FC<UserNavItemProps> = props => {
)}
</>
)}
{!isSourcegraphApp && (
{!isCodyApp && (
<>
<MenuDivider className={styles.dropdownDivider} />
{authenticatedUser.siteAdmin && (

View File

@ -31,7 +31,7 @@ export interface GlobalNotebooksAreaProps
OwnConfigProps {
authenticatedUser: AuthenticatedUser | null
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
fetchHighlightedFileLineRanges: (parameters: FetchFileParameters, force?: boolean) => Observable<string[][]>
}
/**

View File

@ -60,7 +60,7 @@ export const NotebooksGettingStartedTab: React.FunctionComponent<
const [, setHasSeenGettingStartedTab] = useTemporarySetting('search.notebooks.gettingStartedTabSeen', false)
const isSourcegraphDotCom: boolean = window.context?.sourcegraphDotComMode || false
const isSourcegraphApp: boolean = window.context?.sourcegraphAppMode || false
const isCodyApp: boolean = window.context?.codyAppMode || false
useEffect(() => {
setHasSeenGettingStartedTab(true)
@ -72,7 +72,7 @@ export const NotebooksGettingStartedTab: React.FunctionComponent<
const isLightTheme = useIsLightTheme()
const wrapOutboundLink = (url: string): string => {
if (isSourcegraphApp) {
if (isCodyApp) {
return addSourcegraphAppOutboundUrlParameters(url)
}
return url

View File

@ -33,7 +33,7 @@ export interface Props
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
/**

View File

@ -103,7 +103,7 @@ export interface OrgAreaProps
*/
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
location: H.Location
navigate: NavigateFunction
@ -138,7 +138,7 @@ export interface OrgAreaRouteContext
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
orgSettingsSideBarItems: OrgSettingsSidebarItems
orgSettingsAreaRoutes: readonly OrgSettingsAreaRoute[]
@ -239,7 +239,7 @@ export class OrgArea extends React.Component<OrgAreaProps> {
namespace: this.state.orgOrError,
telemetryService: this.props.telemetryService,
isSourcegraphDotCom: this.props.isSourcegraphDotCom,
isSourcegraphApp: this.props.isSourcegraphApp,
isCodyApp: this.props.isCodyApp,
batchChangesEnabled: this.props.batchChangesEnabled,
batchChangesExecutionEnabled: this.props.batchChangesExecutionEnabled,
batchChangesWebhookLogsEnabled: this.props.batchChangesWebhookLogsEnabled,

View File

@ -12,7 +12,7 @@ import type { OrgAreaRouteContext } from './OrgArea'
interface Props extends OrgAreaRouteContext {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
navItems: readonly OrgAreaHeaderNavItem[]
className?: string
}
@ -24,7 +24,7 @@ export interface OrgSummary {
export interface OrgAreaHeaderContext extends BatchChangesProps, Pick<Props, 'org'> {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
export interface OrgAreaHeaderNavItem extends NavItemWithIconDescriptor<OrgAreaHeaderContext> {}
@ -40,7 +40,7 @@ export const OrgHeader: React.FunctionComponent<React.PropsWithChildren<Props>>
navItems,
className = '',
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
}) => {
const context: OrgAreaHeaderContext = {
batchChangesEnabled,
@ -48,7 +48,7 @@ export const OrgHeader: React.FunctionComponent<React.PropsWithChildren<Props>>
batchChangesWebhookLogsEnabled,
org,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
}
const url = `/organizations/${org.name}`

View File

@ -114,7 +114,7 @@ export const SetupWizard: FC<SetupWizardProps> = props => {
<SetupStepsContent
contentContainerClass={styles.contentContainer}
telemetryService={telemetryService}
isSourcegraphApp={false}
isCodyApp={false}
/>
</div>

View File

@ -25,7 +25,7 @@ interface RemoteRepositoriesStepProps extends TelemetryProps, HTMLAttributes<HTM
baseURL: string
description?: boolean
progressBar?: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const RemoteRepositoriesStep: FC<RemoteRepositoriesStepProps> = ({
@ -34,7 +34,7 @@ export const RemoteRepositoriesStep: FC<RemoteRepositoriesStepProps> = ({
baseURL,
description = true,
progressBar = true,
isSourcegraphApp = false,
isCodyApp = false,
...attributes
}) => {
const location = useLocation()
@ -80,7 +80,7 @@ export const RemoteRepositoriesStep: FC<RemoteRepositoriesStepProps> = ({
<Container className={styles.contentMain}>
<Routes>
<Route index={true} element={isSourcegraphApp ? <AppRemoteNotice /> : <CodeHostsPicker />} />
<Route index={true} element={isCodyApp ? <AppRemoteNotice /> : <CodeHostsPicker />} />
<Route
path=":codeHostType/create"
element={<CodeHostCreation telemetryService={telemetryService} />}

View File

@ -56,7 +56,7 @@ export const CodeHostsNavigation: FC<CodeHostsNavigationProps> = props => {
// Filter out all other external services since we don't properly support them
// in the wizard, "Other" and "LocalGit" external services are used as local repositories setup in
// Sourcegraph App for which we have a special setup step
// Cody App for which we have a special setup step
const nonOtherExternalServices = data.externalServices.nodes.filter(
service => service.kind !== ExternalServiceKind.OTHER && service.kind !== ExternalServiceKind.LOCALGIT
)

View File

@ -27,7 +27,7 @@ import styles from './SetupSteps.module.scss'
export interface StepComponentProps extends TelemetryProps {
baseURL: string
className?: string
isSourcegraphApp: boolean
isCodyApp: boolean
}
export interface StepConfiguration {
@ -165,11 +165,11 @@ export const SetupStepsRoot: FC<SetupStepsProps> = props => {
interface SetupStepsContentProps extends TelemetryProps, HTMLAttributes<HTMLElement> {
contentContainerClass?: string
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const SetupStepsContent: FC<SetupStepsContentProps> = props => {
const { contentContainerClass, className, telemetryService, isSourcegraphApp, ...attributes } = props
const { contentContainerClass, className, telemetryService, isCodyApp, ...attributes } = props
const { steps, activeStepIndex } = useContext(SetupStepsContext)
return (
@ -184,7 +184,7 @@ export const SetupStepsContent: FC<SetupStepsContentProps> = props => {
baseURL={path}
className={classNames(contentContainerClass, styles.content)}
telemetryService={telemetryService}
isSourcegraphApp={isSourcegraphApp}
isCodyApp={isCodyApp}
/>
}
/>

View File

@ -52,7 +52,7 @@ export interface SiteAdminAreaRouteContext
site: Pick<SiteSettingFields, '__typename' | 'id'>
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
/** This property is only used by {@link SiteAdminOverviewPage}. */
overviewComponents: readonly React.ComponentType<React.PropsWithChildren<{}>>[]
@ -70,7 +70,7 @@ interface SiteAdminAreaProps extends PlatformContextProps, SettingsCascadeProps,
overviewComponents: readonly React.ComponentType<React.PropsWithChildren<unknown>>[]
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
codeInsightsEnabled: boolean
}
@ -129,7 +129,7 @@ const AuthenticatedSiteAdminArea: React.FunctionComponent<React.PropsWithChildre
platformContext: props.platformContext,
settingsCascade: props.settingsCascade,
isSourcegraphDotCom: props.isSourcegraphDotCom,
isSourcegraphApp: props.isSourcegraphApp,
isCodyApp: props.isCodyApp,
batchChangesEnabled: props.batchChangesEnabled,
batchChangesExecutionEnabled: props.batchChangesExecutionEnabled,
batchChangesWebhookLogsEnabled: props.batchChangesWebhookLogsEnabled,
@ -144,9 +144,7 @@ const AuthenticatedSiteAdminArea: React.FunctionComponent<React.PropsWithChildre
<Page>
<PageHeader>
<PageHeader.Heading as="h2" styleAs="h1">
<PageHeader.Breadcrumb>
{props.isSourcegraphApp ? 'Advanced Settings' : 'Admin'}
</PageHeader.Breadcrumb>
<PageHeader.Breadcrumb>{props.isCodyApp ? 'Advanced Settings' : 'Admin'}</PageHeader.Breadcrumb>
</PageHeader.Heading>
</PageHeader>
<div className="d-flex my-3 flex-column flex-sm-row" ref={reference}>
@ -154,7 +152,7 @@ const AuthenticatedSiteAdminArea: React.FunctionComponent<React.PropsWithChildre
className={classNames('flex-0 mr-3 mb-4', styles.sidebar)}
groups={adminSideBarGroups}
isSourcegraphDotCom={props.isSourcegraphDotCom}
isSourcegraphApp={props.isSourcegraphApp}
isCodyApp={props.isCodyApp}
batchChangesEnabled={props.batchChangesEnabled}
batchChangesExecutionEnabled={props.batchChangesExecutionEnabled}
batchChangesWebhookLogsEnabled={props.batchChangesWebhookLogsEnabled}

View File

@ -215,7 +215,7 @@ const quickConfigureActions: {
interface Props extends TelemetryProps {
isLightTheme: boolean
client: ApolloClient<{}>
isSourcegraphApp: boolean
isCodyApp: boolean
}
interface State {
@ -231,7 +231,7 @@ interface State {
const EXPECTED_RELOAD_WAIT = 7 * 1000 // 7 seconds
export const SiteAdminConfigurationPage: FC<TelemetryProps & { isSourcegraphApp: boolean }> = props => {
export const SiteAdminConfigurationPage: FC<TelemetryProps & { isCodyApp: boolean }> = props => {
const client = useApolloClient()
return <SiteAdminConfigurationContent {...props} isLightTheme={useIsLightTheme()} client={client} />
}
@ -435,7 +435,7 @@ class SiteAdminConfigurationContent extends React.Component<Props, State> {
height={600}
isLightTheme={this.props.isLightTheme}
onSave={this.onSave}
actions={this.props.isSourcegraphApp ? [] : quickConfigureActions}
actions={this.props.isCodyApp ? [] : quickConfigureActions}
telemetryService={this.props.telemetryService}
explanation={
<Text className="form-text text-muted">

View File

@ -34,7 +34,7 @@ const AddExternalServicesPage = lazyComponent(
interface Props extends TelemetryProps, PlatformContextProps, SettingsCascadeProps {
authenticatedUser: AuthenticatedUser
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const SiteAdminExternalServicesArea: FC<Props> = props => {

View File

@ -26,7 +26,7 @@ const GitHubAppsPage = lazyComponent(() => import('../components/gitHubApps/GitH
interface Props extends TelemetryProps, PlatformContextProps {
authenticatedUser: AuthenticatedUser
isSourcegraphApp: boolean
isCodyApp: boolean
batchChangesEnabled: boolean
}

View File

@ -112,12 +112,12 @@ const allConfigSchema = {
}
interface Props extends TelemetryProps {
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const SiteAdminReportBugPage: React.FunctionComponent<React.PropsWithChildren<Props>> = ({
telemetryService,
isSourcegraphApp,
isCodyApp,
}) => {
const isLightTheme = useIsLightTheme()
const allConfig = useObservable(useMemo(fetchAllConfigAndSettings, []))
@ -130,7 +130,7 @@ export const SiteAdminReportBugPage: React.FunctionComponent<React.PropsWithChil
target="_blank"
rel="noopener noreferrer"
to={
isSourcegraphApp
isCodyApp
? 'https://github.com/sourcegraph/app/issues/new?assignees=&labels=&template=bug_report.md&title='
: 'https://github.com/sourcegraph/sourcegraph/issues/new?assignees=&labels=&template=bug_report.md&title='
}

View File

@ -14,13 +14,13 @@ import { refreshSiteFlags } from '../site/backend'
import { SiteAdminRepositoriesContainer } from './SiteAdminRepositoriesContainer'
interface Props extends TelemetryProps {
isSourcegraphApp: boolean
isCodyApp: boolean
}
/** A page displaying the repositories on this site */
export const SiteAdminRepositoriesPage: React.FunctionComponent<React.PropsWithChildren<Props>> = ({
telemetryService,
isSourcegraphApp,
isCodyApp,
}) => {
const location = useLocation()
@ -68,7 +68,7 @@ export const SiteAdminRepositoriesPage: React.FunctionComponent<React.PropsWithC
className="mb-3"
/>
{isSourcegraphApp && (
{isCodyApp && (
<LimitedAccessBanner
storageKey="app.manage-repositories-with-new-settings"
badgeText="Repositories"

View File

@ -13,7 +13,7 @@ import styles from './SiteAdminSidebar.module.scss'
export interface SiteAdminSideBarGroupContext extends BatchChangesProps {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
codeInsightsEnabled: boolean
endUserOnboardingEnabled: boolean
}

View File

@ -11,7 +11,7 @@ import { isPackagesEnabled } from './flags'
import type { SiteAdminSideBarGroup, SiteAdminSideBarGroups } from './SiteAdminSidebar'
export const analyticsGroup: SiteAdminSideBarGroup = {
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
header: {
label: 'Analytics',
icon: ChartLineVariantIcon,
@ -59,7 +59,7 @@ export const analyticsGroup: SiteAdminSideBarGroup = {
{
label: 'Feedback survey',
to: '/site-admin/surveys',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
],
}
@ -77,7 +77,7 @@ export const configurationGroup: SiteAdminSideBarGroup = {
{
label: 'Global settings',
to: '/site-admin/global-settings',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'End user onboarding',
@ -104,7 +104,7 @@ export const repositoriesGroup: SiteAdminSideBarGroup = {
{
label: 'Repositories',
to: '/site-admin/repositories',
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Packages',
@ -116,7 +116,7 @@ export const repositoriesGroup: SiteAdminSideBarGroup = {
to: '/site-admin/gitservers',
},
],
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
}
export const usersGroup: SiteAdminSideBarGroup = {
@ -125,7 +125,7 @@ export const usersGroup: SiteAdminSideBarGroup = {
icon: AccountMultipleIcon,
},
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
items: [
{
label: 'Users',
@ -164,7 +164,7 @@ export const maintenanceGroup: SiteAdminSideBarGroup = {
label: maintenanceGroupHeaderLabel,
icon: MonitorStarIcon,
},
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
items: [
{
label: maintenanceGroupUpdatesItemLabel,
@ -221,7 +221,7 @@ export const apiConsoleGroup: SiteAdminSideBarGroup = {
label: 'API Console',
icon: ConsoleIcon,
},
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
items: [
{
label: 'API Console',

View File

@ -73,7 +73,7 @@ export interface StaticInjectedAppConfig extends Pick<CodeIntelligenceProps, 'br
*/
export interface StaticWindowContextComputedAppConfig extends Pick<BatchChangesProps, 'batchChangesEnabled'> {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
needsRepositoryConfiguration: boolean
batchChangesWebhookLogsEnabled: boolean
}
@ -84,7 +84,7 @@ export interface StaticWindowContextComputedAppConfig extends Pick<BatchChangesP
*/
export const windowContextConfig = {
isSourcegraphDotCom: window.context.sourcegraphDotComMode,
isSourcegraphApp: window.context.sourcegraphAppMode,
isCodyApp: window.context.codyAppMode,
needsRepositoryConfiguration: window.context.needsRepositoryConfiguration,
batchChangesWebhookLogsEnabled: window.context.batchChangesWebhookLogsEnabled,
batchChangesEnabled: window.context.batchChangesEnabled,

View File

@ -192,7 +192,7 @@ export const Layout: React.FC<LegacyLayoutProps> = props => {
/>
)}
<GlobalAlerts authenticatedUser={props.authenticatedUser} isSourcegraphApp={props.isSourcegraphApp} />
<GlobalAlerts authenticatedUser={props.authenticatedUser} isCodyApp={props.isCodyApp} />
{!isSiteInit && !isSignInOrUp && !props.isSourcegraphDotCom && !disableFeedbackSurvey && (
<SurveyToast authenticatedUser={props.authenticatedUser} />
)}
@ -220,7 +220,7 @@ export const Layout: React.FC<LegacyLayoutProps> = props => {
showFeedbackModal={showFeedbackModal}
/>
)}
{props.isSourcegraphApp && <StartupUpdateChecker />}
{props.isCodyApp && <StartupUpdateChecker />}
{needsSiteInit && !isSiteInit && <Navigate replace={true} to="/site-admin/init" />}
<ErrorBoundary location={location}>
<Suspense

View File

@ -364,7 +364,7 @@ export class EventLogger implements TelemetryService, SharedEventLogger {
}
public getClient(): string {
if (window.context?.sourcegraphAppMode) {
if (window.context?.codyAppMode) {
return EventClient.APP_WEB
}
if (window.context?.sourcegraphDotComMode) {

View File

@ -94,7 +94,7 @@ interface UserAreaProps
authenticatedUser: AuthenticatedUser | null
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
/**
@ -127,7 +127,7 @@ export interface UserAreaRouteContext
userSettingsAreaRoutes: readonly UserSettingsAreaRoute[]
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
/**
@ -137,7 +137,7 @@ export const UserArea: FC<UserAreaProps> = ({
useBreadcrumb,
userAreaRoutes,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
...props
}) => {
const { username } = useParams()
@ -194,7 +194,7 @@ export const UserArea: FC<UserAreaProps> = ({
namespace: user,
...childBreadcrumbSetters,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
}
return (

View File

@ -20,7 +20,7 @@ interface Props extends UserAreaRouteContext {
export interface UserAreaHeaderContext extends BatchChangesProps, Pick<Props, 'user'> {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
export interface UserAreaHeaderNavItem extends NavItemWithIconDescriptor<UserAreaHeaderContext> {}
@ -41,7 +41,7 @@ export const UserAreaHeader: React.FunctionComponent<React.PropsWithChildren<Pro
*/
const path = useMemo(
() =>
props.isSourcegraphApp
props.isCodyApp
? { text: 'Settings' }
: {
text: (
@ -57,7 +57,7 @@ export const UserAreaHeader: React.FunctionComponent<React.PropsWithChildren<Pro
),
icon: () => <UserAvatar className={styles.avatar} user={props.user} />,
},
[props.user, props.isSourcegraphApp]
[props.user, props.isCodyApp]
)
const filteredNavItems = navItems.filter(({ condition = () => true }) => condition(props))
@ -67,7 +67,7 @@ export const UserAreaHeader: React.FunctionComponent<React.PropsWithChildren<Pro
<div className="container">
<PageHeader
className="mb-3"
actions={props.isSourcegraphApp && <Link to="/site-admin/configuration">Advanced settings</Link>}
actions={props.isCodyApp && <Link to="/site-admin/configuration">Advanced settings</Link>}
>
<PageHeader.Heading as="h2" styleAs="h1">
<PageHeader.Breadcrumb icon={path.icon}>{path.text}</PageHeader.Breadcrumb>

View File

@ -11,19 +11,19 @@ export const userAreaHeaderNavItems: readonly UserAreaHeaderNavItem[] = [
to: '/profile',
label: 'Profile',
icon: AccountIcon,
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
to: '/settings',
label: 'Settings',
icon: CogOutlineIcon,
condition: ({ user: { viewerCanAdminister }, isSourcegraphApp }) => viewerCanAdminister && !isSourcegraphApp,
condition: ({ user: { viewerCanAdminister }, isCodyApp }) => viewerCanAdminister && !isCodyApp,
},
{
to: '/searches',
label: 'Saved searches',
icon: FeatureSearchOutlineIcon,
condition: ({ user: { viewerCanAdminister }, isSourcegraphApp }) => viewerCanAdminister && !isSourcegraphApp,
condition: ({ user: { viewerCanAdminister }, isCodyApp }) => viewerCanAdminister && !isCodyApp,
},
...namespaceAreaHeaderNavItems,
]

View File

@ -20,7 +20,7 @@ export interface UserSettingsSidebarItemConditionContext extends BatchChangesPro
user: UserSettingsAreaUserFields
authenticatedUser: AuthenticatedUser
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
type UserSettingsSidebarItem = NavItemDescriptor<UserSettingsSidebarItemConditionContext> & {
@ -32,7 +32,7 @@ export type UserSettingsSidebarItems = readonly UserSettingsSidebarItem[]
export interface UserSettingsSidebarProps extends UserSettingsAreaRouteContext, BatchChangesProps {
items: UserSettingsSidebarItems
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
className?: string
}
@ -55,7 +55,7 @@ export const UserSettingsSidebar: FC<UserSettingsSidebarProps> = props => {
user: props.user,
authenticatedUser: props.authenticatedUser,
isSourcegraphDotCom: props.isSourcegraphDotCom,
isSourcegraphApp: props.isSourcegraphApp,
isCodyApp: props.isCodyApp,
}
return (
@ -81,44 +81,43 @@ export const UserSettingsSidebar: FC<UserSettingsSidebarProps> = props => {
)
)}
</SidebarGroup>
{(props.user.organizations.nodes.length > 0 || !siteAdminViewingOtherUser) &&
!props.isSourcegraphApp && (
<SidebarGroup>
<SidebarGroupHeader label="Your organizations" />
{props.user.organizations.nodes.map(org => (
<SidebarNavItem
key={org.id}
to={`/organizations/${org.name}/settings`}
className="text-truncate text-nowrap align-items-center"
onClick={collapseMobileSidebar}
>
<OrgAvatar org={org.name} className="d-inline-flex mr-1" />
<Tooltip content={org.name}>
<span className="text-truncate overflow-hidden">{org.name}</span>
</Tooltip>
{(props.user.organizations.nodes.length > 0 || !siteAdminViewingOtherUser) && !props.isCodyApp && (
<SidebarGroup>
<SidebarGroupHeader label="Your organizations" />
{props.user.organizations.nodes.map(org => (
<SidebarNavItem
key={org.id}
to={`/organizations/${org.name}/settings`}
className="text-truncate text-nowrap align-items-center"
onClick={collapseMobileSidebar}
>
<OrgAvatar org={org.name} className="d-inline-flex mr-1" />
<Tooltip content={org.name}>
<span className="text-truncate overflow-hidden">{org.name}</span>
</Tooltip>
</SidebarNavItem>
))}
{!siteAdminViewingOtherUser &&
(window.context.sourcegraphDotComMode ? (
<SidebarNavItem to="./about-organizations" onClick={collapseMobileSidebar}>
About organizations
</SidebarNavItem>
) : (
<div className={styles.newOrgBtnWrapper}>
<Button
to="/organizations/new"
variant="secondary"
outline={true}
size="sm"
as={Link}
onClick={collapseMobileSidebar}
>
<Icon aria-hidden={true} svgPath={mdiPlus} /> New organization
</Button>
</div>
))}
{!siteAdminViewingOtherUser &&
(window.context.sourcegraphDotComMode ? (
<SidebarNavItem to="./about-organizations" onClick={collapseMobileSidebar}>
About organizations
</SidebarNavItem>
) : (
<div className={styles.newOrgBtnWrapper}>
<Button
to="/organizations/new"
variant="secondary"
outline={true}
size="sm"
as={Link}
onClick={collapseMobileSidebar}
>
<Icon aria-hidden={true} svgPath={mdiPlus} /> New organization
</Button>
</div>
))}
</SidebarGroup>
)}
</SidebarGroup>
)}
<SidebarGroup>
<SidebarGroupHeader label="Other actions" />
{!siteAdminViewingOtherUser && (

View File

@ -27,7 +27,7 @@ interface Props extends Pick<UserSettingsAreaRouteContext, 'authenticatedUser' |
*/
onDidCreateAccessToken: (value: CreateAccessTokenResult['createAccessToken']) => void
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
interface TokenRequester {
/** The name of the source */
@ -110,7 +110,7 @@ export const UserSettingsCreateAccessTokenCallbackPage: React.FC<Props> = ({
onDidCreateAccessToken,
user,
isSourcegraphDotCom,
isSourcegraphApp,
isCodyApp,
}) => {
const isLightTheme = useIsLightTheme()
const navigate = useNavigate()
@ -168,7 +168,7 @@ export const UserSettingsCreateAccessTokenCallbackPage: React.FC<Props> = ({
}
}
if (isSourcegraphApp) {
if (isCodyApp) {
// Append type=app to the url to indicate to the requester that the callback is fulfilled by App
const redirectURL = new URL(nextRequester.redirectURL)
redirectURL.searchParams.set('type', 'app')
@ -177,7 +177,7 @@ export const UserSettingsCreateAccessTokenCallbackPage: React.FC<Props> = ({
setRequester(nextRequester)
setNote(REQUESTERS[requestFrom].name)
}, [isSourcegraphDotCom, isSourcegraphApp, location.search, navigate, requestFrom, requester, port, destination])
}, [isSourcegraphDotCom, isCodyApp, location.search, navigate, requestFrom, requester, port, destination])
/**
* We use this to handle token creation request from redirections.
@ -206,7 +206,7 @@ export const UserSettingsCreateAccessTokenCallbackPage: React.FC<Props> = ({
// callback in a browser.
// Then navigate back to the home page since App doesn't
// have a back button or tab that can be closed.
if (isSourcegraphApp) {
if (isCodyApp) {
tauriShellOpen(uri)
navigate('/')
return
@ -228,7 +228,7 @@ export const UserSettingsCreateAccessTokenCallbackPage: React.FC<Props> = ({
)
)
),
[requester, user.id, note, onDidCreateAccessToken, requestFrom, port, isSourcegraphApp, navigate]
[requester, user.id, note, onDidCreateAccessToken, requestFrom, port, isCodyApp, navigate]
)
)

View File

@ -14,7 +14,7 @@ import { UserSettingsTokensPage } from './UserSettingsTokensPage'
interface Props extends Pick<UserSettingsAreaRouteContext, 'user' | 'authenticatedUser'>, TelemetryProps {
isSourcegraphDotCom: boolean
isSourcegraphApp: boolean
isCodyApp: boolean
}
export const UserSettingsTokensArea: React.FunctionComponent<React.PropsWithChildren<Props>> = props => {

View File

@ -10,7 +10,7 @@ describe('ProductResearchPage', () => {
beforeEach(() => {
queries = render(
<ProductResearchPage
isSourcegraphApp={false}
isCodyApp={false}
telemetryService={NOOP_TELEMETRY_SERVICE}
authenticatedUser={{
emails: [{ email: 'test@sourcegraph.com', isPrimary: true, verified: true }],

View File

@ -11,7 +11,7 @@ import { PageTitle } from '../../../components/PageTitle'
interface Props {
telemetryService: TelemetryService
authenticatedUser: Pick<AuthenticatedUser, 'emails'>
isSourcegraphApp: boolean
isCodyApp: boolean
}
const SIGN_UP_FORM_URL = 'https://info.sourcegraph.com/product-research'
@ -19,7 +19,7 @@ const SIGN_UP_FORM_URL = 'https://info.sourcegraph.com/product-research'
export const ProductResearchPage: React.FunctionComponent<React.PropsWithChildren<Props>> = ({
telemetryService,
authenticatedUser,
isSourcegraphApp,
isCodyApp,
}) => {
useEffect(() => {
telemetryService.logViewEvent('UserSettingsProductResearch')
@ -35,7 +35,7 @@ export const ProductResearchPage: React.FunctionComponent<React.PropsWithChildre
<>
<PageTitle title="Product research" />
<PageHeader headingElement="h2" path={[{ text: 'Product research and feedback' }]} className="mb-3" />
{isSourcegraphApp && (
{isCodyApp && (
<Container className="mb-2">
<Text>Do you have feedback or need help with Cody App?</Text>
{[

View File

@ -10,13 +10,13 @@ export const userSettingsSideBarItems: UserSettingsSidebarItems = [
label: 'Profile',
to: '/profile',
exact: true,
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Emails',
to: '/emails',
exact: true,
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Access tokens',
@ -27,7 +27,7 @@ export const userSettingsSideBarItems: UserSettingsSidebarItems = [
label: 'Account security',
to: '/security',
exact: true,
condition: ({ isSourcegraphApp }) => !isSourcegraphApp,
condition: ({ isCodyApp }) => !isCodyApp,
},
{
label: 'Quotas',

View File

@ -51,7 +51,7 @@ const {
SENTRY_DOT_COM_AUTH_TOKEN,
SENTRY_ORGANIZATION,
SENTRY_PROJECT,
SOURCEGRAPH_APP,
CODY_APP,
} = ENVIRONMENT_CONFIG
const isHotReloadEnabled = NODE_ENV !== 'production' && !IS_CI
@ -129,7 +129,7 @@ const config = {
entry: {
// Desktop app vs. Enterprise vs. OSS builds use different entrypoints. The enterprise entrypoint imports a
// strict superset of the OSS entrypoint. The app endoint imports a strict superset of the enterprise entrypoint.
app: SOURCEGRAPH_APP
app: CODY_APP
? path.join(enterpriseDirectory, 'app-main.tsx')
: ENTERPRISE
? path.join(enterpriseDirectory, 'main.tsx')

View File

@ -15,19 +15,19 @@ import (
"github.com/sourcegraph/sourcegraph/internal/conf/deploy"
)
// RouteAppUpdateCheck is the name of the route that the Sourcegraph App will use to check if there are updates
// RouteAppUpdateCheck is the name of the route that the Cody App will use to check if there are updates
const RouteAppUpdateCheck = "app.update.check"
// ManifestBucket the name of the bucket where the Sourcegraph App update manifest is stored
// ManifestBucket the name of the bucket where the Cody App update manifest is stored
const ManifestBucket = "sourcegraph-app"
// ManifestBucketDev the name of the bucket where the Sourcegraph App update manifest is stored for dev instances
// ManifestBucketDev the name of the bucket where the Cody App update manifest is stored for dev instances
const ManifestBucketDev = "sourcegraph-app-dev"
// ManifestName is the name of the manifest object that is in the ManifestBucket
const ManifestName = "app.update.prod.manifest.json"
// noUpdateConstraint clients on or prior to this version are using the "Sourcegraph App" version, which is the version prior to the
// noUpdateConstraint clients on or prior to this version are using the "Cody App" version, which is the version prior to the
// "Cody App" version which does not have search. Therefore, clients that match this constraint should be told that there is NOT a
// new version for them to update to with the Tauri updater. Instead we will notify them with a banner in the app - which is not
// part of the Tauri updater.
@ -180,7 +180,7 @@ func (checker *AppNoopUpdateChecker) Handler() http.HandlerFunc {
}
func AppUpdateHandler(logger log.Logger) http.HandlerFunc {
// We store the Sourcegraph App manifest in a different GCS bucket, since buckets are globally unique we use different names
// We store the Cody App manifest in a different GCS bucket, since buckets are globally unique we use different names
var bucket = ManifestBucket
if deploy.IsDev(deploy.Type()) {
bucket = ManifestBucketDev

View File

@ -1,13 +1,13 @@
extend type Query {
"""
Returns the local directory at the given directory or comma-separated list of directories.
This is intended to be used by Sourcegraph App.
This is intended to be used by Cody App.
"""
localDirectories(paths: [String!]!): LocalDirectories!
"""
Lists external services that are configured for Sourcegraph App local code repositories. This is intended to be used
by Sourcegraph App.
Lists external services that are configured for Cody App local code repositories. This is intended to be used
by Cody App.
"""
localExternalServices: [LocalExternalService!]!
@ -49,7 +49,7 @@ type EmbeddingsSetupProgress {
"""
LocalDirectories represents a list of directories on the host machine. This is an API
specific to Sourcegraph App.
specific to Cody App.
"""
type LocalDirectories {
"""
@ -73,7 +73,7 @@ type LocalDirectories {
"""
LocalRepository represents a repository found recursively from a directory on
the host machine. This is an API specific to Sourcegraph App.
the host machine. This is an API specific to Cody App.
"""
type LocalRepository {
"""
@ -89,7 +89,7 @@ type LocalRepository {
}
"""
An external service that is configured for Sourcegraph App local code repositories.
An external service that is configured for Cody App local code repositories.
"""
type LocalExternalService {
"""
@ -103,7 +103,7 @@ type LocalExternalService {
path: String!
"""
If this is true then the external service is intended to be managed by Sourcegraph App services and not by the user.
If this is true then the external service is intended to be managed by Cody App services and not by the user.
"""
autogenerated: Boolean!
@ -117,7 +117,7 @@ extend type Mutation {
"""
Experimental: Waits for a repos to be cloned and then schedules a job to create an embeddings
If force is set to true, then the repo will be re-embedded even if there's already an up-to-date embeddings index.
This is an API specific to Sourcegraph App.
This is an API specific to Cody App.
"""
setupNewAppRepositoriesForEmbedding(repoNames: [String!]!): EmptyResponse!

View File

@ -90,7 +90,7 @@ var rbacSchema string
//go:embed own.graphql
var ownSchema string
// appSchema is the Sourcegraph App local raw graqhql schema.
// appSchema is the Cody App local raw graqhql schema.
//
//go:embed app.graphql
var appSchema string

View File

@ -7232,7 +7232,7 @@ type Site implements SettingsSubject {
allowEditExternalServicesWithFile: Boolean!
"""
The number of external services distinguished by local repositories and remote repositories.
Local repository code host connections are only supported in Sourcegraph App.
Local repository code host connections are only supported in Cody App.
"""
externalServicesCounts: ExternalServicesCounts!
"""
@ -7459,7 +7459,7 @@ type CodyGatewayRateLimitStatus {
"""
External services count information includes a count of services for remote code host connections and a count of services
for local code host connections (local is only supported for Sourcegraph App).
for local code host connections (local is only supported for Cody App).
"""
type ExternalServicesCounts {
"""

View File

@ -36,7 +36,7 @@ func needsRepositoryConfiguration(ctx context.Context, db database.DB) (bool, er
}
if deploy.IsApp() {
// In the Sourcegraph app, we need repository configuration iff:
// In the Cody app, we need repository configuration iff:
//
// 1. The user has not configured extsvc (number of extsvc excluding the autogenerated one is equal to zero.)
// 2. The autogenerated extsvc did not discover any local repositories.

View File

@ -151,7 +151,8 @@ type JSContext struct {
DeployType string `json:"deployType"`
SourcegraphDotComMode bool `json:"sourcegraphDotComMode"`
SourcegraphAppMode bool `json:"sourcegraphAppMode"`
CodyAppMode bool `json:"codyAppMode"`
BillingPublishableKey string `json:"billingPublishableKey,omitempty"`
@ -347,7 +348,7 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
DeployType: deploy.Type(),
SourcegraphDotComMode: envvar.SourcegraphDotComMode(),
SourcegraphAppMode: deploy.IsApp(),
CodyAppMode: deploy.IsApp(),
BillingPublishableKey: BillingPublishableKey,

View File

@ -28,8 +28,7 @@ func serveHelp(w http.ResponseWriter, r *http.Request) {
logger.Info("redirecting to docs", sglog.String("page", page), sglog.String("versionStr", versionStr))
// For App, help links are handled in the frontend. We should never get here.
sourcegraphAppMode := deploy.IsApp()
if sourcegraphAppMode {
if deploy.IsApp() {
// This should never happen, but if it does, we want to know about it.
logger.Error("help link was clicked in App and handled in the backend, this should never happer")

View File

@ -16,7 +16,7 @@ import (
)
// AppReady is called once the frontend has reported it is ready to serve
// requests. It contains tasks related to Sourcegraph App (single binary).
// requests. It contains tasks related to Cody App (single binary).
func AppReady(db database.DB, logger log.Logger) {
if !deploy.IsApp() {
return

View File

@ -387,7 +387,7 @@ func makeRateLimitWatcher() (*graphqlbackend.BasicLimitWatcher, error) {
if pool, ok := redispool.Cache.Pool(); ok {
store, err = redigostore.NewCtx(pool, "gql:rl:", 0)
} else {
// If redis is disabled we are in Sourcegraph App and can rely on an
// If redis is disabled we are in Cody App and can rely on an
// in-memory store.
store, err = memstore.NewCtx(0)
}

View File

@ -1,6 +1,6 @@
# Sourcegraph App
# Cody App
Sourcegraph App is a single-binary distribution of Sourcegraph that runs on your local machine.
Cody App is a single-binary distribution of Sourcegraph that runs on your local machine.
**Status:** alpha (only for internal use at Sourcegraph)
@ -18,9 +18,9 @@ If your are running app on a fresh database instance you also have to perform th
## Usage
Sourcegraph App is in alpha (only for internal use at Sourcegraph).
Cody App is in alpha (only for internal use at Sourcegraph).
Check the **Sourcegraph App release** bot in [`#app`](https://app.slack.com/client/T02FSM7DL/C04F9E7GUDP) (in the Sourcegraph internal Slack) for the latest release information.
Check the **Cody App release** bot in [`#app`](https://app.slack.com/client/T02FSM7DL/C04F9E7GUDP) (in the Sourcegraph internal Slack) for the latest release information.
## Build and release

View File

@ -21,7 +21,7 @@ func checkUnversionedDocsLinks() *linter {
}
return diff.IterateHunks(func(file string, hunk repo.DiffHunk) error {
// Ignore Sourcegraph app directory since docs links don't work
// Ignore Cody app directory since docs links don't work
// with /help route there
if strings.HasPrefix(file, "client/web/src/enterprise/app") {
return nil

View File

@ -150,7 +150,7 @@ Promise.all([domContentLoadedPromise, importEventLoggerPromise]).then(([_, { Eve
eventLogger.log('ViewStaticPage', eventArguments, eventArguments)
// Log download links which have a "data-download-name" attribute
// This is used to track Sourcegraph App download links
// This is used to track Cody App download links
document.addEventListener('click', event => {
if (event.target.matches('a[data-download-name]')) {
const downloadName = event.target.getAttribute('data-download-name')

View File

@ -4,7 +4,7 @@
Sourcegraph Cody Gateway powers the default `"provider": "sourcegraph"` Cody completions and embeddings for Sourcegraph Enterprise customers.
It supports a variety of upstream LLM providers, such as [Anthropic](https://www.anthropic.com/) and [OpenAI](https://openai.com/), with rate limits, quotas, and model availability tied to your Sourcegraph Enterprise product subscription.
[Sourcegraph App users](./../overview/app/index.md) with Sourcegraph.com accounts will also be able to use Sourcegraph Cody Gateway.
[Cody App users](./../overview/app/index.md) with Sourcegraph.com accounts will also be able to use Sourcegraph Cody Gateway.
Reach out your account manager for more details about Sourcegraph Cody Gateway access available to you and how you can gain access to higher rate limits, quotas, and/or model options.
@ -62,13 +62,13 @@ Refer to [Cody documentation](../overview/index.md) to learn more about Cody con
Rate limits, quotas, and model availability is tied to one of:
- your Sourcegraph Enterprise product subscription, for Sourcegraph Enterprise instances
- your Sourcegraph.com account, for [Sourcegraph App users](../overview/app/index.md)
- your Sourcegraph.com account, for [Cody App users](../overview/app/index.md)
All successful requests to Cody Gateway will count towards your rate limits.
Unsuccesful requests are not counted as usage.
Rate limits, quotas, and model availability are also configured per Cody feature - for example, you will have a separate rate limits for Cody chat, Cody completions, and Cody embeddings.
In addition to the above, we may throttle concurrent requests to Cody Gateway per Sourcegraph Enterprise instance or Sourcegraph App user, to prevent excessive burst consumption.
In addition to the above, we may throttle concurrent requests to Cody Gateway per Sourcegraph Enterprise instance or Cody App user, to prevent excessive burst consumption.
## Privacy and security

View File

@ -110,7 +110,7 @@ __Note__: if you're wondering why the bucket names are different even though we
### Automatically updating the manifest
`sg` can be used to automatically update the manifest from the latest build on `app-release/stable` and corresponding latest release on GitHub. Updating the manifest will set the new current version for download links as well as prompt users to upgrade the next time the App checks for updates. To run the update-manifest command request the `Sourcegraph App Release Bucket access` bundle in Entitle.
`sg` can be used to automatically update the manifest from the latest build on `app-release/stable` and corresponding latest release on GitHub. Updating the manifest will set the new current version for download links as well as prompt users to upgrade the next time the App checks for updates. To run the update-manifest command request the `Cody App Release Bucket access` bundle in Entitle.
Below is an example command:

View File

@ -16,7 +16,7 @@ go_build() {
echo "--- :chrome: Building web"
# esbuild is faster
pnpm install
NODE_ENV=production ENTERPRISE=1 SOURCEGRAPH_APP=1 DEV_WEB_BUILDER=esbuild pnpm run build-web
NODE_ENV=production ENTERPRISE=1 CODY_APP=1 DEV_WEB_BUILDER=esbuild pnpm run build-web
fi
export GO111MODULE=on

View File

@ -5,7 +5,7 @@ echo "Building version: ${version}"
echo "--- :chrome: Building web"
pnpm install
NODE_ENV=production ENTERPRISE=1 SOURCEGRAPH_APP=1 pnpm run build-web
NODE_ENV=production ENTERPRISE=1 CODY_APP=1 pnpm run build-web
export PATH=$PATH:/c/msys64/ucrt64/bin
platform="x86_64-pc-windows-msvc" # This is the name Tauri expects for the Windows executable

View File

@ -412,7 +412,7 @@ func addAppReleaseSteps(c Config, insiders bool) operations.Operation {
// * yyyy.mm.dd+$BUILDNUM.$COMMIT
// * yyyy.mm.dd-insiders+$BUILDNUM.$COMMIT
//
// We do not follow the Sourcegraph enterprise versioning scheme, because Sourcegraph App is
// We do not follow the Sourcegraph enterprise versioning scheme, because Cody App is
// released much more frequently than the enterprise versions by nature of being a desktop
// app.
//

2
go.mod
View File

@ -8,7 +8,7 @@ go 1.19
// or intentional forks.
replace (
// We maintain a potentially long-term fork of embedded-postgres for
// Sourcegraph App. We add features like unix sockets. If this replace
// Cody App. We add features like unix sockets. If this replace
// directive still exists in 2024, lets consider hard forking.
github.com/fergusstrange/embedded-postgres => github.com/sourcegraph/embedded-postgres v1.19.1-0.20230624001757-345a8df15ded
// We use a fork of Alertmanager to allow prom-wrapper to better manipulate Alertmanager configuration.

View File

@ -24,7 +24,7 @@ import (
const appUsername = "admin"
// appSecret stores the in-memory secret used by Sourcegraph App to enable passworldless
// appSecret stores the in-memory secret used by Cody App to enable passworldless
// login from the console.
var appSecret secret
@ -128,7 +128,7 @@ func AppSignInMiddleware(db database.DB, handler func(w http.ResponseWriter, r *
}
}
// AppSiteInit is called in the case of Sourcegraph App to create the initial site admin account.
// AppSiteInit is called in the case of Cody App to create the initial site admin account.
//
// Returns a sign-in URL which will automatically sign in the user. This URL
// can only be used once.

View File

@ -57,7 +57,7 @@ func isCodyEnabled(ctx context.Context) bool {
return true
}
// isCodyEnabledInApp determines if cody is enabled within Sourcegraph App.
// isCodyEnabledInApp determines if cody is enabled within Cody App.
// If cody.enabled is set to true, cody is enabled.
// If the App user's dotcom auth token is present, cody is enabled.
// In all other cases Cody is disabled.

View File

@ -77,7 +77,7 @@ var KubernetesOrDockerComposeOrPureDocker = conftypes.RawUnified{
// between the bundled executor and the publicly-facing executor API.
var AppInMemoryExecutorPassword = uuid.NewV4().String()
// App is the default configuration for the Sourcegraph app (which is also a single Go static binary.)
// App is the default configuration for the Cody app (which is also a single Go static binary.)
var App = conftypes.RawUnified{
Site: `{
"auth.providers": [

View File

@ -94,10 +94,10 @@ func IsValidDeployType(deployType string) bool {
IsDeployTypeApp(deployType)
}
// IsApp tells if the running deployment is a Sourcegraph App deployment.
// IsApp tells if the running deployment is a Cody App deployment.
//
// Sourcegraph App is always a single-binary, but not all single-binary deployments are
// a Sourcegraph app.
// Cody App is always a single-binary, but not all single-binary deployments are
// a Cody app.
//
// In the future, all Sourcegraph deployments will be a single-binary. For example gitserver will
// be `sourcegraph --as=gitserver` or similar. Use IsSingleBinary() for code that should always
@ -118,8 +118,8 @@ var appFullSourcegraph, _ = strconv.ParseBool(os.Getenv("APP_FULL_SOURCEGRAPH"))
// IsSingleBinary tells if the running deployment is a single-binary or not.
//
// Sourcegraph App is always a single-binary, but not all single-binary deployments are
// a Sourcegraph app.
// Cody App is always a single-binary, but not all single-binary deployments are
// a Cody app.
//
// In the future, all Sourcegraph deployments will be a single-binary. For example gitserver will
// be `sourcegraph --as=gitserver` or similar. Use IsSingleBinary() for code that should always

View File

@ -775,7 +775,7 @@ type OtherRepoMetadata struct {
// AbsFilePath is an optional field which is the absolute path to the
// repository on the src git-serve server. Notably this is only
// implemented for Sourcegraph App's implementation of src git-serve.
// implemented for Cody App's implementation of src git-serve.
AbsFilePath string
}

Some files were not shown because too many files have changed in this diff Show More