feat(MAT-46): Extract and post document annotations after voice calls

When a voice call ends and a document was loaded in the room, the bot
now analyzes the transcript for document-specific changes/corrections
and posts them as a structured "Dokument-Aenderungen" message. Returns
nothing if no document changes were discussed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-23 20:18:00 +02:00
parent a4b5c5da86
commit de66ba5eea
2 changed files with 74 additions and 0 deletions

View File

@@ -498,6 +498,17 @@ class VoiceSession:
"""Return the call transcript as a list of {role, text} dicts."""
return list(self._transcript)
def get_document_context(self) -> str | None:
"""Return the document context loaded for this call, if any."""
return self._document_context
def get_confluence_page_id(self) -> str | None:
"""Return the active Confluence page ID, if any."""
if not self._document_context:
return None
ids = re.findall(r'confluence_page_id:(\d+)', self._document_context)
return ids[0] if ids else None
async def _run(self):
try:
user_id = self.nio_client.user_id