跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    Adamkadaban

    Content Filter

    v0.1.1模型接入
    opencode-content-filter

    OpenCode plugin that surfaces provider content-filter finish reasons instead of leaving silent empty turns

    GitHub 星标

    0

    月装机量

    21

    近 7 天 2

    综合评分SCORE

    24.6

    生态多维模型

    最近提交

    2 个月前

    2026-06-08

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-content-filter@0.1.1"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    OpenCode plugin that makes provider content-filter finishes visible instead of leaving an apparently silent empty assistant turn.

    Install

    opencode plugin opencode-content-filter -g
    

    This installs the package globally and updates your opencode.json and tui.json automatically.

    Or manually:

    npm install -g opencode-content-filter
    

    Then add "opencode-content-filter" to the plugin array in both opencode.json and tui.json.

    For opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-content-filter"]
    }
    

    For tui.json:

    {
      "$schema": "https://opencode.ai/tui.json",
      "plugin": ["opencode-content-filter"]
    }
    

    Usage

    The plugin watches assistant messages for finish: "content-filter" without visible text.

    In the TUI, it shows an error toast naming the model that was blocked.

    In opencode run ..., it writes a clear warning to stderr and sets a non-zero exit code.

    Limitations

    The plugin reports content-filter finishes but cannot mutate persisted assistant message.error. For SDK and persistent transcript behavior, OpenCode core should still surface content-filter finish reasons as errors.

    License

    MIT