codemini-cli 0.5.2 → 0.5.3
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/deployment.md +5 -5
- package/package.json +1 -1
- package/src/core/fff-adapter.js +1 -1
- package/src/core/session-store.js +18 -0
package/deployment.md
CHANGED
|
@@ -13,13 +13,13 @@ npm pack
|
|
|
13
13
|
Expected output:
|
|
14
14
|
|
|
15
15
|
```text
|
|
16
|
-
codemini-cli-0.5.
|
|
16
|
+
codemini-cli-0.5.3.tgz
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
If you want to verify the package contents:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
tar -tf codemini-cli-0.5.
|
|
22
|
+
tar -tf codemini-cli-0.5.3.tgz
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## 2. Copy To The Target Machine
|
|
@@ -34,7 +34,7 @@ Copy the generated `.tgz` file to the Win10 machine by one of these methods:
|
|
|
34
34
|
Recommended target path:
|
|
35
35
|
|
|
36
36
|
```powershell
|
|
37
|
-
C:\temp\codemini-cli-0.5.
|
|
37
|
+
C:\temp\codemini-cli-0.5.3.tgz
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## 3. Environment Requirements
|
|
@@ -58,7 +58,7 @@ npm -v
|
|
|
58
58
|
Global install:
|
|
59
59
|
|
|
60
60
|
```powershell
|
|
61
|
-
npm install -g C:\temp\codemini-cli-0.5.
|
|
61
|
+
npm install -g C:\temp\codemini-cli-0.5.3.tgz
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
If global install is blocked by company policy, install in a working directory instead:
|
|
@@ -66,7 +66,7 @@ If global install is blocked by company policy, install in a working directory i
|
|
|
66
66
|
```powershell
|
|
67
67
|
mkdir C:\temp\coder-test
|
|
68
68
|
cd C:\temp\coder-test
|
|
69
|
-
npm install C:\temp\codemini-cli-0.5.
|
|
69
|
+
npm install C:\temp\codemini-cli-0.5.3.tgz
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## 5. Confirm Installation
|
package/package.json
CHANGED
package/src/core/fff-adapter.js
CHANGED
|
@@ -108,6 +108,9 @@ function sanitizeSession(session, fallbackId = '') {
|
|
|
108
108
|
const createdAt = String(session?.createdAt || now);
|
|
109
109
|
const updatedAt = String(session?.updatedAt || now);
|
|
110
110
|
const messages = Array.isArray(session?.messages) ? session.messages.map(sanitizeMessage).filter(Boolean) : [];
|
|
111
|
+
const compactView = Array.isArray(session?.compact?.view)
|
|
112
|
+
? session.compact.view.map(sanitizeMessage).filter(Boolean)
|
|
113
|
+
: [];
|
|
111
114
|
|
|
112
115
|
const out = {
|
|
113
116
|
id,
|
|
@@ -128,6 +131,21 @@ function sanitizeSession(session, fallbackId = '') {
|
|
|
128
131
|
const todos = normalizeTodos(session?.todos);
|
|
129
132
|
if (todos.length > 0) out.todos = todos;
|
|
130
133
|
|
|
134
|
+
if (compactView.length > 0) {
|
|
135
|
+
out.compact = {
|
|
136
|
+
view: compactView,
|
|
137
|
+
timestamp: typeof session?.compact?.timestamp === 'string' && session.compact.timestamp.trim()
|
|
138
|
+
? session.compact.timestamp
|
|
139
|
+
: now
|
|
140
|
+
};
|
|
141
|
+
if (Number.isFinite(Number(session?.compact?.boundaryIndex))) {
|
|
142
|
+
out.compact.boundaryIndex = Number(session.compact.boundaryIndex);
|
|
143
|
+
}
|
|
144
|
+
if (typeof session?.compact?.mode === 'string' && session.compact.mode.trim()) {
|
|
145
|
+
out.compact.mode = session.compact.mode.trim();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
131
149
|
return out;
|
|
132
150
|
}
|
|
133
151
|
|