Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
ed2f495
chore: remove docs suggestions
Patrick-Erichsen Mar 13, 2025
70e443e
update text
Patrick-Erichsen Mar 13, 2025
f0fff46
Merge branch 'main' into pe/remove-pre-indexed-docs-ui
Patrick-Erichsen Mar 13, 2025
32161b6
chore: remove tutorial card
Patrick-Erichsen Mar 18, 2025
a73123e
feat: insert prompt into input on click
Patrick-Erichsen Mar 20, 2025
cda958f
show errors, codeblock for wouldliketo message
RomneyDa Mar 20, 2025
acb436e
improv: simplify
tomasz-stefaniak Mar 20, 2025
6c2bf04
improv: split up components
tomasz-stefaniak Mar 20, 2025
1d1f705
feat: move .prompts into slash cmd
Patrick-Erichsen Mar 20, 2025
7df9c60
mcp loading fixes and duplicate tools
RomneyDa Mar 21, 2025
cde4057
organize the input box folder
sestinj Mar 21, 2025
03d8982
organize TipTapEditor.tsx
sestinj Mar 21, 2025
ccd1933
organize keyHandlers
sestinj Mar 21, 2025
d72005b
refactor out webview listeners
sestinj Mar 21, 2025
15b6ccf
add tooltip delay
sestinj Mar 21, 2025
98a3219
fix: add checkmark icon to indicate selected model in dropdown
Mar 21, 2025
6e68d45
Bump @octokit/plugin-paginate-rest and @octokit/rest in /core
dependabot[bot] Mar 21, 2025
ade83fd
fix: unnecessary dependency
tomasz-stefaniak Mar 21, 2025
b533742
Merge pull request #4749 from 0x23d11/fix-4084
Patrick-Erichsen Mar 21, 2025
d9eb118
fix: remove mismatch between last selected profile and current profile
tomasz-stefaniak Mar 21, 2025
a1d8429
lump v1
sestinj Mar 21, 2025
a2dcf1c
toggle sections
sestinj Mar 21, 2025
db05eea
highlights
sestinj Mar 21, 2025
5167899
Merge pull request #4755 from continuedev/dependabot/npm_and_yarn/cor…
Patrick-Erichsen Mar 21, 2025
c3f9204
styles
sestinj Mar 21, 2025
46f4665
style
sestinj Mar 21, 2025
25f8264
refactor sections
sestinj Mar 21, 2025
1aca061
remove editorInset
sestinj Mar 21, 2025
bbff4f8
move model roles to lump
sestinj Mar 21, 2025
2c0582d
MCP servers section in more page
RomneyDa Mar 21, 2025
71f5dda
Merge pull request #4757 from continuedev/tomasz/fix-accounts-bug
sestinj Mar 21, 2025
6345a41
mcp server UI updates
RomneyDa Mar 21, 2025
91873a9
Merge branch 'main' into nate/blocks-front-and-center
sestinj Mar 21, 2025
b527942
remove imports
sestinj Mar 21, 2025
d3f4aeb
feat: add bookmark logic
Patrick-Erichsen Mar 21, 2025
730ac56
Revert "feat: add bookmark logic"
Patrick-Erichsen Mar 21, 2025
c4ab5a2
tool policies dialog
RomneyDa Mar 21, 2025
f613b43
tool lump section
sestinj Mar 21, 2025
efff2d3
Revert "feat: add bookmark logic"
Patrick-Erichsen Mar 21, 2025
03e7d5d
tool groupe name
RomneyDa Mar 21, 2025
f968e32
Merge branch 'main' into pe/conversation-starters
Patrick-Erichsen Mar 21, 2025
9c2db6b
feat: create profiles slice
Patrick-Erichsen Mar 21, 2025
a49ac7b
styling of lump icons
sestinj Mar 21, 2025
171aa08
make tabs tabbable
sestinj Mar 21, 2025
edbf7d0
down to duplicates
RomneyDa Mar 21, 2025
a52bf60
fix duplicate tool entries
RomneyDa Mar 21, 2025
74024a2
remove debugger
RomneyDa Mar 21, 2025
a03eab7
styling dropdown
sestinj Mar 21, 2025
078b1e7
small screen breakpoint
sestinj Mar 21, 2025
0380675
listbox styling for models
sestinj Mar 21, 2025
0a98d87
tool group toggle
RomneyDa Mar 21, 2025
d3fc2e5
ui polish in the models lump section
sestinj Mar 21, 2025
ac277b9
fix refresh
RomneyDa Mar 21, 2025
5e8eec3
fix tsc
RomneyDa Mar 21, 2025
e49c276
height transition animation on lump
sestinj Mar 21, 2025
b82d29c
feat: profiles slice
Patrick-Erichsen Mar 21, 2025
d4bf45b
move docs management to lump
sestinj Mar 21, 2025
35400e6
adjust docs ui
sestinj Mar 21, 2025
0819bec
feat: add tests
Patrick-Erichsen Mar 21, 2025
2cd9025
toggle improvements
RomneyDa Mar 21, 2025
d6ad3e2
feat: init profiles prefs
Patrick-Erichsen Mar 21, 2025
9d56588
fix tts styling
RomneyDa Mar 21, 2025
35ffde0
show chat scrollbar
RomneyDa Mar 21, 2025
83dce65
make docs more compact
sestinj Mar 21, 2025
7447e34
toggle switch colors
RomneyDa Mar 21, 2025
8a157c2
smaller tutorial card border
RomneyDa Mar 21, 2025
3b0cc0e
docs indexing style
sestinj Mar 21, 2025
2f199ff
update docs
Patrick-Erichsen Mar 21, 2025
cd5cbfd
action buttons on docs view
sestinj Mar 21, 2025
4081730
move more things around
sestinj Mar 22, 2025
03d608e
open link for add docs
sestinj Mar 22, 2025
97f6d47
Revert "smaller tutorial card border"
RomneyDa Mar 22, 2025
171ab83
revert scrollbar
RomneyDa Mar 22, 2025
804edc6
prompts section in lump
sestinj Mar 22, 2025
4664f61
Merge pull request #4742 from continuedev/dallin/mcp-fixes
sestinj Mar 22, 2025
716f12e
Merge pull request #4760 from continuedev/dallin/better-toggles
sestinj Mar 22, 2025
61ea04b
Merge branch 'main' into pe/conversation-starters
sestinj Mar 22, 2025
71f8508
feat: create org slice
Patrick-Erichsen Mar 22, 2025
5c1d81e
Merge branch 'main' into pe/conversation-starters
Patrick-Erichsen Mar 22, 2025
4718c12
Update MentionList.tsx
Patrick-Erichsen Mar 22, 2025
4c030c1
Merge branch 'pe/conversation-starters' of https://github.com/continu…
sestinj Mar 22, 2025
c7873fc
Merge branch 'pe/conversation-starters' into nate/blocks-front-and-ce…
sestinj Mar 22, 2025
77110a3
update placeholder
sestinj Mar 22, 2025
0090e4c
consolidate org switcher ui
sestinj Mar 22, 2025
12a347b
remove more page
sestinj Mar 22, 2025
a8555ef
refactor config page sections
sestinj Mar 22, 2025
ed6f001
Merge pull request #4758 from continuedev/pe/conversation-starters
Patrick-Erichsen Mar 22, 2025
64bf9cf
tabs
sestinj Mar 22, 2025
7ab3a06
nicer tab styling on settings page
sestinj Mar 22, 2025
01e40a9
sticky tabs
sestinj Mar 22, 2025
fb86531
styling of settings again
sestinj Mar 22, 2025
3b006df
move bookmarks to lump
sestinj Mar 22, 2025
debe6b8
condense MCP preview
sestinj Mar 22, 2025
21804ad
reorder mcp row
sestinj Mar 22, 2025
fdcd27c
clean up tool view
sestinj Mar 22, 2025
107a388
fix horizontal scroll in tools section
sestinj Mar 22, 2025
135efb2
Add IntelliJ inspection profiles and PHP configuration to .gitignore
ferenci84 Mar 22, 2025
745d450
padding
sestinj Mar 22, 2025
bb37638
hover message on status dot for docs
sestinj Mar 22, 2025
193bd88
edit button in docs section
sestinj Mar 22, 2025
fca8f23
status dot to left to balance
sestinj Mar 22, 2025
9af934d
edit button for prompts
sestinj Mar 22, 2025
ad29bf8
Merge pull request #4767 from ferenci84/intellij_gitignore
sestinj Mar 22, 2025
bc5ec28
mode select
sestinj Mar 22, 2025
805d2e2
Merge branch 'main' into pe/remove-pre-indexed-docs-ui
Patrick-Erichsen Mar 23, 2025
45bbb79
fontSize function
sestinj Mar 23, 2025
0984398
font size
sestinj Mar 23, 2025
7672a05
agent mode use tools
sestinj Mar 23, 2025
1494b49
agent mode not supported
sestinj Mar 23, 2025
4be325e
style updates for rules
sestinj Mar 23, 2025
d0339ec
add block buttons
sestinj Mar 23, 2025
7cd8105
move cancel button to lump
sestinj Mar 23, 2025
1cc811b
bold modes
sestinj Mar 23, 2025
ec53073
style model select to match modeselect
sestinj Mar 23, 2025
dec06cb
no edit mode on jb
sestinj Mar 23, 2025
03e08d1
top toolbar experiment
sestinj Mar 23, 2025
fdb7e80
refactor block settings
sestinj Mar 23, 2025
15b4576
ellipsis
sestinj Mar 23, 2025
ee13913
persist block settings toolbar expanded and adjust padding to match l…
sestinj Mar 23, 2025
5ba06c5
remove max height on code blocks to make scrolling easier
sestinj Mar 23, 2025
7617cd1
adjust code block styles
sestinj Mar 23, 2025
fcf38c5
details
sestinj Mar 23, 2025
aa20cd9
save after accept/reject
sestinj Mar 23, 2025
5402453
blur old input boxes
sestinj Mar 23, 2025
62f3f7f
fix blur
sestinj Mar 23, 2025
657842e
bump
sestinj Mar 23, 2025
aa20fde
Merge pull request #4632 from continuedev/pe/remove-pre-indexed-docs-ui
sestinj Mar 23, 2025
7ccf9d8
Merge branch 'main' into nate/blocks-front-and-center
sestinj Mar 23, 2025
009e88b
Merge pull request #4743 from continuedev/nate/blocks-front-and-center
sestinj Mar 23, 2025
191c0a3
Update index.tsx to main
bdavj Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,15 @@ Icon?
notes.md

manual-testing-sandbox/.idea/**
manual-testing-sandbox/.continue/**
extensions/intellij/.idea/**

**/.idea/workspace.xml
**/.idea/usage.statistics.xml
**/.idea/shelf/
**/.idea/inspectionProfiles/Project_Default.xml
**/.idea/php.xml


extensions/intellij/bin
extensions/.continue-debug/
Expand Down
2 changes: 1 addition & 1 deletion binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function slashFromCustomCommand(
return {
name: customCommand.name,
description: customCommand.description ?? "",
prompt: customCommand.prompt,
run: async function* ({ input, llm, history, ide, completionOptions }) {
// Remove slash command prefix from input
let userInput = input;
Expand Down
3 changes: 2 additions & 1 deletion core/commands/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { v4 as uuidv4 } from "uuid";

import { ContextItemWithId, RangeInFileWithContents } from "../";
import { findUriInDirs, getUriPathBasename } from "../util/uri";
import { v4 as uuidv4 } from "uuid";

export function rifWithContentsToContextItem(
rif: RangeInFileWithContents,
Expand Down
10 changes: 0 additions & 10 deletions core/config/ConfigHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,6 @@ export class ConfigHandler {
this.ideSettingsPromise,
);

// After login, default to the first org as the selected org
try {
const orgs = await this.controlPlaneClient.listOrganizations();
if (orgs.length) {
await this.setSelectedOrgId(orgs[0].id);
}
} catch (e) {
console.error("Failed to fetch control plane profiles: ", e);
}

this.fetchControlPlaneProfiles().catch(async (e) => {
console.error("Failed to fetch control plane profiles: ", e);
await this.loadLocalProfilesOnly();
Expand Down
72 changes: 17 additions & 55 deletions core/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
IdeType,
ILLM,
LLMOptions,
MCPOptions,
ModelDescription,
RerankerDescription,
SerializedContinueConfig,
Expand All @@ -45,7 +44,6 @@ import ContinueProxyContextProvider from "../context/providers/ContinueProxyCont
import CustomContextProviderClass from "../context/providers/CustomContextProvider";
import FileContextProvider from "../context/providers/FileContextProvider";
import { contextProviderClassFromName } from "../context/providers/index";
import PromptFilesContextProvider from "../context/providers/PromptFilesContextProvider";
import { useHub } from "../control-plane/env";
import { allEmbeddingsProviders } from "../indexing/allEmbeddingsProviders";
import { BaseLLM } from "../llm";
Expand Down Expand Up @@ -401,8 +399,6 @@ async function intermediateToFinalConfig(
...(!config.disableIndexing
? [new CodebaseContextProvider(codebaseContextParams)]
: []),
// Add prompt files provider if enabled
...(loadPromptFiles ? [new PromptFilesContextProvider({})] : []),
];

const DEFAULT_CONTEXT_PROVIDERS_TITLES = DEFAULT_CONTEXT_PROVIDERS.map(
Expand Down Expand Up @@ -521,6 +517,8 @@ async function intermediateToFinalConfig(
contextProviders,
models,
tools: allTools,
mcpServerStatuses: [],
slashCommands: config.slashCommands ?? [],
modelsByRole: {
chat: models,
edit: models,
Expand All @@ -541,53 +539,18 @@ async function intermediateToFinalConfig(
},
};

// Apply MCP if specified
// Trigger MCP server refreshes (Config is reloaded again once connected!)
const mcpManager = MCPManagerSingleton.getInstance();
function getMcpId(options: MCPOptions) {
return JSON.stringify(options);
}
if (config.experimental?.modelContextProtocolServers) {
await mcpManager.removeUnusedConnections(
config.experimental.modelContextProtocolServers.map(getMcpId),
);
}

if (config.experimental?.modelContextProtocolServers) {
const abortController = new AbortController();
const mcpConnectionTimeout = setTimeout(
() => abortController.abort(),
5000,
);

await Promise.allSettled(
config.experimental.modelContextProtocolServers?.map(
async (server, index) => {
try {
const mcpId = getMcpId(server);
const mcpConnection = mcpManager.createConnection(mcpId, server);
await mcpConnection.modifyConfig(
continueConfig,
mcpId,
abortController.signal,
"MCP Server",
server.faviconUrl,
);
} catch (e) {
let errorMessage = "Failed to load MCP server";
if (e instanceof Error) {
errorMessage += ": " + e.message;
}
errors.push({
fatal: false,
message: errorMessage,
});
} finally {
clearTimeout(mcpConnectionTimeout);
}
},
) || [],
);
}
mcpManager.setConnections(
(config.experimental?.modelContextProtocolServers ?? []).map(
(server, index) => ({
id: `continue-mcp-server-${index + 1}`,
name: `MCP Server ${index + 1}`,
...server,
}),
),
false,
);

// Handle experimental modelRole config values for apply and edit
const inlineEditModel = getModelByRole(continueConfig, "inlineEdit")?.title;
Expand Down Expand Up @@ -667,11 +630,9 @@ async function finalToBrowserConfig(
models: final.models.map(llmToSerializedModelDescription),
systemMessage: final.systemMessage,
completionOptions: final.completionOptions,
slashCommands: final.slashCommands?.map((s) => ({
name: s.name,
description: s.description,
params: s.params, // TODO: is this why params aren't referenced properly by slash commands?
})),
slashCommands: final.slashCommands?.map(
({ run, ...slashCommandDescription }) => slashCommandDescription,
),
contextProviders: final.contextProviders?.map((c) => c.description),
disableIndexing: final.disableIndexing,
disableSessionTitles: final.disableSessionTitles,
Expand All @@ -681,6 +642,7 @@ async function finalToBrowserConfig(
rules: final.rules,
docs: final.docs,
tools: final.tools,
mcpServerStatuses: final.mcpServerStatuses,
tabAutocompleteOptions: final.tabAutocompleteOptions,
usePlatform: await useHub(ide.getIdeSettings()),
modelsByRole: Object.fromEntries(
Expand Down
2 changes: 1 addition & 1 deletion core/config/profile/ControlPlaneProfileLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ConfigJson } from "@continuedev/config-types";
import { ConfigResult } from "@continuedev/config-yaml";

import { ControlPlaneClient } from "../../control-plane/client.js";
import { PRODUCTION_ENV } from "../../control-plane/env.js";
import {
ContinueConfig,
IDE,
Expand All @@ -10,7 +11,6 @@ import {
} from "../../index.js";
import { ProfileDescription } from "../ProfileLifecycleManager.js";

import { PRODUCTION_ENV } from "../../control-plane/env.js";
import doLoadConfig from "./doLoadConfig.js";
import { IProfileLoader } from "./IProfileLoader.js";

Expand Down
3 changes: 1 addition & 2 deletions core/config/profile/PlatformProfileLoader.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { AssistantUnrolled, ConfigResult } from "@continuedev/config-yaml";

import { ControlPlaneClient } from "../../control-plane/client.js";
import { getControlPlaneEnv } from "../../control-plane/env.js";
import { ContinueConfig, IDE, IdeSettings } from "../../index.js";

import { ProfileDescription } from "../ProfileLifecycleManager.js";

import { getControlPlaneEnv } from "../../control-plane/env.js";
import doLoadConfig from "./doLoadConfig.js";
import { IProfileLoader } from "./IProfileLoader.js";

Expand Down
92 changes: 87 additions & 5 deletions core/config/profile/doLoadConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ import {
ConfigValidationError,
ModelRole,
} from "@continuedev/config-yaml";

import {
ContinueConfig,
ContinueRcJson,
IDE,
IdeSettings,
SerializedContinueConfig,
Tool,
} from "../../";
import { constructMcpSlashCommand } from "../../commands/slash/mcp";
import { MCPManagerSingleton } from "../../context/mcp";
import MCPContextProvider from "../../context/providers/MCPContextProvider";
import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js";
import { ControlPlaneClient } from "../../control-plane/client.js";
import { getControlPlaneEnv } from "../../control-plane/env.js";
import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js";
import ContinueProxy from "../../llm/llms/stubs/ContinueProxy";
import { encodeMCPToolUri } from "../../tools/callTool";
import { getConfigJsonPath, getConfigYamlPath } from "../../util/paths";
import { localPathOrUriToPath } from "../../util/pathToUri";
import { Telemetry } from "../../util/posthog";
Expand All @@ -26,6 +32,7 @@ import { loadContinueConfigFromJson } from "../load";
import { migrateJsonSharedConfig } from "../migrateSharedConfig";
import { rectifySelectedModelsFromGlobalContext } from "../selectedModels";
import { loadContinueConfigFromYaml } from "../yaml/loadYaml";

import { PlatformConfigMetadata } from "./PlatformProfileLoader";

export default async function doLoadConfig(
Expand Down Expand Up @@ -93,15 +100,90 @@ export default async function doLoadConfig(
configLoadInterrupted = result.configLoadInterrupted;
}

// Rectify model selections for each role
if (newConfig) {
newConfig = rectifySelectedModelsFromGlobalContext(newConfig, profileId);
}

if (configLoadInterrupted || !newConfig) {
return { errors, config: newConfig, configLoadInterrupted: true };
}

// TODO using config result but result with non-fatal errors is an antipattern?
// Remove ability have undefined errors, just have an array
errors = [...(errors ?? [])];

// Rectify model selections for each role
newConfig = rectifySelectedModelsFromGlobalContext(newConfig, profileId);

// Add things from MCP servers
const mcpManager = MCPManagerSingleton.getInstance();
const mcpServerStatuses = mcpManager.getStatuses();

// Slightly hacky just need connection's client to make slash command for now
const serializableStatuses = mcpServerStatuses.map((server) => {
const { client, ...rest } = server;
return rest;
});
newConfig.mcpServerStatuses = serializableStatuses;

for (const server of mcpServerStatuses) {
if (server.status === "connected") {
const serverTools: Tool[] = server.tools.map((tool) => ({
displayTitle: server.name + " " + tool.name,
function: {
description: tool.description,
name: tool.name,
parameters: tool.inputSchema,
},
faviconUrl: server.faviconUrl,
readonly: false,
type: "function" as const,
wouldLikeTo: "",
uri: encodeMCPToolUri(server.id, tool.name),
group: server.name,
}));
newConfig.tools.push(...serverTools);

const serverSlashCommands = server.prompts.map((prompt) =>
constructMcpSlashCommand(
server.client,
prompt.name,
prompt.description,
prompt.arguments?.map((a: any) => a.name),
),
);
newConfig.slashCommands.push(...serverSlashCommands);

const submenuItems = server.resources.map((resource) => ({
title: resource.name,
description: resource.description ?? resource.name,
id: resource.uri,
icon: server.faviconUrl,
}));
if (submenuItems.length > 0) {
const serverContextProvider = new MCPContextProvider({
submenuItems,
mcpId: server.id,
});
newConfig.contextProviders.push(serverContextProvider);
}
}
}

// Detect duplicate tool names
const counts: Record<string, number> = {};
newConfig.tools.forEach((tool) => {
if (counts[tool.function.name]) {
counts[tool.function.name] = counts[tool.function.name] + 1;
} else {
counts[tool.function.name] = 1;
}
});
Object.entries(counts).forEach(([toolName, count]) => {
if (count > 1) {
errors!.push({
fatal: false,
message: `Duplicate (${count}) tools named "${toolName}" detected. Permissions will conflict and usage may be unpredictable`,
});
}
});

newConfig.allowAnonymousTelemetry =
newConfig.allowAnonymousTelemetry && (await ide.isTelemetryEnabled());

Expand Down
1 change: 1 addition & 0 deletions core/config/validation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ConfigValidationError } from "@continuedev/config-yaml";

import { ModelDescription, SerializedContinueConfig } from "../";
import { Telemetry } from "../util/posthog";

Expand Down
Loading
Loading