kritya 0.8.44-beta → 0.8.45-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shell/sandbox.js +1 -1
- package/dist/ui/palette.js +10 -10
- package/package.json +1 -1
package/dist/shell/sandbox.js
CHANGED
|
@@ -153,7 +153,7 @@ function windowsQuote(value) {
|
|
|
153
153
|
export function canaryProbes(escaped, wroteInside) {
|
|
154
154
|
return [
|
|
155
155
|
{
|
|
156
|
-
what: "a write outside the workspace (system temp dir)
|
|
156
|
+
what: "a write outside the workspace (system temp dir) did not reach the host",
|
|
157
157
|
held: !escaped,
|
|
158
158
|
},
|
|
159
159
|
{
|
package/dist/ui/palette.js
CHANGED
|
@@ -26,19 +26,19 @@ export function fuzzyMatch(haystack, needle) {
|
|
|
26
26
|
* cleared by accident), `checkpoint:<name>` rewinds to that checkpoint.
|
|
27
27
|
*
|
|
28
28
|
* `recency` (command name → last-run epoch ms) floats recently *used*
|
|
29
|
-
* commands above the rest
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
29
|
+
* commands above the rest, the way VS Code's quick open does — including
|
|
30
|
+
* within filtered results, so the command you reach for stays one Enter away
|
|
31
|
+
* even while typing. Within each group the sort is stable, so the declaration
|
|
32
|
+
* order stays the tiebreak and the list is still predictable on a fresh
|
|
33
|
+
* install (`recency` omitted).
|
|
34
34
|
*/
|
|
35
35
|
export function buildPaletteItems(commands, checkpoints, filter, recency) {
|
|
36
36
|
const items = [];
|
|
37
|
-
// Sort first, filter second: filtering
|
|
38
|
-
//
|
|
39
|
-
const ordered =
|
|
40
|
-
? commands
|
|
41
|
-
:
|
|
37
|
+
// Sort first, filter second: filtering only narrows the list, so typing
|
|
38
|
+
// more of a fragment never reorders what is already on screen.
|
|
39
|
+
const ordered = recency
|
|
40
|
+
? [...commands].sort((a, b) => (recency[b.name] ?? 0) - (recency[a.name] ?? 0))
|
|
41
|
+
: commands;
|
|
42
42
|
for (const c of ordered) {
|
|
43
43
|
if (!fuzzyMatch(`${c.name} ${c.description}`, filter))
|
|
44
44
|
continue;
|