fix(editor): Fix RAG Callout keyboard navigation in nodes search (#17099)

This commit is contained in:
Charlie Kolb
2025-07-08 11:15:31 +02:00
committed by GitHub
parent 878026aff6
commit 3610748913
2 changed files with 4 additions and 2 deletions

View File

@@ -277,6 +277,7 @@ function arrowLeft() {
function onKeySelect(activeItemId: string) {
const mergedItems = flattenCreateElements([
...(globalCallouts.value ?? []),
...(activeViewStack.value.items ?? []),
...(globalSearchItemsDiff.value ?? []),
...(moreFromCommunity.value ?? []),
@@ -290,13 +291,13 @@ function onKeySelect(activeItemId: string) {
registerKeyHook('MainViewArrowRight', {
keyboardKeys: ['ArrowRight', 'Enter'],
condition: (type) => ['subcategory', 'node', 'link', 'view'].includes(type),
condition: (type) => ['subcategory', 'node', 'link', 'view', 'openTemplate'].includes(type),
handler: onKeySelect,
});
registerKeyHook('MainViewArrowLeft', {
keyboardKeys: ['ArrowLeft'],
condition: (type) => ['subcategory', 'node', 'link', 'view'].includes(type),
condition: (type) => ['subcategory', 'node', 'link', 'view', 'openTemplate'].includes(type),
handler: arrowLeft,
});
</script>

View File

@@ -314,6 +314,7 @@ export function getRootSearchCallouts(search: string, { isRagStarterCalloutVisib
const ragKeywords = ['rag', 'vec', 'know'];
if (isRagStarterCalloutVisible && ragKeywords.some((x) => search.toLowerCase().startsWith(x))) {
results.push({
uuid: 'rag-starter-template',
key: 'rag-starter-template',
type: 'openTemplate',
properties: {