Rename "agent" terminology to "config" throughout the codebase (#8229)
* Rename "agent" terminology to "config" throughout the codebase * chore: bump
This commit is contained in:
parent
f7e69d85db
commit
bcaf5cfeff
20 changed files with 58 additions and 124 deletions
|
|
@ -1,17 +1,14 @@
|
|||
import { IDE } from "..";
|
||||
import { joinPathsToUri } from "../util/uri";
|
||||
|
||||
const DEFAULT_ASSISTANT_FILE = `# This is an example agent configuration file
|
||||
# It is used to define custom AI agents within Continue
|
||||
# Each agent file can be accessed by selecting it from the agent dropdown
|
||||
|
||||
const DEFAULT_ASSISTANT_FILE = `# This is an example configuration file
|
||||
# To learn more, see the full config.yaml reference: https://docs.continue.dev/reference
|
||||
|
||||
name: Example Agent
|
||||
name: Example Config
|
||||
version: 1.0.0
|
||||
schema: v1
|
||||
|
||||
# Models define which AI models this agent can use
|
||||
# Define which models can be used
|
||||
# https://docs.continue.dev/customization/models
|
||||
models:
|
||||
- name: my gpt-5
|
||||
|
|
@ -23,7 +20,7 @@ models:
|
|||
with:
|
||||
ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}
|
||||
|
||||
# MCP Servers the agent can use
|
||||
# MCP Servers that Continue can access
|
||||
# https://docs.continue.dev/customization/mcp-tools
|
||||
mcpServers:
|
||||
- uses: anthropic/memory-mcp
|
||||
|
|
@ -50,7 +47,7 @@ export async function createNewAssistantFile(
|
|||
let assistantFileUri: string;
|
||||
do {
|
||||
const suffix = counter === 0 ? "" : `-${counter}`;
|
||||
assistantFileUri = joinPathsToUri(baseDirUri, `new-agent${suffix}.yaml`);
|
||||
assistantFileUri = joinPathsToUri(baseDirUri, `new-config${suffix}.yaml`);
|
||||
counter++;
|
||||
} while (await ide.fileExists(assistantFileUri));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { ConfigYaml } from "@continuedev/config-yaml";
|
||||
|
||||
export const defaultConfig: ConfigYaml = {
|
||||
name: "Local Agent",
|
||||
name: "Local Config",
|
||||
version: "1.0.0",
|
||||
schema: "v1",
|
||||
models: [],
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default class LocalProfileLoader implements IProfileLoader {
|
|||
iconUrl: "",
|
||||
title: overrideAssistantFile?.path
|
||||
? getUriPathBasename(overrideAssistantFile.path)
|
||||
: "Local Agent",
|
||||
: "Local Config",
|
||||
errors: undefined,
|
||||
uri:
|
||||
overrideAssistantFile?.path ??
|
||||
|
|
@ -47,7 +47,7 @@ export default class LocalProfileLoader implements IProfileLoader {
|
|||
);
|
||||
this.description.title = parsedAssistant.name;
|
||||
} catch (e) {
|
||||
console.error("Failed to parse agent file: ", e);
|
||||
console.error("Failed to parse config file: ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { AssistantUnrolled } from "@continuedev/config-yaml";
|
|||
export const defaultConfigYaml: AssistantUnrolled = {
|
||||
models: [],
|
||||
context: [],
|
||||
name: "Local Agent",
|
||||
name: "Local Config",
|
||||
version: "1.0.0",
|
||||
schema: "v1",
|
||||
};
|
||||
|
|
@ -12,7 +12,7 @@ export const defaultConfigYaml: AssistantUnrolled = {
|
|||
export const defaultConfigYamlJetBrains: AssistantUnrolled = {
|
||||
models: [],
|
||||
context: [],
|
||||
name: "Local Agent",
|
||||
name: "Local Config",
|
||||
version: "1.0.0",
|
||||
schema: "v1",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -881,9 +881,9 @@ export class Core {
|
|||
});
|
||||
}
|
||||
|
||||
// If it's a local agent being created, we want to reload all agent so it shows up in the list
|
||||
// If it's a local config being created, we want to reload all configs so it shows up in the list
|
||||
if (nonColocatedRuleUris.some(isContinueAgentConfigFile)) {
|
||||
await this.configHandler.refreshAll("Local assistant file created");
|
||||
await this.configHandler.refreshAll("Local config file created");
|
||||
} else if (nonColocatedRuleUris.some(isContinueConfigRelatedUri)) {
|
||||
await this.configHandler.reloadConfig(
|
||||
".continue config-related file created",
|
||||
|
|
@ -913,9 +913,9 @@ export class Core {
|
|||
});
|
||||
}
|
||||
|
||||
// If it's a local agent being deleted, we want to reload all agent so it disappears from the list
|
||||
// If it's a local config being deleted, we want to reload all configs so it disappears from the list
|
||||
if (nonColocatedRuleUris.some(isContinueAgentConfigFile)) {
|
||||
await this.configHandler.refreshAll("Local assistant file deleted");
|
||||
await this.configHandler.refreshAll("Local config file deleted");
|
||||
} else if (nonColocatedRuleUris.some(isContinueConfigRelatedUri)) {
|
||||
await this.configHandler.reloadConfig(
|
||||
".continue config-related file deleted",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "1.3.17",
|
||||
"version": "1.3.18",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { SparklesIcon } from "@heroicons/react/24/outline";
|
||||
import { ComputerDesktopIcon, SparklesIcon } from "@heroicons/react/24/outline";
|
||||
import { ProfileDescription } from "core/config/ProfileLifecycleManager";
|
||||
import { isLocalProfile } from "../../util";
|
||||
import { BotIcon } from "../svg/BotIcon";
|
||||
|
||||
export interface AssistantIconProps {
|
||||
assistant: ProfileDescription;
|
||||
|
|
@ -13,7 +12,11 @@ export function AssistantIcon({
|
|||
size = "h-4 w-4",
|
||||
}: AssistantIconProps) {
|
||||
if (isLocalProfile(assistant)) {
|
||||
return <BotIcon className={`text-foreground ${size} flex-shrink-0`} />;
|
||||
return (
|
||||
<ComputerDesktopIcon
|
||||
className={`text-foreground ${size} flex-shrink-0`}
|
||||
/>
|
||||
);
|
||||
} else if (assistant.iconUrl) {
|
||||
return (
|
||||
<img
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export function AssistantOption({
|
|||
}, [profile.errors]);
|
||||
|
||||
function handleOptionClick() {
|
||||
// Always select the agent first (even if it has errors)
|
||||
// Always select the config first (even if it has errors)
|
||||
// optimistic update
|
||||
dispatch(setSelectedProfile(profile.id));
|
||||
// notify core which will handle actual update
|
||||
|
|
@ -87,7 +87,7 @@ export function AssistantOption({
|
|||
className="text-error hover:enabled:text-error my-0 h-4 w-4 p-0"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(CONFIG_ROUTES.AGENTS);
|
||||
navigate(CONFIG_ROUTES.CONFIGS);
|
||||
}}
|
||||
>
|
||||
<ExclamationTriangleIcon className="h-3.5 w-3.5" />
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export function AssistantOptions({
|
|||
<div className="thin-scrollbar flex max-h-32 flex-col overflow-y-auto">
|
||||
{profiles?.length === 0 ? (
|
||||
<div className="text-vsc-foreground px-3 py-2 opacity-70">
|
||||
No agents found
|
||||
No config found
|
||||
</div>
|
||||
) : (
|
||||
profiles?.map((profile, idx) => (
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export function SelectedAssistantButton({
|
|||
>
|
||||
<div className="flex min-w-0 flex-1 flex-row items-center gap-2">
|
||||
{selectedProfile === null ? (
|
||||
"Create your first agent"
|
||||
"Set up config file"
|
||||
) : configLoading ? (
|
||||
<span className="text-description flex flex-row items-center">
|
||||
<ArrowPathIcon
|
||||
|
|
@ -47,7 +47,9 @@ export function SelectedAssistantButton({
|
|||
</span>
|
||||
) : (
|
||||
<>
|
||||
<AssistantIcon assistant={selectedProfile} size={iconSize} />
|
||||
{selectedProfile.iconUrl && (
|
||||
<AssistantIcon assistant={selectedProfile} size={iconSize} />
|
||||
)}
|
||||
<span className={`xs:line-clamp-1 hidden select-none text-xs`}>
|
||||
{selectedProfile.title}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ export function AssistantAndOrgListbox({
|
|||
close();
|
||||
}
|
||||
|
||||
function onAgentsConfig() {
|
||||
navigate(CONFIG_ROUTES.AGENTS);
|
||||
function onConfigsConfig() {
|
||||
navigate(CONFIG_ROUTES.CONFIGS);
|
||||
close();
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ export function AssistantAndOrgListbox({
|
|||
>
|
||||
<div className="flex items-center justify-between px-1.5 py-1">
|
||||
<span className="text-description text-xs font-medium">
|
||||
Agents
|
||||
Configs
|
||||
</span>
|
||||
<div className="flex items-center gap-0.5">
|
||||
<Button
|
||||
|
|
@ -172,7 +172,7 @@ export function AssistantAndOrgListbox({
|
|||
<Button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onAgentsConfig();
|
||||
onConfigsConfig();
|
||||
}}
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
|
|
@ -291,7 +291,7 @@ export function AssistantAndOrgListbox({
|
|||
<div>
|
||||
<div className="text-description flex items-center justify-start px-2 py-1">
|
||||
<span className="block" style={{ fontSize: tinyFont }}>
|
||||
<code>{getMetaKeyLabel()} ⇧ '</code> to toggle agent
|
||||
<code>{getMetaKeyLabel()} ⇧ '</code> to toggle config
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
import { ChevronRightIcon } from "@heroicons/react/24/outline";
|
||||
import { useContext } from "react";
|
||||
import { Button, ButtonSubtext } from "..";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import { useAppDispatch, useAppSelector } from "../../redux/hooks";
|
||||
import { setIsExploreDialogOpen } from "../../redux/slices/uiSlice";
|
||||
import { LocalStorageKey, setLocalStorage } from "../../util/localStorage";
|
||||
import { ReusableCard } from "../ReusableCard";
|
||||
|
||||
export function ExploreHubCard() {
|
||||
const dispatch = useAppDispatch();
|
||||
const isOpen = useAppSelector((state) => state.ui.isExploreDialogOpen);
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
return (
|
||||
<ReusableCard
|
||||
showCloseButton={true}
|
||||
onClose={() => {
|
||||
setLocalStorage(LocalStorageKey.IsExploreDialogOpen, false);
|
||||
setLocalStorage(LocalStorageKey.HasDismissedExploreDialog, true);
|
||||
return dispatch(setIsExploreDialogOpen(false));
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-col items-center gap-1 px-4 text-center">
|
||||
<div className="mb-4">
|
||||
<h2 className="mb-1 text-xl font-semibold">Create Your Own Agent</h2>
|
||||
|
||||
<p className="text-lightgray my-0 max-w-lg text-sm font-light leading-relaxed">
|
||||
Discover and remix popular agents, or create your own from scratch
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
className="w-full"
|
||||
onClick={() => {
|
||||
ideMessenger.request("controlPlane/openUrl", {
|
||||
path: "/?type=assistants",
|
||||
orgSlug: undefined,
|
||||
});
|
||||
}}
|
||||
>
|
||||
Explore Agents
|
||||
</Button>
|
||||
|
||||
<ButtonSubtext
|
||||
onClick={() => {
|
||||
ideMessenger.request("controlPlane/openUrl", {
|
||||
path: "/new?type=assistant",
|
||||
orgSlug: undefined,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<div className="flex cursor-pointer items-center justify-center gap-1">
|
||||
<span>Or, create your own agent from scratch</span>
|
||||
<ChevronRightIcon className="h-3 w-3" />
|
||||
</div>
|
||||
</ButtonSubtext>
|
||||
</div>
|
||||
</ReusableCard>
|
||||
);
|
||||
}
|
||||
|
|
@ -19,9 +19,8 @@ export const FatalErrorIndicator = () => {
|
|||
|
||||
const configLoading = useAppSelector((state) => state.config.loading);
|
||||
const showConfigPage = () => {
|
||||
navigate(CONFIG_ROUTES.AGENTS);
|
||||
navigate(CONFIG_ROUTES.CONFIGS);
|
||||
};
|
||||
// const onAgentsPage = location.
|
||||
const currentPath = `${location.pathname}${location.search}`;
|
||||
|
||||
const { selectedProfile } = useAuth();
|
||||
|
|
@ -33,7 +32,7 @@ export const FatalErrorIndicator = () => {
|
|||
const displayName = selectedProfile
|
||||
? (selectedProfile.title ??
|
||||
`${selectedProfile.fullSlug?.ownerSlug}/${selectedProfile.fullSlug?.packageSlug}`)
|
||||
: "agent";
|
||||
: "config";
|
||||
|
||||
return (
|
||||
<Alert type="error" className="mx-2 my-1 px-2">
|
||||
|
|
@ -65,7 +64,7 @@ export const FatalErrorIndicator = () => {
|
|||
Reload
|
||||
</div>
|
||||
)}
|
||||
{currentPath !== CONFIG_ROUTES.AGENTS && (
|
||||
{currentPath !== CONFIG_ROUTES.CONFIGS && (
|
||||
<div onClick={showConfigPage} className="cursor-pointer underline">
|
||||
View
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -81,11 +81,11 @@ export function BlockSettingsTopToolbar() {
|
|||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={() => navigate(CONFIG_ROUTES.AGENTS)}
|
||||
onClick={() => navigate(CONFIG_ROUTES.CONFIGS)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
e.preventDefault();
|
||||
navigate(CONFIG_ROUTES.AGENTS);
|
||||
navigate(CONFIG_ROUTES.CONFIGS);
|
||||
}
|
||||
}}
|
||||
data-testid="block-settings-toolbar-icon-error"
|
||||
|
|
@ -135,7 +135,7 @@ export function BlockSettingsTopToolbar() {
|
|||
)}
|
||||
</div>
|
||||
|
||||
<ToolTip place="top" content="Select Agent">
|
||||
<ToolTip place="top" content="Select Config">
|
||||
<div>
|
||||
<AssistantAndOrgListbox variant="lump" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ import {
|
|||
CircleStackIcon,
|
||||
Cog6ToothIcon,
|
||||
CubeIcon,
|
||||
DocumentIcon,
|
||||
PencilIcon,
|
||||
QuestionMarkCircleIcon,
|
||||
WrenchScrewdriverIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { BotIcon } from "../../components/svg/BotIcon";
|
||||
import { ConfigSection } from "./components/ConfigSection";
|
||||
import { AgentsSection } from "./sections/AgentsSection";
|
||||
import { ConfigsSection } from "./sections/ConfigsSection";
|
||||
import { HelpSection } from "./sections/HelpSection";
|
||||
import { IndexingSettingsSection } from "./sections/IndexingSettingsSection";
|
||||
import { ModelsSection } from "./sections/ModelsSection";
|
||||
|
|
@ -89,16 +89,14 @@ export const topTabSections: TabSection[] = [
|
|||
showTopDivider: true,
|
||||
tabs: [
|
||||
{
|
||||
id: "agents",
|
||||
label: "Agents",
|
||||
id: "configs",
|
||||
label: "Configs",
|
||||
component: (
|
||||
<ConfigSection>
|
||||
<AgentsSection />
|
||||
<ConfigsSection />
|
||||
</ConfigSection>
|
||||
),
|
||||
icon: (
|
||||
<BotIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" size={16} />
|
||||
),
|
||||
icon: <DocumentIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
},
|
||||
{
|
||||
id: "organizations",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const STATUS_TO_SUBTITLE_TEXT: Record<
|
|||
indexing: "Click to pause",
|
||||
paused: "Click to resume",
|
||||
failed: "Click to retry",
|
||||
disabled: "Click to open agent configuration",
|
||||
disabled: "Click to open configuration",
|
||||
cancelled: "Click to restart",
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import { IdeMessengerContext } from "../../../context/IdeMessenger";
|
|||
import { useAppSelector } from "../../../redux/hooks";
|
||||
import { ConfigHeader } from "../components/ConfigHeader";
|
||||
|
||||
export function AgentsSection() {
|
||||
export function ConfigsSection() {
|
||||
const { profiles, selectedProfile } = useAuth();
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
const configError = useAppSelector((state) => state.config.configError);
|
||||
|
||||
function handleAddAgent() {
|
||||
function handleAddConfig() {
|
||||
void ideMessenger.request("config/newAssistantFile", undefined);
|
||||
}
|
||||
|
||||
|
|
@ -24,9 +24,9 @@ export function AgentsSection() {
|
|||
return (
|
||||
<>
|
||||
<ConfigHeader
|
||||
title="Agents"
|
||||
onAddClick={handleAddAgent}
|
||||
addButtonTooltip="Add agent"
|
||||
title="Configs"
|
||||
onAddClick={handleAddConfig}
|
||||
addButtonTooltip="Add config"
|
||||
/>
|
||||
|
||||
<Card>
|
||||
|
|
@ -61,7 +61,7 @@ export function AgentsSection() {
|
|||
)}
|
||||
</div>
|
||||
</div>
|
||||
<ToolTip content="Configure agent">
|
||||
<ToolTip content="Open configuration">
|
||||
<Button
|
||||
onClick={() => handleConfigureAgent(profile.id)}
|
||||
variant="ghost"
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { ConversationStarterCards } from "../../components/ConversationStarters";
|
||||
import { ExploreHubCard } from "../../components/ExploreHubCard";
|
||||
import { OnboardingCard } from "../../components/OnboardingCard";
|
||||
|
||||
export interface EmptyChatBodyProps {
|
||||
|
|
@ -17,7 +16,6 @@ export function EmptyChatBody({ showOnboardingCard }: EmptyChatBodyProps) {
|
|||
|
||||
return (
|
||||
<div className="mx-2 mt-2">
|
||||
<ExploreHubCard />
|
||||
<ConversationStarterCards />
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export type ConfigTab =
|
|||
| "models"
|
||||
| "rules"
|
||||
| "tools"
|
||||
| "agents"
|
||||
| "configs"
|
||||
| "organizations"
|
||||
| "indexing"
|
||||
| "settings"
|
||||
|
|
@ -29,7 +29,7 @@ export const CONFIG_ROUTES = {
|
|||
MODELS: buildConfigRoute("models"),
|
||||
RULES: buildConfigRoute("rules"),
|
||||
TOOLS: buildConfigRoute("tools"),
|
||||
AGENTS: buildConfigRoute("agents"),
|
||||
CONFIGS: buildConfigRoute("configs"),
|
||||
ORGANIZATIONS: buildConfigRoute("organizations"),
|
||||
INDEXING: buildConfigRoute("indexing"),
|
||||
SETTINGS: buildConfigRoute("settings"),
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ export function parseConfigYaml(configYaml: string): ConfigYaml {
|
|||
"cause" in e &&
|
||||
e.cause === "result.success was false"
|
||||
) {
|
||||
throw new Error(`Failed to parse agent: ${e.message}`);
|
||||
throw new Error(`Failed to parse config: ${e.message}`);
|
||||
} else if (e instanceof ZodError) {
|
||||
throw new Error(`Failed to parse agent: ${formatZodError(e)}`);
|
||||
throw new Error(`Failed to parse config: ${formatZodError(e)}`);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Failed to parse agent: ${e instanceof Error ? e.message : e}`,
|
||||
`Failed to parse config: ${e instanceof Error ? e.message : e}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ export function parseAssistantUnrolled(configYaml: string): AssistantUnrolled {
|
|||
console.error(
|
||||
`Failed to parse unrolled assistant: ${e.message}\n\n${configYaml}`,
|
||||
);
|
||||
throw new Error(`Failed to parse agent: ${formatZodError(e)}`);
|
||||
throw new Error(`Failed to parse config: ${formatZodError(e)}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue