repoburg 1.3.308 → 1.3.309

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.
@@ -42374,10 +42374,13 @@ async function registerSessionRoutes(fastify) {
42374
42374
  if (!session) {
42375
42375
  return reply.code(404).send({ error: "Session not found" });
42376
42376
  }
42377
- const targetTurn = db2.prepare("SELECT created_at FROM turns WHERE id = ? AND session_id = ?").get(turn_id, id);
42377
+ const targetTurn = db2.prepare("SELECT created_at, thread_id FROM turns WHERE id = ? AND session_id = ?").get(turn_id, id);
42378
42378
  if (!targetTurn) {
42379
42379
  return reply.code(404).send({ error: "Turn not found" });
42380
42380
  }
42381
+ if (targetTurn.thread_id != null) {
42382
+ return reply.code(400).send({ error: "Cannot branch from a discussion thread turn" });
42383
+ }
42381
42384
  const newSessionId = v4_default();
42382
42385
  const now = (/* @__PURE__ */ new Date()).toISOString();
42383
42386
  const newTitle = title || `Branch of ${session.title || session.id.slice(0, 8)}`;
@@ -42395,7 +42398,9 @@ async function registerSessionRoutes(fastify) {
42395
42398
  now,
42396
42399
  session.runtime_config
42397
42400
  );
42398
- const turnRows = db2.prepare("SELECT * FROM turns WHERE session_id = ? AND created_at <= ? ORDER BY created_at ASC").all(id, targetTurn.created_at);
42401
+ const turnRows = db2.prepare(
42402
+ "SELECT * FROM turns WHERE session_id = ? AND thread_id IS NULL AND created_at <= ? ORDER BY created_at ASC"
42403
+ ).all(id, targetTurn.created_at);
42399
42404
  for (const turn of turnRows) {
42400
42405
  const newTurnId = v4_default();
42401
42406
  db2.prepare(
@@ -42357,10 +42357,13 @@ async function registerSessionRoutes(fastify) {
42357
42357
  if (!session) {
42358
42358
  return reply.code(404).send({ error: "Session not found" });
42359
42359
  }
42360
- const targetTurn = db2.prepare("SELECT created_at FROM turns WHERE id = ? AND session_id = ?").get(turn_id, id);
42360
+ const targetTurn = db2.prepare("SELECT created_at, thread_id FROM turns WHERE id = ? AND session_id = ?").get(turn_id, id);
42361
42361
  if (!targetTurn) {
42362
42362
  return reply.code(404).send({ error: "Turn not found" });
42363
42363
  }
42364
+ if (targetTurn.thread_id != null) {
42365
+ return reply.code(400).send({ error: "Cannot branch from a discussion thread turn" });
42366
+ }
42364
42367
  const newSessionId = v4_default();
42365
42368
  const now = (/* @__PURE__ */ new Date()).toISOString();
42366
42369
  const newTitle = title || `Branch of ${session.title || session.id.slice(0, 8)}`;
@@ -42378,7 +42381,9 @@ async function registerSessionRoutes(fastify) {
42378
42381
  now,
42379
42382
  session.runtime_config
42380
42383
  );
42381
- const turnRows = db2.prepare("SELECT * FROM turns WHERE session_id = ? AND created_at <= ? ORDER BY created_at ASC").all(id, targetTurn.created_at);
42384
+ const turnRows = db2.prepare(
42385
+ "SELECT * FROM turns WHERE session_id = ? AND thread_id IS NULL AND created_at <= ? ORDER BY created_at ASC"
42386
+ ).all(id, targetTurn.created_at);
42382
42387
  for (const turn of turnRows) {
42383
42388
  const newTurnId = v4_default();
42384
42389
  db2.prepare(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repoburg",
3
- "version": "1.3.308",
3
+ "version": "1.3.309",
4
4
  "description": "A local AI-powered software developer assistant that runs on your own machine.",
5
5
  "author": "Celal Ertug",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "tree": "3f01773d2dfcfcfee7b73a8c7d7497c15ad692bc",
3
- "commit": "09c3b2cd834c96e24532f6bbedcfb4f2e7fac600",
3
+ "commit": "a683b63cfe83f7d553b92287c27957740b683132",
4
4
  "dirty": false,
5
- "repoburgVersion": "1.3.308",
6
- "builtAt": "2026-11-08T08:33:29.323Z"
5
+ "repoburgVersion": "1.3.309",
6
+ "builtAt": "2026-11-09T00:15:21.314Z"
7
7
  }
@@ -58,5 +58,5 @@
58
58
  ]
59
59
  }
60
60
  ],
61
- "version_name": "0.6.0 (repoburg 1.3.308, 09c3b2c)"
61
+ "version_name": "0.6.0 (repoburg 1.3.309, a683b63)"
62
62
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "tree": "3f01773d2dfcfcfee7b73a8c7d7497c15ad692bc",
3
- "commit": "09c3b2cd834c96e24532f6bbedcfb4f2e7fac600",
3
+ "commit": "a683b63cfe83f7d553b92287c27957740b683132",
4
4
  "dirty": false,
5
- "repoburgVersion": "1.3.308",
6
- "builtAt": "2026-11-08T08:33:29.323Z"
5
+ "repoburgVersion": "1.3.309",
6
+ "builtAt": "2026-11-09T00:15:21.314Z"
7
7
  }