Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Wenci
Wenci

Wenci

HillinBrook

| (0) | Free
Select code in the editor, right-click, and let AI explain it. Built-in quick questions, model-suggested questions for the current selection, a choice of context scope (selection / line / method / type / current file / current project), your own free-form question, and streami...
Download

问词

在 Visual Studio 里选中一段代码,右键,让 AI 给你讲明白。 不用切浏览器、不用复制粘贴、不用重新解释背景——它知道你在看哪个文件、哪一行、哪个方法, 回答直接出现在 VS 的工具窗口里。

  • 作者:HillinBrook
  • 版本:1.3.6
  • 支持:Visual Studio 2022 / 2026(它们本身就是 64 位程序;32 位的 VS 2019 及更早不支持, 与你的 Windows 位数无关)
  • 暂不支持:Windows ARM64 上的 ARM64 版 Visual Studio
  • 接口:任何 OpenAI 兼容的对话接口。DeepSeek、OpenAI、通义千问、Kimi、智谱、Ollama、Azure OpenAI 都能直接用
  • 界面语言:跟随 Visual Studio。中文 VS 全是中文,其它语言的 VS 一律英文

配置

需要自备 API Key,费用按用量付给服务商,扩展本身不附带额度。

打开 工具 → 问词:设置…(或点面板右上角的「配置」),填名称、API 地址 (DeepSeek 是 https://api.deepseek.com/v1)、API 密钥、回答模型;模型右边的「选择」 可以直接列出服务端提供了哪些模型。温度、回答上限、超时、思考开关也在同一屏。

多份配置,一键切换

一份配置一行,点行就切到那一份,当前在用的标着「已启用」;行尾是「编辑 / 删除」,右下角「添加」。 每份配置的地址、密钥、模型、参数各存各的,切换不会覆盖任何一份。

内置提示词

发给模型的规矩,一条一行,可单独启用 / 停用,也可以自己添加。出厂那七条是锁定的 (不能改、不能删),想换个说法就把那条停用,再自己写一条。

配错了面板底部会给出提示。常见原因:API 地址末尾少了 /v1、密钥前后多了空格、模型名拼写不对。


怎么用

在编辑器里选中代码,右键,选 问词(划词提问)…。面板开着时回编辑器另选一段就会自动跟上 (上方的文件 / 范围 / 行数立刻更新,候选项也顺手重新生成;同一段选区只请求一次), 不用再右键一次。面板分三块:

  • 快捷提问——常问的问题,点一下就发出去。列表末尾的 + 添加,每行右边的 ✕ 删除; 左边填按钮文字,右边填真正发给模型的问题,右边留空就用左边。
  • 为您推荐——点「生成候选项」,让模型针对当前选区猜几个你想问的问题;候选项右边的 + 可以把它收进快捷提问。
  • 答案区——回答流式出现,代码块带语法高亮,配色跟着你的编辑器。底部输入框可以追问, 回车发送,Shift+回车 换行;后面的回答会参考前面的。

两块分区的标题右边都有折叠箭头,收起来把高度让给答案区,收起状态会记住。

顶部是「配置 / 复制 / 清空」;生成中底部的「追问」会变成「停止」。复制出来的是 Markdown 源文本。

上下文范围

决定这次提问能带多少代码给模型:

  • 自动 —— 有选区就只用选区;只有光标时,点在代码上就只问那一行,点在空处就上下找包住它的那一块
  • 其它档位手动选:仅选中内容、当前行、当前方法 / 函数、当前类 / 类型、当前文件、当前项目
  • 拿不准就用「自动」,答案缺背景再往上调一档

当前项目 会读很多文件,token 和耗时都明显上去,所以只能手动选。 面板上方那行会如实写出这次实际用了哪个范围。


更新日志

1.3.6 —— 上下文范围更聪明:自动会看光标的位置决定带多少代码。

1.3.4 —— 候选项生成加了开关;顺手修了几个问题。

1.3.1 —— 面板排版调整,划词后面板自动跟上。

1.3.0 —— 新增「配置」窗口;界面文字本地化补完。

1.2.x —— 修复候选项生成;界面文字跟随 VS 语言。

1.2.0 —— 新增「工程概况」。

1.1.x —— 思考过程可折叠、可开关。

1.1.0 —— 首个公开版本。


几点说明

  • 不保存历史会话:关掉面板再打开,之前的问答就没了。
  • 只回答问题,不改你的代码。
  • 代码高亮是词法级的,个别地方会和编辑器里的着色略有出入。

English

Select code in Visual Studio, right-click, and let AI explain it. No switching to a browser, no copy-paste, no re-explaining the context — it knows which file, line and method you are looking at, and the answer shows up in a Visual Studio tool window.

  • Author: HillinBrook
  • Version: 1.3.6
  • Requires: Visual Studio 2022 / 2026 (both are 64-bit programs; the 32-bit VS 2019 and older are not supported, regardless of your Windows bitness)
  • Not supported: the Arm64 build of Visual Studio on Windows on Arm
  • Works with: any OpenAI-compatible chat API — DeepSeek, OpenAI, Qwen, Kimi, Zhipu, Ollama, Azure OpenAI
  • UI language: follows Visual Studio — a Chinese VS is entirely Chinese, any other language shows English

Setup

Bring your own API key. The extension ships no credits; you pay the provider directly.

Open Tools → Wenci: Settings… (or click Settings in the panel) and fill in the name, the API base URL (DeepSeek: https://api.deepseek.com/v1), the API key and the answer model. The Pick button next to the model lists what your endpoint offers. Temperature, answer limit, timeout and the thinking switch are on the same screen.

Several settings side by side

One row per configuration: click a row to switch to it, and the one in use is marked Active; Edit / Remove sit on the row, Add at the bottom. Each configuration keeps its own URL, key, model and parameters, so switching never overwrites another one.

Built-in prompt

The rules sent to the model, one per line, each with its own on/off switch — and you can add your own. The seven that ship with the extension are locked (no editing, no deleting); to reword one, switch it off and write your own.

A wrong setting shows a hint at the bottom of the panel. Usual causes: a base URL missing /v1, stray spaces around the key, a misspelled model name.


Using it

Select code, right-click, pick Wenci (Ask About Selection)…. While the panel is open, selecting something else in the editor is picked up automatically — the file / scope / lines line updates and the suggestions are regenerated (one request per selection), so you only right-click once. The panel has three parts:

  • Quick questions — one click to ask. The + at the end of the list adds one, ✕ removes it; the left field is the button label, the right one is the question actually sent (leave it empty to reuse the label).
  • Suggestions — "Suggest questions" has the model guess what you might want to ask about the selection; + on a suggestion saves it into your quick questions.
  • Answers — streamed, with syntax highlighting that follows your editor colours. Ask follow-ups in the box below (Enter sends, Shift+Enter adds a line); later answers refer back to earlier ones.

Both section titles have a chevron on the right; collapsing them gives the whole height to the answers, and the state is remembered.

The toolbar holds Settings / Copy / Clear, and while an answer is streaming the Ask button turns into Stop. Copy gives you the Markdown source.

Context scope

How much code this question carries to the model:

  • Auto — the selection if there is one; with only a caret, just the line when the caret sits on code, otherwise it searches up and down for whatever encloses the caret
  • The rest are manual: selection only, current line, current method, current type, current file, current project
  • When in doubt use Auto, and widen one step if the answer lacks context

"Current project" reads a lot of files, so it costs noticeably more tokens and time — and it is never picked automatically. The line above the answers always says which scope was used.


Changelog

1.3.6 — Smarter context scope: Auto looks at where the caret is to decide how much code to send.

1.3.4 — A switch for suggestion prefetch, plus a few fixes.

1.3.1 — Panel layout polish; the panel follows your selection.

1.3.0 — New Settings window; localisation finished.

1.2.x — Fixed suggestion generation; strings follow the VS UI language.

1.2.0 — Added the project profile.

1.1.x — Collapsible, switchable reasoning.

1.1.0 — First public release.


Notes

  • Answers are not saved; closing the panel clears the conversation.
  • It explains code, it does not modify your files.
  • Syntax highlighting is lexical; a few tokens may differ from the editor.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft