fix: details

This commit is contained in:
2026-02-28 16:34:37 +08:00
parent a4023c994f
commit 66aaaa96e1
3 changed files with 13 additions and 13 deletions
@@ -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",