refactor: drop unreferenced dead code

Every removed symbol has no reference anywhere in the tree (Python AST and
TypeScript identifier scans over all tracked files, including tests, docs,
WebUI/TUI clients, and JSON/YAML data):

- nanobot/webui/settings_api.py: four aliases with no importer and no
  in-module use; the helpers that tests still import stay.
- nanobot/sdk/types.py: snapshot_from_payload had no caller since session
  restore moved to snapshot_from_session.
- nanobot/session/jsonl_migration.py: INTRODUCED_VERSION and
  LAST_SUPPORTED_RELEASE_LINE duplicated the module docstring.
- nanobot/providers/transcription.py: StepFunTranscriptionProvider._DEFAULT_URL
  was superseded by _resolve_stepfun_asr_url.
- nanobot/channels/whatsapp_agent/protocol.py: CODE_MISSING_AUTH is neither
  exported nor compared; validation still checks the wire value 190.
- webui/src/lib/canonical-run-snapshot.ts: canonicalRunSnapshot had no caller.
- webui/src/components/icons/product-icons.tsx: SendIcon and RunningTaskIcon
  are not rendered anywhere.
- webui/src/components/thread/AgentActivityCluster.tsx: drop an unused
  isAgentActivityMember re-export and its import.
- webui: drop the unused micromark-util-decode-string dependency.

Framework-dispatched code (Typer commands, pydantic validators, pytest hooks
and fixtures, channel runtime classes, ast visitor hooks) was excluded from
the scans, so the change removes only code nothing references.
This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-12 22:54:51 +08:00
1 parent eb8546c321
commit 25ed91ffeb
10 files changed
+1 -56

No files matched your search

-5
View File
@@ -31,14 +31,9 @@ RuntimeSurface = Literal["browser", "native"]
# Preserve established direct imports of focused helpers.
_docs_version = system.docs_version
_parse_bool = contracts.parse_bool
_query_first = contracts.query_first
_query_first_alias = contracts.query_first_alias
_query_has_alias = contracts.query_has_alias
_model_catalog_kind = models.model_catalog_kind
_oauth_provider_status = models.oauth_provider_status
_provider_requires_api_key = models.provider_requires_api_key
_reasoning_effort_values_for = models.reasoning_effort_values_for
_RUNTIME_CAPABILITIES = {