pi-lens 3.8.34 → 3.8.35
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to pi-lens will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.8.35] - 2026-05-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Startup hang for all users fixed (issue #46)** — `igniteWarmFiles` was previously `await`ed unconditionally on the session-start path, causing every session to pay the cost of a full directory walk looking for `lsp.json` (checking 3 config paths at every ancestor up to the filesystem root) before returning. This caused the 20–30s startup delay reported in 3.8.34 regardless of whether `warmFiles` was configured. The `loadLSPConfig` call now runs with `await` at the call site; if `warmFiles` is absent or empty, `igniteWarmFiles` is skipped entirely. When warm files are configured, the per-file LSP `touchFile` loop runs fire-and-forget so it never blocks session completion.
|
|
10
|
+
|
|
5
11
|
## [3.8.34] - 2026-05-01
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -108,6 +108,7 @@ function resolveOldTextEdits(
|
|
|
108
108
|
tool: "edit",
|
|
109
109
|
source: "edits_without_ranges",
|
|
110
110
|
editIndex,
|
|
111
|
+
oldTextPreview: preview,
|
|
111
112
|
},
|
|
112
113
|
});
|
|
113
114
|
} else if (occurrenceLines.length === 1) {
|
|
@@ -141,6 +142,7 @@ function resolveOldTextEdits(
|
|
|
141
142
|
editIndex,
|
|
142
143
|
occurrenceCount: occurrenceLines.length,
|
|
143
144
|
occurrenceLines,
|
|
145
|
+
oldTextPreview: preview,
|
|
144
146
|
},
|
|
145
147
|
});
|
|
146
148
|
}
|
|
@@ -81,15 +81,12 @@ function resolveStartupMode(): StartupMode {
|
|
|
81
81
|
|
|
82
82
|
async function igniteWarmFiles(
|
|
83
83
|
cwd: string,
|
|
84
|
+
warmFiles: string[],
|
|
84
85
|
runtime: RuntimeCoordinator,
|
|
85
86
|
sessionGeneration: number,
|
|
86
87
|
dbg: (msg: string) => void,
|
|
87
88
|
): Promise<void> {
|
|
88
89
|
try {
|
|
89
|
-
const config = await loadLSPConfig(cwd);
|
|
90
|
-
const warmFiles = config.warmFiles ?? [];
|
|
91
|
-
if (warmFiles.length === 0) return;
|
|
92
|
-
|
|
93
90
|
dbg(`session_start lsp-warm: ${warmFiles.length} warm file(s) configured`);
|
|
94
91
|
|
|
95
92
|
await initLSPConfig(cwd);
|
|
@@ -608,10 +605,17 @@ export async function handleSessionStart(
|
|
|
608
605
|
|
|
609
606
|
dbg("session_start: background scans launched");
|
|
610
607
|
|
|
611
|
-
// LSP warm files —
|
|
612
|
-
//
|
|
608
|
+
// LSP warm files — read config synchronously on the startup path (cheap file
|
|
609
|
+
// walk), then fire-and-forget the LSP touchFile loop so session start is not
|
|
610
|
+
// blocked by per-file LSP waits.
|
|
613
611
|
if (!getFlag("no-lsp") && allowBootstrapTasks) {
|
|
614
|
-
await
|
|
612
|
+
const lspConfig = await loadLSPConfig(cwd);
|
|
613
|
+
const warmFiles = lspConfig.warmFiles ?? [];
|
|
614
|
+
if (warmFiles.length > 0) {
|
|
615
|
+
igniteWarmFiles(cwd, warmFiles, runtime, sessionGeneration, dbg).catch((err) =>
|
|
616
|
+
dbg(`session_start lsp-warm: unhandled error: ${err}`),
|
|
617
|
+
);
|
|
618
|
+
}
|
|
615
619
|
}
|
|
616
620
|
|
|
617
621
|
dbg(`session_start total: ${Date.now() - sessionStartMs}ms`);
|