Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
735 changes: 65 additions & 670 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
"@google-cloud/vertexai": "^1.9.3",
"@google/genai": "^0.9.0",
"@mistralai/mistralai": "^1.3.6",
"@modelcontextprotocol/sdk": "^1.7.0",
"@modelcontextprotocol/sdk": "^1.10.2",
"@types/clone-deep": "^4.0.4",
"@types/pdf-parse": "^1.1.4",
"@types/tmp": "^0.2.6",
Expand Down
11 changes: 11 additions & 0 deletions src/core/Cline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { defaultModeSlug, getModeBySlug, getFullModeDetails, isToolAllowedForMod
import { EXPERIMENT_IDS, experiments as Experiments, ExperimentId } from "../shared/experiments"
import { formatLanguage } from "../shared/language"
import { ToolParamName, ToolResponse, DiffStrategy } from "../shared/tools"
import { getTaskDirectoryPath } from "../shared/storagePathManager"

// services
import { UrlContentFetcher } from "../services/browser/UrlContentFetcher"
Expand Down Expand Up @@ -293,6 +294,16 @@ export class Cline extends EventEmitter<ClineEvents> {

// Storing task to disk for history

private async ensureTaskDirectoryExists(): Promise<string> {
const globalStoragePath = this.providerRef.deref()?.context.globalStorageUri.fsPath
if (!globalStoragePath) {
throw new Error("Global storage uri is invalid")
}

// Use storagePathManager to retrieve the task storage directory
return getTaskDirectoryPath(globalStoragePath, this.taskId)
}

private async getSavedApiConversationHistory(): Promise<Anthropic.MessageParam[]> {
return readApiMessages({ taskId: this.taskId, globalStoragePath: this.globalStoragePath })
}
Expand Down
1 change: 1 addition & 0 deletions src/core/__tests__/Cline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jest.mock("../ignore/RooIgnoreController")

// Mock storagePathManager to prevent dynamic import issues
jest.mock("../../shared/storagePathManager", () => ({
__esModule: true,
getTaskDirectoryPath: jest
.fn()
.mockImplementation((globalStoragePath, taskId) => Promise.resolve(`${globalStoragePath}/tasks/${taskId}`)),
Expand Down
2 changes: 1 addition & 1 deletion src/core/prompts/instructions/create-mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ npm run build

4. Whenever you need an environment variable such as an API key to configure the MCP server, walk the user through the process of getting the key. For example, they may need to create an account and go to a developer dashboard to generate the key. Provide step-by-step instructions and URLs to make it easy for the user to retrieve the necessary information. Then use the ask_followup_question tool to ask the user for the key, in this case the OpenWeather API key.

5. Install the MCP Server by adding the MCP server configuration to the settings file located at '${await mcpHub.getMcpSettingsFilePath()}'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object.
5. Install the MCP Server by adding the MCP server configuration to the settings file located at '${await mcpHub.getGlobalMcpSettingsFilePath()}'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object.

IMPORTANT: Regardless of what else you see in the MCP settings file, you must default any new MCP servers you create to disabled=false and alwaysAllow=[].

Expand Down
2 changes: 1 addition & 1 deletion src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export const webviewMessageHandler = async (provider: ClineProvider, message: We
.update("allowedCommands", message.commands, vscode.ConfigurationTarget.Global)
break
case "openMcpSettings": {
const mcpSettingsFilePath = await provider.getMcpHub()?.getMcpSettingsFilePath()
const mcpSettingsFilePath = await provider.getMcpHub()?.getGlobalConfigPath(provider)
if (mcpSettingsFilePath) {
openFile(mcpSettingsFilePath)
}
Expand Down
Loading
Loading