@code-fixer-23/pi-session-manager 1.0.5 → 1.1.0
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 +26 -0
- package/README.md +99 -76
- package/extensions/index.test.ts +183 -18
- package/extensions/index.ts +1256 -1065
- package/package.json +3 -2
- package/tsconfig.json +6 -1
- package/types/pi-extension-settings.d.ts +40 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 1.1.0 (2026-08-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **pi-session-manager:** persist config through extension settings ([933f395](https://github.com/louiss0/pi-packages/commit/933f395))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **workspace:** pin typescript to ~6.0.3 across packages ([e11938a](https://github.com/louiss0/pi-packages/commit/e11938a))
|
|
10
|
+
- **pi-session-manager:** align test mocks with strict compiler flags ([fba5182](https://github.com/louiss0/pi-packages/commit/fba5182))
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- louiss0 @louiss0
|
|
15
|
+
|
|
16
|
+
## 1.0.6 (2026-07-14)
|
|
17
|
+
|
|
18
|
+
### 🩹 Fixes
|
|
19
|
+
|
|
20
|
+
- **pi-session-manager:** display README asset ([4628004](https://github.com/louiss0/pi-packages/commit/4628004))
|
|
21
|
+
- **pi-session-manager:** respect empty title cancellation ([37729af](https://github.com/louiss0/pi-packages/commit/37729af))
|
|
22
|
+
|
|
23
|
+
### ❤️ Thank You
|
|
24
|
+
|
|
25
|
+
- louiss0 @louiss0
|
|
26
|
+
|
|
1
27
|
## 1.0.5 (2026-07-08)
|
|
2
28
|
|
|
3
29
|
### 🩹 Fixes
|
package/README.md
CHANGED
|
@@ -1,76 +1,99 @@
|
|
|
1
|
-
# pi-session-manager
|
|
2
|
-
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.com/package/@code-fixer-23/pi-session-manager)
|
|
7
|
-
[](https://www.npmjs.com/package/@code-fixer-23/pi-session-manager)
|
|
8
|
-
[](./LICENSE)
|
|
9
|
-
[](https://github.com/louiss0/pi-packages/actions/workflows/ci.yml)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
`pi-session-manager` adds local session cleanup and series management workflows to PI. It helps keep session history organized by pruning stale sessions stored on your machine, naming related sessions consistently, and carrying series context forward between sessions. The package plugs into PI's extension lifecycle so it can react when a session starts, restore persisted series metadata, and expose commands that coordinate session creation, continuation, and cleanup.
|
|
13
|
-
|
|
14
|
-
## pi-session-manager
|
|
15
|
-
|
|
16
|
-
This package ships a single PI extension in `extensions/index.ts`, supported by a small test suite and a helper script for scaffolding additional extension entry points.
|
|
17
|
-
|
|
18
|
-
### Behavior overview
|
|
19
|
-
|
|
20
|
-
The extension centers on two workflows:
|
|
21
|
-
|
|
22
|
-
1. **Session cleanup** — it can remove inactive local sessions automatically on startup or manually through commands.
|
|
23
|
-
2. **Session series management** — it records related sessions under a shared series name, preserves that context across session restarts, and lets you continue or extend a series later.
|
|
24
|
-
|
|
25
|
-
On session start, the extension first restores any persisted series data from the temp directory so PI can resume the correct session name and custom entry. When the session starts normally or after a reload, it also loads the package config, checks the cleanup rules, and removes stale local sessions if they exceed the configured age limit.
|
|
26
|
-
|
|
27
|
-
If you want a session gone, delete it through the package commands instead of editing the config by hand. The config is an internal coordination file, not a user-edit surface.
|
|
28
|
-
|
|
29
|
-
> Warning: do not edit
|
|
30
|
-
|
|
31
|
-
### Commands
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
1
|
+
# pi-session-manager
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/@code-fixer-23/pi-session-manager)
|
|
7
|
+
[](https://www.npmjs.com/package/@code-fixer-23/pi-session-manager)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://github.com/louiss0/pi-packages/actions/workflows/ci.yml)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
`pi-session-manager` adds local session cleanup and series management workflows to PI. It helps keep session history organized by pruning stale sessions stored on your machine, naming related sessions consistently, and carrying series context forward between sessions. The package plugs into PI's extension lifecycle so it can react when a session starts, restore persisted series metadata, and expose commands that coordinate session creation, continuation, and cleanup.
|
|
13
|
+
|
|
14
|
+
## pi-session-manager
|
|
15
|
+
|
|
16
|
+
This package ships a single PI extension in `extensions/index.ts`, supported by a small test suite and a helper script for scaffolding additional extension entry points.
|
|
17
|
+
|
|
18
|
+
### Behavior overview
|
|
19
|
+
|
|
20
|
+
The extension centers on two workflows:
|
|
21
|
+
|
|
22
|
+
1. **Session cleanup** — it can remove inactive local sessions automatically on startup or manually through commands.
|
|
23
|
+
2. **Session series management** — it records related sessions under a shared series name, preserves that context across session restarts, and lets you continue or extend a series later.
|
|
24
|
+
|
|
25
|
+
On session start, the extension first restores any persisted series data from the temp directory so PI can resume the correct session name and custom entry. When the session starts normally or after a reload, it also loads the package config, checks the cleanup rules, and removes stale local sessions if they exceed the configured age limit.
|
|
26
|
+
|
|
27
|
+
If you want a session gone, delete it through the package commands instead of editing the config by hand. The config is an internal coordination file, not a user-edit surface.
|
|
28
|
+
|
|
29
|
+
> Warning: do not edit the extension's stored settings directly. If you need to remove a series, use `session-manager:series delete` and let the package update its own state.
|
|
30
|
+
|
|
31
|
+
### Commands
|
|
32
|
+
|
|
33
|
+
All commands live under the `session-manager` namespace. Every cleanup command that works on the current project has an `:all` twin that works on **every** session in the sessions area (`~/.pi/agent/sessions/`), no matter which project it belongs to. After any deletion, you are shown the list of deleted sessions grouped and sorted by project name.
|
|
34
|
+
|
|
35
|
+
#### `session-manager:clean:inactive`
|
|
36
|
+
Deletes local sessions that have been inactive longer than the configured day limit. This command reads the day limit from the shared extension settings, so the cleanup window matches the same rule used during startup cleanup. Use this when you want PI to resume with a clean local session set without manually touching files.
|
|
37
|
+
|
|
38
|
+
#### `session-manager:clean:inactive:all`
|
|
39
|
+
The same inactivity rule as `session-manager:clean:inactive`, but applied to every session stored in the sessions area across all projects. This is the tool for pruning outdated sessions from projects you no longer work in.
|
|
40
|
+
|
|
41
|
+
#### `session-manager:clean:older-than <duration>`
|
|
42
|
+
Deletes local sessions older than a specific duration. The argument accepts either full units like `5days`, `2weeks`, `12hours` or shorthand forms like `5d`, `2w`, `12h`. This is useful when you want to remove sessions using an ad hoc retention threshold instead of the saved day limit.
|
|
43
|
+
|
|
44
|
+
#### `session-manager:clean:older-than:all <duration>`
|
|
45
|
+
The same duration rule as `session-manager:clean:older-than`, but applied to all sessions in the sessions area across every project.
|
|
46
|
+
|
|
47
|
+
#### `session-manager:delete-last <count>`
|
|
48
|
+
Deletes the most recent N local sessions. The argument is an integer from 1 to 10, which makes it a quick recovery tool for removing only the newest session files when you want to clean up by hand.
|
|
49
|
+
|
|
50
|
+
#### `session-manager:delete-last:all <count>`
|
|
51
|
+
Deletes the most recent N sessions across every project in the sessions area. Like the local variant, the count is an integer from 1 to 10. A completion hint labels each option as "last N in every project" so it is easy to tell apart from the project-scoped command.
|
|
52
|
+
|
|
53
|
+
#### `session-manager:series <action>`
|
|
54
|
+
Coordinates the session-series lifecycle. The available actions are:
|
|
55
|
+
|
|
56
|
+
- `create` — create a new series and a first session inside it, then persist the resulting session metadata so PI can restore the series context later.
|
|
57
|
+
- `new` — add a new session to an existing series and keep the series record updated.
|
|
58
|
+
- `continue` — inspect the currently active session entry, recover its series, and start the next session in that same chain.
|
|
59
|
+
- `delete` — remove a series and all local session files whose names start with that series prefix. This is the safest way to remove a series; avoid editing the config file directly.
|
|
60
|
+
|
|
61
|
+
### Deleted session report
|
|
62
|
+
Every manual cleanup command (local and `:all`) finishes by presenting what was removed. Sessions are sorted by project name — derived from the deepest folder segment of each session's working directory — then by modified time inside each project, and rendered as a grouped listing:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Removed 3 session(s):
|
|
66
|
+
project-a
|
|
67
|
+
Refactor Auth--Create JWT Token
|
|
68
|
+
project-b
|
|
69
|
+
Fix Memory Leak--Patch Heap Snapshot
|
|
70
|
+
UI Migration--Move Button Component
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Features
|
|
74
|
+
|
|
75
|
+
#### Startup lifecycle coordination
|
|
76
|
+
The extension listens to PI session startup and reload events to restore persisted session-series data before the rest of the session flow continues. That lets PI reopen the correct session name and custom entry even after a new process starts.
|
|
77
|
+
|
|
78
|
+
#### Persistent session-series state
|
|
79
|
+
When a series session is created, the extension writes a small temp file in the OS temp directory. On the next session start, it consumes that file, applies the stored session name and entry, and then removes the temp file so the state only applies once.
|
|
80
|
+
|
|
81
|
+
#### Configured cleanup rules
|
|
82
|
+
Settings are persisted through [@juanibiapina/pi-extension-settings](https://www.npmjs.com/package/@juanibiapina/pi-extension-settings). The `Session Deletion Day Limit` setting controls the automatic inactivity cleanup threshold and can be changed from PI with the `/extension-settings` command (default: 3 days). The series/title structure per working directory is remembered in the same store under the `pi-session-manager` extension name.
|
|
83
|
+
|
|
84
|
+
Treat these stored values as internal state. Do not edit them manually unless you are debugging the package itself. If you need to remove a series, use `session-manager:series delete` instead of changing the stored settings.
|
|
85
|
+
|
|
86
|
+
The package is designed to work with local session files only, so it should never be treated as a remote or shared-session cleanup tool.
|
|
87
|
+
|
|
88
|
+
### Developer notes
|
|
89
|
+
|
|
90
|
+
- Package metadata lives in `package.json` and identifies this as a PI extension package.
|
|
91
|
+
- The implementation is in `extensions/index.ts`.
|
|
92
|
+
- Tests live alongside the extension in `extensions/index.test.ts`.
|
|
93
|
+
- `scripts/create-extension.ts` is a small helper for scaffolding a new extension file under `extensions/`.
|
|
94
|
+
|
|
95
|
+
### Assets in this repository
|
|
96
|
+
|
|
97
|
+
- `extensions/` — extension implementation and tests
|
|
98
|
+
- `scripts/` — helper script for creating new extension files
|
|
99
|
+
- No `prompts/`, `skills/`, or `themes/` directories are present in this package
|
package/extensions/index.test.ts
CHANGED
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
handleSessionCleanOlderThan,
|
|
12
12
|
handleSessionDeleteLast,
|
|
13
13
|
handleSessionSeries,
|
|
14
|
+
formatDeletedSessionsListing,
|
|
15
|
+
getSessionProjectName,
|
|
16
|
+
sortSessionsByProjectName,
|
|
17
|
+
presentDeletedSessions,
|
|
14
18
|
getSessionEntryWithSeries,
|
|
15
19
|
getSessionSeriesDataTempPath,
|
|
16
20
|
persistSessionSeriesData,
|
|
@@ -226,6 +230,131 @@ class SessionManagerConfiguratorMock implements $SessionManagerConfigurator {
|
|
|
226
230
|
}
|
|
227
231
|
}
|
|
228
232
|
|
|
233
|
+
describe("deleted session reporting", () => {
|
|
234
|
+
type SessionOverrides = {
|
|
235
|
+
[K in keyof SessionInfo]?: SessionInfo[K] | undefined;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const buildSession = (overrides: SessionOverrides = {}): SessionInfo =>
|
|
239
|
+
({
|
|
240
|
+
path: "/path/to/session",
|
|
241
|
+
id: "session-id",
|
|
242
|
+
cwd: "/user/work/project-a",
|
|
243
|
+
name: "Session A",
|
|
244
|
+
parentSessionPath: "/path/to/parent",
|
|
245
|
+
created: new Date(0),
|
|
246
|
+
modified: new Date(0),
|
|
247
|
+
messageCount: 1,
|
|
248
|
+
firstMessage: "Hello from session A",
|
|
249
|
+
allMessagesText: "Full history for session A",
|
|
250
|
+
...overrides,
|
|
251
|
+
}) as SessionInfo;
|
|
252
|
+
|
|
253
|
+
it("derives the project name from the deepest cwd segment", () => {
|
|
254
|
+
const posixSession = buildSession({ cwd: "/user/work/project-a" });
|
|
255
|
+
const windowsSession = buildSession({
|
|
256
|
+
cwd: "C:\\Users\\bvlou\\projects\\project-b",
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
expect(getSessionProjectName(posixSession)).toBe("project-a");
|
|
260
|
+
expect(getSessionProjectName(windowsSession)).toBe("project-b");
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
it("sorts sessions by project name before modified time", () => {
|
|
264
|
+
const projectBSession = buildSession({
|
|
265
|
+
id: "project-b-session",
|
|
266
|
+
name: "Project B Session",
|
|
267
|
+
cwd: "/user/work/project-b",
|
|
268
|
+
modified: new Date(1000),
|
|
269
|
+
});
|
|
270
|
+
const projectAOldestSession = buildSession({
|
|
271
|
+
id: "project-a-oldest",
|
|
272
|
+
name: "Project A Oldest",
|
|
273
|
+
cwd: "/user/work/project-a",
|
|
274
|
+
modified: new Date(1000),
|
|
275
|
+
});
|
|
276
|
+
const projectARecentSession = buildSession({
|
|
277
|
+
id: "project-a-recent",
|
|
278
|
+
name: "Project A Recent",
|
|
279
|
+
cwd: "/user/work/project-a",
|
|
280
|
+
modified: new Date(5000),
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
expect(
|
|
284
|
+
sortSessionsByProjectName([
|
|
285
|
+
projectBSession,
|
|
286
|
+
projectARecentSession,
|
|
287
|
+
projectAOldestSession,
|
|
288
|
+
]),
|
|
289
|
+
).toEqual([projectAOldestSession, projectARecentSession, projectBSession]);
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
it("formats deleted sessions grouped under sorted project names", () => {
|
|
293
|
+
const projectBSession = buildSession({
|
|
294
|
+
name: "Project B Session",
|
|
295
|
+
cwd: "/user/work/project-b",
|
|
296
|
+
});
|
|
297
|
+
const projectASession = buildSession({
|
|
298
|
+
name: "Project A Session",
|
|
299
|
+
cwd: "/user/work/project-a",
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
expect(
|
|
303
|
+
formatDeletedSessionsListing([projectBSession, projectASession]),
|
|
304
|
+
).toBe(
|
|
305
|
+
[
|
|
306
|
+
"Removed 2 session(s):",
|
|
307
|
+
"project-a",
|
|
308
|
+
" Project A Session",
|
|
309
|
+
"project-b",
|
|
310
|
+
" Project B Session",
|
|
311
|
+
].join("\n"),
|
|
312
|
+
);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
it("falls back to first message then id when a session has no name", () => {
|
|
316
|
+
const unnamedSession = buildSession({ name: undefined });
|
|
317
|
+
|
|
318
|
+
expect(formatDeletedSessionsListing([unnamedSession])).toBe(
|
|
319
|
+
["Removed 1 session(s):", "project-a", " Hello from session A"].join(
|
|
320
|
+
"\n",
|
|
321
|
+
),
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
it("notifies nothing was deleted when the deletion list is empty", () => {
|
|
326
|
+
const context = {
|
|
327
|
+
ui: {
|
|
328
|
+
notify: vi.fn<ExtensionUIContext["notify"]>(),
|
|
329
|
+
},
|
|
330
|
+
} satisfies MockExtenstionCommandContext;
|
|
331
|
+
|
|
332
|
+
presentDeletedSessions([], castToExtensionContext(context));
|
|
333
|
+
|
|
334
|
+
expect(context.ui.notify).toHaveBeenCalledWith(
|
|
335
|
+
"No sessions matched, so nothing was deleted.",
|
|
336
|
+
"info",
|
|
337
|
+
);
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
it("presents the formatted listing when sessions were deleted", () => {
|
|
341
|
+
const context = {
|
|
342
|
+
ui: {
|
|
343
|
+
notify: vi.fn<ExtensionUIContext["notify"]>(),
|
|
344
|
+
},
|
|
345
|
+
} satisfies MockExtenstionCommandContext;
|
|
346
|
+
|
|
347
|
+
const deletedSession = buildSession();
|
|
348
|
+
|
|
349
|
+
presentDeletedSessions([deletedSession], castToExtensionContext(context));
|
|
350
|
+
|
|
351
|
+
expect(context.ui.notify).toHaveBeenCalledWith(
|
|
352
|
+
formatDeletedSessionsListing([deletedSession]),
|
|
353
|
+
"info",
|
|
354
|
+
);
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
229
358
|
// THis is written like this so that I can use the outline to find tests
|
|
230
359
|
const test = it
|
|
231
360
|
.extend("sessions", () => {
|
|
@@ -449,7 +578,7 @@ describe("handleSessionCleanOlderThan", () => {
|
|
|
449
578
|
);
|
|
450
579
|
|
|
451
580
|
expect(context.ui.notify).toHaveBeenCalledWith(
|
|
452
|
-
`
|
|
581
|
+
`Deleting sessions that are from ${durationRecord.integer} ${durationRecord.unit} ago`,
|
|
453
582
|
);
|
|
454
583
|
|
|
455
584
|
expect(
|
|
@@ -551,8 +680,8 @@ describe("handleSessionSeries", () => {
|
|
|
551
680
|
getSessionEntryWithSeries() {
|
|
552
681
|
return undefined;
|
|
553
682
|
},
|
|
554
|
-
removeSessionFiles() {
|
|
555
|
-
return;
|
|
683
|
+
removeSessionFiles(sessions) {
|
|
684
|
+
return sessions;
|
|
556
685
|
},
|
|
557
686
|
},
|
|
558
687
|
castToExtensionContext(context),
|
|
@@ -609,8 +738,43 @@ describe("handleSessionSeries", () => {
|
|
|
609
738
|
getSessionEntryWithSeries() {
|
|
610
739
|
return undefined;
|
|
611
740
|
},
|
|
612
|
-
removeSessionFiles() {
|
|
613
|
-
return;
|
|
741
|
+
removeSessionFiles(sessions) {
|
|
742
|
+
return sessions;
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
castToExtensionContext(context),
|
|
746
|
+
);
|
|
747
|
+
|
|
748
|
+
expect(context.ui.input).toHaveBeenCalledTimes(1);
|
|
749
|
+
expect(context.newSession).not.toHaveBeenCalled();
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
it("stops creating a session series when the series input is empty", async () => {
|
|
753
|
+
const context = {
|
|
754
|
+
cwd: "/pi-packages",
|
|
755
|
+
newSession: vi.fn<ExtensionCommandContext["newSession"]>(),
|
|
756
|
+
ui: {
|
|
757
|
+
notify: vi.fn<ExtensionUIContext["notify"]>(),
|
|
758
|
+
input: vi
|
|
759
|
+
.fn<ExtensionUIContext["input"]>()
|
|
760
|
+
.mockResolvedValueOnce("")
|
|
761
|
+
.mockResolvedValueOnce("Should not be prompted"),
|
|
762
|
+
},
|
|
763
|
+
} satisfies MockExtenstionCommandContext;
|
|
764
|
+
|
|
765
|
+
await handleSessionSeries(
|
|
766
|
+
"create",
|
|
767
|
+
{
|
|
768
|
+
sessionManagerConfigurator: new SessionManagerConfiguratorMock(),
|
|
769
|
+
sessionFilter: new MockSessionFilter(
|
|
770
|
+
[],
|
|
771
|
+
new MockPastTimestampCalculator(),
|
|
772
|
+
),
|
|
773
|
+
getSessionEntryWithSeries() {
|
|
774
|
+
return undefined;
|
|
775
|
+
},
|
|
776
|
+
removeSessionFiles(sessions) {
|
|
777
|
+
return sessions;
|
|
614
778
|
},
|
|
615
779
|
},
|
|
616
780
|
castToExtensionContext(context),
|
|
@@ -641,6 +805,7 @@ describe("handleSessionSeries", () => {
|
|
|
641
805
|
notify: vi.fn<ExtensionUIContext["notify"]>(),
|
|
642
806
|
input: vi
|
|
643
807
|
.fn<ExtensionUIContext["input"]>()
|
|
808
|
+
.mockResolvedValueOnce(" ")
|
|
644
809
|
.mockResolvedValueOnce(" Implement Auth ")
|
|
645
810
|
.mockResolvedValueOnce(" Implement Billing ")
|
|
646
811
|
.mockResolvedValueOnce(" Create JWT Token "),
|
|
@@ -675,8 +840,8 @@ describe("handleSessionSeries", () => {
|
|
|
675
840
|
getSessionEntryWithSeries() {
|
|
676
841
|
return undefined;
|
|
677
842
|
},
|
|
678
|
-
removeSessionFiles() {
|
|
679
|
-
return;
|
|
843
|
+
removeSessionFiles(sessions) {
|
|
844
|
+
return sessions;
|
|
680
845
|
},
|
|
681
846
|
},
|
|
682
847
|
castToExtensionContext(context),
|
|
@@ -694,7 +859,7 @@ describe("handleSessionSeries", () => {
|
|
|
694
859
|
"warning",
|
|
695
860
|
);
|
|
696
861
|
|
|
697
|
-
expect(context.ui.input).toHaveBeenCalledTimes(
|
|
862
|
+
expect(context.ui.input).toHaveBeenCalledTimes(4);
|
|
698
863
|
|
|
699
864
|
expect(appendSessionSeriesBasedOnCwdSpy).toHaveBeenCalledWith(
|
|
700
865
|
sessionCtx.cwd,
|
|
@@ -900,8 +1065,8 @@ describe("handleSessionSeries", () => {
|
|
|
900
1065
|
getSessionEntryWithSeries() {
|
|
901
1066
|
return undefined;
|
|
902
1067
|
},
|
|
903
|
-
removeSessionFiles() {
|
|
904
|
-
return;
|
|
1068
|
+
removeSessionFiles(sessions) {
|
|
1069
|
+
return sessions;
|
|
905
1070
|
},
|
|
906
1071
|
},
|
|
907
1072
|
castToExtensionContext(context),
|
|
@@ -980,8 +1145,8 @@ describe("handleSessionSeries", () => {
|
|
|
980
1145
|
getSessionEntryWithSeries() {
|
|
981
1146
|
return undefined;
|
|
982
1147
|
},
|
|
983
|
-
removeSessionFiles() {
|
|
984
|
-
return;
|
|
1148
|
+
removeSessionFiles(sessions) {
|
|
1149
|
+
return sessions;
|
|
985
1150
|
},
|
|
986
1151
|
},
|
|
987
1152
|
castToExtensionContext(context),
|
|
@@ -1050,8 +1215,8 @@ describe("handleSessionSeries", () => {
|
|
|
1050
1215
|
getSessionEntryWithSeries() {
|
|
1051
1216
|
return undefined;
|
|
1052
1217
|
},
|
|
1053
|
-
removeSessionFiles() {
|
|
1054
|
-
return;
|
|
1218
|
+
removeSessionFiles(sessions) {
|
|
1219
|
+
return sessions;
|
|
1055
1220
|
},
|
|
1056
1221
|
},
|
|
1057
1222
|
castToExtensionContext(context),
|
|
@@ -1117,8 +1282,8 @@ describe("handleSessionSeries", () => {
|
|
|
1117
1282
|
} as SessionSeriesEntry;
|
|
1118
1283
|
},
|
|
1119
1284
|
sessionManagerConfigurator: new SessionManagerConfiguratorMock(),
|
|
1120
|
-
removeSessionFiles() {
|
|
1121
|
-
return;
|
|
1285
|
+
removeSessionFiles(sessions) {
|
|
1286
|
+
return sessions;
|
|
1122
1287
|
},
|
|
1123
1288
|
},
|
|
1124
1289
|
castToExtensionContext(context),
|
|
@@ -1209,8 +1374,8 @@ describe("handleSessionSeries", () => {
|
|
|
1209
1374
|
getSessionEntryWithSeries,
|
|
1210
1375
|
sessionManagerConfigurator,
|
|
1211
1376
|
|
|
1212
|
-
removeSessionFiles() {
|
|
1213
|
-
return;
|
|
1377
|
+
removeSessionFiles(sessions) {
|
|
1378
|
+
return sessions;
|
|
1214
1379
|
},
|
|
1215
1380
|
},
|
|
1216
1381
|
castToExtensionContext(context),
|