Skip to content

[feature] 请求 dsh 上游:Web 设置页提供「禁用内置自动压缩」开关(拆分自 #1772) #2001

Closed

Description

@ranxianglei

来源: #1772 分析「dsh.bundle.patch.yml 禁用自动压缩在 web profile 下静默失效」时发现(本条由 owner 决定从 #1772 拆出)。

背景与根因(已在 dsh 0.2.0-rc.2 实测验证)

  • bundles 含 @deepseek-ai/dsh-web-app(浏览器 GUI)的 profile 中,dsh 原生自动压缩的运行实例位于 agent preset 组合内部(preset-standard.config.plugins 里的 compaction-basic 行);宿主平面的同名行已被 web-app 自身 disabled: true。
  • @deepseek-ai/dsh-app-boot 的 applyEntryPatches 只按 id 索引顶层条目 + 真 group(group: true 且 config 为数组)的子项;preset 行的 config.plugins 是普通 config 数据,任何 patch 层都无法按 id 命中其中的嵌套行。于是第三方(如 billion-context)无法经 patch 关闭自动压缩——现有唯一手工办法是在 $DSH_HOME/profiles/<profile>/cordis.patch.yml 里覆盖 preset-standard 整段 config:全量重述 shipped plugins 列表(约 140 行)再改一行 auto: false。这是快照,dsh 升级改动 preset 后会漂移。
  • compaction-basic 的 auto 是纯 config 布尔(默认 true),无 env 兜底。
  • dump 证据与完整根因分层见 billion-context#1772 线程(floor 3)。

请求的功能

dsh Web GUI 的设置页(Settings → Agent presets,或 General)提供一等开关:禁用当前/默认 agent preset 的内置自动压缩(即 compaction-basic.auto: false),保存复用既有的 preset 子插件编辑持久化路径(web-app README:保存落盘 $DSH_HOME/profiles/web/cordis.patch.yml)。目标:用户无需手写 YAML 即可关闭自动压缩;手动 /compact 与 tool-result pruner 不受影响。

建议实现方向(供参考)

  1. Agent presets 设置页已支持编辑预设子插件并落盘 profile patch——把 compaction-basic 的 auto 布尔暴露为可见开关即可,复用现有保存机制;
  2. 更彻底的方向:preset 挂载时支持对同 id 子行的局部覆盖(而非整段 config 替换),消除手工覆盖的快照漂移问题。

投递说明

deepseek-ai/deepseek-harness 仓库 Issues 已关闭(has_issues: false,已核实),仅开放 Discussions。向该仓库投递本请求需经 owner 批准后以 Discussion 形式进行;本 issue 作为跟踪项存在。

Activity

  1. ranxianglei commented on Oct 3, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷 这是从 #1772 拆出的跟踪项(owner 决定,#1772 floor 14),不是要在本仓库实现的功能。根因在上游 dsh,本仓库能做的已做完(#1777 运行时告警已合并,把静默失效变成启动时可见)。

    核实:deepseek-ai/deepseek-harness has_issues: false(API 复核)、has_discussions: true —— Issues 关闭、仅开放 Discussions。所以正式投递只能走 Discussion 形式。按跨仓规矩,投递前需你明确批准,我不擅自提交。

    七问(诚实作答):

    1. 是什么问题:web profile(bundles 含 @deepseek-ai/dsh-web-app)下,第三方无法经 patch 关掉 dsh 内置自动压缩;用户唯一手工办法是在 profile patch 里整段重述 preset-standard(约 140 行)改一行 auto:false,且那是快照、dsh 升级改 preset 后即漂移。请求 dsh Web 设置页提供一等开关。
    2. 什么原因导致的:dsh-app-boot 的 applyEntryPatches 只按 id 索引顶层条目 + 真 group(group:true 且 config 为数组)子项;preset 行的 config.plugins 是普通 config 数据,任何 patch 层都够不到其中嵌套行;而 compaction-basic.auto 是纯 config 布尔(默认 true)、无 env 兜底。
    3. 怎么修复的:本仓库不修(也修不动)——真正修复在上游:dsh 把 compaction-basic.auto 暴露为可见开关(最小),或 preset 挂载时支持同 id 子行局部覆盖替代整段替换(更彻底,顺带消除快照漂移类问题)。本仓库侧只做可见化告警。
    4. 是否有回归问题:不涉及(本仓库零改动)。
    5. 是否破坏缓存:不涉及。
    6. 是否改了设计方向:不涉及。
    7. 是否引入新配置:不涉及。

    待你拍板(阻塞点): 下面是可直接投递的 Discussion 草稿(英文,dsh 是国际 OSS 仓库)。你回一句「批准投递」我就发,并挑合适 category(Ideas / Feature 之类);要调语言、措辞或补证据现在说。

    # [Feature request] Web GUI: toggle to disable built-in auto-compaction (compaction-basic.auto)
    
    Hi dsh team — feature request from a third-party plugin author (billion-context, a context-compression proxy). Verified against dsh 0.2.0-rc.2 (current npm latest).
    
    ## Ask
    A first-class toggle in the Web GUI (Settings → Agent presets, or General) to disable the built-in auto-compaction of the current/default agent preset — i.e. `compaction-basic.auto: false` — reusing the existing preset sub-plugin edit + persistence path (per the dsh-web-app README, edits save to `$DSH_HOME/profiles/web/cordis.patch.yml`). Manual `/compact` and the tool-result pruner remain unaffected.
    
    ## Why (root cause, verified in-tree)
    In profiles whose bundles include `@deepseek-ai/dsh-web-app`, the running `compaction-basic` instance lives inside the agent-preset composition (`preset-standard.config.plugins`); the host-plane same-id row is already `disabled: true` by the web-app itself.
    
    `dsh-app-boot`'s `applyEntryPatches` indexes entries by id across top-level rows + true group children (`group: true` with array config) only. A preset row's `config.plugins` is plain config data, so no patch layer can reach the nested row by id. As a result:
    - A third-party bundle patch `- id: compaction-basic / config: {auto: false}` silently lands on the already-disabled host-plane row — it applies without error/warning yet has no effect on the running instance.
    - The only manual workaround today is to override the entire `preset-standard` config in `$DSH_HOME/profiles/<profile>/cordis.patch.yml`: restate the full shipped plugins list (~140 lines) and flip one line to `auto: false`. Patching is whole-config replacement (not deep merge), so this is a snapshot that drifts whenever dsh changes the preset.
    - `compaction-basic.auto` is a pure config boolean (default `true`) with no env-var fallback.
    
    ## Suggested directions (either suffices)
    1. Minimal — surface `compaction-basic.auto` as a visible toggle on the Agent presets settings page, reusing the existing sub-plugin edit + profile-patch save.
    2. More thorough — support local override of same-id sub-rows when a preset mounts (instead of whole-config replacement), eliminating the snapshot-drift class for this and future third-party needs.
    
    Happy to share the full `--dump-config` evidence and a minimal repro. Thanks!

    判定:本 issue 为跟踪项,无本仓库可交付物;唯一待办是等你批准后向 dsh 投 Discussion。

  2. ranxianglei commented on Oct 3, 2026

    @ranxianglei
    OwnerAuthor

    继续

  3. ranxianglei commented on Oct 3, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷 已投递。经你批准(「继续」),feature request 已作为 Discussion 发到 dsh 上游,并核实存活。

    投递结果:

    七问(诚实作答):

    1. 是什么问题:web profile(bundles 含 @deepseek-ai/dsh-web-app)下第三方无法经 patch 关 dsh 内置自动压缩;请求 dsh Web 设置页提供一等开关(compaction-basic.auto:false)。
    2. 什么原因导致的:dsh patch 引擎(applyEntryPatches)够不到 preset 内嵌套行 + auto 无 env 兜底——根因在上游,不在本仓库。
    3. 怎么修复的:本仓库无可修点;交付动作 = 向上游投出正式 feature request(Discussion),把跟踪项从「待投递」推进到「已投递、等上游响应」。
    4. 是否有回归问题:不涉及(本仓库零改动)。
    5. 是否破坏缓存:不涉及。
    6. 是否改了设计方向:不涉及。
    7. 是否引入新配置:不涉及。

    后续 / 状态:本 issue 转为「跟踪上游响应」。dsh 若在 Discussion 里回应(采纳 / 拒绝 / 给时间表)我会同步到这里;若长期无响应,到时你再决定是否升级或换渠道。我这边不主动催、不重复投递(loop guard:一个 issue 至多一次投递)。

  4. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    发到上游???

  5. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    你理解错了 我要的是 一个在bili配置界面允许点击关闭dsh压缩的功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions