Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: correctly configure model list

Vanalite653a3b6e1551
diff --git a/src-tauri/src/core/openclaw/commands.rs b/src-tauri/src/core/openclaw/commands.rs
index 2eebdc1e2..d37dc683a 100644
--- a/src-tauri/src/core/openclaw/commands.rs
+++ b/src-tauri/src/core/openclaw/commands.rs
@@ -18,6 +18,37 @@ use crate::core::openclaw::{
/// Request ID counter for WebSocket messages
static REQUEST_ID_COUNTER: AtomicU64 = AtomicU64::new(1);
+/// Container name for the Docker sandbox
+const DOCKER_CONTAINER_NAME: &str = "jan-openclaw";
+
+/// Check if the Docker container `jan-openclaw` is running.
+/// Used to decide whether CLI commands should route through `docker exec`.
+async fn is_docker_container_running() -> bool {
+ Command::new("docker")
+ .args(["inspect", "--format", "{{.State.Running}}", DOCKER_CONTAINER_NAME])
+ .output()
+ .await
+ .map(|o| o.status.success() && String::from_utf8_lossy(&o.stdout).trim() == "true")
+ .unwrap_or(false)
+}
+
+/// Build a `Command` for running an `openclaw` CLI command.
+/// If the Docker container is running, routes through `docker exec`;
+/// otherwise runs the host-installed `openclaw` binary directly.
+async fn openclaw_command(args: &[&str]) -> Command {
+ if is_docker_container_running().await {
+ let mut cmd = Command::new("docker");
+ let mut full_args: Vec<&str> = vec!["exec", DOCKER_CONTAINER_NAME, "openclaw"];
+ full_args.extend_from_slice(args);
+ cmd.args(full_args);
+ cmd
+ } else {
+ let mut cmd = Command::new("openclaw");
+ cmd.args(args);
+ cmd
+ }
+}
+
/// Flag to prevent repeated gateway restarts during WhatsApp auth polling.
/// Reset when a new auth session starts via whatsapp_start_auth.
static WA_RESTART_ATTEMPTED: AtomicBool = AtomicBool::new(false);
@@ -499,8 +530,7 @@ async fn test_gateway_connection() -> Result<(), String> {
async fn restart_gateway_cli() -> Result<(), String> {
log::info!("Restarting Gateway via CLI...");
- let output = Command::new("openclaw")
- .args(["gateway", "restart"])
+ let output = openclaw_command(&["gateway", "restart"]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -753,8 +783,7 @@ pub async fn openclaw_check_port(port: u16) -> PortCheckResult {
/// Check if OpenClaw is installed and get its version
async fn check_openclaw_installed() -> Result<Option<String>, String> {
- let output = Command::new("openclaw")
- .arg("--version")
+ let output = openclaw_command(&["--version"]).await
.output()
.await;
@@ -905,8 +934,7 @@ pub async fn openclaw_install() -> Result<InstallResult, String> {
}
// 2. Configure WhatsApp with pairing mode by default (safer for users)
- if let Ok(mut child) = Command::new("openclaw")
- .args(["config", "set", "channels.whatsapp.dmPolicy", "pairing"])
+ if let Ok(mut child) = openclaw_command(&["config", "set", "channels.whatsapp.dmPolicy", "pairing"]).await
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
@@ -915,8 +943,7 @@ pub async fn openclaw_install() -> Result<InstallResult, String> {
}
// 3. Configure Telegram with pairing mode by default
- if let Ok(mut child) = Command::new("openclaw")
- .args(["config", "set", "channels.telegram.dmPolicy", "pairing"])
+ if let Ok(mut child) = openclaw_command(&["config", "set", "channels.telegram.dmPolicy", "pairing"]).await
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
@@ -926,8 +953,7 @@ pub async fn openclaw_install() -> Result<InstallResult, String> {
// 4. Enable dangerouslyDisableDeviceAuth for Jan's Control UI client
// This allows Jan to connect without device pairing (Jan is trusted)
- if let Ok(mut child) = Command::new("openclaw")
- .args(["config", "set", "gateway.controlUi.dangerouslyDisableDeviceAuth", "true"])
+ if let Ok(mut child) = openclaw_command(&["config", "set", "gateway.controlUi.dangerouslyDisableDeviceAuth", "true"]).await
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
@@ -936,8 +962,7 @@ pub async fn openclaw_install() -> Result<InstallResult, String> {
}
// 5. Set gateway.mode to "local" - required for gateway to start
- if let Ok(mut child) = Command::new("openclaw")
- .args(["config", "set", "gateway.mode", "local"])
+ if let Ok(mut child) = openclaw_command(&["config", "set", "gateway.mode", "local"]).await
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
@@ -1131,8 +1156,9 @@ pub async fn openclaw_configure(config_input: Option<OpenClawConfigInput>) -> Re
Ok(config)
}
-/// Strip known-invalid keys from an OpenClaw config.
-/// OpenClaw uses strict Zod validation — unknown keys cause the gateway to refuse to start.
+/// Sanitise an OpenClaw config value before writing it to disk.
+/// 1. Strips known-invalid keys (OpenClaw uses strict Zod validation).
+/// 2. Ensures required fields are present (e.g., gateway.mode = "local").
fn strip_invalid_config_keys(config: &mut serde_json::Value) {
// agents.defaults.systemPrompt is NOT a valid key (system prompts come from workspace files)
if let Some(defaults) = config.pointer_mut("/agents/defaults") {
@@ -1142,6 +1168,17 @@ fn strip_invalid_config_keys(config: &mut serde_json::Value) {
}
}
}
+
+ // gateway.mode is REQUIRED — without it the gateway refuses to start.
+ // Ensure it is always present and defaults to "local".
+ if let Some(gw) = config.get_mut("gateway") {
+ if let Some(obj) = gw.as_object_mut() {
+ if !obj.contains_key("mode") {
+ obj.insert("mode".to_string(), serde_json::json!("local"));
+ log::info!("Added missing required key: gateway.mode = \"local\"");
+ }
+ }
+ }
}
/// Get the current OpenClaw configuration
@@ -1172,9 +1209,12 @@ fn read_openclaw_config() -> Result<serde_json::Value, String> {
}
/// Write a JSON Value back to the OpenClaw config file.
+/// Automatically sanitises the config (strip invalid keys, ensure required keys).
fn write_openclaw_config(config: &serde_json::Value) -> Result<(), String> {
let config_path = get_openclaw_config_path()?;
- let json = serde_json::to_string_pretty(config)
+ let mut sanitized = config.clone();
+ strip_invalid_config_keys(&mut sanitized);
+ let json = serde_json::to_string_pretty(&sanitized)
.map_err(|e| format!("Failed to serialize config: {}", e))?;
std::fs::write(&config_path, json)
.map_err(|e| format!("Failed to write config: {}", e))
@@ -1194,19 +1234,19 @@ pub async fn openclaw_sync_model(
let display_name = model_name.unwrap_or_else(|| model_id.clone());
- // Determine context window based on provider type
+ // Determine context window based on Jan provider type
let context_window = if provider.as_deref() == Some("llamacpp") || provider.as_deref() == Some("mlx") {
16000
} else {
128000
};
+ // OpenClaw models.providers.jan.models expects an array of objects with
+ // at minimum { id, name }. The id must be the plain model name — OpenClaw
+ // prepends the provider key ("jan/") when resolving references.
let model_def = serde_json::json!({
"id": model_id,
"name": display_name,
- "reasoning": false,
- "input": ["text"],
- "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": context_window,
"maxTokens": 4096
});
@@ -1216,7 +1256,6 @@ pub async fn openclaw_sync_model(
// Ensure models.providers.jan exists
if config.pointer("/models/providers/jan").is_none() {
- // Read the current baseUrl to preserve Docker vs direct process setting
let current_base_url = config
.pointer("/models/providers/jan/baseUrl")
.and_then(|v| v.as_str())
@@ -1225,8 +1264,6 @@ pub async fn openclaw_sync_model(
config["models"]["providers"]["jan"] = serde_json::json!({
"baseUrl": current_base_url,
"api": DEFAULT_JAN_API_TYPE,
- "authHeader": false,
- "apiKey": "not-needed",
"models": [model_def]
});
} else {
@@ -1245,15 +1282,14 @@ pub async fn openclaw_sync_model(
}
}
- // Set as default model
- config["agents"]["defaults"]["model"]["primary"] = serde_json::json!(model_id);
-
- // Clean up any invalid keys before writing
- strip_invalid_config_keys(&mut config);
+ // Default model reference must use "jan/<model_id>" so OpenClaw resolves
+ // it under the "jan" provider.
+ let qualified_id = format!("jan/{}", model_id);
+ config["agents"]["defaults"]["model"]["primary"] = serde_json::json!(qualified_id);
write_openclaw_config(&config)?;
- log::info!("Successfully synced model '{}' to OpenClaw config", model_id);
+ log::info!("Successfully synced model '{}' to OpenClaw config (default: {})", model_id, qualified_id);
Ok(())
}
@@ -1278,7 +1314,8 @@ pub async fn openclaw_sync_all_models(
});
}
- // Build model definitions array
+ // Build model definition objects.
+ // Only { id, name } are required; contextWindow and maxTokens are optional.
let model_defs: Vec<serde_json::Value> = models
.iter()
.map(|entry| {
@@ -1291,9 +1328,6 @@ pub async fn openclaw_sync_all_models(
serde_json::json!({
"id": entry.model_id,
"name": entry.display_name,
- "reasoning": false,
- "input": ["text"],
- "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": context_window,
"maxTokens": 4096
})
@@ -1312,26 +1346,22 @@ pub async fn openclaw_sync_all_models(
.unwrap_or(DEFAULT_JAN_BASE_URL)
.to_string();
- // Build the full jan provider config with all models
+ // Build the full jan provider config with all models as objects
config["models"]["providers"]["jan"] = serde_json::json!({
"baseUrl": current_base_url,
"api": DEFAULT_JAN_API_TYPE,
- "authHeader": false,
- "apiKey": "not-needed",
"models": model_defs
});
- // Set the default model if provided
+ // Default model must be "jan/<model_id>" so OpenClaw resolves under the jan provider
let set_default = if let Some(ref model_id) = default_model_id {
- config["agents"]["defaults"]["model"]["primary"] = serde_json::json!(model_id);
- Some(format!("jan/{}", model_id))
+ let qualified = format!("jan/{}", model_id);
+ config["agents"]["defaults"]["model"]["primary"] = serde_json::json!(qualified);
+ Some(qualified)
} else {
None
};
- // Clean up any invalid keys before writing
- strip_invalid_config_keys(&mut config);
-
write_openclaw_config(&config)?;
log::info!("Successfully bulk synced {} models to OpenClaw", synced_count);
@@ -1353,6 +1383,10 @@ pub async fn openclaw_get_model() -> Result<String, String> {
.unwrap_or(DEFAULT_MODEL_ID)
.to_string();
+ // Strip the "jan/" provider prefix so the frontend gets the plain model ID
+ // that matches Jan's internal model identifiers.
+ let model = model.strip_prefix("jan/").unwrap_or(&model).to_string();
+
Ok(model)
}
@@ -1966,8 +2000,7 @@ pub async fn telegram_validate_token(token: String) -> TelegramTokenValidation {
async fn enable_channel_plugin(channel: &str) -> Result<(), String> {
log::info!("Enabling {} plugin in OpenClaw", channel);
- let enable_output = Command::new("openclaw")
- .args(["plugins", "enable", channel])
+ let enable_output = openclaw_command(&["plugins", "enable", channel]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2012,14 +2045,13 @@ pub async fn telegram_configure(token: String) -> Result<TelegramConfig, String>
enable_channel_plugin("telegram").await?;
// Add Telegram channel using OpenClaw CLI
- let add_output = Command::new("openclaw")
- .args([
+ let add_output = openclaw_command(&[
"channels",
"add",
"--channel", "telegram",
"--token", &token,
"--account", "default",
- ])
+ ]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2045,6 +2077,12 @@ pub async fn telegram_configure(token: String) -> Result<TelegramConfig, String>
}
}
+ // Clear any stale pending pairing codes so the user gets a fresh slot
+ // when they tap /start in the bot (OpenClaw caps pending codes at 3).
+ if let Err(e) = telegram_clear_pending_pairing().await {
+ log::warn!("Failed to clear pending pairing codes: {}", e);
+ }
+
// Also store in local config for Jan's reference
let telegram_settings = serde_json::json!({
"enabled": true,
@@ -2101,6 +2139,32 @@ pub async fn telegram_get_config() -> Result<TelegramConfig, String> {
})
}
+/// Clear all pending Telegram pairing codes.
+///
+/// OpenClaw caps pending pairing requests at 3 per channel. After that,
+/// `/start` silently does nothing until a code is approved or expires (1 h).
+/// By resetting the pairing state file we guarantee the user always gets a
+/// fresh code slot when they open the wizard or tap `/start` again.
+#[tauri::command]
+pub async fn telegram_clear_pending_pairing() -> Result<(), String> {
+ log::info!("Clearing pending Telegram pairing codes");
+
+ let config_dir = get_openclaw_config_dir()?;
+ let pairing_path = config_dir.join("credentials").join("telegram-pairing.json");
+
+ if pairing_path.exists() {
+ // Reset to an empty request list (keep the version marker)
+ let empty = serde_json::json!({ "version": 1, "requests": [] });
+ std::fs::write(&pairing_path, serde_json::to_string_pretty(&empty).unwrap())
+ .map_err(|e| format!("Failed to clear pairing state: {}", e))?;
+ log::info!("Cleared pending pairing codes at {:?}", pairing_path);
+ } else {
+ log::info!("No pairing state file to clear");
+ }
+
+ Ok(())
+}
+
/// Check if Telegram channel is actually connected in OpenClaw gateway
#[tauri::command]
pub async fn telegram_check_pairing() -> Result<bool, String> {
@@ -2137,8 +2201,7 @@ pub async fn telegram_check_pairing() -> Result<bool, String> {
// Fallback: try openclaw channels status --probe CLI
log::info!("Gateway WebSocket unavailable, falling back to CLI check");
- let status_output = Command::new("openclaw")
- .args(["channels", "status", "--probe"])
+ let status_output = openclaw_command(&["channels", "status", "--probe"]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2186,8 +2249,7 @@ pub async fn telegram_check_pairing() -> Result<bool, String> {
pub async fn telegram_approve_pairing(code: String) -> Result<(), String> {
log::info!("Approving Telegram pairing code: {}", code);
- let output = Command::new("openclaw")
- .args(["pairing", "approve", "telegram", &code])
+ let output = openclaw_command(&["pairing", "approve", "telegram", &code]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2274,8 +2336,7 @@ pub async fn openclaw_list_channels() -> Result<ChannelList, String> {
log::info!("Listing OpenClaw channels");
// Run openclaw channels list to get configured channels
- let list_output = Command::new("openclaw")
- .args(["channels", "list"])
+ let list_output = openclaw_command(&["channels", "list"]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2341,8 +2402,7 @@ pub async fn openclaw_channel_status(channel: String) -> Result<ChannelStatus, S
log::info!("Getting status for channel: {}", channel);
// Run openclaw channels status to get detailed status
- let status_output = Command::new("openclaw")
- .args(["channels", "status", "--probe"])
+ let status_output = openclaw_command(&["channels", "status", "--probe"]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2559,15 +2619,21 @@ pub async fn whatsapp_start_auth(state: tauri::State<'_, OpenClawState>) -> Resu
enable_channel_plugin("whatsapp").await?;
// Now add WhatsApp channel using CLI
- // This configures the channel in OpenClaw's config
- let add_output = Command::new("openclaw")
- .args([
+ // For Docker: the auth dir is inside the container at /home/node/.openclaw/whatsapp_auth
+ // For direct process: it's the host path from get_openclaw_config_dir()
+ let effective_auth_dir = if is_docker_container_running().await {
+ "/home/node/.openclaw/whatsapp_auth".to_string()
+ } else {
+ auth_dir.to_string_lossy().to_string()
+ };
+
+ let add_output = openclaw_command(&[
"channels",
"add",
"--channel", "whatsapp",
"--account", "default",
- "--auth-dir", &auth_dir.to_string_lossy(),
- ])
+ "--auth-dir", &effective_auth_dir,
+ ]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -2917,8 +2983,7 @@ pub async fn whatsapp_check_auth() -> Result<WhatsAppAuthStatus, String> {
// it into connecting. The flag is reset in whatsapp_start_auth.
if !WA_RESTART_ATTEMPTED.swap(true, Ordering::SeqCst) {
log::info!("Restarting gateway to establish WhatsApp connection");
- let _ = Command::new("openclaw")
- .args(["gateway", "restart"])
+ let _ = openclaw_command(&["gateway", "restart"]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
@@ -3257,14 +3322,13 @@ pub async fn discord_configure(token: String) -> Result<DiscordConfig, String> {
enable_channel_plugin("discord").await?;
// Add Discord channel using OpenClaw CLI
- let add_output = Command::new("openclaw")
- .args([
+ let add_output = openclaw_command(&[
"channels",
"add",
"--channel", "discord",
"--token", &token,
"--account", "default",
- ])
+ ]).await
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
diff --git a/src-tauri/src/core/openclaw/models.rs b/src-tauri/src/core/openclaw/models.rs
index 6c9bf090e..b8e7324b2 100644
--- a/src-tauri/src/core/openclaw/models.rs
+++ b/src-tauri/src/core/openclaw/models.rs
@@ -25,6 +25,8 @@ impl Default for OpenClawConfig {
/// Gateway configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GatewayConfig {
+ /// Gateway mode: "local" (run server here) or "remote" (connect to remote)
+ pub mode: String,
/// Bind address (loopback or 0.0.0.0)
pub bind: String,
/// Port number
@@ -39,6 +41,7 @@ pub struct GatewayConfig {
impl Default for GatewayConfig {
fn default() -> Self {
Self {
+ mode: "local".to_string(),
bind: "loopback".to_string(),
port: super::OPENCLAW_PORT,
auth: AuthConfig::default(),
@@ -118,6 +121,22 @@ impl Default for ProvidersConfig {
}
}
+/// A single model definition for OpenClaw's provider config.
+/// Only `id` and `name` are required by OpenClaw's Zod schema.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ModelDefinition {
+ /// Model identifier (plain name, no provider prefix)
+ pub id: String,
+ /// Human-readable display name
+ pub name: String,
+ /// Context window size in tokens
+ #[serde(rename = "contextWindow", skip_serializing_if = "Option::is_none")]
+ pub context_window: Option<u32>,
+ /// Maximum output tokens
+ #[serde(rename = "maxTokens", skip_serializing_if = "Option::is_none")]
+ pub max_tokens: Option<u32>,
+}
+
/// Jan provider configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JanProviderConfig {
@@ -126,8 +145,8 @@ pub struct JanProviderConfig {
pub base_url: String,
/// API type (openai-completions, etc.)
pub api: String,
- /// List of models to use (or ["*"] for all)
- pub models: Vec<String>,
+ /// List of model definitions (objects with at least { id, name })
+ pub models: Vec<ModelDefinition>,
}
impl Default for JanProviderConfig {
@@ -135,7 +154,14 @@ impl Default for JanProviderConfig {
Self {
base_url: constants::DEFAULT_JAN_BASE_URL.to_string(),
api: constants::DEFAULT_JAN_API_TYPE.to_string(),
- models: vec!["*".to_string()],
+ // Start with the pinned default model; openclaw_sync_all_models
+ // replaces this list with the full catalog from Jan.
+ models: vec![ModelDefinition {
+ id: constants::DEFAULT_MODEL_ID.to_string(),
+ name: constants::DEFAULT_MODEL_ID.to_string(),
+ context_window: Some(128000),
+ max_tokens: Some(4096),
+ }],
}
}
}
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index a44c31c25..bdabe91de 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -159,6 +159,7 @@ pub fn run() {
core::openclaw::commands::telegram_configure,
core::openclaw::commands::telegram_get_config,
core::openclaw::commands::telegram_check_pairing,
+ core::openclaw::commands::telegram_clear_pending_pairing,
core::openclaw::commands::telegram_approve_pairing,
core::openclaw::commands::telegram_disconnect,
// WhatsApp commands
diff --git a/web-app/src/containers/dialogs/TelegramWizardDialog.tsx b/web-app/src/containers/dialogs/TelegramWizardDialog.tsx
index 13dd92b38..c2f8eb0d9 100644
--- a/web-app/src/containers/dialogs/TelegramWizardDialog.tsx
+++ b/web-app/src/containers/dialogs/TelegramWizardDialog.tsx
@@ -19,6 +19,7 @@ import {
IconLoader2,
IconAlertCircle,
IconExternalLink,
+ IconRefresh,
} from '@tabler/icons-react'
import type { TelegramConfig } from '@/types/openclaw'
@@ -53,6 +54,7 @@ export function TelegramWizard({
const [config, setConfig] = useState<TelegramConfig | null>(null)
const [pairingCode, setPairingCode] = useState('')
const [isApproving, setIsApproving] = useState(false)
+ const [isResettingPairing, setIsResettingPairing] = useState(false)
// Reset state when dialog closes
useEffect(() => {
@@ -163,6 +165,19 @@ export function TelegramWizard({
}
}
+ const handleResetPairing = async () => {
+ setIsResettingPairing(true)
+ try {
+ await invoke('telegram_clear_pending_pairing')
+ setPairingCode('')
+ toast.success(t('settings:remoteAccess.telegramWizard.step4.resetSuccess'))
+ } catch {
+ toast.error(t('settings:remoteAccess.telegramWizard.step4.resetError'))
+ } finally {
+ setIsResettingPairing(false)
+ }
+ }
+
const handleDisconnect = async () => {
try {
await invoke('telegram_disconnect')
@@ -360,6 +375,15 @@ export function TelegramWizard({
placeholder={t('settings:remoteAccess.telegramWizard.step4.codePlaceholder')}
className="font-mono text-center text-lg tracking-wider"
/>
+ <button
+ type="button"
+ onClick={handleResetPairing}
+ disabled={isResettingPairing}
+ className="flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors mx-auto"
+ >
+ <IconRefresh size={12} className={isResettingPairing ? 'animate-spin' : ''} />
+ {t('settings:remoteAccess.telegramWizard.step4.resetPairing')}
+ </button>
</div>
<div className="flex gap-2">
diff --git a/web-app/src/locales/cs/settings.json b/web-app/src/locales/cs/settings.json
index b507f68cd..54fd8d94e 100644
--- a/web-app/src/locales/cs/settings.json
+++ b/web-app/src/locales/cs/settings.json
@@ -360,7 +360,7 @@
"sandboxLinux": "Linux Namespaces",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw běží bez izolace pískoviště. Pro lepší bezpečnost povolte WSL2 (Windows) nebo aktualizujte na macOS Tahoe.",
+ "securityAdvisory": "OpenClaw běží bez izolace pískoviště. Pro lepší bezpečnost povolte Docker pro spuštění OpenClaw v kontejneru.",
"learnMore": "Zjistit více",
"logViewer": "Logy pískoviště",
"noLogs": "Žádné logy",
diff --git a/web-app/src/locales/de-DE/settings.json b/web-app/src/locales/de-DE/settings.json
index cc4838039..0c0e7b4bb 100644
--- a/web-app/src/locales/de-DE/settings.json
+++ b/web-app/src/locales/de-DE/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Linux Namespaces",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw läuft ohne Sandbox-Isolation. Für bessere Sicherheit aktivieren Sie WSL2 (Windows) oder aktualisieren Sie auf macOS Tahoe.",
+ "securityAdvisory": "OpenClaw läuft ohne Sandbox-Isolation. Für bessere Sicherheit aktivieren Sie Docker, um OpenClaw in einem Container auszuführen.",
"learnMore": "Mehr erfahren",
"logViewer": "Sandbox-Logs",
"noLogs": "Keine Logs verfügbar",
diff --git a/web-app/src/locales/en/settings.json b/web-app/src/locales/en/settings.json
index d50be3f40..8c334c9b7 100644
--- a/web-app/src/locales/en/settings.json
+++ b/web-app/src/locales/en/settings.json
@@ -372,7 +372,7 @@
"sandboxLinux": "Linux Namespaces",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw is running without sandbox isolation. For better security, enable WSL2 (Windows) or update to macOS Tahoe.",
+ "securityAdvisory": "OpenClaw is running without sandbox isolation. For better security, enable Docker to run OpenClaw in a container.",
"learnMore": "Learn more",
"logViewer": "Sandbox Logs",
"noLogs": "No logs available",
@@ -514,7 +514,10 @@
"approveError": "Failed to approve pairing: {{error}}",
"codeRequired": "Please enter the pairing code from the bot's message",
"notConnected": "Channel not connected yet. Make sure the OpenClaw gateway is running.",
- "skipForNow": "Skip for Now"
+ "skipForNow": "Skip for Now",
+ "resetPairing": "No code? Click to reset & try /start again",
+ "resetSuccess": "Pairing codes cleared — send /start to your bot again",
+ "resetError": "Failed to reset pairing codes"
},
"step5": {
"title": "Connected!",
diff --git a/web-app/src/locales/fr/settings.json b/web-app/src/locales/fr/settings.json
index 916ac02a8..ed260971c 100644
--- a/web-app/src/locales/fr/settings.json
+++ b/web-app/src/locales/fr/settings.json
@@ -366,7 +366,7 @@
"sandboxLinux": "Espaces de noms Linux",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw s'exécute sans isolation par bac à sable. Pour une meilleure sécurité, activez WSL2 (Windows) ou mettez à jour vers macOS Tahoe.",
+ "securityAdvisory": "OpenClaw s'exécute sans isolation par bac à sable. Pour une meilleure sécurité, activez Docker pour exécuter OpenClaw dans un conteneur.",
"learnMore": "En savoir plus",
"logViewer": "Logs du bac à sable",
"noLogs": "Aucun log disponible",
diff --git a/web-app/src/locales/id/settings.json b/web-app/src/locales/id/settings.json
index a696a714b..3d08dadaf 100644
--- a/web-app/src/locales/id/settings.json
+++ b/web-app/src/locales/id/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Linux Namespaces",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw berjalan tanpa isolasi sandbox. Untuk keamanan lebih baik, aktifkan WSL2 (Windows) atau update ke macOS Tahoe.",
+ "securityAdvisory": "OpenClaw berjalan tanpa isolasi sandbox. Untuk keamanan lebih baik, aktifkan Docker untuk menjalankan OpenClaw dalam container.",
"learnMore": "Pelajari lebih lanjut",
"logViewer": "Log Sandbox",
"noLogs": "Tidak ada log",
diff --git a/web-app/src/locales/ja/settings.json b/web-app/src/locales/ja/settings.json
index 87e89946d..d2eab2bf0 100644
--- a/web-app/src/locales/ja/settings.json
+++ b/web-app/src/locales/ja/settings.json
@@ -325,7 +325,7 @@
"sandboxLinux": "Linux 名前空間",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClawはサンドボックス隔離なしで実行されています。より安全な环境にするには、WindowsでWSL2を有効にするか、macOS Tahoeにアップデートしてください。",
+ "securityAdvisory": "OpenClawはサンドボックス隔離なしで実行されています。より安全な環境にするには、Dockerを有効にしてOpenClawをコンテナで実行してください。",
"learnMore": "詳細",
"logViewer": "サンドボックスログ",
"noLogs": "ログがありません",
diff --git a/web-app/src/locales/pl/settings.json b/web-app/src/locales/pl/settings.json
index c2af99df6..23c77be2e 100644
--- a/web-app/src/locales/pl/settings.json
+++ b/web-app/src/locales/pl/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Przestrzenie nazw Linux",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw działa bez izolacji piaskownicy. Aby uzyskać lepsze bezpieczeństwo, włącz WSL2 (Windows) lub zaktualizuj do macOS Tahoe.",
+ "securityAdvisory": "OpenClaw działa bez izolacji piaskownicy. Aby uzyskać lepsze bezpieczeństwo, włącz Docker, aby uruchomić OpenClaw w kontenerze.",
"learnMore": "Dowiedz się więcej",
"logViewer": "Logi piaskownicy",
"noLogs": "Brak logów",
diff --git a/web-app/src/locales/pt-BR/settings.json b/web-app/src/locales/pt-BR/settings.json
index 0979a61d8..be31917e2 100644
--- a/web-app/src/locales/pt-BR/settings.json
+++ b/web-app/src/locales/pt-BR/settings.json
@@ -360,7 +360,7 @@
"sandboxLinux": "Namespaces Linux",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw está sendo executado sem isolamento de sandbox. Para maior segurança, ative o WSL2 (Windows) ou atualize para o macOS Tahoe.",
+ "securityAdvisory": "OpenClaw está sendo executado sem isolamento de sandbox. Para maior segurança, ative o Docker para executar o OpenClaw em um contêiner.",
"learnMore": "Saiba mais",
"logViewer": "Logs do Sandbox",
"noLogs": "Sem logs disponíveis",
diff --git a/web-app/src/locales/ru/settings.json b/web-app/src/locales/ru/settings.json
index 405f63aa9..5b6097223 100644
--- a/web-app/src/locales/ru/settings.json
+++ b/web-app/src/locales/ru/settings.json
@@ -368,7 +368,7 @@
"sandboxLinux": "Пространства имён Linux",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw работает без изоляции песочницы. Для лучшей безопасности включите WSL2 (Windows) или обновитесь до macOS Tahoe.",
+ "securityAdvisory": "OpenClaw работает без изоляции песочницы. Для лучшей безопасности включите Docker для запуска OpenClaw в контейнере.",
"learnMore": "Узнать больше",
"logViewer": "Логи песочницы",
"noLogs": "Нет логов",
diff --git a/web-app/src/locales/vn/settings.json b/web-app/src/locales/vn/settings.json
index 325446ab4..b1d3ecd0c 100644
--- a/web-app/src/locales/vn/settings.json
+++ b/web-app/src/locales/vn/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Linux Namespaces",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw đang chạy không có sandbox. Để bảo mật tốt hơn, hãy bật WSL2 (Windows) hoặc cập nhật lên macOS Tahoe.",
+ "securityAdvisory": "OpenClaw đang chạy không có sandbox. Để bảo mật tốt hơn, hãy bật Docker để chạy OpenClaw trong container.",
"learnMore": "Tìm hiểu thêm",
"logViewer": "Logs Sandbox",
"noLogs": "Không có logs",
diff --git a/web-app/src/locales/zh-CN/settings.json b/web-app/src/locales/zh-CN/settings.json
index e6f8dae77..669cd485a 100644
--- a/web-app/src/locales/zh-CN/settings.json
+++ b/web-app/src/locales/zh-CN/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Linux 命名空间",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw 正在无沙箱隔离的情况下运行。为了更好的安全性,请在 Windows 上启用 WSL2 或更新到 macOS Tahoe。",
+ "securityAdvisory": "OpenClaw 正在无沙箱隔离的情况下运行。为了更好的安全性,请启用 Docker 以在容器中运行 OpenClaw。",
"learnMore": "了解更多",
"logViewer": "沙箱日志",
"noLogs": "没有日志",
diff --git a/web-app/src/locales/zh-TW/settings.json b/web-app/src/locales/zh-TW/settings.json
index 2b50377f4..fc930367c 100644
--- a/web-app/src/locales/zh-TW/settings.json
+++ b/web-app/src/locales/zh-TW/settings.json
@@ -328,7 +328,7 @@
"sandboxLinux": "Linux 命名空間",
"sandboxWsl2": "WSL2",
"sandboxDocker": "Docker",
- "securityAdvisory": "OpenClaw 正在無沙箱隔離的情況下執行。為了更好的安全性,請在 Windows 上啟用 WSL2 或更新到 macOS Tahoe。",
+ "securityAdvisory": "OpenClaw 正在無沙箱隔離的情況下執行。為了更好的安全性,請啟用 Docker 以在容器中執行 OpenClaw。",
"learnMore": "了解更多",
"logViewer": "沙箱日誌",
"noLogs": "沒有日誌",
diff --git a/web-app/src/routes/settings/remote-access.tsx b/web-app/src/routes/settings/remote-access.tsx
index 1c407c715..21580e0f7 100644
--- a/web-app/src/routes/settings/remote-access.tsx
+++ b/web-app/src/routes/settings/remote-access.tsx
@@ -369,7 +369,7 @@ function RemoteAccess() {
<div className="flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3">
<IconAlertTriangle className="h-5 w-5 text-yellow-500 shrink-0 mt-0.5" />
<p className="text-sm text-yellow-600 dark:text-yellow-400">
- {t('settings:securityAdvisory')}
+ {t('settings:remoteAccess.securityAdvisory')}
</p>
</div>
)}