diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..6f20c66 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,57 @@ +# Coding Guidelines + +## Introduction + +These are VS Code coding guidelines. Please also review our [Source Code Organisation](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) page. + +## Indentation + +We use tabs, not spaces. + +## Naming Conventions + +* Use PascalCase for `type` names +* Use PascalCase for `enum` values +* Use camelCase for `function` and `method` names +* Use camelCase for `property` names and `local variables` +* Use whole words in names when possible + +## Types + +* Do not export `types` or `functions` unless you need to share it across multiple components +* Do not introduce new `types` or `values` to the global namespace + +## Comments + +* When there are comments for `functions`, `interfaces`, `enums`, and `classes` use JSDoc style comments + +## Strings + +* Use "double quotes" for strings shown to the user that need to be externalized (localized) +* Use 'single quotes' otherwise +* All strings visible to the user need to be externalized + +## Style + +* Use arrow functions `=>` over anonymous function expressions +* Only surround arrow function parameters when necessary. For example, `(x) => x + x` is wrong but the following are correct: + +```javascript +x => x + x +(x, y) => x + y +(x: T, y: T) => x === y +``` + +* Always surround loop and conditional bodies with curly braces +* Open curly braces always go on the same line as whatever necessitates them +* Parenthesized constructs should have no surrounding whitespace. A single space follows commas, colons, and semicolons in those constructs. For example: + +```javascript +for (let i = 0, n = str.length; i < 10; i++) { + if (x < 10) { + foo(); + } +} + +function f(x: number, y: string): void { } +``` diff --git a/.github/workflows/sync-awesome-copilot.yml b/.github/workflows/sync-awesome-copilot.yml new file mode 100644 index 0000000..8997ab1 --- /dev/null +++ b/.github/workflows/sync-awesome-copilot.yml @@ -0,0 +1,119 @@ +name: 同步 Awesome GitHub Copilot 檔案 + +on: + schedule: + # 每天 UTC 00:00 執行 (台北時間早上 8:00) + - cron: '0 0 * * *' + workflow_dispatch: # 允許手動觸發 + +jobs: + sync-awesome-copilot: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout 目前的 repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: 配置 Git 使用者資訊 + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + - name: 建立臨時目錄 + run: mkdir -p /tmp/awesome-copilot + + - name: Clone Awesome GitHub Copilot repository + run: | + git clone --depth 1 https://github.com/github/awesome-copilot.git /tmp/awesome-copilot + + - name: 同步 chatmodes 資料夾 + run: | + # 移除舊的資料夾並建立新的 + rm -rf chatmodes .github/chatmodes + mkdir -p .github/chatmodes + + # 複製檔案 + if [ -d "/tmp/awesome-copilot/chatmodes" ]; then + cp -r /tmp/awesome-copilot/chatmodes/* .github/chatmodes/ + echo "✅ 成功同步 chatmodes 資料夾" + else + echo "⚠️ 來源 chatmodes 資料夾不存在" + fi + + - name: 同步 instructions 資料夾 + run: | + # 移除舊的資料夾並建立新的 + rm -rf instructions .github/instructions + mkdir -p .github/instructions + + # 複製檔案 + if [ -d "/tmp/awesome-copilot/instructions" ]; then + cp -r /tmp/awesome-copilot/instructions/* .github/instructions/ + echo "✅ 成功同步 instructions 資料夾" + else + echo "⚠️ 來源 instructions 資料夾不存在" + fi + + - name: 同步 prompts 資料夾 + run: | + # 移除舊的資料夾並建立新的 + rm -rf prompts .github/prompts + mkdir -p .github/prompts + + # 複製檔案 + if [ -d "/tmp/awesome-copilot/prompts" ]; then + cp -r /tmp/awesome-copilot/prompts/* .github/prompts/ + echo "✅ 成功同步 prompts 資料夾" + else + echo "⚠️ 來源 prompts 資料夾不存在" + fi + + - name: 同步 agents 資料夾 + run: | + # 移除舊的資料夾並建立新的 + rm -rf agents .github/agents + mkdir -p .github/agents + + # 複製檔案 + if [ -d "/tmp/awesome-copilot/agents" ]; then + cp -r /tmp/awesome-copilot/agents/* .github/agents/ + echo "✅ 成功同步 agents 資料夾" + else + echo "⚠️ 來源 agents 資料夾不存在" + fi + + - name: 清理臨時檔案 + run: rm -rf /tmp/awesome-copilot + + - name: 檢查是否有變更 + id: changes + run: | + git add . + if git diff --staged --quiet; then + echo "no_changes=true" >> $GITHUB_OUTPUT + echo "📍 沒有檔案變更" + else + echo "no_changes=false" >> $GITHUB_OUTPUT + echo "📝 發現檔案變更" + git status --porcelain + fi + + - name: 提交並推送變更 + if: steps.changes.outputs.no_changes == 'false' + run: | + git commit -m "🔄 自動同步 Awesome GitHub Copilot 檔案 $(date +'%Y-%m-%d %H:%M:%S')" + git push + echo "🚀 變更已成功推送" + + - name: 顯示同步結果 + run: | + echo "🎉 同步作業完成!" + echo "📊 檔案統計:" + echo " chatmodes: $(find .github/chatmodes -name '*.md' 2>/dev/null | wc -l) 個檔案" + echo " instructions: $(find .github/instructions -name '*.md' 2>/dev/null | wc -l) 個檔案" + echo " prompts: $(find .github/prompts -name '*.md' 2>/dev/null | wc -l) 個檔案" + echo " agents: $(find .github/agents -name '*.md' 2>/dev/null | wc -l) 個檔案" \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e9db17f --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Temporary files +.DS_Store +Thumbs.db + +# Logs +*.log + +# OS generated files +ehthumbs.db +Desktop.ini + +# Node modules (if any) +node_modules/ + +# Keep synced folders +!chatmodes/ +!instructions/ +!prompts/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 08d04ad..6b868c7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,25 +23,21 @@ "window.commandCenter": true, "chat.commandCenter.enabled": true, - "github.copilot.selectedCompletionModel": "gpt-4o-copilot", - "github.copilot.editor.enableAutoCompletions": true, + // 目前 gpt-41-copilot 已經是預設值,但明確設定可確保一致性 + "github.copilot.selectedCompletionModel": "gpt-41-copilot", "github.copilot.editor.enableCodeActions": true, "github.copilot.renameSuggestions.triggerAutomatically": true, "workbench.commandPalette.experimental.askChatLocation": "chatView", - "github.copilot.chat.search.semanticTextResults": true, + "search.searchView.semanticSearchBehavior": "runOnEmpty", "github.copilot.nextEditSuggestions.enabled": true, "editor.inlineSuggest.edits.showCollapsed": true, // GitHub Copilot Chat - "github.copilot.chat.followUps": "always", "github.copilot.chat.localeOverride": "zh-TW", "github.copilot.chat.useProjectTemplates": true, "github.copilot.chat.scopeSelection": true, - "chat.detectParticipant.enabled": true, + "chat.detectParticipant.enabled": false, "chat.promptFiles": true, - "chat.promptFilesLocations": { - ".github/prompts": true - }, "github.copilot.chat.languageContext.typescript.enabled": true, "github.copilot.chat.agent.thinkingTool": true, // GitHub Copilot Chat - 內嵌聊天 (Inline Chat) @@ -88,7 +84,7 @@ // GitHub Copilot Chat - 自訂 Git Commit 訊息提示 "github.copilot.chat.commitMessageGeneration.instructions": [ { - "text": "# Conventional Commits 1.0.0\r\n\r\n## Summary\r\n\r\nThe Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with [SemVer](http://semver.org/), by describing the features, fixes, and breaking changes made in commit messages.\r\n\r\nThe commit message should be structured as follows:\r\n\r\n* * * * *\r\n\r\n```\r\n[optional scope]: \r\n\r\n[optional body]\r\n\r\n[optional footer(s)]\r\n```\r\n\r\n* * * * *\r\n\r\nThe commit contains the following structural elements, to communicate intent to the consumers of your library:\r\n\r\n1. **fix:** a commit of the *type* `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning).\r\n2. **feat:** a commit of the *type* `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning).\r\n3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). A BREAKING CHANGE can be part of commits of any *type*.\r\n4. *types* other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.\r\n5. *footers* other than `BREAKING CHANGE: ` may be provided and follow a convention similar to [git trailer format](https://git-scm.com/docs/git-interpret-trailers).\r\n\r\nAdditional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.\r\n\r\n## Examples\r\n\r\n### Commit message with description and breaking change footer\r\n\r\n```\r\nfeat: allow provided config object to extend other configs\r\n\r\nBREAKING CHANGE: `extends` key in config file is now used for extending other config files\r\n```\r\n\r\n### Commit message with `!` to draw attention to breaking change\r\n\r\n```\r\nfeat!: send an email to the customer when a product is shipped\r\n```\r\n\r\n### Commit message with scope and `!` to draw attention to breaking change\r\n\r\n```\r\nfeat(api)!: send an email to the customer when a product is shipped\r\n```\r\n\r\n### Commit message with both `!` and BREAKING CHANGE footer\r\n\r\n```\r\nchore!: drop support for Node 6\r\n\r\nBREAKING CHANGE: use JavaScript features not available in Node 6.\r\n```\r\n\r\n### Commit message with no body\r\n\r\n```\r\ndocs: correct spelling of CHANGELOG\r\n```\r\n\r\n### Commit message with scope\r\n\r\n```\r\nfeat(lang): add Polish language\r\n```\r\n\r\n### Commit message with multi-paragraph body and multiple footers\r\n\r\n```\r\nfix: prevent racing of requests\r\n\r\nIntroduce a request id and a reference to latest request. Dismiss\r\nincoming responses other than from latest request.\r\n\r\nRemove timeouts which were used to mitigate the racing issue but are\r\nobsolete now.\r\n\r\nReviewed-by: Z\r\nRefs: #123\r\n```\r\n\r\n## Specification\r\n\r\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).\r\n\r\n1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.\r\n2. The type `feat` MUST be used when a commit adds a new feature to your application or library.\r\n3. The type `fix` MUST be used when a commit represents a bug fix for your application.\r\n4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`\r\n5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., *fix: array parsing issue when multiple spaces were contained in string*.\r\n6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.\r\n7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.\r\n8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:` or `#` separator, followed by a string value (this is inspired by the [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)).\r\n9. A footer's token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.\r\n10. A footer's value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.\r\n11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.\r\n12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., *BREAKING CHANGE: environment variables now take precedence over config files*.\r\n13. If included in the type/scope prefix, breaking changes MUST be indicated by a `!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.\r\n14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., *docs: update ref docs.*\r\n15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.\r\n16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.\r\n\r\n## Why Use Conventional Commits\r\n\r\n- Automatically generating CHANGELOGs.\r\n- Automatically determining a semantic version bump (based on the types of commits landed).\r\n- Communicating the nature of changes to teammates, the public, and other stakeholders.\r\n- Triggering build and publish processes.\r\n- Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.\r\n\r\n## FAQ\r\n\r\n### How should I deal with commit messages in the initial development phase?\r\n\r\nWe recommend that you proceed as if you've already released the product. Typically *somebody*, even if it's your fellow software developers, is using your software. They'll want to know what's fixed, what breaks etc.\r\n\r\n### Are the types in the commit title uppercase or lowercase?\r\n\r\nAny casing may be used, but it's best to be consistent.\r\n\r\n### What do I do if the commit conforms to more than one of the commit types?\r\n\r\nGo back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.\r\n\r\n### Doesn't this discourage rapid development and fast iteration?\r\n\r\nIt discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.\r\n\r\n### Might Conventional Commits lead developers to limit the type of commits they make because they'll be thinking in the types provided?\r\n\r\nConventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.\r\n\r\n### How does this relate to SemVer?\r\n\r\n`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.\r\n\r\n### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?\r\n\r\nWe recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!)\r\n\r\n### What do I do if I accidentally use the wrong commit type?\r\n\r\n#### When you used a type that's of the spec but not the correct type, e.g. `fix` instead of `feat`\r\n\r\nPrior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.\r\n\r\n#### When you used a type *not* of the spec, e.g. `feet` instead of `feat`\r\n\r\nIn a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.\r\n\r\n### Do all my contributors need to use the Conventional Commits specification?\r\n\r\nNo! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged---adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.\r\n\r\n### How does Conventional Commits handle revert commits?\r\n\r\nReverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?\r\n\r\nConventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of *types* and *footers* to develop their logic for handling reverts.\r\n\r\nOne recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:\r\n\r\n```\r\nrevert: let us never again speak of the noodle incident\r\n\r\nRefs: 676104e, a215868\r\n```" + "text": "# Use Conventional Commits 1.0.0 for commit messages." }, { "text": "請一律使用正體中文來撰寫記錄" @@ -112,7 +108,7 @@ // GitHub Copilot Chat - Agent Mode "chat.agent.enabled": true, - "chat.agent.maxRequests": 50, + "chat.agent.maxRequests": 100, "github.copilot.chat.agent.runTasks": true, "github.copilot.chat.codesearch.enabled": true, "github.copilot.chat.newWorkspaceCreation.enabled": true, @@ -136,9 +132,9 @@ "accessibility.voice.autoSynthesize": "off", // accessibility.voice.keywordActivation 預設為 off,習慣用語音輸入可以改為 chatInContext // "accessibility.voice.keywordActivation": "chatInContext", - "accessibility.voice.speechTimeout": 1200, + "accessibility.voice.speechTimeout": 10000, "accessibility.voice.ignoreCodeBlocks": true, // Live Preview - "livePreview.autoRefreshPreview": "On Changes to Saved Files", + "livePreview.autoRefreshPreview": "On Changes to Saved Files" } diff --git a/README.md b/README.md index 30e013b..c072304 100644 --- a/README.md +++ b/README.md @@ -107,18 +107,12 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 設定在**所有檔案**啟用 GitHub Copilot 功能,但停用「**純文字**」檔案類型。 - * `github.copilot.selectedCompletionModel` 設定為 `gpt-4o-copilot` + * `github.copilot.selectedCompletionModel` (可選設定) - GitHub Copilot 預設自動補全的模型為 `copilot-codex` (GPT-3.5 Turbo),相較於今日的 GPT-4o 來說,相對比較弱。最近的 Insiders 增加了 `github.copilot.selectedCompletionModel` 選項設定,可以讓你調整為更聰明的 `gpt-4o-copilot` 模型。 + GitHub Copilot 目前預設自動補全的模型已經是 `gpt-41-copilot`,相較於過去的 `copilot-codex` (GPT-3.5 Turbo) 來說更加聰明。此設定現在通常不需要手動調整,除非你想要切換到其他可用的模型。 > 你也可以用 `F1` > `GitHub Copilot: Change Completion Model` 選擇。 - * `github.copilot.editor.enableAutoCompletions` 設定為 `true` - - 啟用程式碼自動補全功能,也就是 Inline 自動完成功能。 - - 因為自動完成功能經常會提供錯誤的提示,有些人會選擇關閉這個選項。 - * `github.copilot.editor.enableCodeActions` 設定為 `true` 控制 Copilot 命令在可用時是否顯示為 **Code Actions** (程式碼動作) @@ -139,13 +133,16 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 當你按下 `F1` 之後詢問 `Ask GitHub Copilot` 的結果要顯示在哪裡,選 `chatView` 就會留下提問記錄,若選 `quickChat` 就不會留下。 - * `github.copilot.chat.search.semanticTextResults` 設定為 `true` + * `search.searchView.semanticSearchBehavior` 設定為 `runOnEmpty` - 在**搜尋檢視**中啟用**語意搜尋結果**。 + 在**搜尋檢視**中設定**語意搜尋行為**。可設定值有: + - `auto`: 無論有沒有搜尋到東西,都會自動啟動「使用 AI 搜尋」功能 + - `manual` (預設值): 搜尋不到東西時,會出現「使用 AI 搜尋」的連結按鈕,需手動點擊啟動 + - `runOnEmpty`: 搜尋不到東西時,會自動啟動「使用 AI 搜尋」功能 - * `github.copilot.nextEditSuggestions.enabled` 設定為 `true` (預覽功能) + * `github.copilot.nextEditSuggestions.enabled` 設定為 `true` - 在編輯器中啟用**下一個編輯建議**(NES)功能。 + 在編輯器中啟用**下一個編輯建議**(NES)功能。深入瞭解 [Next Edit Suggestions](https://code.visualstudio.com/docs/copilot/ai-powered-suggestions#_next-edit-suggestions)。 > NES = Next Edit Suggestions @@ -155,10 +152,6 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 * **GitHub Copilot Chat** - * `github.copilot.chat.followUps` 設定為 `firstOnly` 或 `always` - - 是否要在聊天中建議跟進訊息,提供你**下一個提示**的建議。 - * `github.copilot.chat.localeOverride` 設定為 `zh-TW` 設定 GitHub Copilot Chat 的回應語言預設為**繁體中文** @@ -187,10 +180,34 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 詳見 [Reusable prompt files (experimental)](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) + * `chat.promptFilesLocations` 設定指定多個 prompt 檔案資料夾 (實驗性功能) + + 可指定多個 prompt 檔案資料夾位置,讓您能夠組織和管理不同類型的提示檔案。 + + ```json + "chat.promptFilesLocations": { + ".github/personal": true + }, + ``` + + 注意:`.github/prompts` 資料夾已預設包含,無需額外設定。 + + 建議搭配 `.gitignore` 檔案排除個人化的 prompt 資料夾(如 `.github/personal`),避免將個人提示檔案提交到版本控制系統中。 + + 詳見 [Prompt files (experimental) settings](https://code.visualstudio.com/docs/copilot/copilot-customization#_prompt-files-experimental-settings) + * `github.copilot.chat.languageContext.typescript.enabled` 設定為 `true` (實驗性功能) 在 Inline Chat 與 Inline Completion 啟用自動向 TypeScript Language Service 取用 Context 資訊的能力,以獲取更多附加額外的上下文。 + * `github.copilot.chat.languageContext.fix.typescript.enabled` 設定為 `true` (實驗性功能) + + 在程式碼修復功能中啟用自動向 TypeScript Language Service 取用 Context 資訊的能力,以獲取更多附加額外的上下文。 + + * `github.copilot.chat.languageContext.inline.typescript.enabled` 設定為 `true` (實驗性功能) + + 在內嵌編輯功能中啟用自動向 TypeScript Language Service 取用 Context 資訊的能力,以獲取更多附加額外的上下文。 + * `github.copilot.chat.agent.thinkingTool` 設定為 `true` 啟用這個思考工具設定,能讓 Copilot 能夠在代理模式下深入思考您的請求,然後再生成回應。 @@ -314,15 +331,15 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 即便是 Visual Studio Code Insiders 版本,預設 Agent Mode 也是沒有啟用的,你必須手動啟用這個選項,才可以看見 Copilot Edit 中的功能。 - * `chat.agent.maxRequests` 設定為 `50` + * `chat.agent.maxRequests` 設定為 `100` - 預設 Agent Mode 在讓 Agent 自動作業的時候,預設只有 `15` 次迭代,對於一些比較複雜的工作,可能會需要你不斷的確認是否繼續。建議可以調高到 `50` 即可。也建議不要調的更多,因為設定更高時,複雜工作一樣不會表現的更好。 + 預設 Agent Mode 在讓 Agent 自動作業的時候,預設只有 `15` 次迭代,對於一些比較複雜的工作,可能會需要你不斷的確認是否繼續。建議可以調高到 `100`,避免有時候量比較多就超標了。100 要超標就很有難度了。 * `github.copilot.chat.codesearch.enabled` 設定為 `true` (預覽功能) 這個選項用來啟用 `#codebase` 變數的「代理人」原始碼搜尋功能。 - 傳統**一般搜尋**主要是透過**關鍵字比對**,搭配 `github.copilot.chat.search.semanticTextResults` 設定為 `true` 可以啟用搜尋時做**語意比對**,但在 GitHub Copilot Chat 聊天時,如果要透過 `#codebase` 變數找檔案,之前就只能做一次性的比對。 + 傳統**一般搜尋**主要是透過**關鍵字比對**,搭配 `search.searchView.semanticSearchBehavior` 設定為 `runOnEmpty` 可以啟用搜尋時做**語意比對**,但在 GitHub Copilot Chat 聊天時,如果要透過 `#codebase` 變數找檔案,之前就只能做一次性的比對。 當啟用了 `github.copilot.chat.codesearch.enabled` 設定後,就不會只搜尋一次,而是會多嘗試幾種不同的搜尋條件,幫你更好的找到需要的程式碼!👍 @@ -378,11 +395,11 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 代表你在說 `Hey Code` 時會在 Copilot 聊天視窗互動。可設定 `off` 關閉此功能。 - * `accessibility.voice.speechTimeout` 設定為 `1200` + * `accessibility.voice.speechTimeout` 設定為 `10000` - 設定語音輸入後可停頓的時間為 1200 毫秒。 + 設定語音輸入後可停頓的時間為 10000 毫秒。 - 有些人講話比較慢,一句話講到一半會想很久,這時就要調高一點,不然只要停頓 1.2 秒就送出了! + 有些人講話比較慢,一句話講到一半會想很久,這時就要調高一點,不然預設只要停頓 1.2 秒就送出了!現在調整為 10 秒讓你想個夠,講話結巴也沒問題。重點是,你講完話之後,直接按個 Enter 也能送出! * `accessibility.voice.ignoreCodeBlocks` 設定為 `true` (Insiders) @@ -483,6 +500,10 @@ GitHub Copilot 的功能是透過安裝**擴充套件**來實現的,你需要 6. [GitHub Copilot in Visual Studio Code](https://code.visualstudio.com/docs/copilot/overview) 7. [GitHub Copilot Issues](https://github.com/microsoft/vscode-copilot-release/issues) (專門用來回報問題的地方) +## GitHub Copilot 檔案來源說明 + +本 Repository 不再每日自動同步 [Awesome GitHub Copilot Customizations](https://github.com/github/awesome-copilot) 的內容,請直接前往 [github/awesome-copilot](https://github.com/github/awesome-copilot) 取得最新檔案與更新資訊。 + ## 歡迎貢獻 如果你有任何建議或是發現錯誤,歡迎隨時在 GitHub 上面開 Issue 提問,也歡迎大家幫忙發 Pull Request 讓這份文件變的更好!👍 diff --git a/SYNC_README.md b/SYNC_README.md new file mode 100644 index 0000000..3072147 --- /dev/null +++ b/SYNC_README.md @@ -0,0 +1,28 @@ +# 自動同步說明 + +此目錄中的檔案是透過 GitHub Actions 每日自動從 [Awesome GitHub Copilot Customizations](https://github.com/github/awesome-copilot) 專案同步而來。 + +## 同步內容 + +- **.github/chatmodes/**: GitHub Copilot 聊天模式設定檔 +- **.github/instructions/**: GitHub Copilot 指令檔案 +- **.github/prompts/**: GitHub Copilot 提示檔案 +- **.github/agents/**: GitHub Copilot 代理檔案 + +## 同步時間 + +每天 UTC 00:00 (台北時間早上 8:00) 自動執行同步作業。 + +## 手動觸發 + +如需立即同步最新內容,可至 GitHub Actions 頁面手動觸發 "同步 Awesome GitHub Copilot 檔案" workflow。 + +## 注意事項 + +⚠️ **請勿直接修改此目錄中的檔案**,因為會在下次自動同步時被覆蓋。如需自訂內容,請在其他目錄建立自己的檔案。 + +## 來源專案 + +所有檔案來源:https://github.com/github/awesome-copilot + +最後同步時間:透過 GitHub Actions 自動更新 \ No newline at end of file