mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: input commands
This commit is contained in:
parent
211c41843c
commit
3436523b79
@ -25,13 +25,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let command = '';
|
let command = '';
|
||||||
$: command = (prompt?.trim() ?? '').split(' ')?.at(-1) ?? '';
|
$: command = prompt.split(' ')?.at(-1) ?? '';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if ['/', '#', '@'].includes(command?.charAt(0)) || '\\#' === command.slice(0, 2)}
|
{#if ['/', '#', '@'].includes(command?.charAt(0)) || '\\#' === command.slice(0, 2)}
|
||||||
{#if command?.charAt(0) === '/'}
|
{#if command?.charAt(0) === '/'}
|
||||||
<Prompts bind:this={commandElement} bind:prompt bind:files {command} />
|
<Prompts bind:this={commandElement} bind:prompt bind:files {command} />
|
||||||
{:else if command?.charAt(0) === '#' || '\\#' === command.slice(0, 2)}
|
{:else if (command?.charAt(0) === '#' && command.startsWith('#') && !command.includes('# ')) || ('\\#' === command.slice(0, 2) && command.startsWith('#') && !command.includes('# '))}
|
||||||
<Knowledge
|
<Knowledge
|
||||||
bind:this={commandElement}
|
bind:this={commandElement}
|
||||||
bind:prompt
|
bind:prompt
|
||||||
|
Loading…
Reference in New Issue
Block a user