Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
19 changes: 0 additions & 19 deletions src/core/environment/__tests__/getEnvironmentDetails.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,6 @@ describe("getEnvironmentDetails", () => {
expect(mockInactiveTerminal.getCurrentWorkingDirectory).toHaveBeenCalled()
})

it("should include warning when file writing is not allowed", async () => {
;(isToolAllowedForMode as Mock).mockReturnValue(false)
;(getModeBySlug as Mock).mockImplementation((slug: string) => {
if (slug === "code") {
return { name: "💻 Code" }
}

if (slug === defaultModeSlug) {
return { name: "Default Mode" }
}

return null
})

const result = await getEnvironmentDetails(mockCline as Task)

expect(result).toContain("NOTE: You are currently in '💻 Code' mode, which does not allow write operations")
})

it("should include experiment-specific details when Power Steering is enabled", async () => {
mockState.experiments = { [EXPERIMENT_IDS.POWER_STEERING]: true }
;(experiments.isEnabled as Mock).mockReturnValue(true)
Expand Down
10 changes: 0 additions & 10 deletions src/core/environment/getEnvironmentDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,6 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
}
}

// Add warning if not in code mode.
if (
!isToolAllowedForMode("write_to_file", currentMode, customModes ?? [], { apply_diff: cline.diffEnabled }) &&
!isToolAllowedForMode("apply_diff", currentMode, customModes ?? [], { apply_diff: cline.diffEnabled })
) {
const currentModeName = getModeBySlug(currentMode, customModes)?.name ?? currentMode
const defaultModeName = getModeBySlug(defaultModeSlug, customModes)?.name ?? defaultModeSlug
details += `\n\nNOTE: You are currently in '${currentModeName}' mode, which does not allow write operations. To write files, the user will need to switch to a mode that supports file writing, such as '${defaultModeName}' mode.`
}

if (includeFileDetails) {
details += `\n\n# Current Workspace Directory (${cline.cwd.toPosix()}) Files\n`
const isDesktop = arePathsEqual(cline.cwd, path.join(os.homedir(), "Desktop"))
Expand Down
2 changes: 1 addition & 1 deletion src/core/environment/reminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TodoItem, TodoStatus } from "@roo-code/types"
*/
export function formatReminderSection(todoList?: TodoItem[]): string {
if (!todoList || todoList.length === 0) {
return ""
return "You have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps."
}
const statusMap: Record<TodoStatus, string> = {
pending: "Pending",
Expand Down
Loading
Loading