From 3b4075493e80f2c0e422dc4b7662fdfd85dc6c9b Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Tue, 10 Feb 2026 16:28:25 -0700 Subject: [PATCH] refactor: remove footgun prompting (file-based system prompt override) Remove the feature that allowed overriding the entire system prompt via .roo/system-prompt-{mode} files. This removes: - Core module: loadSystemPromptFile, getSystemPromptFilePath, PromptVariables - File-based prompt bypass in SYSTEM_PROMPT generation - hasFileBasedSystemPromptOverride method and hasSystemPromptOverride state - SystemPromptWarning banner component and ChatView integration - Advanced: Override System Prompt disclosure section in ModesView - All related i18n keys across 18 locales (advanced, advancedSystemPrompt, systemPromptWarning) - Footgun reference in evals README 47 files changed, 714 deletions --- packages/evals/README.md | 2 +- packages/types/src/vscode-extension-host.ts | 2 - .../__tests__/custom-system-prompt.spec.ts | 201 ------------------ .../__tests__/custom-system-prompt.spec.ts | 134 ------------ .../prompts/sections/custom-system-prompt.ts | 87 -------- src/core/prompts/system.ts | 41 ---- src/core/task/__tests__/Task.spec.ts | 19 ++ src/core/webview/ClineProvider.ts | 21 +- webview-ui/src/components/chat/ChatView.tsx | 8 - .../components/chat/SystemPromptWarning.tsx | 17 -- webview-ui/src/components/modes/ModesView.tsx | 62 ------ .../src/context/ExtensionStateContext.tsx | 1 - webview-ui/src/i18n/locales/ca/chat.json | 1 - webview-ui/src/i18n/locales/ca/prompts.json | 7 - webview-ui/src/i18n/locales/de/chat.json | 1 - webview-ui/src/i18n/locales/de/prompts.json | 7 - webview-ui/src/i18n/locales/en/chat.json | 5 +- webview-ui/src/i18n/locales/en/prompts.json | 7 - webview-ui/src/i18n/locales/es/chat.json | 1 - webview-ui/src/i18n/locales/es/prompts.json | 7 - webview-ui/src/i18n/locales/fr/chat.json | 1 - webview-ui/src/i18n/locales/fr/prompts.json | 7 - webview-ui/src/i18n/locales/hi/chat.json | 1 - webview-ui/src/i18n/locales/hi/prompts.json | 7 - webview-ui/src/i18n/locales/id/chat.json | 1 - webview-ui/src/i18n/locales/id/prompts.json | 7 - webview-ui/src/i18n/locales/it/chat.json | 1 - webview-ui/src/i18n/locales/it/prompts.json | 7 - webview-ui/src/i18n/locales/ja/chat.json | 1 - webview-ui/src/i18n/locales/ja/prompts.json | 7 - webview-ui/src/i18n/locales/ko/chat.json | 1 - webview-ui/src/i18n/locales/ko/prompts.json | 7 - webview-ui/src/i18n/locales/nl/chat.json | 1 - webview-ui/src/i18n/locales/nl/prompts.json | 7 - webview-ui/src/i18n/locales/pl/chat.json | 1 - webview-ui/src/i18n/locales/pl/prompts.json | 7 - webview-ui/src/i18n/locales/pt-BR/chat.json | 1 - .../src/i18n/locales/pt-BR/prompts.json | 7 - webview-ui/src/i18n/locales/ru/chat.json | 1 - webview-ui/src/i18n/locales/ru/prompts.json | 7 - webview-ui/src/i18n/locales/tr/chat.json | 1 - webview-ui/src/i18n/locales/tr/prompts.json | 7 - webview-ui/src/i18n/locales/vi/chat.json | 1 - webview-ui/src/i18n/locales/vi/prompts.json | 7 - webview-ui/src/i18n/locales/zh-CN/chat.json | 1 - .../src/i18n/locales/zh-CN/prompts.json | 7 - webview-ui/src/i18n/locales/zh-TW/chat.json | 1 - .../src/i18n/locales/zh-TW/prompts.json | 7 - 48 files changed, 23 insertions(+), 720 deletions(-) delete mode 100644 src/core/prompts/__tests__/custom-system-prompt.spec.ts delete mode 100644 src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts delete mode 100644 src/core/prompts/sections/custom-system-prompt.ts delete mode 100644 webview-ui/src/components/chat/SystemPromptWarning.tsx diff --git a/packages/evals/README.md b/packages/evals/README.md index 8a54e56b819..4d985220f22 100644 --- a/packages/evals/README.md +++ b/packages/evals/README.md @@ -37,7 +37,7 @@ Additionally, you'll find in Docker Desktop that database and redis services are Navigate to [localhost:3446](http://localhost:3446/) in your browser and click the 🚀 button. -By default a evals run will run all programming exercises in [Roo Code Evals](https://github.com/RooCodeInc/Roo-Code-Evals) repository with the Claude Sonnet 4 model and default settings. For basic configuration you can specify the LLM to use and any subset of the exercises you'd like. For advanced configuration you can import a Roo Code settings file which will allow you to run the evals with Roo Code configured any way you'd like (this includes custom modes, a footgun prompt, etc). +By default a evals run will run all programming exercises in [Roo Code Evals](https://github.com/RooCodeInc/Roo-Code-Evals) repository with the Claude Sonnet 4 model and default settings. For basic configuration you can specify the LLM to use and any subset of the exercises you'd like. For advanced configuration you can import a Roo Code settings file which will allow you to run the evals with Roo Code configured any way you'd like (this includes custom modes, custom instructions, etc). diff --git a/packages/types/src/vscode-extension-host.ts b/packages/types/src/vscode-extension-host.ts index 2e738629271..45c4ab2090a 100644 --- a/packages/types/src/vscode-extension-host.ts +++ b/packages/types/src/vscode-extension-host.ts @@ -381,7 +381,6 @@ export type ExtensionState = Pick< lastShownAnnouncementId?: string apiModelId?: string mcpServers?: McpServer[] - hasSystemPromptOverride?: boolean mdmCompliant?: boolean remoteControlEnabled: boolean taskSyncEnabled: boolean @@ -645,7 +644,6 @@ export interface WebviewMessage { newSkillModeSlugs?: string[] // For updateSkillModes (new mode restrictions) requestId?: string ids?: string[] - hasSystemPromptOverride?: boolean terminalOperation?: "continue" | "abort" messageTs?: number restoreCheckpoint?: boolean diff --git a/src/core/prompts/__tests__/custom-system-prompt.spec.ts b/src/core/prompts/__tests__/custom-system-prompt.spec.ts deleted file mode 100644 index 0ec2956b317..00000000000 --- a/src/core/prompts/__tests__/custom-system-prompt.spec.ts +++ /dev/null @@ -1,201 +0,0 @@ -// Mocks must come first, before imports -vi.mock("vscode", () => ({ - env: { - language: "en", - }, - workspace: { - workspaceFolders: [{ uri: { fsPath: "/test/path" } }], - getWorkspaceFolder: vi.fn().mockReturnValue({ uri: { fsPath: "/test/path" } }), - }, - window: { - activeTextEditor: undefined, - }, - EventEmitter: vi.fn().mockImplementation(() => ({ - event: vi.fn(), - fire: vi.fn(), - dispose: vi.fn(), - })), -})) - -vi.mock("fs/promises", () => { - const mockReadFile = vi.fn() - const mockMkdir = vi.fn().mockResolvedValue(undefined) - const mockAccess = vi.fn().mockResolvedValue(undefined) - - return { - default: { - readFile: mockReadFile, - mkdir: mockMkdir, - access: mockAccess, - }, - readFile: mockReadFile, - mkdir: mockMkdir, - access: mockAccess, - } -}) - -vi.mock("../../../utils/fs", () => ({ - fileExistsAtPath: vi.fn().mockResolvedValue(true), - createDirectoriesForFile: vi.fn().mockResolvedValue([]), -})) - -import { SYSTEM_PROMPT } from "../system" -import { defaultModeSlug, modes } from "../../../shared/modes" -import * as vscode from "vscode" -import * as fs from "fs/promises" -import { toPosix } from "./utils" - -// Get the mocked fs module -const mockedFs = vi.mocked(fs) - -// Create a mock ExtensionContext with relative paths instead of absolute paths -const mockContext = { - extensionPath: "mock/extension/path", - globalStoragePath: "mock/storage/path", - storagePath: "mock/storage/path", - logPath: "mock/log/path", - subscriptions: [], - workspaceState: { - get: () => undefined, - update: () => Promise.resolve(), - }, - globalState: { - get: () => undefined, - update: () => Promise.resolve(), - setKeysForSync: () => {}, - }, - extensionUri: { fsPath: "mock/extension/path" }, - globalStorageUri: { fsPath: "mock/settings/path" }, - asAbsolutePath: (relativePath: string) => `mock/extension/path/${relativePath}`, - extension: { - packageJSON: { - version: "1.0.0", - }, - }, -} as unknown as vscode.ExtensionContext - -describe("File-Based Custom System Prompt", () => { - beforeEach(() => { - // Reset mocks before each test - vi.clearAllMocks() - - // Default behavior: file doesn't exist - mockedFs.readFile.mockRejectedValue({ code: "ENOENT" }) - }) - - // Skipped on Windows due to timeout/flake issues - it.skipIf(process.platform === "win32")( - "should use default generation when no file-based system prompt is found", - async () => { - const customModePrompts = { - [defaultModeSlug]: { - roleDefinition: "Test role definition", - }, - } - - const prompt = await SYSTEM_PROMPT( - mockContext, - "test/path", // Using a relative path without leading slash - false, // supportsImages - undefined, // mcpHub - undefined, // diffStrategy - undefined, // browserViewportSize - defaultModeSlug, // mode - customModePrompts, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - undefined, // experiments - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Should contain default sections - expect(prompt).toContain("TOOL USE") - expect(prompt).toContain("CAPABILITIES") - expect(prompt).toContain("MODES") - expect(prompt).toContain("Test role definition") - }, - ) - - it("should use file-based custom system prompt when available", async () => { - // Mock the readFile to return content from a file - const fileCustomSystemPrompt = "Custom system prompt from file" - // When called with utf-8 encoding, return a string - mockedFs.readFile.mockImplementation((filePath, options) => { - if (toPosix(filePath).includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { - return Promise.resolve(fileCustomSystemPrompt) - } - return Promise.reject({ code: "ENOENT" }) - }) - - const prompt = await SYSTEM_PROMPT( - mockContext, - "test/path", // Using a relative path without leading slash - false, // supportsImages - undefined, // mcpHub - undefined, // diffStrategy - undefined, // browserViewportSize - defaultModeSlug, // mode - undefined, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - undefined, // experiments - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Should contain role definition and file-based system prompt - expect(prompt).toContain(modes[0].roleDefinition) - expect(prompt).toContain(fileCustomSystemPrompt) - - // Should not contain any of the default sections - expect(prompt).not.toContain("CAPABILITIES") - expect(prompt).not.toContain("MODES") - }) - - it("should combine file-based system prompt with role definition and custom instructions", async () => { - // Mock the readFile to return content from a file - const fileCustomSystemPrompt = "Custom system prompt from file" - mockedFs.readFile.mockImplementation((filePath, options) => { - if (toPosix(filePath).includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { - return Promise.resolve(fileCustomSystemPrompt) - } - return Promise.reject({ code: "ENOENT" }) - }) - - // Define custom role definition - const customRoleDefinition = "Custom role definition" - const customModePrompts = { - [defaultModeSlug]: { - roleDefinition: customRoleDefinition, - }, - } - - const prompt = await SYSTEM_PROMPT( - mockContext, - "test/path", // Using a relative path without leading slash - false, // supportsImages - undefined, // mcpHub - undefined, // diffStrategy - undefined, // browserViewportSize - defaultModeSlug, // mode - customModePrompts, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - undefined, // experiments - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Should contain custom role definition and file-based system prompt - expect(prompt).toContain(customRoleDefinition) - expect(prompt).toContain(fileCustomSystemPrompt) - - // Should not contain any of the default sections - expect(prompt).not.toContain("CAPABILITIES") - expect(prompt).not.toContain("MODES") - }) -}) diff --git a/src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts b/src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts deleted file mode 100644 index 81f96728d9f..00000000000 --- a/src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts +++ /dev/null @@ -1,134 +0,0 @@ -// Mocks must come first, before imports - -vi.mock("fs/promises") - -// Then imports -import type { Mock } from "vitest" -import path from "path" -import { readFile } from "fs/promises" -import type { Mode } from "../../../../shared/modes" // Type-only import -import { loadSystemPromptFile, PromptVariables } from "../custom-system-prompt" - -// Cast the mocked readFile to the correct Mock type -const mockedReadFile = readFile as Mock - -describe("loadSystemPromptFile", () => { - // Corrected PromptVariables type and added mockMode - const mockVariables: PromptVariables = { - workspace: "/path/to/workspace", - } - const mockCwd = "/mock/cwd" - const mockMode: Mode = "test" // Use Mode type, e.g., 'test' - // Corrected expected file path format - const expectedFilePath = path.join(mockCwd, ".roo", `system-prompt-${mockMode}`) - - beforeEach(() => { - // Clear mocks before each test - mockedReadFile.mockClear() - }) - - it("should return an empty string if the file does not exist (ENOENT)", async () => { - const error: NodeJS.ErrnoException = new Error("File not found") - error.code = "ENOENT" - mockedReadFile.mockRejectedValue(error) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Updated test: should re-throw unexpected errors - it("should re-throw unexpected errors from readFile", async () => { - const expectedError = new Error("Some other error") - mockedReadFile.mockRejectedValue(expectedError) - - // Assert that the promise rejects with the specific error - await expect(loadSystemPromptFile(mockCwd, mockMode, mockVariables)).rejects.toThrow(expectedError) - - // Verify readFile was still called correctly - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - it("should return an empty string if the file content is empty", async () => { - mockedReadFile.mockResolvedValue("") - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Updated test to only check workspace interpolation - it("should correctly interpolate workspace variable", async () => { - const template = "Workspace is: {{workspace}}" - mockedReadFile.mockResolvedValue(template) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("Workspace is: /path/to/workspace") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Updated test for multiple occurrences of workspace - it("should handle multiple occurrences of the workspace variable", async () => { - const template = "Path: {{workspace}}/{{workspace}}" - mockedReadFile.mockResolvedValue(template) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("Path: /path/to/workspace//path/to/workspace") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Updated test for mixed used/unused - it("should handle mixed used workspace and unused variables", async () => { - const template = "Workspace: {{workspace}}, Unused: {{unusedVar}}, Another: {{another}}" - mockedReadFile.mockResolvedValue(template) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - // Unused variables should remain untouched - expect(result).toBe("Workspace: /path/to/workspace, Unused: {{unusedVar}}, Another: {{another}}") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Test remains valid, just needs the mode argument and updated template - it("should handle templates with placeholders not present in variables", async () => { - const template = "Workspace: {{workspace}}, Missing: {{missingPlaceholder}}" - mockedReadFile.mockResolvedValue(template) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("Workspace: /path/to/workspace, Missing: {{missingPlaceholder}}") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) - - // Removed the test for extra keys as PromptVariables is simple now - - // Test remains valid, just needs the mode argument - it("should handle template with no variables", async () => { - const template = "This is a static prompt." - mockedReadFile.mockResolvedValue(template) - - // Added mockMode argument - const result = await loadSystemPromptFile(mockCwd, mockMode, mockVariables) - - expect(result).toBe("This is a static prompt.") - expect(mockedReadFile).toHaveBeenCalledTimes(1) - expect(mockedReadFile).toHaveBeenCalledWith(expectedFilePath, "utf-8") - }) -}) diff --git a/src/core/prompts/sections/custom-system-prompt.ts b/src/core/prompts/sections/custom-system-prompt.ts deleted file mode 100644 index f401000bb55..00000000000 --- a/src/core/prompts/sections/custom-system-prompt.ts +++ /dev/null @@ -1,87 +0,0 @@ -import fs from "fs/promises" -import path from "path" -import { Mode } from "../../../shared/modes" -import { fileExistsAtPath } from "../../../utils/fs" - -export type PromptVariables = { - workspace?: string - mode?: string - language?: string - shell?: string - operatingSystem?: string -} - -function interpolatePromptContent(content: string, variables: PromptVariables): string { - let interpolatedContent = content - for (const key in variables) { - if ( - Object.prototype.hasOwnProperty.call(variables, key) && - variables[key as keyof PromptVariables] !== undefined - ) { - const placeholder = new RegExp(`\\{\\{${key}\\}\\}`, "g") - interpolatedContent = interpolatedContent.replace(placeholder, variables[key as keyof PromptVariables]!) - } - } - return interpolatedContent -} - -/** - * Safely reads a file, returning an empty string if the file doesn't exist - */ -async function safeReadFile(filePath: string): Promise { - try { - const content = await fs.readFile(filePath, "utf-8") - // When reading with "utf-8" encoding, content should be a string - return content.trim() - } catch (err) { - const errorCode = (err as NodeJS.ErrnoException).code - if (!errorCode || !["ENOENT", "EISDIR"].includes(errorCode)) { - throw err - } - return "" - } -} - -/** - * Get the path to a system prompt file for a specific mode - */ -export function getSystemPromptFilePath(cwd: string, mode: Mode): string { - return path.join(cwd, ".roo", `system-prompt-${mode}`) -} - -/** - * Loads custom system prompt from a file at .roo/system-prompt-[mode slug] - * If the file doesn't exist, returns an empty string - */ -export async function loadSystemPromptFile(cwd: string, mode: Mode, variables: PromptVariables): Promise { - const filePath = getSystemPromptFilePath(cwd, mode) - const rawContent = await safeReadFile(filePath) - if (!rawContent) { - return "" - } - const interpolatedContent = interpolatePromptContent(rawContent, variables) - return interpolatedContent -} - -/** - * Ensures the .roo directory exists, creating it if necessary - */ -export async function ensureRooDirectory(cwd: string): Promise { - const rooDir = path.join(cwd, ".roo") - - // Check if directory already exists - if (await fileExistsAtPath(rooDir)) { - return - } - - // Create the directory - try { - await fs.mkdir(rooDir, { recursive: true }) - } catch (err) { - // If directory already exists (race condition), ignore the error - const errorCode = (err as NodeJS.ErrnoException).code - if (errorCode !== "EEXIST") { - throw err - } - } -} diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 1731952a4eb..0a187a9e2e3 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -1,5 +1,4 @@ import * as vscode from "vscode" -import * as os from "os" import { type ModeConfig, type PromptComponent, type CustomModePrompts, type TodoItem } from "@roo-code/types" @@ -12,8 +11,6 @@ import { McpHub } from "../../services/mcp/McpHub" import { CodeIndexManager } from "../../services/code-index/manager" import { SkillsManager } from "../../services/skills/SkillsManager" -import { PromptVariables, loadSystemPromptFile } from "./sections/custom-system-prompt" - import type { SystemPromptSettings } from "./types" import { getRulesSection, @@ -136,50 +133,12 @@ export const SYSTEM_PROMPT = async ( throw new Error("Extension context is required for generating system prompt") } - // Try to load custom system prompt from file - const variablesForPrompt: PromptVariables = { - workspace: cwd, - mode: mode, - language: language ?? formatLanguage(vscode.env.language), - shell: vscode.env.shell, - operatingSystem: os.type(), - } - const fileCustomSystemPrompt = await loadSystemPromptFile(cwd, mode, variablesForPrompt) - // Check if it's a custom mode const promptComponent = getPromptComponent(customModePrompts, mode) // Get full mode config from custom modes or fall back to built-in modes const currentMode = getModeBySlug(mode, customModes) || modes.find((m) => m.slug === mode) || modes[0] - // If a file-based custom system prompt exists, use it - if (fileCustomSystemPrompt) { - const { roleDefinition, baseInstructions: baseInstructionsForFile } = getModeSelection( - mode, - promptComponent, - customModes, - ) - - const customInstructions = await addCustomInstructions( - baseInstructionsForFile, - globalCustomInstructions || "", - cwd, - mode, - { - language: language ?? formatLanguage(vscode.env.language), - rooIgnoreInstructions, - settings, - }, - ) - - // For file-based prompts, don't include the tool sections - return `${roleDefinition} - -${fileCustomSystemPrompt} - -${customInstructions}` - } - return generatePrompt( context, cwd, diff --git a/src/core/task/__tests__/Task.spec.ts b/src/core/task/__tests__/Task.spec.ts index a065c11eaae..7e6ca950e5a 100644 --- a/src/core/task/__tests__/Task.spec.ts +++ b/src/core/task/__tests__/Task.spec.ts @@ -65,6 +65,8 @@ vi.mock("fs/promises", async (importOriginal) => { }), unlink: vi.fn().mockResolvedValue(undefined), rmdir: vi.fn().mockResolvedValue(undefined), + stat: vi.fn().mockRejectedValue({ code: "ENOENT" }), + readdir: vi.fn().mockResolvedValue([]), } return { @@ -962,9 +964,15 @@ describe("Cline", () => { mockProvider = { context: { globalStorageUri: { fsPath: "/test/storage" }, + globalState: { + get: vi.fn().mockImplementation(() => undefined), + update: vi.fn().mockResolvedValue(undefined), + keys: vi.fn().mockReturnValue([]), + }, }, getState: vi.fn().mockResolvedValue({ apiConfiguration: mockApiConfig, + mcpEnabled: false, }), getMcpHub: vi.fn().mockReturnValue(undefined), getSkillsManager: vi.fn().mockReturnValue(undefined), @@ -996,6 +1004,7 @@ describe("Cline", () => { task: "parent task", startTask: false, }) + vi.spyOn(parent as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Mock the API stream response const mockStream = { @@ -1032,6 +1041,7 @@ describe("Cline", () => { rootTask: parent, startTask: false, }) + vi.spyOn(child as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Spy on child.say to verify the emitted message type const saySpy = vi.spyOn(child, "say") @@ -1083,6 +1093,7 @@ describe("Cline", () => { task: "parent task", startTask: false, }) + vi.spyOn(parent as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Mock the API stream response const mockStream = { @@ -1121,6 +1132,7 @@ describe("Cline", () => { rootTask: parent, startTask: false, }) + vi.spyOn(child as any, "getSystemPrompt").mockResolvedValue("mock system prompt") vi.spyOn(child.api, "createMessage").mockReturnValue(mockStream) @@ -1143,6 +1155,7 @@ describe("Cline", () => { task: "parent task", startTask: false, }) + vi.spyOn(parent as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Mock the API stream response const mockStream = { @@ -1176,6 +1189,7 @@ describe("Cline", () => { rootTask: parent, startTask: false, }) + vi.spyOn(child1 as any, "getSystemPrompt").mockResolvedValue("mock system prompt") vi.spyOn(child1.api, "createMessage").mockReturnValue(mockStream) @@ -1199,6 +1213,7 @@ describe("Cline", () => { rootTask: parent, startTask: false, }) + vi.spyOn(child2 as any, "getSystemPrompt").mockResolvedValue("mock system prompt") vi.spyOn(child2.api, "createMessage").mockReturnValue(mockStream) @@ -1215,6 +1230,7 @@ describe("Cline", () => { mockApiConfig.rateLimitSeconds = 0 mockProvider.getState.mockResolvedValue({ apiConfiguration: mockApiConfig, + mcpEnabled: false, }) // Create parent task @@ -1224,6 +1240,7 @@ describe("Cline", () => { task: "parent task", startTask: false, }) + vi.spyOn(parent as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Mock the API stream response const mockStream = { @@ -1257,6 +1274,7 @@ describe("Cline", () => { rootTask: parent, startTask: false, }) + vi.spyOn(child as any, "getSystemPrompt").mockResolvedValue("mock system prompt") vi.spyOn(child.api, "createMessage").mockReturnValue(mockStream) @@ -1276,6 +1294,7 @@ describe("Cline", () => { task: "test task", startTask: false, }) + vi.spyOn(task as any, "getSystemPrompt").mockResolvedValue("mock system prompt") // Mock the API stream response const mockStream = { diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 7c3556a2f2b..332ae31c8b5 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -94,7 +94,6 @@ import { ContextProxy } from "../config/ContextProxy" import { ProviderSettingsManager } from "../config/ProviderSettingsManager" import { CustomModesManager } from "../config/CustomModesManager" import { Task } from "../task/Task" -import { getSystemPromptFilePath } from "../prompts/sections/custom-system-prompt" import { webviewMessageHandler } from "./webviewMessageHandler" import type { ClineMessage, TodoItem } from "@roo-code/types" @@ -2018,14 +2017,6 @@ export class ClineProvider } } - /** - * Checks if there is a file-based system prompt override for the given mode - */ - async hasFileBasedSystemPromptOverride(mode: Mode): Promise { - const promptFilePath = getSystemPromptFilePath(this.cwd, mode) - return await fileExistsAtPath(promptFilePath) - } - /** * Merges allowed commands from global state and workspace configuration * with proper validation and deduplication @@ -2204,10 +2195,6 @@ export class ClineProvider const mergedDeniedCommands = this.mergeDeniedCommands(deniedCommands) const cwd = this.cwd - // Check if there's a system prompt override for the current mode - const currentMode = mode ?? defaultModeSlug - const hasSystemPromptOverride = await this.hasFileBasedSystemPromptOverride(currentMode) - return { version: this.context.extension?.packageJSON?.version ?? "", apiConfiguration, @@ -2288,7 +2275,6 @@ export class ClineProvider maxImageFileSize: maxImageFileSize ?? 5, maxTotalImageSize: maxTotalImageSize ?? 20, settingsImportedAt: this.settingsImportedAt, - hasSystemPromptOverride, historyPreviewCollapsed: historyPreviewCollapsed ?? false, reasoningBlockCollapsed: reasoningBlockCollapsed ?? true, enterBehavior: enterBehavior ?? "send", @@ -2358,12 +2344,7 @@ export class ClineProvider async getState(): Promise< Omit< ExtensionState, - | "clineMessages" - | "renderContext" - | "hasOpenedModeSelector" - | "version" - | "shouldShowAnnouncement" - | "hasSystemPromptOverride" + "clineMessages" | "renderContext" | "hasOpenedModeSelector" | "version" | "shouldShowAnnouncement" > > { const stateValues = this.contextProxy.getValues() diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 3df10e4e996..81b01ea134f 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -44,7 +44,6 @@ import ChatRow from "./ChatRow" import WarningRow from "./WarningRow" import { ChatTextArea } from "./ChatTextArea" import TaskHeader from "./TaskHeader" -import SystemPromptWarning from "./SystemPromptWarning" import ProfileViolationWarning from "./ProfileViolationWarning" import { CheckpointWarning } from "./CheckpointWarning" import { QueuedMessages } from "./QueuedMessages" @@ -92,7 +91,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction - {hasSystemPromptOverride && ( -
- -
- )} - {checkpointWarning && (
diff --git a/webview-ui/src/components/chat/SystemPromptWarning.tsx b/webview-ui/src/components/chat/SystemPromptWarning.tsx deleted file mode 100644 index 0ed7a727337..00000000000 --- a/webview-ui/src/components/chat/SystemPromptWarning.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react" -import { useAppTranslation } from "@/i18n/TranslationContext" - -export const SystemPromptWarning: React.FC = () => { - const { t } = useAppTranslation() - - return ( -
-
- -
- {t("chat:systemPromptWarning")} -
- ) -} - -export default SystemPromptWarning diff --git a/webview-ui/src/components/modes/ModesView.tsx b/webview-ui/src/components/modes/ModesView.tsx index 15e70f0ebce..eeeaf026cc2 100644 --- a/webview-ui/src/components/modes/ModesView.tsx +++ b/webview-ui/src/components/modes/ModesView.tsx @@ -92,7 +92,6 @@ const ModesView = () => { const [isToolsEditMode, setIsToolsEditMode] = useState(false) const [showConfigMenu, setShowConfigMenu] = useState(false) const [isCreateModeDialogOpen, setIsCreateModeDialogOpen] = useState(false) - const [isSystemPromptDisclosureOpen, setIsSystemPromptDisclosureOpen] = useState(false) const [isExporting, setIsExporting] = useState(false) const [isImporting, setIsImporting] = useState(false) const [showImportDialog, setShowImportDialog] = useState(false) @@ -1328,67 +1327,6 @@ const ModesView = () => {
- - {/* Advanced Features Disclosure */} -
- - - {isSystemPromptDisclosureOpen && ( -
- {/* Override System Prompt Section */} -
-

- Override System Prompt -

-
- { - const currentMode = getCurrentMode() - if (!currentMode) return - - vscode.postMessage({ - type: "openFile", - text: `./.roo/system-prompt-${currentMode.slug}`, - values: { - create: true, - content: "", - }, - }) - }} - /> - ), - "1": ( - - ), - "2": , - }} - /> -
-
-
- )} -
diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index c0319648aa6..85a750065ff 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -37,7 +37,6 @@ export interface ExtensionStateContextType extends ExtensionState { showWelcome: boolean theme: any mcpServers: McpServer[] - hasSystemPromptOverride?: boolean currentCheckpoint?: string currentTaskTodos?: TodoItem[] // Initial todos for the current task filePaths: string[] diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 54602475754..cc9a215d898 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -408,7 +408,6 @@ "copy_code": "Copiar codi" } }, - "systemPromptWarning": "ADVERTÈNCIA: S'ha activat una substitució personalitzada d'instruccions del sistema. Això pot trencar greument la funcionalitat i causar un comportament impredictible.", "profileViolationWarning": "El perfil actual no és compatible amb la configuració de la teva organització", "shellIntegration": { "title": "Advertència d'execució d'ordres", diff --git a/webview-ui/src/i18n/locales/ca/prompts.json b/webview-ui/src/i18n/locales/ca/prompts.json index 66cd1c76884..baef6053fe6 100644 --- a/webview-ui/src/i18n/locales/ca/prompts.json +++ b/webview-ui/src/i18n/locales/ca/prompts.json @@ -71,9 +71,6 @@ "description": "Només disponible en aquest espai de treball. Si el mode exportat contenia fitxers de regles, es tornaran a crear a la carpeta .roo/rules-{slug}/." } }, - "advanced": { - "title": "Avançat" - }, "globalCustomInstructions": { "title": "Instruccions personalitzades per a tots els modes", "description": "Aquestes instruccions s'apliquen a tots els modes. Proporcionen un conjunt bàsic de comportaments que es poden millorar amb instruccions específiques de cada mode a continuació. <0>Més informació", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Avançat: Sobreescriure prompt del sistema", - "description": "<2>⚠️ Avís: Aquesta funcionalitat avançada eludeix les salvaguardes. <1>LLEGIU AIXÒ ABANS D'UTILITZAR!Sobreescriviu el prompt del sistema per defecte creant un fitxer a .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Crear nou mode", "close": "Tancar", diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index fe00c912787..54c462e2a71 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -408,7 +408,6 @@ "copy_code": "Code kopieren" } }, - "systemPromptWarning": "WARNUNG: Benutzerdefinierte Systemaufforderung aktiv. Dies kann die Funktionalität erheblich beeinträchtigen und zu unvorhersehbarem Verhalten führen.", "profileViolationWarning": "Das aktuelle Profil ist nicht kompatibel mit den Einstellungen deiner Organisation", "shellIntegration": { "title": "Befehlsausführungswarnung", diff --git a/webview-ui/src/i18n/locales/de/prompts.json b/webview-ui/src/i18n/locales/de/prompts.json index 9588ff66512..0418741c445 100644 --- a/webview-ui/src/i18n/locales/de/prompts.json +++ b/webview-ui/src/i18n/locales/de/prompts.json @@ -71,9 +71,6 @@ "description": "Nur in diesem Arbeitsbereich verfügbar. Wenn der exportierte Modus Regeldateien enthielt, werden diese im Ordner .roo/rules-{slug}/ neu erstellt." } }, - "advanced": { - "title": "Erweitert" - }, "globalCustomInstructions": { "title": "Benutzerdefinierte Anweisungen für alle Modi", "description": "Diese Anweisungen gelten für alle Modi. Sie bieten einen grundlegenden Satz von Verhaltensweisen, die durch modusspezifische Anweisungen unten erweitert werden können. <0>Mehr erfahren", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Erweitert: System-Prompt überschreiben", - "description": "<2>⚠️ Warnung: Diese erweiterte Funktion umgeht Sicherheitsvorkehrungen. <1>LESEN SIE DIES VOR DER VERWENDUNG!Überschreiben Sie den Standard-System-Prompt, indem Sie eine Datei unter .roo/system-prompt-{{slug}} erstellen." - }, "createModeDialog": { "title": "Neuen Modus erstellen", "close": "Schließen", diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index 2a0cc4a54ce..0bb3f5bf4b6 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -174,14 +174,14 @@ "rateLimitWait": "Rate limiting", "errorTitle": "Provider Error {{code}}", "errorMessage": { - "docs": "Docs", - "goToSettings": "Settings", "400": "The provider couldn't process the request as made. Stop the task and try a different approach.", "401": "Couldn't authenticate with provider. Please check your API key configuration.", "402": "You seem to have run out of funds/credits in your account. Go to your provider and add more to continue.", "403": "Unauthorized. Your API key is valid, but the provider refused to complete this request.", "429": "Too many requests. You're being rate-limited by the provider. Please wait a bit before your next API call.", "500": "Provider server error. Something is wrong on the provider side, there's nothing wrong with your request.", + "docs": "Docs", + "goToSettings": "Settings", "connection": "Connection error. Make sure you have a working internet connection.", "unknown": "Unknown API error. Please contact Roo Code support.", "claudeCodeNotAuthenticated": "You need to sign in to use Claude Code. Go to Settings and click \"Sign in to Claude Code\" to authenticate." @@ -435,7 +435,6 @@ "copy_code": "Copy code" } }, - "systemPromptWarning": "WARNING: Custom system prompt override active. This can severely break functionality and cause unpredictable behavior.", "profileViolationWarning": "The current profile isn't compatible with your organization's settings", "shellIntegration": { "title": "Command Execution Warning", diff --git a/webview-ui/src/i18n/locales/en/prompts.json b/webview-ui/src/i18n/locales/en/prompts.json index 19837c6b2c3..9fca2be718f 100644 --- a/webview-ui/src/i18n/locales/en/prompts.json +++ b/webview-ui/src/i18n/locales/en/prompts.json @@ -70,9 +70,6 @@ "description": "Only available in this workspace. If the exported mode contained rules files, they will be recreated in .roo/rules-{slug}/ folder." } }, - "advanced": { - "title": "Advanced: Override System Prompt" - }, "globalCustomInstructions": { "title": "Custom Instructions for All Modes", "description": "These instructions apply to all modes. They provide a base set of behaviors that can be enhanced by mode-specific instructions below. <0>Learn more", @@ -145,10 +142,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Advanced: Override System Prompt", - "description": "<2>⚠️ Warning: This advanced feature bypasses safeguards. <1>READ THIS BEFORE USING!Override the default system prompt by creating a file at .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Create New Mode", "close": "Close", diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index 56f3c5404b3..71dfd95d69b 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -408,7 +408,6 @@ "copy_code": "Copiar código" } }, - "systemPromptWarning": "ADVERTENCIA: Anulación de instrucciones del sistema personalizada activa. Esto puede romper gravemente la funcionalidad y causar un comportamiento impredecible.", "profileViolationWarning": "El perfil actual no es compatible con la configuración de tu organización", "shellIntegration": { "title": "Advertencia de ejecución de comandos", diff --git a/webview-ui/src/i18n/locales/es/prompts.json b/webview-ui/src/i18n/locales/es/prompts.json index e800cee888c..52badf6e5be 100644 --- a/webview-ui/src/i18n/locales/es/prompts.json +++ b/webview-ui/src/i18n/locales/es/prompts.json @@ -71,9 +71,6 @@ "description": "Solo disponible en este espacio de trabajo. Si el modo exportado contenía archivos de reglas, se volverán a crear en la carpeta .roo/rules-{slug}/." } }, - "advanced": { - "title": "Avanzado" - }, "globalCustomInstructions": { "title": "Instrucciones personalizadas para todos los modos", "description": "Estas instrucciones se aplican a todos los modos. Proporcionan un conjunto base de comportamientos que pueden ser mejorados por instrucciones específicas de cada modo a continuación. <0>Más información", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Avanzado: Anular solicitud del sistema", - "description": "<2>⚠️ Advertencia: Esta función avanzada omite las medidas de seguridad. <1>¡LEE ESTO ANTES DE USAR!Anula la solicitud del sistema predeterminada creando un archivo en .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Crear nuevo modo", "close": "Cerrar", diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index f838e1de27f..c86f01fa1a2 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -408,7 +408,6 @@ "copy_code": "Copier le code" } }, - "systemPromptWarning": "AVERTISSEMENT : Remplacement d'instructions système personnalisées actif. Cela peut gravement perturber la fonctionnalité et provoquer un comportement imprévisible.", "profileViolationWarning": "Le profil actuel n'est pas compatible avec les paramètres de votre organisation", "shellIntegration": { "title": "Avertissement d'exécution de commande", diff --git a/webview-ui/src/i18n/locales/fr/prompts.json b/webview-ui/src/i18n/locales/fr/prompts.json index 527109e136e..ad8bbc245ce 100644 --- a/webview-ui/src/i18n/locales/fr/prompts.json +++ b/webview-ui/src/i18n/locales/fr/prompts.json @@ -71,9 +71,6 @@ "description": "Disponible uniquement dans cet espace de travail. Si le mode exporté contenait des fichiers de règles, ils seront recréés dans le dossier .roo/rules-{slug}/." } }, - "advanced": { - "title": "Avancé" - }, "globalCustomInstructions": { "title": "Instructions personnalisées pour tous les modes", "description": "Ces instructions s'appliquent à tous les modes. Elles fournissent un ensemble de comportements de base qui peuvent être améliorés par des instructions spécifiques au mode ci-dessous. <0>En savoir plus", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Avancé : Remplacer le prompt système", - "description": "<2>⚠️ Attention : Cette fonctionnalité avancée contourne les mesures de protection. <1>LISEZ CECI AVANT UTILISATION !Remplacez le prompt système par défaut en créant un fichier à l'emplacement .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Créer un nouveau mode", "close": "Fermer", diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index 0a91af01308..e6447438f26 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -408,7 +408,6 @@ "copy_code": "कोड कॉपी करें" } }, - "systemPromptWarning": "चेतावनी: कस्टम सिस्टम प्रॉम्प्ट ओवरराइड सक्रिय है। यह कार्यक्षमता को गंभीर रूप से बाधित कर सकता है और अनियमित व्यवहार का कारण बन सकता है.", "profileViolationWarning": "वर्तमान प्रोफ़ाइल आपके संगठन की सेटिंग्स के साथ संगत नहीं है", "shellIntegration": { "title": "कमांड निष्पादन चेतावनी", diff --git a/webview-ui/src/i18n/locales/hi/prompts.json b/webview-ui/src/i18n/locales/hi/prompts.json index d493aa3430c..d710f28c2d6 100644 --- a/webview-ui/src/i18n/locales/hi/prompts.json +++ b/webview-ui/src/i18n/locales/hi/prompts.json @@ -71,9 +71,6 @@ "description": "केवल इस कार्यक्षेत्र में उपलब्ध। यदि निर्यात किए गए मोड में नियम फाइलें थीं, तो उन्हें .roo/rules-{slug}/ फ़ोल्डर में फिर से बनाया जाएगा।" } }, - "advanced": { - "title": "उन्नत" - }, "globalCustomInstructions": { "title": "सभी मोड्स के लिए कस्टम निर्देश", "description": "ये निर्देश सभी मोड्स पर लागू होते हैं। वे व्यवहारों का एक आधार सेट प्रदान करते हैं जिन्हें नीचे दिए गए मोड-विशिष्ट निर्देशों द्वारा बढ़ाया जा सकता है। <0>और जानें", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "उन्नत: सिस्टम प्रॉम्प्ट ओवरराइड करें", - "description": "<2>⚠️ चेतावनी: यह उन्नत सुविधा सुरक्षा उपायों को दरकिनार करती है। <1>उपयोग करने से पहले इसे पढ़ें!अपने वर्कस्पेस में .roo/system-prompt-{{slug}} पर एक फ़ाइल बनाकर डिफ़ॉल्ट सिस्टम प्रॉम्प्ट को ओवरराइड करें।" - }, "createModeDialog": { "title": "नया मोड बनाएँ", "close": "बंद करें", diff --git a/webview-ui/src/i18n/locales/id/chat.json b/webview-ui/src/i18n/locales/id/chat.json index 7adbd06edd7..dd7fd0ed55a 100644 --- a/webview-ui/src/i18n/locales/id/chat.json +++ b/webview-ui/src/i18n/locales/id/chat.json @@ -445,7 +445,6 @@ "copy_code": "Salin kode" } }, - "systemPromptWarning": "PERINGATAN: Override system prompt kustom aktif. Ini dapat merusak fungsionalitas secara serius dan menyebabkan perilaku yang tidak terduga.", "profileViolationWarning": "Profil saat ini tidak kompatibel dengan pengaturan organisasi kamu", "shellIntegration": { "title": "Peringatan Eksekusi Perintah", diff --git a/webview-ui/src/i18n/locales/id/prompts.json b/webview-ui/src/i18n/locales/id/prompts.json index 58bf91eb8b4..28454e744fa 100644 --- a/webview-ui/src/i18n/locales/id/prompts.json +++ b/webview-ui/src/i18n/locales/id/prompts.json @@ -71,9 +71,6 @@ "description": "Hanya tersedia di ruang kerja ini. Jika mode yang diekspor berisi file aturan, file tersebut akan dibuat ulang di folder .roo/rules-{slug}/." } }, - "advanced": { - "title": "Lanjutan" - }, "globalCustomInstructions": { "title": "Instruksi Kustom untuk Semua Mode", "description": "Instruksi ini berlaku untuk semua mode. Mereka menyediakan set dasar perilaku yang dapat ditingkatkan oleh instruksi khusus mode di bawah. <0>Pelajari lebih lanjut", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Lanjutan: Override System Prompt", - "description": "<2>⚠️ Peringatan: Fitur lanjutan ini melewati pengamanan. <1>BACA INI SEBELUM MENGGUNAKAN!Override system prompt default dengan membuat file di .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Buat Mode Baru", "close": "Tutup", diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index 461cc905565..c201425813b 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -408,7 +408,6 @@ "copy_code": "Copia codice" } }, - "systemPromptWarning": "ATTENZIONE: Sovrascrittura personalizzata delle istruzioni di sistema attiva. Questo può compromettere gravemente le funzionalità e causare comportamenti imprevedibili.", "profileViolationWarning": "Il profilo corrente non è compatibile con le impostazioni della tua organizzazione", "shellIntegration": { "title": "Avviso di esecuzione comando", diff --git a/webview-ui/src/i18n/locales/it/prompts.json b/webview-ui/src/i18n/locales/it/prompts.json index 2a0503ef71f..7ba95815a78 100644 --- a/webview-ui/src/i18n/locales/it/prompts.json +++ b/webview-ui/src/i18n/locales/it/prompts.json @@ -71,9 +71,6 @@ "description": "Disponibile solo in questo spazio di lavoro. Se la modalità esportata conteneva file di regole, verranno ricreati nella cartella .roo/rules-{slug}/." } }, - "advanced": { - "title": "Avanzato" - }, "globalCustomInstructions": { "title": "Istruzioni personalizzate per tutte le modalità", "description": "Queste istruzioni si applicano a tutte le modalità. Forniscono un insieme base di comportamenti che possono essere migliorati dalle istruzioni specifiche per modalità qui sotto. <0>Scopri di più", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Avanzato: Sovrascrivi prompt di sistema", - "description": "<2>⚠️ Attenzione: Questa funzionalità avanzata bypassa le misure di sicurezza. <1>LEGGI QUESTO PRIMA DI USARE!Sovrascrivi il prompt di sistema predefinito creando un file in .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Crea nuova modalità", "close": "Chiudi", diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 7d0957a5328..17fa51aca79 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -408,7 +408,6 @@ "copy_code": "コードをコピー" } }, - "systemPromptWarning": "警告:カスタムシステムプロンプトの上書きが有効です。これにより機能が深刻に損なわれ、予測不可能な動作が発生する可能性があります。", "profileViolationWarning": "現在のプロファイルは組織の設定と互換性がありません", "shellIntegration": { "title": "コマンド実行警告", diff --git a/webview-ui/src/i18n/locales/ja/prompts.json b/webview-ui/src/i18n/locales/ja/prompts.json index 2aba5bff776..fc774fc318c 100644 --- a/webview-ui/src/i18n/locales/ja/prompts.json +++ b/webview-ui/src/i18n/locales/ja/prompts.json @@ -71,9 +71,6 @@ "description": "このワークスペースでのみ利用可能です。エクスポートされたモードにルールファイルが含まれていた場合、それらは.roo/rules-{slug}/フォルダに再作成されます。" } }, - "advanced": { - "title": "詳細設定" - }, "globalCustomInstructions": { "title": "すべてのモードのカスタム指示", "description": "これらの指示はすべてのモードに適用されます。モード固有の指示で強化できる基本的な動作セットを提供します。<0>詳細はこちら", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "詳細設定:システムプロンプトの上書き", - "description": "<2>⚠️ 警告: この高度な機能は安全対策をバイパスします。<1>使用前にこれを読んでください!ワークスペースの.roo/system-prompt-{{slug}}にファイルを作成することで、デフォルトのシステムプロンプトを上書きします。" - }, "createModeDialog": { "title": "新しいモードを作成", "close": "閉じる", diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index d61781d79ed..a91e59fddce 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -408,7 +408,6 @@ "copy_code": "코드 복사" } }, - "systemPromptWarning": "경고: 사용자 정의 시스템 프롬프트 재정의가 활성화되었습니다. 이로 인해 기능이 심각하게 손상되고 예측할 수 없는 동작이 발생할 수 있습니다.", "profileViolationWarning": "현재 프로필이 조직 설정과 호환되지 않습니다", "shellIntegration": { "title": "명령 실행 경고", diff --git a/webview-ui/src/i18n/locales/ko/prompts.json b/webview-ui/src/i18n/locales/ko/prompts.json index fd0505df73c..f3666f1b660 100644 --- a/webview-ui/src/i18n/locales/ko/prompts.json +++ b/webview-ui/src/i18n/locales/ko/prompts.json @@ -71,9 +71,6 @@ "description": "이 작업 공간에서만 사용할 수 있습니다. 내보낸 모드에 규칙 파일이 포함된 경우 .roo/rules-{slug}/ 폴더에 다시 생성됩니다." } }, - "advanced": { - "title": "고급" - }, "globalCustomInstructions": { "title": "모든 모드에 대한 사용자 지정 지침", "description": "이 지침은 모든 모드에 적용됩니다. 아래의 모드별 지침으로 향상될 수 있는 기본 동작 세트를 제공합니다. <0>더 알아보기", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "고급: 시스템 프롬프트 재정의", - "description": "<2>⚠️ 경고: 이 고급 기능은 안전 장치를 우회합니다. <1>사용하기 전에 이것을 읽으십시오!작업 공간의 .roo/system-prompt-{{slug}}에 파일을 생성하여 기본 시스템 프롬프트를 재정의합니다." - }, "createModeDialog": { "title": "새 모드 만들기", "close": "닫기", diff --git a/webview-ui/src/i18n/locales/nl/chat.json b/webview-ui/src/i18n/locales/nl/chat.json index 5d924ea97bd..613deed507f 100644 --- a/webview-ui/src/i18n/locales/nl/chat.json +++ b/webview-ui/src/i18n/locales/nl/chat.json @@ -408,7 +408,6 @@ "copy_code": "Code kopiëren" } }, - "systemPromptWarning": "WAARSCHUWING: Aangepaste systeemprompt actief. Dit kan de functionaliteit ernstig verstoren en onvoorspelbaar gedrag veroorzaken.", "profileViolationWarning": "Het huidige profiel is niet compatibel met de instellingen van uw organisatie", "shellIntegration": { "title": "Waarschuwing commando-uitvoering", diff --git a/webview-ui/src/i18n/locales/nl/prompts.json b/webview-ui/src/i18n/locales/nl/prompts.json index 3fafb466b9f..097549e8a74 100644 --- a/webview-ui/src/i18n/locales/nl/prompts.json +++ b/webview-ui/src/i18n/locales/nl/prompts.json @@ -71,9 +71,6 @@ "description": "Alleen beschikbaar in deze werkruimte. Als de geëxporteerde modus regelbestanden bevatte, worden deze opnieuw gemaakt in de map .roo/rules-{slug}/." } }, - "advanced": { - "title": "Geavanceerd" - }, "globalCustomInstructions": { "title": "Aangepaste instructies voor alle modi", "description": "Deze instructies gelden voor alle modi. Ze bieden een basisset aan gedragingen die kunnen worden uitgebreid met modusspecifieke instructies hieronder. <0>Meer informatie", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Geavanceerd: Systeemprompt overschrijven", - "description": "<2>⚠️ Waarschuwing: Deze geavanceerde functie omzeilt beveiligingen. <1>LEES DIT VOOR GEBRUIK!Overschrijf de standaard systeemprompt door een bestand aan te maken op .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Nieuwe modus aanmaken", "close": "Sluiten", diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index 93e0601b169..026f0ce2888 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -408,7 +408,6 @@ "copy_code": "Kopiuj kod" } }, - "systemPromptWarning": "OSTRZEŻENIE: Aktywne niestandardowe zastąpienie instrukcji systemowych. Może to poważnie zakłócić funkcjonalność i powodować nieprzewidywalne zachowanie.", "profileViolationWarning": "Bieżący profil nie jest kompatybilny z ustawieniami Twojej organizacji", "shellIntegration": { "title": "Ostrzeżenie wykonania polecenia", diff --git a/webview-ui/src/i18n/locales/pl/prompts.json b/webview-ui/src/i18n/locales/pl/prompts.json index ab85673c252..b1fb3317c0c 100644 --- a/webview-ui/src/i18n/locales/pl/prompts.json +++ b/webview-ui/src/i18n/locales/pl/prompts.json @@ -71,9 +71,6 @@ "description": "Dostępne tylko w tym obszarze roboczym. Jeśli wyeksportowany tryb zawierał pliki reguł, zostaną one odtworzone w folderze .roo/rules-{slug}/." } }, - "advanced": { - "title": "Zaawansowane" - }, "globalCustomInstructions": { "title": "Niestandardowe instrukcje dla wszystkich trybów", "description": "Te instrukcje dotyczą wszystkich trybów. Zapewniają podstawowy zestaw zachowań, które mogą być rozszerzone przez instrukcje specyficzne dla trybów poniżej. <0>Dowiedz się więcej", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Zaawansowane: Zastąp podpowiedź systemową", - "description": "<2>⚠️ Ostrzeżenie: Ta zaawansowana funkcja omija zabezpieczenia. <1>PRZECZYTAJ TO PRZED UŻYCIEM!Zastąp domyślną podpowiedź systemową, tworząc plik w .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Utwórz nowy tryb", "close": "Zamknij", diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index bf4c1e09fd7..ac208229128 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -408,7 +408,6 @@ "copy_code": "Copiar código" } }, - "systemPromptWarning": "AVISO: Substituição personalizada de instrução do sistema ativa. Isso pode comprometer gravemente a funcionalidade e causar comportamento imprevisível.", "profileViolationWarning": "O perfil atual não é compatível com as configurações da sua organização", "shellIntegration": { "title": "Aviso de execução de comando", diff --git a/webview-ui/src/i18n/locales/pt-BR/prompts.json b/webview-ui/src/i18n/locales/pt-BR/prompts.json index 75d9316eee6..cbec033b407 100644 --- a/webview-ui/src/i18n/locales/pt-BR/prompts.json +++ b/webview-ui/src/i18n/locales/pt-BR/prompts.json @@ -71,9 +71,6 @@ "description": "Disponível apenas neste espaço de trabalho. Se o modo exportado continha arquivos de regras, eles serão recriados na pasta .roo/rules-{slug}/." } }, - "advanced": { - "title": "Avançado" - }, "globalCustomInstructions": { "title": "Instruções personalizadas para todos os modos", "description": "Estas instruções se aplicam a todos os modos. Elas fornecem um conjunto base de comportamentos que podem ser aprimorados por instruções específicas do modo abaixo. <0>Saiba mais", @@ -146,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Avançado: Substituir prompt do sistema", - "description": "<2>⚠️ Aviso: Este recurso avançado ignora as proteções. <1>LEIA ISTO ANTES DE USAR!Substitua o prompt do sistema padrão criando um arquivo em .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Criar novo modo", "close": "Fechar", diff --git a/webview-ui/src/i18n/locales/ru/chat.json b/webview-ui/src/i18n/locales/ru/chat.json index 9a5245f91ed..5d6206b84f2 100644 --- a/webview-ui/src/i18n/locales/ru/chat.json +++ b/webview-ui/src/i18n/locales/ru/chat.json @@ -409,7 +409,6 @@ "copy_code": "Копировать код" } }, - "systemPromptWarning": "ПРЕДУПРЕЖДЕНИЕ: Активна пользовательская системная подсказка. Это может серьезно нарушить работу и вызвать непредсказуемое поведение.", "profileViolationWarning": "Текущий профиль несовместим с настройками вашей организации", "shellIntegration": { "title": "Предупреждение о выполнении команды", diff --git a/webview-ui/src/i18n/locales/ru/prompts.json b/webview-ui/src/i18n/locales/ru/prompts.json index 097e1691737..3cc222a819f 100644 --- a/webview-ui/src/i18n/locales/ru/prompts.json +++ b/webview-ui/src/i18n/locales/ru/prompts.json @@ -143,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Дополнительно: переопределить системный промпт", - "description": "<2>⚠️ Внимание: Эта расширенная функция обходит средства защиты. <1>ПРОЧТИТЕ ЭТО ПЕРЕД ИСПОЛЬЗОВАНИЕМ!Переопределите системный промпт по умолчанию, создав файл в .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Создать новый режим", "close": "Закрыть", @@ -197,9 +193,6 @@ "deleteMode": "Удалить режим" }, "allFiles": "все файлы", - "advanced": { - "title": "Дополнительно" - }, "deleteMode": { "title": "Удалить режим", "message": "Вы уверены, что хотите удалить режим \"{{modeName}}\"?", diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index a2fe5f3a4cf..db854b6a3df 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -409,7 +409,6 @@ "copy_code": "Kodu kopyala" } }, - "systemPromptWarning": "UYARI: Özel sistem komut geçersiz kılma aktif. Bu işlevselliği ciddi şekilde bozabilir ve öngörülemeyen davranışlara neden olabilir.", "profileViolationWarning": "Geçerli profil kuruluşunuzun ayarlarıyla uyumlu değil", "shellIntegration": { "title": "Komut Çalıştırma Uyarısı", diff --git a/webview-ui/src/i18n/locales/tr/prompts.json b/webview-ui/src/i18n/locales/tr/prompts.json index 611b16eecba..b2771d32fef 100644 --- a/webview-ui/src/i18n/locales/tr/prompts.json +++ b/webview-ui/src/i18n/locales/tr/prompts.json @@ -143,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Gelişmiş: Sistem Promptunu Geçersiz Kıl", - "description": "<2>⚠️ Uyarı: Bu gelişmiş özellik güvenlik önlemlerini atlar. <1>KULLANMADAN ÖNCE BUNU OKUYUN!Çalışma alanınızda .roo/system-prompt-{{slug}} adresinde bir dosya oluşturarak varsayılan sistem istemini geçersiz kılın." - }, "createModeDialog": { "title": "Yeni Mod Oluştur", "close": "Kapat", @@ -197,9 +193,6 @@ "deleteMode": "Modu sil" }, "allFiles": "tüm dosyalar", - "advanced": { - "title": "Gelişmiş" - }, "deleteMode": { "title": "Modu Sil", "message": "\"{{modeName}}\" modunu silmek istediğinizden emin misiniz?", diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index 514a3a2db1c..72391ddced9 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -409,7 +409,6 @@ "copy_code": "Sao chép mã" } }, - "systemPromptWarning": "CẢNH BÁO: Đã kích hoạt ghi đè lệnh nhắc hệ thống tùy chỉnh. Điều này có thể phá vỡ nghiêm trọng chức năng và gây ra hành vi không thể dự đoán.", "profileViolationWarning": "Hồ sơ hiện tại không tương thích với cài đặt của tổ chức của bạn", "shellIntegration": { "title": "Cảnh báo thực thi lệnh", diff --git a/webview-ui/src/i18n/locales/vi/prompts.json b/webview-ui/src/i18n/locales/vi/prompts.json index 9c9f59c78ac..2583d70306a 100644 --- a/webview-ui/src/i18n/locales/vi/prompts.json +++ b/webview-ui/src/i18n/locales/vi/prompts.json @@ -143,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "Nâng cao: Ghi đè lời nhắc hệ thống", - "description": "<2>⚠️ Cảnh báo: Tính năng nâng cao này bỏ qua các biện pháp bảo vệ. <1>ĐỌC KỸ TRƯỚC KHI SỬ DỤNG!Ghi đè lời nhắc hệ thống mặc định bằng cách tạo một tệp tại .roo/system-prompt-{{slug}}." - }, "createModeDialog": { "title": "Tạo chế độ mới", "close": "Đóng", @@ -197,9 +193,6 @@ "deleteMode": "Xóa chế độ" }, "allFiles": "tất cả các tệp", - "advanced": { - "title": "Nâng cao" - }, "deleteMode": { "title": "Xóa chế độ", "message": "Bạn có chắc chắn muốn xóa chế độ \"{{modeName}}\" không?", diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index ea31595757c..1bd2121506e 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -409,7 +409,6 @@ "copy_code": "复制代码" } }, - "systemPromptWarning": "警告:自定义系统提示词覆盖已激活。这可能严重破坏功能并导致不可预测的行为。", "profileViolationWarning": "当前配置文件与您的组织设置不兼容", "shellIntegration": { "title": "命令执行警告", diff --git a/webview-ui/src/i18n/locales/zh-CN/prompts.json b/webview-ui/src/i18n/locales/zh-CN/prompts.json index c73f2be4a2a..3ecec96c6d9 100644 --- a/webview-ui/src/i18n/locales/zh-CN/prompts.json +++ b/webview-ui/src/i18n/locales/zh-CN/prompts.json @@ -143,10 +143,6 @@ } } }, - "advancedSystemPrompt": { - "title": "高级:覆盖系统提示词", - "description": "<2>⚠️ 警告: 此高级功能会绕过安全措施。<1>使用前请阅读!通过在您的工作区中创建文件 .roo/system-prompt-{{slug}} 来覆盖默认系统提示。" - }, "createModeDialog": { "title": "创建新模式", "close": "关闭", @@ -197,9 +193,6 @@ "deleteMode": "删除模式" }, "allFiles": "所有文件", - "advanced": { - "title": "高级" - }, "deleteMode": { "title": "删除模式", "message": "您确定要删除\"{{modeName}}\"模式吗?", diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index d53c1d3441d..e26bb516bb1 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -438,7 +438,6 @@ "copy_code": "複製程式碼" } }, - "systemPromptWarning": "警告:自訂系統提示詞覆寫已啟用。這可能嚴重破壞功能並導致不可預測的行為。", "profileViolationWarning": "目前設定檔與您的組織設定不相容", "shellIntegration": { "title": "命令執行警告", diff --git a/webview-ui/src/i18n/locales/zh-TW/prompts.json b/webview-ui/src/i18n/locales/zh-TW/prompts.json index 933f7b84f49..2620472af9b 100644 --- a/webview-ui/src/i18n/locales/zh-TW/prompts.json +++ b/webview-ui/src/i18n/locales/zh-TW/prompts.json @@ -70,9 +70,6 @@ "description": "僅在此工作區可用。如果匯出的模式包含規則檔案,則將在 .roo/rules-{slug}/ 資料夾中重新建立這些檔案。" } }, - "advanced": { - "title": "進階:覆寫系統提示" - }, "globalCustomInstructions": { "title": "所有模式的自訂指令", "description": "這些指令適用於所有模式。它們提供了一套可透過下方特定模式指令強化的基本行為。<0>了解更多", @@ -145,10 +142,6 @@ } } }, - "advancedSystemPrompt": { - "title": "進階:覆寫系統提示詞", - "description": "<2>⚠️ 警告: 此進階功能會繞過安全措施。<1>使用前請詳閱!透過在 .roo/system-prompt-{{slug}} 建立檔案來覆寫預設的系統提示詞。" - }, "createModeDialog": { "title": "建立新模式", "close": "關閉",