diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 7db61161a..3a3c81fab 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -199,8 +199,8 @@ export class ConfigHandler { this.ide, this.ideSettingsPromise, this.writeLog, - this.reloadConfig.bind(this), assistant.rawYaml, + selectedOrgId, ); return new ProfileLifecycleManager(profileLoader, this.ide); diff --git a/core/config/profile/ControlPlaneProfileLoader.ts b/core/config/profile/ControlPlaneProfileLoader.ts index 09a1846a4..85130676b 100644 --- a/core/config/profile/ControlPlaneProfileLoader.ts +++ b/core/config/profile/ControlPlaneProfileLoader.ts @@ -71,6 +71,7 @@ export default class ControlPlaneProfileLoader implements IProfileLoader { undefined, this.workspaceId, undefined, + null, ); } diff --git a/core/config/profile/LocalProfileLoader.ts b/core/config/profile/LocalProfileLoader.ts index 46245a7f0..464d16804 100644 --- a/core/config/profile/LocalProfileLoader.ts +++ b/core/config/profile/LocalProfileLoader.ts @@ -65,6 +65,7 @@ export default class LocalProfileLoader implements IProfileLoader { undefined, this.description.id, this.overrideAssistantFile?.path, + null, ); this.description.errors = result.errors; diff --git a/core/config/profile/PlatformProfileLoader.ts b/core/config/profile/PlatformProfileLoader.ts index 1eddedb6a..468d3511a 100644 --- a/core/config/profile/PlatformProfileLoader.ts +++ b/core/config/profile/PlatformProfileLoader.ts @@ -31,8 +31,8 @@ export default class PlatformProfileLoader implements IProfileLoader { private readonly ide: IDE, private ideSettingsPromise: Promise, private writeLog: (message: string) => Promise, - private readonly onReload: () => void, readonly description: ProfileDescription, + private readonly orgScopeId: string | null, ) {} static async create( @@ -45,8 +45,8 @@ export default class PlatformProfileLoader implements IProfileLoader { ide: IDE, ideSettingsPromise: Promise, writeLog: (message: string) => Promise, - onReload: () => void, rawYaml: string, + orgScopeId: string | null, ): Promise { const controlPlaneEnv = await getControlPlaneEnv(ideSettingsPromise); @@ -75,8 +75,8 @@ export default class PlatformProfileLoader implements IProfileLoader { ide, ideSettingsPromise, writeLog, - onReload, description, + orgScopeId, ); } @@ -102,6 +102,7 @@ export default class PlatformProfileLoader implements IProfileLoader { }, this.description.id, undefined, + this.orgScopeId, ); return { diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index 28371a220..5380cc408 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -45,6 +45,7 @@ export default async function doLoadConfig( platformConfigMetadata: PlatformConfigMetadata | undefined, profileId: string, overrideConfigYamlByPath: string | undefined, + orgScopeId: string | null, ): Promise> { const workspaceConfigs = await getWorkspaceConfigs(ide); const ideInfo = await ide.getIdeInfo(); @@ -70,7 +71,6 @@ export default async function doLoadConfig( if (overrideConfigYaml || fs.existsSync(configYamlPath)) { const result = await loadContinueConfigFromYaml( ide, - workspaceConfigs.map((c) => JSON.stringify(c)), ideSettings, ideInfo, uniqueId, @@ -80,6 +80,7 @@ export default async function doLoadConfig( platformConfigMetadata, controlPlaneClient, configYamlPath, + orgScopeId, ); newConfig = result.config; errors = result.errors; diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 949e963e9..f2fefbb39 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -41,22 +41,31 @@ import { getSystemPromptDotFile } from "../getSystemPromptDotFile"; import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader"; import { modifyAnyConfigWithSharedConfig } from "../sharedConfig"; +import { getControlPlaneEnvSync } from "../../control-plane/env"; import { llmsFromModelConfig } from "./models"; export class LocalPlatformClient implements PlatformClient { + constructor( + private orgScopeId: string | null, + private readonly client: ControlPlaneClient, + ) {} + async resolveFQSNs(fqsns: FQSN[]): Promise<(SecretResult | undefined)[]> { - return fqsns.map((fqsn) => { - return undefined; - }); + if (fqsns.length === 0) { + return []; + } + + const response = await this.client.resolveFQSNs(fqsns, this.orgScopeId); + return response; } } async function loadConfigYaml( - workspaceConfigs: string[], rawYaml: string, overrideConfigYaml: AssistantUnrolled | undefined, - ide: IDE, controlPlaneClient: ControlPlaneClient, + orgScopeId: string | null, + ideSettings: IdeSettings, ): Promise> { let config = overrideConfigYaml ?? @@ -68,12 +77,18 @@ async function loadConfigYaml( versionSlug: "", }, rawYaml, - new RegistryClient(), + new RegistryClient( + await controlPlaneClient.getAccessToken(), + getControlPlaneEnvSync( + ideSettings.continueTestEnvironment, + ideSettings.enableControlServerBeta, + ).CONTROL_PLANE_URL, + ), { currentUserSlug: "", onPremProxyUrl: null, - orgScopeId: null, - platformClient: new LocalPlatformClient(), + orgScopeId, + platformClient: new LocalPlatformClient(orgScopeId, controlPlaneClient), renderSecrets: true, }, )); @@ -394,7 +409,6 @@ async function configYamlToContinueConfig( export async function loadContinueConfigFromYaml( ide: IDE, - workspaceConfigs: string[], ideSettings: IdeSettings, ideInfo: IdeInfo, uniqueId: string, @@ -404,6 +418,7 @@ export async function loadContinueConfigFromYaml( platformConfigMetadata: PlatformConfigMetadata | undefined, controlPlaneClient: ControlPlaneClient, configYamlPath: string | undefined, + orgScopeId: string | null, ): Promise> { const rawYaml = overrideConfigYaml === undefined @@ -414,11 +429,11 @@ export async function loadContinueConfigFromYaml( : ""; const configYamlResult = await loadConfigYaml( - workspaceConfigs, rawYaml, overrideConfigYaml, - ide, controlPlaneClient, + orgScopeId, + ideSettings, ); if (!configYamlResult.config || configYamlResult.configLoadInterrupted) { diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index dee4d7ef4..77a3dc108 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -5,6 +5,7 @@ import { FQSN, FullSlug, SecretResult, + SecretType, } from "@continuedev/config-yaml"; import fetch, { RequestInit, Response } from "node-fetch"; @@ -46,7 +47,14 @@ export class ControlPlaneClient { ): Promise<(SecretResult | undefined)[]> { const userId = await this.userId; if (!userId) { - throw new Error("No user id"); + return fqsns.map((fqsn) => ({ + found: false, + fqsn, + secretLocation: { + secretName: fqsn.secretName, + secretType: SecretType.NotFound, + }, + })); } const resp = await this.request("ide/sync-secrets", { diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts index 01f62cd00..181db2abd 100644 --- a/core/llm/llms/stubs/ContinueProxy.ts +++ b/core/llm/llms/stubs/ContinueProxy.ts @@ -11,7 +11,7 @@ class ContinueProxy extends OpenAI { this.apiKey = value.workOsAccessToken; if (!this.onPremProxyUrl) { this.apiBase = new URL( - "openai/v1/", + "model-proxy/v1/", value.controlPlaneProxyUrl, ).toString(); } @@ -29,7 +29,7 @@ class ContinueProxy extends OpenAI { this.orgScopeId = options.orgScopeId; this.onPremProxyUrl = options.onPremProxyUrl; if (this.onPremProxyUrl) { - this.apiBase = new URL("openai/v1/", this.onPremProxyUrl).toString(); + this.apiBase = new URL("model-proxy/v1/", this.onPremProxyUrl).toString(); } } diff --git a/core/package-lock.json b/core/package-lock.json index c60459db7..4637becf6 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.758.0", "@aws-sdk/credential-providers": "^3.758.0", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.63", + "@continuedev/config-yaml": "^1.0.67", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.18", @@ -2974,9 +2974,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.63", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.63.tgz", - "integrity": "sha512-KBfyOUU/mWOXeNf6v+4IfMkbvfEEe/YP6n/g/reJBhrpApchG2A/P11JviH87N2To1SrhZxnW//0g5FIGupDFw==", + "version": "1.0.67", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.67.tgz", + "integrity": "sha512-RbJXSH2Z9XmaN1h9Dm0Qfru7UeAdCAEWMiEgJ9A2FGHysR9oxbQDqptk1Y61oDSpYeX+lWsxkz/SFIc2PjNnKg==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index 850c7752b..5acd99675 100644 --- a/core/package.json +++ b/core/package.json @@ -47,7 +47,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.758.0", "@aws-sdk/credential-providers": "^3.758.0", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.63", + "@continuedev/config-yaml": "^1.0.67", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.18", diff --git a/gui/package-lock.json b/gui/package-lock.json index 3dfd16013..a5de2c9e8 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "^1.0.63", + "@continuedev/config-yaml": "^1.0.67", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -111,7 +111,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.758.0", "@aws-sdk/credential-providers": "^3.758.0", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.63", + "@continuedev/config-yaml": "^1.0.67", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.18", @@ -554,9 +554,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.63", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.63.tgz", - "integrity": "sha512-KBfyOUU/mWOXeNf6v+4IfMkbvfEEe/YP6n/g/reJBhrpApchG2A/P11JviH87N2To1SrhZxnW//0g5FIGupDFw==", + "version": "1.0.67", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.67.tgz", + "integrity": "sha512-RbJXSH2Z9XmaN1h9Dm0Qfru7UeAdCAEWMiEgJ9A2FGHysR9oxbQDqptk1Y61oDSpYeX+lWsxkz/SFIc2PjNnKg==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/gui/package.json b/gui/package.json index e5af94967..33f326de3 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "^1.0.63", + "@continuedev/config-yaml": "^1.0.67", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 5c00bcb5c..036f912c8 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -133,7 +133,7 @@ export const Button = styled.button` export const SecondaryButton = styled.button` padding: 6px 12px; - margin: 8px 0; + margin: 8px; border-radius: ${defaultBorderRadius}; border: 1px solid ${vscInputBorder}; diff --git a/gui/src/components/mainInput/AtMentionDropdown/index.tsx b/gui/src/components/mainInput/AtMentionDropdown/index.tsx index 176120153..0b354d902 100644 --- a/gui/src/components/mainInput/AtMentionDropdown/index.tsx +++ b/gui/src/components/mainInput/AtMentionDropdown/index.tsx @@ -25,6 +25,7 @@ import { } from "../.."; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; +import { fontSize } from "../../../util"; import FileIcon from "../../FileIcon"; import SafeImg from "../../SafeImg"; import AddDocsDialog from "../../dialogs/AddDocsDialog"; @@ -43,9 +44,7 @@ export function getIconFromDropdownItem( function DropdownIcon(props: { className?: string; item: ComboBoxItem }) { if (props.item.type === "action") { - return ( - - ); + return ; } const provider = @@ -83,7 +82,7 @@ const ItemsDiv = styled.div` box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0px 10px 20px rgba(0, 0, 0, 0.1); - font-size: 0.9rem; + font-size: ${fontSize(-2)}; overflow-x: hidden; overflow-y: auto; max-height: 330px; @@ -100,10 +99,11 @@ const ItemDiv = styled.div` border-radius: 0.4rem; display: block; margin: 0; - padding: 0.2rem 0.4rem; + padding: 2px 4px; text-align: left; width: 100%; color: ${vscForeground}; + font-size: ${fontSize(-2)}; &.is-selected { background-color: ${vscListActiveBackground}; @@ -372,7 +372,7 @@ const AtMentionDropdown = forwardRef((props: AtMentionDropdownProps, ref) => { textAlign: "right", minWidth: "30px", }} - className="ml-2 flex items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-xs" + className="ml-2 flex items-center overflow-hidden overflow-ellipsis whitespace-nowrap" > {loadingSubmenuItem.description} @@ -417,7 +417,7 @@ const AtMentionDropdown = forwardRef((props: AtMentionDropdownProps, ref) => { opacity: isSelected ? 1 : 0, minWidth: "30px", }} - className="ml-2 flex items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-xs" + className="ml-2 flex items-center overflow-hidden overflow-ellipsis whitespace-nowrap" > {item.description} {item.type === "contextProvider" && diff --git a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx index 433770b3d..5a6a27ae2 100644 --- a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx +++ b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx @@ -132,7 +132,6 @@ export function BlockSettingsTopToolbar(props: BlockSettingsTopToolbarProps) {
- ); } diff --git a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index ca04874a0..05e9352f0 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -52,7 +52,7 @@ export function ModelsSection() { } return ( - <> +
handleRoleUpdate("rerank", model)} />
- - + +
); } diff --git a/gui/src/components/modelSelection/ModeSelect.tsx b/gui/src/components/modelSelection/ModeSelect.tsx index 622c56838..66e5be724 100644 --- a/gui/src/components/modelSelection/ModeSelect.tsx +++ b/gui/src/components/modelSelection/ModeSelect.tsx @@ -108,9 +108,10 @@ function ModeSelect() {
{getModeIcon(mode)} @@ -134,7 +135,7 @@ function ModeSelect() {
- + Chat {getMetaKeyLabel()}L
diff --git a/gui/src/components/modelSelection/platform/AssistantSelect.tsx b/gui/src/components/modelSelection/platform/AssistantSelect.tsx index c714d14e1..02755be30 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelect.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelect.tsx @@ -91,7 +91,7 @@ const AssistantSelectOption = ({ {!profile.errors?.length ? ( isLocalProfile(profile) ? ( { e.stopPropagation(); e.preventDefault(); @@ -118,7 +118,7 @@ const AssistantSelectOption = ({ <> { e.preventDefault(); e.stopPropagation(); diff --git a/gui/src/components/modelSelection/platform/shared.tsx b/gui/src/components/modelSelection/platform/shared.tsx new file mode 100644 index 000000000..b617fd34e --- /dev/null +++ b/gui/src/components/modelSelection/platform/shared.tsx @@ -0,0 +1,163 @@ +import { ConfigValidationError } from "@continuedev/config-yaml"; +import { + ArrowTopRightOnSquareIcon, + Cog6ToothIcon, + ExclamationTriangleIcon, +} from "@heroicons/react/24/outline"; +import { useState } from "react"; +import styled from "styled-components"; +import { + defaultBorderRadius, + lightGray, + vscCommandCenterInactiveBorder, +} from "../.."; +import { ToolTip } from "../../gui/Tooltip"; + +export const OptionDiv = styled.div<{ + isDisabled?: boolean; + isSelected?: boolean; +}>` + padding: 6px 12px; + + min-width: 0px; + + ${({ isDisabled, isSelected }) => + !isDisabled && + ` + cursor: pointer; + + &:hover { + background: ${lightGray}33; + } + + ${ + isSelected && + ` + background: ${lightGray}22; + ` + } + `} + + ${({ isDisabled }) => + isDisabled && + ` + opacity: 0.5; + `} +`; + +export const MAX_HEIGHT_PX = 300; + +export const Divider = styled.div` + height: 0.5px; + background-color: ${vscCommandCenterInactiveBorder}; +`; + +interface ModelOptionProps { + children: React.ReactNode; + idx: number; + disabled: boolean; + selected: boolean; + showConfigure: boolean; + onOpenConfig: () => void; + onClick: () => void; + errors?: ConfigValidationError[]; + onClickError?: (e: any) => void; +} + +const IconBase = styled.div<{ $hovered: boolean }>` + width: 1.2em; + height: 1.2em; + cursor: pointer; + padding: 4px; + border-radius: ${defaultBorderRadius}; + opacity: ${(props) => (props.$hovered ? 0.75 : 0)}; + visibility: ${(props) => (props.$hovered ? "visible" : "hidden")}; + + &:hover { + opacity: 1; + background-color: ${lightGray}33; + } +`; + +const StyledCog6ToothIcon = styled(IconBase).attrs({ as: Cog6ToothIcon })``; +const StyledArrowTopRightOnSquareIcon = styled(IconBase).attrs({ + as: ArrowTopRightOnSquareIcon, +})``; +const StyledExclamationTriangleIcon = styled(IconBase).attrs({ + as: ExclamationTriangleIcon, +})``; + +export function Option({ + children, + idx, + disabled, + onClick, + showConfigure, + selected, + errors, + onClickError, + onOpenConfig, +}: ModelOptionProps) { + const [hovered, setHovered] = useState(false); + + function handleOptionClick(e: any) { + if (disabled) { + e.preventDefault(); + e.stopPropagation(); + } + onClick(); + } + + return ( + setHovered(true)} + onMouseLeave={() => setHovered(false)} + isSelected={selected} + onClick={!disabled ? handleOptionClick : undefined} + > +
+
+ {children} +
+ {!errors?.length ? ( + showConfigure ? ( + { + e.stopPropagation(); + e.preventDefault(); + onOpenConfig(); + }} + /> + ) : ( + { + e.stopPropagation(); + e.preventDefault(); + onOpenConfig(); + }} + /> + ) + ) : ( + <> + + +
Errors
+ {JSON.stringify(errors, null, 2)} +
+ + )} +
+
+
+
+ ); +} diff --git a/gui/src/components/ui/Listbox.tsx b/gui/src/components/ui/Listbox.tsx index a633cf3bd..034fded69 100644 --- a/gui/src/components/ui/Listbox.tsx +++ b/gui/src/components/ui/Listbox.tsx @@ -5,7 +5,7 @@ import { Listbox, } from "@headlessui/react"; import * as React from "react"; -import { vscCommandCenterInactiveBorder } from ".."; +import { defaultBorderRadius, vscCommandCenterInactiveBorder } from ".."; import { cn } from "../../util/cn"; import { FontSizeModifier, useFontSize } from "./font"; @@ -21,11 +21,12 @@ const ListboxButton = React.forwardRef( ref={ref} {...props} className={cn( - "border-vsc-input-border bg-vsc-input-background text-vsc-foreground m-0 flex flex-1 cursor-pointer flex-row items-center gap-1 rounded-sm border border-solid px-1 py-0.5 text-left transition-colors duration-200", + "border-vsc-input-border bg-vsc-input-background text-vsc-foreground m-0 flex flex-1 cursor-pointer flex-row items-center gap-1 border border-solid px-1 py-0.5 text-left transition-colors duration-200", props.className, )} style={{ fontSize, + borderRadius: defaultBorderRadius, ...props.style, }} /> @@ -45,12 +46,13 @@ const ListboxOptions = React.forwardRef( anchor={"bottom start"} {...props} className={cn( - "bg-vsc-input-background flex flex-col overflow-auto rounded-sm px-0 shadow-md", + "bg-vsc-input-background flex flex-col overflow-auto px-0 shadow-md", props.className, )} style={{ border: `1px solid ${vscCommandCenterInactiveBorder}`, fontSize, + borderRadius: defaultBorderRadius, ...props.style, }} /> diff --git a/gui/src/pages/config/AccountButton.tsx b/gui/src/pages/config/AccountButton.tsx index 4120ff505..5d06ddd57 100644 --- a/gui/src/pages/config/AccountButton.tsx +++ b/gui/src/pages/config/AccountButton.tsx @@ -15,7 +15,12 @@ export function AccountButton() { if (!session) { return ( - login(false)}>Sign in + login(false)} + > + Sign in + ); } diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index b395588ea..d7d96c4f0 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.63", + "version": "1.0.67", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/registryClient.ts b/packages/config-yaml/src/registryClient.ts index 66e7f9549..d6d3f28fc 100644 --- a/packages/config-yaml/src/registryClient.ts +++ b/packages/config-yaml/src/registryClient.ts @@ -2,9 +2,24 @@ import { Registry } from "./interfaces/index.js"; import { FullSlug } from "./interfaces/slugs.js"; export class RegistryClient implements Registry { + constructor( + private readonly accessToken?: string, + private readonly apiBase: string = "https://api.continue.dev/", + ) { + if (!this.apiBase.endsWith("/")) { + this.apiBase += "/"; + } + } async getContent(fullSlug: FullSlug): Promise { const response = await fetch( - `https://api.continue.dev/registry/v1/${fullSlug.ownerSlug}/${fullSlug.packageSlug}/${fullSlug.versionSlug}`, + `${this.apiBase}registry/v1/${fullSlug.ownerSlug}/${fullSlug.packageSlug}/${fullSlug.versionSlug}`, + { + headers: { + ...(this.accessToken + ? { Authorization: `Bearer ${this.accessToken}` } + : {}), + }, + }, ); const data = await response.json(); return data.content;