Update version to 0.1.43 and enhance conversation continuity with stable fallback session IDs
This commit is contained in:
@@ -92,7 +92,7 @@ _CARD_PATH = Path(__file__).parent / "www" / _CARD_FILENAME
|
||||
# URL at which the card JS is served (registered via register_static_path)
|
||||
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
|
||||
# Versioned URL used for Lovelace resource registration to avoid stale browser cache
|
||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.42"
|
||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.43"
|
||||
|
||||
OpenClawConfigEntry = ConfigEntry
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -107,7 +107,7 @@ class OpenClawConversationAgent(conversation.AbstractConversationAgent):
|
||||
coordinator: OpenClawCoordinator = entry_data["coordinator"]
|
||||
|
||||
message = user_input.text
|
||||
conversation_id = user_input.conversation_id or "default"
|
||||
conversation_id = self._resolve_conversation_id(user_input)
|
||||
assistant_id = "conversation"
|
||||
options = self.entry.options
|
||||
include_context = options.get(
|
||||
@@ -189,6 +189,22 @@ class OpenClawConversationAgent(conversation.AbstractConversationAgent):
|
||||
conversation_id=conversation_id,
|
||||
)
|
||||
|
||||
def _resolve_conversation_id(self, user_input: conversation.ConversationInput) -> str:
|
||||
"""Return conversation id from HA or a stable Assist fallback session key."""
|
||||
if user_input.conversation_id:
|
||||
return user_input.conversation_id
|
||||
|
||||
context = getattr(user_input, "context", None)
|
||||
user_id = getattr(context, "user_id", None)
|
||||
if user_id:
|
||||
return f"assist_user_{user_id}"
|
||||
|
||||
device_id = getattr(user_input, "device_id", None)
|
||||
if device_id:
|
||||
return f"assist_device_{device_id}"
|
||||
|
||||
return "assist_default"
|
||||
|
||||
async def _get_response(
|
||||
self,
|
||||
client: OpenClawApiClient,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"iot_class": "local_polling",
|
||||
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
|
||||
"requirements": [],
|
||||
"version": "0.1.42",
|
||||
"version": "0.1.43",
|
||||
"dependencies": ["conversation"],
|
||||
"after_dependencies": ["hassio", "lovelace"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user