mirror of
https://github.com/langgenius/dify.git
synced 2026-03-13 21:22:28 +08:00
fix: prompt-editor
This commit is contained in:
parent
d48bdf3e14
commit
459b690416
@ -158,9 +158,9 @@ export function useBasicTypeaheadTriggerMatch(
|
||||
): TriggerFn {
|
||||
return useCallback(
|
||||
(text: string) => {
|
||||
const validChars = `[^${trigger}${PUNCTUATION}\\s]`
|
||||
const validChars = `[${PUNCTUATION}\\s]`
|
||||
const TypeaheadTriggerRegex = new RegExp(
|
||||
`([^${trigger}]|^)(`
|
||||
'(.*)('
|
||||
+ `[${trigger}]`
|
||||
+ `((?:${validChars}){0,${maxLength}})`
|
||||
+ ')$',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user