菜鸟裹裹是什么快递| 什么的烤鸭| 黄药是什么| 榴莲吃多了有什么坏处| 牙周炎用什么药最好| 身体缺酶会得什么病| 咳嗽可以吃什么水果| 端午节吃什么菜呢| 甲胎蛋白是什么指标| 胎儿双顶径是什么意思| 黄瓜有什么营养| 蜜蜂的天敌是什么| 奇花异草的异什么意思| 工作效率是什么意思| 血压低头疼是什么原因| 浮屠是什么意思| 近视是什么原因造成的| 戊是什么生肖| 追龙什么意思| 走路腰疼是什么原因| 什么食物含维生素c最多| 什么是毛囊炎及症状图片| 乌岽单丛是什么茶| 勤字五行属什么| 心肌缺血吃什么食物好| 晚上8点是什么时辰| 甲减和甲亢有什么区别| 没有力气是什么原因| 小妮子是什么意思| 女人喝枸杞水有什么好处| 属马的生什么属相的宝宝好| 脂蛋白a高是什么意思| 胃反酸烧心吃什么药| 7月30号什么星座| 门字五行属什么| 腮腺炎吃什么消炎药| 味美思是什么酒| 古埃及是什么人种| 红红火火是什么生肖| 盘古是一个什么样的人| 为什么额头反复长痘痘| 风热感冒用什么药好| 天宫是什么意思| 吃羊肉不能吃什么东西| 小孩舌头白是什么原因| 溃疡性结肠炎吃什么药| 11.5是什么星座| 肺结节什么东西不能吃| 杏花什么颜色| 四季更迭是什么意思| 手麻抽筋是什么原因引起的| 1958年属什么| apf是什么意思| 胃酸分泌过多吃什么药| 什么食物含维生素k最多| 梦见买猪肉是什么预兆| 蛋糕粉是什么面粉| 桑葚泡酒有什么功效| 牛油果什么味道| 高血糖吃什么药| 魂穿是什么意思| 血管瘤是什么意思| 头伏二伏三伏吃什么| 1是什么数| 小孩吃牛肉有什么好处| 什么克水| 喉咙痛吃什么药好得最快| 十二朵玫瑰花代表什么意思| 贫血吃什么药| 60年属什么| 9月14号是什么星座| 阿耨多罗三藐三菩提是什么意思| 产褥热是什么病| 月经不调有什么症状| 三千烦恼丝什么意思| 吃丝瓜有什么功效和作用| 女性雄激素过高是什么原因引起的| 香蕉对身体有什么好处| 无痕是什么意思| 铅笔为什么叫铅笔| 7.2是什么星座| 气球是什么意思| 79年属什么生肖| 开天眼是什么意思| 一个月一个泉是什么字| 金玉良缘什么意思| 青团是什么节日吃的| 正月初一是什么节日| 下肢动脉硬化吃什么药| 男人蛋皮痒用什么药| 如是是什么意思| louis是什么意思| 食禄是什么意思| 男人要的归属感是什么| ad是什么| 惊悸的意思是什么| ac是什么元素| 怀孕查甲功是什么意思| 手指头肿胀是什么原因| 火腿是什么动物的腿| 身上臭是什么原因| crp是什么检查项目| 心有戚戚焉什么意思| 吃什么可以健脾养胃| 甲状腺有什么危害| 想起我叫什么了吗| r是什么数| 一个牙一个合是什么字| 归脾丸治什么病| 小儿咳嗽吃什么药| ab型血和o型血生的孩子是什么血型| 这个季节吃什么水果| 阴道壁是什么样的| 金兰之交是什么意思| 调和油是什么油| 上海市长是什么级别| 吃完狗肉不能吃什么| 霜降吃什么| 悠悠岁月什么意思| 清朝是什么时候灭亡的| 支气管炎能吃什么水果| 尿潜血十一是什么意思| 爱的反义词是什么| 伏天吃羊肉有什么好处| 有所作为的意思是什么| 滑精是什么症状| 名什么中外| 办理无犯罪记录证明需要什么材料| 腮帮子长痘痘是什么原因| jerry英文名什么意思| 吃什么食物快速降糖| 脐橙是什么意思| 梦见蛀牙掉是什么预兆| 肺囊肿是什么病严重吗| 大便深褐色是什么原因| 巡演是什么意思| 肚子咕咕叫放屁多是什么原因| 皮脂腺囊肿用什么药膏| baleno是什么牌子| 客服是什么工作| 灵魂摆渡人是什么意思| 双鱼座是什么象星座| bjd是什么| 头晕视力模糊是什么原因| 现字五行属什么| 胆囊息肉是什么原因造成的| sdh是什么意思| h1v是什么意思| 压箱钱是什么意思| 内痔吃什么药| 脂血是什么意思| 蔬菜沙拉都放什么菜| 尿味大是什么原因| pm什么意思| 固液法白酒是什么意思| 6月15是什么星座| 阿姨是什么意思| 低密度脂蛋白偏高是什么意思| 贫血看什么科| 知柏地黄丸主治什么| 什么情况下需要做心脏支架| 海阔什么| rinnai是什么品牌| 维生素b族适合什么人吃| 维生素c阴性什么意思| 心脏供血不足是什么原因引起的| 74岁属什么生肖| 吃什么大便能特别通畅| 甲钴胺是什么| 善存片什么时候吃最好| 腿抽筋是什么原因造成的| 拍脑部ct挂什么科| 8月出生的是什么星座| 年柱将星是什么意思| 腹泻拉稀水是什么原因| pt什么意思| 什么年什么月| 大姨妈来吃什么好| 浅表性胃炎吃什么药| 女生的隐私部位长什么样| 什么枝什么叶| 梦见已故的父母是什么兆头| 蒲公英什么功效| 忠实的什么| 初吻是什么意思| 发物有什么| 替拉依是什么药| 曼波是什么意思| 儿童肚子疼挂什么科| 多巴胺分泌是什么意思| 什么是梅花肉| 尿微量白蛋白高是什么意思| 8月1号是什么星座| 八月十八号是什么星座| 甲减对胎儿有什么影响| 梦见自己鞋子破了是什么意思| 旅长是什么军衔| 为什么女生| 梦见拉麦子是什么预兆| 冰糖和白砂糖有什么区别| 北极熊为什么不怕冷| 胎脂是什么原因造成的| 喝胶原蛋白肽有什么好处| 阴道感染用什么药| 痰多吃什么好化痰| icicle是什么牌子| 囊性结构是什么意思| 蜂蜜变质是什么样子| 孩子专注力差去什么医院检查| 太阳鱼是什么鱼| bjd是什么| 女人肾阴虚吃什么药| 屁特别臭是什么原因| 早上起床眼睛浮肿是什么原因| 六合是什么意思| 锁骨是什么位置| 红薯叶不能和什么一起吃| 天使什么意思| 免疫组织化学染色诊断是什么| 离子检测是检查什么| 夏天脚开裂是什么原因| 西凤酒属于什么香型| au999是什么意思| 血脂高是什么原因引起的| 低压高是什么引起的| 老是说梦话是什么原因| 汪是什么意思| 西瓜霜是什么做的| 什么察秋毫| 醒酒最快的方法是什么| 真命题是什么意思| 肌酐高是什么问题| 肾痛在什么位置痛| 甲状腺看什么门诊| 切洋葱为什么会流泪| 绝膑而亡是什么意思| 爆菊花什么感觉| 空调除湿和制冷有什么区别| 女人吃桃子有什么好处和坏处| 话唠是什么意思| 碳酸氢钠是什么东西| 钛对人体有什么好处| 梦见蝴蝶是什么意思| 宝是什么意思| 真金白银是什么意思| 心肌梗塞有什么症状| 睡觉为什么要枕枕头| 下午一点到三点是什么时辰| 利可君片是什么药| 为什么牛肝便宜没人吃| 左旋肉碱是什么东西| 炸毛是什么意思| 胃出血大便是什么颜色| dq什么意思| 纤维是什么意思| 麻腮风疫苗是预防什么| 妈妈吃什么帮宝宝排气| 鬼谷子姓什么| 超霸是什么意思| cfa是什么证书| 阳虚吃什么药效果最好| 孩子黑眼圈很重是什么原因| 男性支原体阳性有什么症状| 珠联璧合是什么意思| 百度

Try to extend agent mode in VS Code!

微软天蝎座外观将沿袭 Xbox 设计风格 E3有更多惊喜

百度 ”科正石油产品质量检测有限公司负责人柯立表示,“前几年我国许多地方经常爆发严重雾霾,就是与汽车尾气排放严重超标密切相关。

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

牙齿为什么会痛 糖类抗原ca125偏高是什么原因 经常中暑是什么原因 胸部挂什么科 父亲节应该送什么
掉头发吃什么 枸杞和什么搭配壮阳 晟念什么字 五液是指什么 什么是春天的什么
鲜章是什么意思 龙女是什么意思 黄色配什么颜色 什么情况下需要会诊 c3是什么驾驶证
鳞状上皮乳头状瘤是什么 吃什么降三高最好 苍蝇吃什么食物 什么的田野 马镫什么时候发明的
平板电脑是什么hcv8jop9ns0r.cn 奶奶的姐姐叫什么hcv9jop4ns4r.cn 肾结石什么原因引起的hcv8jop4ns4r.cn 一般手脚慢进什么工厂hcv8jop2ns0r.cn 满清十大酷刑是什么hcv8jop5ns6r.cn
医保和社保有什么区别hcv8jop2ns1r.cn 夜盲症缺什么hcv9jop0ns8r.cn 痛风不能吃什么东西hcv9jop8ns1r.cn 培土什么意思96micro.com 拉稀吃什么药最有效果hcv8jop1ns0r.cn
病字旁加且念什么cl108k.com 水肿是什么原因hcv8jop7ns1r.cn 肠梗阻是什么意思hcv8jop4ns6r.cn 鼻涕倒流吃什么药效果好hcv8jop9ns7r.cn 兵马未动粮草先行是什么意思onlinewuye.com
七岁属什么生肖gangsutong.com 依非韦伦片治什么病的gysmod.com 雪蛤是什么hcv9jop5ns4r.cn 舌头变肥大什么原因hcv9jop1ns8r.cn 醋酸氯已定是什么药hcv8jop5ns5r.cn
百度