mirror of
https://github.com/github/spec-kit.git
synced 2026-07-05 13:34:06 +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>
29 lines
953 B
Bash
Executable File
29 lines
953 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# update-context.sh — 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.
|
|
|
|
set -euo pipefail
|
|
|
|
# Derive repo root from script location (walks up to find .specify/)
|
|
_script_dir="$(cd "$(dirname "$0")" && pwd)"
|
|
_root="$_script_dir"
|
|
while [ "$_root" != "/" ] && [ ! -d "$_root/.specify" ]; do _root="$(dirname "$_root")"; done
|
|
if [ -z "${REPO_ROOT:-}" ]; then
|
|
if [ -d "$_root/.specify" ]; then
|
|
REPO_ROOT="$_root"
|
|
else
|
|
git_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
|
|
if [ -n "$git_root" ] && [ -d "$git_root/.specify" ]; then
|
|
REPO_ROOT="$git_root"
|
|
else
|
|
REPO_ROOT="$_root"
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
exec "$REPO_ROOT/.specify/scripts/bash/update-agent-context.sh" trae
|