fix: types
This commit is contained in:
parent
ff80ffeb3f
commit
c1467f5eca
2 changed files with 13 additions and 3 deletions
|
|
@ -1,3 +1,6 @@
|
|||
import { Tool } from "../..";
|
||||
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
|
||||
|
||||
export const createRuleBlock: Tool = {
|
||||
type: "function",
|
||||
displayTitle: "Create Rule Block",
|
||||
|
|
|
|||
|
|
@ -13,11 +13,18 @@ export const createRuleBlockImpl: ToolImpl = async (
|
|||
args: CreateRuleBlockArgs,
|
||||
extras,
|
||||
) => {
|
||||
const fileContent = createRuleMarkdown(args.name, args.rule, {
|
||||
// Create options object with the fields that createRuleMarkdown expects
|
||||
const options: any = {
|
||||
description: args.description,
|
||||
globs: args.globs,
|
||||
patterns: args.patterns,
|
||||
});
|
||||
};
|
||||
|
||||
// Add patterns if provided
|
||||
if (args.patterns) {
|
||||
options.patterns = args.patterns;
|
||||
}
|
||||
|
||||
const fileContent = createRuleMarkdown(args.name, args.rule, options);
|
||||
|
||||
const [localContinueDir] = await extras.ide.getWorkspaceDirs();
|
||||
const ruleFilePath = createRuleFilePath(localContinueDir, args.name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue