unique_toolkit 2026.30.0.dev6__py3-none-any.whl → 2026.30.0.dev7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,16 @@ class CancellationWatcher:
57
57
  def on_cancellation(self) -> TypedEventBus[CancellationEvent]:
58
58
  return self._bus
59
59
 
60
+ @property
61
+ def assistant_message_id(self) -> str:
62
+ return self._assistant_message_id
63
+
64
+ def set_assistant_message_id(self, message_id: str) -> None:
65
+ """Retarget polling to the active assistant segment."""
66
+ if self._cancelled:
67
+ return
68
+ self._assistant_message_id = message_id
69
+
60
70
  async def check_cancellation_async(self) -> bool:
61
71
  """Poll the DB once. Returns ``True`` if the message was cancelled.
62
72
 
@@ -200,6 +200,11 @@ class ChatService(ChatServiceDeprecated):
200
200
  """Cancellation watcher for this chat session."""
201
201
  return self._cancellation_watcher
202
202
 
203
+ def _set_assistant_message_id(self, message_id: str) -> None:
204
+ """Point active assistant operations and cancellation polling at *message_id*."""
205
+ self._assistant_message_id = message_id
206
+ self._cancellation_watcher.set_assistant_message_id(message_id)
207
+
203
208
  @property
204
209
  def elicitation(self) -> ElicitationService:
205
210
  """Get the ElicitationService for this chat session."""
@@ -515,8 +520,7 @@ class ChatService(ChatServiceDeprecated):
515
520
  response_turn_id=response_turn_id,
516
521
  segment_index=segment_index,
517
522
  )
518
- # Update the assistant message id
519
- self._assistant_message_id = chat_message.id or "unknown"
523
+ self._set_assistant_message_id(chat_message.id or "unknown")
520
524
  return chat_message
521
525
 
522
526
  async def create_assistant_message_async(
@@ -564,8 +568,7 @@ class ChatService(ChatServiceDeprecated):
564
568
  response_turn_id=response_turn_id,
565
569
  segment_index=segment_index,
566
570
  )
567
- # Update the assistant message id
568
- self._assistant_message_id = chat_message.id or "unknown"
571
+ self._set_assistant_message_id(chat_message.id or "unknown")
569
572
  return chat_message
570
573
 
571
574
  def create_user_message(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-toolkit
3
- Version: 2026.30.0.dev6
3
+ Version: 2026.30.0.dev7
4
4
  Summary:
5
5
  Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
6
6
  Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
@@ -245,7 +245,7 @@ unique_toolkit/app/unique_settings.py,sha256=-bYvxwCw_DvhSViHXgc-pYoNboxhHB8VG2L
245
245
  unique_toolkit/app/verification.py,sha256=GxFFwcJMy25fCA_Xe89wKW7bgqOu8PAs5y8QpHF0GSc,3861
246
246
  unique_toolkit/app/webhook.py,sha256=evpxLDnvz7P3D7-TV1XBkl8WcoldXpjOkw3tvFRxHr0,2368
247
247
  unique_toolkit/chat/__init__.py,sha256=N9RubtxWN7UF0DlxP7YgeNTgjjk6p7AwkbGaVvuZCv0,938
248
- unique_toolkit/chat/cancellation.py,sha256=HvGZK-daCMSr0M0AnvMY3EBPH1N_UqQPfrbTjwr8owk,5645
248
+ unique_toolkit/chat/cancellation.py,sha256=k5HMjpeBmofIiInwq5TjOR_5k91oq1bWG00lJXZSoJ0,5970
249
249
  unique_toolkit/chat/constants.py,sha256=05kq6zjqUVB2d6_P7s-90nbljpB3ryxwCI-CAz0r2O4,83
250
250
  unique_toolkit/chat/deprecated/service.py,sha256=8_XoopUWHT396Z_5gwMmsI6v4NGVgQirSJCYUW4Gx8c,9339
251
251
  unique_toolkit/chat/functions.py,sha256=h-8MEhDpBbTRZc3A9JoDGMm-so3BWDdV6gv6NpXYIOg,54678
@@ -395,7 +395,7 @@ unique_toolkit/monitoring/middleware.py,sha256=JNh5v_INAkexuLtXhCG9n5n2t6Pnf8ZdP
395
395
  unique_toolkit/monitoring/registry.py,sha256=8r9jqaQoRHZveGRZe_GQvBzvQpmUV4cpw8Ej1ssDIdE,5056
396
396
  unique_toolkit/protocols/support.py,sha256=x5edzbBmKAUuvm3oLFh52gkgQsqR5LU7M0t8RHK0DZk,5161
397
397
  unique_toolkit/services/__init__.py,sha256=b9Wl7Wvz1JmZDbDexIZzBoXZ0wscXuczGAH8LoL-Qak,572
398
- unique_toolkit/services/chat_service.py,sha256=Y-Eoxelp02eLVm3gv6_aqeTLtCsAJ6s23XuQRsade1A,97493
398
+ unique_toolkit/services/chat_service.py,sha256=MAueuSfATFJH8aSeNxbnBI_Ne1UgYUIk3i5F1f2ALFQ,97692
399
399
  unique_toolkit/services/factory.py,sha256=7gNeanyHkgX23Iz7RMCQTCkE9gI5asCI11nXxM0jjx4,9832
400
400
  unique_toolkit/services/knowledge_base.py,sha256=a9itNRxIrGDIuXkLiTLBsA-m2ncy8F8DwCLCXtWm_GY,43446
401
401
  unique_toolkit/short_term_memory/__init__.py,sha256=2mI3AUrffgH7Yt-xS57EGqnHf7jnn6xquoKEhJqk3Wg,185
@@ -406,6 +406,6 @@ unique_toolkit/short_term_memory/service.py,sha256=2JMBEBn6GoyK-a0xvdcWpPft-3C74
406
406
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
407
407
  unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
408
408
  unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
409
- unique_toolkit-2026.30.0.dev6.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
410
- unique_toolkit-2026.30.0.dev6.dist-info/METADATA,sha256=mEqu4--XWmzlsENu8qaH8Hcg_TyeP6Rfc0fblZI0cpQ,7426
411
- unique_toolkit-2026.30.0.dev6.dist-info/RECORD,,
409
+ unique_toolkit-2026.30.0.dev7.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
410
+ unique_toolkit-2026.30.0.dev7.dist-info/METADATA,sha256=tf1qkimmD41c7yoIbUFNmKEgYkiJx-zSyOA1trTxzgQ,7426
411
+ unique_toolkit-2026.30.0.dev7.dist-info/RECORD,,