fix
Browse filesFiles changed (4)
195 unmodified lines196197198199200201202679 unmodified lines882883884885886885887888889890891892893894895896195 unmodified lines provider: str = "auto" history: List[List[str]] = [] agent_mode: bool = False existing_repo_id: Optional[str] = None # For auto-deploy to update existing space
class DeploymentRequest(BaseModel):679 unmodified lines print(f"[Auto-Deploy] - History items: {len(history_list)}") print(f"[Auto-Deploy] - Username: {auth.username}") print(f"[Auto-Deploy] - Code length: {len(generated_code)}") print(f"[Auto-Deploy] - Existing repo ID from request: {request.existing_repo_id}") # Deploy the code # Deploy the code (update existing space if provided) success, message, space_url = deploy_to_huggingface_space( code=generated_code, language=language, token=auth.token, username=auth.username, existing_repo_id=request.existing_repo_id, # Use duplicated/imported space history=history_list ) 284 unmodified lines285286287288289290291284 unmodified lines provider: 'auto', history: messages.map((m) => [m.role, m.content]), agent_mode: false, existing_repo_id: currentRepoId || undefined, // Pass duplicated/imported space ID for auto-deploy };
const assistantMessage: Message = {256 unmodified lines257258259260261262260261262263264265266267268269270256 unmodified lines const duplicateResult = await apiClient.duplicateSpace(fromSpaceId); if (duplicateResult.success) { // Show success message with link to duplicated space alert(`✅ Space duplicated successfully!\n\nView your space: ${duplicateResult.space_url}`); // Also load the code in the editor const importResult = await apiClient.importProject(importUrl); if (importResult.status === 'success' && onImport && importResult.code) { // Pass the duplicated space URL so it's tracked for future deployments onImport(importResult.code, importResult.language || 'html', duplicateResult.space_url); // Show success message with link to duplicated space alert(`✅ Space duplicated successfully!\n\nYour space: ${duplicateResult.space_url}\n\nThe code has been loaded in the editor. Any changes you deploy will update this duplicated space.`); } setShowImportDialog(false);18 unmodified lines1920212223242518 unmodified lines provider: string; history: string[][]; agent_mode: boolean; existing_repo_id?: string; // For auto-deploy to update existing space}
export interface CodeGenerationResponse {backend_api.py+4-1
frontend/src/app/page.tsx+1
frontend/src/components/LandingPage.tsx+4-3
frontend/src/types/index.ts+1