refactor: unify create session forms - show clone mode everywhere and display fixed fields as read-only

This commit is contained in:
Fusion
2026-05-23 19:53:12 +02:00
parent 2e9ca52cdb
commit 01adc9a00f
4 changed files with 36 additions and 5 deletions
+5 -1
View File
@@ -19,10 +19,12 @@ const API_BASE_URL = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:8000
interface InstanceListProps {
projectId: string;
repoId: string;
projectName?: string;
repoName?: string;
toolTypes: ToolType[];
}
export const InstanceList = ({ projectId, repoId, toolTypes }: InstanceListProps) => {
export const InstanceList = ({ projectId, repoId, projectName, repoName, toolTypes }: InstanceListProps) => {
const navigate = useNavigate();
const [instances, setInstances] = useState<ToolInstance[]>([]);
const [loading, setLoading] = useState(false);
@@ -304,6 +306,8 @@ export const InstanceList = ({ projectId, repoId, toolTypes }: InstanceListProps
toolTypes={toolTypes}
fixedProjectId={projectId}
fixedRepoId={repoId}
projectName={projectName}
repoName={repoName}
onSuccess={handleCreateSuccess}
onCancel={() => setShowCreate(false)}
submitLabel="Launch"