瘘是什么意思| 正常的心电图是什么样的图形| 男人洁身自好什么意思| 水生什么五行| puella是什么牌子衣服| 胎方位loa是什么意思| 脖子上长小肉疙瘩是什么原因| 人老珠黄是什么动物| 拔了牙吃什么消炎药| 什么都想要| 例假少是什么原因| 肝风内动是什么意思| 耳膜炎是什么原因引起的| 大便一粒一粒的是什么原因| 下身瘙痒什么原因| 阿胶的原料是什么| im是什么| 穹窿是什么意思| 观音菩萨姓什么| 84是什么意思| 睡久了头疼是什么原因| 右侧后背疼是什么原因| 天行健下一句是什么| 脑膜炎是什么原因引起的| 女生男相的是什么命| 经期喝什么汤| 什么是暗网| 猫能吃什么水果| 1995年属猪的是什么命| 女性虚火旺吃什么下火| 外快是什么意思| 呼吸困难吃什么药| 什么邮票最值钱| 什么是cin病变| 小腿酸痛什么原因| 无菌性前列腺炎吃什么药效果好| 白带黄绿是什么原因| 吃什么能提升免疫力| 睾丸疼是什么原因| 肺结节挂什么科室| 九死一生是指什么生肖| 武夷山岩茶属于什么茶| 有什么园| 9点到11点是什么经络| 松鼠喜欢吃什么食物| 什么是碳水化合物食物| 证候是什么意思| 许嵩为什么叫vae| 晨跑有什么好处| 埋怨是什么意思| 虾皮有什么营养价值| 大便一粒一粒的是什么原因| 老是肚子疼是什么原因| 腰酸痛挂什么科| 对偶句是什么意思| 风疹是什么原因引起的| 嗓子不舒服做什么检查| 布施蚂蚁什么食物最好| 褐色是什么颜色的图片| ptp是什么意思| 什么能让男人变大变长| classic是什么意思| 为什么会得灰指甲| 轻奢什么意思| 爬山虎是什么茎| 什么东西能加不能减| 良辰吉日什么意思| 检查肾脏挂什么科| 观音菩萨是属什么生肖| 孕妇喝椰子水有什么好处| 缺钾吃什么食物好| 稼穑是什么意思| 近亲结婚生的孩子会得什么病| 2002年属什么生肖| 沙眼用什么眼药水| 因加一笔是什么字| 人瘦了是什么原因| 田螺姑娘是什么意思| 重症医学科是干什么的| 细菌性阴道炎有什么症状| 月经推迟十天是什么原因| 花团锦簇什么意思| 霉菌反复发作是什么原因| 口上长水泡是什么原因| 什么东西有头无脚| 手腕疼去医院挂什么科| 绿豆和什么一起煮好| 七一年属什么| 1069是什么意思| 1954属什么生肖| 壶承是什么| 静脉曲张挂什么号| 橄榄油有什么作用| 外援是什么意思| 做颈动脉彩超挂什么科| 黄芪加陈皮有什么功效| flour是什么意思| 男人少一个睾丸有什么影响| 闻名的闻什么意思| 吐奶严重是什么原因| H 什么意思| 兔子可以吃什么| 奄奄一息的息是什么意思| 牛皮癣是什么| 8.23是什么星座| 抑郁到什么程度要吃氟西汀| 什么知什么明| 抑郁症吃什么药| 毒唯什么意思| 临官是什么意思| 大乔叫什么| 运筹帷幄是什么意思| 条件反射是什么意思| 微醺是什么状态| 豆包什么意思| 1月22日是什么星座| 腹泻挂什么科| 七五年属什么| 过生日吃什么菜| 魑魅魍魉是什么意思| 8.2号是什么星座| 嗓子疼喝什么饮料| 清新是什么意思| mpa是什么单位| 吃什么可以流产| 发霉是什么菌| 小孩子手脚脱皮是什么原因| pid是什么意思| 95511是什么号码| z是什么品牌| 女性更年期挂什么科| 癌胚抗原是什么意思| 小精灵是什么意思| 黄芪丹参山楂泡水有什么功效| 嗓子干吃什么药| h5是什么意思| 孕妇生气对胎儿有什么影响| 梦到认识的人死了是什么意思| 什么一什么什么成语| 1978年属什么生肖| 排长是什么军衔| 钻石是什么材质| 掉头发是身体缺少什么| 糖尿病人可以吃什么水果| s999是什么意思| 无花果不能和什么一起吃| 胎盘位置低有什么危险| 蚊子咬了涂什么| 为什么会感染hpv| 腺肌症是什么意思| 眼睛有重影是什么原因| 太阳一晒脸就红是什么原因| 什么叫牙齿根管治疗| 梦见自己尿裤子了是什么意思| 57年的鸡是什么命| 阴道有豆腐渣用什么药| 苍蝇馆子什么意思| 什么叫姑息治疗| 危楼是什么意思| 车前草有什么功效和作用| 寄大件用什么物流便宜| 男人少一个睾丸有什么影响| 荟萃是什么意思| 甲胎蛋白增高说明什么| 刚出生的宝宝要注意什么| 贫血吃什么比较好| 粉荷花的花语是什么| 没学历可以学什么技术| 补丁是什么意思| 补体c3偏高说明什么| 木樨是什么意思| 胆汁反流是什么原因| 梅花什么时候开| 杜牧号什么| 巴基斯坦是什么语言| 乳腺结节吃什么| 杨梅有什么好处| 白细胞高是什么意思| 土猪肉和普通猪肉有什么分别| 骨科属于什么科| 奶水不足是什么原因造成的| 利妥昔单抗是治什么病| 锐减是什么意思| 上面白下面本念什么| 隐翅虫皮炎用什么药| 血虚吃什么中成药最好| 30岁属什么| 办身份证穿什么颜色衣服| 微博id是什么| 7月1日是什么日子| 欧金金什么意思| 配偶什么意思| 早餐吃什么英语怎么说| 老人高烧不退是什么原因| 心脏病是什么原因引起的| 是对什么| 5月10号是什么星座| manu是什么意思| 肝胆湿热吃什么药| 怀孕建档是什么意思| 百合什么时候开花| 什么桥下没有水脑筋急转弯| 水垢是什么| 神经梅毒有什么症状| 女生什么时候是排卵期| 什么情况下需要安装心脏起搏器| 儿童过敏性咳嗽吃什么药| 蝉的幼虫叫什么| 桃胶是什么| 亦金读什么| 长白头发缺什么维生素| 花瓣是什么意思| 胃疼胃胀用什么药效果最好| 总是耳鸣是什么原因| 梅核气吃什么药能除根| 黑胡桃色是什么颜色| 嗓子痛吃什么药| 春眠不觉晓的晓是什么意思| 睡觉头出汗是什么原因| 一个大一个多念什么| 适合是什么意思| 血小板偏高是什么原因| 三国之前是什么朝代| 西瓜可以做成什么美食| 吃什么能快速降血压| 随波逐流是什么意思| 气短吃什么药立马见效| 94年什么生肖| 喝咖啡对身体有什么好处| 大钱疮抹什么药膏好使| 馋是什么意思| 肾窦分离是什么意思| 代谢慢是什么原因| 不议价什么意思| 乙肝表面抗体高是什么意思| 咳嗽可以吃什么水果| 嗓子疼吃什么水果好得快| 超滤是什么意思| 餐饮sop是什么意思| 韦编三绝是什么意思| 眼珠子发黄是什么原因| 与狼共舞什么意思| 夏季风寒感冒吃什么药| 养神经吃什么食物最好| 尿酸是什么| 肾精亏虚吃什么药最好| 怀孕一个月吃什么对宝宝发育好| 什么动物不怕热| 1977年属什么生肖| 高密度脂蛋白胆固醇偏低什么意思| 飞机杯什么感觉| 中医为什么不让睡凉席| 亭台楼阁是什么意思| 大限将至什么意思| 脚底出汗是什么原因女| 尿检阳性是什么意思| 7月5号什么星座| 现字五行属什么| 对峙是什么意思| 肌钙蛋白高是什么原因| 什么样的吸尘器比较好| 出殡下雨是什么兆头| 属牛的守护神是什么菩萨| 什么叫败血症| 百度

Try to extend agent mode in VS Code!

《颐养有道》公益养生讲座

百度 使用频繁的墨盒,子口与砚板容易破损,甚至脱落,盒底容易磕碰变形,出现内陷、磨穿。

This tutorial walks you through using Copilot Chat in Visual Studio Code. You use AI-powered chat conversations to help with refactoring code, improving your code understanding, and finding your way around configuring VS Code.

If you're new to using Copilot in VS Code, see the Copilot Overview or get set up and discover the key capabilities in the Copilot Quickstart.

Tip

If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for the Copilot Free plan and get a monthly limit of completions and chat interactions.

Prerequisites

To use GitHub Copilot in VS Code, you need to have the following:

  • Access to GitHub Copilot
  • GitHub Copilot extensions installed in VS Code

Follow the steps in the GitHub Copilot set up guide to get access to GitHub Copilot and install the Copilot extensions in VS Code.

Get your first chat conversation

Copilot Chat lets you interact with GitHub Copilot by using natural language, to ask and receive answers to coding-related questions.

In this tutorial, you'll be creating a simple Node.js web application.

  1. Open a new VS Code window. You'll be creating a new workspace in a follow-up step.

  2. Select Open Chat from the Copilot menu in the title bar or use the ??I (Windows, Linux Ctrl+Alt+I) keyboard shortcut.

    Screenshot of VS Code editor, showing the Copilot Chat view, highlighting the chat menu in the Command Center.

    Notice that the Chat view opens in the Secondary Side Bar. Having the Chat view on the side allows you to keep the conversation going while you work on your code.

  3. In the Chat view, select Ask from the chat mode dropdown.

    Use ask mode to ask Copilot questions about coding and technology topics, explain code, or brainstorm ideas.

    Screenshot of VS Code Copilot Chat view, showing the Ask mode dropdown.

  4. Let's ask Copilot about popular web frameworks. Enter "what are the most popular web frameworks?" in the chat input field.

    Copilot returns a list of popular web frameworks. Experiment with asking follow-up questions to get more information about a specific framework, or to compare frameworks. For example, you can ask "what are the differences between Express and Fastify?" or "how to do server-side rendering?".

  5. To scaffold a new web app, enter "new express app with typescript and pug" in the chat input field.

    Notice how Copilot returns a file tree that represents the new workspace files. Select any file in the file tree to preview its content.

    Screenshot of VS Code Copilot Chat view, showing a file tree for a new workspace and a 'Create Workspace' button.

  6. Select Create Workspace to create the app, and select a folder on disk where the workspace should be created.

    Select Open in the dialog to open the newly-created workspace in VS Code.

    Note

    VS Code might ask if you want to trust the new workspace. Select Yes, I trust the contents to trust the workspace. Get more details about workspace trust.

Stay in the flow with inline chat

While the Chat view is great for keeping a conversation going, editor inline chat is optimized for situations where you want to ask Copilot about the code you're actively working on in the editor. For example, to refactor a specific piece of code, or explain a complex algorithm.

Let's look at how to use editor inline chat for code refactoring.

  1. Open the app.ts file and use the ?I (Windows, Linux Ctrl+I) keyboard shortcut to bring up editor inline chat. Alternatively, select Editor Inline Chat from the Copilot menu in the title bar.

    A chat input field appears inline in the editor, where you can enter your chat prompt and ask Copilot about the code in the editor.

    Screenshot of VS Code editor, highlighting the Inline Chat popup control.

  2. Enter "Add support for JSON output" in the chat input field and press Enter.

    Notice how Copilot provides a code suggestion to add support for JSON output in Express.

    Screenshot of VS Code editor with the suggested code change.

  3. Select Accept or Close to apply or ignore the changes.

    If you're not happy with the suggested code changes, you can select the Rerun Request control or ask a follow-up question to get another suggestion.

Tip

Right-click in the editor and select the Copilot context menu to access commonly used Copilot commands, such as fixing or explaining code or generating tests.

Make edits across multiple files

With inline chat, you made changes to a single file. You can also use Copilot to make changes across multiple files in your workspace by switching to edit mode in the Chat view.

Let's use edit mode to use a .env file to store the configuration for your web app.

  1. Open the Chat view and select Edit from the chat mode dropdown.

    Screenshot of VS Code Copilot Chat view, showing the Edit mode dropdown.

  2. To help Copilot understand the scope of your request, let's add package.json and app.ts as context to the prompt.

    1. Select Add Context in the Chat view, type package in the search field, and select the package.json file from the list of files. Notice that there are many types of context you can add.

    2. Open the app.ts file in the editor, and notice that Copilot automatically adds the active file to the chat context.

  3. Enter "Use a .env file for configuration" in the chat input field and press Enter.

  4. Notice how Copilot makes updates across multiple files and adds a new .env file to your workspace.

    The Chat view shows the files that were changed in bold text in the Chat view.

    Screenshot of VS Code editor, showing the suggested code change in the app.ts file.

  5. Select Keep in the Chat view to confirm all suggested changes.

    Use the overlay controls in the editor to easily navigate and review the individual changes across your files.

Start an agentic coding flow

For more complex requests, you can use agent mode to let Copilot autonomously plan and execute the tasks that are needed to complete your request. These tasks can involve editing code but also include running commands in the terminal. In agent mode, Copilot might invoke different tools to accomplish the task.

Let's use agent mode to make the web app about sharing travel tips and add testing.

  1. Open the Chat view and select Agent from the chat mode dropdown.

    Screenshot of VS Code Copilot Chat view, showing the Agent mode dropdown.

  2. Enter "Make the app a travel blog. Add tests to avoid code regression." in the chat input field and press Enter.

    Note that you don't need to add context to your prompt. Agent mode automatically analyzes the code in your workspace.

  3. Copilot iterates to apply code changes and run commands like running tests. Confirm terminal commands by selecting Continue in the Chat view.

    Screenshot of VS Code editor, showing the Chat view asking to confirm running tests in the terminal.

    Depending on the complexity of your request, Copilot might take a few minutes to complete all tasks. If it encounters issues along the way, it iterates to fix them.

  4. Once Copilot completes the tasks, review the changes, and test the app.

    You can also ask Copilot to run the app by giving it a prompt like "Run the app" or "Start the server".

Congratulations

Congratulations, you successfully used Copilot Chat in VS Code to ask questions and make code edits across your workspace. Continue to experiment with different prompts and chat modes to get the most out of Copilot Chat.

Additional resources

林冲为什么叫豹子头 什么事每人每天都必须认真的做 毛主席什么时候死的 刀客是什么意思 内热外寒感冒用什么药
儿童流鼻血什么原因引起的 皮肤过敏不能吃什么食物 不什么 月经第二天是什么期 晚上睡不着白天睡不醒是什么原因
敢爱敢恨是什么意思 霉菌孢子是什么意思 葡萄和提子有什么区别 juicy是什么意思 小孩喜欢趴着睡觉是什么原因
5月10号是什么星座 乙肝属于什么科 elf是什么意思 food什么意思 牡丹什么时候开
儿童便秘吃什么最管用hcv8jop7ns7r.cn 花甲不能和什么一起吃hcv8jop4ns5r.cn 两极分化是什么意思hcv8jop8ns6r.cn 心肌供血不足吃什么hcv7jop9ns2r.cn 成功是什么hlguo.com
葡萄籽什么牌子效果好hcv8jop0ns2r.cn 痛风喝什么茶最好hcv7jop6ns2r.cn 采是什么意思hcv8jop4ns5r.cn 有什么不能说hcv9jop7ns0r.cn 精囊炎吃什么药baiqunet.com
特别容易饿是什么原因0735v.com 马卡龙为什么这么贵hcv9jop5ns5r.cn 晕车喝什么饮料hcv9jop0ns1r.cn 小拇指有痣代表什么hcv8jop5ns7r.cn 乌龙茶是什么茶hcv7jop9ns9r.cn
医德是什么hcv8jop0ns1r.cn 嗓子疼不能吃什么hcv8jop8ns2r.cn 什么是足金hcv8jop4ns7r.cn 五月二十六是什么星座fenrenren.com 十万个为什么内容hcv9jop5ns4r.cn
百度