mirror of
https://github.com/github/spec-kit.git
synced 2026-07-04 04:45:43 +08:00
* 修改trea文件结构错误问题 * 修改trea文件结构错误问题 * 修复trae agent 文件结构错误问题 * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix trae's test case files * Update src/specify_cli/integrations/trae/__init__.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: jiakangning <jiakangning@bytedance.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
24 lines
1.1 KiB
PowerShell
24 lines
1.1 KiB
PowerShell
# update-context.ps1 — Trae integration: create/update .trae/rules/project_rules.md
|
|
#
|
|
# Thin wrapper that delegates to the shared update-agent-context script.
|
|
# Activated in Stage 7 when the shared script uses integration.json dispatch.
|
|
#
|
|
# Until then, this delegates to the shared script as a subprocess.
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
# Derive repo root from script location (walks up to find .specify/)
|
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
|
$repoRoot = try { git rev-parse --show-toplevel 2>$null } catch { $null }
|
|
# If git did not return a repo root, or the git root does not contain .specify,
|
|
# fall back to walking up from the script directory to find the initialized project root.
|
|
if (-not $repoRoot -or -not (Test-Path (Join-Path $repoRoot '.specify'))) {
|
|
$repoRoot = $scriptDir
|
|
$fsRoot = [System.IO.Path]::GetPathRoot($repoRoot)
|
|
while ($repoRoot -and $repoRoot -ne $fsRoot -and -not (Test-Path (Join-Path $repoRoot '.specify'))) {
|
|
$repoRoot = Split-Path -Parent $repoRoot
|
|
}
|
|
}
|
|
|
|
& "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1" -AgentType trae
|