import QtQuick import "SearchLogic.js" as Search QtObject { property string query: "" property int limit: 50 property bool enabled: false readonly property var indexed: Search.index(CommandRegistry.commands.map(command => ({ id: command.id, title: command.title, description: command.description || "Shell command", command: true, kind: command.kind || "Settings", fields: [ { text: command.id }, { text: command.title }, { text: command.description, penalty: 500 } ] }))) readonly property var results: enabled ? Search.rank(indexed, query.replace(/^\s*>/, ""), limit) : [] }