Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>nbCompletionNew to Visual Studio Code? Get it now.
nbCompletion

nbCompletion

clyde-tingnb

|
1 install
| (0) | Free
Low-latency AI code completion, Next Edit Prediction (NES), and Inline Chat for VS Code supporting OpenAI GPT-6.2/GPT-6.1/GPT-6, DeepSeek V4.1 Flash, and Ollama.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

nbCompletion

English | 简体中文


English

nbCompletion is a low-latency AI coding assistant for VS Code combining Inline Ghost-Text Completion (FIM), Next Edit Prediction (NES), and Inline Chat — with explicit multi-provider model routing, syntax-aware context across 6 language families, built-in token cost controls, and strict privacy guardrails.

Quick Start

  1. Install nbCompletion from the VS Code Marketplace.
  2. Configure your provider:
    • OpenAI: Open Command Palette (⌘⇧P / Ctrl+Shift+P) → run nbCompletion: Set OpenAI API Key.
    • DeepSeek: Run nbCompletion: Set DeepSeek API Key, then click the nb item in the bottom-right Status Bar → Switch Model Preset → DeepSeek V4.1 Flash Full Stack.
    • Ollama (Local Privacy Mode): Click the nb Status Bar item → Switch Model Preset → Ollama Local Privacy Mode.
  3. Start coding:
    • Pause briefly while typing for inline ghost completions (or press ⌥\ / Alt+\ to trigger manually).
    • Press ⌥Enter / Alt+Enter to jump & apply Next Edit Predictions.
    • Press ⌘I / Ctrl+I to open Inline Chat on the current function or selection.

Core Features

1. Inline Ghost-Text Completion (FIM & Comment-to-Code)

  • Low-latency streaming single-line, multi-line, and comment-to-code completions.
  • Smart trigger controls suppress noise during rapid deletions, inside plain string literals, and at completed statement endings (;, }), while coexisting cleanly with VS Code IntelliSense.
  • Speculative type-ahead caching serves instant keystroke continuations with zero extra API calls.

2. Next Edit Prediction (NES)

  • Anticipates cascading edits across nearby lines after you modify a signature, refactor a variable, or encounter compiler diagnostics.
  • Same-line edits appear seamlessly as inline ghost text; cross-line edits highlight the target region with a gutter indicator and inline preview.
  • Automatically probes for follow-up call-site updates after you accept a structural Inline Chat edit (skipped for comment-only changes).

3. Inline Chat (⌘I / Ctrl+I)

  • Native inline thread directly inside the editor with automatic enclosing function/class and doc-comment scope selection when nothing is selected, plus Quick Fix lightbulb integration (⌘. / Ctrl+.) on error/warning diagnostics.
  • Edit Slash Commands:
    • /fix — Surgical bug and diagnostic repair.
    • /doc — Idiomatic documentation updates in place without changing executable logic.
    • /test — Non-destructive companion unit test generation (automatically detects your test framework and creates or appends to the companion test file without overwriting source code).
    • /refactor — Clarity and structure improvements while preserving public API signatures.
    • /perf — Algorithmic, concurrency, memory, and schema-aware SQL query optimization.
    • /types — Static type annotations across all supported languages (including JSDoc for JavaScript).
  • Read-Only Slash Commands:
    • /explain — Structured Markdown code walkthrough without editing your file.
    • /review — Severity-grouped bug, security, performance, and maintainability review.
  • Explicit @ Context Mentions:
    • @file:<relative-path> — Attach another workspace file as context (respects ignore & sensitive-file rules).
    • @git — Attach your current workspace git diff.
    • @errors — Include all active errors and warnings across the current file.
  • Inline Diff Review: Review changes directly in the editor with Per-Hunk Accept / Reject CodeLenses for multi-hunk edits, Accept All (⌘Enter / Ctrl+Enter), lossless Discard (Esc), and Retry.

4. Token Cost Engine & Live Token Ledger

  • Switch between Eco, Balanced (default), and Max cost modes in one click from the Status Bar Control Center (nbCompletion.cost.mode) to tune context budgets, trigger cadence, and prompt caching.
  • Optional same-provider fast single-line completion model routing (nbCompletion.fim.fastSingleLineModel).
  • Track real-time prompt, KV-cached, and completion token usage plus TTFT latency (P50 / P95) per slot (FIM, NES, Inline Chat) in the Status Bar tooltip and via nbCompletion: Show Diagnostics & Token Ledger.

Explicit Multi-Provider Routing (No Silent Fallback)

Assign each capability slot (FIM, NES, Inline Chat) independently via the Status Bar Control Center or nbCompletion.slots. Cloud errors surface clear diagnostics and never silently downgrade to local models.

Provider Supported Models Highlights
OpenAI (Primary) gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-luna Responses API & Chat Completions, GPT-6.2 prefix KV caching, optional WebSocket low-latency mode with automatic HTTP fallback
DeepSeek (Optional) deepseek-flash Native FIM (/beta/completions), configurable reasoning mode for NES & Inline Chat
Ollama (Optional Local) qwen2.5-coder:7b (configurable) 100% local execution when explicitly selected

API keys are stored exclusively in VS Code SecretStorage and are never written to settings.json. Custom proxy endpoints are supported via nbCompletion.openai.baseUrl and nbCompletion.deepseek.baseUrl.

Supported Languages

Syntax-aware cross-file context and language-specific post-processing across 6 major language families:

  • TypeScript / JavaScript (including JSX / TSX)
  • Python (indentation-safe block guards & import skeletons)
  • Go (same-package sibling symbol context)
  • Java (package-relative class signatures)
  • C / C++ (header/source pairing & #include context)
  • SQL (sql, postgres, mysql, sqlite — DDL schema discovery, CTE/alias context & single-statement guard)

Keyboard Shortcuts

Action macOS Windows / Linux
Start Inline Chat ⌘I Ctrl+I
Accept Inline Chat Diff ⌘Enter Ctrl+Enter
Trigger Inline Completion Manually ⌥\ Alt+\
Accept Cross-Line Next Edit (NES) ⌥Enter (or optional Tab) Alt+Enter (or optional Tab)
Dismiss Active NES / Discard Inline Chat Diff Esc Esc

Privacy & Security

  • Sensitive files (.env*, *.pem, *.key, *secret*, *credentials*) and .gitignore entries are automatically blocked from completion and @file mentions.
  • Built-in secret redaction scrubs common API keys, tokens, private keys, and database credentials before outgoing cloud requests (nbCompletion.privacy.redactSecrets).
  • To exclude additional files in a project, create a .nbcompletionignore file in your workspace root using .gitignore syntax:
# .nbcompletionignore
secrets/
*.local.json
internal-notes/**

简体中文

nbCompletion 是一款面向 VS Code 的低延迟 AI 编程插件,集成了 行内幽灵补全(FIM)、下一处编辑预测(NES) 与 行内对话编辑(Inline Chat),支持多模型分槽位显式路由、6 大语言家族语法感知上下文、三档 Token 成本引擎与严格隐私防护。

快速上手

  1. 在 VS Code 插件商店安装 nbCompletion。
  2. 配置模型服务:
    • OpenAI:打开命令面板(⌘⇧P / Ctrl+Shift+P)→ 执行 nbCompletion: Set OpenAI API Key。
    • DeepSeek:执行 nbCompletion: Set DeepSeek API Key,然后点击右下角状态栏 nb → Switch Model Preset → 选择 DeepSeek V4.1 Flash Full Stack。
    • Ollama(纯本地隐私模式):点击状态栏 nb → Switch Model Preset → 选择 Ollama Local Privacy Mode。
  3. 开始使用:
    • 编码时短暂停顿即可出现行内幽灵补全(也可按 ⌥\ / Alt+\ 手动触发)。
    • 修改代码后出现下一处编辑建议时,按 ⌥Enter / Alt+Enter 一键跳转并应用。
    • 选中代码或在函数内按 ⌘I / Ctrl+I 即可打开行内对话(Inline Chat)。

核心功能

1. 行内代码补全(FIM 与注释生成代码)

  • 支持流式单行补全、多行块补全及注释转代码。
  • 内置智能门控,在快速删除、普通字符串字面量及语句末尾(;、})自动抑制无效请求,并与 VS Code IntelliSense 和谐共存。
  • 预读缓存让连续顺打按键零额外网络开销、瞬时响应。

2. 下一处编辑预测(NES)

  • 当你修改函数签名、重构变量或出现编译报错时,自动预测附近需要联动修改的位置。
  • 同行修改直接以幽灵文本呈现;跨行修改通过行号槽箭头、红绿高亮与行尾预览清晰标注。
  • 接受 Inline Chat 的结构或签名改动后,自动联动探测调用点更新(纯注释修改会自动跳过,不浪费 Token)。

3. 行内对话编辑(Inline Chat,⌘I / Ctrl+I)

  • 编辑器内原生对话线程:未选中文本时自动定位所在函数/类及前置文档注释;代码报错处支持灯泡 Quick Fix(⌘. / Ctrl+.)一键修复。
  • 代码修改指令:
    • /fix — 结合诊断信息的最小化精准修复。
    • /doc — 原地生成或更新规范注释,严格不改动业务代码逻辑。
    • /test — 无损单元测试生成(自动识别测试框架,创建或追加到独立测试文件,不覆盖业务源码)。
    • /refactor — 优化结构与可读性,保持对外接口签名不变。
    • /perf — 算法、内存、并发与结合表结构的 SQL 性能优化。
    • /types — 跨语言静态类型标注增强(JavaScript 自动生成 JSDoc)。
  • 只读分析指令:
    • /explain — 结构化 Markdown 代码讲解,不修改文件。
    • /review — 按严重级别分组的 Bug、安全、性能与可维护性代码审查。
  • 显式 @ 上下文引用:
    • @file:<相对路径> — 手动引入工作区指定文件作为上下文(严格受忽略规则与敏感文件拦截保护)。
    • @git — 引入当前工作区 git diff 变更。
    • @errors — 引入当前文件全部报错与警告诊断。
  • 行内 Diff 审查:多处改动支持 逐块接受/拒绝(Accept Hunk / Reject Hunk),同时支持 全部接受(⌘Enter / Ctrl+Enter)、100% 无损 放弃回滚(Esc)与 重试。

4. Token 成本引擎与实时用量账本

  • 点击右下角状态栏控制中心可一键切换 Eco(省流) / Balanced(均衡,默认) / Max(满血) 成本模式(nbCompletion.cost.mode),按意图动态调节上下文预算与 KV 缓存命中。
  • 支持同服务商下的单行快速补全模型分流(nbCompletion.fim.fastSingleLineModel)。
  • 状态栏悬停提示与 nbCompletion: Show Diagnostics & Token Ledger 实时展示 FIM / NES / Inline Chat 各槽位的输入、KV 缓存命中、输出 Token 及 P50/P95 首字延迟。

多服务商显式路由(绝不静默降级)

通过状态栏控制中心或 nbCompletion.slots 为 FIM、NES、Inline Chat 分别指定模型与服务商。云端异常会直接提示诊断,绝不会静默降级到本地模型。

服务商 支持模型 特性亮点
OpenAI (主力) gpt-6.2-sol、gpt-6.2-astra、gpt-6.1-sol、gpt-6.1-terra、gpt-6-luna 支持 Responses API 与 Chat Completions、GPT-6.2 前缀 KV 缓存优化、可选 WebSocket 低延迟模式(握手失败自动回退 OpenAI HTTP)
DeepSeek (可选) deepseek-flash 支持原生 FIM(/beta/completions)、NES 与 Inline Chat 推理模式可独立开关
Ollama (本地可选) qwen2.5-coder:7b(可自定义) 仅在显式选择时启用,100% 本地运行

API Key 仅存储在 VS Code 内置安全加密存储(SecretStorage)中,绝不写入 settings.json。支持通过 nbCompletion.openai.baseUrl 与 nbCompletion.deepseek.baseUrl 配置自定义代理地址。

支持语言(6 大语言家族)

针对以下语言提供语法感知跨文件上下文与专属后处理保护:

  • TypeScript / JavaScript(含 JSX / TSX)
  • Python(缩进边界防越界保护与模块导入摘要)
  • Go(同包跨文件符号签名提取)
  • Java(包路径类签名上下文)
  • C / C++(头文件/源文件自动配对与 #include 解析)
  • SQL(sql / postgres / mysql / sqlite —— 自动识别 CREATE TABLE 表结构、CTE/别名提取与单语句截断保护)

常用快捷键

功能 macOS Windows / Linux
打开 Inline Chat ⌘I Ctrl+I
接受 Inline Chat 修改 ⌘Enter Ctrl+Enter
手动触发行内补全 ⌥\ Alt+\
接受跨行下一处编辑(NES) ⌥Enter (或可选 Tab) Alt+Enter (或可选 Tab)
关闭 NES 建议 / 放弃 Inline Chat 修改 Esc Esc

隐私与安全

  • 自动屏蔽 .env*、*.pem、*.key、*secret*、*credentials* 等敏感文件及 .gitignore 规则,补全与 @file 引用均不会读取。
  • 发往云端前自动脱敏常见 API Key、Token、私钥与数据库连接凭据(nbCompletion.privacy.redactSecrets)。
  • 如需排除更多项目文件,可在工作区根目录新建 .nbcompletionignore(兼容 .gitignore 语法):
# .nbcompletionignore
secrets/
*.local.json
internal-notes/**
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft