Changesets · Branches · Tags · Compare
| Changeset | 6739a12a7b3ffb005a56e7983dd0322a4d4ea9ca01733c0c61e9439d62a4e509 |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-06-25 19:31 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-06-25 19:31 +05:30 |
| Parents | 1317621ffaf8 |
2 files changed
modified core/config/yaml/loadYaml.ts +2 −6
| @@ -39,7 +39,7 @@ | ||
| 39 | 39 | import { modifyAnyConfigWithSharedConfig } from "../sharedConfig"; |
| 40 | 40 | |
| 41 | 41 | import { getControlPlaneEnvSync } from "../../control-plane/env"; |
| 42 | -import { baseToolDefinitions, remoteToolDefinitions } from "../../tools"; | |
| 42 | +import { getToolsForIde } from "../../tools"; | |
| 43 | 43 | import { getCleanUriPath } from "../../util/uri"; |
| 44 | 44 | import { getAllDotContinueDefinitionFiles } from "../loadLocalAssistants"; |
| 45 | 45 | import { LocalPlatformClient } from "./LocalPlatformClient"; |
| @@ -187,11 +187,7 @@ | ||
| 187 | 187 | |
| 188 | 188 | const continueConfig: ContinueConfig = { |
| 189 | 189 | slashCommands: [], |
| 190 | - tools: [ | |
| 191 | - ...((await ide.isWorkspaceRemote()) | |
| 192 | - ? remoteToolDefinitions | |
| 193 | - : baseToolDefinitions), | |
| 194 | - ], | |
| 190 | + tools: await getToolsForIde(ide), | |
| 195 | 191 | mcpServerStatuses: [], |
| 196 | 192 | contextProviders: [], |
| 197 | 193 | modelsByRole: { |
modified core/tools/index.ts +9 −4
| @@ -1,4 +1,4 @@ | ||
| 1 | -import { ConfigDependentToolParams, Tool } from ".."; | |
| 1 | +import { ConfigDependentToolParams, IDE, Tool } from ".."; | |
| 2 | 2 | import { createNewFileTool } from "./definitions/createNewFile"; |
| 3 | 3 | import { createRuleBlock } from "./definitions/createRuleBlock"; |
| 4 | 4 | import { editFileTool } from "./definitions/editFile"; |
| @@ -13,7 +13,9 @@ | ||
| 13 | 13 | import { searchWebTool } from "./definitions/searchWeb"; |
| 14 | 14 | import { viewDiffTool } from "./definitions/viewDiff"; |
| 15 | 15 | |
| 16 | -export const remoteToolDefinitions = [ | |
| 16 | +export const localOnlyToolDefinitions = [grepSearchTool]; | |
| 17 | + | |
| 18 | +export const baseToolDefinitions = [ | |
| 17 | 19 | readFileTool, |
| 18 | 20 | editFileTool, |
| 19 | 21 | createNewFileTool, |
| @@ -30,8 +32,11 @@ | ||
| 30 | 32 | // viewRepoMapTool, |
| 31 | 33 | ]; |
| 32 | 34 | |
| 33 | -export const baseToolDefinitions = [...remoteToolDefinitions, grepSearchTool]; | |
| 34 | - | |
| 35 | 35 | export const getConfigDependentToolDefinitions = ( |
| 36 | 36 | params: ConfigDependentToolParams, |
| 37 | 37 | ): Tool[] => [requestRuleTool(params)]; |
| 38 | + | |
| 39 | +export const getToolsForIde = async (ide: IDE) => | |
| 40 | + (await ide.isWorkspaceRemote()) | |
| 41 | + ? baseToolDefinitions | |
| 42 | + : [...baseToolDefinitions, ...localOnlyToolDefinitions]; |