From 4341d240e574e774d5f6c6f7beae10eec5df8226 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 10:57:33 -0700 Subject: [PATCH 01/12] fix kb shortcut for jb --- gui/src/components/modelSelection/ModeSelect.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/src/components/modelSelection/ModeSelect.tsx b/gui/src/components/modelSelection/ModeSelect.tsx index afc0588fa..8757f6694 100644 --- a/gui/src/components/modelSelection/ModeSelect.tsx +++ b/gui/src/components/modelSelection/ModeSelect.tsx @@ -157,7 +157,10 @@ function ModeSelect() { Chat - {getMetaKeyLabel()}L + + {getMetaKeyLabel()} + {jetbrains ? "J" : "L"} + {mode === "chat" && } From 3f83c0852385a8c136b0a8fd420c66726d1514df Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 11:01:11 -0700 Subject: [PATCH 02/12] better border color in models section --- gui/src/pages/config/ModelRoleSelector.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gui/src/pages/config/ModelRoleSelector.tsx b/gui/src/pages/config/ModelRoleSelector.tsx index bd777c44b..9c95f048b 100644 --- a/gui/src/pages/config/ModelRoleSelector.tsx +++ b/gui/src/pages/config/ModelRoleSelector.tsx @@ -2,7 +2,10 @@ import { Listbox, Transition } from "@headlessui/react"; import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/24/outline"; import { type ModelDescription } from "core"; import { Fragment } from "react"; -import { defaultBorderRadius } from "../../components"; +import { + defaultBorderRadius, + vscCommandCenterInactiveBorder, +} from "../../components"; import { ToolTip } from "../../components/gui/Tooltip"; import InfoHover from "../../components/InfoHover"; import { fontSize } from "../../util"; @@ -46,7 +49,11 @@ const ModelRoleSelector = ({
0 ? "hover:bg-vsc-input-background cursor-pointer" : "cursor-not-allowed opacity-50"} text-vsc-foreground relative m-0 flex w-full items-center justify-between rounded-md border border-solid px-1.5 py-0.5 text-left text-sm`} + style={{ + border: `1px solid ${vscCommandCenterInactiveBorder}`, + borderRadius: defaultBorderRadius, + }} + className={`bg-vsc-background ${models.length > 0 ? "hover:bg-vsc-input-background cursor-pointer" : "cursor-not-allowed opacity-50"} text-vsc-foreground relative m-0 flex w-full items-center justify-between px-1.5 py-0.5 text-left text-sm`} > {models.length === 0 ? ( {models.map((option, idx) => ( Date: Sun, 23 Mar 2025 11:10:32 -0700 Subject: [PATCH 03/12] make atmentiondropdown match size better --- .../mainInput/AtMentionDropdown/index.tsx | 14 +-- .../mainInput/Lump/sections/ModelsSection.tsx | 108 +++++++++--------- 2 files changed, 63 insertions(+), 59 deletions(-) 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/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index cd16e8453..fa061716f 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -11,6 +11,7 @@ import { updateConfig, } from "../../../../redux/slices/configSlice"; import { isJetBrains } from "../../../../util"; +import { AddBlockButton } from "./AddBlockButton"; export function ModelsSection() { const { selectedProfile } = useAuth(); @@ -51,60 +52,63 @@ export function ModelsSection() { } return ( -
- handleChatModelSelection(model)} - /> - handleRoleUpdate("autocomplete", model)} - /> - {/* Jetbrains has a model selector inline */} - {!jetbrains && ( +
+
handleRoleUpdate("edit", model)} + displayName="Chat" + description="Used in the chat interface" + models={config.modelsByRole.chat} + selectedModel={ + selectedChatModel + ? { + title: selectedChatModel.title, + provider: selectedChatModel.provider, + model: selectedChatModel.model, + } + : null + } + onSelect={(model) => handleChatModelSelection(model)} /> - )} - handleRoleUpdate("apply", model)} - /> - handleRoleUpdate("embed", model)} - /> - handleRoleUpdate("rerank", model)} - /> + handleRoleUpdate("autocomplete", model)} + /> + {/* Jetbrains has a model selector inline */} + {!jetbrains && ( + handleRoleUpdate("edit", model)} + /> + )} + handleRoleUpdate("apply", model)} + /> + handleRoleUpdate("embed", model)} + /> + handleRoleUpdate("rerank", model)} + /> +
+
); } From fd7f3dc93b0208a5de051da3cc1ebef482f3c8e8 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 13:06:19 -0700 Subject: [PATCH 04/12] load secrets from local config --- core/config/ConfigHandler.ts | 2 +- .../profile/ControlPlaneProfileLoader.ts | 1 + core/config/profile/LocalProfileLoader.ts | 1 + core/config/profile/PlatformProfileLoader.ts | 7 +++--- core/config/profile/doLoadConfig.ts | 3 ++- core/config/yaml/loadYaml.ts | 22 ++++++++++--------- extensions/vscode/package-lock.json | 4 ++-- 7 files changed, 23 insertions(+), 17 deletions(-) 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 1ca54337b..1a522eaf6 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -44,19 +44,22 @@ import { modifyAnyConfigWithSharedConfig } from "../sharedConfig"; 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; - }); + 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, ): Promise> { let config = overrideConfigYaml ?? @@ -72,8 +75,8 @@ async function loadConfigYaml( { currentUserSlug: "", onPremProxyUrl: null, - orgScopeId: null, - platformClient: new LocalPlatformClient(), + orgScopeId, + platformClient: new LocalPlatformClient(orgScopeId, controlPlaneClient), renderSecrets: true, }, )); @@ -387,7 +390,6 @@ async function configYamlToContinueConfig( export async function loadContinueConfigFromYaml( ide: IDE, - workspaceConfigs: string[], ideSettings: IdeSettings, ideInfo: IdeInfo, uniqueId: string, @@ -397,6 +399,7 @@ export async function loadContinueConfigFromYaml( platformConfigMetadata: PlatformConfigMetadata | undefined, controlPlaneClient: ControlPlaneClient, configYamlPath: string | undefined, + orgScopeId: string | null, ): Promise> { const rawYaml = overrideConfigYaml === undefined @@ -407,11 +410,10 @@ export async function loadContinueConfigFromYaml( : ""; const configYamlResult = await loadConfigYaml( - workspaceConfigs, rawYaml, overrideConfigYaml, - ide, controlPlaneClient, + orgScopeId, ); if (!configYamlResult.config || configYamlResult.configLoadInterrupted) { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e8f7b966b..f1b847bfa 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.13", + "version": "1.1.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.13", + "version": "1.1.14", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", From 588dda88225df4a2268fa390582da505ae2969ab Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 13:23:27 -0700 Subject: [PATCH 05/12] use model-proxy endpoint instead of /openai to avoid confusion --- core/llm/llms/stubs/ContinueProxy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } } From f5802fd77035bd79d345f14467d83b20a8c19ab2 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 13:25:41 -0700 Subject: [PATCH 06/12] ui polish --- gui/src/components/modelSelection/ModeSelect.tsx | 9 +++++++-- gui/src/components/modelSelection/ModelSelect.tsx | 11 ++++++++--- gui/src/components/modelSelection/platform/shared.tsx | 8 ++++++-- gui/src/pages/config/AccountButton.tsx | 7 ++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/gui/src/components/modelSelection/ModeSelect.tsx b/gui/src/components/modelSelection/ModeSelect.tsx index 8757f6694..340db7604 100644 --- a/gui/src/components/modelSelection/ModeSelect.tsx +++ b/gui/src/components/modelSelection/ModeSelect.tsx @@ -11,7 +11,12 @@ import { MessageModes } from "core"; import { modelSupportsTools } from "core/llm/autodetect"; import { useEffect } from "react"; import styled from "styled-components"; -import { defaultBorderRadius, lightGray, vscInputBackground } from ".."; +import { + defaultBorderRadius, + lightGray, + vscCommandCenterInactiveBorder, + vscInputBackground, +} from ".."; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { selectDefaultModel } from "../../redux/slices/configSlice"; import { @@ -51,7 +56,7 @@ const StyledListboxOptions = styled(Listbox.Options)` display: flex; flex-direction: column; border-radius: ${defaultBorderRadius}; - border: 0.5px solid ${lightGray}; + border: 1px solid ${vscCommandCenterInactiveBorder}; background-color: ${vscInputBackground}; `; diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 437e2304f..125ae410b 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -9,7 +9,12 @@ import { import { useContext, useEffect, useRef, useState } from "react"; import { useDispatch } from "react-redux"; import styled from "styled-components"; -import { defaultBorderRadius, lightGray, vscInputBackground } from ".."; +import { + defaultBorderRadius, + lightGray, + vscCommandCenterInactiveBorder, + vscInputBackground, +} from ".."; import { useAuth } from "../../context/Auth"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import AddModelForm from "../../forms/AddModelForm"; @@ -66,7 +71,7 @@ const StyledListboxOptions = styled(Listbox.Options)<{ $showabove: boolean }>` font-size: ${fontSize(-3)}; border-radius: ${defaultBorderRadius}; - border: 0.5px solid ${lightGray}; + border: 1px solid ${vscCommandCenterInactiveBorder}; background-color: ${vscInputBackground}; max-height: ${MAX_HEIGHT_PX}px; @@ -318,7 +323,7 @@ function ModelSelect() {
- + {sortedOptions.length > 0 && } {selectedProfile?.profileType === "local" && ( <> diff --git a/gui/src/components/modelSelection/platform/shared.tsx b/gui/src/components/modelSelection/platform/shared.tsx index 627d39133..b617fd34e 100644 --- a/gui/src/components/modelSelection/platform/shared.tsx +++ b/gui/src/components/modelSelection/platform/shared.tsx @@ -6,7 +6,11 @@ import { } from "@heroicons/react/24/outline"; import { useState } from "react"; import styled from "styled-components"; -import { defaultBorderRadius, lightGray } from "../.."; +import { + defaultBorderRadius, + lightGray, + vscCommandCenterInactiveBorder, +} from "../.."; import { ToolTip } from "../../gui/Tooltip"; export const OptionDiv = styled.div<{ @@ -45,7 +49,7 @@ export const MAX_HEIGHT_PX = 300; export const Divider = styled.div` height: 0.5px; - background-color: ${lightGray}; + background-color: ${vscCommandCenterInactiveBorder}; `; interface ModelOptionProps { diff --git a/gui/src/pages/config/AccountButton.tsx b/gui/src/pages/config/AccountButton.tsx index 0eaf4e471..03c050228 100644 --- a/gui/src/pages/config/AccountButton.tsx +++ b/gui/src/pages/config/AccountButton.tsx @@ -11,7 +11,12 @@ export function AccountButton() { if (!session) { return ( - login(false)}>Sign in + login(false)} + > + Sign in + ); } From c946c51b7eef7807260dec59b5e8e91b75b6bbd9 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 13:26:00 -0700 Subject: [PATCH 07/12] ui polish --- gui/src/components/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index e4aad87c2..37dbc2441 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}; From 6c5405f7788acca3f70aaddcdf3f36dc52f21bf0 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 14:18:17 -0700 Subject: [PATCH 08/12] allow loading private packages from local yaml --- core/config/yaml/loadYaml.ts | 11 ++++++++++- core/package-lock.json | 8 ++++---- core/package.json | 2 +- extensions/vscode/package-lock.json | 2 +- gui/package-lock.json | 10 +++++----- gui/package.json | 2 +- packages/config-yaml/package.json | 2 +- packages/config-yaml/src/registryClient.ts | 17 ++++++++++++++++- 8 files changed, 39 insertions(+), 15 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 1a522eaf6..98a4d96e5 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -41,6 +41,7 @@ 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 { @@ -60,6 +61,7 @@ async function loadConfigYaml( overrideConfigYaml: AssistantUnrolled | undefined, controlPlaneClient: ControlPlaneClient, orgScopeId: string | null, + ideSettings: IdeSettings, ): Promise> { let config = overrideConfigYaml ?? @@ -71,7 +73,13 @@ async function loadConfigYaml( versionSlug: "", }, rawYaml, - new RegistryClient(), + new RegistryClient( + await controlPlaneClient.getAccessToken(), + getControlPlaneEnvSync( + ideSettings.continueTestEnvironment, + ideSettings.enableControlServerBeta, + ).CONTROL_PLANE_URL, + ), { currentUserSlug: "", onPremProxyUrl: null, @@ -414,6 +422,7 @@ export async function loadContinueConfigFromYaml( overrideConfigYaml, controlPlaneClient, orgScopeId, + ideSettings, ); if (!configYamlResult.config || configYamlResult.configLoadInterrupted) { diff --git a/core/package-lock.json b/core/package-lock.json index 765c3541e..f414891dd 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", @@ -2973,9 +2973,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 a60eda4ad..7583ef044 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,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/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f1b847bfa..6f0f06497 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -106,7 +106,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.66", "@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 b0918360d..2d8b0125d 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": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -109,7 +109,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", @@ -551,9 +551,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 6724bd757..20df90df1 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": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", 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; From 2fd8112588d57e321116a6abece0c5b67a496d2b Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 14:18:41 -0700 Subject: [PATCH 09/12] bump package.json --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index c96eee528..b855a8248 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "1.1.14", + "version": "1.1.15", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 5ec3f88b87f67e891ff7770a3288e3ccfaf6806e Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 23 Mar 2025 15:55:44 -0700 Subject: [PATCH 10/12] fix loading hub blocks when signed out --- core/config/yaml/loadYaml.ts | 4 + core/control-plane/client.ts | 10 ++- .../mainInput/Lump/sections/RulesSection.tsx | 88 +++++++++---------- 3 files changed, 54 insertions(+), 48 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 98a4d96e5..fdeffce07 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -51,6 +51,10 @@ export class LocalPlatformClient implements PlatformClient { ) {} async resolveFQSNs(fqsns: FQSN[]): Promise<(SecretResult | undefined)[]> { + if (fqsns.length === 0) { + return []; + } + const response = await this.client.resolveFQSNs(fqsns, this.orgScopeId); return response; } 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/gui/src/components/mainInput/Lump/sections/RulesSection.tsx b/gui/src/components/mainInput/Lump/sections/RulesSection.tsx index 200472b22..d24316e9e 100644 --- a/gui/src/components/mainInput/Lump/sections/RulesSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/RulesSection.tsx @@ -86,62 +86,56 @@ export function RulesSection() { }); return ( -
- {mergedRules.length === 0 ? ( -
-

No rules defined yet

-
- ) : ( -
- {mergedRules.map((rule, index) => { - if (!rule.ruleFromYaml) { - return ( - - ideMessenger.post("config/openProfile", { - profileId: undefined, - }) - } - title="Locally Defined Rule" - /> - ); - } +
+
+ {mergedRules.map((rule, index) => { + if (!rule.ruleFromYaml) { + return ( + + ideMessenger.post("config/openProfile", { + profileId: undefined, + }) + } + title="Locally Defined Rule" + /> + ); + } - if (typeof rule.ruleFromYaml === "string") { - const slug = `${selectedProfile?.fullSlug.ownerSlug}/${selectedProfile?.fullSlug.packageSlug}`; - - return ( - openUrl(`${slug}/new-version`)} - title="Inline Rule" - /> - ); - } - - if (!rule.ruleFromYaml?.uses) { - return null; - } - - const ruleSlug = rule.ruleFromYaml?.uses; + if (typeof rule.ruleFromYaml === "string") { + const slug = `${selectedProfile?.fullSlug.ownerSlug}/${selectedProfile?.fullSlug.packageSlug}`; return ( openUrl(`${ruleSlug}/new-version`)} - title={ruleSlug} + onClick={() => openUrl(`${slug}/new-version`)} + title="Inline Rule" /> ); - })} -
- )} + } + + if (!rule.ruleFromYaml?.uses) { + return null; + } + + const ruleSlug = rule.ruleFromYaml?.uses; + + return ( + openUrl(`${ruleSlug}/new-version`)} + title={ruleSlug} + /> + ); + })} +
); From 4f968220ca6c20072b12b5529399ce5f4449f5d6 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 25 Mar 2025 00:34:12 -0700 Subject: [PATCH 11/12] fix --- gui/src/components/mainInput/Lump/sections/ModelsSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index fa061716f..05e9352f0 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -11,7 +11,7 @@ import { updateConfig, } from "../../../../redux/slices/configSlice"; import { isJetBrains } from "../../../../util"; -import { AddBlockButton } from "./AddBlockButton"; +import { ExploreBlocksButton } from "./ExploreBlocksButton"; export function ModelsSection() { const { selectedProfile } = useAuth(); @@ -108,7 +108,7 @@ export function ModelsSection() { onSelect={(model) => handleRoleUpdate("rerank", model)} />
- +
); } From adc0f9b9cb886dc2f68321473b0f3dc3e1b3c7af Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 25 Mar 2025 00:51:22 -0700 Subject: [PATCH 12/12] ui fixes --- extensions/vscode/package-lock.json | 6 +++--- .../components/mainInput/Lump/BlockSettingsTopToolbar.tsx | 1 - gui/src/components/modelSelection/ModeSelect.tsx | 5 +++-- .../modelSelection/platform/AssistantSelect.tsx | 6 +++--- gui/src/components/ui/Listbox.tsx | 8 +++++--- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index bf6d80f2a..00ae46772 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.14", + "version": "1.1.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.14", + "version": "1.1.15", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,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.66", + "@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/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/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/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, }} />