insert_code_block -> insert_content

This commit is contained in:
Matt Rubens
2025-01-28 14:36:12 -05:00
parent 68035507af
commit d836548c19
9 changed files with 28 additions and 44 deletions

View File

@@ -251,7 +251,7 @@ describe("isToolAllowedForMode", () => {
it("disables tools when experiment is disabled", () => {
const experiments = {
search_and_replace: false,
insert_code_block: false,
insert_content: false,
}
expect(
@@ -266,21 +266,14 @@ describe("isToolAllowedForMode", () => {
).toBe(false)
expect(
isToolAllowedForMode(
"insert_code_block",
"test-exp-mode",
customModes,
undefined,
undefined,
experiments,
),
isToolAllowedForMode("insert_content", "test-exp-mode", customModes, undefined, undefined, experiments),
).toBe(false)
})
it("allows tools when experiment is enabled", () => {
const experiments = {
search_and_replace: true,
insert_code_block: true,
insert_content: true,
}
expect(
@@ -295,21 +288,14 @@ describe("isToolAllowedForMode", () => {
).toBe(true)
expect(
isToolAllowedForMode(
"insert_code_block",
"test-exp-mode",
customModes,
undefined,
undefined,
experiments,
),
isToolAllowedForMode("insert_content", "test-exp-mode", customModes, undefined, undefined, experiments),
).toBe(true)
})
it("allows non-experimental tools when experiments are disabled", () => {
const experiments = {
search_and_replace: false,
insert_code_block: false,
insert_content: false,
}
expect(

View File

@@ -1,7 +1,7 @@
export const EXPERIMENT_IDS = {
DIFF_STRATEGY: "experimentalDiffStrategy",
SEARCH_AND_REPLACE: "search_and_replace",
INSERT_BLOCK: "insert_code_block",
INSERT_BLOCK: "insert_content",
} as const
export type ExperimentKey = keyof typeof EXPERIMENT_IDS
@@ -29,10 +29,10 @@ export const experimentConfigsMap: Record<ExperimentKey, ExperimentConfig> = {
enabled: false,
},
INSERT_BLOCK: {
name: "Use experimental insert block tool",
name: "Use experimental insert content tool",
description:
"Enable the experimental insert block tool, allowing Roo to insert multiple code blocks at once at specific line numbers without needing to create a diff.",
"Enable the experimental insert content tool, allowing Roo to insert content at specific line numbers without needing to create a diff.",
enabled: false,
},
}

View File

@@ -21,7 +21,7 @@ export const TOOL_DISPLAY_NAMES = {
// Define available tool groups
export const TOOL_GROUPS: Record<string, ToolGroupValues> = {
read: ["read_file", "search_files", "list_files", "list_code_definition_names"],
edit: ["write_to_file", "apply_diff", "insert_code_block", "search_and_replace"],
edit: ["write_to_file", "apply_diff", "insert_content", "search_and_replace"],
browser: ["browser_action"],
command: ["execute_command"],
mcp: ["use_mcp_tool", "access_mcp_resource"],