fix: disable MCPs, init prompt tweaks

This commit is contained in:
Dallin Romney
2025-09-29 17:59:46 -07:00
parent f0d98386bf
commit 47f0fb2e4a
3 changed files with 24 additions and 16 deletions

View File

@@ -484,9 +484,6 @@ export class Core {
on("mcp/setServerEnabled", async (msg) => {
const { id, enabled } = msg.data;
await MCPManagerSingleton.getInstance().setEnabled(id, enabled);
await this.configHandler.reloadConfig(
`MCP Server ${enabled ? "enabled" : "disabled"}`,
);
});
on("mcp/getPrompt", async (msg) => {
const { serverName, promptName, args } = msg.data;

View File

@@ -1,15 +1,19 @@
import { SlashCommandWithSource } from "..";
import { RULES_MARKDOWN_FILENAME } from "../llm/rules/constants";
import { BuiltInToolNames } from "../tools/builtIn";
const initFilename = "CONTINUE.md";
// Prompt for init slash command
export const INIT_PROMPT_CONTENT = `
You are an expert development assistant. Your task is to create a comprehensive CONTINUE.md project guide for the user's codebase to help them and their team better understand and work with the project.
You are an expert development assistant. Your task is to create a comprehensive ${initFilename} project guide for the user's codebase to help them and their team better understand and work with the project.
## Step 1: Check Required Tools
First, verify that you have access to the necessary tools:
- builtin_file_glob_search: To discover project files
- builtin_read_file: To analyze file contents
- builtin_ls: To explore directory structure
- builtin_create_new_file: To generate the CONTINUE.md file
- ${BuiltInToolNames.FileGlobSearch}: To discover project files
- ${BuiltInToolNames.ReadFile}: To analyze file contents
- ${BuiltInToolNames.LSTool}: To explore directory structure
- ${BuiltInToolNames.CreateNewFile}: To generate the ${initFilename} file
If any of these tools are unavailable, inform the user that they need to activate them and enable "Agent Mode" in Continue before proceeding.
@@ -21,8 +25,8 @@ Analyze the project structure and key files to understand:
- Important configuration files
- Build/deployment system
## Step 3: Generate CONTINUE.md
Create a comprehensive CONTINUE.md file in the .continue/rules/ directory with the following sections:
## Step 3: Generate ${initFilename}
Create a comprehensive ${initFilename} file in the .continue/rules/ directory with the following sections:
1. **Project Overview**
- Brief description of the project's purpose
@@ -66,12 +70,12 @@ Create a comprehensive CONTINUE.md file in the .continue/rules/ directory with t
Make sure your analysis is thorough but concise. Focus on information that would be most helpful to developers working on the project. If certain information isn't available from the codebase, make reasonable assumptions but mark these sections as needing verification.
## Step 4: Finalize
After creating the .continue/rules/CONTINUE.md file, provide a summary of what you've created and remind the user to:
After creating the .continue/rules/${initFilename} file, provide a summary of what you've created and remind the user to:
1. Review and edit the file as needed
2. Commit it to their repository to share with their team
3. Explain that Continue will automatically load this file into context when working with the project
Also inform the user that they can create additional rules.md files in subdirectories for more specific documentation related to those components.
Also inform the user that they can create additional ${RULES_MARKDOWN_FILENAME} files in subdirectories for more specific documentation related to those components.
`.trim();
export const initSlashCommand: SlashCommandWithSource = {

View File

@@ -112,13 +112,20 @@ function MCPServerPreview({
const onRefresh = async () => {
updateMCPServerStatus("connecting");
await ideMessenger.request("mcp/reloadServer", {
id: server.id,
});
if (server.status === "disabled") {
await ideMessenger.request("mcp/setServerEnabled", {
id: server.id,
enabled: true,
});
} else {
await ideMessenger.request("mcp/reloadServer", {
id: server.id,
});
}
};
const onDisconnect = async () => {
updateMCPServerStatus("not-connected");
updateMCPServerStatus("disabled");
dispatch(
updateConfig({
...config,