feat: remove agent_working_dir from settings (#1874)
* remove configurable agent_working_dir (cherry picked from commit 285b3e04abceeb8e4a4ee1be16e3de97a8f32299) * calculate agent_working_dir on create and start task * i18n
This commit is contained in:
committed by
GitHub
parent
b6518fd930
commit
8fa5b9d098
@@ -333,11 +333,6 @@
|
||||
"helper": "The absolute path to your git repository on disk."
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "Agent Working Directory",
|
||||
"placeholder": "e.g., my-repo",
|
||||
"helper": "Default directory for new workspaces to run the coding agent from, relative to the workspace root. This value is captured when a workspace is created and won't affect existing workspaces. For single-repo projects, this defaults to the repo name. Leave empty to run from the workspace root."
|
||||
},
|
||||
"save": {
|
||||
"button": "Save Project Settings",
|
||||
"success": "✓ Project settings saved successfully!",
|
||||
|
||||
@@ -333,11 +333,6 @@
|
||||
"helper": "La ruta absoluta a tu repositorio git en disco."
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "Directorio de Trabajo del Agente",
|
||||
"placeholder": "ej., mi-repo",
|
||||
"helper": "Directorio predeterminado para nuevos workspaces donde ejecutar el agente de codificación, relativo a la raíz del workspace. Este valor se captura cuando se crea un workspace y no afectará a los workspaces existentes. Para proyectos de un solo repositorio, esto se establece por defecto al nombre del repositorio. Déjalo vacío para ejecutar desde la raíz del workspace."
|
||||
},
|
||||
"save": {
|
||||
"button": "Guardar Configuración del Proyecto",
|
||||
"success": "✓ ¡Configuración del proyecto guardada exitosamente!",
|
||||
|
||||
@@ -333,11 +333,6 @@
|
||||
"helper": "ディスク上のgitリポジトリへの絶対パス。"
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "エージェント作業ディレクトリ",
|
||||
"placeholder": "例:my-repo",
|
||||
"helper": "新しいワークスペースでコーディングエージェントを実行するデフォルトディレクトリ。ワークスペースルートからの相対パス。この値はワークスペース作成時に保存され、既存のワークスペースには影響しません。単一リポジトリプロジェクトの場合、リポジトリ名がデフォルトになります。空欄にするとワークスペースルートから実行します。"
|
||||
},
|
||||
"save": {
|
||||
"button": "プロジェクト設定を保存",
|
||||
"success": "✓ プロジェクト設定が正常に保存されました!",
|
||||
|
||||
@@ -333,11 +333,6 @@
|
||||
"helper": "디스크에 있는 git 저장소의 절대 경로입니다."
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "에이전트 작업 디렉토리",
|
||||
"placeholder": "예: my-repo",
|
||||
"helper": "새 워크스페이스에서 코딩 에이전트를 실행할 기본 디렉토리로, 워크스페이스 루트 기준 상대 경로입니다. 이 값은 워크스페이스 생성 시 저장되며 기존 워크스페이스에는 영향을 주지 않습니다. 단일 저장소 프로젝트의 경우 저장소 이름이 기본값입니다. 비워두면 워크스페이스 루트에서 실행됩니다."
|
||||
},
|
||||
"save": {
|
||||
"button": "프로젝트 설정 저장",
|
||||
"success": "✓ 프로젝트 설정이 성공적으로 저장되었습니다!",
|
||||
|
||||
@@ -333,11 +333,6 @@
|
||||
"helper": "磁盘上 git 仓库的绝对路径。"
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "代理工作目录",
|
||||
"placeholder": "例如:my-repo",
|
||||
"helper": "新工作区运行编码代理的默认目录,相对于工作区根目录。此值在创建工作区时保存,不会影响现有工作区。对于单仓库项目,默认为仓库名称。留空则从工作区根目录运行。"
|
||||
},
|
||||
"save": {
|
||||
"button": "保存项目设置",
|
||||
"success": "✓ 项目设置保存成功!",
|
||||
|
||||
@@ -333,11 +333,6 @@
|
||||
"helper": "磁碟上的 Git 儲存庫絕對路徑。"
|
||||
}
|
||||
},
|
||||
"agentWorkingDir": {
|
||||
"label": "代理工作目錄",
|
||||
"placeholder": "例如:my-repo",
|
||||
"helper": "新工作區執行編碼代理的預設目錄,相對於工作區根目錄。此值在建立工作區時保存,不會影響現有工作區。單一儲存庫專案預設為儲存庫名稱。留空則從工作區根目錄執行。"
|
||||
},
|
||||
"save": {
|
||||
"button": "儲存專案設定",
|
||||
"success": "✓ 專案設定儲存成功!",
|
||||
|
||||
@@ -31,13 +31,11 @@ import type { Project, Repo, UpdateProject } from 'shared/types';
|
||||
|
||||
interface ProjectFormState {
|
||||
name: string;
|
||||
default_agent_working_dir: string;
|
||||
}
|
||||
|
||||
function projectToFormState(project: Project): ProjectFormState {
|
||||
return {
|
||||
name: project.name,
|
||||
default_agent_working_dir: project.default_agent_working_dir ?? '',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -294,8 +292,6 @@ export function ProjectSettings() {
|
||||
try {
|
||||
const updateData: UpdateProject = {
|
||||
name: draft.name.trim(),
|
||||
default_agent_working_dir:
|
||||
draft.default_agent_working_dir.trim() || null,
|
||||
};
|
||||
|
||||
updateProject.mutate({
|
||||
@@ -429,26 +425,6 @@ export function ProjectSettings() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="agent-working-dir">
|
||||
{t('settings.projects.agentWorkingDir.label')}
|
||||
</Label>
|
||||
<Input
|
||||
id="agent-working-dir"
|
||||
value={draft.default_agent_working_dir}
|
||||
onChange={(e) =>
|
||||
updateDraft({ default_agent_working_dir: e.target.value })
|
||||
}
|
||||
placeholder={t(
|
||||
'settings.projects.agentWorkingDir.placeholder'
|
||||
)}
|
||||
className="font-mono"
|
||||
/>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t('settings.projects.agentWorkingDir.helper')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Save Button */}
|
||||
<div className="flex items-center justify-between pt-4 border-t">
|
||||
{hasUnsavedChanges ? (
|
||||
|
||||
Reference in New Issue
Block a user