Merge pull request #4499 from continuedev/pe/assistant-name-not-slug

feat: smaller headings, use assistant name
This commit is contained in:
Nate Sesti 2025-03-12 16:18:10 -07:00 • committed by GitHub
commit 7c9c6b0806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 149 additions and 114 deletions

View file

@ -9,7 +9,7 @@ keywords: [config, settings, customize]
Continue can be deeply customized. Local user-level configuration is stored and can be edited in your home directory in `config.yaml`:
To open `config.yaml`, you can click the "gear" icon in the header of the Continue Chat sidebar to open the settings page, and then click `Open Config File` to open the file. When editing this file, you can see the available options suggested as you type, or check the reference below.
To open `config.yaml`, you can click the "gear" icon in the header of the Continue Chat sidebar to open the settings page, and then click `Open Assistant configuration` to open the file. When editing this file, you can see the available options suggested as you type, or check the reference below.
- `~/.continue/config.yaml` (MacOS / Linux)
- `%USERPROFILE%\.continue\config.yaml` (Windows)

View file

@ -21,7 +21,7 @@ Most custom configuration is done by editing `config.yaml` (or the older `config
- MacOS and Linux: `~/.continue/config.yaml`
- Windows: `%USERPROFILE%\.continue\config.yaml`
You can easily access config file from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the "gear" icon in header to open the Settings page. Then click the button labeled `Open configuration file`.
You can easily access config file from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the "gear" icon in header to open the Settings page. Then click the button labeled `Open Assistant configuration`.
![configure-continue](/img/configure-continue.png)

View file

@ -14,7 +14,7 @@ Which takes you to this page:
![User Settings Page](/img/settings-page.png)
Click the `Open Config File` button to open your configuration file. See the [Configuration Reference](../reference.md) for more information.
Click the `Open Assistant configuration` button to open your configuration file. See the [Configuration Reference](../reference.md) for more information.
Below that, the following settings which are not part of a configuration file are available:

View file

@ -5,11 +5,12 @@ import { Range } from "core";
import { EXTENSION_NAME } from "core/control-plane/env";
import { GetGhTokenArgs } from "core/protocol/ide";
import { editConfigJson, getConfigJsonPath } from "core/util/paths";
import * as URI from "uri-js";
import * as vscode from "vscode";
import * as URI from "uri-js";
import { executeGotoProvider } from "./autocomplete/lsp";
import { Repository } from "./otherExtensions/git";
import { SecretStorage } from "./stubs/SecretStorage";
import { VsCodeIdeUtils } from "./util/ideUtils";
import { getExtensionUri, openEditorAndRevealRange } from "./util/vscode";
import { VsCodeWebviewProtocol } from "./webviewProtocol";
@ -28,7 +29,6 @@ import type {
TerminalOptions,
Thread,
} from "core";
import { SecretStorage } from "./stubs/SecretStorage";
class VsCodeIde implements IDE {
ideUtils: VsCodeIdeUtils;
@ -212,7 +212,7 @@ class VsCodeIde implements IDE {
.showInformationMessage(
"We'll only ask you to log in if using the free trial. To avoid this prompt, make sure to remove free trial models from your config.json",
"Remove for me",
"Open config.json",
"Open Assistant configuration",
)
.then((selection) => {
if (selection === "Remove for me") {
@ -223,7 +223,7 @@ class VsCodeIde implements IDE {
configJson.tabAutocompleteModel = undefined;
return configJson;
});
} else if (selection === "Open config.json") {
} else if (selection === "Open Assistant configuration") {
this.openFile(getConfigJsonPath());
}
});

View file

@ -4,15 +4,23 @@ export interface PageHeaderProps {
onTitleClick?: () => void;
title?: string;
rightContent?: React.ReactNode;
showBorder?: boolean; // Added this prop
}
export default function PageHeader({
onTitleClick,
title,
rightContent,
showBorder,
}: PageHeaderProps) {
return (
<div className="bg-vsc-background sticky top-0 z-20 m-0 flex items-center justify-between border-b-zinc-700 bg-inherit py-0.5">
<div
className={`bg-vsc-background sticky top-0 z-20 m-0 flex items-center justify-between bg-inherit py-0.5 ${
showBorder
? "border-0 border-b-[1px] border-solid border-b-zinc-700"
: ""
}`}
>
<div className="flex items-center">
{title && (
<div

View file

@ -36,6 +36,30 @@ const StyledMarkdown = styled.div<{
whiteSpace: string;
bgColor: string;
}>`
h1 {
font-size: 1.25em;
}
h2 {
font-size: 1.15em;
}
h3 {
font-size: 1.05em;
}
h4 {
font-size: 1em;
}
h5 {
font-size: 0.95em;
}
h6 {
font-size: 0.9em;
}
pre {
white-space: ${(props) => props.whiteSpace};
background-color: ${vscEditorBackground};

View file

@ -10,7 +10,6 @@ import { getFontSize, isMetaEquivalentKeyPressed } from "../../../util";
import PopoverTransition from "../../mainInput/InputToolbar/PopoverTransition";
import AssistantIcon from "./AssistantIcon";
import { AssistantSelectOptions } from "./AssistantSelectOptions";
import { getProfileDisplayText } from "./utils";
function AssistantSelectButton(props: { selectedProfile: ProfileDescription }) {
return (
@ -18,9 +17,7 @@ function AssistantSelectButton(props: { selectedProfile: ProfileDescription }) {
<div className="mr-1 h-4 w-4 flex-shrink-0">
<AssistantIcon assistant={props.selectedProfile} />
</div>
<span className="truncate">
{getProfileDisplayText(props.selectedProfile)}
</span>
<span className="truncate">{props.selectedProfile.title}</span>
<ChevronDownIcon className="h-3 w-3 flex-shrink-0" aria-hidden="true" />
</div>
);
@ -29,7 +26,7 @@ function AssistantSelectButton(props: { selectedProfile: ProfileDescription }) {
export default function AssistantSelect() {
const dispatch = useAppDispatch();
const buttonRef = useRef<HTMLButtonElement>(null);
const { selectedProfile, selectedOrganization, profiles } = useAuth();
const { selectedProfile, selectedOrganization } = useAuth();
const ideMessenger = useContext(IdeMessengerContext);
useEffect(() => {
@ -87,7 +84,7 @@ export default function AssistantSelect() {
</Popover.Button>
<PopoverTransition>
<Popover.Panel className="bg-vsc-input-background absolute right-0 top-full z-[1000] mr-1 mt-1 flex max-w-[90vw] cursor-default flex-row overflow-hidden rounded-md border border-gray-400 p-0">
<Popover.Panel className="bg-vsc-input-background absolute right-0 top-full z-[1000] mr-1 mt-1 flex min-w-[200px] max-w-[90vw] cursor-default flex-row overflow-hidden rounded-md border-2 border-zinc-600 p-0">
<AssistantSelectOptions
onClose={() => {
if (buttonRef.current) {

View file

@ -11,7 +11,6 @@ import { getFontSize, getMetaKeyLabel, isLocalProfile } from "../../../util";
import { ROUTES } from "../../../util/navigation";
import AssistantIcon from "./AssistantIcon";
import { Divider, Option, OptionDiv } from "./shared";
import { getProfileDisplayText } from "./utils";
interface AssistantSelectOptionsProps {
onClose: () => void;
@ -49,8 +48,8 @@ export function AssistantSelectOptions({
}
return (
<div className="border-lightgray flex min-w-0 flex-col overflow-x-hidden pt-0">
<div className={`max-h-[300px]`}>
<div className="border-lightgray flex w-full flex-col overflow-x-hidden pt-0">
<div className={`max-h-[300px] w-full`}>
{profiles.map((profile, idx) => {
return (
<Option
@ -69,7 +68,7 @@ export function AssistantSelectOptions({
onClose();
}}
>
<div className="flex min-w-0 items-center">
<div className="flex w-full items-center">
<div className="mr-2 h-4 w-4 flex-shrink-0">
<AssistantIcon assistant={profile} />
</div>
@ -77,7 +76,7 @@ export function AssistantSelectOptions({
className="flex-1 truncate"
style={{ fontSize: getFontSize() - 2 }}
>
{getProfileDisplayText(profile)}
{profile.title}
</span>
</div>
</Option>

View file

@ -1,5 +0,0 @@
import { ProfileDescription } from "core/config/ProfileLifecycleManager";
export function getProfileDisplayText(profile: ProfileDescription): string {
return profile.title;
}

View file

@ -227,7 +227,7 @@ function AddNewModel() {
>
<h3 className="my-2 text-center">
<Cog6ToothIcon className="inline-block h-5 w-5 px-4 align-middle" />
Open config.json
Open Assistant configuration
</h3>
</CustomModelButton>
</div>

View file

@ -14,7 +14,7 @@ const STATUS_TO_SUBTITLE_TEXT: Record<
indexing: "Click to pause",
paused: "Click to resume",
failed: "Click to retry",
disabled: "Click to open config",
disabled: "Click to open assistant configuration",
cancelled: "Click to restart",
};

View file

@ -26,7 +26,7 @@ function MorePage() {
return (
<div className="overflow-y-scroll">
<PageHeader onTitleClick={() => navigate("/")} title="Chat" />
<PageHeader showBorder onTitleClick={() => navigate("/")} title="Chat" />
<div className="gap-2 divide-x-0 divide-y-2 divide-solid divide-zinc-700 px-4">
<div className="py-5">

View file

@ -1,9 +1,11 @@
import { ModelRole } from "@continuedev/config-yaml";
import { Listbox, Transition } from "@headlessui/react";
import {
ArrowTopRightOnSquareIcon,
CheckIcon,
ChevronUpDownIcon,
PlusCircleIcon,
UserCircleIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
import { ModelDescription } from "core";
@ -177,12 +179,12 @@ function ConfigPage() {
return (
<div className="overflow-y-scroll">
<PageHeader onTitleClick={() => navigate("/")} title="Chat" />
<PageHeader showBorder onTitleClick={() => navigate("/")} title="Chat" />
<div className="divide-x-0 divide-y-2 divide-solid divide-zinc-700 px-4">
<div className="divide-x-0 divide-y-2 divide-solid divide-zinc-700 px-4 pt-4">
{(session || hubEnabled || controlServerBetaEnabled) && (
<div className="flex flex-col">
<div className="flex max-w-[400px] flex-col gap-4 py-4">
<div className="flex max-w-[400px] flex-col gap-4 pb-4">
<h2 className="mb-1 mt-0">Account</h2>
{!session ? (
<div className="flex flex-col gap-2">
@ -193,26 +195,19 @@ function ConfigPage() {
</div>
) : (
<div className="flex flex-col gap-4">
{hubEnabled ? (
// Hub: show org selector
<div className="flex flex-col gap-1.5">
<span className="text-lightgray">{`Organization`}</span>
<ScopeSelect />
</div>
) : (
// Continue for teams: show org text
<div>You are using Continue for Teams</div>
)}
<div className="flex flex-row items-center gap-2">
<span className="text-lightgray">
<UserCircleIcon className="h-6 w-6" />
<span>
{session.account.label === ""
? "Signed in"
: `Signed in as ${session.account.label}`}
: session.account.label}
</span>
<span
onClick={logout}
className="text-lightgray cursor-pointer underline"
>{`Sign out`}</span>
>
(Sign out)
</span>
</div>
</div>
)}
@ -223,10 +218,25 @@ function ConfigPage() {
<div className="flex flex-col">
<div className="flex max-w-[400px] flex-col gap-4 py-6">
<h2 className="mb-1 mt-0">Configuration</h2>
{hubEnabled ? (
// Hub: show org selector
session && (
<div className="flex flex-col gap-1.5">
<span className="text-lightgray text-sm">{`Organization`}</span>
<ScopeSelect />
</div>
)
) : (
// Continue for teams: show org text
<div>You are using Continue for Teams</div>
)}
{profiles ? (
<>
<div className="flex flex-col gap-1.5">
<span className="text-lightgray">{`${hubEnabled ? "Assistant" : "Profile"}`}</span>
<div className="flex items-center justify-between gap-1.5 text-sm">
<span className="text-lightgray">{`${hubEnabled ? "Assistant" : "Profile"}`}</span>
</div>
<Listbox
value={selectedProfile?.id}
onChange={changeProfileId}
@ -291,87 +301,89 @@ function ConfigPage() {
)}
</Listbox.Options>
</Transition>
{selectedProfile && (
<div className="mt-3 flex w-full justify-center">
<span
className="text-lightgray flex cursor-pointer items-center gap-1 hover:underline"
onClick={handleOpenConfig}
>
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
{hubEnabled
? "Open Assistant configuration"
: "View Workspace"}
</span>
</div>
)}
</div>
)}
</Listbox>
</div>
{selectedProfile && (
<SecondaryButton onClick={handleOpenConfig}>
{selectedProfile.profileType === "local"
? "Open Config File"
: hubEnabled
? "Open Assistant"
: "Open Workspace"}
</SecondaryButton>
)}
{/* {hubEnabled && session && (
<div className="flex flex-col gap-1">
<span>{`If your hub secret values may have changed, refresh your assistants`}</span>
<SecondaryButton onClick={refreshProfiles}>
Refresh assistants
</SecondaryButton>
</div>
)} */}
</>
) : (
<div>Loading...</div>
)}
<div>
<h2 className="m-0 mb-3 p-0 text-center text-sm">Model Roles</h2>
<div className="grid grid-cols-1 gap-x-3 gap-y-2 sm:grid-cols-[auto_1fr]">
</div>
</div>
{/* Model Roles as a separate section */}
<div className="flex flex-col">
<div className="flex max-w-[400px] flex-col gap-4 py-6">
<h2 className="mb-1 mt-0">Model Roles</h2>
<div className="grid grid-cols-1 gap-x-3 gap-y-2 sm:grid-cols-[auto_1fr]">
<ModelRoleSelector
displayName="Chat"
description="Used in the chat interface"
models={config.modelsByRole.chat}
selectedModel={{
title: selectedChatModel,
provider: "mock",
model: "mock",
}}
onSelect={(model) => handleChatModelSelection(model)}
/>
<ModelRoleSelector
displayName="Autocomplete"
description="Used to generate code completion suggestions"
models={config.modelsByRole.autocomplete}
selectedModel={config.selectedModelByRole.autocomplete}
onSelect={(model) => handleRoleUpdate("autocomplete", model)}
/>
{/* Jetbrains has a model selector inline */}
{!jetbrains && (
<ModelRoleSelector
displayName="Chat"
description="Used in the chat interface"
models={config.modelsByRole.chat}
selectedModel={{
title: selectedChatModel,
provider: "mock",
model: "mock",
}}
onSelect={(model) => handleChatModelSelection(model)}
displayName="Edit"
description="Used for inline edits"
models={config.modelsByRole.edit}
selectedModel={config.selectedModelByRole.edit}
onSelect={(model) => handleRoleUpdate("edit", model)}
/>
<ModelRoleSelector
displayName="Autocomplete"
description="Used to generate code completion suggestions"
models={config.modelsByRole.autocomplete}
selectedModel={config.selectedModelByRole.autocomplete}
onSelect={(model) => handleRoleUpdate("autocomplete", model)}
/>
{/* Jetbrains has a model selector inline */}
{!jetbrains && (
<ModelRoleSelector
displayName="Edit"
description="Used for inline edits"
models={config.modelsByRole.edit}
selectedModel={config.selectedModelByRole.edit}
onSelect={(model) => handleRoleUpdate("edit", model)}
/>
)}
<ModelRoleSelector
displayName="Apply"
description="Used to apply generated codeblocks to files"
models={config.modelsByRole.apply}
selectedModel={config.selectedModelByRole.apply}
onSelect={(model) => handleRoleUpdate("apply", model)}
/>
<ModelRoleSelector
displayName="Embed"
description="Used to generate and query embeddings for the @codebase and @docs context providers"
models={config.modelsByRole.embed}
selectedModel={config.selectedModelByRole.embed}
onSelect={(model) => handleRoleUpdate("embed", model)}
/>
<ModelRoleSelector
displayName="Rerank"
description="Used for reranking results from the @codebase and @docs context providers"
models={config.modelsByRole.rerank}
selectedModel={config.selectedModelByRole.rerank}
onSelect={(model) => handleRoleUpdate("rerank", model)}
/>
</div>
)}
<ModelRoleSelector
displayName="Apply"
description="Used to apply generated codeblocks to files"
models={config.modelsByRole.apply}
selectedModel={config.selectedModelByRole.apply}
onSelect={(model) => handleRoleUpdate("apply", model)}
/>
<ModelRoleSelector
displayName="Embed"
description="Used to generate and query embeddings for the @codebase and @docs context providers"
models={config.modelsByRole.embed}
selectedModel={config.selectedModelByRole.embed}
onSelect={(model) => handleRoleUpdate("embed", model)}
/>
<ModelRoleSelector
displayName="Rerank"
description="Used for reranking results from the @codebase and @docs context providers"
models={config.modelsByRole.rerank}
selectedModel={config.selectedModelByRole.rerank}
onSelect={(model) => handleRoleUpdate("rerank", model)}
/>
</div>
</div>
</div>
{!controlServerBetaEnabled || hubEnabled ? (
<div className="flex flex-col">
<div className="flex max-w-[400px] flex-col">

View file

@ -100,7 +100,7 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
<div>
<Cog8ToothIcon className="h-4 w-4" />
</div>
<span>Open config</span>
<span>Open Assistant configuration</span>
</SecondaryButton>
);

View file

@ -8,7 +8,7 @@ export default function HistoryPage() {
return (
<div className="overflow-y-scroll" style={{ fontSize: getFontSize() }}>
<PageHeader onTitleClick={() => navigate("/")} title="Chat" />
<PageHeader showBorder onTitleClick={() => navigate("/")} title="Chat" />
<History />
</div>
);