This commit is contained in:
Patrick Erichsen 2025-10-14 15:48:35 -07:00
parent 640eb03068
commit 9b908d8ecd
4 changed files with 11 additions and 7 deletions

View file

@ -307,7 +307,11 @@ export type ToCoreFromIdeOrWebviewProtocol = {
"auth/getAuthUrl": [{ useOnboarding: boolean }, { url: string }];
"tools/call": [
{ toolCall: ToolCall },
{ contextItems: ContextItem[]; errorMessage?: string; errorReason?: ContinueErrorReason },
{
contextItems: ContextItem[];
errorMessage?: string;
errorReason?: ContinueErrorReason;
},
];
"tools/evaluatePolicy": [
{ toolName: string; basePolicy: ToolPolicy; args: Record<string, unknown> },

View file

@ -1,9 +1,9 @@
import { ToolImpl } from ".";
import { ContextItem } from "../..";
import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { formatGrepSearchResults } from "../../util/grepSearch";
import { prepareQueryForRipgrep } from "../../util/regexValidator";
import { getStringArg } from "../parseArgs";
import { ContinueError, ContinueErrorReason } from "../../util/errors";
const DEFAULT_GREP_SEARCH_RESULTS_LIMIT = 100;
const DEFAULT_GREP_SEARCH_CHAR_LIMIT = 7500; // ~1500 tokens, will keep truncation simply for now
@ -66,7 +66,7 @@ export const grepSearchImpl: ToolImpl = async (args, extras) => {
throw new ContinueError(
ContinueErrorReason.SearchExecutionFailed,
errorMessage
errorMessage,
);
}

View file

@ -1,6 +1,6 @@
import { ToolImpl } from ".";
import { getStringArg } from "../parseArgs";
import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { getStringArg } from "../parseArgs";
export const requestRuleImpl: ToolImpl = async (args, extras) => {
const name = getStringArg(args, "name");
@ -11,7 +11,7 @@ export const requestRuleImpl: ToolImpl = async (args, extras) => {
if (!rule || !rule.sourceFile) {
throw new ContinueError(
ContinueErrorReason.RuleNotFound,
`Rule with name "${name}" not found or has no file path`
`Rule with name "${name}" not found or has no file path`,
);
}

View file

@ -2,8 +2,8 @@ import generateRepoMap from "../../util/generateRepoMap";
import { resolveRelativePathInDir } from "../../util/ideUtils";
import { ToolImpl } from ".";
import { getStringArg } from "../parseArgs";
import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { getStringArg } from "../parseArgs";
export const viewSubdirectoryImpl: ToolImpl = async (args: any, extras) => {
const directory_path = getStringArg(args, "directory_path");
@ -13,7 +13,7 @@ export const viewSubdirectoryImpl: ToolImpl = async (args: any, extras) => {
if (!uri) {
throw new ContinueError(
ContinueErrorReason.DirectoryNotFound,
`Directory path "${directory_path}" does not exist.`
`Directory path "${directory_path}" does not exist.`,
);
}