首页/文档/旧版 Rust 审计 0.7.6
文档全文

DeepSeek TUI 旧版 Rust 审计 0.7.6指南

旧版 Rust 审计记录的是更早时期的质量和风险快照,只有在你明确需要历史工程背景时才真正有价值。

上游源文件:LEGACY_RUST_AUDIT_0_7_6.md站内直接可读原文保留在下方

这份文档真正覆盖什么

旧版 Rust 审计记录的是更早时期的质量和风险快照,只有在你明确需要历史工程背景时才真正有价值。

怎么用这页

  • 先看右侧目录,直接跳到你当前最关心的小节。
  • 如果你只是来解决具体问题,优先读正文里的相关标题,再回站内对应 hub。
  • 如果你要核对原始来源,可以直接打开 GitHub 原文链接。

上游文档原文(英文)

v0.7.6 Legacy Rust Audit

Status date: 2026-04-29

This audit is deliberately non-destructive. No compatibility code is removed in v0.7.6 unless tests prove public CLI, saved-session, tool-schema, and documented command paths no longer depend on it.

Summary

SurfaceOwner moduleCurrent consumerReference checkCompatibility reasonCurrent warningRecommended action
Legacy MCP sync API (McpServerInput, list, add, remove, call_tool, load_legacy)crates/tui/src/mcp.rsNot wired into current /mcp command path; retained behind #[allow(dead_code)]Direct Rust references and current MCP command path inspected; saved/config JSON compatibility still needs a dedicated smokePreserves old JSON shape including mcpServers alias and sync call helpers while the async MCP manager is the active pathCode TODO onlyGate behind an explicit legacy module or remove after CLI/runtime parity tests prove no caller uses it. Tracked by #218.
Legacy prompt constants/functions (AGENT_PROMPT, YOLO_PROMPT, PLAN_PROMPT, base_system_prompt, normal_system_prompt, etc.)crates/tui/src/prompts.rsTests and older callers that still import prompt constants directlyDirect Rust references remain; public-crate and older harness imports are not proven absentLayered prompt API replaced monolithic prompts, but older call sites may still compile against constantsNoneKeep for v0.7.6; add deprecation annotations only after internal callers are migrated. Tracked by #219.
/compact slash command positioningcrates/tui/src/commands/mod.rsPublic slash-command registry and help overlayPublic command registry/docs path still references itCurrent cycle/seam policy prefers restart/cycle flows, but users may still run /compact manuallyDescription says legacy and points at cycle restartKeep as a manual compatibility command; do not remove until context/token issues are resolved.
todo_* compatibility toolscrates/tui/src/tools/todo.rsTool registry/model calls that still use todo_add, todo_update, todo_list, todo_writeTool registry compatibility and saved tool-call risk remainchecklist_* is canonical, but old tool names may appear in saved prompts, traces, or model priorsMetadata marks compat_alias: true; descriptions say compatibility aliasAdd explicit deprecation metadata with target version, then remove only after tool-schema migration evidence. Tracked by #220.
Deprecated sub-agent alias tools (spawn_agent, send_input, delegate aliases)crates/tui/src/tools/subagent/mod.rsTool registry and model/tool-call compatibilityTool registry compatibility and saved tool-call risk remainCanonical names are agent_spawn, agent_send_input, etc.; alias names preserve older tool-call compatibility_deprecation metadata and tracing warn; removal target is v0.8.0Keep through v0.7.x; removal already has metadata. Tracked by #221.
Legacy root/provider TOML api_key compatibilitycrates/tui/src/config.rs, crates/config/src/lib.rsConfig resolver; users with existing api_key in config filesPublic config loading and docs still mention migration behaviorKeyring migration is preferred, but breaking existing configs would block startup/authTracing warnings point to deepseek auth set / deepseek auth migrateKeep; warnings are user-actionable. Removal should wait for a migration command and release-note window.
Model alias canonicalization (deepseek-chat, deepseek-reasoner, older V3/R1 aliases)crates/tui/src/config.rs, crates/config/src/lib.rsConfig/env/model picker normalizationPublic docs and existing configs may still use aliasesPreserves old documented DeepSeek aliases and maps them to deepseek-v4-flashSilent alias by designKeep; removing aliases would break configs without meaningful benefit.
Deprecated palette constants and aliasescrates/tui/src/palette.rs, crates/tui/tests/palette_audit.rsExisting call sites plus audit testsPalette audit enforces the remaining allowlistSemantic aliases are preferred, but old constants exist to prevent broad style churnPalette audit blocks direct deprecated uses outside allowlistKeep aliases; continue moving call sites to semantic roles opportunistically.

Follow-Up Removal Candidates

These are not safe to remove in v0.7.6:

  1. #218 Legacy MCP sync API: requires a call-graph check and explicit CLI/runtime parity tests for /mcp, deepseek mcp, and MCP server validation flows.
  2. #219 Legacy prompt constants/functions: requires proving no public crate or older test harness imports them.
  3. #220 todo_* tool aliases: requires deprecation metadata and a saved-trace/tool-schema migration window.
  4. #221 Deprecated sub-agent alias tools: removal target is already encoded as v0.8.0, but the actual removal should be tracked and tested separately.

Verification Checklist

Before removing any compatibility surface:

  1. Search direct Rust references with rg.
  2. Search docs and README command examples.
  3. Run workspace tests with all features.
  4. Run a saved-session/tool-call compatibility smoke if the surface affects tool schemas or persisted history.
  5. Keep a release-note entry and, for user-visible config/tool changes, a migration hint for at least one minor release.

回到顶部