Skip to content
Open
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
13 changes: 13 additions & 0 deletions core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { fetchModels } from "./llm/fetchModels";
import Ollama from "./llm/llms/Ollama";
import { EditAggregator } from "./nextEdit/context/aggregateEdits";
import { createNewPromptFileV2 } from "./promptFiles/createNewPromptFile";
import { BuiltInToolNames } from "./tools/builtIn";
import { callTool } from "./tools/callTool";
import { ChatDescriber } from "./util/chatDescriber";
import { compactConversation } from "./util/conversationCompaction";
Expand Down Expand Up @@ -1185,6 +1186,18 @@ export class Core {
codeBaseIndexer: this.codeBaseIndexer,
});

// Hot-reload config when a rule is created via the create_rule_block tool,
// since ide.writeFile() does not trigger VS Code workspace file events.
if (
toolCall.function.name === BuiltInToolNames.CreateRuleBlock &&
!result.errorMessage
) {
walkDirCache.invalidate();
await this.configHandler.reloadConfig(
"Rule created via create_rule_block tool",
);
}

return result;
}

Expand Down
Loading