mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
chore: rename repo path env vars to match standard names
CODEFLASH_INTERNAL_REPO_PATH → AISERVICE_DIR, CODEFLASH_CLI_REPO_PATH → CODEFLASH_DIR
This commit is contained in:
parent
af3185edff
commit
6346d0992a
2 changed files with 7 additions and 7 deletions
|
|
@ -8,5 +8,5 @@ NPM_TOKEN
|
|||
SCM_DO_BUILD_DURING_DEPLOYMENT
|
||||
WEBSITE_HEALTHCHECK_MAXPINGFAILURES
|
||||
WEBSITE_HTTPLOGGING_RETENTION_DAYS
|
||||
CODEFLASH_INTERNAL_REPO_PATH=
|
||||
CODEFLASH_CLI_REPO_PATH=
|
||||
AISERVICE_DIR=
|
||||
CODEFLASH_DIR=
|
||||
|
|
|
|||
|
|
@ -168,8 +168,8 @@ export function indexTraceData(traceData: TraceData): IndexedTraceData {
|
|||
// --- Codebase browsing helpers ---
|
||||
|
||||
function getRepoRoot(repo: string): string | null {
|
||||
if (repo === "codeflash-internal") return process.env.CODEFLASH_INTERNAL_REPO_PATH || null
|
||||
if (repo === "codeflash") return process.env.CODEFLASH_CLI_REPO_PATH || null
|
||||
if (repo === "codeflash-internal") return process.env.AISERVICE_DIR || null
|
||||
if (repo === "codeflash") return process.env.CODEFLASH_DIR || null
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ export async function resolveToolCall(
|
|||
|
||||
case "read_file": {
|
||||
const repoRoot = getRepoRoot(args.repo as string)
|
||||
if (!repoRoot) return `Repository path not configured. Set CODEFLASH_INTERNAL_REPO_PATH or CODEFLASH_CLI_REPO_PATH env var.`
|
||||
if (!repoRoot) return `Repository path not configured. Set AISERVICE_DIR or CODEFLASH_DIR env var.`
|
||||
|
||||
const pathResult = resolveAndValidatePath(repoRoot, args.path as string)
|
||||
if ("error" in pathResult) return pathResult.error
|
||||
|
|
@ -657,7 +657,7 @@ export async function resolveToolCall(
|
|||
|
||||
case "search_code": {
|
||||
const repoRoot = getRepoRoot(args.repo as string)
|
||||
if (!repoRoot) return `Repository path not configured. Set CODEFLASH_INTERNAL_REPO_PATH or CODEFLASH_CLI_REPO_PATH env var.`
|
||||
if (!repoRoot) return `Repository path not configured. Set AISERVICE_DIR or CODEFLASH_DIR env var.`
|
||||
|
||||
const maxResults = Math.min(Math.max(1, (args.max_results as number) || 30), 100)
|
||||
const rgArgs = [
|
||||
|
|
@ -699,7 +699,7 @@ export async function resolveToolCall(
|
|||
|
||||
case "list_directory": {
|
||||
const repoRoot = getRepoRoot(args.repo as string)
|
||||
if (!repoRoot) return `Repository path not configured. Set CODEFLASH_INTERNAL_REPO_PATH or CODEFLASH_CLI_REPO_PATH env var.`
|
||||
if (!repoRoot) return `Repository path not configured. Set AISERVICE_DIR or CODEFLASH_DIR env var.`
|
||||
|
||||
const relativePath = (args.path as string) || "."
|
||||
const pathResult = resolveAndValidatePath(repoRoot, relativePath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue