open-swe/packages/shared/src/git.ts
Palash Shah 46b435a543
feat: add planner and manager changes (#602)
* openswe cli: add planner and manager changes

* openswe cli: fix programmer config

* openswe cli: formatting

* openswe cli: add config to reviewer

* Potential fix for code scanning alert no. 17: Incomplete string escaping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* openswe cli: update code security

* feat: use commander

* fix: debug

* fix: comment

* fix: remove config

* fix: updates

* fix: local mode

* fix: repeated islocalmodes

* fix: update imports

* fix: revert wrap script and commands

* fix: adjust types

* fix: update function signatures

* fix: final shell exec fix

* fix: update tsconfig for test

* fix: add run input type

* fix: update types

* fix: reent user message

* fixes from code review

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: bracesproul <braceasproul@gmail.com>
2025-08-01 15:50:40 -04:00

23 lines
598 B
TypeScript

import { SANDBOX_ROOT_DIR } from "./constants.js";
import { TargetRepository, GraphConfig } from "./open-swe/types.js";
import {
isLocalMode,
getLocalWorkingDirectory,
} from "./open-swe/local-mode.js";
export function getRepoAbsolutePath(
targetRepository: TargetRepository,
config?: GraphConfig,
): string {
// Check for local mode first
if (config && isLocalMode(config)) {
return getLocalWorkingDirectory();
}
const repoName = targetRepository.repo;
if (!repoName) {
throw new Error("No repository name provided");
}
return `${SANDBOX_ROOT_DIR}/${repoName}`;
}