@narumitw/pi-sync 0.49.10 → 0.49.11
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/README.md +10 -1
- package/dist/chunks/chunk-3GRWMWUZ.ts +213 -0
- package/dist/chunks/chunk-3GRWMWUZ.ts.map +7 -0
- package/dist/chunks/chunk-3NDD5QPM.ts +203 -0
- package/dist/chunks/chunk-3NDD5QPM.ts.map +7 -0
- package/dist/chunks/chunk-4F3W4CSC.ts +195 -0
- package/dist/chunks/chunk-4F3W4CSC.ts.map +7 -0
- package/dist/chunks/chunk-4U6AFLJB.ts +221 -0
- package/dist/chunks/chunk-4U6AFLJB.ts.map +7 -0
- package/dist/chunks/chunk-5MQ76BK5.ts +34 -0
- package/dist/chunks/chunk-5MQ76BK5.ts.map +7 -0
- package/dist/chunks/chunk-APZVBSM6.ts +1238 -0
- package/dist/chunks/chunk-APZVBSM6.ts.map +7 -0
- package/dist/chunks/chunk-BHJUISB4.ts +134 -0
- package/dist/chunks/chunk-BHJUISB4.ts.map +7 -0
- package/dist/chunks/chunk-D3S54OXI.ts +653 -0
- package/dist/chunks/chunk-D3S54OXI.ts.map +7 -0
- package/dist/chunks/chunk-EWX3TPLQ.ts +356 -0
- package/dist/chunks/chunk-EWX3TPLQ.ts.map +7 -0
- package/dist/chunks/chunk-F5QL2GPY.ts +341 -0
- package/dist/chunks/chunk-F5QL2GPY.ts.map +7 -0
- package/dist/chunks/chunk-FR6CVXAL.ts +81 -0
- package/dist/chunks/chunk-FR6CVXAL.ts.map +7 -0
- package/dist/chunks/chunk-HGV24P4T.ts +53 -0
- package/dist/chunks/chunk-HGV24P4T.ts.map +7 -0
- package/dist/chunks/chunk-JNOOSPEW.ts +82 -0
- package/dist/chunks/chunk-JNOOSPEW.ts.map +7 -0
- package/dist/chunks/chunk-LJDSHNS3.ts +259 -0
- package/dist/chunks/chunk-LJDSHNS3.ts.map +7 -0
- package/dist/chunks/chunk-RGJ6SOYR.ts +128 -0
- package/dist/chunks/chunk-RGJ6SOYR.ts.map +7 -0
- package/dist/chunks/chunk-W64NEHXT.ts +167 -0
- package/dist/chunks/chunk-W64NEHXT.ts.map +7 -0
- package/dist/chunks/chunk-YQ6UW7IF.ts +394 -0
- package/dist/chunks/chunk-YQ6UW7IF.ts.map +7 -0
- package/dist/chunks/file-selection-4UABOP44.ts +290 -0
- package/dist/chunks/file-selection-4UABOP44.ts.map +7 -0
- package/dist/chunks/git-backend-E3UOUUOM.ts +1104 -0
- package/dist/chunks/git-backend-E3UOUUOM.ts.map +7 -0
- package/dist/chunks/manager-result-dispatcher-YKBLZ7KL.ts +18 -0
- package/dist/chunks/manager-result-dispatcher-YKBLZ7KL.ts.map +7 -0
- package/dist/chunks/manager-ui-7E25VWUP.ts +2754 -0
- package/dist/chunks/manager-ui-7E25VWUP.ts.map +7 -0
- package/dist/chunks/remote-selection-ui-J6OW5DKZ.ts +17 -0
- package/dist/chunks/remote-selection-ui-J6OW5DKZ.ts.map +7 -0
- package/dist/chunks/s3-backend-3QZGO2EF.ts +680 -0
- package/dist/chunks/s3-backend-3QZGO2EF.ts.map +7 -0
- package/dist/chunks/setup-switch-X3W3FALZ.ts +27 -0
- package/dist/chunks/setup-switch-X3W3FALZ.ts.map +7 -0
- package/dist/chunks/snapshot-WBSV4MQG.ts +45 -0
- package/dist/chunks/snapshot-WBSV4MQG.ts.map +7 -0
- package/dist/chunks/sync-operations-MPAFVVHA.ts +1112 -0
- package/dist/chunks/sync-operations-MPAFVVHA.ts.map +7 -0
- package/dist/chunks/sync-state-36H7ULG2.ts +41 -0
- package/dist/chunks/sync-state-36H7ULG2.ts.map +7 -0
- package/dist/chunks/webdav-backend-ZD5RHRIU.ts +869 -0
- package/dist/chunks/webdav-backend-ZD5RHRIU.ts.map +7 -0
- package/dist/index.ts +668 -0
- package/dist/index.ts.map +7 -0
- package/package.json +10 -6
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
|
+
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
|
+
import {
|
|
4
|
+
updateSyncSetup
|
|
5
|
+
} from "./chunk-4F3W4CSC.js";
|
|
6
|
+
import {
|
|
7
|
+
agentDir,
|
|
8
|
+
loadConfig,
|
|
9
|
+
localConfigPath
|
|
10
|
+
} from "./chunk-APZVBSM6.js";
|
|
11
|
+
import "./chunk-F5QL2GPY.js";
|
|
12
|
+
import {
|
|
13
|
+
BUILT_IN_SYNC_ROOTS,
|
|
14
|
+
isSafeCustomIncludePath,
|
|
15
|
+
normalizeSyncInclude,
|
|
16
|
+
syncIncludeSelection
|
|
17
|
+
} from "./chunk-YQ6UW7IF.js";
|
|
18
|
+
|
|
19
|
+
// src/file-selection.ts
|
|
20
|
+
import fs from "node:fs/promises";
|
|
21
|
+
import { defineMenu, runMenu } from "@narumitw/pi-tui-kit";
|
|
22
|
+
var BUILT_IN_PREFIX = "builtin:";
|
|
23
|
+
var CUSTOM_PREFIX = "custom:";
|
|
24
|
+
var SESSIONS_ID = "sessions";
|
|
25
|
+
var ADD_CUSTOM_ID = "add-custom";
|
|
26
|
+
async function showFileSelection(ctx, setupName, signal) {
|
|
27
|
+
const config = await loadConfig(setupName);
|
|
28
|
+
if (signal?.aborted) return;
|
|
29
|
+
const selection = syncIncludeSelection(config.include);
|
|
30
|
+
const original = {
|
|
31
|
+
builtIns: new Set(selection.builtIns),
|
|
32
|
+
custom: new Set(selection.custom),
|
|
33
|
+
sessions: selection.sessions
|
|
34
|
+
};
|
|
35
|
+
const draft = cloneDraft(original);
|
|
36
|
+
const customCandidates = await listCustomCandidates(draft.custom);
|
|
37
|
+
if (ctx.mode !== "tui") {
|
|
38
|
+
ctx.ui.notify(
|
|
39
|
+
[
|
|
40
|
+
`pi-sync included content for sync setup ${safeTerminalText(config.setupName)}:`,
|
|
41
|
+
`include: ${config.include.map(safeTerminalText).join(", ") || "none"}`,
|
|
42
|
+
`Edit sync.include in ${safeTerminalText(localConfigPath())}.`
|
|
43
|
+
].join("\n"),
|
|
44
|
+
"info"
|
|
45
|
+
);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
while (!signal?.aborted) {
|
|
49
|
+
await showDraftEditor(ctx, config.setupName, draft, customCandidates, signal);
|
|
50
|
+
if (signal?.aborted || sameDraft(original, draft)) return;
|
|
51
|
+
const choice = await showDraftReview(ctx, original, draft, signal);
|
|
52
|
+
if (signal?.aborted) return;
|
|
53
|
+
if (choice === "Continue editing") continue;
|
|
54
|
+
if (choice !== "Save changes") {
|
|
55
|
+
ctx.ui.notify("Included-content changes discarded.", "info");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
if (!original.sessions && draft.sessions) {
|
|
60
|
+
const acknowledged = await ctx.ui.confirm(
|
|
61
|
+
"Include session conversations?",
|
|
62
|
+
"Session JSONL may contain prompts, tool output, file paths, images, and secrets. Continue only with storage you trust.",
|
|
63
|
+
{ signal }
|
|
64
|
+
);
|
|
65
|
+
if (signal?.aborted) return;
|
|
66
|
+
if (!acknowledged) {
|
|
67
|
+
ctx.ui.notify("Session inclusion was not saved.", "info");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const include = [
|
|
72
|
+
...BUILT_IN_SYNC_ROOTS.filter((candidate) => draft.builtIns.has(candidate)),
|
|
73
|
+
...draft.custom,
|
|
74
|
+
...draft.sessions ? ["sessions"] : []
|
|
75
|
+
];
|
|
76
|
+
if (signal?.aborted) return;
|
|
77
|
+
await updateSyncSetup(
|
|
78
|
+
config.setupName,
|
|
79
|
+
(setup) => ({
|
|
80
|
+
...setup,
|
|
81
|
+
sync: { ...setup.sync, include }
|
|
82
|
+
}),
|
|
83
|
+
{ expectedInclude: config.include, signal }
|
|
84
|
+
);
|
|
85
|
+
if (signal?.aborted) return;
|
|
86
|
+
ctx.ui.notify(
|
|
87
|
+
`Saved included content for sync setup \u201C${safeTerminalText(config.setupName)}\u201D. It applies to the next manual or automatic sync.`,
|
|
88
|
+
"info"
|
|
89
|
+
);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
if (signal?.aborted) return;
|
|
92
|
+
ctx.ui.notify(
|
|
93
|
+
`Could not save pi-sync file selection: ${safeTerminalText(error instanceof Error ? error.message : String(error))}`,
|
|
94
|
+
"error"
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async function showDraftEditor(ctx, setupName, draft, customCandidates, signal) {
|
|
101
|
+
const menu = defineMenu({
|
|
102
|
+
start: "editor",
|
|
103
|
+
screens: {
|
|
104
|
+
editor: () => ({
|
|
105
|
+
kind: "multiSelect",
|
|
106
|
+
title: `Included Content \xB7 ${safeTerminalText(setupName)}`,
|
|
107
|
+
lines: ["Draft only \xB7 leaving this screen opens Save, Discard, or Continue editing."],
|
|
108
|
+
viewportSize: 12,
|
|
109
|
+
items: [
|
|
110
|
+
...BUILT_IN_SYNC_ROOTS.map((relativePath) => ({
|
|
111
|
+
id: `${BUILT_IN_PREFIX}${relativePath}`,
|
|
112
|
+
label: relativePath,
|
|
113
|
+
description: relativePath.includes(".") ? `Sync the top-level ${relativePath} file when present.` : `Recursively sync every safe file under ${relativePath}/.`,
|
|
114
|
+
selected: draft.builtIns.has(relativePath)
|
|
115
|
+
})),
|
|
116
|
+
...customCandidates.map((relativePath) => ({
|
|
117
|
+
id: `${CUSTOM_PREFIX}${relativePath}`,
|
|
118
|
+
label: safeTerminalText(relativePath),
|
|
119
|
+
description: "Additional safe agent-relative file or directory.",
|
|
120
|
+
selected: draft.custom.has(relativePath)
|
|
121
|
+
})),
|
|
122
|
+
{
|
|
123
|
+
id: SESSIONS_ID,
|
|
124
|
+
label: "sessions",
|
|
125
|
+
description: "Session JSONL may contain prompts, tool output, paths, images, and secrets. Sync only to storage you trust.",
|
|
126
|
+
selected: draft.sessions
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
action: "toggle",
|
|
130
|
+
actions: [
|
|
131
|
+
{
|
|
132
|
+
id: ADD_CUSTOM_ID,
|
|
133
|
+
label: "Add custom path\u2026",
|
|
134
|
+
description: "Include an agent-relative file or directory even when it exists only remotely.",
|
|
135
|
+
action: "addCustom"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
hint: "close",
|
|
139
|
+
doneLabel: "Review changes"
|
|
140
|
+
})
|
|
141
|
+
},
|
|
142
|
+
actions: {
|
|
143
|
+
toggle: async ({ itemId, selected }) => {
|
|
144
|
+
updateDraft(draft, itemId, selected === true);
|
|
145
|
+
return { kind: "stay" };
|
|
146
|
+
},
|
|
147
|
+
addCustom: async ({ ctx: actionCtx, signal: actionSignal }) => {
|
|
148
|
+
const entered = await actionCtx.ui.input(
|
|
149
|
+
"Add included content",
|
|
150
|
+
"Agent-relative path, for example custom.toml or snippets",
|
|
151
|
+
{ signal: actionSignal }
|
|
152
|
+
);
|
|
153
|
+
if (actionSignal.aborted) return { kind: "stay" };
|
|
154
|
+
const requested = entered?.trim();
|
|
155
|
+
if (!requested) return { kind: "stay" };
|
|
156
|
+
const existing = customCandidates.find(
|
|
157
|
+
(candidate) => candidate.toLowerCase() === requested.toLowerCase()
|
|
158
|
+
);
|
|
159
|
+
const relativePath = existing ?? requested;
|
|
160
|
+
if (draft.custom.has(relativePath)) return { kind: "stay" };
|
|
161
|
+
try {
|
|
162
|
+
if (!isSafeCustomIncludePath(relativePath)) {
|
|
163
|
+
throw new Error("Enter a safe agent-relative file or directory path.");
|
|
164
|
+
}
|
|
165
|
+
normalizeSyncInclude([
|
|
166
|
+
...draft.builtIns,
|
|
167
|
+
...draft.custom,
|
|
168
|
+
...draft.sessions ? ["sessions"] : [],
|
|
169
|
+
relativePath
|
|
170
|
+
]);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (actionSignal.aborted) return { kind: "stay" };
|
|
173
|
+
actionCtx.ui.notify(
|
|
174
|
+
`Could not add included content: ${safeTerminalText(error instanceof Error ? error.message : String(error))}`,
|
|
175
|
+
"error"
|
|
176
|
+
);
|
|
177
|
+
return { kind: "stay" };
|
|
178
|
+
}
|
|
179
|
+
if (!existing) {
|
|
180
|
+
customCandidates.push(relativePath);
|
|
181
|
+
customCandidates.sort((left, right) => left.localeCompare(right));
|
|
182
|
+
}
|
|
183
|
+
draft.custom.add(relativePath);
|
|
184
|
+
return { kind: "stay" };
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
await runMenu(ctx, menu, {
|
|
189
|
+
getState: () => void 0,
|
|
190
|
+
signal,
|
|
191
|
+
isCurrent: () => !signal?.aborted
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
async function showDraftReview(ctx, original, draft, signal) {
|
|
195
|
+
let choice;
|
|
196
|
+
const menu = defineMenu({
|
|
197
|
+
start: "review",
|
|
198
|
+
screens: {
|
|
199
|
+
review: () => ({
|
|
200
|
+
kind: "actions",
|
|
201
|
+
title: "Review included-content changes",
|
|
202
|
+
lines: formatDraftPreview(original, draft).split("\n").slice(2),
|
|
203
|
+
items: [
|
|
204
|
+
{ id: "save", label: "Save changes", action: "choose" },
|
|
205
|
+
{ id: "discard", label: "Discard changes", action: "choose" },
|
|
206
|
+
{ id: "continue", label: "Continue editing", action: "choose" }
|
|
207
|
+
],
|
|
208
|
+
hint: "close"
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
actions: {
|
|
212
|
+
choose: async ({ itemId }) => {
|
|
213
|
+
choice = itemId === "save" ? "Save changes" : itemId === "continue" ? "Continue editing" : "Discard changes";
|
|
214
|
+
return { kind: "close" };
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
await runMenu(ctx, menu, {
|
|
219
|
+
getState: () => void 0,
|
|
220
|
+
signal,
|
|
221
|
+
isCurrent: () => !signal?.aborted
|
|
222
|
+
});
|
|
223
|
+
return choice;
|
|
224
|
+
}
|
|
225
|
+
function updateDraft(draft, id, included) {
|
|
226
|
+
if (id.startsWith(BUILT_IN_PREFIX))
|
|
227
|
+
return updateSet(draft.builtIns, id.slice(BUILT_IN_PREFIX.length), included);
|
|
228
|
+
if (id.startsWith(CUSTOM_PREFIX))
|
|
229
|
+
return updateSet(draft.custom, id.slice(CUSTOM_PREFIX.length), included);
|
|
230
|
+
if (id === SESSIONS_ID) {
|
|
231
|
+
draft.sessions = included;
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
throw new Error(`Unknown file selection: ${id}`);
|
|
235
|
+
}
|
|
236
|
+
function updateSet(set, value, included) {
|
|
237
|
+
if (included) set.add(value);
|
|
238
|
+
else set.delete(value);
|
|
239
|
+
}
|
|
240
|
+
function formatDraftPreview(original, draft) {
|
|
241
|
+
const lines = ["Review included-content changes", ""];
|
|
242
|
+
for (const item of /* @__PURE__ */ new Set([
|
|
243
|
+
...original.builtIns,
|
|
244
|
+
...draft.builtIns,
|
|
245
|
+
...original.custom,
|
|
246
|
+
...draft.custom
|
|
247
|
+
])) {
|
|
248
|
+
const before = original.builtIns.has(item) || original.custom.has(item);
|
|
249
|
+
const after = draft.builtIns.has(item) || draft.custom.has(item);
|
|
250
|
+
if (before !== after) lines.push(`${after ? "Include" : "Exclude"}: ${safeTerminalText(item)}`);
|
|
251
|
+
}
|
|
252
|
+
if (original.sessions !== draft.sessions)
|
|
253
|
+
lines.push(`${draft.sessions ? "Include" : "Exclude"}: sessions`);
|
|
254
|
+
lines.push("", "Saving does not start a network sync.");
|
|
255
|
+
return lines.join("\n");
|
|
256
|
+
}
|
|
257
|
+
async function listCustomCandidates(configured) {
|
|
258
|
+
const candidates = new Map([...configured].map((item) => [item.toLowerCase(), item]));
|
|
259
|
+
try {
|
|
260
|
+
for (const entry of await fs.readdir(agentDir(), { withFileTypes: true })) {
|
|
261
|
+
if (!entry.isFile() && !entry.isDirectory() || !isSafeCustomIncludePath(entry.name))
|
|
262
|
+
continue;
|
|
263
|
+
if (!candidates.has(entry.name.toLowerCase()))
|
|
264
|
+
candidates.set(entry.name.toLowerCase(), entry.name);
|
|
265
|
+
}
|
|
266
|
+
} catch (error) {
|
|
267
|
+
if (error.code !== "ENOENT") throw error;
|
|
268
|
+
}
|
|
269
|
+
return [...candidates.values()].sort((left, right) => left.localeCompare(right));
|
|
270
|
+
}
|
|
271
|
+
function cloneDraft(value) {
|
|
272
|
+
return {
|
|
273
|
+
builtIns: new Set(value.builtIns),
|
|
274
|
+
custom: new Set(value.custom),
|
|
275
|
+
sessions: value.sessions
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function sameDraft(left, right) {
|
|
279
|
+
return left.sessions === right.sessions && sameSet(left.builtIns, right.builtIns) && sameSet(left.custom, right.custom);
|
|
280
|
+
}
|
|
281
|
+
function sameSet(left, right) {
|
|
282
|
+
return left.size === right.size && [...left].every((item) => right.has(item));
|
|
283
|
+
}
|
|
284
|
+
function safeTerminalText(value) {
|
|
285
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/gu, "?");
|
|
286
|
+
}
|
|
287
|
+
export {
|
|
288
|
+
showFileSelection
|
|
289
|
+
};
|
|
290
|
+
//# sourceMappingURL=file-selection-4UABOP44.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/file-selection.ts"],
|
|
4
|
+
"sourcesContent": ["import fs from \"node:fs/promises\";\nimport type { ExtensionCommandContext } from \"@earendil-works/pi-coding-agent\";\nimport { defineMenu, runMenu } from \"@narumitw/pi-tui-kit\";\nimport { agentDir, loadConfig, localConfigPath } from \"./config.js\";\nimport { updateSyncSetup } from \"./settings-management.js\";\nimport {\n\tBUILT_IN_SYNC_ROOTS,\n\tisSafeCustomIncludePath,\n\tnormalizeSyncInclude,\n\tsyncIncludeSelection,\n} from \"./sync-policy.js\";\n\nconst BUILT_IN_PREFIX = \"builtin:\";\nconst CUSTOM_PREFIX = \"custom:\";\nconst SESSIONS_ID = \"sessions\";\nconst ADD_CUSTOM_ID = \"add-custom\";\n\ninterface SelectionDraft {\n\tbuiltIns: Set<string>;\n\tcustom: Set<string>;\n\tsessions: boolean;\n}\n\nexport async function showFileSelection(\n\tctx: ExtensionCommandContext,\n\tsetupName?: string,\n\tsignal?: AbortSignal,\n) {\n\tconst config = await loadConfig(setupName);\n\tif (signal?.aborted) return;\n\tconst selection = syncIncludeSelection(config.include);\n\tconst original: SelectionDraft = {\n\t\tbuiltIns: new Set(selection.builtIns),\n\t\tcustom: new Set(selection.custom),\n\t\tsessions: selection.sessions,\n\t};\n\tconst draft = cloneDraft(original);\n\tconst customCandidates = await listCustomCandidates(draft.custom);\n\n\tif (ctx.mode !== \"tui\") {\n\t\tctx.ui.notify(\n\t\t\t[\n\t\t\t\t`pi-sync included content for sync setup ${safeTerminalText(config.setupName)}:`,\n\t\t\t\t`include: ${config.include.map(safeTerminalText).join(\", \") || \"none\"}`,\n\t\t\t\t`Edit sync.include in ${safeTerminalText(localConfigPath())}.`,\n\t\t\t].join(\"\\n\"),\n\t\t\t\"info\",\n\t\t);\n\t\treturn;\n\t}\n\n\twhile (!signal?.aborted) {\n\t\tawait showDraftEditor(ctx, config.setupName, draft, customCandidates, signal);\n\t\tif (signal?.aborted || sameDraft(original, draft)) return;\n\t\tconst choice = await showDraftReview(ctx, original, draft, signal);\n\t\tif (signal?.aborted) return;\n\t\tif (choice === \"Continue editing\") continue;\n\t\tif (choice !== \"Save changes\") {\n\t\t\tctx.ui.notify(\"Included-content changes discarded.\", \"info\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (!original.sessions && draft.sessions) {\n\t\t\t\tconst acknowledged = await ctx.ui.confirm(\n\t\t\t\t\t\"Include session conversations?\",\n\t\t\t\t\t\"Session JSONL may contain prompts, tool output, file paths, images, and secrets. Continue only with storage you trust.\",\n\t\t\t\t\t{ signal },\n\t\t\t\t);\n\t\t\t\tif (signal?.aborted) return;\n\t\t\t\tif (!acknowledged) {\n\t\t\t\t\tctx.ui.notify(\"Session inclusion was not saved.\", \"info\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst include = [\n\t\t\t\t...BUILT_IN_SYNC_ROOTS.filter((candidate) => draft.builtIns.has(candidate)),\n\t\t\t\t...draft.custom,\n\t\t\t\t...(draft.sessions ? [\"sessions\"] : []),\n\t\t\t];\n\t\t\tif (signal?.aborted) return;\n\t\t\tawait updateSyncSetup(\n\t\t\t\tconfig.setupName,\n\t\t\t\t(setup) => ({\n\t\t\t\t\t...setup,\n\t\t\t\t\tsync: { ...setup.sync, include },\n\t\t\t\t}),\n\t\t\t\t{ expectedInclude: config.include, signal },\n\t\t\t);\n\t\t\tif (signal?.aborted) return;\n\t\t\tctx.ui.notify(\n\t\t\t\t`Saved included content for sync setup \u201C${safeTerminalText(config.setupName)}\u201D. It applies to the next manual or automatic sync.`,\n\t\t\t\t\"info\",\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tif (signal?.aborted) return;\n\t\t\tctx.ui.notify(\n\t\t\t\t`Could not save pi-sync file selection: ${safeTerminalText(error instanceof Error ? error.message : String(error))}`,\n\t\t\t\t\"error\",\n\t\t\t);\n\t\t}\n\t\treturn;\n\t}\n}\n\nasync function showDraftEditor(\n\tctx: ExtensionCommandContext,\n\tsetupName: string,\n\tdraft: SelectionDraft,\n\tcustomCandidates: string[],\n\tsignal?: AbortSignal,\n) {\n\tconst menu = defineMenu<undefined, \"editor\", \"toggle\" | \"addCustom\", ExtensionCommandContext>({\n\t\tstart: \"editor\",\n\t\tscreens: {\n\t\t\teditor: () => ({\n\t\t\t\tkind: \"multiSelect\",\n\t\t\t\ttitle: `Included Content \u00B7 ${safeTerminalText(setupName)}`,\n\t\t\t\tlines: [\"Draft only \u00B7 leaving this screen opens Save, Discard, or Continue editing.\"],\n\t\t\t\tviewportSize: 12,\n\t\t\t\titems: [\n\t\t\t\t\t...BUILT_IN_SYNC_ROOTS.map((relativePath) => ({\n\t\t\t\t\t\tid: `${BUILT_IN_PREFIX}${relativePath}`,\n\t\t\t\t\t\tlabel: relativePath,\n\t\t\t\t\t\tdescription: relativePath.includes(\".\")\n\t\t\t\t\t\t\t? `Sync the top-level ${relativePath} file when present.`\n\t\t\t\t\t\t\t: `Recursively sync every safe file under ${relativePath}/.`,\n\t\t\t\t\t\tselected: draft.builtIns.has(relativePath),\n\t\t\t\t\t})),\n\t\t\t\t\t...customCandidates.map((relativePath) => ({\n\t\t\t\t\t\tid: `${CUSTOM_PREFIX}${relativePath}`,\n\t\t\t\t\t\tlabel: safeTerminalText(relativePath),\n\t\t\t\t\t\tdescription: \"Additional safe agent-relative file or directory.\",\n\t\t\t\t\t\tselected: draft.custom.has(relativePath),\n\t\t\t\t\t})),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: SESSIONS_ID,\n\t\t\t\t\t\tlabel: \"sessions\",\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Session JSONL may contain prompts, tool output, paths, images, and secrets. Sync only to storage you trust.\",\n\t\t\t\t\t\tselected: draft.sessions,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\taction: \"toggle\",\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: ADD_CUSTOM_ID,\n\t\t\t\t\t\tlabel: \"Add custom path\u2026\",\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Include an agent-relative file or directory even when it exists only remotely.\",\n\t\t\t\t\t\taction: \"addCustom\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\thint: \"close\",\n\t\t\t\tdoneLabel: \"Review changes\",\n\t\t\t}),\n\t\t},\n\t\tactions: {\n\t\t\ttoggle: async ({ itemId, selected }) => {\n\t\t\t\tupdateDraft(draft, itemId, selected === true);\n\t\t\t\treturn { kind: \"stay\" };\n\t\t\t},\n\t\t\taddCustom: async ({ ctx: actionCtx, signal: actionSignal }) => {\n\t\t\t\tconst entered = await actionCtx.ui.input(\n\t\t\t\t\t\"Add included content\",\n\t\t\t\t\t\"Agent-relative path, for example custom.toml or snippets\",\n\t\t\t\t\t{ signal: actionSignal },\n\t\t\t\t);\n\t\t\t\tif (actionSignal.aborted) return { kind: \"stay\" };\n\t\t\t\tconst requested = entered?.trim();\n\t\t\t\tif (!requested) return { kind: \"stay\" };\n\t\t\t\tconst existing = customCandidates.find(\n\t\t\t\t\t(candidate) => candidate.toLowerCase() === requested.toLowerCase(),\n\t\t\t\t);\n\t\t\t\tconst relativePath = existing ?? requested;\n\t\t\t\tif (draft.custom.has(relativePath)) return { kind: \"stay\" };\n\t\t\t\ttry {\n\t\t\t\t\tif (!isSafeCustomIncludePath(relativePath)) {\n\t\t\t\t\t\tthrow new Error(\"Enter a safe agent-relative file or directory path.\");\n\t\t\t\t\t}\n\t\t\t\t\tnormalizeSyncInclude([\n\t\t\t\t\t\t...draft.builtIns,\n\t\t\t\t\t\t...draft.custom,\n\t\t\t\t\t\t...(draft.sessions ? [\"sessions\"] : []),\n\t\t\t\t\t\trelativePath,\n\t\t\t\t\t]);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (actionSignal.aborted) return { kind: \"stay\" };\n\t\t\t\t\tactionCtx.ui.notify(\n\t\t\t\t\t\t`Could not add included content: ${safeTerminalText(error instanceof Error ? error.message : String(error))}`,\n\t\t\t\t\t\t\"error\",\n\t\t\t\t\t);\n\t\t\t\t\treturn { kind: \"stay\" };\n\t\t\t\t}\n\t\t\t\tif (!existing) {\n\t\t\t\t\tcustomCandidates.push(relativePath);\n\t\t\t\t\tcustomCandidates.sort((left, right) => left.localeCompare(right));\n\t\t\t\t}\n\t\t\t\tdraft.custom.add(relativePath);\n\t\t\t\treturn { kind: \"stay\" };\n\t\t\t},\n\t\t},\n\t});\n\tawait runMenu(ctx, menu, {\n\t\tgetState: () => undefined,\n\t\tsignal,\n\t\tisCurrent: () => !signal?.aborted,\n\t});\n}\n\nasync function showDraftReview(\n\tctx: ExtensionCommandContext,\n\toriginal: SelectionDraft,\n\tdraft: SelectionDraft,\n\tsignal?: AbortSignal,\n) {\n\tlet choice: \"Save changes\" | \"Discard changes\" | \"Continue editing\" | undefined;\n\tconst menu = defineMenu<undefined, \"review\", \"choose\", ExtensionCommandContext>({\n\t\tstart: \"review\",\n\t\tscreens: {\n\t\t\treview: () => ({\n\t\t\t\tkind: \"actions\",\n\t\t\t\ttitle: \"Review included-content changes\",\n\t\t\t\tlines: formatDraftPreview(original, draft).split(\"\\n\").slice(2),\n\t\t\t\titems: [\n\t\t\t\t\t{ id: \"save\", label: \"Save changes\", action: \"choose\" },\n\t\t\t\t\t{ id: \"discard\", label: \"Discard changes\", action: \"choose\" },\n\t\t\t\t\t{ id: \"continue\", label: \"Continue editing\", action: \"choose\" },\n\t\t\t\t],\n\t\t\t\thint: \"close\",\n\t\t\t}),\n\t\t},\n\t\tactions: {\n\t\t\tchoose: async ({ itemId }) => {\n\t\t\t\tchoice =\n\t\t\t\t\titemId === \"save\"\n\t\t\t\t\t\t? \"Save changes\"\n\t\t\t\t\t\t: itemId === \"continue\"\n\t\t\t\t\t\t\t? \"Continue editing\"\n\t\t\t\t\t\t\t: \"Discard changes\";\n\t\t\t\treturn { kind: \"close\" };\n\t\t\t},\n\t\t},\n\t});\n\tawait runMenu(ctx, menu, {\n\t\tgetState: () => undefined,\n\t\tsignal,\n\t\tisCurrent: () => !signal?.aborted,\n\t});\n\treturn choice;\n}\n\nfunction updateDraft(draft: SelectionDraft, id: string, included: boolean) {\n\tif (id.startsWith(BUILT_IN_PREFIX))\n\t\treturn updateSet(draft.builtIns, id.slice(BUILT_IN_PREFIX.length), included);\n\tif (id.startsWith(CUSTOM_PREFIX))\n\t\treturn updateSet(draft.custom, id.slice(CUSTOM_PREFIX.length), included);\n\tif (id === SESSIONS_ID) {\n\t\tdraft.sessions = included;\n\t\treturn;\n\t}\n\tthrow new Error(`Unknown file selection: ${id}`);\n}\n\nfunction updateSet(set: Set<string>, value: string, included: boolean) {\n\tif (included) set.add(value);\n\telse set.delete(value);\n}\n\nfunction formatDraftPreview(original: SelectionDraft, draft: SelectionDraft) {\n\tconst lines = [\"Review included-content changes\", \"\"];\n\tfor (const item of new Set([\n\t\t...original.builtIns,\n\t\t...draft.builtIns,\n\t\t...original.custom,\n\t\t...draft.custom,\n\t])) {\n\t\tconst before = original.builtIns.has(item) || original.custom.has(item);\n\t\tconst after = draft.builtIns.has(item) || draft.custom.has(item);\n\t\tif (before !== after) lines.push(`${after ? \"Include\" : \"Exclude\"}: ${safeTerminalText(item)}`);\n\t}\n\tif (original.sessions !== draft.sessions)\n\t\tlines.push(`${draft.sessions ? \"Include\" : \"Exclude\"}: sessions`);\n\tlines.push(\"\", \"Saving does not start a network sync.\");\n\treturn lines.join(\"\\n\");\n}\n\nasync function listCustomCandidates(configured: Set<string>) {\n\tconst candidates = new Map([...configured].map((item) => [item.toLowerCase(), item]));\n\ttry {\n\t\tfor (const entry of await fs.readdir(agentDir(), { withFileTypes: true })) {\n\t\t\tif ((!entry.isFile() && !entry.isDirectory()) || !isSafeCustomIncludePath(entry.name))\n\t\t\t\tcontinue;\n\t\t\tif (!candidates.has(entry.name.toLowerCase()))\n\t\t\t\tcandidates.set(entry.name.toLowerCase(), entry.name);\n\t\t}\n\t} catch (error) {\n\t\tif ((error as NodeJS.ErrnoException).code !== \"ENOENT\") throw error;\n\t}\n\treturn [...candidates.values()].sort((left, right) => left.localeCompare(right));\n}\n\nfunction cloneDraft(value: SelectionDraft): SelectionDraft {\n\treturn {\n\t\tbuiltIns: new Set(value.builtIns),\n\t\tcustom: new Set(value.custom),\n\t\tsessions: value.sessions,\n\t};\n}\n\nfunction sameDraft(left: SelectionDraft, right: SelectionDraft) {\n\treturn (\n\t\tleft.sessions === right.sessions &&\n\t\tsameSet(left.builtIns, right.builtIns) &&\n\t\tsameSet(left.custom, right.custom)\n\t);\n}\n\nfunction sameSet(left: Set<string>, right: Set<string>) {\n\treturn left.size === right.size && [...left].every((item) => right.has(item));\n}\n\nfunction safeTerminalText(value: string) {\n\t// biome-ignore lint/suspicious/noControlCharactersInRegex: Escape untrusted terminal controls.\n\treturn value.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/gu, \"?\");\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AAEf,SAAS,YAAY,eAAe;AAUpC,IAAM,kBAAkB;AACxB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AAQtB,eAAsB,kBACrB,KACA,WACA,QACC;AACD,QAAM,SAAS,MAAM,WAAW,SAAS;AACzC,MAAI,QAAQ,QAAS;AACrB,QAAM,YAAY,qBAAqB,OAAO,OAAO;AACrD,QAAM,WAA2B;AAAA,IAChC,UAAU,IAAI,IAAI,UAAU,QAAQ;AAAA,IACpC,QAAQ,IAAI,IAAI,UAAU,MAAM;AAAA,IAChC,UAAU,UAAU;AAAA,EACrB;AACA,QAAM,QAAQ,WAAW,QAAQ;AACjC,QAAM,mBAAmB,MAAM,qBAAqB,MAAM,MAAM;AAEhE,MAAI,IAAI,SAAS,OAAO;AACvB,QAAI,GAAG;AAAA,MACN;AAAA,QACC,2CAA2C,iBAAiB,OAAO,SAAS,CAAC;AAAA,QAC7E,YAAY,OAAO,QAAQ,IAAI,gBAAgB,EAAE,KAAK,IAAI,KAAK,MAAM;AAAA,QACrE,wBAAwB,iBAAiB,gBAAgB,CAAC,CAAC;AAAA,MAC5D,EAAE,KAAK,IAAI;AAAA,MACX;AAAA,IACD;AACA;AAAA,EACD;AAEA,SAAO,CAAC,QAAQ,SAAS;AACxB,UAAM,gBAAgB,KAAK,OAAO,WAAW,OAAO,kBAAkB,MAAM;AAC5E,QAAI,QAAQ,WAAW,UAAU,UAAU,KAAK,EAAG;AACnD,UAAM,SAAS,MAAM,gBAAgB,KAAK,UAAU,OAAO,MAAM;AACjE,QAAI,QAAQ,QAAS;AACrB,QAAI,WAAW,mBAAoB;AACnC,QAAI,WAAW,gBAAgB;AAC9B,UAAI,GAAG,OAAO,uCA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