프로젝트에 대한 구체적인 질문이나 일반적인 소프트웨어 관련 질문을 Copilot Chat에 문의할 수 있습니다. Copilot Chat에게 코드를 작성하고, 오류를 수정하고, 테스트를 작성하고, 문서 코드를 작성하도록 요청할 수도 있습니다.
위의 탭을 사용하여 Copilot Chat을(를) 사용하는 환경을 선택합니다.
다음 예제 프롬프트 중 일부는 채팅 참가자(@
앞), 슬래시 명령(/
앞) 또는 채팅 변수(#
앞)를 사용합니다. 프롬프트의 키워드에 대한 자세한 내용은 IDE에서 GitHub Copilot에 질문하기을(를) 참조하세요.
일반 소프트웨어 질문하기
일반적인 소프트웨어 관련 질문을 Copilot Chat에 문의할 수 있습니다. 예시:
tell me about nodejs web server frameworks
how to create an express app
@terminal how to update an npm package
프로젝트에 대해 질문
Copilot Chat에게 프로젝트에 대해 질문할 수 있습니다.
what sorting algorithm does this function use
@workspace how are notifications scheduled
#file:gameReducer.js #file:gameInit.js how are these files related
Copilot에게 올바른 컨텍스트를 제공하려면 다음 전략 중 일부를 시도해 보세요.
- 관련 코드 줄을 강조 표시합니다.
#selection
,#file
,#editor
,#codebase
또는#git
같은 채팅 변수를 사용합니다.@workspace
채팅 참가자를 사용합니다.
코드 작성
Copilot에게 코드 작성을 요청할 수 있습니다. 예시:
write a function to sum all numbers in a list
add error handling to this function
@workspace add form validation, similar to the newsletter page
Copilot이(가) 코드 블록을 반환하는 경우 응답에는 코드를 복사하거나 커서에 코드를 삽입하거나 새 파일 또는 터미널에 삽입하는 옵션이 포함됩니다.
GitHub Advanced Security 기능의 경고에 대한 질문
조직의 리포지토리에서 GitHub Advanced Security 기능(code scanning, secret scanning 및 Dependabot alerts)의 보안 경고에 대해 Copilot을 질문할 수 있습니다. 예시:
How would I fix this alert?
How many alerts do I have on this pull request?
Which line of code is this code scanning alert referencing?
What library is affected by this Dependabot alert?
새 프로젝트 설정
/new
슬래시 명령을 사용하여 새 프로젝트를 설정합니다. 예시:
/new react app with typescript
/new python django web application
/new node.js express server
Copilot은 디렉터리 구조를 제안하고 제안된 파일 및 콘텐츠를 만드는 버튼을 제공합니다. 제안된 파일을 미리 보려면 제안된 디렉터리 구조에서 파일 이름을 선택하세요.
/newNotebook
슬래시 명령을 사용하여 새 Jupyter Notebook을 설정합니다. 예시:
/newNotebook retrieve the titanic dataset and use Seaborn to plot the data
코드 수정, 개선 및 리팩터링
현재 파일에 오류가 있는 경우 /fix
슬래시 명령을 사용하여 Copilot에게 오류를 해결하도록 요청합니다.
코드를 개선하거나 리팩터링하기 위해 일반적인 요청을 할 수도 있습니다.
how would you improve this code?
translate this code to C#
add error handling to this function
테스트 작성
/tests
슬래시 명령을 사용하여 Copilot에게 활성 파일 또는 선택한 코드에 대한 테스트를 작성하도록 요청합니다. 예시:
/tests
/tests using the Jest framework
/tests ensure the function rejects an empty list
/tests
슬래시 명령은 기존 코드에 대한 테스트를 작성합니다. 코드를 작성하기 전에 테스트를 작성하려는 경우(테스트 기반 개발) /tests
명령을 생략합니다. 예시:
Add tests for a JavaScript function that should sum a list of integers
Visual Studio Code에 대한 질문하기
@vscode
채팅 참가자를 사용하여 Visual Studio Code에 대한 특정 질문을 할 수 있습니다. 예시:
@vscode tell me how to debug a node.js app
@vscode how do I change my Visual Studio Code colors
@vscode how can I change key bindings
명령줄에 대한 질문하기
@terminal
채팅 참가자를 사용하여 명령줄에 대한 특정 질문을 할 수 있습니다. 예시:
@terminal find the largest file in the src directory
- 마지막 명령과 오류를 설명하는
@terminal #terminalLastCommand
일반 소프트웨어 질문하기
일반적인 소프트웨어 관련 질문을 Copilot Chat에 문의할 수 있습니다. 예시:
tell me about nodejs web server frameworks
how to create an express app
how to update an npm package
프로젝트에 대해 질문
Copilot Chat에게 프로젝트에 대해 질문할 수 있습니다. Copilot에게 올바른 컨텍스트를 제공하려면 다음 전략 중 일부를 시도해 보세요.
- 관련 코드 줄을 강조 표시합니다.
- 관련 파일을 엽니다.
#file
를 사용하여 Copilot이 특정 파일을 참조하도록 지시합니다.#solution
을 사용하여 Copilot이 활성 파일을 참조하도록 지시합니다.
예시:
what sorting algorithm does this function use
#file:gameReducer.js what happens when a new game is requested
코드 작성
Copilot에게 코드 작성을 요청할 수 있습니다. 예시:
write a function to sum all numbers in a list
add error handling to this function
Copilot이(가) 코드 블록을 반환하는 경우 응답에는 코드를 복사하거나, 새 파일에 코드를 삽입하거나, 코드 출력을 미리 보는 옵션이 포함됩니다.
GitHub Advanced Security 기능의 경고에 대한 질문
조직의 리포지토리에서 GitHub Advanced Security 기능(code scanning, secret scanning 및 Dependabot alerts)의 보안 경고에 대해 Copilot을 질문할 수 있습니다. 예시:
How would I fix this alert?
How many alerts do I have on this pull request?
Which line of code is this code scanning alert referencing?
What library is affected by this Dependabot alert?
코드 수정, 개선 및 리팩터링
현재 파일에 오류가 있는 경우 /fix
슬래시 명령을 사용하여 Copilot에게 오류를 해결하도록 요청합니다.
코드를 개선하거나 리팩터링하기 위해 일반적인 요청을 할 수도 있습니다.
how would you improve this code?
translate this code to C#
add error handling to this function
테스트 작성
/tests
슬래시 명령을 사용하여 Copilot에게 활성 파일 또는 선택한 코드에 대한 테스트를 작성하도록 요청합니다. 예시:
/tests
/tests using the Jest framework
/tests ensure the function rejects an empty list
/tests
슬래시 명령은 기존 코드에 대한 테스트를 작성합니다. 코드를 작성하기 전에 테스트를 작성하려는 경우(테스트 기반 개발) /tests
명령을 생략합니다. 예시:
Add tests for a JavaScript function that should sum a list of integers
일반 소프트웨어 질문하기
일반적인 소프트웨어 관련 질문을 Copilot Chat에 문의할 수 있습니다. 예시:
tell me about nodejs web server frameworks
how to create an express app
how to update an npm package
프로젝트에 대해 질문
Copilot Chat에게 프로젝트에 대해 질문할 수 있습니다. Copilot에게 올바른 컨텍스트를 제공하려면 다음 전략 중 일부를 시도해 보세요.
- 관련 코드 줄을 강조 표시합니다.
- 관련 파일을 엽니다.
- 파일을 참조로 추가합니다. 파일 참조 사용 방법에 대한 자세한 내용은 IDE에서 GitHub Copilot에 질문하기을(를) 참조하세요.
@project
채팅 참가자를 사용합니다.
예시:
what sorting algorithm does this function use
how are these files related
(해당 파일에 대한 참조 포함)@project how are notifications scheduled
코드 작성
Copilot에게 코드 작성을 요청할 수 있습니다. 예시:
write a function to sum all numbers in a list
add error handling to this function
Copilot이(가) 코드 블록을 반환하는 경우 응답에는 코드를 복사하거나 커서에 코드를 삽입하는 옵션이 포함됩니다.
코드 수정, 개선 및 리팩터링
현재 파일에 오류가 있는 경우 /fix
슬래시 명령을 사용하여 Copilot에게 오류를 해결하도록 요청합니다.
코드를 개선하거나 리팩터링하기 위해 일반적인 요청을 할 수도 있습니다.
how would you improve this code?
translate this code to C#
add error handling to this function
테스트 작성
/tests
슬래시 명령을 사용하여 Copilot에게 활성 파일 또는 선택한 코드에 대한 테스트를 작성하도록 요청합니다. 예시:
/tests
/tests using the Jest framework
/tests ensure the function rejects an empty list
/tests
슬래시 명령은 기존 코드에 대한 테스트를 작성합니다. 코드를 작성하기 전에 테스트를 작성하려는 경우(테스트 기반 개발) /tests
명령을 생략합니다. 예시:
Add tests for a JavaScript function that should sum a list of integers
일부 예제 프롬프트에서는 GitHub 웹 사이트의 특정 컨텍스트에 있어야 합니다. 이러한 컨텍스트에 액세스하는 방법에 대한 자세한 내용은 다양한 컨텍스트에서 Copilot Chat에 질문하기를 참조하세요.
일반 소프트웨어 질문하기
일반적인 소프트웨어 관련 질문을 Copilot Chat에 문의할 수 있습니다. 예시:
tell me about nodejs web server frameworks
how to create an express app
what is the best way to update an npm package
리포지토리에 대한 질문하기
Copilot Chat에게 리포지토리에 대해 질문할 수 있습니다. 예시:
what is the purpose of this repository?
When was the most recent release?
Where is rate limiting implemented in our API?
What was the last merged PR by USERNAME
특정 파일 또는 기호에 대해 질문하기
특정 파일 또는 기호에 대해 Copilot Chat에 질문할 수 있습니다. 예시:
what sorting algorithm does this function use
how are these files related
what is the purpose of this function
기술 자료에 대한 질문하기
기술 자료에 대해 Copilot Chat에 질문할 수 있습니다. 예시:
How do I deploy a new application?
What's the process for creating a new REST API?
What are our best practices for logging?
특정 코드 조각에 대한 질문하기
특정 코드에 대해 Copilot Chat에 질문할 수 있습니다. 전체 파일 또는 특정 줄에 대해 질문할 수 있습니다. 예시:
전체 파일에 대해 질문하는 경우 다음과 같이 입력할 수 있습니다.
Explain this file.
How could I improve this code?
How can I test this script?
특정 줄에 대해 질문하는 경우 다음과 같이 입력할 수 있습니다.
Explain the function at the selected lines.
How could I improve this class?
Add error handling to this code.
Write a unit test for this method.
GitHub Advanced Security 경고에 대해 질문하기
GitHub Advanced Security 기능(code scanning, secret scanning, Dependabot alerts)을 통해 조직 내 리포지토리의 보안 경고에 대해 Copilot Chat에 질문할 수 있습니다. 예시:
How would I fix this alert?
How many alerts do I have on this pull request?
Which line of code is this code scanning alert referencing?
What library is affected by this Dependabot alert?
끌어오기 요청 시 Copilot Chat에 질문하기
끌어오기 요청 시 Copilot Chat에 질문할 수 있습니다. 질문은 끌어오기 요청의 다양한 요소와 관련이 있을 수 있습니다. 예를 들면 다음과 같습니다.
끌어오기 요청의 변경 내용 요약을 요청할 수 있습니다.
Summarize this PR for me.
Summarize the comments in this PR.
Summarize the changes in this PR.
끌어오기 요청 시 특정 파일의 변경 내용에 대해 질문할 수 있습니다.
What's the purpose of this file?
Why has this module been included?
끌어오기 요청 시 특정 줄의 변경 내용에 대해 질문할 수 있습니다.
What is "actorData" in this line?
Explain this "do..end" block.
워크플로가 실패한 이유를 묻는 메시지가 표시될 수 있습니다.
Tell me why this job failed
Suggest a fix for this error
특정 문제 또는 토론에 대해 Copilot Chat에 질문하기
특정 문제 또는 토론에 대해 Copilot Chat에 질문할 수 있습니다. 예시:
what is the purpose of this issue?
특정 커밋에 대해 Copilot Chat에 질문하기
특정 커밋에 대해 Copilot Chat에 질문할 수 있습니다. 예시:
what is the purpose of this commit?
what is the expected output of this commit?
what is the best way to test this commit?