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

@@ -44,7 +44,6 @@ import {
import { WebSearchRun } from "@/components/thread/activity/WebSearchRun";
import { webSearchRunsByTraceLine } from "@/components/thread/activity/web-search-model";
import {
isAgentActivityMember,
isReasoningOnlyAssistant,
} from "@/lib/activity-timeline";
import { useFileEditDisplayMode } from "@/hooks/useFileEditDisplayMode";
@@ -68,8 +67,6 @@ import type {
const EMPTY_CLI_APPS: CliAppInfo[] = [];
const EMPTY_MCP_PRESETS: McpPresetInfo[] = [];
export { isAgentActivityMember };
interface ActivityCounts {
reasoningSteps: number;
toolCalls: number;