update 'Scripts' -> 'Code'; update some other verbiage (#3316)

This commit is contained in:
Jonathan Dobson
2025-08-29 10:21:40 -04:00
committed by GitHub
parent 344174e8f2
commit f8685832ff
8 changed files with 23 additions and 22 deletions

View File

@@ -96,7 +96,7 @@ function ScrollableActionList({
</div>
</TooltipTrigger>
<TooltipContent className="max-w-[250px]">
Scripted Execution
Code Execution
</TooltipContent>
</Tooltip>
</TooltipProvider>

View File

@@ -181,7 +181,7 @@ function WorkflowHeader({
}
onCacheKeyValuesKeydown(e);
}}
placeholder="Script Key Value"
placeholder="Code Key Value"
value={chosenCacheKeyValue ?? undefined}
onBlur={(e) => {
onCacheKeyValuesBlurred(e.target.value);

View File

@@ -324,7 +324,7 @@ function Workspace({
onError: (error: AxiosError) => {
toast({
variant: "destructive",
title: "Failed to delete cache key value",
title: "Failed to delete code key value",
description: error.message,
});
setToDeleteCacheKeyValue(null);
@@ -534,15 +534,15 @@ function Workspace({
>
<DialogContent>
<DialogHeader>
<DialogTitle>Delete A Script Key Value</DialogTitle>
<DialogTitle>Delete A Code Key Value</DialogTitle>
<DialogDescription>
<div className="w-full pb-2 pt-4 text-sm text-slate-400">
{deleteCacheKeyValue.isPending ? (
"Deleting script key value..."
"Deleting code key value..."
) : (
<div className="flex w-full flex-col gap-2">
<div className="w-full">
Are you sure you want to delete this script key value?
Are you sure you want to delete this code key value?
</div>
<div
className="max-w-[29rem] overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold text-slate-400"

View File

@@ -53,7 +53,7 @@ function NodeActionMenu({
onShowScript();
}}
>
{showScriptText ?? "Show Script"}
{showScriptText ?? "Show Code"}
</DropdownMenuItem>
)}
</OrgWalled>

View File

@@ -159,7 +159,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
<NodeActionMenu
isDeletable={false}
isScriptable={true}
showScriptText="Show All Scripts"
showScriptText="Show All Code"
onShowScript={showAllScripts}
/>
</div>
@@ -218,8 +218,8 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
<OrgWalled className="flex flex-col gap-4">
<div className="space-y-2">
<div className="flex items-center gap-2">
<Label>Generate Script</Label>
<HelpTooltip content="Generate & use cached scripts for faster execution." />
<Label>Generate Code</Label>
<HelpTooltip content="Generate & use cached code for faster execution." />
<Switch
className="ml-auto"
checked={inputs.useScriptCache}
@@ -232,7 +232,8 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
{inputs.useScriptCache && (
<div className="space-y-2">
<div className="flex gap-2">
<Label>Script Key (optional)</Label>
<Label>Code Key (optional)</Label>
<HelpTooltip content="A static or dynamic key for directing code generation." />
</div>
<WorkflowBlockInputTextarea
nodeId={id}

View File

@@ -44,16 +44,16 @@ function WorkflowCacheKeyValuesPanel({
>
<div className="space-y-4">
<header>
<h1 className="text-lg">Cached Scripts</h1>
<h1 className="text-lg">Code Cache</h1>
<span className="text-sm text-slate-400">
Given your script key,{" "}
Given your code key,{" "}
<code className="font-mono text-xs text-slate-200">
{scriptKey}
</code>
, search for scripts using a script key value. For this script key
, search for saved code using a code key value. For this code key
there {totalCount === 1 ? "is" : "are"}{" "}
<span className="font-bold text-slate-200">{totalCount}</span>{" "}
script key {totalCount === 1 ? "value" : "values"}
<span className="font-bold text-slate-200">{totalCount}</span> code
key {totalCount === 1 ? "value" : "values"}
{filteredCount !== totalCount && (
<>
{" "}

View File

@@ -98,10 +98,10 @@ const getInitialParameters = (workflow: WorkflowApiResponse) => {
};
/**
* Attempt to construct a valid cache key value from the workflow parameters.
* Attempt to construct a valid code key value from the workflow parameters.
*/
const constructCacheKeyValue = (
cacheKey: string,
codeKey: string,
workflow: WorkflowApiResponse,
) => {
const workflowParameters = getInitialParameters(workflow)
@@ -119,14 +119,14 @@ const constructCacheKeyValue = (
continue;
}
cacheKey = cacheKey.replace(`{{${name}}}`, value.toString());
codeKey = codeKey.replace(`{{${name}}}`, value.toString());
}
if (cacheKey.includes("{") || cacheKey.includes("}")) {
if (codeKey.includes("{") || codeKey.includes("}")) {
return "";
}
return cacheKey;
return codeKey;
};
export { constructCacheKeyValue, getInitialParameters };

View File

@@ -66,7 +66,7 @@ function ActionCard({ action, onClick, active, index }: Props) {
</div>
</TooltipTrigger>
<TooltipContent className="max-w-[250px]">
Scripted Execution
Code Execution
</TooltipContent>
</Tooltip>
</TooltipProvider>