fix: truncate webfetch content to fit context
This commit is contained in:
@@ -25,6 +25,8 @@ CustomListView {
|
||||
return [0];
|
||||
case "variant":
|
||||
return SchemeVariants.query(text);
|
||||
case "files":
|
||||
return Files.query(text);
|
||||
default:
|
||||
return Apps.search(text);
|
||||
}
|
||||
@@ -33,7 +35,7 @@ CustomListView {
|
||||
function stateForText(text: string): string {
|
||||
const prefix = Config.launcher.actionPrefix;
|
||||
if (text.startsWith(prefix)) {
|
||||
for (const action of ["calc", "scheme", "variant"])
|
||||
for (const action of ["calc", "scheme", "variant", "files"])
|
||||
if (text.startsWith(`${prefix}${action} `))
|
||||
return action;
|
||||
|
||||
@@ -163,6 +165,13 @@ CustomListView {
|
||||
PropertyChanges {
|
||||
root.delegate: variantItem
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "files"
|
||||
|
||||
PropertyChanges {
|
||||
root.delegate: filesItem
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: Transition {
|
||||
@@ -264,6 +273,14 @@ CustomListView {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: filesItem
|
||||
|
||||
FilesItem {
|
||||
list: root
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onTextChanged() {
|
||||
root.syncDisplayText();
|
||||
|
||||
Reference in New Issue
Block a user