fix: details
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createSignal, createMemo } from "solid-js";
|
||||
import { createSignal } from "solid-js";
|
||||
import {
|
||||
MdCommanderCommand,
|
||||
CommanderEntry,
|
||||
@@ -146,7 +146,7 @@ export function getCompletions(
|
||||
.filter((cmd) => cmd.command.startsWith(parsed.command || ""))
|
||||
.map((cmd) => ({
|
||||
label: cmd.command,
|
||||
type: "command",
|
||||
type: "command" as "command",
|
||||
description: cmd.description,
|
||||
insertText: cmd.command,
|
||||
}));
|
||||
@@ -162,7 +162,7 @@ export function getCompletions(
|
||||
const option = cmd.options[parsed.incompleteOption];
|
||||
if (option?.type === "enum" && option.values) {
|
||||
return option.values
|
||||
.filter((v) => v.startsWith(parsed.incompleteOption))
|
||||
.filter((v) => parsed.incompleteOption && v.startsWith(parsed.incompleteOption))
|
||||
.map((v) => ({
|
||||
label: v,
|
||||
type: "value",
|
||||
|
||||
Reference in New Issue
Block a user