鱼油什么时间吃最好| 净土是什么意思| 热伤风是什么意思| 三级警督是什么级别| 16岁属什么| 坦诚相待下一句是什么| 月经不来又没怀孕是什么原因| 2月7号是什么星座| 难产是什么意思| 带状疱疹是什么样的| 砂仁为什么要后下| 空调外机风扇不转是什么原因| 胆结石不能吃什么食物| 看颈椎病挂什么科| 康膜的功效是什么| 为什么13周不让建卡了| 布洛芬是什么药| 梦见灵堂是什么预兆| 蛛网膜囊肿挂什么科| 市政协秘书长是什么级别| 双开什么意思| 0l是什么意思| 紫水晶属于五行属什么| 舌苔发黑是什么原因| 7月16日什么星座| 属猪的贵人属相是什么| 孕妇缺碘吃什么补最快| 左肾结晶是什么意思| 实至名归是什么意思| 心肌是什么意思| 什么是有机奶粉| 动脉硬化吃什么药| 婆什么起舞| 王八吃什么| 拉肚子去医院挂什么科| 吃什么东西可以变白| 皮革是什么材质| 新生儿为什么有黄疸| 坐地能吸土是什么意思| ab型血为什么叫贵族血| trendiano什么牌子| 升读什么字| 洁身自爱是什么意思| 利多卡因是什么药| 什么叫鳞状细胞| 大姨妈来吃什么好| 产妇吃什么下奶快又多| 健身吃什么长肌肉最快| 阑尾炎输液输什么药| 不孕为什么要查胰岛素| 神态是什么意思| 什么是白噪音| 龟头上抹什么药能延时| 读什么| 飞行模式和关机有什么区别| 保险费率是什么| 窝窝头是用什么做的| 名什么什么实| 高嘌呤是什么意思| 梓代表什么意思| 蓝姓是什么民族| wy是什么牌子| 小鹿乱撞是什么意思| 阴道口发白是什么原因| 随喜是什么意思| 清明节一般开什么生肖| 吃什么水果| 92年的属什么生肖| 爱情是什么感觉| 血脂高吃什么蔬菜好| 什么全什么美| 左室舒张功能减低吃什么药| 男人前列腺炎有什么症状表现| 碗打碎了预示着什么| 嘴唇干裂是什么原因引起的| 风餐露宿是什么生肖| 九天是什么意思| 春宵一刻值千金是什么意思| 肾有问题挂什么科| 羊肉不能和什么食物一起吃| 口若悬什么| 处女膜破了什么症状| 鸭锁骨是什么部位| 圆滑是什么意思| 广谱是什么意思| 眼睛发炎用什么眼药水| 喝藿香正气水不能吃什么| 全身骨显像是查什么的| 什么原因导致有幽门杆菌| 咳嗽吃什么药最好| bi是什么意思| 新加坡什么工作最挣钱| 睡觉就做梦是什么原因| 婴儿咳嗽用什么药| 什么是前列腺钙化| 心理学是什么| 柿子是什么颜色| 回民不能吃什么| 吃苹果有什么好处| 净身出户需要什么条件| 学兽医需要什么学历| colombo是什么牌子| 什么减肥药最安全| 定情信物是什么意思| 滋润是什么意思| 饭后呕吐是什么原因引起的| 长绒棉和全棉什么区别| 介怀是什么意思| 张飞的兵器是什么| 火加木是什么字| 金樱子配什么才壮阳| 2002年出生属什么| 怀孕吃叶酸有什么用| 20岁长白头发是什么原因造成的| 女人吃桃子有什么好处| 法国公鸡是什么牌子| 身体容易青紫是什么原因| 九寨沟在四川什么地方| 上位是什么意思| 口加一笔变成什么字| 蚊子长什么样| 内痔疮有什么症状| 什么动听四字词语| 盆腔炎吃什么消炎药| 挣扎是什么意思| 红玫瑰花语是什么意思| 痛风看什么科| 葫芦什么时候成熟| 天狼星在什么位置| surprise什么意思| 肺结节看什么科| 什么野菜| 睡眠质量差吃什么药| 舌头麻木是什么原因引起| 剁椒鱼头属于什么菜系| 鼻子老是出血是什么原因| 做大生化挂什么科| 黑眼圈是什么原因| 45岁属什么| 重庆为什么叫雾都| 生活老师是做什么的| 为什么会有白头发| 地域黑什么意思| 头发拉焦了有什么补救| 脾大对身体有什么影响| 机器学习是什么| 557是什么意思| 美人鱼是什么动物| 梦见很多小蛇是什么意思| 毫无保留什么意思| nu11是什么意思| 什么是spa| 晨五行属什么| 疝气看病挂什么科| 墨鱼是什么鱼| 改名字需要什么手续| 一级医院是什么医院| 静夜思是什么季节| 开颅手术有什么后遗症| 一什么尿| 坚壁清野什么意思| 手肿胀是什么原因| 五味杂陈什么意思| 蚊子除了吸血还吃什么| 万象更新是什么生肖| 2型糖尿病吃什么药降糖效果好| 菲妮迪女装是什么档次| 查血糖是什么检查项目| 喜爱的反义词是什么| 揽件是什么意思| 夏天感冒吃什么药| 空气炸锅什么牌子好| 豆汁什么味道| 肝弥漫性病变是什么意思| 鱿鱼炒什么好吃| 口腔溃疡一直不好是什么原因| 什么药不能一起吃| 拉屎擦屁股纸上有血什么原因| 尿酸高可以喝什么饮料| 维多利亚是什么意思| 肛门口瘙痒涂什么药膏| 公积金缴存基数是什么意思| 七月14号是什么星座| 排尿带血是什么原因| 宝宝咬人是什么原因| 过期药品属于什么垃圾| 身份证最后一位代表什么| 施字五行属什么| 什么什么万分| 什么叫尊重| 琀是什么意思| 发烧流鼻血是什么原因| 七什么什么什么成语| 一个木一个寿念什么| 什么是周记| 华伦天奴属于什么档次| 火山飘雪是什么菜| 什么身什么骨| 鸡蛋液是什么| 强劲的动物是什么生肖| 胰腺分泌什么| 梦见自己家盖房子是什么预兆| 严重失眠吃什么中成药| 梦见火是什么意思| 为什么会鬼压床| 影像科是做什么的| 吃什么补血贫血| 鼻子上火吃什么药| prog是什么意思| 脓疱疮是什么原因引起的| 凤冈锌硒茶属于什么茶| npv是什么病毒| 尿素氮偏高是什么意思| 女性得乙肝有什么症状| 鱼皮是什么鱼的皮| 什么叫占位病变| 一般炒什么菜放蚝油| 智齿发炎肿痛吃什么药| 大力丸是什么| 大姨妈没来是什么原因| 床垫选什么材质的好| 武汉有什么好玩的| 舌头起泡是什么原因| 零和博弈是什么意思| 肚子容易饿是什么原因| 三月27号是什么星座| 甲功五项能查出什么病| 青豆是什么豆| 漏蛋白是什么原因造成的| 扁肉是什么| 巴旦木是什么| 孝顺的真正含义是什么| 七月十三什么星座| crocs什么意思| cartier什么牌子| 孕前检查一般有什么项目| 你是什么| 藏语扎西德勒什么意思| 硒是什么意思| 莲蓬吃了有什么好处| 5s是什么意思| 阿苯达唑片是什么药| 护照补办需要什么材料| 颅压高有什么症状| 胃酸胃胀反酸水吃什么药| 阳萎早谢吃什么药最好| t11椎体在什么位置| 梦见摘菜是什么意思| 怀孕六个月出血是什么原因| 柯基犬为什么要断尾巴| 阑尾炎是什么原因引起的| 早上吃鸡蛋有什么好处| 地包天什么意思| 266什么意思| 东是什么生肖| 牙龈炎吃什么药| 宝宝缺钙吃什么补得快| 莲雾什么味道| 什么样的高山| 嗓子干疼吃什么药| slay是什么意思| 肠胃型感冒吃什么药| 一什么面包| 女孩喜欢什么礼物| 百度

Try to extend agent mode in VS Code!

4.15滴滴团购专场 简单粗暴的福利你值得....

百度   (七)承担机关统战工作,发挥党外干部和人才的积极作用。

This article provides tips and tricks to optimize your development experience for using GitHub Copilot in Visual Studio Code.

Checklist for using Copilot in VS Code

Use the following checklist to get the most out of Copilot:

  1. Choose the right tool. Use the tool that's optimized for editing, asking questions, or staying in the flow of writing code.

  2. Personalize Copilot. Use custom instructions to get code suggestions that match your style and coding practices.

  3. Write effective prompts and provide context. Get the most relevant responses.

  4. Index your workspace. Receive accurate responses to questions about your codebase.

  5. Choose your AI model. Choose between models for fast coding or planning/reasoning.

  6. Reuse prompts. Save time by saving and reusing task-specific prompts across your team.

Choose the right Copilot tool

Depending on your task, you can choose between different Copilot tools.

Tool Use case
Code completions Streamline coding while staying in the flow.
Receive inline suggestions for code snippets, variable names, and functions as you write them in the editor.
Chat Have an ongoing chat conversation for brainstorming design ideas or getting code suggestions, optionally calling on domain-specific chat participants.
Choose to apply specific code suggestions to your codebase.
Edits Use natural language to start a coding editing session.
Automatically apply large code changes across multiple files in your workspace.
Agent mode Implement high-level requirements by starting an agentic coding flow.
Copilot autonomously invokes multiple tools to plan and implement the code changes and tasks that are needed.

Personalize Copilot with instructions files

When Copilot generates code or answers questions, it tries to match your coding practices and preferences such as which libraries you use or how you name your variables. However, it might not always have enough context to do this effectively. For example, if you work with a specific framework version, you need to provide additional context in your prompts.

To enhance AI responses, you can use instructions files to provide contextual details about your team's coding practices, tools, or project specifics. You can then attach these instructions to your chat prompt, or have them applied automatically.

To enable instructions files for your workspace:

  1. Run the Chat: New Instructions File command from the Command Palette.

    This command creates a .instructions.md file in .github/instructions folder.

  2. Add your instructions in Markdown format to the file. For example:

    # Custom instructions for Copilot
    
    ## Project context
    This project is a web application built with React and Node.js.
    
    ## Indentation
    We use tabs, not spaces.
    
    ## Coding style
    Use camelCase for variable names and prefer arrow functions over traditional function expressions.
    
    ## Testing
    We use Jest for unit testing and Playwright for end-to-end testing.
    
  3. Optionally, add a glob pattern to the applyTo metadata field to specify which files the instructions apply to.

    ---
    applyTo: "**/*.ts"
    ---
    Coding practices for TypeScript files.
    ...
    

Get more details about using instructions files in VS Code.

Prompt engineering

You can enhance the quality of Copilot's responses by using effective prompts. A well-crafted prompt can help Copilot understand your requirements better and generate more relevant code suggestions.

  • Start general, then get specific.

    Generate a Calculator class.
    Add methods for addition, subtraction, multiplication, division, and factorial.
    Don't use any external libraries and don't use recursion.
    
  • Give examples of what you want.

    Generate a function that takes a string and returns the number of vowels in it.
    Example:
    findVowels("hello") returns 2
    findVowels("sky") returns 0
    
  • Break down complex tasks into simpler tasks.

    Instead of asking Copilot to generate a meal planner app, break it down into smaller tasks:

    • Generate a function that takes a list of ingredients and returns a list of recipes.
    • Generate a function that takes a list of recipes and returns a shopping list.
    • Generate a function that takes a list of recipes and returns a meal plan for the week.
  • Provide the right context, such as code selections, files, terminal output, and more.

    Example, use the #codebase variable to refer to the entire codebase:

    Where is the database connection string used in #codebase?
    
  • Iterate on your prompts.

    Provide follow-up prompts to refine or modify the response. For example:

    • "Write a function to calculate the factorial of a number."
    • "Don't use recursion and optimize by using caching."
    • "Use meaningful variable names."
  • Keep chat history relevant.

    Copilot uses history of the conversation to provide context. Remove past questions and responses from the history if they're not relevant. Or, start a new session if you want to change the context.

Get more details about prompt engineering.

Find practical examples of prompts to use with Copilot in the GitHub Copilot documentation.

Provide the right context and tools

Enrich your prompts with relevant context to get more accurate and relevant responses in chat. Withe the right tools, you can boost your developer productivity.

  • In agent mode, select the tools button to configure the tools you want to use or explicitly add then to your prompt.
  • Use #codebase to let Copilot find the right files automatically by performing a code search.
  • Use the #fetch tool to fetch content from a web page or use #githubRepo to perform a code search on a GitHub repository.
  • Reference files, folders, or symbols in your prompt by using #<file name>, #<folder name>, or #<symbol>.
  • Drag and drop files, folders, or editor tabs onto the chat prompt.
  • Add problems, test failures, or terminal output to your chat prompt for scenario-specific context.
  • Add images or screenshots to your prompt to let Copilot analyze the image.
  • In agent mode, prompt to preview your app to directly open it with the built-in simple browser.

When you use agent mode, Copilot autonomously finds the relevant files and context for you.

Get more details about adding context to chat prompts.

Reusable prompts

Prompt files enable you to save a prompt for a specific task with its context and instructions in a Markdown file. You can then attach and reuse that prompt in chat. If you store the prompt in your workspace, you can also share it with your team.

To create a reusable prompt:

  1. Create a prompt file with the Chat: New Prompt File command in the Command Palette.

    This command creates a .prompt.md file in the .github/prompts folder at the root of your workspace.

  2. Describe your prompt and relevant context in Markdown format.

    For example, use this prompt to generate a new React form component.

    Your goal is to generate a new React form component.
    
    Ask for the form name and fields if not provided.
    
    Requirements for the form:
    * Use form design system components: [design-system/Form.md](../docs/design-system/Form.md)
    * Use `react-hook-form` for form state management:
    * Always define TypeScript types for your form data
    * Prefer *uncontrolled* components using register
    * Use `defaultValues` to prevent unnecessary rerenders
    * Use `yup` for validation:
    * Create reusable validation schemas in separate files
    * Use TypeScript types to ensure type safety
    * Customize UX-friendly validation rules
    
  3. Optionally, add metadata about how to run the prompt in chat. Use the mode field to specify the chat mode, and the tools field to specify which agent mode tools to use.

    ---
    mode: 'agent'
    tools: ['githubRepo', 'codebase']
    description: 'Generate a new React form component'
    ---
    Your goal is to generate a new React form component based on the templates in #githubRepo contoso/react-templates.
    
    Requirements for the form:
    * Use form design system components: [design-system/Form.md](../docs/design-system/Form.md)
    * Use `react-hook-form` for form state management:
    * Always define TypeScript types for your form data
    
  4. Run the command by typing /, followed by the prompt file name in the chat input field.

    For example, type /new-react-form to run the prompt file named new-react-form.prompt.md.

Get started with prompt files.

Choose your AI model

Copilot offers different AI models to choose from. Some models are optimized for fast coding tasks, while others are better suited for slower planning and reasoning tasks.

Model type Models
Fast coding
  • GPT-4o
  • Claude Sonnet 3.5
  • Claude Sonnet 3.7
  • Gemini 2.0 Flash
Reasoning/planning
  • Claude Sonnet 3.7 Thinking
  • o1
  • o3-mini

Choose the model that best fits your needs by using the model picker in the chat input field.

Learn more about AI models for Copilot Chat in the GitHub Copilot documentation.

Workspace indexing

Copilot uses an index to quickly and accurately search your codebase for relevant code snippets. This index can either be maintained by GitHub or stored locally on your machine.

For GitHub repositories, you can use a remote index of your workspace, based on GitHub code search. This allows Copilot to search your entire codebase very quickly, even if the codebase is very large.

Get more details about workspace indexing.

梦见花椒是什么意思 保肝护肝吃什么药好 股票的量比是什么意思 眼睛发炎用什么眼药水 流产吃什么药
苍蝇馆子什么意思 etf什么意思 颅压高有什么症状 柠檬酸钠是什么 出国旅游需要什么手续和证件
梦到分手了是什么征兆 指甲断裂是什么原因 胎心胎芽最晚什么时候出现 入肉是什么意思 打摆子是什么病
带银子发黑是什么原因 国家电网需要什么专业 什么是小三阳 容祖儿老公叫什么名字 认命是什么意思
掌中宝是什么部位hcv8jop2ns1r.cn 为什么一吹空调就鼻塞hcv8jop6ns7r.cn 同人文什么意思hcv8jop7ns1r.cn 天麻与什么煲汤最好hcv9jop2ns3r.cn vm是什么意思hcv8jop0ns9r.cn
宫颈糜烂吃什么药hcv8jop1ns1r.cn 乳环是什么hcv9jop4ns5r.cn 牙龈出血什么原因hcv7jop5ns0r.cn 耳朵流血是什么原因hcv8jop9ns3r.cn 宇宙之外还有什么hcv9jop5ns4r.cn
鱼子酱是什么东西zhongyiyatai.com 年柱金舆是什么意思hcv8jop3ns0r.cn 心超是检查什么的wmyky.com cocoon是什么意思shenchushe.com 什么时间人流hcv8jop2ns2r.cn
口痰多是什么原因hcv8jop8ns8r.cn essence是什么意思hcv9jop1ns9r.cn 西安有什么美食hcv9jop3ns0r.cn 爱新觉罗是什么旗hcv7jop5ns5r.cn 一什么一什么hcv9jop5ns0r.cn
百度