thepopebot 1.2.75-beta.20 → 1.2.75-beta.21

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.
@@ -299,6 +299,45 @@ function CodePage({ session, codeWorkspaceId }) {
299
299
  /* @__PURE__ */ jsx(SpinnerIcon, { size: 12 }),
300
300
  /* @__PURE__ */ jsx("span", { children: "Editor..." })
301
301
  ] }),
302
+ portForwards.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: portForwards.map((pf) => /* @__PURE__ */ jsxs(
303
+ "div",
304
+ {
305
+ className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium font-mono text-muted-foreground shrink-0 whitespace-nowrap rounded-t-md border border-b-0 border-emerald-500/30 bg-emerald-500/5",
306
+ children: [
307
+ /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500" }),
308
+ /* @__PURE__ */ jsxs("span", { children: [
309
+ ":",
310
+ pf.port
311
+ ] }),
312
+ /* @__PURE__ */ jsx(
313
+ "button",
314
+ {
315
+ className: "hover:text-emerald-400 transition-colors",
316
+ onClick: () => window.open(pf.url, "_blank"),
317
+ title: `Open ${pf.url}`,
318
+ children: /* @__PURE__ */ jsxs("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
319
+ /* @__PURE__ */ jsx("path", { d: "M7 3H3v10h10V9" }),
320
+ /* @__PURE__ */ jsx("path", { d: "M10 2h4v4" }),
321
+ /* @__PURE__ */ jsx("path", { d: "M14 2L7 9" })
322
+ ] })
323
+ }
324
+ ),
325
+ /* @__PURE__ */ jsx(
326
+ "button",
327
+ {
328
+ className: "hover:text-destructive transition-colors",
329
+ onClick: () => handleStopPort(pf.port),
330
+ title: "Stop forwarding",
331
+ children: /* @__PURE__ */ jsxs("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: [
332
+ /* @__PURE__ */ jsx("line", { x1: "4", y1: "4", x2: "12", y2: "12" }),
333
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "4", x2: "4", y2: "12" })
334
+ ] })
335
+ }
336
+ )
337
+ ]
338
+ },
339
+ pf.port
340
+ )) }),
302
341
  /* @__PURE__ */ jsx("div", { className: "self-stretch my-1.5 mx-1 md:mx-4 w-px bg-border shrink-0" }),
303
342
  /* @__PURE__ */ jsx(
304
343
  "button",
@@ -341,46 +380,7 @@ function CodePage({ session, codeWorkspaceId }) {
341
380
  title: "Forward a port",
342
381
  children: "+ Port"
343
382
  }
344
- ),
345
- portForwards.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 ml-auto", children: portForwards.map((pf) => /* @__PURE__ */ jsxs(
346
- "div",
347
- {
348
- className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium font-mono text-muted-foreground shrink-0 whitespace-nowrap rounded-t-md border border-b-0 border-emerald-500/30 bg-emerald-500/5",
349
- children: [
350
- /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500" }),
351
- /* @__PURE__ */ jsxs("span", { children: [
352
- ":",
353
- pf.port
354
- ] }),
355
- /* @__PURE__ */ jsx(
356
- "button",
357
- {
358
- className: "hover:text-emerald-400 transition-colors",
359
- onClick: () => window.open(pf.url, "_blank"),
360
- title: `Open ${pf.url}`,
361
- children: /* @__PURE__ */ jsxs("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
362
- /* @__PURE__ */ jsx("path", { d: "M7 3H3v10h10V9" }),
363
- /* @__PURE__ */ jsx("path", { d: "M10 2h4v4" }),
364
- /* @__PURE__ */ jsx("path", { d: "M14 2L7 9" })
365
- ] })
366
- }
367
- ),
368
- /* @__PURE__ */ jsx(
369
- "button",
370
- {
371
- className: "hover:text-destructive transition-colors",
372
- onClick: () => handleStopPort(pf.port),
373
- title: "Stop forwarding",
374
- children: /* @__PURE__ */ jsxs("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: [
375
- /* @__PURE__ */ jsx("line", { x1: "4", y1: "4", x2: "12", y2: "12" }),
376
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "4", x2: "4", y2: "12" })
377
- ] })
378
- }
379
- )
380
- ]
381
- },
382
- pf.port
383
- )) })
383
+ )
384
384
  ] }),
385
385
  /* @__PURE__ */ jsxs("div", { style: { position: "relative", flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
386
386
  showDiff && /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, zIndex: 20, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(DiffViewer, { workspaceId: codeWorkspaceId, diffStats, onClose: () => setShowDiff(false) }) }),
@@ -356,6 +356,42 @@ export default function CodePage({ session, codeWorkspaceId }) {
356
356
  </div>
357
357
  )}
358
358
 
359
+ {/* Active port forwards */}
360
+ {portForwards.length > 0 && (
361
+ <div className="flex items-center gap-1">
362
+ {portForwards.map((pf) => (
363
+ <div
364
+ key={pf.port}
365
+ className="flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium font-mono text-muted-foreground shrink-0 whitespace-nowrap rounded-t-md border border-b-0 border-emerald-500/30 bg-emerald-500/5"
366
+ >
367
+ <div className="w-1.5 h-1.5 rounded-full bg-emerald-500" />
368
+ <span>:{pf.port}</span>
369
+ <button
370
+ className="hover:text-emerald-400 transition-colors"
371
+ onClick={() => window.open(pf.url, '_blank')}
372
+ title={`Open ${pf.url}`}
373
+ >
374
+ <svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
375
+ <path d="M7 3H3v10h10V9" />
376
+ <path d="M10 2h4v4" />
377
+ <path d="M14 2L7 9" />
378
+ </svg>
379
+ </button>
380
+ <button
381
+ className="hover:text-destructive transition-colors"
382
+ onClick={() => handleStopPort(pf.port)}
383
+ title="Stop forwarding"
384
+ >
385
+ <svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round">
386
+ <line x1="4" y1="4" x2="12" y2="12" />
387
+ <line x1="12" y1="4" x2="4" y2="12" />
388
+ </svg>
389
+ </button>
390
+ </div>
391
+ ))}
392
+ </div>
393
+ )}
394
+
359
395
  {/* Divider between real tabs and + buttons */}
360
396
  <div className="self-stretch my-1.5 mx-1 md:mx-4 w-px bg-border shrink-0" />
361
397
 
@@ -392,42 +428,6 @@ export default function CodePage({ session, codeWorkspaceId }) {
392
428
  >
393
429
  + Port
394
430
  </button>
395
-
396
- {/* Active port forwards */}
397
- {portForwards.length > 0 && (
398
- <div className="flex items-center gap-1 ml-auto">
399
- {portForwards.map((pf) => (
400
- <div
401
- key={pf.port}
402
- className="flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium font-mono text-muted-foreground shrink-0 whitespace-nowrap rounded-t-md border border-b-0 border-emerald-500/30 bg-emerald-500/5"
403
- >
404
- <div className="w-1.5 h-1.5 rounded-full bg-emerald-500" />
405
- <span>:{pf.port}</span>
406
- <button
407
- className="hover:text-emerald-400 transition-colors"
408
- onClick={() => window.open(pf.url, '_blank')}
409
- title={`Open ${pf.url}`}
410
- >
411
- <svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
412
- <path d="M7 3H3v10h10V9" />
413
- <path d="M10 2h4v4" />
414
- <path d="M14 2L7 9" />
415
- </svg>
416
- </button>
417
- <button
418
- className="hover:text-destructive transition-colors"
419
- onClick={() => handleStopPort(pf.port)}
420
- title="Stop forwarding"
421
- >
422
- <svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round">
423
- <line x1="4" y1="4" x2="12" y2="12" />
424
- <line x1="12" y1="4" x2="4" y2="12" />
425
- </svg>
426
- </button>
427
- </div>
428
- ))}
429
- </div>
430
- )}
431
431
  </div>
432
432
 
433
433
  {/* Tab content panels — all mounted, hidden via display */}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.75-beta.20",
3
+ "version": "1.2.75-beta.21",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "./auth/actions": "./lib/auth/actions.js",
16
16
  "./chat/api": "./lib/chat/api.js",
17
17
  "./db": "./lib/db/index.js",
18
+ "./db/chats": "./lib/db/chats.js",
18
19
  "./db/oauth-tokens": "./lib/db/oauth-tokens.js",
19
20
  "./chat": "./lib/chat/components/index.js",
20
21
  "./chat/actions": "./lib/chat/actions.js",