diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 579356ae2d45..b3adb7e6a5a3 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -153,6 +153,7 @@ export const globalSettingsSchema = z.object({ terminalZshP10k: z.boolean().optional(), terminalZdotdir: z.boolean().optional(), terminalCompressProgressBar: z.boolean().optional(), + terminalPreferredProfile: z.string().optional(), diagnosticsEnabled: z.boolean().optional(), diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 7aa370f7d2a2..07d67881d7c5 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -755,6 +755,7 @@ export class ClineProvider terminalZshP10k = false, terminalPowershellCounter = false, terminalZdotdir = false, + terminalPreferredProfile, }) => { Terminal.setShellIntegrationTimeout(terminalShellIntegrationTimeout) Terminal.setShellIntegrationDisabled(terminalShellIntegrationDisabled) @@ -764,6 +765,7 @@ export class ClineProvider Terminal.setTerminalZshP10k(terminalZshP10k) Terminal.setPowershellCounter(terminalPowershellCounter) Terminal.setTerminalZdotdir(terminalZdotdir) + Terminal.setTerminalPreferredProfile(terminalPreferredProfile) }, ) @@ -1813,6 +1815,7 @@ export class ClineProvider terminalZshOhMy, terminalZshP10k, terminalZdotdir, + terminalPreferredProfile, fuzzyMatchThreshold, mcpEnabled, enableMcpServerCreation, @@ -1942,6 +1945,7 @@ export class ClineProvider terminalZshOhMy: terminalZshOhMy ?? false, terminalZshP10k: terminalZshP10k ?? false, terminalZdotdir: terminalZdotdir ?? false, + terminalPreferredProfile: terminalPreferredProfile ?? "", fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0, mcpEnabled: mcpEnabled ?? true, enableMcpServerCreation: enableMcpServerCreation ?? true, @@ -2167,6 +2171,7 @@ export class ClineProvider terminalZshP10k: stateValues.terminalZshP10k ?? false, terminalZdotdir: stateValues.terminalZdotdir ?? false, terminalCompressProgressBar: stateValues.terminalCompressProgressBar ?? true, + terminalPreferredProfile: stateValues.terminalPreferredProfile ?? "", mode: stateValues.mode ?? defaultModeSlug, language: stateValues.language ?? formatLanguage(vscode.env.language), mcpEnabled: stateValues.mcpEnabled ?? true, diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 0a4bd9abb90c..b867c90903a2 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -36,6 +36,7 @@ import { import { checkExistKey } from "../../shared/checkExistApiConfig" import { experimentDefault } from "../../shared/experiments" import { Terminal } from "../../integrations/terminal/Terminal" +import { TerminalProfileService } from "../../integrations/terminal/TerminalProfileService" import { openFile } from "../../integrations/misc/open-file" import { openImage, saveImage } from "../../integrations/misc/image-handler" import { selectImages } from "../../integrations/misc/process-images" @@ -1524,6 +1525,31 @@ export const webviewMessageHandler = async ( Terminal.setCompressProgressBar(message.bool) } break + case "terminalPreferredProfile": + await updateGlobalState("terminalPreferredProfile", message.text) + await provider.postStateToWebview() + if (message.text !== undefined) { + Terminal.setTerminalPreferredProfile(message.text) + } + break + case "getTerminalProfiles": + try { + const profiles = TerminalProfileService.getAllSelectableProfiles() + await provider.postMessageToWebview({ + type: "terminalProfiles", + profiles, + }) + } catch (error) { + provider.log( + `Error getting terminal profiles: ${error instanceof Error ? error.message : String(error)}`, + ) + // Send empty array on error + await provider.postMessageToWebview({ + type: "terminalProfiles", + profiles: [], + }) + } + break case "mode": await provider.handleModeSwitch(message.text as Mode) break diff --git a/src/integrations/terminal/BaseTerminal.ts b/src/integrations/terminal/BaseTerminal.ts index a79d417b072f..68f676180a17 100644 --- a/src/integrations/terminal/BaseTerminal.ts +++ b/src/integrations/terminal/BaseTerminal.ts @@ -160,6 +160,7 @@ export abstract class BaseTerminal implements RooTerminal { private static terminalZshP10k: boolean = false private static terminalZdotdir: boolean = false private static compressProgressBar: boolean = true + private static terminalPreferredProfile: string | undefined = undefined /** * Compresses terminal output by applying run-length encoding and truncating to line limit @@ -314,4 +315,20 @@ export abstract class BaseTerminal implements RooTerminal { public static getCompressProgressBar(): boolean { return BaseTerminal.compressProgressBar } + + /** + * Sets the preferred terminal profile + * @param profileName The preferred terminal profile name + */ + public static setTerminalPreferredProfile(profileName: string | undefined): void { + BaseTerminal.terminalPreferredProfile = profileName + } + + /** + * Gets the preferred terminal profile + * @returns The preferred terminal profile name + */ + public static getTerminalPreferredProfile(): string | undefined { + return BaseTerminal.terminalPreferredProfile + } } diff --git a/src/integrations/terminal/Terminal.ts b/src/integrations/terminal/Terminal.ts index 8bf2072f3d49..e1695dafa7ee 100644 --- a/src/integrations/terminal/Terminal.ts +++ b/src/integrations/terminal/Terminal.ts @@ -5,6 +5,7 @@ import type { RooTerminalCallbacks, RooTerminalProcessResultPromise } from "./ty import { BaseTerminal } from "./BaseTerminal" import { TerminalProcess } from "./TerminalProcess" import { ShellIntegrationManager } from "./ShellIntegrationManager" +import { TerminalProfileService } from "./TerminalProfileService" import { mergePromise } from "./mergePromise" export class Terminal extends BaseTerminal { @@ -17,7 +18,34 @@ export class Terminal extends BaseTerminal { const env = Terminal.getEnv() const iconPath = new vscode.ThemeIcon("rocket") - this.terminal = terminal ?? vscode.window.createTerminal({ cwd, name: "Roo Code", iconPath, env }) + + // Get the full profile configuration from the user's preferred profile + const preferredProfile = Terminal.getTerminalPreferredProfile() + const profileOptions = TerminalProfileService.getTerminalOptionsForRoo(preferredProfile) + + const terminalOptions: vscode.TerminalOptions = { + cwd, + name: "Roo Code", + iconPath, + env, + } + + // Apply profile configuration if available + if (profileOptions) { + // Merge profile options with our base options + Object.assign(terminalOptions, profileOptions) + + // Merge environment variables (profile env + our env) + if (profileOptions.env) { + terminalOptions.env = { ...profileOptions.env, ...env } + } + + // Keep our icon and name unless profile specifies otherwise + terminalOptions.name = "Roo Code" + terminalOptions.iconPath = iconPath + } + + this.terminal = terminal ?? vscode.window.createTerminal(terminalOptions) if (Terminal.getTerminalZdotdir()) { ShellIntegrationManager.terminalTmpDirs.set(id, env.ZDOTDIR) diff --git a/src/integrations/terminal/TerminalProfileService.ts b/src/integrations/terminal/TerminalProfileService.ts new file mode 100644 index 000000000000..b79f366b2e76 --- /dev/null +++ b/src/integrations/terminal/TerminalProfileService.ts @@ -0,0 +1,194 @@ +import * as vscode from "vscode" + +export interface TerminalProfile { + name: string + path?: string + args?: string[] + icon?: string + color?: string + env?: Record +} + +export interface TerminalProfileInfo { + name: string + displayName: string + shellPath?: string + isDefault?: boolean +} + +export class TerminalProfileService { + /** + * Gets the current platform identifier for terminal profiles + */ + private static getPlatform(): string { + switch (process.platform) { + case "win32": + return "windows" + case "darwin": + return "osx" + case "linux": + return "linux" + default: + return "linux" + } + } + + /** + * Gets all available terminal profiles for the current platform + */ + public static getAvailableProfiles(): TerminalProfileInfo[] { + const platform = this.getPlatform() + const config = vscode.workspace.getConfiguration("terminal.integrated") + + // Get profiles for the current platform + const profiles = config.get>(`profiles.${platform}`) || {} + + // Get the default profile name + const defaultProfile = config.get(`defaultProfile.${platform}`) + + // Convert profiles to our format + const profileInfos: TerminalProfileInfo[] = Object.entries(profiles).map(([name, profile]) => ({ + name, + displayName: name, + shellPath: profile.path, + isDefault: name === defaultProfile, + })) + + // If no profiles are configured, return an empty array + // VSCode will use its built-in defaults + return profileInfos + } + + /** + * Gets the default profile for the current platform + */ + public static getDefaultProfile(): TerminalProfileInfo | undefined { + const platform = this.getPlatform() + const config = vscode.workspace.getConfiguration("terminal.integrated") + + const defaultProfileName = config.get(`defaultProfile.${platform}`) + + if (defaultProfileName) { + const profiles = this.getAvailableProfiles() + return profiles.find((profile) => profile.name === defaultProfileName) + } + + return undefined + } + + /** + * Gets a specific profile by name + */ + public static getProfileByName(name: string): TerminalProfileInfo | undefined { + const profiles = this.getAvailableProfiles() + return profiles.find((profile) => profile.name === name) + } + + /** + * Gets the shell path for a given profile name + * Returns undefined if profile doesn't exist or doesn't specify a path + */ + public static getShellPathForProfile(profileName: string): string | undefined { + if (!profileName) { + return undefined + } + + // Check regular profiles + const profile = this.getProfileByName(profileName) + return profile?.shellPath + } + + /** + * Gets the full profile configuration from terminal.integrated.profiles.{platform} + */ + public static getProfileConfiguration(profileName: string): Partial | undefined { + if (!profileName) { + return undefined + } + + const platform = this.getPlatform() + const config = vscode.workspace.getConfiguration("terminal.integrated") + const profiles = config.get>(`profiles.${platform}`) || {} + + const profile = profiles[profileName] + if (!profile) { + return undefined + } + + // Convert VSCode terminal profile to vscode.TerminalOptions + const terminalOptions: Partial = {} + + if (profile.path) { + terminalOptions.shellPath = profile.path + } + + if (profile.args) { + terminalOptions.shellArgs = profile.args + } + + if (profile.env) { + terminalOptions.env = profile.env + } + + if (profile.icon) { + terminalOptions.iconPath = new vscode.ThemeIcon(profile.icon) + } + + if (profile.color) { + terminalOptions.color = new vscode.ThemeColor(profile.color) + } + + return terminalOptions + } + + /** + * Gets the terminal options that Roo should use for terminals + * Priority: 1. User's preferred profile, 2. Default profile, 3. undefined (VSCode default) + */ + public static getTerminalOptionsForRoo(preferredProfile?: string): Partial | undefined { + // 1. Check user's preferred profile + if (preferredProfile) { + const profileConfig = this.getProfileConfiguration(preferredProfile) + if (profileConfig) { + return profileConfig + } + } + + // 2. Check default profile + const defaultProfile = this.getDefaultProfile() + if (defaultProfile) { + const profileConfig = this.getProfileConfiguration(defaultProfile.name) + if (profileConfig) { + return profileConfig + } + } + + // 3. Let VSCode use its default + return undefined + } + + /** + * Gets the shell path that Roo should use for terminals (backward compatibility) + * Priority: 1. User's preferred profile, 2. Default profile, 3. undefined (VSCode default) + */ + public static getShellPathForRoo(preferredProfile?: string): string | undefined { + const terminalOptions = this.getTerminalOptionsForRoo(preferredProfile) + return terminalOptions?.shellPath + } + + /** + * Gets all profiles that should be shown in the UI + */ + public static getAllSelectableProfiles(): TerminalProfileInfo[] { + const profiles = this.getAvailableProfiles() + + // Add a "Default" option that represents using VSCode's default behavior + profiles.unshift({ + name: "", + displayName: "Default (VSCode Default)", + isDefault: false, + }) + + return profiles + } +} diff --git a/src/integrations/terminal/__tests__/TerminalProfileService.spec.ts b/src/integrations/terminal/__tests__/TerminalProfileService.spec.ts new file mode 100644 index 000000000000..c2e9e7b6106a --- /dev/null +++ b/src/integrations/terminal/__tests__/TerminalProfileService.spec.ts @@ -0,0 +1,308 @@ +import { describe, it, expect, vi, beforeEach } from "vitest" +import * as vscode from "vscode" +import { TerminalProfileService } from "../TerminalProfileService" + +// Mock vscode module +vi.mock("vscode", () => ({ + workspace: { + getConfiguration: vi.fn(), + }, + ThemeIcon: vi.fn().mockImplementation((id: string) => ({ id })), + ThemeColor: vi.fn().mockImplementation((id: string) => ({ id })), +})) + +describe("TerminalProfileService", () => { + const mockGetConfiguration = vi.mocked(vscode.workspace.getConfiguration) + + beforeEach(() => { + vi.clearAllMocks() + // Set default platform to linux for consistent testing + Object.defineProperty(process, "platform", { + value: "linux", + writable: true, + }) + }) + + describe("getPlatform", () => { + it("should return correct platform identifiers", () => { + // Test linux + Object.defineProperty(process, "platform", { value: "linux" }) + expect((TerminalProfileService as any).getPlatform()).toBe("linux") + + // Test macOS + Object.defineProperty(process, "platform", { value: "darwin" }) + expect((TerminalProfileService as any).getPlatform()).toBe("osx") + + // Test Windows + Object.defineProperty(process, "platform", { value: "win32" }) + expect((TerminalProfileService as any).getPlatform()).toBe("windows") + + // Test unknown platform defaults to linux + Object.defineProperty(process, "platform", { value: "unknown" }) + expect((TerminalProfileService as any).getPlatform()).toBe("linux") + }) + }) + + describe("getAvailableProfiles", () => { + it("should return empty array when no profiles configured", () => { + const mockConfig = { + get: vi.fn().mockReturnValue(undefined), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const profiles = TerminalProfileService.getAvailableProfiles() + expect(profiles).toEqual([]) + }) + + it("should return configured profiles", () => { + const mockProfiles = { + bash: { path: "/bin/bash" }, + zsh: { path: "/bin/zsh" }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + if (key === "defaultProfile.linux") return "bash" + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const profiles = TerminalProfileService.getAvailableProfiles() + expect(profiles).toEqual([ + { + name: "bash", + displayName: "bash", + shellPath: "/bin/bash", + isDefault: true, + }, + { + name: "zsh", + displayName: "zsh", + shellPath: "/bin/zsh", + isDefault: false, + }, + ]) + }) + }) + + describe("getProfileConfiguration", () => { + it("should return full profile configuration", () => { + const mockProfiles = { + nushell: { + path: "/home/user/.nix-profile/bin/nu", + args: ["--config", "config.nu"], + env: { NU_CONFIG: "/home/user/.config/nushell" }, + icon: "terminal", + color: "terminal.ansiBlue", + }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const config = TerminalProfileService.getProfileConfiguration("nushell") + expect(config).toEqual({ + shellPath: "/home/user/.nix-profile/bin/nu", + shellArgs: ["--config", "config.nu"], + env: { NU_CONFIG: "/home/user/.config/nushell" }, + iconPath: expect.any(Object), // vscode.ThemeIcon + color: expect.any(Object), // vscode.ThemeColor + }) + }) + + it("should return undefined for non-existent profile", () => { + const mockConfig = { + get: vi.fn().mockReturnValue({}), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const config = TerminalProfileService.getProfileConfiguration("nonexistent") + expect(config).toBeUndefined() + }) + }) + + describe("getTerminalOptionsForRoo", () => { + it("should return preferred profile configuration when available", () => { + const mockProfiles = { + nushell: { path: "/bin/nu", args: ["--login"] }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const options = TerminalProfileService.getTerminalOptionsForRoo("nushell") + expect(options).toEqual({ + shellPath: "/bin/nu", + shellArgs: ["--login"], + }) + }) + + it("should fallback to default profile when preferred profile not available", () => { + const mockProfiles = { + bash: { path: "/bin/bash", args: ["--login"] }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + if (key === "defaultProfile.linux") return "bash" + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const options = TerminalProfileService.getTerminalOptionsForRoo("nonexistent") + expect(options).toEqual({ + shellPath: "/bin/bash", + shellArgs: ["--login"], + }) + }) + + it("should return undefined when no profiles available", () => { + const mockConfig = { + get: vi.fn().mockReturnValue(undefined), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const options = TerminalProfileService.getTerminalOptionsForRoo() + expect(options).toBeUndefined() + }) + + it("should fallback to default profile when no preferred profile provided", () => { + const mockProfiles = { + bash: { path: "/bin/bash", args: ["--login"] }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + if (key === "defaultProfile.linux") return "bash" + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const options = TerminalProfileService.getTerminalOptionsForRoo() + expect(options).toEqual({ + shellPath: "/bin/bash", + shellArgs: ["--login"], + }) + }) + }) + + describe("getShellPathForRoo", () => { + it("should return preferred profile shell path when available", () => { + const mockProfiles = { + bash: { path: "/bin/bash" }, + zsh: { path: "/bin/zsh" }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const shellPath = TerminalProfileService.getShellPathForRoo("zsh") + expect(shellPath).toBe("/bin/zsh") + }) + + it("should fallback to default profile when preferred profile not available", () => { + const mockProfiles = { + bash: { path: "/bin/bash" }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + if (key === "defaultProfile.linux") return "bash" + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const shellPath = TerminalProfileService.getShellPathForRoo("nonexistent") + expect(shellPath).toBe("/bin/bash") + }) + + it("should return undefined when no profiles available", () => { + const mockConfig = { + get: vi.fn().mockReturnValue(undefined), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const shellPath = TerminalProfileService.getShellPathForRoo() + expect(shellPath).toBeUndefined() + }) + + it("should fallback to default profile when no preferred profile provided", () => { + const mockProfiles = { + bash: { path: "/bin/bash" }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + if (key === "defaultProfile.linux") return "bash" + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const shellPath = TerminalProfileService.getShellPathForRoo() + expect(shellPath).toBe("/bin/bash") + }) + }) + + describe("getAllSelectableProfiles", () => { + it("should include default option and available profiles", () => { + const mockProfiles = { + bash: { path: "/bin/bash" }, + zsh: { path: "/bin/zsh" }, + } + const mockConfig = { + get: vi.fn((key: string) => { + if (key === "profiles.linux") return mockProfiles + return undefined + }), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + const profiles = TerminalProfileService.getAllSelectableProfiles() + + expect(profiles).toHaveLength(3) // Default + bash + zsh + expect(profiles[0]).toEqual({ + name: "", + displayName: "Default (VSCode Default)", + isDefault: false, + }) + }) + }) + + describe("platform-specific behavior", () => { + it("should use correct platform-specific configuration keys", () => { + // Test Windows + Object.defineProperty(process, "platform", { value: "win32" }) + const mockConfig = { + get: vi.fn(), + } + mockGetConfiguration.mockReturnValue(mockConfig as any) + + TerminalProfileService.getAvailableProfiles() + expect(mockConfig.get).toHaveBeenCalledWith("profiles.windows") + expect(mockConfig.get).toHaveBeenCalledWith("defaultProfile.windows") + + // Test macOS + Object.defineProperty(process, "platform", { value: "darwin" }) + TerminalProfileService.getAvailableProfiles() + expect(mockConfig.get).toHaveBeenCalledWith("profiles.osx") + expect(mockConfig.get).toHaveBeenCalledWith("defaultProfile.osx") + }) + }) +}) diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 7d2759c91905..1636ec8b3057 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -127,6 +127,7 @@ export interface ExtensionMessage { | "insertTextIntoTextarea" | "dismissedUpsells" | "organizationSwitchResult" + | "terminalProfiles" text?: string payload?: any // Add a generic payload for now, can refine later // Checkpoint warning message @@ -211,6 +212,12 @@ export interface ExtensionMessage { queuedMessages?: QueuedMessage[] list?: string[] // For dismissedUpsells organizationId?: string | null // For organizationSwitchResult + profiles?: Array<{ + name: string + displayName: string + shellPath?: string + isDefault?: boolean + }> // For terminalProfiles } export type ExtensionState = Pick< @@ -270,6 +277,7 @@ export type ExtensionState = Pick< | "terminalZshP10k" | "terminalZdotdir" | "terminalCompressProgressBar" + | "terminalPreferredProfile" | "diagnosticsEnabled" | "diffEnabled" | "fuzzyMatchThreshold" diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index f10808cd428d..d88c61050554 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -134,6 +134,8 @@ export interface WebviewMessage { | "terminalZshP10k" | "terminalZdotdir" | "terminalCompressProgressBar" + | "terminalPreferredProfile" + | "getTerminalProfiles" | "mcpEnabled" | "enableMcpServerCreation" | "remoteControlEnabled" diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 506eabc4cb50..42ade24a8dad 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -175,6 +175,7 @@ const SettingsView = forwardRef(({ onDone, t terminalZshOhMy, terminalZshP10k, terminalZdotdir, + terminalPreferredProfile, writeDelayMs, showRooIgnoredFiles, remoteBrowserEnabled, @@ -364,6 +365,7 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "terminalZshP10k", bool: terminalZshP10k }) vscode.postMessage({ type: "terminalZdotdir", bool: terminalZdotdir }) vscode.postMessage({ type: "terminalCompressProgressBar", bool: terminalCompressProgressBar }) + vscode.postMessage({ type: "terminalPreferredProfile", text: terminalPreferredProfile || "" }) vscode.postMessage({ type: "mcpEnabled", bool: mcpEnabled }) vscode.postMessage({ type: "alwaysApproveResubmit", bool: alwaysApproveResubmit }) vscode.postMessage({ type: "requestDelaySeconds", value: requestDelaySeconds }) @@ -771,6 +773,7 @@ const SettingsView = forwardRef(({ onDone, t terminalZshP10k={terminalZshP10k} terminalZdotdir={terminalZdotdir} terminalCompressProgressBar={terminalCompressProgressBar} + terminalPreferredProfile={terminalPreferredProfile} setCachedStateField={setCachedStateField} /> )} diff --git a/webview-ui/src/components/settings/TerminalSettings.tsx b/webview-ui/src/components/settings/TerminalSettings.tsx index c647344c0882..4dfff400c4f1 100644 --- a/webview-ui/src/components/settings/TerminalSettings.tsx +++ b/webview-ui/src/components/settings/TerminalSettings.tsx @@ -10,12 +10,19 @@ import { useEvent, useMount } from "react-use" import { ExtensionMessage } from "@roo/ExtensionMessage" import { cn } from "@/lib/utils" -import { Slider } from "@/components/ui" +import { Slider, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui" import { SetCachedStateField } from "./types" import { SectionHeader } from "./SectionHeader" import { Section } from "./Section" +interface TerminalProfile { + name: string + displayName: string + shellPath?: string + isDefault?: boolean +} + type TerminalSettingsProps = HTMLAttributes & { terminalOutputLineLimit?: number terminalOutputCharacterLimit?: number @@ -28,6 +35,7 @@ type TerminalSettingsProps = HTMLAttributes & { terminalZshP10k?: boolean terminalZdotdir?: boolean terminalCompressProgressBar?: boolean + terminalPreferredProfile?: string setCachedStateField: SetCachedStateField< | "terminalOutputLineLimit" | "terminalOutputCharacterLimit" @@ -40,6 +48,7 @@ type TerminalSettingsProps = HTMLAttributes & { | "terminalZshP10k" | "terminalZdotdir" | "terminalCompressProgressBar" + | "terminalPreferredProfile" > } @@ -55,6 +64,7 @@ export const TerminalSettings = ({ terminalZshP10k, terminalZdotdir, terminalCompressProgressBar, + terminalPreferredProfile, setCachedStateField, className, ...props @@ -62,8 +72,12 @@ export const TerminalSettings = ({ const { t } = useAppTranslation() const [inheritEnv, setInheritEnv] = useState(true) + const [availableProfiles, setAvailableProfiles] = useState([]) - useMount(() => vscode.postMessage({ type: "getVSCodeSetting", setting: "terminal.integrated.inheritEnv" })) + useMount(() => { + vscode.postMessage({ type: "getVSCodeSetting", setting: "terminal.integrated.inheritEnv" }) + vscode.postMessage({ type: "getTerminalProfiles" }) + }) const onMessage = useCallback((event: MessageEvent) => { const message: ExtensionMessage = event.data @@ -78,6 +92,11 @@ export const TerminalSettings = ({ break } break + case "terminalProfiles": + if (message.profiles) { + setAvailableProfiles(message.profiles) + } + break default: break } @@ -199,6 +218,45 @@ export const TerminalSettings = ({
+
+ + +
+ + + {" "} + + +
+
+
void terminalCompressProgressBar?: boolean setTerminalCompressProgressBar: (value: boolean) => void + terminalPreferredProfile?: string + setTerminalPreferredProfile: (value: string) => void setHistoryPreviewCollapsed: (value: boolean) => void setReasoningBlockCollapsed: (value: boolean) => void autoCondenseContext: boolean @@ -248,6 +250,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode terminalZshP10k: false, // Default Powerlevel10k integration setting terminalZdotdir: false, // Default ZDOTDIR handling setting terminalCompressProgressBar: true, // Default to compress progress bar output + terminalPreferredProfile: "", // Default to empty (use VSCode default) historyPreviewCollapsed: false, // Initialize the new state (default to expanded) reasoningBlockCollapsed: true, // Default to collapsed cloudUserInfo: null, @@ -551,6 +554,8 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode setPinnedApiConfigs: (value) => setState((prevState) => ({ ...prevState, pinnedApiConfigs: value })), setTerminalCompressProgressBar: (value) => setState((prevState) => ({ ...prevState, terminalCompressProgressBar: value })), + setTerminalPreferredProfile: (value) => + setState((prevState) => ({ ...prevState, terminalPreferredProfile: value })), togglePinnedApiConfig: (configId) => setState((prevState) => { const currentPinned = prevState.pinnedApiConfigs || {} diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 97f695b1c760..c63ce26383b5 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -682,7 +682,11 @@ }, "inheritEnv": { "label": "Hereta variables d'entorn", - "description": "Activa per heretar variables d'entorn del procés pare de VS Code. <0>Aprèn-ne més" + "description": "Quan està habilitat, el terminal hereta les variables d'entorn del procés pare de VSCode, com ara la configuració d'integració del shell definida al perfil d'usuari. Això commuta directament la configuració global de VSCode `terminal.integrated.inheritEnv`. <0>Més informació" + }, + "preferredProfile": { + "label": "Perfil de terminal preferit", + "description": "Selecciona quin perfil de terminal de VSCode hauria d'utilitzar Roo en crear terminals. Tria 'Default' per utilitzar el comportament per defecte de VSCode, o selecciona un perfil específic per substituir la shell per defecte. <0>Més informació" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 2559a5c0ce6b..79deff09527f 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -682,7 +682,11 @@ }, "inheritEnv": { "label": "Umgebungsvariablen erben", - "description": "Schalte dies ein, um Umgebungsvariablen vom übergeordneten VS Code-Prozess zu erben. <0>Mehr erfahren" + "description": "Wenn aktiviert, erbt das Terminal Umgebungsvariablen aus dem übergeordneten Prozess von VSCode, wie z.B. benutzerdefinierte Shell-Integrationseinstellungen. Dies schaltet direkt die globale VSCode-Einstellung `terminal.integrated.inheritEnv` um. <0>Mehr erfahren" + }, + "preferredProfile": { + "label": "Bevorzugtes Terminalprofil", + "description": "Wähle aus, welches VSCode-Terminalprofil Roo beim Erstellen von Terminals verwenden soll. Wähle 'Standard', um das Standardverhalten von VSCode zu verwenden, oder wähle ein bestimmtes Profil, um die Standardshell zu überschreiben. <0>Mehr erfahren" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 6096bb2c556b..573476eb35b7 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -685,6 +685,10 @@ "label": "Enable ZDOTDIR handling", "description": "Turn this on when zsh shell integration fails or conflicts with your dotfiles. <0>Learn more" }, + "preferredProfile": { + "label": "Preferred terminal profile", + "description": "Select which VSCode terminal profile Roo should use when creating terminals. Choose 'Default' to use VSCode's default behavior, or select a specific profile to override the default shell. <0>Learn more" + }, "inheritEnv": { "label": "Inherit environment variables", "description": "Turn this on to inherit environment variables from the parent VS Code process. <0>Learn more" diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 045e98782a1b..b3111bab3cc9 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -680,6 +680,10 @@ "label": "Activar manejo de ZDOTDIR", "description": "Activa cuando la integración del shell de zsh falle o entre en conflicto con tus dotfiles. <0>Más información" }, + "preferredProfile": { + "label": "Perfil de terminal preferido", + "description": "Selecciona qué perfil de terminal de VSCode debe usar Roo al crear terminales. Elige 'Predeterminado' para usar el comportamiento predeterminado de VSCode, o selecciona un perfil específico para anular el shell predeterminado. <0>Más información" + }, "inheritEnv": { "label": "Heredar variables de entorno", "description": "Activa para heredar variables de entorno del proceso padre de VS Code. <0>Más información" diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 317dd443b06d..311f7dbcfe54 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -682,7 +682,11 @@ }, "inheritEnv": { "label": "Hériter des variables d'environnement", - "description": "Activez pour hériter des variables d'environnement du processus parent VS Code. <0>En savoir plus" + "description": "Lorsqu'activé, le terminal hérite des variables d'environnement du processus parent VSCode, comme les paramètres d'intégration du shell définis dans le profil utilisateur. Cela bascule directement le paramètre global VSCode `terminal.integrated.inheritEnv`. <0>En savoir plus" + }, + "preferredProfile": { + "label": "Profil terminal préféré", + "description": "Sélectionnez quel profil de terminal VSCode Roo devrait utiliser lors de la création de terminaux. Choisissez 'Default' pour utiliser le comportement par défaut de VSCode, ou sélectionnez un profil spécifique pour remplacer le shell par défaut. <0>En savoir plus" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 4decb8cdd0e9..6fbcdcfeac29 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "पर्यावरण चर विरासत में लें", - "description": "पैरेंट VS Code प्रोसेस से पर्यावरण चर विरासत में लेने के लिए इसे चालू करें। <0>अधिक जानें" + "description": "सक्षम होने पर, टर्मिनल VSCode के मूल प्रक्रिया से पर्यावरण चर विरासत में लेता है, जैसे उपयोगकर्ता प्रोफ़ाइल में परिभाषित शेल एकीकरण सेटिंग्स। यह VSCode की वैश्विक सेटिंग `terminal.integrated.inheritEnv` को सीधे टॉगल करता है। <0>अधिक जानें" + }, + "preferredProfile": { + "label": "पसंदीदा टर्मिनल प्रोफ़ाइल", + "description": "चुनें कि टर्मिनल बनाने के दौरान Roo किस VSCode टर्मिनल प्रोफ़ाइल का उपयोग करे। VSCode के डिफ़ॉल्ट व्यवहार का उपयोग करने के लिए 'Default' चुनें, या डिफ़ॉल्ट शेल को ओवरराइड करने के लिए एक विशिष्ट प्रोफ़ाइल चुनें। <0>अधिक जानें" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index 1d1d61e06bee..3dcf602242c6 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -686,8 +686,12 @@ "description": "Aktifkan saat integrasi shell zsh gagal atau bertentangan dengan dotfile Anda. <0>Pelajari lebih lanjut" }, "inheritEnv": { - "label": "Warisi variabel lingkungan", - "description": "Aktifkan untuk mewarisi variabel lingkungan dari proses induk VS Code. <0>Pelajari lebih lanjut" + "label": "Warisi variabel environment", + "description": "Ketika diaktifkan, terminal akan mewarisi variabel environment dari proses parent VSCode, seperti pengaturan integrasi shell yang didefinisikan user-profile. Ini secara langsung mengalihkan pengaturan global VSCode `terminal.integrated.inheritEnv`. <0>Pelajari lebih lanjut" + }, + "preferredProfile": { + "label": "Profil terminal pilihan", + "description": "Pilih profil terminal VSCode mana yang harus digunakan Roo saat membuat terminal. Pilih 'Default' untuk menggunakan perilaku default VSCode, atau pilih profil spesifik untuk mengganti shell default. <0>Pelajari lebih lanjut" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 6f335f8bdddd..b80e51699cc7 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "Eredita variabili d'ambiente", - "description": "Attiva per ereditare le variabili d'ambiente dal processo padre di VS Code. <0>Scopri di più" + "description": "Quando abilitato, il terminale eredita le variabili d'ambiente dal processo padre di VSCode, come le impostazioni di integrazione della shell definite nel profilo utente. Questo attiva direttamente l'impostazione globale di VSCode `terminal.integrated.inheritEnv`. <0>Scopri di più" + }, + "preferredProfile": { + "label": "Profilo terminale preferito", + "description": "Seleziona quale profilo terminale VSCode Roo dovrebbe utilizzare durante la creazione dei terminali. Scegli 'Default' per utilizzare il comportamento predefinito di VSCode, oppure seleziona un profilo specifico per sovrascrivere la shell predefinita. <0>Scopri di più" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index a3179553e97b..9d364738a513 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "環境変数を継承", - "description": "親VS Codeプロセスから環境変数を継承するには、これをオンにします。<0>詳細情報" + "description": "有効にすると、ターミナルは VSCode の親プロセスから環境変数を継承します。ユーザープロファイルで定義されたシェル統合設定などが含まれます。これは VSCode のグローバル設定 `terminal.integrated.inheritEnv` を直接切り替えます。 <0>詳細情報" + }, + "preferredProfile": { + "label": "優先ターミナルプロファイル", + "description": "ターミナルを作成する際に Roo が使用する VSCode ターミナルプロファイルを選択します。'Default' を選択すると VSCode のデフォルト動作を使用し、特定のプロファイルを選択するとデフォルトシェルを上書きします。 <0>詳細情報" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index b022254ee93c..a980fc4d9c4e 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -48,19 +48,19 @@ "providerLabel": "임베딩 제공자", "selectProviderPlaceholder": "제공자 선택", "openaiProvider": "OpenAI", + "openRouterProvider": "OpenRouter", "ollamaProvider": "Ollama", "geminiProvider": "Gemini", "geminiApiKeyLabel": "API 키:", "geminiApiKeyPlaceholder": "Gemini API 키를 입력하세요", + "openRouterApiKeyLabel": "OpenRouter API 키", + "openRouterApiKeyPlaceholder": "OpenRouter API 키를 입력하세요", "mistralProvider": "Mistral", "mistralApiKeyLabel": "API 키:", "mistralApiKeyPlaceholder": "Mistral API 키를 입력하세요", "vercelAiGatewayProvider": "Vercel AI Gateway", "vercelAiGatewayApiKeyLabel": "API 키", "vercelAiGatewayApiKeyPlaceholder": "Vercel AI Gateway API 키를 입력하세요", - "openRouterProvider": "OpenRouter", - "openRouterApiKeyLabel": "OpenRouter API 키", - "openRouterApiKeyPlaceholder": "OpenRouter API 키를 입력하세요", "openaiCompatibleProvider": "OpenAI 호환", "openAiKeyLabel": "OpenAI API 키", "openAiKeyPlaceholder": "OpenAI API 키를 입력하세요", @@ -123,12 +123,12 @@ "modelIdRequired": "모델 ID가 필요합니다", "modelDimensionRequired": "모델 차원이 필요합니다", "geminiApiKeyRequired": "Gemini API 키가 필요합니다", + "openRouterApiKeyRequired": "OpenRouter API 키가 필요합니다", "mistralApiKeyRequired": "Mistral API 키가 필요합니다", "vercelAiGatewayApiKeyRequired": "Vercel AI Gateway API 키가 필요합니다", "ollamaBaseUrlRequired": "Ollama 기본 URL이 필요합니다", "baseUrlRequired": "기본 URL이 필요합니다", - "modelDimensionMinValue": "모델 차원은 0보다 커야 합니다", - "openRouterApiKeyRequired": "OpenRouter API 키가 필요합니다" + "modelDimensionMinValue": "모델 차원은 0보다 커야 합니다" }, "advancedConfigLabel": "고급 구성", "searchMinScoreLabel": "검색 점수 임계값", @@ -297,13 +297,13 @@ "moonshotApiKey": "Moonshot API 키", "getMoonshotApiKey": "Moonshot API 키 받기", "moonshotBaseUrl": "Moonshot 엔트리포인트", + "minimaxApiKey": "MiniMax API 키", + "getMiniMaxApiKey": "MiniMax API 키 받기", + "minimaxBaseUrl": "MiniMax 엔트리포인트", "zaiApiKey": "Z AI API 키", "getZaiApiKey": "Z AI API 키 받기", "zaiEntrypoint": "Z AI 엔트리포인트", "zaiEntrypointDescription": "위치에 따라 적절한 API 엔트리포인트를 선택하세요. 중국에 있다면 open.bigmodel.cn을 선택하세요. 그렇지 않으면 api.z.ai를 선택하세요.", - "minimaxApiKey": "MiniMax API 키", - "getMiniMaxApiKey": "MiniMax API 키 받기", - "minimaxBaseUrl": "MiniMax 엔트리포인트", "geminiApiKey": "Gemini API 키", "getGroqApiKey": "Groq API 키 받기", "groqApiKey": "Groq API 키", @@ -353,7 +353,7 @@ "enablePromptCachingTitle": "지원되는 모델의 성능을 향상시키고 비용을 절감하기 위해 프롬프트 캐시를 활성화합니다.", "cacheUsageNote": "참고: 캐시 사용이 표시되지 않는 경우, 다른 모델을 선택한 다음 원하는 모델을 다시 선택해 보세요.", "vscodeLmModel": "언어 모델", - "vscodeLmWarning": "참고: VS Code Language Model API를 통해 액세스되는 모델은 공급자가 래핑하거나 미세 조정했을 수 있어, 일반적인 공급자나 라우터에서 동일한 모델을 직접 사용할 때와 동작이 다를 수 있습니다. ‘Language Model’ 드롭다운의 모델을 사용하려면 먼저 해당 모델로 전환한 다음 Copilot Chat 프롬프트에서 ‘허용(수락)’을 클릭하세요. 그렇지 않으면 400 ‘The requested model is not supported’와 같은 오류가 발생할 수 있습니다.", + "vscodeLmWarning": "참고: 이는 매우 실험적인 통합이며, 공급자 지원은 다를 수 있습니다. 모델이 지원되지 않는다는 오류가 발생하면, 이는 공급자 측의 문제입니다.", "geminiParameters": { "urlContext": { "title": "URL 컨텍스트 활성화", @@ -429,7 +429,7 @@ }, "computerUse": { "label": "컴퓨터 사용", - "description": "이 모델이 브라우저와 상호 작용할 수 있습니까?" + "description": "이 모델이 브라우저와 상호 작용할 수 있습니까? (예: Claude 3.7 Sonnet)" }, "promptCache": { "label": "프롬프트 캐시", @@ -518,13 +518,13 @@ } }, "checkpoints": { - "timeout": { - "label": "체크포인트 초기화 타임아웃(초)", - "description": "체크포인트 서비스 초기화를 기다리는 최대 시간입니다. 기본값은 15초. 범위: 10~60초." - }, "enable": { "label": "자동 체크포인트 활성화", "description": "활성화되면 Roo는 작업 실행 중에 자동으로 체크포인트를 생성하여 변경 사항을 검토하거나 이전 상태로 되돌리기 쉽게 합니다. <0>더 알아보기" + }, + "timeout": { + "label": "체크포인트 초기화 시간 초과 (초)", + "description": "체크포인트 서비스 초기화를 기다리는 최대 시간입니다. 기본값은 15초입니다. 범위: 10-60초." } }, "notifications": { @@ -545,6 +545,14 @@ "label": "지능적 컨텍스트 압축을 트리거하는 임계값", "description": "컨텍스트 창이 이 임계값에 도달하면 Roo가 자동으로 압축합니다." }, + "includeCurrentTime": { + "label": "컨텍스트에 현재 시간 포함", + "description": "활성화하면 현재 시간 및 시간대 정보가 시스템 프롬프트에 포함됩니다. 시간 문제로 모델이 작동을 멈추는 경우 이 설정을 비활성화하세요." + }, + "includeCurrentCost": { + "label": "컨텍스트에 현재 비용 포함", + "description": "활성화하면 현재 API 사용 비용이 시스템 프롬프트에 포함됩니다. 비용 문제로 모델이 작동을 멈추는 경우 이 설정을 비활성화하세요." + }, "condensingApiConfiguration": { "label": "컨텍스트 압축을 위한 API 설정", "description": "컨텍스트 압축 작업에 사용할 API 설정을 선택하세요. 선택하지 않으면 현재 활성화된 설정을 사용합니다.", @@ -618,14 +626,6 @@ "label": "최대 총 이미지 크기", "mb": "MB", "description": "단일 read_file 작업에서 처리되는 모든 이미지의 최대 누적 크기 제한(MB 단위)입니다. 여러 이미지를 읽을 때 각 이미지의 크기가 총계에 추가됩니다. 다른 이미지를 포함하면 이 제한을 초과하는 경우 해당 이미지는 건너뜁니다." - }, - "includeCurrentTime": { - "label": "컨텍스트에 현재 시간 포함", - "description": "활성화하면 현재 시간과 시간대 정보가 시스템 프롬프트에 포함됩니다. 시간 문제로 모델이 작동을 멈추면 비활성화하세요." - }, - "includeCurrentCost": { - "label": "컨텍스트에 현재 비용 포함", - "description": "활성화하면 현재 API 사용 비용이 시스템 프롬프트에 포함됩니다. 비용 문제로 모델이 작동을 멈추면 비활성화하세요." } }, "terminal": { @@ -635,55 +635,59 @@ }, "advanced": { "label": "터미널 설정: 고급", - "description": "이 설정은 '인라인 터미널 사용'이 비활성화된 경우에만 적용됩니다. VS Code 터미널에만 영향을 미치며 IDE를 다시 시작해야 할 수 있습니다." + "description": "다음 옵션들은 설정을 적용하기 위해 터미널 재시작이 필요할 수 있습니다" }, "outputLineLimit": { "label": "터미널 출력 제한", - "description": "제한 내로 유지하기 위해 첫 줄과 마지막 줄을 유지하고 중간을 삭제합니다. 토큰을 절약하려면 낮추고; Roo에게 더 많은 중간 세부 정보를 제공하려면 높입니다. Roo는 콘텐츠가 건너뛴 곳에 자리 표시자를 봅니다.<0>자세히 알아보기" + "description": "명령 실행 시 터미널 출력에 포함할 최대 라인 수. 초과 시 중간에서 라인이 제거되어 token이 절약됩니다. <0>더 알아보기" }, "outputCharacterLimit": { "label": "터미널 문자 제한", - "description": "출력 크기에 대한 엄격한 상한을 적용하여 메모리 문제를 방지하기 위해 줄 제한을 재정의합니다. 초과하면 시작과 끝을 유지하고 내용이 생략된 곳에 Roo에게 자리 표시자를 표시합니다. <0>자세히 알아보기" + "description": "명령을 실행할 때 터미널 출력에 포함할 최대 문자 수입니다. 이 제한은 매우 긴 줄로 인한 메모리 문제를 방지하기 위해 줄 제한보다 우선합니다. 초과하면 출력이 잘립니다. <0>더 알아보기" }, "shellIntegrationTimeout": { - "label": "터미널 셸 통합 시간 초과", - "description": "명령을 실행하기 전에 VS Code 셸 통합을 기다리는 시간입니다. 셸이 느리게 시작되거나 '셸 통합을 사용할 수 없음' 오류가 표시되면 이 값을 늘리십시오. <0>자세히 알아보기" + "label": "터미널 쉘 통합 타임아웃", + "description": "명령을 실행하기 전에 쉘 통합이 초기화될 때까지 기다리는 최대 시간. 쉘 시작 시간이 긴 사용자의 경우, 터미널에서 \"Shell Integration Unavailable\" 오류가 표시되면 이 값을 늘려야 할 수 있습니다. <0>더 알아보기" }, "shellIntegrationDisabled": { - "label": "인라인 터미널 사용(권장)", - "description": "더 빠르고 안정적인 실행을 위해 셸 프로필/통합��� 우회하려면 인라인 터미널(채팅)에�� 명령을 실행하십시오. 비활성화하면 Roo는 셸 프로필, 프롬프트 및 플러그인과 함께 VS Code 터미널을 사용합니다. <0>자세히 알아보기" + "label": "터미널 셸 통합 비활성화", + "description": "터미널 명령이 올바르게 작동하지 않거나 '셸 통합을 사용할 수 없음' 오류가 표시되는 경우 이 옵션을 활성화합니다. 이렇게 하면 일부 고급 터미널 기능을 우회하여 명령을 실행하는 더 간단한 방법을 사용합니다. <0>더 알아보기" }, "commandDelay": { "label": "터미널 명령 지연", - "description": "VS Code 터미널이 모든 출력을 플러시할 수 있도록 각 명령 후에 짧은 일시 중지를 추가합니다(bash/zsh: PROMPT_COMMAND sleep; PowerShell: start-sleep). 누락된 꼬리 출력이 표시되는 경우에만 사용하고, 그렇지 않으면 0으로 둡니다. <0>자세히 알아보기" + "description": "명령 실행 후 추가할 지연 시간(밀리초). 기본값 0은 지연을 완전히 비활성화합니다. 이는 타이밍 문제가 있는 터미널에서 명령 출력을 완전히 캡처하는 데 도움이 될 수 있습니다. 대부분의 터미널에서는 `PROMPT_COMMAND='sleep N'`을 설정하여 구현되며, PowerShell은 각 명령 끝에 `start-sleep`을 추가합니다. 원래는 VSCode 버그#237208에 대한 해결책이었으며 필요하지 않을 수 있습니다. <0>더 알아보기" }, "compressProgressBar": { - "label": "진행률 표시줄 출력 압축", - "description": "진행률 표시줄/스피너를 축소하여 최종 상태만 유지합니다(토큰 절약). <0>자세히 알아보기" + "label": "진행 표시줄 출력 압축", + "description": "활성화하면 캐리지 리턴(\\r)이 포함된 터미널 출력을 처리하여 실제 터미널이 콘텐츠를 표시하는 방식을 시뮬레이션합니다. 이는 진행 표시줄의 중간 상태를 제거하고 최종 상태만 유지하여 더 관련성 있는 정보를 위한 컨텍스트 공간을 절약합니다. <0>더 알아보기" }, "powershellCounter": { "label": "PowerShell 카운터 해결 방법 활성화", - "description": "PowerShell 출력이 누락되거나 중복될 때 이 기능을 켜십시오. 출력을 안정화하기 위해 각 명령에 작은 카운터를 추가합니다. 출력이 이미 올바르게 표시되면 이 기능을 끄십시오. <0>자세히 알아보기" + "description": "활성화하면 PowerShell 명령에 카운터를 추가하여 명령이 올바르게 실행되도록 합니다. 이는 명령 출력 캡처에 문제가 있을 수 있는 PowerShell 터미널에서 도움이 됩니다. <0>더 알아보기" }, "zshClearEolMark": { - "label": "ZSH EOL 표시 지우기", - "description": "줄 끝에 떠도는 %가 보이거나 구문 분석이 잘못된 것 같을 때 이 기능을 켜십시오. Zsh의 줄 끝 표시(%)를 생략합니다. <0>자세히 알아보기" + "label": "ZSH 줄 끝 표시 지우기", + "description": "활성화하면 PROMPT_EOL_MARK=''를 설정하여 ZSH 줄 끝 표시를 지웁니다. 이는 '%'와 같은 특수 문자로 끝나는 명령 출력 해석의 문제를 방지합니다. <0>더 알아보기" }, "zshOhMy": { "label": "Oh My Zsh 통합 활성화", - "description": "Oh My Zsh 테마/플러그인이 셸 통합을 예상할 때 이 기능을 켜십시오. ITERM_SHELL_INTEGRATION_INSTALLED=Yes를 설정합니다. 해당 변수를 설정하지 않으려면 이 기능을 끄십시오. <0>자세히 알아보기" + "description": "활성화하면 ITERM_SHELL_INTEGRATION_INSTALLED=Yes를 설정하여 Oh My Zsh 셸 통합 기능을 활성화합니다. 이 설정을 적용하려면 IDE를 다시 시작해야 할 수 있습니다. <0>더 알아보기" }, "zshP10k": { "label": "Powerlevel10k 통합 활성화", - "description": "Powerlevel10k 셸 통합을 사용할 때 이 기능을 켜십시오. <0>자세히 알아보기" + "description": "활성화하면 POWERLEVEL9K_TERM_SHELL_INTEGRATION=true를 설정하여 Powerlevel10k 셸 통합 기능을 활성화합니다. <0>더 알아보기" }, "zdotdir": { "label": "ZDOTDIR 처리 활성화", - "description": "zsh 셸 통합이 실패하거나 점 파일과 충돌할 때 이 기능을 켜십시오. <0>자세히 알아보기" + "description": "활성화하면 zsh 셸 통합을 올바르게 처리하기 위한 ZDOTDIR용 임시 디렉터리를 생성합니다. 이를 통해 zsh 구성을 유지하면서 VSCode 셸 통합이 zsh와 올바르게 작동합니다. <0>더 알아보기" }, "inheritEnv": { "label": "환경 변수 상속", - "description": "부모 VS Code 프로세���에서 환경 변수를 상속하려면 이 기능을 켜십시오. <0>자세히 알아보기" + "description": "활성화하면 터미널이 VSCode 부모 프로세스로부터 환경 변수를 상속받습니다. 사용자 프로필에 정의된 셸 통합 설정 등이 포함됩니다. 이는 VSCode 전역 설정 `terminal.integrated.inheritEnv`를 직접 전환합니다. <0>더 알아보기" + }, + "preferredProfile": { + "label": "선호하는 터미널 프로필", + "description": "터미널을 생성할 때 Roo가 사용할 VSCode 터미널 프로필을 선택하세요. '기본값'을 선택하여 VSCode의 기본 동작을 사용하거나, 특정 프로필을 선택하여 기본 셸을 재정의하세요. <0>더 알아보기" } }, "advancedSettings": { @@ -692,7 +696,7 @@ "advanced": { "diff": { "label": "diff를 통한 편집 활성화", - "description": "활성화되면 Roo는 파일을 더 빠르게 편집할 수 있으며 잘린 전체 파일 쓰기를 자동으로 거부합니다", + "description": "활성화되면 Roo는 파일을 더 빠르게 편집할 수 있으며 잘린 전체 파일 쓰기를 자동으로 거부합니다. 최신 Claude 3.7 Sonnet 모델에서 가장 잘 작동합니다.", "strategy": { "label": "Diff 전략", "options": { @@ -721,6 +725,10 @@ "name": "실험적 통합 diff 전략 사용", "description": "실험적 통합 diff 전략을 활성화합니다. 이 전략은 모델 오류로 인한 재시도 횟수를 줄일 수 있지만 예기치 않은 동작이나 잘못된 편집을 일으킬 수 있습니다. 위험을 이해하고 모든 변경 사항을 신중하게 검토할 의향이 있는 경우에만 활성화하십시오." }, + "SEARCH_AND_REPLACE": { + "name": "실험적 검색 및 바꾸기 도구 사용", + "description": "실험적 검색 및 바꾸기 도구를 활성화하여 Roo가 하나의 요청에서 검색어의 여러 인스턴스를 바꿀 수 있게 합니다." + }, "INSERT_BLOCK": { "name": "실험적 콘텐츠 삽입 도구 사용", "description": "실험적 콘텐츠 삽입 도구를 활성화하여 Roo가 diff를 만들 필요 없이 특정 줄 번호에 콘텐츠를 삽입할 수 있게 합니다." @@ -785,6 +793,8 @@ "modelInfo": { "supportsImages": "이미지 지원", "noImages": "이미지 지원 안 함", + "supportsComputerUse": "컴퓨터 사용 지원", + "noComputerUse": "컴퓨터 사용 지원 안 함", "supportsPromptCache": "프롬프트 캐시 지원", "noPromptCache": "프롬프트 캐시 지원 안 함", "contextWindow": "컨텍스트 창:", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index bfa99733f1b7..171fbac87ab8 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "Omgevingsvariabelen overnemen", - "description": "Schakel in om omgevingsvariabelen over te nemen van het bovenliggende VS Code-proces. <0>Meer informatie" + "description": "Indien ingeschakeld, neemt de terminal omgevingsvariabelen over van het bovenliggende VSCode-proces, zoals shell-integratie-instellingen uit het gebruikersprofiel. Dit schakelt direct de VSCode-instelling `terminal.integrated.inheritEnv` om. <0>Meer informatie" + }, + "preferredProfile": { + "label": "Voorkeursprofiel terminal", + "description": "Selecteer welk VSCode-terminalprofiel Roo moet gebruiken bij het maken van terminals. Kies 'Default' om het standaardgedrag van VSCode te gebruiken, of selecteer een specifiek profiel om de standaardshell te overschrijven. <0>Meer informatie" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index c4600ed4132c..ea78fe82fe9e 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "Dziedzicz zmienne środowiskowe", - "description": "Włącz, aby dziedziczyć zmienne środowiskowe z procesu nadrzędnego VS Code. <0>Dowiedz się więcej" + "description": "Po włączeniu terminal dziedziczy zmienne środowiskowe z procesu nadrzędnego VSCode, takie jak ustawienia integracji powłoki zdefiniowane w profilu użytkownika. Przełącza to bezpośrednio globalne ustawienie VSCode `terminal.integrated.inheritEnv`. <0>Dowiedz się więcej" + }, + "preferredProfile": { + "label": "Preferowany profil terminala", + "description": "Wybierz, który profil terminala VSCode powinien używać Roo podczas tworzenia terminali. Wybierz 'Domyślny', aby używać domyślnego zachowania VSCode, lub wybierz konkretny profil, aby zastąpić domyślną powłokę. <0>Dowiedz się więcej" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index 6c1d7b7f5041..c5b15c9a262a 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -681,6 +681,10 @@ "label": "Ativar manipulação de ZDOTDIR", "description": "Ative isso quando a integração do shell zsh falhar ou entrar em conflito com seus dotfiles. <0>Saiba mais" }, + "preferredProfile": { + "label": "Perfil de terminal preferido", + "description": "Selecione qual perfil de terminal do VSCode o Roo deve usar ao criar terminais. Escolha 'Padrão' para usar o comportamento padrão do VSCode, ou selecione um perfil específico para substituir o shell padrão. <0>Saiba mais" + }, "inheritEnv": { "label": "Herdar variáveis de ambiente", "description": "Ative isso para herdar variáveis de ambiente do processo pai do VS Code. <0>Saiba mais" diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index b5f6c8883380..52614f6a62c2 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -681,9 +681,13 @@ "label": "Включить обработку ZDOTDIR", "description": "Включите, когда интеграция shell zsh не работает или конфликтует с вашими dotfiles. <0>Подробнее" }, + "preferredProfile": { + "label": "Предпочитаемый профиль терминала", + "description": "Выберите, какой профиль терминала VSCode должен использовать Roo при создании терминалов. Выберите 'По умолчанию', чтобы использовать поведение по умолчанию VSCode, или выберите конкретный профиль для переопределения оболочки по умолчанию. <0>Узнать больше" + }, "inheritEnv": { "label": "Наследовать переменные среды", - "description": "Включите для наследования переменных среды от родительского процесса VS Code. <0>Подробнее" + "description": "Когда включено, терминал наследует переменные среды от родительского процесса VSCode, такие как настройки интеграции shell, определенные в пользовательском профиле. Это напрямую переключает глобальную настройку VSCode `terminal.integrated.inheritEnv`. <0>Подробнее" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 485e8bbdfc03..6a0fffc687a2 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -681,6 +681,10 @@ "label": "ZDOTDIR işlemeyi etkinleştir", "description": "zsh kabuk entegrasyonu başarısız olduğunda veya dotfiles'larınızla çakıştığında bunu açın. <0>Daha fazla bilgi edinin" }, + "preferredProfile": { + "label": "Tercih edilen terminal profili", + "description": "Terminal oluştururken Roo'nun hangi VSCode terminal profilini kullanacağını seçin. VSCode'un varsayılan davranışını kullanmak için 'Varsayılan'ı seçin veya varsayılan kabuğu geçersiz kılmak için belirli bir profili seçin. <0>Daha fazla bilgi edinin" + }, "inheritEnv": { "label": "Ortam değişkenlerini devral", "description": "Ana VS Code işleminden ortam değişkenlerini devralmak için bunu açın. <0>Daha fazla bilgi edinin" diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index 00203eddf425..85047da2f7b6 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "Kế thừa biến môi trường", - "description": "Bật tính năng này để kế thừa các biến môi trường từ quy trình mẹ của VS Code. <0>Tìm hiểu thêm" + "description": "Khi được bật, terminal sẽ kế thừa các biến môi trường từ tiến trình cha của VSCode, như các cài đặt tích hợp shell được định nghĩa trong hồ sơ người dùng. Điều này trực tiếp chuyển đổi cài đặt toàn cục của VSCode `terminal.integrated.inheritEnv`. <0>Tìm hiểu thêm" + }, + "preferredProfile": { + "label": "Hồ sơ terminal ưu tiên", + "description": "Chọn hồ sơ terminal VSCode mà Roo nên sử dụng khi tạo terminal. Chọn 'Mặc định' để sử dụng hành vi mặc định của VSCode, hoặc chọn một hồ sơ cụ thể để ghi đè shell mặc định. <0>Tìm hiểu thêm" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index a3c2fbe9b2c2..c6d4fe58bb49 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "继承环境变量", - "description": "启用此选项以从父 VS Code 进程继承环境变量。<0>了解更多" + "description": "启用后,终端将从 VSCode 父进程继承环境变量,如用户配置文件中定义的 shell 集成设置。这直接切换 VSCode 全局设置 `terminal.integrated.inheritEnv`。 <0>了解更多" + }, + "preferredProfile": { + "label": "首选终端配置文件", + "description": "选择 Roo 在创建终端时应使用的 VSCode 终端配置文件。选择 'Default' 以使用 VSCode 的默认行为,或选择特定配置文件以覆盖默认 shell。 <0>了解更多" } }, "advancedSettings": { diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index eeacdfc508d3..77264a9a5373 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -683,7 +683,11 @@ }, "inheritEnv": { "label": "繼承環境變數", - "description": "啟用此選項以從父 VS Code 程序繼承環境變數。<0>了解更多" + "description": "啟用後,終端機將從 VSCode 父程序繼承環境變數,如使用者設定檔中定義的 shell 整合設定。這直接切換 VSCode 全域設定 `terminal.integrated.inheritEnv`。 <0>了解更多" + }, + "preferredProfile": { + "label": "偏好的終端機設定檔", + "description": "選擇 Roo 在建立終端機時應使用的 VSCode 終端機設定檔。選擇「預設」以使用 VSCode 的預設行為,或選擇特定設定檔以覆寫預設 shell。 <0>了解更多" } }, "advancedSettings": {