mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 14:30:45 +08:00
Steer WhatsApp ops short intents and clarify busy/CLI failures.
Inject English recipe hints for fiber/offline/excel/continue, ack the first queued follow-up, localize gate copy, and classify execManagedNe errors so agents stop blind retries. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
47fd83597e
commit
f1d025ed60
8 changed files with 323 additions and 11 deletions
|
|
@ -478,6 +478,12 @@ class OclawGateway:
|
|||
|
||||
return str(build_channel_file_delivery_instruction(lang=lang) or "").strip()
|
||||
|
||||
@staticmethod
|
||||
def _ops_short_intent_system_hint(msg: StandardMessage, lang: str) -> str:
|
||||
from runtime.application.gateway.ops_short_intent import maybe_ops_short_intent_system_hint
|
||||
|
||||
return str(maybe_ops_short_intent_system_hint(text=str(msg.text or ""), lang=lang) or "").strip()
|
||||
|
||||
@staticmethod
|
||||
def _tabular_query_system_hint(lang: str) -> str:
|
||||
limits = OclawGateway._tabular_limits_from_config()
|
||||
|
|
@ -1174,6 +1180,10 @@ class OclawGateway:
|
|||
ch_hint = self._channel_file_delivery_system_hint(lang)
|
||||
if ch_hint:
|
||||
sys_prompt = f"{sys_prompt}\n\n{ch_hint}".strip()
|
||||
if str(manager_specialist or requested_specialist or "").strip().lower() == "ops":
|
||||
intent_hint = self._ops_short_intent_system_hint(msg, lang)
|
||||
if intent_hint:
|
||||
sys_prompt = f"{sys_prompt}\n\n{intent_hint}".strip()
|
||||
if self._has_tabular_ref_attachments(msg):
|
||||
sys_prompt = f"{sys_prompt}\n\n{self._tabular_query_system_hint(lang)}".strip()
|
||||
if self._has_text_ref_attachments(msg):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue