refac
This commit is contained in:
1 parent
eb11029eac
commit
9588c97e64
2 files changed
+179
-2
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Prompts from './Commands/Prompts.svelte';
|
||||
import SlashCommands from './Commands/SlashCommands.svelte';
|
||||
import Knowledge from './Commands/Knowledge.svelte';
|
||||
import Models from './Commands/Models.svelte';
|
||||
import Skills from './Commands/Skills.svelte';
|
||||
@@ -57,7 +57,7 @@
|
||||
<DropdownMenu className="w-72 font-sans text-xs">
|
||||
<div class="overflow-y-auto scrollbar-thin max-h-60">
|
||||
{#if char === '/'}
|
||||
<Prompts
|
||||
<SlashCommands
|
||||
bind:this={suggestionElement}
|
||||
{query}
|
||||
bind:filteredItems
|
||||
@@ -66,6 +66,16 @@
|
||||
|
||||
if (type === 'prompt') {
|
||||
insertTextHandler(data.content);
|
||||
} else if (type === 'skill') {
|
||||
command({
|
||||
id: `${data.id}|${data.name}`,
|
||||
label: data.name
|
||||
});
|
||||
|
||||
onSelect({
|
||||
type: 'skill',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user