thepopebot 1.2.34 → 1.2.36

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.
@@ -34,7 +34,7 @@ function AppSidebar({ user }) {
34
34
  /* @__PURE__ */ jsxs("div", { className: collapsed ? "flex justify-center" : "flex items-center justify-between", children: [
35
35
  !collapsed && /* @__PURE__ */ jsxs("span", { className: "px-2 font-semibold text-lg", children: [
36
36
  "The Pope Bot ",
37
- /* @__PURE__ */ jsxs("span", { className: "text-xs font-normal text-muted-foreground", children: [
37
+ /* @__PURE__ */ jsxs("span", { className: "text-[11px] font-normal text-muted-foreground", children: [
38
38
  "v",
39
39
  pkg.version
40
40
  ] })
@@ -39,7 +39,7 @@ export function AppSidebar({ user }) {
39
39
  {/* Top row: brand name + toggle icon (open) or just toggle icon (collapsed) */}
40
40
  <div className={collapsed ? 'flex justify-center' : 'flex items-center justify-between'}>
41
41
  {!collapsed && (
42
- <span className="px-2 font-semibold text-lg">The Pope Bot <span className="text-xs font-normal text-muted-foreground">v{pkg.version}</span></span>
42
+ <span className="px-2 font-semibold text-lg">The Pope Bot <span className="text-[11px] font-normal text-muted-foreground">v{pkg.version}</span></span>
43
43
  )}
44
44
  <Tooltip>
45
45
  <TooltipTrigger asChild>
@@ -13,15 +13,28 @@ function ChatPage({ session, needsSetup, chatId }) {
13
13
  const navigateToChat = useCallback((id) => {
14
14
  if (id) {
15
15
  window.history.pushState({}, "", `/chat/${id}`);
16
+ setResolvedChatId(null);
17
+ setInitialMessages([]);
18
+ setActiveChatId(id);
16
19
  } else {
17
20
  window.history.pushState({}, "", "/");
21
+ setInitialMessages([]);
22
+ setActiveChatId(null);
23
+ setResolvedChatId(crypto.randomUUID());
18
24
  }
19
- setActiveChatId(id);
20
25
  }, []);
21
26
  useEffect(() => {
22
27
  const onPopState = () => {
23
28
  const match = window.location.pathname.match(/^\/chat\/(.+)/);
24
- setActiveChatId(match ? match[1] : null);
29
+ if (match) {
30
+ setResolvedChatId(null);
31
+ setInitialMessages([]);
32
+ setActiveChatId(match[1]);
33
+ } else {
34
+ setInitialMessages([]);
35
+ setActiveChatId(null);
36
+ setResolvedChatId(crypto.randomUUID());
37
+ }
25
38
  };
26
39
  window.addEventListener("popstate", onPopState);
27
40
  return () => window.removeEventListener("popstate", onPopState);
@@ -45,9 +58,6 @@ function ChatPage({ session, needsSetup, chatId }) {
45
58
  setInitialMessages(uiMessages);
46
59
  setResolvedChatId(activeChatId);
47
60
  });
48
- } else {
49
- setInitialMessages([]);
50
- setResolvedChatId(crypto.randomUUID());
51
61
  }
52
62
  }, [activeChatId]);
53
63
  if (needsSetup || !session) {
@@ -23,17 +23,30 @@ export function ChatPage({ session, needsSetup, chatId }) {
23
23
  const navigateToChat = useCallback((id) => {
24
24
  if (id) {
25
25
  window.history.pushState({}, '', `/chat/${id}`);
26
+ setResolvedChatId(null);
27
+ setInitialMessages([]);
28
+ setActiveChatId(id);
26
29
  } else {
27
30
  window.history.pushState({}, '', '/');
31
+ setInitialMessages([]);
32
+ setActiveChatId(null);
33
+ setResolvedChatId(crypto.randomUUID());
28
34
  }
29
- setActiveChatId(id);
30
35
  }, []);
31
36
 
32
37
  // Browser back/forward
33
38
  useEffect(() => {
34
39
  const onPopState = () => {
35
40
  const match = window.location.pathname.match(/^\/chat\/(.+)/);
36
- setActiveChatId(match ? match[1] : null);
41
+ if (match) {
42
+ setResolvedChatId(null);
43
+ setInitialMessages([]);
44
+ setActiveChatId(match[1]);
45
+ } else {
46
+ setInitialMessages([]);
47
+ setActiveChatId(null);
48
+ setResolvedChatId(crypto.randomUUID());
49
+ }
37
50
  };
38
51
  window.addEventListener('popstate', onPopState);
39
52
  return () => window.removeEventListener('popstate', onPopState);
@@ -60,9 +73,6 @@ export function ChatPage({ session, needsSetup, chatId }) {
60
73
  setInitialMessages(uiMessages);
61
74
  setResolvedChatId(activeChatId);
62
75
  });
63
- } else {
64
- setInitialMessages([]);
65
- setResolvedChatId(crypto.randomUUID());
66
76
  }
67
77
  }, [activeChatId]);
68
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.34",
3
+ "version": "1.2.36",
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": {