conare 0.6.4 → 0.6.5
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/index.js +49 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -126,9 +126,13 @@ function parseTimestampMs(value) {
|
|
|
126
126
|
const parsed = Date.parse(trimmed);
|
|
127
127
|
return Number.isFinite(parsed) ? parsed : null;
|
|
128
128
|
}
|
|
129
|
+
function setSaveAmount(amount) {
|
|
130
|
+
if (amount)
|
|
131
|
+
minSubstantive = SAVE_AMOUNT_FLOOR[amount];
|
|
132
|
+
}
|
|
129
133
|
function isNarration(text) {
|
|
130
134
|
const stripped = text.trim();
|
|
131
|
-
if (stripped.length <
|
|
135
|
+
if (stripped.length < minSubstantive)
|
|
132
136
|
return true;
|
|
133
137
|
if (stripped.length <= 300 && NARRATION_RE.test(stripped))
|
|
134
138
|
return true;
|
|
@@ -242,8 +246,14 @@ function clearIngested(source) {
|
|
|
242
246
|
}
|
|
243
247
|
var activeScope = null, MAX_MEMORY_CONTENT = 200000, TRUNCATED_USER_MSG = 3000, TRUNCATED_MARKER = `
|
|
244
248
|
|
|
245
|
-
...[truncated to fit Conare upload limit]`,
|
|
249
|
+
...[truncated to fit Conare upload limit]`, SAVE_AMOUNT_FLOOR, minSubstantive, NARRATION_RE, remoteCache, CASE_INSENSITIVE_FS;
|
|
246
250
|
var init_shared = __esm(() => {
|
|
251
|
+
SAVE_AMOUNT_FLOOR = {
|
|
252
|
+
essentials: 500,
|
|
253
|
+
balanced: 200,
|
|
254
|
+
everything: 0
|
|
255
|
+
};
|
|
256
|
+
minSubstantive = SAVE_AMOUNT_FLOOR.balanced;
|
|
247
257
|
NARRATION_RE = /^[\s\n]*(Let me |Now let me |Now I['\u2019]|Now add |Now fix |Now replace |Now integrate |Now update |Now pass |Now clean |Now build|Update the |Builds clean|Deployed\.|Wait, I |Let['\u2019]s test |Good —|Great\.|Perfect\.|Alright|OK,? let me|I[''\u2019]ll |Starting |I need to |Need |I found |I read |I[''\u2019]ve (loaded|confirmed|verified)|Context loaded|Next (I[''\u2019]|step)|Deps confirm|Diff check|Still missing|I[''\u2019]ll (do|check|inspect|trace|run|grab|pull|read|verify))/;
|
|
248
258
|
remoteCache = new Map;
|
|
249
259
|
CASE_INSENSITIVE_FS = process.platform === "darwin" || process.platform === "win32";
|
|
@@ -1599,6 +1609,8 @@ __export(exports_interactive, {
|
|
|
1599
1609
|
showCountingToolDone: () => showCountingToolDone,
|
|
1600
1610
|
showCountingToolChats: () => showCountingToolChats,
|
|
1601
1611
|
showCountingLocalChats: () => showCountingLocalChats,
|
|
1612
|
+
selectSyncInterval: () => selectSyncInterval,
|
|
1613
|
+
selectSaveAmount: () => selectSaveAmount,
|
|
1602
1614
|
selectMcpTargets: () => selectMcpTargets,
|
|
1603
1615
|
selectChatSources: () => selectChatSources,
|
|
1604
1616
|
promptAuth: () => promptAuth,
|
|
@@ -1735,6 +1747,29 @@ async function confirmBackgroundSync() {
|
|
|
1735
1747
|
}));
|
|
1736
1748
|
return value === "yes";
|
|
1737
1749
|
}
|
|
1750
|
+
async function selectSaveAmount() {
|
|
1751
|
+
return ensureValue(await ve({
|
|
1752
|
+
message: "How much should Conare remember from each session?",
|
|
1753
|
+
initialValue: "balanced",
|
|
1754
|
+
options: [
|
|
1755
|
+
{ value: "essentials", label: "Essentials", hint: "only key decisions & bugs — leanest memory" },
|
|
1756
|
+
{ value: "balanced", label: "Balanced", hint: "recommended" },
|
|
1757
|
+
{ value: "everything", label: "Everything", hint: "full detail from every session" }
|
|
1758
|
+
]
|
|
1759
|
+
}));
|
|
1760
|
+
}
|
|
1761
|
+
async function selectSyncInterval() {
|
|
1762
|
+
const value = ensureValue(await ve({
|
|
1763
|
+
message: "How often should Conare index new chats?",
|
|
1764
|
+
initialValue: "10",
|
|
1765
|
+
options: [
|
|
1766
|
+
{ value: "5", label: "Every 5 minutes", hint: "freshest" },
|
|
1767
|
+
{ value: "10", label: "Every 10 minutes", hint: "recommended" },
|
|
1768
|
+
{ value: "30", label: "Every 30 minutes", hint: "lightest" }
|
|
1769
|
+
]
|
|
1770
|
+
}));
|
|
1771
|
+
return Number(value);
|
|
1772
|
+
}
|
|
1738
1773
|
var countingSpinner = null;
|
|
1739
1774
|
var init_interactive = __esm(() => {
|
|
1740
1775
|
init_dist2();
|
|
@@ -3901,6 +3936,14 @@ function clearSavedApiKey() {
|
|
|
3901
3936
|
}
|
|
3902
3937
|
return hadApiKey;
|
|
3903
3938
|
}
|
|
3939
|
+
function saveSaveAmount(amount) {
|
|
3940
|
+
const config = readConfig();
|
|
3941
|
+
config.saveAmount = amount;
|
|
3942
|
+
writeConfig(config);
|
|
3943
|
+
}
|
|
3944
|
+
function getSaveAmount() {
|
|
3945
|
+
return readConfig().saveAmount;
|
|
3946
|
+
}
|
|
3904
3947
|
function hasLegacyTeamConfig() {
|
|
3905
3948
|
const c = readConfig();
|
|
3906
3949
|
return !!(c.teamMode || c.orgId || (c.teamRemotePatterns?.length ?? 0) > 0);
|
|
@@ -4973,7 +5016,11 @@ async function main() {
|
|
|
4973
5016
|
const ingestibleTargets = interactiveTargets.filter((t) => INGESTIBLE_SOURCES.has(t.id));
|
|
4974
5017
|
showDetectedApps(ingestibleTargets);
|
|
4975
5018
|
selectedSources = await selectChatSources(ingestibleTargets);
|
|
5019
|
+
const saveAmount = await selectSaveAmount();
|
|
5020
|
+
saveSaveAmount(saveAmount);
|
|
5021
|
+
opts.syncInterval = await selectSyncInterval();
|
|
4976
5022
|
}
|
|
5023
|
+
setSaveAmount(getSaveAmount());
|
|
4977
5024
|
if (opts.uninstallSync) {
|
|
4978
5025
|
const messages = uninstallSync();
|
|
4979
5026
|
for (const msg of messages)
|