Skip to content

[Bug] 命令栏不提供结构化补全,自定义命令 Spec 设置不生效 #810

Open

Description

@Peng-io

OxideTerm version / 版本

2.3.2

Platform / 平台

Windows (x86_64)

Area / 问题领域

Terminal / local terminal / serial

Summary / 简述

命令栏输入 docker 后不出现任何子命令候选;结构化补全的 provider 没有界面调用点,「自定义命令 Spec」设置因此不生效。

Reproducibility / 可复现性

Always (100%) / 必现

Steps to reproduce / 复现步骤

  1. 打开任意终端(本地或 SSH 均可)
  2. 在窗口底部的命令栏(占位文案「输入命令...」)输入 docker ,保留尾随空格
  3. 观察候选列表
  4. 打开设置 → 终端 → 自定义命令 Spec,其中显示「内置 spec:58」

Expected vs actual / 预期与实际

  • Expected: 输入 docker 后出现 ps / logs / exec 等子命令候选(内置 spec 覆盖 docker);自定义 spec 覆盖同名内置 spec 后,候选应随之变化
  • Actual: 没有结构化候选,只有历史记录里执行过的完整命令行;修改自定义 spec 后候选也不变化

Logs or screenshots / 日志或截图

无日志。可在命令栏输入 docker 后截取空白候选的界面。

Additional environment details / 其他相关环境信息

  • Remote: Linux, bash, OpenSSH 8.0
  • 命令栏为默认配置(command_bar.enabled = true、smart_completion = true)
  • 复现于 2.3.2;2.3.3 与 main 的 terminal_command_bar/completion.rs 与 2.3.2 相同

根因与代码位置 / Root cause and code locations

crates/oxideterm-gpui-app/src/workspace/terminal_command_bar/completion.rs 文件首两行:

// Compact Rich Input consumes history here; the remaining providers still back settings data.
#![allow(dead_code, unused_imports)]
  • fig_provider(58 个内置 spec)、path_provider(SFTP 远程路径)、quick_command_provider 在 crates/ 内没有调用点
  • 紧凑命令栏的候选只来自 terminal_command_sender_visible_history_suggestions(crates/oxideterm-gpui-app/src/workspace/terminal_command_bar/sender.rs)
  • 设置页只把 spec 数量用于显示(crates/oxideterm-gpui-app/src/workspace/settings/general_terminal_pages.rs)

terminal_command_fig_suggestions 的调用点在 v2.0.13 的改动后不再存在,之后各版本行为一致。#271(增加命令补全)已按「已完成」关闭,当前没有对应的用户可见入口。

Checklist

  • I tested with the latest release, can still reproduce the issue, and searched existing issues / 我已使用最新正式版测试,问题仍然存在,并已搜索过已有 Issue
  • This is one reproducible bug, not a usage question or feature request / 这是一个可复现的 bug,而不是使用问题或功能建议
  • I provided the OxideTerm version, platform, and steps to reproduce; I understand vague, incomplete, or inactive issues may be closed. 我已提供 OxideTerm 版本、平台及复现步骤;我理解描述模糊、信息不足或长期无回复的 Issue 可能会被关闭。
  • I removed passwords, private keys, and other secrets from this report. 我已从本报告中删除密码、私钥及其他敏感信息。

Activity

  1. github-actions commented on Nov 17, 2026

    @github-actions

    Stable version reminder / 稳定版版本提醒

    You reported v2.3.2, while the latest stable release is v2.3.3. Please update to the latest stable release and confirm whether the issue still occurs. If it does, reply here with the result.

    你提交 Issue 时填写的是 v2.3.2,当前最新稳定版为 v2.3.3。请先更新到最新稳定版,再确认问题是否仍然存在;如果仍可复现,请在此 Issue 中补充结果。

  2. Peng-io commented on Nov 17, 2026

    @Peng-io
    Author

    未在 2.3.3 上实际运行。代码层面 v2.3.2 与 v2.3.3 的相关模块无差异:

    • crates/oxideterm-gpui-app/src/workspace/terminal_command_bar/completion.rs 两版相同,文件头仍为 #![allow(dead_code, unused_imports)]
    • terminal_command_fig_suggestions、terminal_command_path_suggestions、quick_command_provider 在 crates/ 内仍无调用点
    • v2.3.3 与 main 的差异仅在 terminal_command_bar/git.rs(2 行)

    另有两处文档与行为不一致:

    • README.md:155、docs/readme/README.zh-Hans.md:155:「底部命令栏支持多行输入、历史记录、路径提示、补全和快捷命令」
    • docs/user-guide/zh-Hans/architecture.md:2047:「存储快捷命令、命令行补全来源和发送器控件」
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions