test+fix: rewrite migrated-platform test imports; fix connected-check discovery, telegram extra precedence, prompt_choice import

- Sweep test imports gateway.platforms.{telegram,feishu,matrix,dingtalk,whatsapp}
  (+ telegram_network / feishu satellites) -> plugins.platforms.<x>.adapter
  across ~68 test files; both 'from X import' and 'from gateway.platforms import X'
  forms.
- _is_platform_connected now forces discover_plugins() before the registry
  lookup so get_connected_platforms() works on directly-constructed GatewayConfig
  (fixes dingtalk-recognised tests after its checker moved to the plugin).
- telegram _apply_yaml_config no longer re-emits generic shared-config keys
  (reply_prefix etc.) that _merge_platform_map already merges with top-level
  precedence, while still passing through telegram-specific extras (base_url).
- prompt_choice lives in hermes_cli.setup, not cli_output — fixed the import in
  feishu/dingtalk interactive_setup and the test patch target.
- test_setup_feishu rewritten to drive interactive_setup via the plugin.
This commit is contained in:
teknium1 2026-06-07 05:27:58 -07:00
parent 736ffb3bc1
commit f080fedf13
No known key found for this signature in database
66 changed files with 669 additions and 648 deletions

View file

@ -5300,9 +5300,9 @@ def interactive_setup() -> None:
_PLATFORMS["feishu"] dict. CLI helpers are lazy-imported.
"""
from hermes_cli.config import get_env_value, save_env_value
from hermes_cli.setup import prompt_choice
from hermes_cli.cli_output import (
prompt,
prompt_choice,
prompt_yes_no,
print_header,
print_info,