Update version to 0.1.44 and fix chat-card settings sync, wake-word disable reliability, and browser voice listening status

This commit is contained in:
techartdev
2026-02-21 00:51:06 +02:00
parent dfb4718e09
commit 4aba4bd18d
5 changed files with 47 additions and 8 deletions
@@ -350,7 +350,7 @@ class OpenClawChatCard extends HTMLElement {
});
}
this._wakeWordEnabled = !!result?.wake_word_enabled;
this._wakeWordEnabled = this._coerceBoolean(result?.wake_word_enabled, false);
this._wakeWord = (result?.wake_word || "hey openclaw").toString().trim().toLowerCase();
this._allowBraveWebSpeechIntegration = !!result?.allow_brave_webspeech;
this._voiceProviderIntegration =
@@ -543,6 +543,17 @@ class OpenClawChatCard extends HTMLElement {
return languageMap[cleaned] || `${cleaned}-${cleaned.toUpperCase()}`;
}
_coerceBoolean(value, fallback = false) {
if (typeof value === "boolean") return value;
if (typeof value === "number") return value !== 0;
if (typeof value === "string") {
const normalized = value.trim().toLowerCase();
if (["true", "1", "yes", "on"].includes(normalized)) return true;
if (["false", "0", "no", "off", ""].includes(normalized)) return false;
}
return fallback;
}
_getSpeechRecognitionLanguage() {
if (this._speechLangOverride) {
return this._speechLangOverride;
@@ -1024,7 +1035,9 @@ class OpenClawChatCard extends HTMLElement {
this._recognition.continuous = this._isVoiceMode;
this._recognition.lang = this._getSpeechRecognitionLanguage();
this._voiceStatus = this._isVoiceMode
? `Listening (${this._recognition.lang}, wake word: ${this._wakeWord || "hey openclaw"})`
? this._wakeWordEnabled
? `Listening (${this._recognition.lang}, wake word: ${this._wakeWord || "hey openclaw"})`
: `Listening (${this._recognition.lang})`
: `Listening (${this._recognition.lang})…`;
this._recognition.onresult = (event) => {