deepfish-ai 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +34 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26749,6 +26749,17 @@ async function handleSkillsAdd(name) {
|
|
|
26749
26749
|
}
|
|
26750
26750
|
const targetDir = scope === "local" ? localSkillDir : globalSkillDir;
|
|
26751
26751
|
const targetPath = import_path20.default.join(targetDir, name);
|
|
26752
|
+
const { action } = await import_inquirer3.default.prompt([
|
|
26753
|
+
{
|
|
26754
|
+
type: "select",
|
|
26755
|
+
name: "action",
|
|
26756
|
+
message: "Select add action:",
|
|
26757
|
+
choices: [
|
|
26758
|
+
{ name: "Move (cut)", value: "move" },
|
|
26759
|
+
{ name: "Copy", value: "copy" }
|
|
26760
|
+
]
|
|
26761
|
+
}
|
|
26762
|
+
]);
|
|
26752
26763
|
if (import_fs_extra20.default.existsSync(targetPath)) {
|
|
26753
26764
|
const { overwrite } = await import_inquirer3.default.prompt([
|
|
26754
26765
|
{
|
|
@@ -26764,8 +26775,12 @@ async function handleSkillsAdd(name) {
|
|
|
26764
26775
|
}
|
|
26765
26776
|
import_fs_extra20.default.removeSync(targetPath);
|
|
26766
26777
|
}
|
|
26767
|
-
|
|
26768
|
-
|
|
26778
|
+
if (action === "move") {
|
|
26779
|
+
import_fs_extra20.default.moveSync(skillDir, targetPath, { overwrite: true });
|
|
26780
|
+
} else {
|
|
26781
|
+
import_fs_extra20.default.copySync(skillDir, targetPath, { overwrite: true });
|
|
26782
|
+
}
|
|
26783
|
+
logSuccess(`Skill ${scope === "local" ? "locally" : "globally"} ${action === "move" ? "moved" : "copied"}: ${targetPath}`);
|
|
26769
26784
|
_updateRegister(targetDir);
|
|
26770
26785
|
}
|
|
26771
26786
|
function handleSkillsDel(index) {
|
|
@@ -27039,6 +27054,17 @@ async function handleToolsAdd(name) {
|
|
|
27039
27054
|
const localToolDir = import_path21.default.join(workspace, ".deepfish-ai", "tools");
|
|
27040
27055
|
const targetDir = scope === "local" ? localToolDir : globalToolDir;
|
|
27041
27056
|
const targetPath = import_path21.default.join(targetDir, name);
|
|
27057
|
+
const { action } = await import_inquirer4.default.prompt([
|
|
27058
|
+
{
|
|
27059
|
+
type: "select",
|
|
27060
|
+
name: "action",
|
|
27061
|
+
message: "Select add action:",
|
|
27062
|
+
choices: [
|
|
27063
|
+
{ name: "Move (cut)", value: "move" },
|
|
27064
|
+
{ name: "Copy", value: "copy" }
|
|
27065
|
+
]
|
|
27066
|
+
}
|
|
27067
|
+
]);
|
|
27042
27068
|
import_fs_extra21.default.ensureDirSync(targetDir);
|
|
27043
27069
|
if (import_fs_extra21.default.existsSync(targetPath)) {
|
|
27044
27070
|
const { overwrite } = await import_inquirer4.default.prompt([
|
|
@@ -27055,8 +27081,12 @@ async function handleToolsAdd(name) {
|
|
|
27055
27081
|
}
|
|
27056
27082
|
import_fs_extra21.default.removeSync(targetPath);
|
|
27057
27083
|
}
|
|
27058
|
-
|
|
27059
|
-
|
|
27084
|
+
if (action === "move") {
|
|
27085
|
+
import_fs_extra21.default.moveSync(toolDir, targetPath, { overwrite: true });
|
|
27086
|
+
} else {
|
|
27087
|
+
import_fs_extra21.default.copySync(toolDir, targetPath, { overwrite: true });
|
|
27088
|
+
}
|
|
27089
|
+
logSuccess(`Tool ${scope === "local" ? "locally" : "globally"} ${action === "move" ? "moved" : "copied"}: ${targetPath}`);
|
|
27060
27090
|
}
|
|
27061
27091
|
async function handleToolsGenerate(target) {
|
|
27062
27092
|
if (!target.trim()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepfish-ai",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An efficient AI-driven command-line tool designed to bridge the gap between natural language and operating system commands, file operations, and more. It enables non-developers to quickly generate executable instructions through simple natural language descriptions, significantly improving terminal operation efficiency.",
|
|
6
6
|
"repository": {
|