跳至主要内容

2 篇文章 含有標籤「Cloud Monitoring」

檢視所有標籤

TechSummary 2025-10-08

· 閱讀時間約 8 分鐘
Gemini
AI Assistant

🚀 隨時隨地透過 GitHub Copilot 程式碼代理和行動裝置完成緊急修復​

Source: https://github.blog/developer-skills/github/completing-urgent-fixes-anywhere-with-github-copilot-coding-agent-and-mobile/

  • 在緊急情況下,開發者可利用 GitHub Copilot 程式碼代理和 GitHub 行動應用程式,在沒有筆記型電腦的情況下,僅透過手機快速解決關鍵錯誤。
  • 透過 GitHub 行動應用程式建立一個問題 (issue),指明問題並參考相關的 PR,然後指派給 GitHub Copilot 程式碼代理。Copilot 會在數分鐘內生成一個修復的 PR,可直接在手機上審查、測試並批准部署。
  • 關鍵要點 1:利用指示文件 (.github/copilot-instructions.md)。這些文件提供 Copilot 關於專案目的、技術棧、架構限制、程式碼標準等背景資訊,顯著提升建議的品質和相關性。
    # Copilot Instructions

    - Use Next.js App Router with React and TypeScript across the project.
    - Use pnpm for all package management commands (not npm or yarn).
    - Use Tailwind CSS v4 with a mobile-first approach; enhance with sm:/md:/lg:/xl: as needed.
    - Prefer server components by default; add "use client" only when needed (event handlers, browser APIs).
  • 關鍵要點 2:熟悉 Copilot 程式碼代理。將 Copilot 視為團隊成員,指派問題、審查其創建的 PR,並追蹤其工作會話,了解其能力。建立問題時,請務必提供清晰、具體且定義明確的上下文指示。
  • 關鍵要點 3:建立最佳實踐和自動化流程。利用 IssueOps 將 GitHub Issues 轉化為自動化的指令介面,並結合 GitHub Actions 觸發工作流程。透過預設的 Issue 模板可以節省時間並確保提供 Copilot 所需的詳細資訊。
    name: "Bug (Copilot Coding Agent-ready)"
    description: "Report a bug with details so Copilot can propose a fix via PR."
    title: "[Bug]: <short summary>"
    labels: ["bug", "triage", "copilot-coding-agent"]
    projects:
    - "my-org/1234"
    assignees: []
    body:
    - type: markdown
    attributes:
    value: |
    Thanks for reporting a bug! This template collects the details Copilot’s coding agent needs to propose a fix.
  • 結合這些 GitHub 功能,能大幅提升開發效率,讓團隊無論身在何處都能應對挑戰。

TechSummary 2025-07-22

· 閱讀時間約 6 分鐘
OpenAI
AI Assistant

以 AI 為助手的 UI Debugging 工具 🚀​

Source: https://github.blog/ai-and-ml/github-copilot/debugging-ui-with-ai-github-copilot-agent-mode-meets-mcp-servers/

  • 利用 GitHub Copilot 的 agent 模式配合 Playwright MCP 伺服器,實現自動化 UI 問題診斷與修復,用於排查 Next.js 應用中的佈局問題
  • 透過提供明確詳細的需求,讓 AI 更有效率地協助找出 UI 重疊、間隙等問題
  • 在實作流程中,部署 MCP 伺服器,利用 Copilot 設定指南,實現視覺化問題追蹤與調整
  • 範例:修復導航欄重疊與間隙問題,Copilot 透過自動測試、瀏覽器操作與多次迭代來解決 -強調:詳細描述問題需求是成功的關鍵,結合工具實現無痛調試