sessiongraph-app-darwin-arm64 1.0.21 → 1.0.22
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/package.json +2 -2
- package/payload/SessionGraph.app/Contents/Info.plist +2 -2
- package/payload/SessionGraph.app/Contents/MacOS/sessiongraph +0 -0
- package/payload/SessionGraph.app/Contents/Resources/resources/cli-launcher.mjs +2 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/cli-package.json +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/cli.mjs +31 -11
- package/payload/SessionGraph.app/Contents/Resources/resources/server.mjs +19 -9
- package/payload/SessionGraph.app/Contents/_CodeSignature/CodeResources +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sessiongraph-app-darwin-arm64",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "Explore & visualize all your LLM sessions — darwin/arm64",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"access": "public",
|
|
11
11
|
"registry": "https://registry.npmjs.org/"
|
|
12
12
|
},
|
|
13
|
-
"sessionGraphCommit": "
|
|
13
|
+
"sessionGraphCommit": "a9f37de30760da2bd866565fe68a1c0037f3cf0c",
|
|
14
14
|
"os": [
|
|
15
15
|
"darwin"
|
|
16
16
|
],
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<key>CFBundlePackageType</key>
|
|
18
18
|
<string>APPL</string>
|
|
19
19
|
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string>1.0.
|
|
20
|
+
<string>1.0.22</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>1.0.
|
|
22
|
+
<string>1.0.22</string>
|
|
23
23
|
<key>CSResourcesFileMapped</key>
|
|
24
24
|
<true/>
|
|
25
25
|
<key>LSApplicationCategoryType</key>
|
|
Binary file
|
|
@@ -11,7 +11,8 @@ const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
|
11
11
|
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
12
12
|
const argv = process.argv.slice(2);
|
|
13
13
|
if (argv.length === 1 && ['--version', '-v'].includes(argv[0])) { console.log(`SessionGraph ${pkg.version}`); process.exit(0); }
|
|
14
|
-
|
|
14
|
+
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(Number);
|
|
15
|
+
if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 15)) { console.error('SessionGraph requires Node.js 22.15.0 or later for its launcher (built-in SQLite and Zstandard support).'); process.exit(1); }
|
|
15
16
|
process.stdout.on('error', error => { if (error.code === 'EPIPE') process.exit(0); else throw error; });
|
|
16
17
|
if (argv.length && !(argv.length === 1 && argv[0] === '--browser')) {
|
|
17
18
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.22","buildID":"51e0db7240240e9d7d2879fbf1a61d3f7690817a104cef17abcc4a8f06d299d4"}
|
|
@@ -679,6 +679,17 @@ var init_library_query = __esm({
|
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
|
|
682
|
+
// server/sqlite.ts
|
|
683
|
+
function iterate(db2, sql, ...values) {
|
|
684
|
+
const statement = db2.prepare(sql);
|
|
685
|
+
return Object.assign(statement.iterate(...values), { retainedStatement: statement });
|
|
686
|
+
}
|
|
687
|
+
var init_sqlite = __esm({
|
|
688
|
+
"server/sqlite.ts"() {
|
|
689
|
+
"use strict";
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
|
|
682
693
|
// server/commit-store.ts
|
|
683
694
|
function writeCommits(db2, session) {
|
|
684
695
|
db2.prepare("DELETE FROM session_commits WHERE session_id=?").run(session.id);
|
|
@@ -686,7 +697,7 @@ function writeCommits(db2, session) {
|
|
|
686
697
|
if (!supported.has(session.source || "")) return { ...base, state: "unavailable", count: null, note: "Commit history unavailable for this source." };
|
|
687
698
|
const calls = /* @__PURE__ */ new Map();
|
|
688
699
|
const results = /* @__PURE__ */ new Map();
|
|
689
|
-
const rows2 = () => db2
|
|
700
|
+
const rows2 = () => iterate(db2, "SELECT data FROM timeline_items WHERE session_id=? AND kind IN ('tool_call','tool_result') ORDER BY ordinal", session.id);
|
|
690
701
|
let tools = 0, partial2 = session.coverage?.history !== "complete" || Boolean(db2.prepare("SELECT partial FROM timeline_coverage WHERE session_id=?").get(session.id)?.partial);
|
|
691
702
|
for (const row of rows2()) {
|
|
692
703
|
const item = JSON.parse(String(row.data));
|
|
@@ -767,6 +778,7 @@ var init_commit_store = __esm({
|
|
|
767
778
|
init_commits();
|
|
768
779
|
init_commit_extraction();
|
|
769
780
|
init_library_query();
|
|
781
|
+
init_sqlite();
|
|
770
782
|
COMMIT_SCHEMA = `CREATE TABLE IF NOT EXISTS session_commits (
|
|
771
783
|
session_id TEXT NOT NULL REFERENCES sessions(id) ON DELETE CASCADE,
|
|
772
784
|
sha TEXT NOT NULL, repository_path TEXT NOT NULL, operation TEXT NOT NULL,
|
|
@@ -24704,14 +24716,18 @@ function rows(db2, table2, fields3, filter, order, limit = 5e4) {
|
|
|
24704
24716
|
for (const name of [...fields3, ...filter ? [filter[0]] : [], ...order ? [order] : []]) if (!/^[a-zA-Z_][\w]*$/.test(name)) throw new Error("Invalid history column.");
|
|
24705
24717
|
if (filter && !available.has(filter[0])) throw new Error("Unsupported history relation.");
|
|
24706
24718
|
const size = (f) => `length(CAST("${f}" AS BLOB))`;
|
|
24707
|
-
const select = fields3.map((f) => available.has(f) ? `CASE WHEN ${size(f)}<=32000000 THEN "${f}" END AS "${f}"` : `NULL AS "${f}"`).join(",");
|
|
24719
|
+
const select = fields3.map((f) => available.has(f) ? `CASE WHEN ${size(f)}<=32000000 THEN CASE WHEN typeof("${f}")='text' THEN CAST("${f}" AS BLOB) ELSE "${f}" END END AS "${f}", typeof("${f}")='text' AS "__sessiongraph_text_${f}"` : `NULL AS "${f}"`).join(",");
|
|
24708
24720
|
const oversized = fields3.filter((f) => available.has(f)).map((f) => `COALESCE(${size(f)},0)>32000000`).join(" OR ") || "0";
|
|
24709
24721
|
const query2 = `SELECT ${select}, (${oversized}) AS __sessiongraph_oversized FROM "${table2}"${filter ? ` WHERE "${filter[0]}"=?` : ""}${order && available.has(order) ? ` ORDER BY "${order}"` : ""} LIMIT ${limit + 1}`;
|
|
24710
24722
|
const result = [];
|
|
24711
24723
|
let bytes2 = 0;
|
|
24712
|
-
for (const row of db2
|
|
24724
|
+
for (const row of iterate(db2, query2, ...filter ? [filter[1]] : [])) {
|
|
24713
24725
|
if (row.__sessiongraph_oversized) throw new Error("History field exceeds the 32 MB snapshot limit.");
|
|
24714
24726
|
delete row.__sessiongraph_oversized;
|
|
24727
|
+
for (const field of fields3) {
|
|
24728
|
+
if (row[`__sessiongraph_text_${field}`] && row[field] instanceof Uint8Array) row[field] = Buffer.from(row[field]).toString("utf8");
|
|
24729
|
+
delete row[`__sessiongraph_text_${field}`];
|
|
24730
|
+
}
|
|
24715
24731
|
const size2 = rowBytes(row);
|
|
24716
24732
|
bytes2 += size2;
|
|
24717
24733
|
consume(size2, 1);
|
|
@@ -24876,6 +24892,7 @@ var init_sqlite_histories = __esm({
|
|
|
24876
24892
|
init_local_files();
|
|
24877
24893
|
init_sqlite_snapshot();
|
|
24878
24894
|
init_compressed();
|
|
24895
|
+
init_sqlite();
|
|
24879
24896
|
rowBytes = (row) => Object.values(row).reduce((n, v3) => n + (typeof v3 === "string" ? Buffer.byteLength(v3) : v3 instanceof Uint8Array ? v3.byteLength : 8), 0);
|
|
24880
24897
|
}
|
|
24881
24898
|
});
|
|
@@ -24995,7 +25012,7 @@ function historyRevisions(db2, schema) {
|
|
|
24995
25012
|
const names = columns(db2, table2);
|
|
24996
25013
|
if (!names.has("session_id")) continue;
|
|
24997
25014
|
const updated = names.has("time_updated") ? "MAX(time_updated)" : "NULL";
|
|
24998
|
-
for (const row of db2
|
|
25015
|
+
for (const row of iterate(db2, `SELECT session_id, COUNT(*) AS count, ${updated} AS updated FROM "${table2}" GROUP BY session_id`)) {
|
|
24999
25016
|
const id3 = text3(row.session_id);
|
|
25000
25017
|
result.set(id3, [...result.get(id3) || [], row.count, row.updated]);
|
|
25001
25018
|
}
|
|
@@ -25084,7 +25101,7 @@ function discoverDatabase(db2, path, snapshot2) {
|
|
|
25084
25101
|
}
|
|
25085
25102
|
function payloadRows(db2, query2, values, budget2) {
|
|
25086
25103
|
const result = [];
|
|
25087
|
-
for (const row of db2
|
|
25104
|
+
for (const row of iterate(db2, query2, ...values)) {
|
|
25088
25105
|
if (typeof row.data !== "string") throw new Error("OpenCode history contains a missing or oversized JSON field (4 MB limit).");
|
|
25089
25106
|
budget2.bytes += Buffer.byteLength(row.data);
|
|
25090
25107
|
budget2.records++;
|
|
@@ -25108,6 +25125,7 @@ var init_opencode2 = __esm({
|
|
|
25108
25125
|
init_sqlite_snapshot();
|
|
25109
25126
|
init_local_files();
|
|
25110
25127
|
init_opencode_v1();
|
|
25128
|
+
init_sqlite();
|
|
25111
25129
|
PAGE = 60;
|
|
25112
25130
|
MAX_JSON = 4e6;
|
|
25113
25131
|
sessionFields = [
|
|
@@ -25133,7 +25151,7 @@ var init_opencode2 = __esm({
|
|
|
25133
25151
|
opencodeAdapter = {
|
|
25134
25152
|
id: "opencode",
|
|
25135
25153
|
name: "OpenCode",
|
|
25136
|
-
description: "Local SQLite history \xB7 V1 and V2
|
|
25154
|
+
description: "Local SQLite history \xB7 V1 and V2",
|
|
25137
25155
|
capabilities: { history: true, forks: true, children: true, files: true },
|
|
25138
25156
|
async detect() {
|
|
25139
25157
|
return (await openCodeDatabases()).length > 0;
|
|
@@ -53550,7 +53568,7 @@ function discoverComposers(path, workspace = "") {
|
|
|
53550
53568
|
for (const table2 of ["cursorDiskKV", "ItemTable"]) {
|
|
53551
53569
|
if (!hasTable(db2, table2)) continue;
|
|
53552
53570
|
let failed = 0, count = 0;
|
|
53553
|
-
const rows2 = db2
|
|
53571
|
+
const rows2 = iterate(db2, `SELECT key, CASE WHEN length(value)<=? THEN value END AS value FROM ${table2} WHERE key LIKE 'composerData:%' AND value IS NOT NULL ORDER BY key LIMIT 20001`, MAX_VALUE2);
|
|
53554
53572
|
for (const row of rows2) {
|
|
53555
53573
|
if (++count > 2e4) {
|
|
53556
53574
|
warnings.push("Cursor Composer listing reached its 20,000-session limit.");
|
|
@@ -53645,6 +53663,7 @@ var init_cursor_composer = __esm({
|
|
|
53645
53663
|
init_cursor_message();
|
|
53646
53664
|
init_local_files();
|
|
53647
53665
|
init_sqlite_snapshot();
|
|
53666
|
+
init_sqlite();
|
|
53648
53667
|
MAX_VALUE2 = 32e6;
|
|
53649
53668
|
MAX_BUBBLE = 8e6;
|
|
53650
53669
|
MAX_MESSAGES = 5e4;
|
|
@@ -66520,6 +66539,7 @@ function storageFailure(error62, opening = false) {
|
|
|
66520
66539
|
init_commit_store();
|
|
66521
66540
|
init_commit_extraction();
|
|
66522
66541
|
init_usage();
|
|
66542
|
+
init_sqlite();
|
|
66523
66543
|
var SessionGraphStore = class {
|
|
66524
66544
|
constructor(path = databasePath()) {
|
|
66525
66545
|
this.path = path;
|
|
@@ -66584,7 +66604,7 @@ var SessionGraphStore = class {
|
|
|
66584
66604
|
try {
|
|
66585
66605
|
this.db.exec(EVENT_SCHEMA);
|
|
66586
66606
|
for (const { id: id3 } of this.db.prepare("SELECT id FROM sessions").all()) {
|
|
66587
|
-
writeEvents(this.db, String(id3), this.db
|
|
66607
|
+
writeEvents(this.db, String(id3), iterate(this.db, "SELECT data FROM messages WHERE session_id=? ORDER BY ordinal", id3));
|
|
66588
66608
|
}
|
|
66589
66609
|
this.db.exec("PRAGMA user_version=4; COMMIT;");
|
|
66590
66610
|
} catch (error62) {
|
|
@@ -66736,7 +66756,7 @@ var SessionGraphStore = class {
|
|
|
66736
66756
|
this.db.prepare("DELETE FROM messages WHERE session_id=?").run(s.id);
|
|
66737
66757
|
const insert = this.db.prepare("INSERT INTO messages (session_id,id,ordinal,data,time,is_user) VALUES (?,?,?,?,?,?) ON CONFLICT(session_id,id) DO UPDATE SET ordinal=excluded.ordinal,data=excluded.data,time=excluded.time,is_user=excluded.is_user");
|
|
66738
66758
|
messages.forEach((message2, i) => insert.run(s.id, message2.id, i, JSON.stringify(message2), message2.eventOnly ? null : messageTime(message2.time), Number(isUserMessage(message2))));
|
|
66739
|
-
writeEvents(this.db, s.id, this.db
|
|
66759
|
+
writeEvents(this.db, s.id, iterate(this.db, "SELECT data FROM messages WHERE session_id=? ORDER BY ordinal", s.id));
|
|
66740
66760
|
const commits = writeCommits(this.db, s);
|
|
66741
66761
|
if (candidate.pullRequests !== void 0) {
|
|
66742
66762
|
this.db.prepare("DELETE FROM session_pull_requests WHERE session_id=?").run(s.id);
|
|
@@ -69572,7 +69592,7 @@ function manifest(command) {
|
|
|
69572
69592
|
schemaVersion: 1,
|
|
69573
69593
|
executable: "sessiongraph",
|
|
69574
69594
|
executableAliases: ["ssg"],
|
|
69575
|
-
node: ">=
|
|
69595
|
+
node: ">=22.15.0",
|
|
69576
69596
|
globalOptions,
|
|
69577
69597
|
commands: command ? [command] : commands2,
|
|
69578
69598
|
launch: { desktop: "sessiongraph", browser: "sessiongraph --browser" },
|
|
@@ -69619,7 +69639,7 @@ ${command.examples.map((e10) => ` sessiongraph ${e10}`).join("\n")}
|
|
|
69619
69639
|
}
|
|
69620
69640
|
var markdownDocs = (command) => `# SessionGraph CLI${command ? `: ${command.name}` : ""}
|
|
69621
69641
|
|
|
69622
|
-
Use \`sessiongraph\` or \`ssg\`. npm installs require Node.js
|
|
69642
|
+
Use \`sessiongraph\` or \`ssg\`. npm installs require Node.js 22.15.0+; desktop installs bundle it. Use \`--json\` for structured output and \`commands --json\` for command and result schemas.
|
|
69623
69643
|
|
|
69624
69644
|
${manifest().rules.map((rule) => `- ${rule}`).join("\n")}
|
|
69625
69645
|
|
|
@@ -3781,6 +3781,12 @@ function hasTable(db2, name) {
|
|
|
3781
3781
|
return typeof row?.sql === "string" && !/CREATE\s+VIRTUAL/i.test(row.sql);
|
|
3782
3782
|
}
|
|
3783
3783
|
|
|
3784
|
+
// server/sqlite.ts
|
|
3785
|
+
function iterate(db2, sql, ...values) {
|
|
3786
|
+
const statement = db2.prepare(sql);
|
|
3787
|
+
return Object.assign(statement.iterate(...values), { retainedStatement: statement });
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3784
3790
|
// server/adapters/sqlite-histories.ts
|
|
3785
3791
|
var budget;
|
|
3786
3792
|
var rowBytes = (row) => Object.values(row).reduce((n, v3) => n + (typeof v3 === "string" ? Buffer.byteLength(v3) : v3 instanceof Uint8Array ? v3.byteLength : 8), 0);
|
|
@@ -3811,14 +3817,18 @@ function rows(db2, table, fields3, filter, order, limit = 5e4) {
|
|
|
3811
3817
|
for (const name of [...fields3, ...filter ? [filter[0]] : [], ...order ? [order] : []]) if (!/^[a-zA-Z_][\w]*$/.test(name)) throw new Error("Invalid history column.");
|
|
3812
3818
|
if (filter && !available.has(filter[0])) throw new Error("Unsupported history relation.");
|
|
3813
3819
|
const size = (f) => `length(CAST("${f}" AS BLOB))`;
|
|
3814
|
-
const select = fields3.map((f) => available.has(f) ? `CASE WHEN ${size(f)}<=32000000 THEN "${f}" END AS "${f}"` : `NULL AS "${f}"`).join(",");
|
|
3820
|
+
const select = fields3.map((f) => available.has(f) ? `CASE WHEN ${size(f)}<=32000000 THEN CASE WHEN typeof("${f}")='text' THEN CAST("${f}" AS BLOB) ELSE "${f}" END END AS "${f}", typeof("${f}")='text' AS "__sessiongraph_text_${f}"` : `NULL AS "${f}"`).join(",");
|
|
3815
3821
|
const oversized = fields3.filter((f) => available.has(f)).map((f) => `COALESCE(${size(f)},0)>32000000`).join(" OR ") || "0";
|
|
3816
3822
|
const query = `SELECT ${select}, (${oversized}) AS __sessiongraph_oversized FROM "${table}"${filter ? ` WHERE "${filter[0]}"=?` : ""}${order && available.has(order) ? ` ORDER BY "${order}"` : ""} LIMIT ${limit + 1}`;
|
|
3817
3823
|
const result = [];
|
|
3818
3824
|
let bytes2 = 0;
|
|
3819
|
-
for (const row of db2
|
|
3825
|
+
for (const row of iterate(db2, query, ...filter ? [filter[1]] : [])) {
|
|
3820
3826
|
if (row.__sessiongraph_oversized) throw new Error("History field exceeds the 32 MB snapshot limit.");
|
|
3821
3827
|
delete row.__sessiongraph_oversized;
|
|
3828
|
+
for (const field of fields3) {
|
|
3829
|
+
if (row[`__sessiongraph_text_${field}`] && row[field] instanceof Uint8Array) row[field] = Buffer.from(row[field]).toString("utf8");
|
|
3830
|
+
delete row[`__sessiongraph_text_${field}`];
|
|
3831
|
+
}
|
|
3822
3832
|
const size2 = rowBytes(row);
|
|
3823
3833
|
bytes2 += size2;
|
|
3824
3834
|
consume(size2, 1);
|
|
@@ -4105,7 +4115,7 @@ function historyRevisions(db2, schema) {
|
|
|
4105
4115
|
const names = columns(db2, table);
|
|
4106
4116
|
if (!names.has("session_id")) continue;
|
|
4107
4117
|
const updated = names.has("time_updated") ? "MAX(time_updated)" : "NULL";
|
|
4108
|
-
for (const row of db2
|
|
4118
|
+
for (const row of iterate(db2, `SELECT session_id, COUNT(*) AS count, ${updated} AS updated FROM "${table}" GROUP BY session_id`)) {
|
|
4109
4119
|
const id2 = text(row.session_id);
|
|
4110
4120
|
result.set(id2, [...result.get(id2) || [], row.count, row.updated]);
|
|
4111
4121
|
}
|
|
@@ -4194,7 +4204,7 @@ function discoverDatabase(db2, path, snapshot2) {
|
|
|
4194
4204
|
}
|
|
4195
4205
|
function payloadRows(db2, query, values, budget2) {
|
|
4196
4206
|
const result = [];
|
|
4197
|
-
for (const row of db2
|
|
4207
|
+
for (const row of iterate(db2, query, ...values)) {
|
|
4198
4208
|
if (typeof row.data !== "string") throw new Error("OpenCode history contains a missing or oversized JSON field (4 MB limit).");
|
|
4199
4209
|
budget2.bytes += Buffer.byteLength(row.data);
|
|
4200
4210
|
budget2.records++;
|
|
@@ -4206,7 +4216,7 @@ function payloadRows(db2, query, values, budget2) {
|
|
|
4206
4216
|
var opencodeAdapter = {
|
|
4207
4217
|
id: "opencode",
|
|
4208
4218
|
name: "OpenCode",
|
|
4209
|
-
description: "Local SQLite history \xB7 V1 and V2
|
|
4219
|
+
description: "Local SQLite history \xB7 V1 and V2",
|
|
4210
4220
|
capabilities: { history: true, forks: true, children: true, files: true },
|
|
4211
4221
|
async detect() {
|
|
4212
4222
|
return (await openCodeDatabases()).length > 0;
|
|
@@ -32549,7 +32559,7 @@ function discoverComposers(path, workspace = "") {
|
|
|
32549
32559
|
for (const table of ["cursorDiskKV", "ItemTable"]) {
|
|
32550
32560
|
if (!hasTable(db2, table)) continue;
|
|
32551
32561
|
let failed = 0, count = 0;
|
|
32552
|
-
const rows2 = db2
|
|
32562
|
+
const rows2 = iterate(db2, `SELECT key, CASE WHEN length(value)<=? THEN value END AS value FROM ${table} WHERE key LIKE 'composerData:%' AND value IS NOT NULL ORDER BY key LIMIT 20001`, MAX_VALUE2);
|
|
32553
32563
|
for (const row of rows2) {
|
|
32554
32564
|
if (++count > 2e4) {
|
|
32555
32565
|
warnings.push("Cursor Composer listing reached its 20,000-session limit.");
|
|
@@ -34345,7 +34355,7 @@ function writeCommits(db2, session) {
|
|
|
34345
34355
|
if (!supported.has(session.source || "")) return { ...base, state: "unavailable", count: null, note: "Commit history unavailable for this source." };
|
|
34346
34356
|
const calls = /* @__PURE__ */ new Map();
|
|
34347
34357
|
const results = /* @__PURE__ */ new Map();
|
|
34348
|
-
const rows2 = () => db2
|
|
34358
|
+
const rows2 = () => iterate(db2, "SELECT data FROM timeline_items WHERE session_id=? AND kind IN ('tool_call','tool_result') ORDER BY ordinal", session.id);
|
|
34349
34359
|
let tools = 0, partial = session.coverage?.history !== "complete" || Boolean(db2.prepare("SELECT partial FROM timeline_coverage WHERE session_id=?").get(session.id)?.partial);
|
|
34350
34360
|
for (const row of rows2()) {
|
|
34351
34361
|
const item = JSON.parse(String(row.data));
|
|
@@ -34700,7 +34710,7 @@ var SessionGraphStore = class {
|
|
|
34700
34710
|
try {
|
|
34701
34711
|
this.db.exec(EVENT_SCHEMA);
|
|
34702
34712
|
for (const { id: id2 } of this.db.prepare("SELECT id FROM sessions").all()) {
|
|
34703
|
-
writeEvents(this.db, String(id2), this.db
|
|
34713
|
+
writeEvents(this.db, String(id2), iterate(this.db, "SELECT data FROM messages WHERE session_id=? ORDER BY ordinal", id2));
|
|
34704
34714
|
}
|
|
34705
34715
|
this.db.exec("PRAGMA user_version=4; COMMIT;");
|
|
34706
34716
|
} catch (error) {
|
|
@@ -34852,7 +34862,7 @@ var SessionGraphStore = class {
|
|
|
34852
34862
|
this.db.prepare("DELETE FROM messages WHERE session_id=?").run(s.id);
|
|
34853
34863
|
const insert = this.db.prepare("INSERT INTO messages (session_id,id,ordinal,data,time,is_user) VALUES (?,?,?,?,?,?) ON CONFLICT(session_id,id) DO UPDATE SET ordinal=excluded.ordinal,data=excluded.data,time=excluded.time,is_user=excluded.is_user");
|
|
34854
34864
|
messages.forEach((message2, i) => insert.run(s.id, message2.id, i, JSON.stringify(message2), message2.eventOnly ? null : messageTime(message2.time), Number(isUserMessage(message2))));
|
|
34855
|
-
writeEvents(this.db, s.id, this.db
|
|
34865
|
+
writeEvents(this.db, s.id, iterate(this.db, "SELECT data FROM messages WHERE session_id=? ORDER BY ordinal", s.id));
|
|
34856
34866
|
const commits = writeCommits(this.db, s);
|
|
34857
34867
|
if (candidate.pullRequests !== void 0) {
|
|
34858
34868
|
this.db.prepare("DELETE FROM session_pull_requests WHERE session_id=?").run(s.id);
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Resources/resources/cli-launcher.mjs</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
+ZmgFt8JbdM/8Tb+MjaxZoDQFmQ=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Resources/resources/cli-package.json</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
6QsX4sO+QtUAvKQH1oAjWekbEMc=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Resources/resources/cli.mjs</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
CLCliQnTMw0lMRVimBXF09sy2XU=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Resources/resources/install-cli.mjs</key>
|
|
28
28
|
<data>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</data>
|
|
35
35
|
<key>Resources/resources/server.mjs</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
ATUKryrD1m4O0UvhqXdtyUiuOPY=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Resources/resources/web/apple-touch-icon.png</key>
|
|
40
40
|
<data>
|
|
@@ -409,21 +409,21 @@
|
|
|
409
409
|
<dict>
|
|
410
410
|
<key>hash2</key>
|
|
411
411
|
<data>
|
|
412
|
-
|
|
412
|
+
r7aI8PqhOMmqRapnBgPj6ZF/LWpSwxwZS/IiqhprfBg=
|
|
413
413
|
</data>
|
|
414
414
|
</dict>
|
|
415
415
|
<key>Resources/resources/cli-package.json</key>
|
|
416
416
|
<dict>
|
|
417
417
|
<key>hash2</key>
|
|
418
418
|
<data>
|
|
419
|
-
|
|
419
|
+
hgwDS16Mxv5pPzrRlA2wXQ3Kx7fh/+HijnYFEaNjFbk=
|
|
420
420
|
</data>
|
|
421
421
|
</dict>
|
|
422
422
|
<key>Resources/resources/cli.mjs</key>
|
|
423
423
|
<dict>
|
|
424
424
|
<key>hash2</key>
|
|
425
425
|
<data>
|
|
426
|
-
|
|
426
|
+
AL/InAASf65qMH6oW9Bini1TMZA47VmX5ktoYQ3v3Qg=
|
|
427
427
|
</data>
|
|
428
428
|
</dict>
|
|
429
429
|
<key>Resources/resources/install-cli.mjs</key>
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
<dict>
|
|
445
445
|
<key>hash2</key>
|
|
446
446
|
<data>
|
|
447
|
-
|
|
447
|
+
A1M+hZWqsgdHOvk720PlqWac5kX8c9MoY6TlSJC+5vo=
|
|
448
448
|
</data>
|
|
449
449
|
</dict>
|
|
450
450
|
<key>Resources/resources/web/apple-touch-icon.png</key>
|