Przeglądaj źródła

fix: Optimize input variable retrieval logic (#22888) (#22914)

tags/1.7.1
HyaCinth 3 miesięcy temu
rodzic
commit
45cebf09b0
No account linked to committer's email address

+ 1
- 1
web/app/components/base/prompt-editor/constants.tsx Wyświetl plik

@@ -30,7 +30,7 @@ export const checkHasQueryBlock = (text: string) => {
* {{#1711617514996.sys.query#}} => [sys, query]
*/
export const getInputVars = (text: string): ValueSelector[] => {
if (!text)
if (!text || typeof text !== 'string')
return []

const allVars = text.match(/{{#([^#]*)#}}/g)

Ładowanie…
Anuluj
Zapisz