Just make a copy when adding a new profile

This commit is contained in:
Matt Rubens
2025-01-07 23:57:56 -05:00
parent 16495560d7
commit 11612caac0
2 changed files with 158 additions and 4 deletions

View File

@@ -36,9 +36,9 @@ const ApiConfigManager = ({
setInputValue("");
}, [currentApiConfigName]);
const handleStartNew = () => {
setEditState('new');
setInputValue("");
const handleAdd = () => {
const newConfigName = currentApiConfigName + " (copy)";
onUpsertConfig(newConfigName);
};
const handleStartRename = () => {
@@ -162,7 +162,7 @@ const ApiConfigManager = ({
</select>
<VSCodeButton
appearance="icon"
onClick={handleStartNew}
onClick={handleAdd}
title="Add profile"
style={{
padding: 0,