@genspark/cli 1.14.1 → 1.14.2
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/commands/aidrive-contract.generated.d.ts +3 -0
- package/dist/commands/aidrive-contract.generated.d.ts.map +1 -0
- package/dist/commands/aidrive-contract.generated.js +536 -0
- package/dist/commands/aidrive-contract.generated.js.map +1 -0
- package/dist/commands/aidrive-operands.d.ts +2 -0
- package/dist/commands/aidrive-operands.d.ts.map +1 -1
- package/dist/commands/aidrive-operands.js +22 -26
- package/dist/commands/aidrive-operands.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +70 -38
- package/dist/index.js.map +1 -1
- package/dist/serviceActions.d.ts +2 -0
- package/dist/serviceActions.d.ts.map +1 -1
- package/dist/serviceActions.js +13 -1
- package/dist/serviceActions.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/skills.md +2 -2
- package/package.json +1 -1
- package/skills/gsk-aidrive/SKILL.md +17 -11
- package/skills/gsk-connector/SKILL.md +23 -9
- package/skills/gsk-genteam/SKILL.md +1 -1
- package/skills/gsk-gmail/SKILL.md +1 -1
- package/skills/gsk-outlook-calendar/SKILL.md +1 -1
- package/skills/gsk-outlook-email/SKILL.md +1 -1
- package/skills/gsk-sb-brain/SKILL.md +32 -21
- package/skills/gsk-second-brain/SKILL.md +42 -14
- package/skills/gsk-shared/SKILL.md +7 -1
- package/skills/gsk-video-generation/SKILL.md +6 -2
package/dist/config.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface ConfigFile {
|
|
|
23
23
|
*/
|
|
24
24
|
vd_project_id?: string;
|
|
25
25
|
}
|
|
26
|
-
export declare const GSK_CLI_CAPS = "cli-groups-v2,cli-paths-v3,cli-actions-v4,cli-confirm-v1,cli-yes-only-v1,cli-local-source-v1";
|
|
26
|
+
export declare const GSK_CLI_CAPS = "cli-groups-v2,cli-paths-v3,cli-actions-v4,cli-confirm-v1,cli-yes-only-v1,cli-local-source-v1,cli-drive-actions-v1";
|
|
27
27
|
/**
|
|
28
28
|
* Set (or clear) the custom config path. Call this before any other
|
|
29
29
|
* function in this module so that subsequent reads/writes target the
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAuBD,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAuBD,eAAO,MAAM,YAAY,sHAC4F,CAAA;AAmCrH;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAEvE;AAYD;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAKtC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAiC3C;AAmFD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAEvD;AAuBD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAC5B,UAAU,GAAE,CAAC,MAAM,UAAU,CAAC,EAAO,GACpC,IAAI,CASN;AAsCD,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAEvE;AAaD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,IAAI,CA0CnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAOtC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,UAAU,EAAE,EACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,IAAI,CAsBN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAIR"}
|
package/dist/config.js
CHANGED
|
@@ -31,7 +31,7 @@ import { randomUUID } from 'crypto';
|
|
|
31
31
|
// so their --skip_confirmation flags and args-file payloads keep parsing.
|
|
32
32
|
// Because the caps string is part of the cache filename, their cache and
|
|
33
33
|
// this binary's cache never mix.
|
|
34
|
-
export const GSK_CLI_CAPS = 'cli-groups-v2,cli-paths-v3,cli-actions-v4,cli-confirm-v1,cli-yes-only-v1,cli-local-source-v1';
|
|
34
|
+
export const GSK_CLI_CAPS = 'cli-groups-v2,cli-paths-v3,cli-actions-v4,cli-confirm-v1,cli-yes-only-v1,cli-local-source-v1,cli-drive-actions-v1';
|
|
35
35
|
const CONFIG_DIR = '.genspark-tool-cli';
|
|
36
36
|
const CONFIG_FILE = 'config.json';
|
|
37
37
|
// Pre-caps CLIs (e.g. the Genspark Desktop bundled binary) read this file
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAoBnC,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,6EAA6E;AAC7E,mEAAmE;AACnE,6EAA6E;AAC7E,4EAA4E;AAC5E,0BAA0B;AAC1B,EAAE;AACF,+DAA+D;AAC/D,0EAA0E;AAC1E,6DAA6D;AAC7D,2EAA2E;AAC3E,uDAAuD;AACvD,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,iCAAiC;AACjC,MAAM,CAAC,MAAM,YAAY,GACvB,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ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C1B,MAAyB,OAAO,CAAC,GAAG;IAEpC,MAAM,IAAI,GAAG,GAAG,CAAC,cAAc,CAAA;IAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAA;IACpE,OAAO,MAAM,IAAI,EAAE,CAAA;AACrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import { shimLegacyTaskInvocation } from './task-shim.js';
|
|
|
47
47
|
import { getSandboxRuntime } from './runtime.js';
|
|
48
48
|
import { registerDesignCommand } from './commands/design.js';
|
|
49
49
|
import { collectUploadFiles, aidriveUploadHeaders, buildAidriveUploadQuery, mergeShareIntoUpload, normalizeUploadDestination, resolveAidriveUploadOperands, shareArgsFromUpload, uploadConflictFromCli, uploadConflictProblem, uploadPathForDestination, uploadShareRefusal, } from './commands/aidrive-upload.js';
|
|
50
|
-
import { aidriveOperandArgs } from './commands/aidrive-operands.js';
|
|
50
|
+
import { aidriveOperandArgs, canonicalDriveAction, driveArgumentError } from './commands/aidrive-operands.js';
|
|
51
51
|
import { resolveAidriveDownloadOperands, normalizeDrivePath, extractReadableUrl, shouldResolveFileWrapperUrl, } from './commands/aidrive-download.js';
|
|
52
52
|
import { fileNameFromContentDisposition, genteamAttachmentEndpoint, resolveGenteamDownloadDestination, saveBodyToFile, } from './commands/genteam-download.js';
|
|
53
53
|
import { CALL_RECORDING_INFO_HELP, CALL_RECORDING_LOCAL_FILE_HELP, callRecordingEndpoint, defaultRecordingFileName, formatBytes, normalizeRecordingChannels, progressThrottle, RECORDING_CHANNEL_MODES, recordingDestinationOperands, recordingProgressLine, } from './commands/telephony-recording.js';
|
|
@@ -794,6 +794,25 @@ function parseBooleanFlagValue(value) {
|
|
|
794
794
|
return false;
|
|
795
795
|
throw new InvalidArgumentError(`expected true/false. If '${value}' was meant as an argument, place it before the flag or pass an explicit value (--flag true ${value}).`);
|
|
796
796
|
}
|
|
797
|
+
function addAidriveLocalOptions(cmd, props, action) {
|
|
798
|
+
if (!Object.hasOwn(props, 'workspace')) {
|
|
799
|
+
cmd.option('--workspace <value>', 'AI Drive workspace: my_drive, shared_with_me, or shared_drive');
|
|
800
|
+
}
|
|
801
|
+
cmd.option('--local_file <path>', action === 'download'
|
|
802
|
+
? 'Local destination path; use --local_file with --id or --url. ' +
|
|
803
|
+
'Otherwise the second operand is the destination.'
|
|
804
|
+
: 'upload: local file path to upload to AI Drive (supports files >5 MB; ' +
|
|
805
|
+
'alternative to --file_content; same as the first operand of ' +
|
|
806
|
+
'`upload <local> <drive folder>/`). download: local destination path ' +
|
|
807
|
+
'(same as the second operand; default ./<basename of the drive path>)');
|
|
808
|
+
// An optional value, as schema booleans take: presence-only, the
|
|
809
|
+
// `false` in `--override false` was left over and the upload overwrote.
|
|
810
|
+
cmd.option('--override [value]', 'Overwrite an existing file at the destination path (used with --local_file)', parseBooleanFlagValue);
|
|
811
|
+
cmd.option('--on-conflict <mode>', 'upload: what to do when the destination name is taken — ' +
|
|
812
|
+
'error | rename | overwrite (default: rename, which lands ' +
|
|
813
|
+
'name(1).ext and reports the path actually written). Use error for ' +
|
|
814
|
+
'idempotent scripts that retry on failure.');
|
|
815
|
+
}
|
|
797
816
|
/**
|
|
798
817
|
* Register one schema parameter as a Commander option.
|
|
799
818
|
*
|
|
@@ -999,6 +1018,10 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
999
1018
|
// accepts its own and rejects wrong-action flags at parse time. Hidden
|
|
1000
1019
|
// legacy forms keep the union view.
|
|
1001
1020
|
const actionViews = cmdOpts?.deprecated ? null : serviceActionViews(tool);
|
|
1021
|
+
// Preserve pre-action flags for old Drive scripts; let subcommands parse
|
|
1022
|
+
// post-action flags themselves so scoped help and local operands both work.
|
|
1023
|
+
if (tool.name === 'aidrive' && actionViews)
|
|
1024
|
+
cmd.enablePositionalOptions();
|
|
1002
1025
|
// If primary_arg is set, make it a positional argument
|
|
1003
1026
|
if (tool.cli.primary_arg && props[tool.cli.primary_arg]) {
|
|
1004
1027
|
const param = props[tool.cli.primary_arg];
|
|
@@ -1023,7 +1046,7 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1023
1046
|
// unknown action names still reach the server) and --args-file.
|
|
1024
1047
|
const aliases = tool.cli.parameter_aliases || {};
|
|
1025
1048
|
for (const [name, param] of Object.entries(props)) {
|
|
1026
|
-
if (actionViews)
|
|
1049
|
+
if (actionViews && tool.name !== 'aidrive')
|
|
1027
1050
|
break;
|
|
1028
1051
|
if (name === tool.cli.primary_arg)
|
|
1029
1052
|
continue;
|
|
@@ -1116,22 +1139,8 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1116
1139
|
}
|
|
1117
1140
|
// For the aidrive tool, add client-side options used by the --local_file
|
|
1118
1141
|
// upload and by `download`'s local destination.
|
|
1119
|
-
if (tool.name === 'aidrive')
|
|
1120
|
-
|
|
1121
|
-
cmd.option('--workspace <value>', 'AI Drive workspace: my_drive, shared_with_me, or shared_drive');
|
|
1122
|
-
}
|
|
1123
|
-
cmd.option('--local_file <path>', 'upload: local file path to upload to AI Drive (supports files >5 MB; ' +
|
|
1124
|
-
'alternative to --file_content; same as the first operand of ' +
|
|
1125
|
-
'`upload <local> <drive folder>/`). download: local destination path ' +
|
|
1126
|
-
'(same as the second operand; default ./<basename of the drive path>)');
|
|
1127
|
-
// An optional value, as schema booleans take: presence-only, the
|
|
1128
|
-
// `false` in `--override false` was left over and the upload overwrote.
|
|
1129
|
-
cmd.option('--override [value]', 'Overwrite an existing file at the destination path (used with --local_file)', parseBooleanFlagValue);
|
|
1130
|
-
cmd.option('--on-conflict <mode>', 'upload: what to do when the destination name is taken — ' +
|
|
1131
|
-
'error | rename | overwrite (default: rename, which lands ' +
|
|
1132
|
-
'name(1).ext and reports the path actually written). Use error for ' +
|
|
1133
|
-
'idempotent scripts that retry on failure.');
|
|
1134
|
-
}
|
|
1142
|
+
if (tool.name === 'aidrive')
|
|
1143
|
+
addAidriveLocalOptions(cmd, props);
|
|
1135
1144
|
// genteam download saves the attachment to local disk (client-side: only
|
|
1136
1145
|
// this process can write the local filesystem). The union view takes the
|
|
1137
1146
|
// flag here; the per-action `download` subcommand registers it below.
|
|
@@ -1186,6 +1195,9 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1186
1195
|
opts = primaryArgValue;
|
|
1187
1196
|
primaryArgValue = undefined;
|
|
1188
1197
|
}
|
|
1198
|
+
if (tool.name === 'aidrive' && invokedCmd !== cmd) {
|
|
1199
|
+
opts = { ...cmd.opts(), ...opts };
|
|
1200
|
+
}
|
|
1189
1201
|
// Global flags written after the tool name arrive here as the
|
|
1190
1202
|
// subcommand's own options: record them for getGlobalOptions and keep
|
|
1191
1203
|
// them out of the tool arguments (they are not server parameters).
|
|
@@ -1478,29 +1490,34 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1478
1490
|
let aidriveOperands = [];
|
|
1479
1491
|
if (tool.name === 'aidrive' && typeof args.action === 'string') {
|
|
1480
1492
|
const actionNames = props.action?.enum;
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
// "rm" would have removed a path named "ls".
|
|
1493
|
+
const primaryAction = primaryArgValue === undefined
|
|
1494
|
+
? undefined : canonicalDriveAction(primaryArgValue);
|
|
1495
|
+
const action = canonicalDriveAction(args.action);
|
|
1496
|
+
args.action = action;
|
|
1497
|
+
if (primaryAction !== undefined && primaryAction !== action &&
|
|
1498
|
+
(invokedCmd !== cmd || (Array.isArray(actionNames) && actionNames.includes(primaryAction)))) {
|
|
1488
1499
|
logError(`The command line names the action ${primaryArgValue} and ` +
|
|
1489
1500
|
`--args-file names ${args.action}; pass one. Nothing was sent.`);
|
|
1490
1501
|
process.exit(1);
|
|
1491
1502
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1503
|
+
if (Array.isArray(actionNames) && !actionNames.includes(action)) {
|
|
1504
|
+
logError(`Unknown AI Drive action: ${args.action}. Run gsk drive --help for available actions. Nothing was sent.`);
|
|
1505
|
+
process.exit(1);
|
|
1506
|
+
}
|
|
1507
|
+
aidriveOperands = invokedCmd !== cmd ? invokedCmd.args
|
|
1508
|
+
: primaryAction !== undefined && primaryAction === action
|
|
1509
|
+
? invokedCmd.args.slice(1) : invokedCmd.args;
|
|
1510
|
+
const mapped = aidriveOperandArgs(action, aidriveOperands, args);
|
|
1499
1511
|
if (mapped.error) {
|
|
1500
1512
|
logError(mapped.error);
|
|
1501
1513
|
process.exit(1);
|
|
1502
1514
|
}
|
|
1503
1515
|
Object.assign(args, mapped.filled);
|
|
1516
|
+
const argumentError = driveArgumentError(action, args);
|
|
1517
|
+
if (argumentError) {
|
|
1518
|
+
logError(argumentError + ' Nothing was sent.');
|
|
1519
|
+
process.exit(1);
|
|
1520
|
+
}
|
|
1504
1521
|
}
|
|
1505
1522
|
// Pre-call confirmation (confirm.ts): when the cached /tools
|
|
1506
1523
|
// payload advertised interactive_confirm AND the schema marks this
|
|
@@ -1705,10 +1722,7 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1705
1722
|
// Never forwarded to the server, which answers a CLI too old to
|
|
1706
1723
|
// intercept it with the two-call equivalent.
|
|
1707
1724
|
if (tool.name === 'aidrive' && args.action === 'download') {
|
|
1708
|
-
const
|
|
1709
|
-
? invokedCmd.args.slice(1)
|
|
1710
|
-
: invokedCmd.args;
|
|
1711
|
-
const { drivePath: sourceOperand, localPath: operandDest } = resolveAidriveDownloadOperands(operandCandidates, typeof args.path === 'string' ? args.path : undefined);
|
|
1725
|
+
const { drivePath: sourceOperand, localPath: operandDest } = resolveAidriveDownloadOperands(aidriveOperands, typeof args.path === 'string' ? args.path : undefined);
|
|
1712
1726
|
const hasDownloadLocator = !!(args.id || args.url || args.source || args.share);
|
|
1713
1727
|
if (!sourceOperand && !hasDownloadLocator) {
|
|
1714
1728
|
logError('download needs the AI-Drive path: gsk aidrive download ' +
|
|
@@ -2352,12 +2366,19 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2352
2366
|
const allActionNames = actionViews.map(view => view.name);
|
|
2353
2367
|
for (const view of actionViews) {
|
|
2354
2368
|
const sub = cmd.command(view.name).description(view.description);
|
|
2355
|
-
|
|
2369
|
+
if (tool.name === 'aidrive') {
|
|
2370
|
+
sub.aliases(view.aliases);
|
|
2371
|
+
if (view.example)
|
|
2372
|
+
sub.addHelpText('after', `\nExample: ${view.example}`);
|
|
2373
|
+
}
|
|
2374
|
+
const parameterNames = tool.name === 'aidrive'
|
|
2375
|
+
? Object.keys(props).filter(name => name !== tool.cli.primary_arg) : view.parameters;
|
|
2376
|
+
for (const paramName of parameterNames) {
|
|
2356
2377
|
addSchemaOption(sub, paramName, props[paramName], {
|
|
2357
2378
|
// Same relaxation as the union path: with --args-file on the
|
|
2358
2379
|
// command line, required params may live in the file, which
|
|
2359
2380
|
// Commander cannot see at parse time.
|
|
2360
|
-
isRequired: argsFileInvoked
|
|
2381
|
+
isRequired: argsFileInvoked || tool.name === 'aidrive'
|
|
2361
2382
|
? false
|
|
2362
2383
|
: view.required.includes(paramName),
|
|
2363
2384
|
shortAlias: aliases[paramName],
|
|
@@ -2367,6 +2388,17 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2367
2388
|
description: actionScopedDescription(props[paramName].description || paramName, view.name, allActionNames),
|
|
2368
2389
|
});
|
|
2369
2390
|
}
|
|
2391
|
+
if (tool.name === 'aidrive') {
|
|
2392
|
+
addAidriveLocalOptions(sub, props, view.name);
|
|
2393
|
+
const localFlags = view.name === 'upload'
|
|
2394
|
+
? ['local_file', 'override', 'on-conflict']
|
|
2395
|
+
: view.name === 'download' ? ['local_file'] : [];
|
|
2396
|
+
for (const option of sub.options) {
|
|
2397
|
+
const name = option.long?.slice(2) ?? '';
|
|
2398
|
+
if (!view.parameters.includes(name) && !localFlags.includes(name))
|
|
2399
|
+
option.hideHelp();
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2370
2402
|
const actionInfo = tool.actions?.[view.name];
|
|
2371
2403
|
if (actionInfo?.requires_confirmation === true) {
|
|
2372
2404
|
addHiddenLegacySkipOptions(sub, props);
|