feat: improve completions loading and UI handling
Refactor the completions system to support both CLI mode (via `/__COMPLETIONS.json`) and a client-side fallback scan for dev mode. - Implement client-side scanning of the file index for dice and headings - Add `ensureCompletions` to allow components to await data readiness - Update `JournalInput` to handle "no results" states in the dropdown - Improve keyboard navigation (Tab to accept, Enter to select) - Update dice regex to support `:md-dice[...]` syntax
This commit is contained in:
@@ -14,7 +14,7 @@ export const diceSource: CompletionSource = {
|
||||
|
||||
scan(index) {
|
||||
const items: DiceCompletion[] = [];
|
||||
const tagRegex = /<md-dice[^>]*>\s*([\s\S]*?)\s*<\/md-dice>/gi;
|
||||
const tagRegex = /:md-dice\[([^[]+)\]/gi;
|
||||
|
||||
for (const [path, content] of Object.entries(index)) {
|
||||
if (!path.endsWith(".md")) continue;
|
||||
|
||||
Reference in New Issue
Block a user