@selesai/code 0.3.4 → 0.3.6
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.
|
@@ -439,6 +439,18 @@ export default function tokenInOnboardingExtension(pi: ExtensionAPI): void {
|
|
|
439
439
|
|
|
440
440
|
pi.registerCommand("tokenin", {
|
|
441
441
|
description: "Manage TokenIN accounts: /tokenin add|switch|remove",
|
|
442
|
+
getArgumentCompletions: (prefix: string) => {
|
|
443
|
+
const subcommands = [
|
|
444
|
+
{ name: "add", description: "Add a TokenIN account" },
|
|
445
|
+
{ name: "switch", description: "Switch active account" },
|
|
446
|
+
{ name: "remove", description: "Remove a saved account" },
|
|
447
|
+
];
|
|
448
|
+
const lowerPrefix = prefix.toLowerCase();
|
|
449
|
+
const items = subcommands.filter((s) => s.name.toLowerCase().startsWith(lowerPrefix));
|
|
450
|
+
return items.length > 0
|
|
451
|
+
? items.map((s) => ({ value: s.name, label: s.name, description: s.description }))
|
|
452
|
+
: null;
|
|
453
|
+
},
|
|
442
454
|
handler: async (args: string, ctx: ExtensionCommandContext) => {
|
|
443
455
|
await ctx.waitForIdle();
|
|
444
456
|
const sub = args.trim().split(/\s+/)[0];
|