feat(matrix): implement !reset via new platform_chat_id
Instead of calling a /reset endpoint on platform-agent, !reset now generates a new thread_id (platform_chat_id) for the room. The old WebSocket connection is closed and the next message creates a fresh context automatically. No platform changes required.
This commit is contained in:
parent
4a5260ca79
commit
73c472ecc4
4 changed files with 45 additions and 46 deletions
|
|
@ -10,6 +10,7 @@ from adapter.matrix.handlers.confirm import make_handle_cancel, make_handle_conf
|
|||
from adapter.matrix.handlers.context_commands import (
|
||||
make_handle_context,
|
||||
make_handle_load,
|
||||
make_handle_reset,
|
||||
make_handle_save,
|
||||
)
|
||||
from adapter.matrix.handlers.settings import (
|
||||
|
|
@ -43,7 +44,7 @@ def register_matrix_handlers(
|
|||
dispatcher.register(IncomingCommand, "archive", make_handle_archive(client, store))
|
||||
dispatcher.register(IncomingCommand, "help", handle_help)
|
||||
dispatcher.register(IncomingCommand, "settings", handle_settings)
|
||||
dispatcher.register(IncomingCommand, "reset", handle_settings)
|
||||
dispatcher.register(IncomingCommand, "reset", make_handle_reset(store, prototype_state) if prototype_state is not None else handle_settings)
|
||||
dispatcher.register(IncomingCommand, "settings_skills", handle_settings_skills)
|
||||
dispatcher.register(IncomingCommand, "settings_connectors", handle_settings_connectors)
|
||||
dispatcher.register(IncomingCommand, "settings_soul", handle_settings_soul)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue