(cwd: string)
| 111 | } |
| 112 | |
| 113 | function getGitSummary(cwd: string): string { |
| 114 | try { |
| 115 | const branch = execSync("git rev-parse --abbrev-ref HEAD", { cwd, stdio: ["ignore", "pipe", "ignore"] }) |
| 116 | .toString() |
| 117 | .trim() |
| 118 | const status = execSync("git status --short", { cwd, stdio: ["ignore", "pipe", "ignore"] }) |
| 119 | .toString() |
| 120 | .trimEnd() |
| 121 | .split("\n") |
| 122 | .slice(0, 20) |
| 123 | .join("\n") |
| 124 | return `## Git Repository Information\n- Current Branch: ${branch}\n${status ? `\n### Working Tree Changes\n${status}` : "- Working tree clean"}` |
| 125 | } catch { |
| 126 | return "" |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * The user's message is wrapped in <user_query> tags internally so the TUI can |
no outgoing calls
no test coverage detected