穷指什么生肖| 什么是局限性肺纤维化| 脑供血不足吃什么药效果好| mickey是什么牌子| m1是什么单位| 涅盘是什么意思| 千娇百媚是什么意思| 胃上火有什么症状| 眼皮有痣代表什么| 六月一号什么星座| 怀孕一个月吃什么对宝宝发育好| 为什么一吃饭就拉肚子| 嘴里发甜是什么原因| 写字楼是干什么的| 怀孕是什么感觉| 主理人是什么意思| 梦到自己被蛇咬是什么意思| 用盐水洗脸有什么好处和坏处| 待客是什么意思| 慢性疾病都包括什么病| 献血有什么要求| com代表什么意思| 川崎病是什么病| 排湿气最快的方法吃什么| 破月什么意思| 报单什么意思| 黑曜石是什么材质| 甲状腺结节吃什么食物好| 血清蛋白是什么| 没有了晨勃是什么原因| 属猪的本命佛是什么佛| 肚子疼呕吐是什么原因引起的| 为什么牛肝便宜没人吃| 看肾挂什么科| 未可以加什么偏旁| 凉粉用什么做的| 酒精过敏是什么症状| 本事是什么意思| 伊朗用什么货币| 化脓性扁桃体炎吃什么药| 日前是什么意思| 骶椎腰化什么意思| 缱绻旖旎是什么意思| 痛风买什么药| 贞洁是什么意思| 依云矿泉水为什么贵| 喝完酒头疼吃什么药| 喝什么泡水降血压最好| 1025是什么星座| 崴脚用什么药| 婚姻是爱情的坟墓是什么意思| 夏天适合吃什么水果| 骨加后念什么| 美尼尔综合征是什么原因引起的| 双规是什么意思| 血压低压低是什么原因| 熊猫属于什么科| 为什么子宫会下垂| 盆腔积液吃什么药效果好| 11.6号是什么星座| 淋巴发炎是什么症状| 什么情| 胃炎是什么原因引起的| 子宫腺肌症吃什么药最有效| 为什么总是睡不着| 甲状腺结节不能吃什么| 塞肛门的止痛药叫什么| 拉黄水是什么原因| 斤加一笔是什么字| 本命年有什么说法| 本命佛是什么意思| 塞上是什么意思| 农历10月14日是什么星座| 入职体检挂什么科| 建档需要做什么检查| 决明子配什么喝最减肥| 湿气重吃什么药| 多多益善的益是什么意思| 鱼在鱼缸底部不动为什么| 蜗牛爱吃什么食物| 助听器什么牌子的好| range rover是什么车| 羊肚菌有什么功效和作用| 为什么夏天吃姜好| 胃胀吃什么药效果好| 天台是什么意思| 心想事成是什么意思| 睡醒后嘴巴苦什么原因| 柏拉图爱情是什么意思| 海螺姑娘是什么意思| 庚辰五行属什么| 211和985是什么意思| 蒙氏教育是什么| 孕妇什么水果不能吃| 外痔用什么药| 喝冰糖水有什么好处和坏处| 树挪死人挪活是什么意思| 入珠是什么| 排骨蒸什么好吃| 晚上尿多是什么原因| 李子与什么食物相克| 3.15是什么星座| 直肠炎用什么药效果最好| 羊胡子疮用什么药膏| 什么是尿素| 肌肉拉伤挂什么科| 小孩办身份证需要什么材料| 西瓜和什么食物相克| 载脂蛋白是什么意思| 魇是什么意思| 沙葱是什么| 官方什么意思| 朱砂痣是什么意思| 英气是什么意思| 为什么榴莲那么贵| 手脚冰凉什么原因| 败血症是什么病| 办健康证挂什么科| 河北有什么山| 为什么会抑郁| 痔疮长什么样子的图片| 太阳病是什么意思| 外包什么意思| 检查前列腺做什么检查| 中午吃什么饭| 2013属什么生肖| 真菌孢子阳性什么意思| 记忆力减退吃什么药效果好| 夏天种什么水果| 蜱虫长什么样子| 七八年属什么生肖| 下巴两边长痘痘是什么原因| 放炮是什么意思| 指甲竖条纹是什么原因| 猎户座是什么星座| 拉夏贝尔属于什么档次| 后果的意思是什么| 挫折是什么意思| 血糖和血脂有什么区别| 肾阴虚吃什么食物最好| 粉尘螨过敏是什么意思| 音容笑貌的意思是什么| 早上起来有痰是什么原因| 儿童鸡胸挂什么科| 桃子可以做什么美食| 突然头晕是什么原因| 情志是什么意思| 没品什么意思| 验孕棒ct分别代表什么| 梦见挖坟墓预示什么| 梦见炒菜是什么意思| 双源ct主要检查什么| 吃饭出虚汗是什么原因| 张紫妍为什么自杀| 呆板是什么意思| 流产用什么药最快| 做水煮鱼用什么鱼最好| 微博是什么意思| 喜欢放屁是什么原因| 脖子痛什么原因| 艾草泡脚有什么功效| 怀孕初期吃什么对胎儿发育好| 乌云为什么是黑色的| 89年是什么命| 牛肉炖什么| 东是什么生肖| 胆红素高吃什么食物能降得快| xr是什么| 为什么会出现眼袋| 三七粉做面膜有什么功效| 避孕药吃了有什么副作用| 呕吐发烧是什么原因| 血小板异常是什么原因| 一月三日是什么星座| 心里发慌什么原因| 脚心有痣代表什么| 尿液检查红细胞高是什么原因| 心绞痛是什么病| 凉粉是什么做的| 舌头发红是什么原因| 脚肿了是什么原因引起的| 男人精子少吃什么药| 阿迪耐克为什么那么贵| 道士是干什么的| bonnie是什么意思| 总是低烧是什么原因造成的| 阿拉伯人是什么种人| 澳门什么时候回归| 离婚需要什么| 市政协主席是什么级别| 密度灶是什么意思| 一什么春笋| 洗涤是什么意思| 社会保险费是什么| 志五行属什么| 胃食管反流吃什么中成药| pd是什么元素| 前置胎盘是什么意思| 肾脏彩超能检查出什么| 儿童节吃什么| 血糖能吃什么水果| 一什么牌子| 97年什么生肖| 小姨子是什么关系| 什么时期最容易怀孕| 干咳嗽喉咙痒是什么原因| 维生素b2有什么作用和功效| 拔牙第二天可以吃什么| 腰疼做什么检查| 脑梗吃什么食物| 妈妈的奶奶叫什么| 心脏早搏吃什么药效果好| 抽筋缺什么维生素| neighborhood什么意思| c反应蛋白高是什么意思| 菠菜是什么季节的菜| 天牛喜欢吃什么| 梦到和男朋友分手是什么征兆| 农历六月初六是什么节| 扬字五行属什么| 凭什么姐| 笑气是什么东西| 父亲节什么时间| 72年属什么生肖| 茹字五行属什么| 孕检nt主要检查什么| 儿童拉稀吃什么药| 什么水果含硒量最高| 吉星高照是什么生肖| 道观是什么意思| female什么意思| 肝胆胰脾彩超查什么病| 生物酶是什么东西| 2017年属什么| 灰枣和红枣有什么区别| 感康是什么| 胃火重吃什么药| 蛋白低是什么原因| 所言极是是什么意思| 三维彩超主要检查什么| 巨蟹女喜欢什么样的男生| 李子什么时候吃最好| 脑萎缩吃什么药| 绿豆和什么不能一起吃| 水果之王是什么水果| 什么是宫腔镜检查| 收缩压和舒张压是什么| imax电影是什么意思| 母亲生日送什么礼物| 一什么帽子| 桃字五行属什么| 合疗和医保有什么区别| 什么是手足口病| 阴道炎症是什么症状| 什么山峻岭| 许冠杰属什么生肖| 大便成细条状是什么病| 7月15是什么节| 八八年属什么| 龙眼什么时候成熟| 刮痧和拔罐有什么区别| 办香港通行证要准备什么材料| 冠脉ct和冠脉造影有什么区别| 膈应人是什么意思| 百度

Try to extend agent mode in VS Code!

Panasonic(松下)相机

百度 北京时间3月21日,这样的广厦真是联盟第一吗客场95比100不敌深圳,常规赛第一竟然被第八拖入了生死抢五战。

With chat edit mode in Visual Studio Code, you can use natural language to make edits across multiple files in your project. The edits are applied directly in the editor, where you can review them in-place, with the full context of the surrounding code.

By selecting specific files and providing clear context, you can guide edit mode to make targeted code changes and improvements.

Prerequisites

Why use edit mode?

Edit mode is optimized for making code edits across multiple files in your project. VS Code directly applies the code changes in the editor, where you can review them in-place. You can use edit mode to:

  • Refactor parts of your codebase, such as "refactor this using async/await" or "use a singleton pattern for the database connection".
  • Add new features to your codebase, such as "add a login form to the app".
  • Fix bugs in your codebase, such as "the sort function fails when the input is empty, fix it".
  • Write unit tests for your code, such as "add unit tests for the calculator class using vitest".
  • Improve the performance of your code, such as "optimize the calculate function to make it more efficient".

Edit mode is particularly useful for coding tasks when you have a good understanding of the changes that you want to make, and which files you want to edit. If you have a less well-defined task, a high-level requirement, or changes that also require running terminal commands and tools, you might want to use agent mode instead.

Use edit mode

In edit mode, you select which files to edit and provide the relevant context and prompt. VS Code will suggest code edits based on your prompt.

  1. Open the Chat view (??I (Windows, Linux Ctrl+Alt+I)) and select Edit from the chat mode selector.

    Screenshot showing the Chat view, highlighting edit mode selected.

    Directly open edit mode in VS Code Stable or Insiders.

  2. Select Add Context or #-mention specific workspace files or context items to provide extra context for your prompt.

    By adding context, you can get more relevant responses. For example, to ask questions that are specific to your current project, you can use the #codebase context item. Type # in the chat input field to view the list of available context items.

    The active editor is automatically added as context. When you add files, other relevant files might be suggested.

  3. Enter your prompt in the chat input field to indicate the type of edits you want to make.

    Experiment with some of these example questions to get started:

    • Refactor the calculate function to make it more efficient.
    • Add a login form to the app. Use OAuth for authentication.
    • Add unit tests for the calculator class. Use vitest as the test framework.
  4. Notice that VS Code streams the suggested edits directly in the editor.

    The Chat view shows the list of files that were edited in bold text. The editor overlay controls enable you to navigate between the suggested edits.

    Screenshot that shows the Chat view, highlighting the changed files list and the indicator in the Explorer view and editor tabs.

  5. Review the suggested edits and accept or discard the suggested edits.

  6. Continue to iterate on the code changes to refine the edits or to implement additional features.

Accept or discard edits

VS Code lists the files that were edited in the changed files list in the Chat view. Files with pending edits also have an indicator in the Explorer view and editor tabs.

Screenshot that shows the Chat view, highlighting the changed files list and the indicator in the Explorer view and editor tabs.

With the editor overlay controls, you can navigate between the suggested edits by using the Up () and Down () controls. Use the Keep or Undo button to accept or reject the edits for a given file.

Screenshot showing the Editor with proposed changes, highlighting the review controls in the editor overlay controls.

Use the Keep or Undo controls in the editor or Chat view to accept or reject individual or all suggested edits.

Screenshot showing the Chat view, highlighting the Accept All and Discard All buttons.

With the chat.editing.autoAcceptDelay setting, you can configure a delay after which the suggested edits are automatically accepted. Hover over the editor overlay controls to cancel the auto-accept countdown.

When you close VS Code, the status of the pending edits is remembered. When you reopen VS Code, the pending edits are restored and you can still accept or discard the edits.

Revert edits

As you're sending requests to make edits to your code, you might want to roll back some of these changes, for example because you want to use another implementation strategy or because the AI starts walking down the wrong path when generating edits.

You can use the Undo Last Edit control in the Chat view title bar to revert the last edits and return to the state before sending the last request. After you perform an undo of the last edit, you can redo those edits again by using the Redo Last Edit control in the Chat view title bar.

Screenshot showing the Chat view, highlighting the Undo and Redo actions in the view title bar.

You can also use the Undo Edits (Delete) control (x icon) when hovering over a request in the Chat view to revert all edits that were made from that request onwards.

Screenshot showing the Chat view, highlighting the Undo Edits control for a specific request.

Use instructions to get AI edits that follow your coding style

To get AI-generated code edits that follow your coding style, preferred frameworks, and other preferences, you can use instruction files. Instruction files enable you to describe your coding style and preferences in Markdown files, which the AI uses to generate code edits that match your requirements.

You can manually attach instruction files as context to your chat prompt, or you can configure the instruction files to be automatically applied.

The following code snippet shows an example of an instruction file that describes your coding style and preferences:

---
applyTo: "**"
---
# Project general coding standards

## Naming Conventions
- Use PascalCase for component names, interfaces, and type aliases
- Use camelCase for variables, functions, and methods
- Prefix private class members with underscore (_)
- Use ALL_CAPS for constants

## Error Handling
- Use try/catch blocks for async operations
- Implement proper error boundaries in React components
- Always log errors with contextual information

Learn more about using instruction files.

Settings

The following list contains the settings related to edit mode. You can configure settings through the Setting editor (?, (Windows, Linux Ctrl+,)).

Frequently asked questions

Why would I use edit mode instead of agent mode?

Consider the following criteria to choose between edit mode and agent mode:

  • Edit scope: you might use edit mode if your request involves only code edits and you know the precise scope for the changes.
  • Duration: agent mode involves multiple steps to process a request, so it might take longer to get a response. For example, to determine the relevant context and files to edit, determine the plan of action, and more.
  • Non-deterministic: agent mode evaluates the outcome of the generated edits and might iterate multiple times. As a result, agent mode can be more non-deterministic than edit mode.
  • Request quota: in agent mode, depending on the complexity of the task, one prompt might result in many requests to the backend.
准生证什么时候办理 肺热吃什么 心脏缺血吃什么补得快 接龙是什么意思 茧子是什么意思
胆囊炎吃什么药效果最好 先天性心脏病有什么症状 lot是什么 王维是诗什么 糖化血红蛋白偏高是什么意思
银色的什么 什么的跳 369是什么意思啊 尿频繁是什么原因 胆是起什么作用的
湿热喝什么茶可以调理 胃看什么科室 喝什么茶养肝护肝 champion什么牌子 口渴是什么病的前兆
什么叫阴虚什么叫阳虚hcv8jop0ns7r.cn 白腊金是什么意思hcv8jop7ns1r.cn npv是什么意思hcv9jop4ns4r.cn 线下培训是什么意思hcv9jop0ns0r.cn 办理身份证需要带什么hcv8jop0ns0r.cn
什么是心律失常hcv9jop1ns8r.cn 破壁机是干什么用的yanzhenzixun.com 为什么来月经会头疼hcv9jop1ns3r.cn 屁股上长痘痘是什么情况tiangongnft.com 抛锚是什么意思hcv7jop5ns4r.cn
伤风胶囊又叫什么shenchushe.com 梦见自己生了个女孩是什么意思hcv7jop6ns9r.cn 岐黄是什么意思fenrenren.com 六角恐龙吃什么hcv8jop0ns5r.cn 宫颈潴留囊肿是什么意思hcv7jop9ns5r.cn
晚上咳嗽什么原因luyiluode.com 反射弧太长是什么意思hcv8jop9ns1r.cn 全科医学科是什么科hcv9jop3ns0r.cn 白马怕青牛是什么意思hcv7jop5ns6r.cn 暗代表什么生肖creativexi.com
百度