Update version to 0.1.37 and improve chat session handling with session_id in payloads

This commit is contained in:
techartdev
2026-02-20 22:55:29 +02:00
parent bfd973bbff
commit 9ed13e4e96
6 changed files with 13 additions and 3 deletions
+6
View File
@@ -2,6 +2,12 @@
All notable changes to the OpenClaw Home Assistant Integration will be documented in this file. All notable changes to the OpenClaw Home Assistant Integration will be documented in this file.
## [0.1.37] - 2026-02-20
### Fixed
- Improved conversation continuity by sending `session_id` in chat completion JSON payloads (in addition to `X-Session-Id` header), for both regular and streaming requests.
- Reduces cases where the gateway treats each message as a new conversation when custom headers are ignored upstream.
## [0.1.36] - 2026-02-20 ## [0.1.36] - 2026-02-20
### Fixed ### Fixed
+1 -1
View File
@@ -78,7 +78,7 @@ _CARD_PATH = Path(__file__).parent / "www" / _CARD_FILENAME
# URL at which the card JS is served (registered via register_static_path) # URL at which the card JS is served (registered via register_static_path)
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}" _CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
# Versioned URL used for Lovelace resource registration to avoid stale browser cache # Versioned URL used for Lovelace resource registration to avoid stale browser cache
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.36" _CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.37"
OpenClawConfigEntry = ConfigEntry OpenClawConfigEntry = ConfigEntry
+4
View File
@@ -191,6 +191,8 @@ class OpenClawApiClient:
"messages": messages, "messages": messages,
"stream": False, "stream": False,
} }
if session_id:
payload["session_id"] = session_id
if model: if model:
payload["model"] = model payload["model"] = model
@@ -249,6 +251,8 @@ class OpenClawApiClient:
"messages": messages, "messages": messages,
"stream": True, "stream": True,
} }
if session_id:
payload["session_id"] = session_id
if model: if model:
payload["model"] = model payload["model"] = model
+1 -1
View File
@@ -8,7 +8,7 @@
"iot_class": "local_polling", "iot_class": "local_polling",
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues", "issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
"requirements": [], "requirements": [],
"version": "0.1.36", "version": "0.1.37",
"dependencies": ["conversation"], "dependencies": ["conversation"],
"after_dependencies": ["hassio", "lovelace"] "after_dependencies": ["hassio", "lovelace"]
} }
+1 -1
View File
@@ -1,7 +1,7 @@
(async () => { (async () => {
try { try {
if (!customElements.get("openclaw-chat-card")) { if (!customElements.get("openclaw-chat-card")) {
const src = "/openclaw/openclaw-chat-card.js?v=0.1.36"; const src = "/openclaw/openclaw-chat-card.js?v=0.1.37";
console.info("OpenClaw loader importing", src); console.info("OpenClaw loader importing", src);
await import(src); await import(src);
} }