mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 12:10:45 +08:00
Gate group speaker isolation to shared chat sessions only.
Per-user group sessions (user_in_chat) already isolate history; keep Sender tags and focus hints only when session_scope=chat (legacy shared __group__ transcripts). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e91e4fe773
commit
9bbac6c0b8
5 changed files with 50 additions and 21 deletions
|
|
@ -486,11 +486,18 @@ class OclawGateway:
|
|||
|
||||
@staticmethod
|
||||
def _group_focus_system_hint(msg: StandardMessage, lang: str) -> str:
|
||||
"""Only for shared group transcripts (legacy session_scope=chat / __group__)."""
|
||||
md = msg.metadata if isinstance(msg.metadata, dict) else {}
|
||||
if not bool(md.get("is_group")):
|
||||
return ""
|
||||
from runtime.orchestration.group_ingest import build_group_focus_instruction
|
||||
from runtime.orchestration.group_ingest import (
|
||||
build_group_focus_instruction,
|
||||
normalize_group_session_scope,
|
||||
)
|
||||
|
||||
scope = normalize_group_session_scope(md.get("group_session_scope"))
|
||||
if scope != "chat":
|
||||
return ""
|
||||
return str(build_group_focus_instruction(lang=lang) or "").strip()
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue