feat: agent versioning and model configurations override (#227)

* feat: add tests and migrations

* feat: workflow versioning among published and draft

* feat: add a new settings page to simplify workflow detail page

* fix: fix tsclient generation
This commit is contained in:
Abhishek 2026-04-08 19:20:31 +05:30 committed by GitHub
parent f5fa9ce717
commit 38d1d928b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 10158 additions and 3131 deletions

View file

@ -1,6 +1,7 @@
import { AlertCircle, ExternalLink } from "lucide-react";
import { ReactNode, useCallback, useEffect, useState } from "react";
import { useWorkflowOptional } from "@/app/workflow/[workflowId]/contexts/WorkflowContext";
import { FlowNodeData } from "@/components/flow/types";
import {
AlertDialog,
@ -38,6 +39,7 @@ export const NodeEditDialog = ({
isDirty = false,
documentationUrl,
}: NodeEditDialogProps) => {
const readOnly = useWorkflowOptional()?.readOnly ?? false;
const [showDiscardAlert, setShowDiscardAlert] = useState(false);
const handleClose = () => onOpenChange(false);
@ -66,7 +68,7 @@ export const NodeEditDialog = ({
// Handle Cmd+S / Ctrl+S keyboard shortcut to save
useEffect(() => {
if (!open) return;
if (!open || readOnly) return;
const handleKeyDown = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key === 's') {
@ -78,7 +80,7 @@ export const NodeEditDialog = ({
window.addEventListener('keydown', handleKeyDown, true);
return () => window.removeEventListener('keydown', handleKeyDown, true);
}, [open, handleSave]);
}, [open, readOnly, handleSave]);
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
@ -128,7 +130,9 @@ export const NodeEditDialog = ({
>
Cancel
</Button>
<Button onClick={handleSave}>Save</Button>
<Button onClick={handleSave} disabled={readOnly}>
{readOnly ? "Read Only" : "Save"}
</Button>
</div>
</DialogFooter>
</DialogContent>