mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
fix new tool name format
This commit is contained in:
parent
3a26aac949
commit
9a2ae7e632
1 changed files with 3 additions and 3 deletions
|
|
@ -277,10 +277,10 @@ function reducer(state: State, action: Action): State {
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let newToolName = "New tool";
|
let newToolName = "new_tool";
|
||||||
if (draft.workflow?.tools.some((tool) => tool.name === newToolName)) {
|
if (draft.workflow?.tools.some((tool) => tool.name === newToolName)) {
|
||||||
newToolName = `New tool ${draft.workflow.tools.filter((tool) =>
|
newToolName = `new_tool_${draft.workflow.tools.filter((tool) =>
|
||||||
tool.name.startsWith("New tool")).length + 1}`;
|
tool.name.startsWith("new_tool")).length + 1}`;
|
||||||
}
|
}
|
||||||
draft.workflow?.tools.push({
|
draft.workflow?.tools.push({
|
||||||
name: newToolName,
|
name: newToolName,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue