feat: ::hilfe um Core-Befehle ergänzt (continue, /reset, /compress)
- inline_commands.py: Sektion 0 'Core-Befehle' in build_help_text() - docs/Archivar-Funktionsbeschreibung-v8.5.md: Section 6.0 Core-Befehle - test_r5_inline_commands.py: Assertions für Core-Befehle
This commit is contained in:
@@ -242,6 +242,16 @@ Whitespace-Validierung: Keywords mit internen Leerzeichen werden abgelehnt (`if
|
|||||||
|
|
||||||
Rocket.Chat unterstützt kein `/`-Prefix; deshalb verwendet das Plugin `::` als alternatives Command-Präfix. Registriert in `adapter.py` (`self._inline_commands.register(...)`).
|
Rocket.Chat unterstützt kein `/`-Prefix; deshalb verwendet das Plugin `::` als alternatives Command-Präfix. Registriert in `adapter.py` (`self._inline_commands.register(...)`).
|
||||||
|
|
||||||
|
### 6.0 Core-Befehle (Hermes Core, immer verfügbar)
|
||||||
|
|
||||||
|
Diese Befehle werden direkt vom Hermes-Agenten verarbeitet — unabhängig vom Plugin:
|
||||||
|
|
||||||
|
| Befehl | Wirkung |
|
||||||
|
|----------------|-------------------------------------------------------------------------|
|
||||||
|
| `continue` | Agent fortsetzen nach leerer Antwort / Stream-Drop |
|
||||||
|
| `/reset` | Session zurücksetzen (Chat-Kontext löschen, frische Session). In RC: `::reset` |
|
||||||
|
| `/compress` | Kontext manuell komprimieren (Token sparen bei langen Sessions). In RC: `::compress` |
|
||||||
|
|
||||||
### 6.1 Standard-Hermes-Befehle
|
### 6.1 Standard-Hermes-Befehle
|
||||||
|
|
||||||
| Befehl | Wirkung |
|
| Befehl | Wirkung |
|
||||||
|
|||||||
@@ -235,6 +235,31 @@ def build_help_text(
|
|||||||
"",
|
"",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# ── Sektion 0: Core-Befehle (Hermes Core, immer verfügbar) ────────
|
||||||
|
lines.append("### ⚙️ Core-Befehle")
|
||||||
|
lines.append("")
|
||||||
|
lines.append(
|
||||||
|
"Diese Befehle werden direkt vom Hermes-Agenten verarbeitet "
|
||||||
|
"und sind immer verfügbar — unabhängig vom Plugin:"
|
||||||
|
)
|
||||||
|
lines.append("")
|
||||||
|
lines.append(
|
||||||
|
"- **continue** — Agent fortsetzen nach leerer Antwort / Stream-Drop. "
|
||||||
|
"Einfach `continue` in den Chat schreiben, der Agent macht weiter."
|
||||||
|
)
|
||||||
|
lines.append(
|
||||||
|
"- **/reset** — Session zurücksetzen. "
|
||||||
|
"Löscht den gesamten Chat-Kontext und startet eine frische Session. "
|
||||||
|
"In Rocket.Chat als `::reset` nutzbar."
|
||||||
|
)
|
||||||
|
lines.append(
|
||||||
|
"- **/compress** — Kontext manuell komprimieren. "
|
||||||
|
"Verdichtet den Chat-Verlauf, um Token zu sparen und die "
|
||||||
|
"Antwortqualität bei langen Sessions zu erhalten. "
|
||||||
|
"In Rocket.Chat als `::compress` nutzbar."
|
||||||
|
)
|
||||||
|
lines.append("")
|
||||||
|
|
||||||
# ::-Befehle nach Kategorie gruppieren
|
# ::-Befehle nach Kategorie gruppieren
|
||||||
by_category: Dict[str, List[Dict[str, Any]]] = {}
|
by_category: Dict[str, List[Dict[str, Any]]] = {}
|
||||||
for name, cmd in registry.get_commands().items():
|
for name, cmd in registry.get_commands().items():
|
||||||
|
|||||||
@@ -226,6 +226,10 @@ class TestBuildHelpText:
|
|||||||
registry.register("sethome", dummy, "Setzt Heimatraum", category="Raum")
|
registry.register("sethome", dummy, "Setzt Heimatraum", category="Raum")
|
||||||
|
|
||||||
text = build_help_text(registry)
|
text = build_help_text(registry)
|
||||||
|
assert "Core-Befehle" in text
|
||||||
|
assert "continue" in text
|
||||||
|
assert "/reset" in text
|
||||||
|
assert "/compress" in text
|
||||||
assert "::hilfe" in text
|
assert "::hilfe" in text
|
||||||
assert "::status" in text
|
assert "::status" in text
|
||||||
assert "::sethome" in text
|
assert "::sethome" in text
|
||||||
@@ -254,6 +258,8 @@ class TestBuildHelpText:
|
|||||||
registry = InlineCommandRegistry()
|
registry = InlineCommandRegistry()
|
||||||
text = build_help_text(registry)
|
text = build_help_text(registry)
|
||||||
assert "Rocket.Chat Plugin" in text
|
assert "Rocket.Chat Plugin" in text
|
||||||
|
assert "Core-Befehle" in text
|
||||||
|
assert "continue" in text
|
||||||
assert "Natürliche Sprach-Befehle" in text
|
assert "Natürliche Sprach-Befehle" in text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user