do not ripgrep if ide is remote
This commit is contained in:
parent
950d6648e5
commit
7644cd6ce5
4 changed files with 15 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ import { GlobalContext } from "../../util/GlobalContext";
|
|||
import { modifyAnyConfigWithSharedConfig } from "../sharedConfig";
|
||||
|
||||
import { getControlPlaneEnvSync } from "../../control-plane/env";
|
||||
import { baseToolDefinitions } from "../../tools";
|
||||
import { baseToolDefinitions, remoteToolDefinitions } from "../../tools";
|
||||
import { getCleanUriPath } from "../../util/uri";
|
||||
import { getAllDotContinueDefinitionFiles } from "../loadLocalAssistants";
|
||||
import { LocalPlatformClient } from "./LocalPlatformClient";
|
||||
|
|
@ -187,7 +187,11 @@ async function configYamlToContinueConfig(options: {
|
|||
|
||||
const continueConfig: ContinueConfig = {
|
||||
slashCommands: [],
|
||||
tools: [...baseToolDefinitions],
|
||||
tools: [
|
||||
...(ide.isWorkspaceRemote()
|
||||
? remoteToolDefinitions
|
||||
: baseToolDefinitions),
|
||||
],
|
||||
mcpServerStatuses: [],
|
||||
contextProviders: [],
|
||||
modelsByRole: {
|
||||
|
|
|
|||
2
core/index.d.ts
vendored
2
core/index.d.ts
vendored
|
|
@ -731,6 +731,8 @@ export interface IDE {
|
|||
|
||||
isTelemetryEnabled(): Promise<boolean>;
|
||||
|
||||
isWorkspaceRemote(): boolean;
|
||||
|
||||
getUniqueId(): Promise<string>;
|
||||
|
||||
getTerminalContents(): Promise<string>;
|
||||
|
|
|
|||
|
|
@ -13,12 +13,11 @@ import { runTerminalCommandTool } from "./definitions/runTerminalCommand";
|
|||
import { searchWebTool } from "./definitions/searchWeb";
|
||||
import { viewDiffTool } from "./definitions/viewDiff";
|
||||
|
||||
export const baseToolDefinitions = [
|
||||
export const remoteToolDefinitions = [
|
||||
readFileTool,
|
||||
editFileTool,
|
||||
createNewFileTool,
|
||||
runTerminalCommandTool,
|
||||
grepSearchTool,
|
||||
globSearchTool,
|
||||
searchWebTool,
|
||||
viewDiffTool,
|
||||
|
|
@ -31,6 +30,8 @@ export const baseToolDefinitions = [
|
|||
// viewRepoMapTool,
|
||||
];
|
||||
|
||||
export const baseToolDefinitions = [...remoteToolDefinitions, grepSearchTool];
|
||||
|
||||
export const getConfigDependentToolDefinitions = (
|
||||
params: ConfigDependentToolParams,
|
||||
): Tool[] => [requestRuleTool(params)];
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@ class VsCodeIde implements IDE {
|
|||
return globalEnabled && continueEnabled;
|
||||
}
|
||||
|
||||
isWorkspaceRemote(): boolean {
|
||||
return vscode.env.remoteName !== undefined;
|
||||
}
|
||||
|
||||
getUniqueId(): Promise<string> {
|
||||
return Promise.resolve(vscode.env.machineId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue