# 便利なファイルのピン留め

[![](https://img.shields.io/badge/Lv2-Practically_Viable_Pattern-green)](https://github.com/orgs/AI-Native-Development/projects/1/)

## Description

GitHub Copilot の性能は、提供されるコンテキストに依存します。GitHub Copilot はテキストの類似性で開いているタブを検索し、大規模言語モデルにスニペットを送信します。したがって、私たちは AI に提供したいコンテキストを慎重に考える必要があります。プログラミングでは、宣言ファイル（d.ts）、テストファイル、インターフェイスファイルなどが豊富なコンテキスト情報を含んでいます。Visual Studio Codeのピン留め機能を使用すると、これらのファイルを必要に応じて簡単にアクセスし、GitHub Copilotに効率的に情報を提供できます。

### Example

Visual Studio Codeでファイルをピン留めする方法は次のとおりです:

1. ピン留めしたいファイルを開きます。
2. ファイルタブ上で右クリックします。
3. コンテキストメニューから"Pin Tab"を選択します。

## Exercise

* **エクササイズ 1**: 現在のプロジェクトで宣言ファイル（例: `.d.ts`ファイル）をピン留めし、GitHub Copilotと一緒に作業する際にアクセスが容易になることに注目してください。
* **エクササイズ 2**: 新しいインターフェイスファイルを作成し、ピン留めします。GitHub Copilotがこのファイルをどのように利用してより良いコード提案ができるのか探究してください。
* **エクササイズ 3**: プロジェクト内で複数のテストファイルをピン留めし、Copilotの助けを借りて新しいテストケースを書く際にどのように助けになるか観察してください。

## Checklist for Further Learning

* ピン留めするファイルの種類を変えると、GitHub Copilot との作業フローにどのような影響がありますか?
* Visual Studio Codeの他の機能は、GitHub Copilot との経験を向上させるためにどう活用できますか?
* 大量のピン留めファイルを管理して、常に GitHub Copilot に適切なコンテキストが利用可能であるようにするにはどうすればよいですか?


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-native-development.gitbook.io/docs/ja/client-side-tips/pin-the-file-you-need.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
