mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Add platform to extension state so it's available in the webview
This commit is contained in:
parent
c78fbed319
commit
07cff2fbd7
4 changed files with 5 additions and 1 deletions
|
|
@ -2382,6 +2382,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||
customModes: await this.customModesManager.getCustomModes(),
|
||||
experiments: experiments ?? experimentDefault,
|
||||
mcpServers: this.mcpHub?.getAllServers() ?? [],
|
||||
platform: process.platform,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ describe("ClineProvider", () => {
|
|||
mode: defaultModeSlug,
|
||||
customModes: [],
|
||||
experiments: experimentDefault,
|
||||
platform: "win32",
|
||||
}
|
||||
|
||||
const message: ExtensionMessage = {
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ export interface ExtensionState {
|
|||
autoApprovalEnabled?: boolean
|
||||
customModes: ModeConfig[]
|
||||
toolRequirements?: Record<string, boolean> // Map of tool names to their requirements (e.g. {"apply_diff": true} if diffEnabled)
|
||||
platform: string // Operating system platform (e.g., 'win32', 'darwin', 'linux')
|
||||
}
|
||||
|
||||
export interface ClineMessage {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
|
|||
setExperimentEnabled,
|
||||
alwaysAllowModeSwitch,
|
||||
setAlwaysAllowModeSwitch,
|
||||
platform,
|
||||
} = useExtensionState()
|
||||
const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
|
||||
const [modelIdErrorMessage, setModelIdErrorMessage] = useState<string | undefined>(undefined)
|
||||
|
|
@ -701,7 +702,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
|
|||
</div>
|
||||
)}
|
||||
|
||||
{process.platform !== "win32" && (
|
||||
{platform !== "win32" && (
|
||||
<div style={{ marginBottom: 15 }}>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "5px" }}>
|
||||
<span style={{ color: "var(--vscode-errorForeground)" }}>⚠️</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue