ctx-purge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Context Mode Purge

Context Mode 清理操作

Permanently deletes ALL session data for this project: knowledge base, session events, analytics, and stats.
永久删除此项目的所有会话数据:知识库、会话事件、分析数据和统计信息。

Instructions

操作说明

  1. Warn the user: This is irreversible. Everything will be deleted:
    • FTS5 knowledge base (all indexed content from
      ctx_index
      ,
      ctx_fetch_and_index
      ,
      ctx_batch_execute
      )
    • Session events DB (analytics, metadata, resume snapshots)
    • Session events markdown file
    • In-memory session stats
  2. Call the
    mcp__context-mode__ctx_purge
    MCP tool with
    confirm: true
    .
  3. Report the result to the user — the response lists exactly what was deleted.
  1. 向用户发出警告:此操作不可撤销。所有内容都将被删除:
    • FTS5知识库(来自
      ctx_index
      ctx_fetch_and_index
      ctx_batch_execute
      的所有已索引内容)
    • 会话事件数据库(分析数据、元数据、恢复快照)
    • 会话事件Markdown文件
    • 内存中的会话统计数据
  2. 调用带有
    confirm: true
    参数的
    mcp__context-mode__ctx_purge
    MCP工具。
  3. 向用户报告结果——响应会准确列出已删除的内容。

When to Use

使用场景

  • When the KB contains stale or incorrect content polluting search results.
  • When switching between unrelated projects in the same session.
  • When you want a completely fresh start for this project.
  • 当知识库包含过时或错误内容,污染搜索结果时。
  • 在同一会话中切换不相关项目时。
  • 希望为该项目完全重新开始时。

Important

重要提示

  • ctx_purge
    is the only way to delete session data. No other mechanism exists.
  • ctx_stats
    is read-only — shows statistics only.
  • /clear
    and
    /compact
    do NOT affect any context-mode data.
  • There is no undo. Re-index content if you need it again.
  • ctx_purge
    是删除会话数据的唯一方式,不存在其他机制。
  • ctx_stats
    是只读的——仅显示统计信息。
  • /clear
    /compact
    不会影响任何Context Mode数据。
  • 此操作无法撤销。如果需要重新使用内容,请重新索引。