Fix query mode prefix regex to handle multiline queries in WebUI
- Allow newlines in query text - Change `.+` to `[\s\S]+` in regex - Support multiline input parsing - Fix prefix matching edge case
This commit is contained in:
parent
0fd0186414
commit
16e574a083
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ export default function RetrievalTesting() {
|
||||||
|
|
||||||
// Parse query mode prefix
|
// Parse query mode prefix
|
||||||
const allowedModes: QueryMode[] = ['naive', 'local', 'global', 'hybrid', 'mix', 'bypass']
|
const allowedModes: QueryMode[] = ['naive', 'local', 'global', 'hybrid', 'mix', 'bypass']
|
||||||
const prefixMatch = inputValue.match(/^\/(\w+)\s+(.+)/)
|
const prefixMatch = inputValue.match(/^\/(\w+)\s+([\s\S]+)/)
|
||||||
let modeOverride: QueryMode | undefined = undefined
|
let modeOverride: QueryMode | undefined = undefined
|
||||||
let actualQuery = inputValue
|
let actualQuery = inputValue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue