@code-yeongyu/senpi-tui 2026.10.1-2 → 2026.10.1-3

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.
@@ -3,7 +3,7 @@ export interface AutocompleteItem {
3
3
  label: string;
4
4
  description?: string;
5
5
  /**
6
- * The command declares an argument hint: confirming the row completes `/name ` and waits for
6
+ * The command requires arguments: confirming the row completes `/name ` and waits for
7
7
  * arguments instead of submitting.
8
8
  */
9
9
  awaitsArguments?: boolean;
@@ -13,6 +13,8 @@ export interface SlashCommand {
13
13
  name: string;
14
14
  description?: string;
15
15
  argumentHint?: string;
16
+ /** Whether picker Enter must wait for arguments. Omitted means: wait only when `argumentHint` is set. */
17
+ requiresArguments?: boolean;
16
18
  getArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;
17
19
  }
18
20
  export interface AutocompleteSuggestions {
@@ -38,6 +38,8 @@ export function getSlashCommandSuggestions(commands, prefix) {
38
38
  return [];
39
39
  }
40
40
  const hint = "argumentHint" in cmd && cmd.argumentHint ? cmd.argumentHint : undefined;
41
+ // A hint without an explicit `requiresArguments` means the command expects input.
42
+ const requiresArguments = ("requiresArguments" in cmd ? cmd.requiresArguments : undefined) ?? hint !== undefined;
41
43
  const desc = cmd.description ?? "";
42
44
  const fullDesc = hint ? (desc ? `${hint} — ${desc}` : hint) : desc;
43
45
  return [
@@ -46,7 +48,7 @@ export function getSlashCommandSuggestions(commands, prefix) {
46
48
  label: name,
47
49
  description: fullDesc || undefined,
48
50
  searchText: isSkill && !explicitSkillNamespace ? skillName : name,
49
- awaitsArguments: hint !== undefined,
51
+ awaitsArguments: requiresArguments || ("awaitsArguments" in cmd && cmd.awaitsArguments === true),
50
52
  },
51
53
  ];
52
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-tui",
3
- "version": "2026.10.1-2",
3
+ "version": "2026.10.1-3",
4
4
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",