Organize workspace: Frontend, Backend, and Tests in one repo

This commit is contained in:
2026-03-04 22:04:07 +00:00
parent a24e901b7f
commit c065cbf61e
5390 changed files with 844081 additions and 446 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
#!/bin/sh
unset NODE_OPTIONS
ELECTRON_RUN_AS_NODE=1 "/home/chloe/.vscode-server/cli/servers/Stable-072586267e68ece9a47aa43f8c108e0dcbf44622/server/node" "/home/chloe/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli/copilotCLIShim.js" "$@"

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,219 @@
#---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#---------------------------------------------------------------------------------------------
# Windows GitHub Copilot CLI bootstrapper
#
# Responsibilities:
# 1. Locate the real Copilot CLI binary (avoid recursion if this file shadows it).
# 2. Offer to install if missing (npm -g @github/copilot).
# 3. Enforce minimum version (>= REQUIRED_VERSION) with interactive update.
# 4. Execute the real binary with original arguments and exit with its status.
#
# NOTE: This file intentionally keeps logic selfcontained (no external deps) so it can be dropped into PATH directly.
# Minimum required Copilot CLI version
$RequiredVersion = "0.0.394"
$PackageName = "@github/copilot"
function Invoke-NpmGlobalCommand {
param(
[Parameter(Mandatory = $true)][ValidateSet('install', 'update')][string]$Command,
[Parameter(Mandatory = $true)][string]$Package
)
$npmArgs = @($Command, '-g', $Package)
$npmCmd = Get-Command npm.cmd -ErrorAction SilentlyContinue
if ($npmCmd) {
& npm.cmd @npmArgs
} else {
& npm @npmArgs
}
}
function Find-RealCopilot {
# Find the real copilot binary, avoiding this script if it's in PATH
$CurrentScript = $MyInvocation.PSCommandPath
if (-not $CurrentScript) { $CurrentScript = $PSCommandPath }
$CopilotPath = (Get-Command copilot -ErrorAction SilentlyContinue).Source
# Check if the copilot command would point to this script
$CurrentScriptResolved = if ($CurrentScript) { (Resolve-Path $CurrentScript -ErrorAction SilentlyContinue).Path } else { $null }
$CopilotPathResolved = if ($CopilotPath) { (Resolve-Path $CopilotPath -ErrorAction SilentlyContinue).Path } else { $null }
if ($CurrentScript -eq $CopilotPath -or (Split-Path $CurrentScript -Parent) -eq (Split-Path $CopilotPath -Parent) -or ($CurrentScriptResolved -and $CopilotPathResolved -and $CurrentScriptResolved -eq $CopilotPathResolved)) {
# The copilot in PATH is this script, find the real one by temporarily removing this script's directory from PATH
$ScriptDir = Split-Path $CurrentScript -Parent
$OldPath = $env:PATH
# Use appropriate path delimiter based on OS
$PathDelimiter = if ($IsWindows -or $env:OS -eq "Windows_NT") { ';' } else { ':' }
$env:PATH = ($env:PATH -split $PathDelimiter | Where-Object { $_ -ne $ScriptDir }) -join $PathDelimiter
$RealCopilot = (Get-Command copilot -ErrorAction SilentlyContinue).Source
$env:PATH = $OldPath
if ($RealCopilot -and (Test-Path $RealCopilot)) {
return $RealCopilot
} else {
return $null
}
} else {
# The copilot in PATH is different from this script, use it
if ($CopilotPath -and (Test-Path $CopilotPath)) {
return $CopilotPath
} else {
return $null
}
}
}
function Test-VersionCompatibility {
param([string]$Version)
$cleanInstalled = $Version -replace '^v',''
$cleanRequired = $RequiredVersion -replace '^v',''
try {
$installedVer = [version]$cleanInstalled
$requiredVer = [version]$cleanRequired
} catch {
return $false
}
return ($installedVer -ge $requiredVer)
}
function Test-AndLaunchCopilot {
param([string[]]$Arguments)
# Check if real copilot command exists
$realCopilot = Find-RealCopilot
if (-not $realCopilot) {
Write-Host "Cannot find GitHub Copilot CLI (https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)"
$answer = Read-Host "Install GitHub Copilot CLI? (y/N)"
if ($answer -eq "y" -or $answer -eq "Y") {
try {
Invoke-NpmGlobalCommand -Command 'install' -Package $PackageName
if ($LASTEXITCODE -eq 0) {
Test-AndLaunchCopilot $Arguments
return
} else {
Read-Host "Installation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} catch {
Read-Host "Installation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} else {
exit 0
}
}
# Check version compatibility
$realCopilot = Find-RealCopilot
if (-not $realCopilot) {
Write-Host "Error: Unable to find copilot binary."
$answer = Read-Host "Would you like to reinstall GitHub Copilot CLI? (y/N)"
if ($answer -eq "y" -or $answer -eq "Y") {
Write-Host "Reinstalling GitHub Copilot CLI..."
try {
Invoke-NpmGlobalCommand -Command 'install' -Package $PackageName
if ($LASTEXITCODE -eq 0) {
Test-AndLaunchCopilot $Arguments
return
} else {
Read-Host "Reinstallation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} catch {
Read-Host "Reinstallation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} else {
exit 0
}
}
try {
$versionOutput = & $realCopilot --version 2>$null
if ($LASTEXITCODE -ne 0) {
throw "Command failed"
}
} catch {
# Write-Host "Error: Unable to check copilot version."
$answer = Read-Host "Would you like to reinstall GitHub Copilot CLI? (y/N)"
if ($answer -eq "y" -or $answer -eq "Y") {
try {
Invoke-NpmGlobalCommand -Command 'install' -Package $PackageName
if ($LASTEXITCODE -eq 0) {
Test-AndLaunchCopilot $Arguments
return
} else {
Read-Host "Reinstallation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} catch {
Read-Host "Reinstallation failed. Please check your npm configuration and try again (or run: npm install -g @github/copilot)."
return
}
} else {
exit 0
}
}
# Extract version number from output (search through all lines)
$version = $null
if ($versionOutput) {
foreach ($line in ($versionOutput -split "`n")) {
$trimmedLine = $line.Trim()
if ($trimmedLine -match '[0-9]+\.[0-9]+\.[0-9]+') {
$version = $matches[0]
break
}
}
}
# Command succeeded - assume CLI is installed even if we can't parse the version
# Only check version compatibility if we have a valid version
if ($version -and -not (Test-VersionCompatibility $version)) {
Write-Host "GitHub Copilot CLI version $version is not compatible."
Write-Host "Version $RequiredVersion or later is required."
$answer = Read-Host "Update GitHub Copilot CLI? (y/N)"
if ($answer -eq "y" -or $answer -eq "Y") {
try {
Invoke-NpmGlobalCommand -Command 'update' -Package $PackageName
if ($LASTEXITCODE -eq 0) {
Test-AndLaunchCopilot $Arguments
return
} else {
Read-Host "Update failed. Please check your npm configuration and try again (or run: npm update -g @github/copilot)."
return
}
} catch {
Read-Host "Update failed. Please check your npm configuration and try again (or run: npm update -g @github/copilot)."
return
}
} else {
exit 0
}
}
# All checks passed, execute the real copilot binary
$realCopilot = Find-RealCopilot
if ($realCopilot -and (Test-Path $realCopilot)) {
& $realCopilot @Arguments
} else {
Write-Host "Error: Could not find the real GitHub Copilot CLI binary"
Read-Host "Please ensure it's properly installed with: npm install -g @github/copilot"
return
}
}
# Start the check and launch process
$finalArgs = $args
# Handle --clear argument
if ($args.Length -gt 0 -and $args[0] -eq '--clear') {
Clear-Host
$finalArgs = $args[1..($args.Length - 1)]
}
Test-AndLaunchCopilot $finalArgs

View File

@@ -0,0 +1,3 @@
#!/bin/sh
unset NODE_OPTIONS
ELECTRON_RUN_AS_NODE=1 "/home/chloe/.vscode-server/cli/servers/Stable-072586267e68ece9a47aa43f8c108e0dcbf44622/server/node" "/home/chloe/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand/copilotDebugCommand.js" "vscode://github.copilot-chat" "code --openExternal " "$@"

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,108 @@
---
name: Plan
description: Researches and outlines multi-step plans
argument-hint: Outline the goal or problem to research
target: vscode
disable-model-invocation: true
tools: ['agent', 'search', 'read', 'execute/getTerminalOutput', 'execute/testFailure', 'web', 'github/issue_read', 'github.vscode-pull-request-github/issue_fetch', 'github.vscode-pull-request-github/activePullRequest', 'vscode/askQuestions']
agents: []
handoffs:
- label: Start Implementation
agent: agent
prompt: 'Start implementation'
send: true
- label: Open in Editor
agent: agent
prompt: '#createFile the plan as is into an untitled file (`untitled:plan-${camelCaseName}.prompt.md` without frontmatter) for further refinement.'
send: true
showContinueOn: false
---
You are a PLANNING AGENT, pairing with the user to create a detailed, actionable plan.
Your job: research the codebase → clarify with the user → produce a comprehensive plan. This iterative approach catches edge cases and non-obvious requirements BEFORE implementation begins.
Your SOLE responsibility is planning. NEVER start implementation.
<rules>
- STOP if you consider running file editing tools — plans are for others to execute
- Use #tool:vscode/askQuestions freely to clarify requirements — don't make large assumptions
- Present a well-researched plan with loose ends tied BEFORE implementation
</rules>
<workflow>
Cycle through these phases based on user input. This is iterative, not linear.
## 1. Discovery
Run #tool:agent/runSubagent to gather context and discover potential blockers or ambiguities.
MANDATORY: Instruct the subagent to work autonomously following <research_instructions>.
<research_instructions>
- Research the user's task comprehensively using read-only tools.
- Start with high-level code searches before reading specific files.
- Pay special attention to instructions and skills made available by the developers to understand best practices and intended usage.
- Identify missing information, conflicting requirements, or technical unknowns.
- DO NOT draft a full plan yet — focus on discovery and feasibility.
</research_instructions>
After the subagent returns, analyze the results.
## 2. Alignment
If research reveals major ambiguities or if you need to validate assumptions:
- Use #tool:vscode/askQuestions to clarify intent with the user.
- Surface discovered technical constraints or alternative approaches.
- If answers significantly change the scope, loop back to **Discovery**.
## 3. Design
Once context is clear, draft a comprehensive implementation plan per <plan_style_guide>.
The plan should reflect:
- Critical file paths discovered during research.
- Code patterns and conventions found.
- A step-by-step implementation approach.
Present the plan as a **DRAFT** for review.
## 4. Refinement
On user input after showing a draft:
- Changes requested → revise and present updated plan.
- Questions asked → clarify, or use #tool:vscode/askQuestions for follow-ups.
- Alternatives wanted → loop back to **Discovery** with new subagent.
- Approval given → acknowledge, the user can now use handoff buttons.
The final plan should:
- Be scannable yet detailed enough to execute.
- Include critical file paths and symbol references.
- Reference decisions from the discussion.
- Leave no ambiguity.
Keep iterating until explicit approval or handoff.
</workflow>
<plan_style_guide>
```markdown
## Plan: {Title (2-10 words)}
{TL;DR — what, how, why. Reference key decisions. (30-200 words, depending on complexity)}
**Steps**
1. {Action with [file](path) links and `symbol` refs}
2. {Next step}
3. {…}
**Verification**
{How to test: commands, tests, manual checks}
**Decisions** (if applicable)
- {Decision: chose X over Y}
```
Rules:
- NO code blocks — describe changes, link to files/symbols
- NO questions at the end — ask during workflow via #tool:vscode/askQuestions
- Keep scannable
</plan_style_guide>